From 06f496585d1aeb6c20fd1e29e23661af7e179534 Mon Sep 17 00:00:00 2001 From: Frans Pop Date: Wed, 4 Mar 2009 11:55:28 -0800 Subject: [PATCH] --- yaml --- r: 141906 b: refs/heads/master c: 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/CREDITS | 2 +- trunk/Documentation/filesystems/ext2.txt | 5 +- trunk/Documentation/filesystems/proc.txt | 7 - trunk/Documentation/logo.gif | Bin 0 -> 16335 bytes trunk/Documentation/logo.svg | 2911 ----------- trunk/Documentation/logo.txt | 15 +- trunk/MAINTAINERS | 9 - trunk/Makefile | 10 +- trunk/arch/arm/kernel/entry-common.S | 4 - trunk/arch/arm/kernel/fiq.c | 4 +- .../arm/mach-ep93xx/include/mach/platform.h | 2 - trunk/arch/arm/mach-mx1/devices.c | 2 - trunk/arch/arm/mach-mx1/mx1ads.c | 1 - trunk/arch/arm/mach-omap2/board-omap3beagle.c | 4 +- trunk/arch/arm/mach-orion5x/common.c | 7 - trunk/arch/arm/mach-s3c6410/mach-smdk6410.c | 4 +- trunk/arch/arm/mm/copypage-feroceon.c | 2 +- trunk/arch/arm/mm/copypage-v3.c | 2 +- trunk/arch/arm/mm/copypage-v4mc.c | 2 +- trunk/arch/arm/mm/copypage-v4wb.c | 2 +- trunk/arch/arm/mm/copypage-v4wt.c | 2 +- trunk/arch/arm/mm/copypage-xsc3.c | 2 +- trunk/arch/arm/mm/copypage-xscale.c | 2 +- trunk/arch/arm/mm/dma-mapping.c | 20 +- trunk/arch/arm/mm/init.c | 2 +- trunk/arch/arm/mm/mmap.c | 2 +- trunk/arch/arm/plat-omap/Makefile | 3 +- trunk/arch/arm/plat-omap/common.c | 14 +- .../arch/arm/plat-omap/include/mach/common.h | 2 +- trunk/arch/arm/plat-omap/include/mach/pm.h | 2 +- trunk/arch/arm/plat-s3c64xx/clock.c | 2 +- trunk/arch/arm/plat-s3c64xx/gpiolib.c | 2 +- .../arch/arm/plat-s3c64xx/include/plat/irqs.h | 2 +- trunk/arch/arm/plat-s3c64xx/irq-eint.c | 15 +- trunk/arch/arm/plat-s3c64xx/irq.c | 2 +- trunk/arch/arm/plat-s3c64xx/s3c6400-clock.c | 24 +- trunk/arch/arm/tools/mach-types | 136 +- trunk/arch/m68k/include/asm/param.h | 25 +- trunk/arch/m68k/include/asm/param_mm.h | 22 + trunk/arch/m68k/include/asm/param_no.h | 22 + trunk/arch/m68k/include/asm/ptrace.h | 88 +- trunk/arch/m68k/include/asm/ptrace_mm.h | 80 + trunk/arch/m68k/include/asm/ptrace_no.h | 87 + trunk/arch/m68k/include/asm/setup.h | 377 +- trunk/arch/m68k/include/asm/setup_mm.h | 376 ++ trunk/arch/m68k/include/asm/setup_no.h | 10 + trunk/arch/m68k/include/asm/sigcontext.h | 25 +- trunk/arch/m68k/include/asm/sigcontext_mm.h | 19 + trunk/arch/m68k/include/asm/sigcontext_no.h | 17 + trunk/arch/m68k/include/asm/siginfo.h | 98 +- trunk/arch/m68k/include/asm/siginfo_mm.h | 92 + trunk/arch/m68k/include/asm/siginfo_no.h | 6 + trunk/arch/m68k/include/asm/signal.h | 216 +- trunk/arch/m68k/include/asm/signal_mm.h | 206 + trunk/arch/m68k/include/asm/signal_no.h | 159 + trunk/arch/m68k/include/asm/swab.h | 30 +- trunk/arch/m68k/include/asm/swab_mm.h | 16 + trunk/arch/m68k/include/asm/swab_no.h | 24 + trunk/arch/m68k/include/asm/unistd.h | 377 +- trunk/arch/m68k/include/asm/unistd_mm.h | 372 ++ trunk/arch/m68k/include/asm/unistd_no.h | 372 ++ trunk/arch/powerpc/configs/ps3_defconfig | 250 +- trunk/arch/powerpc/include/asm/cputable.h | 4 +- trunk/arch/powerpc/kernel/head_32.S | 15 +- trunk/arch/powerpc/platforms/ps3/Kconfig | 7 - trunk/arch/s390/include/asm/mman.h | 5 - trunk/arch/s390/include/asm/processor.h | 5 +- trunk/arch/s390/include/asm/topology.h | 2 - trunk/arch/s390/kernel/mcount.S | 6 +- trunk/arch/s390/lib/div64.c | 2 +- trunk/arch/s390/lib/uaccess_pt.c | 18 + trunk/arch/s390/mm/mmap.c | 48 +- trunk/arch/s390/mm/pgtable.c | 2 - trunk/arch/sparc/include/asm/pil.h | 1 - trunk/arch/sparc/kernel/kgdb_64.c | 2 +- trunk/arch/sparc/kernel/pci_common.c | 2 +- trunk/arch/sparc/kernel/ttable.S | 7 +- trunk/arch/sparc/mm/ultra.S | 24 +- trunk/arch/x86/kernel/cpu/cpufreq/longhaul.c | 6 +- trunk/arch/x86/kernel/kprobes.c | 3 - trunk/arch/x86/kernel/tsc.c | 110 +- trunk/drivers/acpi/Kconfig | 150 +- trunk/drivers/acpi/Makefile | 8 +- trunk/drivers/acpi/acpica/Makefile | 4 +- trunk/drivers/acpi/acpica/acglobal.h | 11 +- trunk/drivers/acpi/acpica/achware.h | 12 +- trunk/drivers/acpi/acpica/aclocal.h | 60 +- trunk/drivers/acpi/acpica/acmacros.h | 4 + trunk/drivers/acpi/acpica/acobject.h | 1 + trunk/drivers/acpi/acpica/acpredef.h | 41 +- trunk/drivers/acpi/acpica/actables.h | 9 +- trunk/drivers/acpi/acpica/acutils.h | 15 - trunk/drivers/acpi/acpica/dsinit.c | 16 +- trunk/drivers/acpi/acpica/dsmthdat.c | 2 +- trunk/drivers/acpi/acpica/dsobject.c | 6 +- trunk/drivers/acpi/acpica/dsopcode.c | 32 +- trunk/drivers/acpi/acpica/dsutils.c | 2 +- trunk/drivers/acpi/acpica/dswexec.c | 5 +- trunk/drivers/acpi/acpica/evevent.c | 18 +- trunk/drivers/acpi/acpica/evgpe.c | 7 +- trunk/drivers/acpi/acpica/evgpeblk.c | 70 +- trunk/drivers/acpi/acpica/evmisc.c | 16 +- trunk/drivers/acpi/acpica/evregion.c | 5 +- trunk/drivers/acpi/acpica/evrgnini.c | 22 +- trunk/drivers/acpi/acpica/evxface.c | 3 +- trunk/drivers/acpi/acpica/evxfevnt.c | 24 +- trunk/drivers/acpi/acpica/evxfregn.c | 3 +- trunk/drivers/acpi/acpica/exconfig.c | 17 +- trunk/drivers/acpi/acpica/exconvrt.c | 11 +- trunk/drivers/acpi/acpica/exdump.c | 59 +- trunk/drivers/acpi/acpica/exfield.c | 29 +- trunk/drivers/acpi/acpica/exfldio.c | 14 +- trunk/drivers/acpi/acpica/exmisc.c | 14 +- trunk/drivers/acpi/acpica/exoparg1.c | 13 +- trunk/drivers/acpi/acpica/exoparg2.c | 2 +- trunk/drivers/acpi/acpica/exoparg3.c | 7 +- trunk/drivers/acpi/acpica/exprep.c | 2 +- trunk/drivers/acpi/acpica/exregion.c | 4 +- trunk/drivers/acpi/acpica/exresnte.c | 8 +- trunk/drivers/acpi/acpica/exresolv.c | 9 +- trunk/drivers/acpi/acpica/exresop.c | 23 +- trunk/drivers/acpi/acpica/exstore.c | 18 +- trunk/drivers/acpi/acpica/exstoren.c | 29 +- trunk/drivers/acpi/acpica/exutils.c | 2 +- trunk/drivers/acpi/acpica/hwacpi.c | 9 +- trunk/drivers/acpi/acpica/hwgpe.c | 21 +- trunk/drivers/acpi/acpica/hwregs.c | 322 +- trunk/drivers/acpi/acpica/hwsleep.c | 130 +- trunk/drivers/acpi/acpica/hwvalid.c | 258 - trunk/drivers/acpi/acpica/hwxface.c | 279 +- trunk/drivers/acpi/acpica/nsaccess.c | 54 +- trunk/drivers/acpi/acpica/nsalloc.c | 24 +- trunk/drivers/acpi/acpica/nsdump.c | 24 +- trunk/drivers/acpi/acpica/nseval.c | 2 +- trunk/drivers/acpi/acpica/nsinit.c | 19 +- trunk/drivers/acpi/acpica/nsload.c | 4 +- trunk/drivers/acpi/acpica/nsobject.c | 18 +- trunk/drivers/acpi/acpica/nsparse.c | 10 +- trunk/drivers/acpi/acpica/nspredef.c | 38 +- trunk/drivers/acpi/acpica/nssearch.c | 14 +- trunk/drivers/acpi/acpica/nsutils.c | 27 +- trunk/drivers/acpi/acpica/nswalk.c | 12 +- trunk/drivers/acpi/acpica/nsxfeval.c | 36 +- trunk/drivers/acpi/acpica/rscalc.c | 7 +- trunk/drivers/acpi/acpica/rscreate.c | 15 +- trunk/drivers/acpi/acpica/tbfadt.c | 363 +- trunk/drivers/acpi/acpica/tbinstal.c | 82 +- trunk/drivers/acpi/acpica/tbutils.c | 106 +- trunk/drivers/acpi/acpica/tbxface.c | 71 +- trunk/drivers/acpi/acpica/tbxfroot.c | 4 +- trunk/drivers/acpi/acpica/utcopy.c | 30 +- trunk/drivers/acpi/acpica/utdelete.c | 6 +- trunk/drivers/acpi/acpica/uteval.c | 98 +- trunk/drivers/acpi/acpica/utglobal.c | 17 +- trunk/drivers/acpi/acpica/utlock.c | 175 - trunk/drivers/acpi/acpica/utmisc.c | 3 +- trunk/drivers/acpi/acpica/utmutex.c | 23 +- trunk/drivers/acpi/acpica/utobject.c | 11 +- trunk/drivers/acpi/bus.c | 24 +- trunk/drivers/acpi/debug.c | 14 +- trunk/drivers/acpi/ec.c | 7 +- trunk/drivers/acpi/fan.c | 20 +- trunk/drivers/acpi/glue.c | 6 +- trunk/drivers/acpi/internal.h | 43 - trunk/drivers/acpi/numa.c | 2 +- trunk/drivers/acpi/osl.c | 50 + trunk/drivers/acpi/pci_irq.c | 2 +- trunk/drivers/acpi/pci_link.c | 147 +- trunk/drivers/acpi/power.c | 8 +- trunk/drivers/acpi/proc.c | 7 +- trunk/drivers/acpi/processor_idle.c | 124 +- trunk/drivers/acpi/processor_thermal.c | 20 +- trunk/drivers/acpi/scan.c | 23 +- trunk/drivers/acpi/sleep.c | 20 +- trunk/drivers/acpi/system.c | 60 +- trunk/drivers/acpi/thermal.c | 539 +- trunk/drivers/acpi/video.c | 22 +- trunk/drivers/acpi/wakeup.c | 9 +- trunk/drivers/block/Makefile | 1 - trunk/drivers/block/ps3vram.c | 865 ---- trunk/drivers/block/xsysace.c | 22 - trunk/drivers/dca/dca-sysfs.c | 21 - trunk/drivers/hid/usbhid/hiddev.c | 4 +- trunk/drivers/isdn/gigaset/bas-gigaset.c | 16 +- trunk/drivers/md/dm-crypt.c | 43 +- trunk/drivers/md/dm-io.c | 2 - trunk/drivers/md/dm-ioctl.c | 7 +- trunk/drivers/md/dm.c | 32 +- trunk/drivers/mtd/devices/Kconfig | 7 + trunk/drivers/mtd/devices/Makefile | 1 + trunk/drivers/mtd/devices/ps3vram.c | 768 +++ trunk/drivers/net/Kconfig | 13 - trunk/drivers/net/Makefile | 2 - trunk/drivers/net/benet/Kconfig | 7 - trunk/drivers/net/benet/Makefile | 7 - trunk/drivers/net/benet/be.h | 328 -- trunk/drivers/net/benet/be_cmds.c | 861 ---- trunk/drivers/net/benet/be_cmds.h | 688 --- trunk/drivers/net/benet/be_ethtool.c | 362 -- trunk/drivers/net/benet/be_hw.h | 211 - trunk/drivers/net/benet/be_main.c | 1911 ------- trunk/drivers/net/bnx2.c | 12 +- trunk/drivers/net/bnx2x.h | 2 +- trunk/drivers/net/bnx2x_init.h | 4 + trunk/drivers/net/bnx2x_main.c | 21 +- trunk/drivers/net/bonding/bond_main.c | 25 +- trunk/drivers/net/dm9000.c | 6 +- trunk/drivers/net/dnet.c | 994 ---- trunk/drivers/net/dnet.h | 225 - trunk/drivers/net/ibm_newemac/core.c | 3 - trunk/drivers/net/igb/igb_main.c | 26 +- trunk/drivers/net/ixgbe/ixgbe_main.c | 1 - trunk/drivers/net/mv643xx_eth.c | 10 +- trunk/drivers/net/netxen/netxen_nic.h | 1 + trunk/drivers/net/netxen/netxen_nic_hw.c | 22 + trunk/drivers/net/netxen/netxen_nic_main.c | 3 + trunk/drivers/net/qlge/qlge.h | 1 - trunk/drivers/net/qlge/qlge_main.c | 57 +- trunk/drivers/net/r8169.c | 122 +- trunk/drivers/net/sh_eth.c | 20 +- trunk/drivers/net/sh_eth.h | 4 +- trunk/drivers/net/smsc911x.c | 4 - trunk/drivers/net/sungem.c | 9 +- trunk/drivers/net/tulip/tulip_core.c | 45 +- trunk/drivers/net/ucc_geth.c | 34 +- trunk/drivers/net/ucc_geth.h | 3 +- trunk/drivers/net/via-velocity.c | 15 +- trunk/drivers/net/virtio_net.c | 3 - trunk/drivers/net/wireless/ath9k/ath9k.h | 4 +- trunk/drivers/net/wireless/ath9k/core.h | 33 - trunk/drivers/net/wireless/ath9k/hw.c | 22 +- trunk/drivers/net/wireless/ath9k/main.c | 1 - trunk/drivers/net/wireless/zd1211rw/zd_mac.c | 8 +- trunk/drivers/parisc/sba_iommu.c | 2 + trunk/drivers/pci/pci-acpi.c | 4 +- trunk/drivers/platform/x86/Kconfig | 14 +- trunk/drivers/platform/x86/acer-wmi.c | 2 +- trunk/drivers/platform/x86/asus-laptop.c | 5 +- trunk/drivers/platform/x86/eeepc-laptop.c | 6 +- trunk/drivers/platform/x86/hp-wmi.c | 25 + trunk/drivers/platform/x86/intel_menlow.c | 29 +- trunk/drivers/platform/x86/thinkpad_acpi.c | 8 +- trunk/drivers/platform/x86/wmi.c | 2 +- trunk/drivers/sbus/char/openprom.c | 1 - trunk/drivers/staging/Kconfig | 2 + trunk/drivers/staging/Makefile | 1 + trunk/drivers/staging/benet/Kconfig | 7 + trunk/drivers/staging/benet/MAINTAINERS | 6 + trunk/drivers/staging/benet/Makefile | 14 + trunk/drivers/staging/benet/TODO | 6 + trunk/drivers/staging/benet/asyncmesg.h | 82 + trunk/drivers/staging/benet/be_cm.h | 134 + trunk/drivers/staging/benet/be_common.h | 53 + trunk/drivers/staging/benet/be_ethtool.c | 348 ++ trunk/drivers/staging/benet/be_init.c | 1382 +++++ trunk/drivers/staging/benet/be_int.c | 863 ++++ trunk/drivers/staging/benet/be_netif.c | 705 +++ trunk/drivers/staging/benet/benet.h | 429 ++ trunk/drivers/staging/benet/bestatus.h | 103 + trunk/drivers/staging/benet/cev.h | 243 + trunk/drivers/staging/benet/cq.c | 211 + trunk/drivers/staging/benet/descriptors.h | 71 + trunk/drivers/staging/benet/doorbells.h | 179 + trunk/drivers/staging/benet/ep.h | 66 + trunk/drivers/staging/benet/eq.c | 299 ++ trunk/drivers/staging/benet/eth.c | 1273 +++++ trunk/drivers/staging/benet/etx_context.h | 55 + trunk/drivers/staging/benet/funcobj.c | 565 +++ trunk/drivers/staging/benet/fwcmd_common.h | 222 + .../drivers/staging/benet/fwcmd_common_bmap.h | 717 +++ trunk/drivers/staging/benet/fwcmd_eth_bmap.h | 280 ++ trunk/drivers/staging/benet/fwcmd_hdr_bmap.h | 54 + trunk/drivers/staging/benet/fwcmd_mcc.h | 94 + trunk/drivers/staging/benet/fwcmd_opcodes.h | 244 + .../drivers/staging/benet/fwcmd_types_bmap.h | 29 + trunk/drivers/staging/benet/host_struct.h | 182 + trunk/drivers/staging/benet/hwlib.h | 830 +++ trunk/drivers/staging/benet/mpu.c | 1364 +++++ trunk/drivers/staging/benet/mpu.h | 74 + trunk/drivers/staging/benet/mpu_context.h | 46 + trunk/drivers/staging/benet/pcicfg.h | 825 +++ trunk/drivers/staging/benet/post_codes.h | 111 + trunk/drivers/staging/benet/regmap.h | 68 + trunk/drivers/thermal/thermal_sys.c | 356 +- trunk/drivers/usb/atm/cxacru.c | 3 +- trunk/drivers/usb/class/usbtmc.c | 4 +- trunk/drivers/usb/core/devio.c | 12 +- trunk/drivers/usb/host/ehci-q.c | 3 +- trunk/drivers/usb/host/ehci-sched.c | 10 +- trunk/drivers/usb/image/mdc800.c | 1 - trunk/drivers/usb/misc/adutux.c | 6 +- trunk/drivers/usb/misc/vstusb.c | 1 - trunk/drivers/usb/serial/cp2101.c | 1 - trunk/drivers/usb/serial/ftdi_sio.c | 5 - trunk/drivers/usb/serial/ftdi_sio.h | 20 - trunk/drivers/usb/serial/option.c | 14 +- trunk/drivers/usb/storage/unusual_devs.h | 16 +- trunk/drivers/usb/wusbcore/wa-xfer.c | 4 +- trunk/drivers/video/aty/radeon_pm.c | 24 - .../drivers/video/logo/logo_linux_clut224.ppm | 4428 ++++++----------- trunk/drivers/video/logo/logo_linux_vga16.ppm | 4339 ++++++---------- trunk/fs/aio.c | 42 +- trunk/fs/bio-integrity.c | 5 +- trunk/fs/bio.c | 6 +- trunk/fs/btrfs/ctree.h | 9 - trunk/fs/btrfs/extent-tree.c | 45 +- trunk/fs/btrfs/volumes.c | 8 - trunk/fs/buffer.c | 23 +- trunk/fs/ecryptfs/crypto.c | 49 +- trunk/fs/ecryptfs/ecryptfs_kernel.h | 1 + trunk/fs/ecryptfs/inode.c | 32 +- trunk/fs/ext4/extents.c | 6 +- trunk/fs/ext4/ialloc.c | 4 +- trunk/fs/ext4/mballoc.c | 13 +- trunk/fs/minix/inode.c | 2 +- trunk/fs/nfsd/nfs4xdr.c | 1 - trunk/fs/proc/base.c | 16 +- trunk/fs/ufs/super.c | 2 +- trunk/include/acpi/acexcep.h | 6 +- trunk/include/acpi/acpi_bus.h | 16 + trunk/include/acpi/acpi_drivers.h | 23 + trunk/include/acpi/acpiosxf.h | 4 + trunk/include/acpi/acpixf.h | 16 +- trunk/include/acpi/actbl.h | 74 +- trunk/include/acpi/actypes.h | 18 +- trunk/include/linux/bio.h | 4 +- trunk/include/linux/capability.h | 6 +- trunk/include/linux/compiler-gcc.h | 10 +- trunk/include/linux/dca.h | 20 - trunk/include/linux/thermal.h | 48 +- .../include/net/netfilter/nf_conntrack_core.h | 3 +- trunk/kernel/module.c | 26 +- trunk/kernel/signal.c | 8 - trunk/net/core/dev.c | 7 +- trunk/net/ipv4/ip_fragment.c | 3 +- trunk/net/ipv6/af_inet6.c | 3 - trunk/net/ipv6/netfilter/nf_conntrack_reasm.c | 8 +- trunk/net/ipv6/reassembly.c | 7 +- trunk/net/ipv6/sit.c | 2 +- trunk/net/mac80211/tx.c | 2 - trunk/net/netfilter/nf_conntrack_core.c | 2 +- trunk/net/netfilter/nf_conntrack_netlink.c | 1 - trunk/net/netfilter/nf_conntrack_proto_tcp.c | 4 +- trunk/net/sctp/endpointola.c | 3 +- trunk/net/wireless/Kconfig | 10 - trunk/net/wireless/lib80211_crypt_ccmp.c | 2 - trunk/net/wireless/lib80211_crypt_tkip.c | 4 - trunk/net/wireless/nl80211.c | 11 - trunk/net/xfrm/xfrm_state.c | 90 +- trunk/scripts/kconfig/conf.c | 16 +- trunk/scripts/kconfig/confdata.c | 51 +- trunk/sound/core/oss/mixer_oss.c | 3 - trunk/sound/core/oss/pcm_oss.c | 4 +- trunk/sound/core/sgbuf.c | 7 +- trunk/sound/isa/opl3sa2.c | 18 +- trunk/sound/pci/hda/hda_intel.c | 39 +- trunk/sound/pci/mixart/mixart.c | 1 - 358 files changed, 21111 insertions(+), 20366 deletions(-) create mode 100644 trunk/Documentation/logo.gif delete mode 100644 trunk/Documentation/logo.svg create mode 100644 trunk/arch/m68k/include/asm/param_mm.h create mode 100644 trunk/arch/m68k/include/asm/param_no.h create mode 100644 trunk/arch/m68k/include/asm/ptrace_mm.h create mode 100644 trunk/arch/m68k/include/asm/ptrace_no.h create mode 100644 trunk/arch/m68k/include/asm/setup_mm.h create mode 100644 trunk/arch/m68k/include/asm/setup_no.h create mode 100644 trunk/arch/m68k/include/asm/sigcontext_mm.h create mode 100644 trunk/arch/m68k/include/asm/sigcontext_no.h create mode 100644 trunk/arch/m68k/include/asm/siginfo_mm.h create mode 100644 trunk/arch/m68k/include/asm/siginfo_no.h create mode 100644 trunk/arch/m68k/include/asm/signal_mm.h create mode 100644 trunk/arch/m68k/include/asm/signal_no.h create mode 100644 trunk/arch/m68k/include/asm/swab_mm.h create mode 100644 trunk/arch/m68k/include/asm/swab_no.h create mode 100644 trunk/arch/m68k/include/asm/unistd_mm.h create mode 100644 trunk/arch/m68k/include/asm/unistd_no.h delete mode 100644 trunk/drivers/acpi/acpica/hwvalid.c delete mode 100644 trunk/drivers/acpi/acpica/utlock.c delete mode 100644 trunk/drivers/acpi/internal.h delete mode 100644 trunk/drivers/block/ps3vram.c create mode 100644 trunk/drivers/mtd/devices/ps3vram.c delete mode 100644 trunk/drivers/net/benet/Kconfig delete mode 100644 trunk/drivers/net/benet/Makefile delete mode 100644 trunk/drivers/net/benet/be.h delete mode 100644 trunk/drivers/net/benet/be_cmds.c delete mode 100644 trunk/drivers/net/benet/be_cmds.h delete mode 100644 trunk/drivers/net/benet/be_ethtool.c delete mode 100644 trunk/drivers/net/benet/be_hw.h delete mode 100644 trunk/drivers/net/benet/be_main.c delete mode 100644 trunk/drivers/net/dnet.c delete mode 100644 trunk/drivers/net/dnet.h create mode 100644 trunk/drivers/staging/benet/Kconfig create mode 100644 trunk/drivers/staging/benet/MAINTAINERS create mode 100644 trunk/drivers/staging/benet/Makefile create mode 100644 trunk/drivers/staging/benet/TODO create mode 100644 trunk/drivers/staging/benet/asyncmesg.h create mode 100644 trunk/drivers/staging/benet/be_cm.h create mode 100644 trunk/drivers/staging/benet/be_common.h create mode 100644 trunk/drivers/staging/benet/be_ethtool.c create mode 100644 trunk/drivers/staging/benet/be_init.c create mode 100644 trunk/drivers/staging/benet/be_int.c create mode 100644 trunk/drivers/staging/benet/be_netif.c create mode 100644 trunk/drivers/staging/benet/benet.h create mode 100644 trunk/drivers/staging/benet/bestatus.h create mode 100644 trunk/drivers/staging/benet/cev.h create mode 100644 trunk/drivers/staging/benet/cq.c create mode 100644 trunk/drivers/staging/benet/descriptors.h create mode 100644 trunk/drivers/staging/benet/doorbells.h create mode 100644 trunk/drivers/staging/benet/ep.h create mode 100644 trunk/drivers/staging/benet/eq.c create mode 100644 trunk/drivers/staging/benet/eth.c create mode 100644 trunk/drivers/staging/benet/etx_context.h create mode 100644 trunk/drivers/staging/benet/funcobj.c create mode 100644 trunk/drivers/staging/benet/fwcmd_common.h create mode 100644 trunk/drivers/staging/benet/fwcmd_common_bmap.h create mode 100644 trunk/drivers/staging/benet/fwcmd_eth_bmap.h create mode 100644 trunk/drivers/staging/benet/fwcmd_hdr_bmap.h create mode 100644 trunk/drivers/staging/benet/fwcmd_mcc.h create mode 100644 trunk/drivers/staging/benet/fwcmd_opcodes.h create mode 100644 trunk/drivers/staging/benet/fwcmd_types_bmap.h create mode 100644 trunk/drivers/staging/benet/host_struct.h create mode 100644 trunk/drivers/staging/benet/hwlib.h create mode 100644 trunk/drivers/staging/benet/mpu.c create mode 100644 trunk/drivers/staging/benet/mpu.h create mode 100644 trunk/drivers/staging/benet/mpu_context.h create mode 100644 trunk/drivers/staging/benet/pcicfg.h create mode 100644 trunk/drivers/staging/benet/post_codes.h create mode 100644 trunk/drivers/staging/benet/regmap.h diff --git a/[refs] b/[refs] index 1fbfb02286fb..22d5101b3379 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4f3bff70a64b105921dac8630bc4381567b21ebd +refs/heads/master: 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca diff --git a/trunk/CREDITS b/trunk/CREDITS index e8b7d36611e5..5e0736722afd 100644 --- a/trunk/CREDITS +++ b/trunk/CREDITS @@ -3738,7 +3738,7 @@ S: 93149 Nittenau S: Germany N: Gertjan van Wingerde -E: gwingerde@gmail.com +E: gwingerde@home.nl D: Ralink rt2x00 WLAN driver D: Minix V2 file-system D: Misc fixes diff --git a/trunk/Documentation/filesystems/ext2.txt b/trunk/Documentation/filesystems/ext2.txt index e055acb6b2d4..23448551cabe 100644 --- a/trunk/Documentation/filesystems/ext2.txt +++ b/trunk/Documentation/filesystems/ext2.txt @@ -376,8 +376,7 @@ Implementations for: Windows 95/98/NT/2000 http://www.chrysocome.net/explore2fs Windows 95 (*) http://www.yipton.net/content.html#FSDEXT2 DOS client (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ -OS/2 (+) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ +OS/2 (*) ftp://metalab.unc.edu/pub/Linux/system/filesystems/ext2/ RISC OS client http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/IscaFS/ -(*) no longer actively developed/supported (as of Apr 2001) -(+) no longer actively developed/supported (as of Mar 2009) +(*) no longer actively developed/supported (as of Mar 2009) diff --git a/trunk/Documentation/filesystems/proc.txt b/trunk/Documentation/filesystems/proc.txt index 830bad7cce0f..a87be42f8211 100644 --- a/trunk/Documentation/filesystems/proc.txt +++ b/trunk/Documentation/filesystems/proc.txt @@ -1478,13 +1478,6 @@ of problems on the network like duplicate address or bad checksums. Normally, this should be enabled, but if the problem persists the messages can be disabled. -netdev_budget -------------- - -Maximum number of packets taken from all interfaces in one polling cycle (NAPI -poll). In one polling cycle interfaces which are registered to polling are -probed in a round-robin manner. The limit of packets in one such probe can be -set per-device via sysfs class/net//weight . netdev_max_backlog ------------------ diff --git a/trunk/Documentation/logo.gif b/trunk/Documentation/logo.gif new file mode 100644 index 0000000000000000000000000000000000000000..2eae75fecfb965f49065c680063a40c594736ee5 GIT binary patch literal 16335 zcmWk!c|6nqAOGyI4Ks7kJ-l`WUeEXOc)wiTT?l)^KpU)?Kn0W7l>r?R9$-;{Xg37E2u;Ex=Bm-OAYf|}zr`akX;6OC zziDV440N&@Ef~N~vViF5XjZBchXLg>(9HZKS`fkw4=fE}t7+D5cm&xKx-m&wVWY`p zay0`QO$5l~ATAA!#XysSpez<^jswt0Kr{(2n8dJHOd1J+MMIfP=Ej&C5f2R_0AwOS zB>_P}L4rvFg+gIcfH@9=U0cne0*oMFg@C&CLlW5ok1evItGo0f;&XCbKr5jOUmAGl5uYL6?#L(IoK85R+v9 z0s#~SL9tluWD$Z*1rPv~P5I|81eHSO^ZC&vs6enHSXpCJ|8cZNAP}9^Ns~-~NWi)2 zK<8KhK?gd?L=do0E|J ztP*;%3^B)r(rD!ZHkwI=3RWf!a8L#bx;2StDub>J0B&w14u>P)ASNeQ1YE=x8!^d3 z=;#prouC{lqO+-*UkzR1B6vLBWUX0g5_F4&5OC029CRo1ADB4+0JgXYfk3d)!T^BO zf1`g*ZAT(0ItuIRzK?`W2|J06j!KLI)P6xh0I&lX{96M2Unl@#2ly+jh1@rm-`;hN_;6Sd;xq?up^NOFDk{Lwk2c_FlznG?%+Sy7TG= zB4TwW=h5Av+eEo_r2~mT7t`&MUVwX(?obV>%EOt!WsN?--;JHUF8v^|1Tx55@@S6l zH{Jj8zGh5w-J8O=#UtnTK1pzR8bmKv7eY>kKBs+JICcMOG1mSO=IdWYj>+pbFL#sc zQAckoS|uNOrM@}Ruzas5=ZEI*z5Hi{`tpp1@-ovmL+s)#S;K3I6$IPFs$>nfhIhpc z=|9W&yRgbHyY{zSGm5tvV>CJ6Q)O47=Sj_|^*I!&Ljr6%^|8nsj9 zPq%(dSuEbOS}hkPod`hTXSSFJ@|Vg z@7cwr{m(E zCO_4Wf3dwC7xAlFruIUIHKG~L~ z$YLRSO5};`PTNPspiGJtfI!hoI zpK_|sFj09EG${FVCcA@{BF5sfop-&D2c`2Qd?u1!r^RiK7@VmN%Kq@aG~H2oc3B^9q*b*S1w8iu~4lK$e=EZ9FW69r7L+M zN)zo|7OxL=mF#(|7P?P~4BN7u6Mp8AW9o8z{mPP7_79 zF^&1XnN;Ym^fk9P$kjl0cd;?v{=8#LB_@v}{;{_}*ef+WP_G?XTQIm&wR%1@gK@F6A^MCW5mH7xB z5uAw&rnO02lhW3vhUeR2uRE<{+)duL2|uEQC^h3<4wC7axBe{g$RxN%qXZ&6AFixj zc{K+OE-B(v=HX!Zcna51iJysi!tLe0|EB#5ExLUsxbwnpQ&cs&6Z6aE!3)fHiLJRV z2|7{3Y6&H(-Jgvsp!Vk+9MzWD35KI`sqmfmC`5jA@vbi$ibBpAXcnT&tdK<{Z(&nT z5mezNr=2iK-)<4^F|7V;xTvzLpCVDf*!BH{c8U5C^&m#io_ZGX$R4$nzXRDa7YV|s zNvSFed3RiaoaOz~4%MIX`H`3gly*^iHN0*?;u=X0%QaFrwF%#qkUM&vZIb$5^gV6! zUim037t@43u|32T&zSARfH0OLhN;(m@4%z`=J$98u(I*oYHW)B%v}jO4bwH|9-#z* z>0cz^t^RyKN$;)Ym=9c)+3v84eMgA?V92}Yhw=NIw})ghuy1psWxM{vf7Ph z#`#0dmTku*&>BL@aff6%JCgPBCOX-lWIz5`s zdCs#3e&TTSB|F-W5_K)6=uI@Bg`cNGSwuijhb{7qEgC_YllZQjoAjUk!Ohte&0m-A zD6%8-a#|c!u`aIC1|V@Y)}r$2q$A@~1I%+ET{&}32$$uMOC9@JC+8*X-b|jrI~{%c ztH?o-<8$#$8K`rcoGBmF0H?0mg9->-p-Kwv3~Lc#jL(v`RFZmBBHOd4+t__&`=X2& zP8OpB-Vv$)nymq-cdpQ~%P(UuLIyTU_XIi>_iw)}8*3f*K zp7cE|?(h~^T1O|*rl|JfUN{yQ(n*$?cqL*P7zP#WcaUB{ij#12LdIon_!fiiovG*#~J1)o-0ckow~CvFabE2?_A^IyTS zK)D8?2Midt-d;$W>8M%;Ghst0A0f=&;3}qlmkblgk(-mZGbXnDvIc9i7ZzO!?bZmZ z#FC%c(=E(yy#qil(hVZ?VrTb2|FML;EMB??~^|P5h9Q_{t8dO za$|j?pd}L6FX)n}Y|BBiTU5ANPi;0T=!sQUK-h6;3*9J*Y1h6s$J_5u zCAN#QV5~X%LC#P8aL~CG*M&6o(pI7VxeT)dD(iJuZ){$jfG+Ibso2U}KL4}jw)Jq2 z*G_{R4crEITCS`6la~*b_a>wn@Bd1VS6WoiL0HTQ{g-$$4!j0Oqn>D=xClS5fj(Ut zcs@2T>4+=n2nodCp8vdzmI*_CTNYL3gD+E%quJnbGKzadd~v_{_2h&h;@O#$vq#|P zi55x1LFY@3Ci@hDP-H-EH(lCIB7&LHiWXB903&G7R-pI?8j72Rs+Bw2l${2roPbi3 zqqR>jE}u|z;UTSn%&Pd-^sJnBvAQlK#_fBvk2(M(zB>?QflxsuTg$zF_s)Cut&@p zLv53de{@&4j{@xDY32p0KTz|bLq9#GTA85)vmaHw|P zF*(rws~0{nPrYo;^O?(&BW8cxLL%JGuknud>Yx^AqTi@u7+o>>qSM1$r+@PA z5KD3`h1g4QDMH;e&cR;j@ zg0%TqhUqPsnMD2~NG=I9&fs;gOkI(wfFPMdNn~VX5iml`s0*ax<$zE=B8fv2;T?6s zqO`~&>P(o}4i`SfEW`Y|ISNNGDOs+>Ynlx=>`H_z!$e=Yqj43GeOQn+SwsyBbkVM2 zlM_PmAUlC*Cn7hsJGPsK>}CoL=pY{oL|zjwzUxg~m;!%$B5Wa$wA;{#lJe7RyY*QY zt)V6~P$XiE6-ALnjEQ1j*cb2?;R+P6HvSU&9#oDE2a~~;G*BR4xO5KGLo554U0k$P zRt_LkDbR=&pw$nx98-~avLYD0SEHihv%4g94t9?Zi^PJ|xv2d#(FfY$O>#ma0#RGn zOR`u%jRxGIh#cU;9v8vx&*eX4Ua|_l=wAf70EqapMWz@K%WBd0Bt4n?)kl|vcf9nJ z6)h!)s~qp~ky&W46&8GhC{`vwIgp_qOtEQVeAgZ55EH707l#r7Yqsz~K2TP~JaJv@ z{{2fzR3uFRzknAqM2qnSh+#j}7Ny!fwxZ<>JX231w7DX5m&8C3l0_3=G8I2YMr2_@ z2hjJk@Zz&rU{(PAE&zuMz?x){504>|XyM#B#BkC52iL{Q$@Non$xHzptsvGWK=3ae z9PZfjRUjG0e<0g;n0r9urMtwW!0KGCNIVxt{UGX17TTH+6UG9s1mIVE-01TD~B9{ z*e;mbe$RbuV5+9y53MIjlJzCD6c3mCp|IRq04;p<_c7gOSXs!$sMAk8pCgBvPtcat zI6PD81LVOxzo#|MpNbJRm%r9Cs?SwqkG!cE#_xNS5*6$z*{>c}v2jEZmB3XRo z^Srprv@=sgQ5sRy^EYtoQ#w!oLXVXYPJn1l7isf*mQxc{eiCJU z%7V|s-^C0|&c>PAazDt^epVe{L}do`fRAb|YO%9^8hy4IAW`^eq*i>b?jI}t8rT1@ zwnz3~d-s4lAJVA#z_FJGdHS3sIU{nF@;sj1!FeMR(b7>&Dsi8&{CcXZ2q*I0%q8G~ zsNs8=vp!uK65@O-Tbam?^*PiI0RTs0+v54K{@CWMf!ZuC4B&%s09ft!lU9v~Tu2Wo z-YLMUE6zuow4JGWqBbiDrRii>@WAmRsiuFmD_|OVkBlhv1mj2$M`l-z)x*n5J*3db zv%h5|FL5;`T7Lt=mH58z2T(oJmh})JtboTx_V@omv^)}0SA2NJ;5n#Tw308%L3S-O zMe((=IrF{7CI{Neol=z?v@^teiT&McobMXX)yz0dYdc8kt2e2=-CcgMCi2yIx(Qu` zfg8a6=3Gz|XU5m2oqcf3y1ADIf9W_hZz^1gcDZWc`krfXN=bfx=KN@QBFKhcqICEf z)(#LIx)|3!e0Jy6B??Na?$yuG;s3BA`BHM%hliNj@^!uvy?F26Z1GX7NTK4$Hw`;x z`Lpmw#YUaYFePE5UfS~4Ms@*)uEb+wqBeG}FZd;YtTwHOTliyMVh3+{ ziriF+EA!R5u}k8{%{qo9hoW9L4PRn9ezCmtK{#pD!^{whL>1`HoKH|BEe#jr+Sgw50?8{zAo zU11Z$H)NDqf+?AE52`+ocOk7y3Z~D!5Fa;H%$C(_lC(`d<|Je|{aDGNXm<2j!E}h= zmE+S8?&pcGJJ>h)gDw*xGl8Pk4rVj`hAx-*H(Jjf{x1~u-={H~gO6R6iPO%*vvqG? zD8Ic^BSoONKQrV*lir=KoB2FD`@H1}rbbGx>D_xJkqY$G%!_wdYn?kK-kopX2ex$@ zWxhkSzPrdAsx9y{u}5sozCCL*ud*Y)O!5}|eP_}zs(OAwrBLMW=XbHyQW>PTIx35- zI#K<>1w(166tpRzDZ7qjgG9#A`od1Am6+dxPBfefL zO(2A)x$c}WT8=WDw?zpbZvEh3D*cHIC6G|hxNoK2E-R@F6y0(=D<*tppZXz3X(bBb zM#Pe8!d&8^!S=O}N-{2QF5~nZrK`E1*{YQ*GqY#KR%t4WHa1S})&m^|!=5i*S5mkc z35NUB5EB0I-RwPC(w}6+R*P@0RWe^I+fF@H`PkRG_T>CK9B#Nzd0_Cx-1>sF7mYxb za+o;(`Kr>u6Qj?M&%f(mUn@5JytR)Ak>)Inc9LgTe;0w<7d|r?dCsqC**fsPIVGVSRPuCPDa~5e6)H_VM6NI+kP+Nna``s zDz@Smce+O6zPVMo%k`kIrd`0_usg6XM zl)2CT)wB7wQ@w8&t?fRimTxwvzS<}dDFGwVRYo&ixn~n)^4S|PhrfR|TqW)NSii*& zRBEmBcj|ER)WvFEn^%i?$a#_|bBji}Q6(x=|Gld9N2d3Bhv&C%hZ-gKZDApSl7XYRj`Nh;fc)*JuPUYJzuZ2K{QdG9%5nvj@^QyFRAAxrGLO$I_DsGQ*C z<~-nS|9qg?Idkw^ zq-(UNn|Z_At{WEbZLdCyOuo4aF?4cCfWES{B1DID7s!jgT8Pwfdw$07@ZfXtk^YyL zY}0m>MGQ`a*?Y+tCzl`Cbg0N*=ZWP8|5$sTx@Yu-uD_Y?@Gn~3$*3P@tK(e-zePm` z_Fd`3#MouGraXE_{Yp&hM&wIttXESNDdE{Z-{-|I-cGSLLk><3&%PADcUs@Is6-=n z**0#%`)&2aQ_%eu24ADdumYNs-jc1C{;+L%OR~oDAn`iR%J;|bA=HlB33b9K)Bx{P zopxOlIhmMgf$8=C+}Bz+Q&p>JV`x*?8wQDH!!<>s$CS_Y5jD=_o8&ClG$i~GdJ;h zaI~ix(xN`zOjbM9m(<|?1ldSc{c3EuM6mx-8bNohiP8RN1q!e8$( z*S2@^X)vM~zR^~B)bxEY@Ll5r^Fp`&xYx7g9?}MP@wxFa17{zm;ka)bI~W}&KDRuY zTS!VgJL7b%P;a9;}UZpl+t1LUkE1 zcGMbPZ%FspHJg#p6PLD7mp<}b%dJ&IEE9%eE3JN(rbbM<=4A+j2CG)0y^KUDSy@$Jf~PIaANH`U=C&fS-n zaE`>}Ah|zK!pkMky7;X(v)koAxg!9c2A0kpTf6iWT3<-ll^_MXxUhv+d-t;RgRhxK zv`gJ`B6@MJK(#TlE?km&wyEUst{_LnEAVW6s1hQ3K@|&iPJcA@7Mw$ntRNd{p8ynq z6kZ3u>5Ce-O!!)cPM2;LPUrF?^)U8In|NOWKJ{6;S39P2wzwhxKb;|ijUs15FK?54 ztgF&VNhy;LUkd$|P-$B%#|7Oi$3v++r99~_?dE#x{SNA)vs*o<%uWZU9C83hcLy}xy=?HzFObHR8j?~mUL{%MOYg`Sx?^a!G39vZ zrN;~0<`dl`_RSSXcK_$27B#YR{9LH!f$KPg#n#+4c4@D%{>SGQCI3=$AZj$rR5UOn zO!QWMwT*Jqi_8PN44S39wI0blwSLwnwvZp`5RfuRu58-@wqx@c*TW& zZ|K5CqE5b!6KZOuXFj?Ig?R;6>sq;1sF#pYccQ~2zy{s+pmlMj12jX0(j0()*8eodt+kLC+n9M#&42mOIRZ{gEbp@z@wJJP;OZRn*>DhJXJE?e9-^r--Kw=~)!9h*cg%B1TL&Az&xm;(4 z|8_62^kj)=-3QxH^O@1>BPath7#_aCS+dQLD(BR~j1=DhO|Mnle8EEr2W& z_2C*M8SfPmI$qHhGJ7*jHQXW;)#RO}CQciQySM{PIx46hsXr5!AAHVfE~cKfo>SG) zq5zxZfeK;x&@h1UqsXN&@9Tzn=pw+9d)B0kKNh!lfx%Hnt#7TJ706F}9;3cEiV`5P z)7ASA>1r#W@M$%m@Tu^pFVtEMEIG(xc0#rNH{I*s2OmH+^O^iCl{N%1KUj*yX&>J1 zbu0%j1A85tLj{7$PsoE3Z)DXQbbR)-x2Ox11e3}cL}|paXon{UhCyzbRUNxR{{kJr z0IMhJvs#pf)TGMlIK1HK-lO22=AO|4h?Kv_sR*< z%bFj!0|FbF`*y!5bhrxzh*7i@N&Mc`(Q|M;Tn^KJvU~03X(gfkp^M}MS{sgO+J8pw zep;|sk-8_;S(4#^r+>Nlu_!fXYwS0 z@rWe|Ue!8)xlykk!&G>ucFXc*jeVLWQCi)1(wWdcj0g-=ju+qJc05uO)2sf=4Hz^@ zN?H5VFFCs++y0sS5Uh6n^p2Ox`G?u`n)+DhqcrFm?~KeoW}yo+_1&L@>&BHnIUfGc zzJUl9X@oR;B!PskG@B*8UOzPch4cMLP>0FLmb38kmAn4EATM@{wIke=Yeyu2 zJysxcRlEyLuEY6Z!97MA}L97byab=@H6szZnCtrs8*=$wS%}be+ z{cMtG@cjgs*62=-$~3rUZ(GSE{J0Jf&4%kS8&D5gE3IH&L9oMAu!O)?yaepXfPreW zU812;q^wQLr#fzF$zO#I)3Rh4uxzXLIEtM#3;t8&nN`U1{!jRd=LQOVIJN9Ke-0%* z>8J;7-&hW1&v}EYA zGVFj1jcTxinNx7-ORW}DML%Q6+4g=*nrNBBDR#SLM(cGtbaf@yxZDtu-gZXN86T7t zJ=yApg-CE|$0X5YB8*`DFoN6_m|=g8n7#VQAf&w1)*2jL25vk{h{1N^O1r=(>-%@E zzjTRrl6Yj0#7G115Ix+*oUdXoIxp6~<(07tWuUhGjoD|oyf_Xlp))g?nS~7k3*+g^ z9Qu6+SOh6un~@bbml21DP>I=Pwb?k{V;t4>^o-=0HQ>yQ^X6y|V$Std$itlemM4BM zR`s7!$U>%DPIPeAfBjcii*iL`~D?rSHRM%@?I9lOemv z=>b8#5j2Q29+F?1o!kUJ$O$Q`w4 zY2GV8;~;BVMzupCQq31(=6gM3wTM?A)V8n1?Ie*NTa*<~6(UhGb^=(L538ZO_+SZQ zmbrB9aUv`^2<*YkIuMlUT-LIi1%sHupQrYa_ohLtP>$3z+ciKE$V37{q_Q+|MwU2w z01jj%jdA0Mpagt2>rF%W#?#7tI~7s$-WFPhb;l@|9$Q&>uiE2Q6>!}Qp1^_?48Q__ z%zx!1;~PS;RIoW73dN)={(;F6VRBnABpwDQLt?Scu>zsy)XWGzFP7+e^4}&w>FHnX zS)itAYym_f$XEcDW`gy2fESP<^J36+tVb#UEnZvU*3ojPdE~X4ye4J_EjD<{YRbdoXSeCjY|EVT>0?9sXfDyt`i!M6od|F_-+L(f&_+ zT$Ff%HTGuT` zwQ%!H*ZepqaEQNEN6^7jqhHzz(L8x=*hjt%yi%*iDlR^LPB#J+kl#QUel$;h-U)Vob+DB%4 zosJGJi}EFKvcidhqoFW&s+TQh+~@t2xLdk7H?#BHU=)xcTodrLb~5zjfD_WBnFecg zoJ8PJ^$D#==1<(6QQk-FY^zeE<06u6b*x`Hso$5KqV=mp;(&%?ZAbK%;Q75Cm9>GSZ5r z@YjAS;j!zXYSPKwfdpzg_i|Q5+0^gU%=Tk%KRrJ5sq5|9_@U2Ebn}9`?ePY*qAesO zPqz%55fJp_@+2ek@LfYUFGZINp-q$L4*q>L$<*gr=cS3d+3GR;UxLA~*rCBtdvV_D z2r2|#zmpZtce9)G3u8@PcRsLo?5*fTcy&$afx0aFfHxm1IUh<)MX*C(ZF02%3uY)J z0pry@wi|VMae8{PscSx|iu0v*@$oC`-Z5xWQJWsJAUrHXef`#}q@h(TD0&MTN(wwh zgB)c<5@_LVo9V*0g0DXgA6;4!ewEekKRxW^SrPhV5^S!d9A@gWSV;5+IzF`uA1|a}(%Hj22q09Z(5p5yPZ{5YY8N!?C@I&c{ ztOf3SzZkc-b=6Y|A3lgr@P_|{YgX5FA-%13TvZ%%2amaDzwr5e&PrLa6K7{Ov%l%@spkr^5qX-9K^v30Em_jD z5?I1YL5W8Wj((c@4}6AjW;mfJ`Y5mOL2Fjt+gNU9`h)$Wb4~pzM$4RurX2+>TU1kR zB_~5hsE>>rD%N5b%HTH{%AR}@Vaqi7<>c=OK zJ{|rL_jr>XJQ3%azF%^EIJldmBRKq2YVD$AeJXxs-F;>6KB2B3LgGR00ZhKT`5~{% zR$04WfBX>(KN?h42R8;nxgT%$4*tMICPhj-UpetKpa2?2+>LY~+|_l#gCPwl{VKc=iJ4G(7| z!c|}GtD}V6?46JN!ZC`meiQb%YuC3>1hFg)$qeZ190y5K0~Jd_ zKYkFO8+j|jr?|F9x>g84w(vazx;Y~Q;S3?o?R)p4>h_jtM%WhvF%^Cgupeq1ov5?OuncbA#sZ^~U~_+Ea7C_c?Q-(Q!HwnwB> z(d!eSEHgSF_LBaq&7WxGQ}Z;ZGWS@KdlrERdD(SWKj7b<)L7?izFRbCk}K zI19r*EADSE+~k{xF?$g$5#ogRzmIO}P1GKElK6RNb@RdN)bO5Zy*48!+~LB?7rv*~ z${xjz4-7v(`cvB{11^5VU|K>wGZR&#ImZ0@{&2Rk35*|XsxwrGyZh(b{gNn~!dx56 z=IG($4%Iexww^&{Ot0H_W3s$ruh07?fee)KjagDUUgVVT>z}PYP0smxe${FJAZ0`< zX;juvuDdRGa#(b>f{IN zaEa~DsWH-_t$@4XUQ;sTfv(tdE{EMP1ui~bJH{0j0WiIW@T&)ZgWRja=VkoW9b`?i zifwQ2o~n$UcCYr^>)9p+_{TYMdo`~*ZE2Q;d^WA1sADOJ-M6b7c=}WElvj%5WhOVz zBIKJCBHV4VB8!Qeoxw#JvqICiRMZ};linA&jHqhgyDMpd6X}cePJO?r?FhLZC{_7I z2&3YZop>PJX4@bNW*MkO^@NU8OKR1UOZLoLAfxSJyB`o5J+rZWG6!wknI~Vfd=xU5 zybGeHr*qBc<%4oiLP3}mIU(~B_ZrX3k}|a%i^&|b*zTn`yMs$>o(8*~`W4>03=5&( ztNiYHWi?XZuGp~p=1tk7k|+^S1jeCYN1bD^c*Sh+)o$h6zYX^U9W@i`E-Ljk_n$5< zGgmy8ms#ka+f1|eaISu*J{{@oB<$RlD`mH5uD?PdN%{1JR>X~aBfW7>X|E}XPKpQD ztjq$7w)WmZSZ?H{o6s{1NY8@pdKYxJKTGS+*3YUZ7=4B$~-USO{MCUGRW*YMlv!=8mg znPmg+JMc$MVvCPQ^X^=?Ja}Kg{l0^=7D*ei$0ZVMlU^2kN9SU06xsJ4xZg4|v)lLi zlhPuqsm0}+3kO{jXt#@>*I$s6G8Wru92yk%XgEB2Xs?oaQBn0LFH=2_uT0?%BD7=Aa0RL%yj?yr zrdz{c^hS80Yu)XE0d1vU*DKaeSp9jGfLoQALYw%hzv^_;$!;G7u6F5u#gf$iyEfHC z&{S=8bG1CORry^SiU=ijppVho;Zd3nySmcO+K|(Y`Lvv<77fM0`Ow{I0r#~|FX!OF zv+Mh>Jj-7*JYc@d`J#)jVl9 z!b5nZz`JWfS&KgA<|;d!{3Il2xjg9R^Hc4O46t-9T}H&W z$K+5$t~PI8#FQ3wyw85`1+i?nB-zoh&R<-|IDV+o@*T{jcQ^}pm7{8+KC=uEtXH!F}<-bvUqf0 zW$lin)gPOqPLA7oGCoVVBPz$e*TAze+fJ%nVz-LSQkLgyiWpS|f@ZRW6wgqE{1`%# zc3mEO%CKX+r!5V1(j=M!SVS z&=?}8|E#=0?0KReF6p6_d8dH~aXYczbc|6-mJFe53$*lip6c>JTX@E( zfl%ZcS<0CTRw$_w`JfXYHmvR)w(E}XjHGC;uUBadry?STmE9x%{`SS1ul@h^)(jsi z+gm--;EL6)4*u*oOc(Zy+RVfmpE&2fSLN^QLaVw0hvkgJ0WgUfY+`P5p3`vLoi*!LQ4>uc?&$;rQL}LVY>xh>K;F%r;sOOpDSW;vwAzy0Zm) z2r;7gF=+68SVwgdPs`GHTxZ~lezet_YnW+gtdu*v;;#F?xG&x|Q#&R_bY$h1UC)Nw zY@SjyWOS2?^!%W|W;#tj<3`EayYcSw_wIwTVGq7RVuGA;xp){jC}_?F-hg5>q)EcU zp0|2pmJ9RAquc;n&beJhYmU4#wSG2+9B9w!0lVU;4vzb)ZYw9-Z(mkhhRZv47A<>T z6`Z)C;hTJK^wQ@PUx&2Fms#$rPL;IRU-T3#wtomIj^VSESLRj< z-)?ZsAc5Km*33u4MTIkx3GAbLS3hzkEYZmguh(VDshLw(!$OHIn!ML!HO55i(`8Bm zukF2M{E&zf#>YCzzJeN%c~&fD(*ND>BaRYFSeS&_&ew^H<*53&bj?VFT*vt?5h<;! zmO_16=R@8d8rlB#yyHjJ;vj(AGfYozirAbu5A0n1N{d>#AkUn8`RVD~^qN-}$KOtW zeEXs4W+;=$x$JpYxh%OQkJiOVkrq1ixjdcTKJNqG*d(fk+7BPRjqu{>?x2bC8-RSI z1JSwTz08}GS-Bjh%PD3SJ+pfjl=ItUj$?wA;l6{EwoBJKSg~&Xojq)}q^e_06uCD2 z-`{uo0ugDg@mLuq=sZHSc;<=lYs+!RbpbqC$y?np#Ahs>^`h&Ob2@t40T}3+=yQPe_(~Mle@=fzvXut$nrL;fpF3p^Tr zi6rrbi;DVwQNpTX)V>(rmY?v_1==lC?5#?<1lbCCc?Y>B2b^^qdgS)r#ziZabnola z+Jja9y;_vIb@0a6+iX?`@5G?JbAMxbUJV){H<7NlK7JwwYt)o(+YXlX5n2iAQr!{SMiu{Q$~rhQN{sq}vp#Y}YW=XU^84($ z;o@E~x`AYX`Lyjq#Jzh*tk%MDY><2gQJlar+D%SC;QHv21l)uXJVf<^9WIe>vcy-4Fe zx@;|Xqd@bnf-c>E z*RIVzB9}o_T#J2Z6fbd^hGEbl@eT;YgWR{(UCmkm<{ zomXEnOwyOffC)UJ6qbg;)96OB9a*!r{)hwhG$mfUq_loZvt!8MgP%3%8w8Dqj3Iru zwEsYBR(kDvV`)aVbhQi`W1@CkwisevtK??T)eP=J#Wl$4Ymzz|)9yxYMv9zple%-v zjNA?<+}^(pj%?mJqHjPqkftN!(_}Y5i+k?93^mNj%{(T_6^U+BD{9lkwLe#n6^?W8g}}Xzjf3l#3p-`l5KMlX5s#ju;=n$C3^&k`>jG}vS@Wu2 zENZQST~{zl1*qM1Mn}Lk&Fy_2G_eh$JVSpIG!vA%-oB~_V$fyXfT3pz>NDV$ZHL9~ zYd!t#RAo z5jZygzD8eSTwLyPeN0;5G*K#=4iNwtC*87~%wIq5(|2)E*p+z~2Q4N2G2btdm3l^m zcB`F40W5D>FZH1@uKj$U17d)4S6QQ!ZaO6@aSSn4sz8-HMyU=cRh$aVg$IY z8Z{sJ0;5O($3YJPu%9YS>5ItAd-N*+$nzdjsb0ol#mLKe3|2R~qoly88MQTZ@C6Gi zwyU|RN*XlC4;9iB(lP9gj&}U2@7g|vd)-G2A`?F~_{M&@6)mwRr&At z>DR%~HLghQ1A`?kp>z|Bahzdvje2#&Bd^4k)o_*g1Vlba64`;h@NKQ!0UO#T!)QYq zB(4rV>{<`kvbNV>{CYm&u9`u$@eiU@K3(GMHG0~va)p(pH2`d8FMY{ge+jg+QCKIV zu_Sa@U`TSrEwyc_q>1H&c9ohKAAV$q)`Eu8A)MoiP&T{oVebC5*D!(FS_2aLP&My? z<0?&;Y?@Pf{0AKbj<%N$T#~kObTlY}a$K-u+*j~nv zOdV31926ae2{Z_oEtWy_Rt1ybkHw(J1>qZS!Mj}FY%tC@IgPZTJnzX)5}oU7W!UyA z#FGIbbQ#1~%zw*?IUuOc<9(m*)2@8;y4a@0qaO%qQrh4;$Bnjme*Y)47`41p)^D`j z^0+eCUErq2Vr3itKh>T0(wx84VQ3%>((%{yDTk_0x}}Yw8eGfSB^AmM9!bpV6c zg`gqZM$N~(wf!!cLqb7Nb_dqlKzxH9sv$t>qzFU7yQEW2ulYPv-<912+d58@^GU;qFB literal 0 HcmV?d00001 diff --git a/trunk/Documentation/logo.svg b/trunk/Documentation/logo.svg deleted file mode 100644 index cb9e4851d8c3..000000000000 --- a/trunk/Documentation/logo.svg +++ /dev/null @@ -1,2911 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/trunk/Documentation/logo.txt b/trunk/Documentation/logo.txt index a2e62445e28e..296f0f7f67eb 100644 --- a/trunk/Documentation/logo.txt +++ b/trunk/Documentation/logo.txt @@ -1,4 +1,13 @@ -Tux is taking a three month sabbatical to work as a barber, so Tuz is -standing in. He's taken pains to ensure you'll hardly notice. +This is the full-colour version of the currently unofficial Linux logo +("currently unofficial" just means that there has been no paperwork and +that I have not really announced it yet). It was created by Larry Ewing, +and is freely usable as long as you acknowledge Larry as the original +artist. + +Note that there are black-and-white versions of this available that +scale down to smaller sizes and are better for letterheads or whatever +you want to use it for: for the full range of logos take a look at +Larry's web-page: + + http://www.isc.tamu.edu/~lewing/linux/ -Image by Andrew McGown and Josh Bush. Image is licensed CC BY-SA. diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 5d460c9d1c2c..4a1cfca49685 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -3876,15 +3876,6 @@ L: linux-ide@vger.kernel.org T: git kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev.git S: Supported -SERVER ENGINES 10Gbps NIC - BladeEngine 2 DRIVER -P: Sathya Perla -M: sathyap@serverengines.com -P: Subbu Seetharaman -M: subbus@serverengines.com -L: netdev@vger.kernel.org -W: http://www.serverengines.com -S: Supported - SFC NETWORK DRIVER P: Steve Hodgson P: Ben Hutchings diff --git a/trunk/Makefile b/trunk/Makefile index 1ab3ebfc9091..2e2f4a4324af 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -1,8 +1,8 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 29 -EXTRAVERSION = -NAME = Temporary Tasmanian Devil +EXTRAVERSION = -rc8 +NAME = Erotic Pickled Herring # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -566,12 +566,6 @@ KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) # disable pointer signed / unsigned warnings in gcc 4.0 KBUILD_CFLAGS += $(call cc-option,-Wno-pointer-sign,) -# disable invalid "can't wrap" optimzations for signed / pointers -KBUILD_CFLAGS += $(call cc-option,-fwrapv) - -# revert to pre-gcc-4.4 behaviour of .eh_frame -KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) - # Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments # But warn user when we do so warn-assign = \ diff --git a/trunk/arch/arm/kernel/entry-common.S b/trunk/arch/arm/kernel/entry-common.S index 159d0416f270..49a6ba926c2b 100644 --- a/trunk/arch/arm/kernel/entry-common.S +++ b/trunk/arch/arm/kernel/entry-common.S @@ -111,7 +111,6 @@ ENTRY(mcount) .globl mcount_call mcount_call: bl ftrace_stub - ldr lr, [fp, #-4] @ restore lr ldmia sp!, {r0-r3, pc} ENTRY(ftrace_caller) @@ -123,7 +122,6 @@ ENTRY(ftrace_caller) .globl ftrace_call ftrace_call: bl ftrace_stub - ldr lr, [fp, #-4] @ restore lr ldmia sp!, {r0-r3, pc} #else @@ -135,7 +133,6 @@ ENTRY(mcount) adr r0, ftrace_stub cmp r0, r2 bne trace - ldr lr, [fp, #-4] @ restore lr ldmia sp!, {r0-r3, pc} trace: @@ -144,7 +141,6 @@ trace: sub r0, r0, #MCOUNT_INSN_SIZE mov lr, pc mov pc, r2 - mov lr, r1 @ restore lr ldmia sp!, {r0-r3, pc} #endif /* CONFIG_DYNAMIC_FTRACE */ diff --git a/trunk/arch/arm/kernel/fiq.c b/trunk/arch/arm/kernel/fiq.c index 6ff7919613d7..36f81d967979 100644 --- a/trunk/arch/arm/kernel/fiq.c +++ b/trunk/arch/arm/kernel/fiq.c @@ -88,7 +88,7 @@ void set_fiq_handler(void *start, unsigned int length) * disable irqs for the duration. Note - these functions are almost * entirely coded in assembly. */ -void __naked set_fiq_regs(struct pt_regs *regs) +void __attribute__((naked)) set_fiq_regs(struct pt_regs *regs) { register unsigned long tmp; asm volatile ( @@ -106,7 +106,7 @@ void __naked set_fiq_regs(struct pt_regs *regs) : "r" (®s->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)); } -void __naked get_fiq_regs(struct pt_regs *regs) +void __attribute__((naked)) get_fiq_regs(struct pt_regs *regs) { register unsigned long tmp; asm volatile ( diff --git a/trunk/arch/arm/mach-ep93xx/include/mach/platform.h b/trunk/arch/arm/mach-ep93xx/include/mach/platform.h index 05f0f4f2f3ce..88f7e88f152f 100644 --- a/trunk/arch/arm/mach-ep93xx/include/mach/platform.h +++ b/trunk/arch/arm/mach-ep93xx/include/mach/platform.h @@ -4,8 +4,6 @@ #ifndef __ASSEMBLY__ -struct i2c_board_info; - struct ep93xx_eth_data { unsigned char dev_addr[6]; diff --git a/trunk/arch/arm/mach-mx1/devices.c b/trunk/arch/arm/mach-mx1/devices.c index a95644193f3f..686d8d2dbb24 100644 --- a/trunk/arch/arm/mach-mx1/devices.c +++ b/trunk/arch/arm/mach-mx1/devices.c @@ -23,8 +23,6 @@ #include #include #include - -#include #include static struct resource imx_csi_resources[] = { diff --git a/trunk/arch/arm/mach-mx1/mx1ads.c b/trunk/arch/arm/mach-mx1/mx1ads.c index 3200cf60e384..2e4b185fe4a9 100644 --- a/trunk/arch/arm/mach-mx1/mx1ads.c +++ b/trunk/arch/arm/mach-mx1/mx1ads.c @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-omap2/board-omap3beagle.c b/trunk/arch/arm/mach-omap2/board-omap3beagle.c index e39cd2c46cfa..38c88fbe658d 100644 --- a/trunk/arch/arm/mach-omap2/board-omap3beagle.c +++ b/trunk/arch/arm/mach-omap2/board-omap3beagle.c @@ -178,9 +178,7 @@ static int __init omap3_beagle_i2c_init(void) #ifdef CONFIG_I2C2_OMAP_BEAGLE omap_register_i2c_bus(2, 400, NULL, 0); #endif - /* Bus 3 is attached to the DVI port where devices like the pico DLP - * projector don't work reliably with 400kHz */ - omap_register_i2c_bus(3, 100, NULL, 0); + omap_register_i2c_bus(3, 400, NULL, 0); return 0; } diff --git a/trunk/arch/arm/mach-orion5x/common.c b/trunk/arch/arm/mach-orion5x/common.c index 8a0e49d84256..0a623379789f 100644 --- a/trunk/arch/arm/mach-orion5x/common.c +++ b/trunk/arch/arm/mach-orion5x/common.c @@ -431,10 +431,6 @@ void __init orion5x_uart1_init(void) /***************************************************************************** * XOR engine ****************************************************************************/ -struct mv_xor_platform_shared_data orion5x_xor_shared_data = { - .dram = &orion5x_mbus_dram_info, -}; - static struct resource orion5x_xor_shared_resources[] = { { .name = "xor low", @@ -452,9 +448,6 @@ static struct resource orion5x_xor_shared_resources[] = { static struct platform_device orion5x_xor_shared = { .name = MV_XOR_SHARED_NAME, .id = 0, - .dev = { - .platform_data = &orion5x_xor_shared_data, - }, .num_resources = ARRAY_SIZE(orion5x_xor_shared_resources), .resource = orion5x_xor_shared_resources, }; diff --git a/trunk/arch/arm/mach-s3c6410/mach-smdk6410.c b/trunk/arch/arm/mach-s3c6410/mach-smdk6410.c index 25f7935576f8..3c4d47145c83 100644 --- a/trunk/arch/arm/mach-s3c6410/mach-smdk6410.c +++ b/trunk/arch/arm/mach-s3c6410/mach-smdk6410.c @@ -129,7 +129,7 @@ static struct s3c_fb_platdata smdk6410_lcd_pdata __initdata = { .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC, }; -static struct map_desc smdk6410_iodesc[] = {}; +struct map_desc smdk6410_iodesc[] = {}; static struct platform_device *smdk6410_devices[] __initdata = { #ifdef CONFIG_SMDK6410_SD_CH0 @@ -146,7 +146,7 @@ static struct platform_device *smdk6410_devices[] __initdata = { static struct i2c_board_info i2c_devs0[] __initdata = { { I2C_BOARD_INFO("24c08", 0x50), }, - { I2C_BOARD_INFO("wm8580", 0x1b), }, + { I2C_BOARD_INFO("WM8580", 0X1b), }, }; static struct i2c_board_info i2c_devs1[] __initdata = { diff --git a/trunk/arch/arm/mm/copypage-feroceon.c b/trunk/arch/arm/mm/copypage-feroceon.c index 70997d5bee2d..c3ba6a94da0c 100644 --- a/trunk/arch/arm/mm/copypage-feroceon.c +++ b/trunk/arch/arm/mm/copypage-feroceon.c @@ -13,7 +13,7 @@ #include #include -static void __naked +static void __attribute__((naked)) feroceon_copy_user_page(void *kto, const void *kfrom) { asm("\ diff --git a/trunk/arch/arm/mm/copypage-v3.c b/trunk/arch/arm/mm/copypage-v3.c index de9c06854ad7..70ed96c8af8e 100644 --- a/trunk/arch/arm/mm/copypage-v3.c +++ b/trunk/arch/arm/mm/copypage-v3.c @@ -15,7 +15,7 @@ * * FIXME: do we need to handle cache stuff... */ -static void __naked +static void __attribute__((naked)) v3_copy_user_page(void *kto, const void *kfrom) { asm("\n\ diff --git a/trunk/arch/arm/mm/copypage-v4mc.c b/trunk/arch/arm/mm/copypage-v4mc.c index 7370a7142b04..1601698b9800 100644 --- a/trunk/arch/arm/mm/copypage-v4mc.c +++ b/trunk/arch/arm/mm/copypage-v4mc.c @@ -44,7 +44,7 @@ static DEFINE_SPINLOCK(minicache_lock); * instruction. If your processor does not supply this, you have to write your * own copy_user_highpage that does the right thing. */ -static void __naked +static void __attribute__((naked)) mc_copy_user_page(void *from, void *to) { asm volatile( diff --git a/trunk/arch/arm/mm/copypage-v4wb.c b/trunk/arch/arm/mm/copypage-v4wb.c index 9ab098414227..3ec93dab7656 100644 --- a/trunk/arch/arm/mm/copypage-v4wb.c +++ b/trunk/arch/arm/mm/copypage-v4wb.c @@ -22,7 +22,7 @@ * instruction. If your processor does not supply this, you have to write your * own copy_user_highpage that does the right thing. */ -static void __naked +static void __attribute__((naked)) v4wb_copy_user_page(void *kto, const void *kfrom) { asm("\ diff --git a/trunk/arch/arm/mm/copypage-v4wt.c b/trunk/arch/arm/mm/copypage-v4wt.c index 300efafd6643..0f1188efae45 100644 --- a/trunk/arch/arm/mm/copypage-v4wt.c +++ b/trunk/arch/arm/mm/copypage-v4wt.c @@ -20,7 +20,7 @@ * dirty data in the cache. However, we do have to ensure that * subsequent reads are up to date. */ -static void __naked +static void __attribute__((naked)) v4wt_copy_user_page(void *kto, const void *kfrom) { asm("\ diff --git a/trunk/arch/arm/mm/copypage-xsc3.c b/trunk/arch/arm/mm/copypage-xsc3.c index bc4525f5ab23..39a994542cad 100644 --- a/trunk/arch/arm/mm/copypage-xsc3.c +++ b/trunk/arch/arm/mm/copypage-xsc3.c @@ -29,7 +29,7 @@ * if we eventually end up using our copied page. * */ -static void __naked +static void __attribute__((naked)) xsc3_mc_copy_user_page(void *kto, const void *kfrom) { asm("\ diff --git a/trunk/arch/arm/mm/copypage-xscale.c b/trunk/arch/arm/mm/copypage-xscale.c index 76824d3e966a..d18f2397ee2d 100644 --- a/trunk/arch/arm/mm/copypage-xscale.c +++ b/trunk/arch/arm/mm/copypage-xscale.c @@ -42,7 +42,7 @@ static DEFINE_SPINLOCK(minicache_lock); * Dcache aliasing issue. The writes will be forwarded to the write buffer, * and merged as appropriate. */ -static void __naked +static void __attribute__((naked)) mc_copy_user_page(void *from, void *to) { /* diff --git a/trunk/arch/arm/mm/dma-mapping.c b/trunk/arch/arm/mm/dma-mapping.c index f1ef5613ccd4..310e479309ef 100644 --- a/trunk/arch/arm/mm/dma-mapping.c +++ b/trunk/arch/arm/mm/dma-mapping.c @@ -490,30 +490,26 @@ core_initcall(consistent_init); */ void dma_cache_maint(const void *start, size_t size, int direction) { - void (*inner_op)(const void *, const void *); - void (*outer_op)(unsigned long, unsigned long); + const void *end = start + size; - BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(start + size - 1)); + BUG_ON(!virt_addr_valid(start) || !virt_addr_valid(end - 1)); switch (direction) { case DMA_FROM_DEVICE: /* invalidate only */ - inner_op = dmac_inv_range; - outer_op = outer_inv_range; + dmac_inv_range(start, end); + outer_inv_range(__pa(start), __pa(end)); break; case DMA_TO_DEVICE: /* writeback only */ - inner_op = dmac_clean_range; - outer_op = outer_clean_range; + dmac_clean_range(start, end); + outer_clean_range(__pa(start), __pa(end)); break; case DMA_BIDIRECTIONAL: /* writeback and invalidate */ - inner_op = dmac_flush_range; - outer_op = outer_flush_range; + dmac_flush_range(start, end); + outer_flush_range(__pa(start), __pa(end)); break; default: BUG(); } - - inner_op(start, start + size); - outer_op(__pa(start), __pa(start) + size); } EXPORT_SYMBOL(dma_cache_maint); diff --git a/trunk/arch/arm/mm/init.c b/trunk/arch/arm/mm/init.c index 80fd3b69ae1f..34df4d9d03a6 100644 --- a/trunk/arch/arm/mm/init.c +++ b/trunk/arch/arm/mm/init.c @@ -382,7 +382,7 @@ void __init bootmem_init(void) for_each_node(node) bootmem_free_node(node, mi); - high_memory = __va((memend_pfn << PAGE_SHIFT) - 1) + 1; + high_memory = __va(memend_pfn << PAGE_SHIFT); /* * This doesn't seem to be used by the Linux memory manager any diff --git a/trunk/arch/arm/mm/mmap.c b/trunk/arch/arm/mm/mmap.c index f7457fea6de8..5358fcc7f61e 100644 --- a/trunk/arch/arm/mm/mmap.c +++ b/trunk/arch/arm/mm/mmap.c @@ -124,7 +124,7 @@ int valid_phys_addr_range(unsigned long addr, size_t size) { if (addr < PHYS_OFFSET) return 0; - if (addr + size >= __pa(high_memory - 1)) + if (addr + size > __pa(high_memory)) return 0; return 1; diff --git a/trunk/arch/arm/plat-omap/Makefile b/trunk/arch/arm/plat-omap/Makefile index 04a100cfb8e5..deaff58878a2 100644 --- a/trunk/arch/arm/plat-omap/Makefile +++ b/trunk/arch/arm/plat-omap/Makefile @@ -18,8 +18,7 @@ obj-$(CONFIG_CPU_FREQ) += cpu-omap.o obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o -i2c-omap-$(CONFIG_I2C_OMAP) := i2c.o -obj-y += $(i2c-omap-m) $(i2c-omap-y) +obj-$(CONFIG_I2C_OMAP) += i2c.o # OMAP mailbox framework obj-$(CONFIG_OMAP_MBOX_FWK) += mailbox.o diff --git a/trunk/arch/arm/plat-omap/common.c b/trunk/arch/arm/plat-omap/common.c index 6825fbb5a056..0843b8882f93 100644 --- a/trunk/arch/arm/plat-omap/common.c +++ b/trunk/arch/arm/plat-omap/common.c @@ -199,17 +199,21 @@ static struct clocksource clocksource_32k = { .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; +/* + * Rounds down to nearest nsec. + */ +unsigned long long omap_32k_ticks_to_nsecs(unsigned long ticks_32k) +{ + return cyc2ns(&clocksource_32k, ticks_32k); +} + /* * Returns current time from boot in nsecs. It's OK for this to wrap * around for now, as it's just a relative time stamp. */ unsigned long long sched_clock(void) { - unsigned long long ret; - - ret = (unsigned long long)omap_32k_read(); - ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift; - return ret; + return omap_32k_ticks_to_nsecs(omap_32k_read()); } static int __init omap_init_clocksource_32k(void) diff --git a/trunk/arch/arm/plat-omap/include/mach/common.h b/trunk/arch/arm/plat-omap/include/mach/common.h index e746ec7e785e..ef70e2b0f054 100644 --- a/trunk/arch/arm/plat-omap/include/mach/common.h +++ b/trunk/arch/arm/plat-omap/include/mach/common.h @@ -35,7 +35,7 @@ extern void omap_map_common_io(void); extern struct sys_timer omap_timer; extern void omap_serial_init(void); extern void omap_serial_enable_clocks(int enable); -#if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) +#ifdef CONFIG_I2C_OMAP extern int omap_register_i2c_bus(int bus_id, u32 clkrate, struct i2c_board_info const *info, unsigned len); diff --git a/trunk/arch/arm/plat-omap/include/mach/pm.h b/trunk/arch/arm/plat-omap/include/mach/pm.h index 37e2f0f38b46..2a9c27ad4c37 100644 --- a/trunk/arch/arm/plat-omap/include/mach/pm.h +++ b/trunk/arch/arm/plat-omap/include/mach/pm.h @@ -108,7 +108,7 @@ !defined(CONFIG_ARCH_OMAP15XX) && \ !defined(CONFIG_ARCH_OMAP16XX) && \ !defined(CONFIG_ARCH_OMAP24XX) -#warning "Power management for this processor not implemented yet" +#error "Power management for this processor not implemented yet" #endif #ifndef __ASSEMBLER__ diff --git a/trunk/arch/arm/plat-s3c64xx/clock.c b/trunk/arch/arm/plat-s3c64xx/clock.c index ad1b9682c9c3..136c982c68e1 100644 --- a/trunk/arch/arm/plat-s3c64xx/clock.c +++ b/trunk/arch/arm/plat-s3c64xx/clock.c @@ -248,7 +248,7 @@ static struct clk *clks[] __initdata = { &clk_48m, }; -void __init s3c64xx_register_clocks(void) +void s3c64xx_register_clocks(void) { struct clk *clkp; int ret; diff --git a/trunk/arch/arm/plat-s3c64xx/gpiolib.c b/trunk/arch/arm/plat-s3c64xx/gpiolib.c index ee9188add8fb..cc62941d7b5c 100644 --- a/trunk/arch/arm/plat-s3c64xx/gpiolib.c +++ b/trunk/arch/arm/plat-s3c64xx/gpiolib.c @@ -417,4 +417,4 @@ static __init int s3c64xx_gpiolib_init(void) return 0; } -core_initcall(s3c64xx_gpiolib_init); +arch_initcall(s3c64xx_gpiolib_init); diff --git a/trunk/arch/arm/plat-s3c64xx/include/plat/irqs.h b/trunk/arch/arm/plat-s3c64xx/include/plat/irqs.h index f865bf4d709e..2846f550b727 100644 --- a/trunk/arch/arm/plat-s3c64xx/include/plat/irqs.h +++ b/trunk/arch/arm/plat-s3c64xx/include/plat/irqs.h @@ -117,7 +117,7 @@ #define IRQ_ONENAND1 S3C64XX_IRQ_VIC1(12) #define IRQ_NFC S3C64XX_IRQ_VIC1(13) #define IRQ_CFCON S3C64XX_IRQ_VIC1(14) -#define IRQ_USBH S3C64XX_IRQ_VIC1(15) +#define IRQ_UHOST S3C64XX_IRQ_VIC1(15) #define IRQ_SPI0 S3C64XX_IRQ_VIC1(16) #define IRQ_SPI1 S3C64XX_IRQ_VIC1(17) #define IRQ_IIC S3C64XX_IRQ_VIC1(18) diff --git a/trunk/arch/arm/plat-s3c64xx/irq-eint.c b/trunk/arch/arm/plat-s3c64xx/irq-eint.c index cf524826c93a..ebb305ce7689 100644 --- a/trunk/arch/arm/plat-s3c64xx/irq-eint.c +++ b/trunk/arch/arm/plat-s3c64xx/irq-eint.c @@ -14,15 +14,12 @@ #include #include -#include #include #include #include #include -#include -#include #include #include @@ -77,7 +74,6 @@ static void s3c_irq_eint_maskack(unsigned int irq) static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type) { int offs = eint_offset(irq); - int pin; int shift; u32 ctrl, mask; u32 newvalue = 0; @@ -129,15 +125,6 @@ static int s3c_irq_eint_set_type(unsigned int irq, unsigned int type) ctrl |= newvalue << shift; __raw_writel(ctrl, reg); - /* set the GPIO pin appropriately */ - - if (offs < 23) - pin = S3C64XX_GPN(offs); - else - pin = S3C64XX_GPM(offs - 23); - - s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(2)); - return 0; } @@ -194,7 +181,7 @@ static void s3c_irq_demux_eint20_27(unsigned int irq, struct irq_desc *desc) s3c_irq_demux_eint(20, 27); } -static int __init s3c64xx_init_irq_eint(void) +int __init s3c64xx_init_irq_eint(void) { int irq; diff --git a/trunk/arch/arm/plat-s3c64xx/irq.c b/trunk/arch/arm/plat-s3c64xx/irq.c index f22edf7c2d2d..a94f1d5e819d 100644 --- a/trunk/arch/arm/plat-s3c64xx/irq.c +++ b/trunk/arch/arm/plat-s3c64xx/irq.c @@ -207,7 +207,7 @@ static struct irq_chip s3c_irq_uart = { static void __init s3c64xx_uart_irq(struct uart_irq *uirq) { - void __iomem *reg_base = uirq->regs; + void *reg_base = uirq->regs; unsigned int irq; int offs; diff --git a/trunk/arch/arm/plat-s3c64xx/s3c6400-clock.c b/trunk/arch/arm/plat-s3c64xx/s3c6400-clock.c index 05b17528041e..8d9a0cada668 100644 --- a/trunk/arch/arm/plat-s3c64xx/s3c6400-clock.c +++ b/trunk/arch/arm/plat-s3c64xx/s3c6400-clock.c @@ -36,7 +36,7 @@ * ext_xtal_mux for want of an actual name from the manual. */ -static struct clk clk_ext_xtal_mux = { +struct clk clk_ext_xtal_mux = { .name = "ext_xtal", .id = -1, }; @@ -63,7 +63,7 @@ struct clksrc_clk { void __iomem *reg_divider; }; -static struct clk clk_fout_apll = { +struct clk clk_fout_apll = { .name = "fout_apll", .id = -1, }; @@ -78,7 +78,7 @@ static struct clk_sources clk_src_apll = { .nr_sources = ARRAY_SIZE(clk_src_apll_list), }; -static struct clksrc_clk clk_mout_apll = { +struct clksrc_clk clk_mout_apll = { .clk = { .name = "mout_apll", .id = -1, @@ -88,7 +88,7 @@ static struct clksrc_clk clk_mout_apll = { .sources = &clk_src_apll, }; -static struct clk clk_fout_epll = { +struct clk clk_fout_epll = { .name = "fout_epll", .id = -1, }; @@ -103,7 +103,7 @@ static struct clk_sources clk_src_epll = { .nr_sources = ARRAY_SIZE(clk_src_epll_list), }; -static struct clksrc_clk clk_mout_epll = { +struct clksrc_clk clk_mout_epll = { .clk = { .name = "mout_epll", .id = -1, @@ -123,7 +123,7 @@ static struct clk_sources clk_src_mpll = { .nr_sources = ARRAY_SIZE(clk_src_mpll_list), }; -static struct clksrc_clk clk_mout_mpll = { +struct clksrc_clk clk_mout_mpll = { .clk = { .name = "mout_mpll", .id = -1, @@ -145,7 +145,7 @@ static unsigned long s3c64xx_clk_doutmpll_get_rate(struct clk *clk) return rate; } -static struct clk clk_dout_mpll = { +struct clk clk_dout_mpll = { .name = "dout_mpll", .id = -1, .parent = &clk_mout_mpll.clk, @@ -189,10 +189,10 @@ static struct clk_sources clkset_uart = { }; static struct clk *clkset_uhost_list[] = { - &clk_48m, &clk_mout_epll.clk, &clk_dout_mpll, &clk_fin_epll, + &clk_48m, }; static struct clk_sources clkset_uhost = { @@ -239,12 +239,10 @@ static int s3c64xx_setrate_clksrc(struct clk *clk, unsigned long rate) rate = clk_round_rate(clk, rate); div = clk_get_rate(clk->parent) / rate; - if (div > 16) - return -EINVAL; val = __raw_readl(reg); - val &= ~(0xf << sclk->shift); - val |= (div - 1) << sclk->shift; + val &= ~sclk->mask; + val |= (rate - 1) << sclk->shift; __raw_writel(val, reg); return 0; @@ -353,7 +351,7 @@ static struct clksrc_clk clk_mmc2 = { static struct clksrc_clk clk_usbhost = { .clk = { - .name = "usb-bus-host", + .name = "usb-host-bus", .id = -1, .ctrlbit = S3C_CLKCON_SCLK_UHOST, .enable = s3c64xx_sclk_ctrl, diff --git a/trunk/arch/arm/tools/mach-types b/trunk/arch/arm/tools/mach-types index b4211d8b2ac7..fd23c0e9e698 100644 --- a/trunk/arch/arm/tools/mach-types +++ b/trunk/arch/arm/tools/mach-types @@ -12,7 +12,7 @@ # # http://www.arm.linux.org.uk/developer/machines/?action=new # -# Last update: Thu Mar 12 18:01:45 2009 +# Last update: Sun Nov 30 16:39:36 2008 # # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number # @@ -1811,7 +1811,7 @@ pilz_pmi5 MACH_PILZ_PMI5 PILZ_PMI5 1820 jade MACH_JADE JADE 1821 ks8695_softplc MACH_KS8695_SOFTPLC KS8695_SOFTPLC 1822 gprisc3 MACH_GPRISC3 GPRISC3 1823 -stamp9g20 MACH_STAMP9G20 STAMP9G20 1824 +stamp9260 MACH_STAMP9260 STAMP9260 1824 smdk6430 MACH_SMDK6430 SMDK6430 1825 smdkc100 MACH_SMDKC100 SMDKC100 1826 tavorevb MACH_TAVOREVB TAVOREVB 1827 @@ -1993,134 +1993,4 @@ spark MACH_SPARK SPARK 2002 benzina MACH_BENZINA BENZINA 2003 blaze MACH_BLAZE BLAZE 2004 linkstation_ls_hgl MACH_LINKSTATION_LS_HGL LINKSTATION_LS_HGL 2005 -htckovsky MACH_HTCVENUS HTCVENUS 2006 -sony_prs505 MACH_SONY_PRS505 SONY_PRS505 2007 -hanlin_v3 MACH_HANLIN_V3 HANLIN_V3 2008 -sapphira MACH_SAPPHIRA SAPPHIRA 2009 -dack_sda_01 MACH_DACK_SDA_01 DACK_SDA_01 2010 -armbox MACH_ARMBOX ARMBOX 2011 -harris_rvp MACH_HARRIS_RVP HARRIS_RVP 2012 -ribaldo MACH_RIBALDO RIBALDO 2013 -agora MACH_AGORA AGORA 2014 -omap3_mini MACH_OMAP3_MINI OMAP3_MINI 2015 -a9sam6432_b MACH_A9SAM6432_B A9SAM6432_B 2016 -usg2410 MACH_USG2410 USG2410 2017 -pc72052_i10_revb MACH_PC72052_I10_REVB PC72052_I10_REVB 2018 -mx35_exm32 MACH_MX35_EXM32 MX35_EXM32 2019 -topas910 MACH_TOPAS910 TOPAS910 2020 -hyena MACH_HYENA HYENA 2021 -pospax MACH_POSPAX POSPAX 2022 -hdl_gx MACH_HDL_GX HDL_GX 2023 -ctera_4bay MACH_CTERA_4BAY CTERA_4BAY 2024 -ctera_plug_c MACH_CTERA_PLUG_C CTERA_PLUG_C 2025 -crwea_plug_i MACH_CRWEA_PLUG_I CRWEA_PLUG_I 2026 -egauge2 MACH_EGAUGE2 EGAUGE2 2027 -didj MACH_DIDJ DIDJ 2028 -m_s3c2443 MACH_MEISTER MEISTER 2029 -htcblackstone MACH_HTCBLACKSTONE HTCBLACKSTONE 2030 -cpuat9g20 MACH_CPUAT9G20 CPUAT9G20 2031 -smdk6440 MACH_SMDK6440 SMDK6440 2032 -omap_35xx_mvp MACH_OMAP_35XX_MVP OMAP_35XX_MVP 2033 -ctera_plug_i MACH_CTERA_PLUG_I CTERA_PLUG_I 2034 -pvg610_100 MACH_PVG610 PVG610 2035 -hprw6815 MACH_HPRW6815 HPRW6815 2036 -omap3_oswald MACH_OMAP3_OSWALD OMAP3_OSWALD 2037 -nas4220b MACH_NAS4220B NAS4220B 2038 -htcraphael_cdma MACH_HTCRAPHAEL_CDMA HTCRAPHAEL_CDMA 2039 -htcdiamond_cdma MACH_HTCDIAMOND_CDMA HTCDIAMOND_CDMA 2040 -scaler MACH_SCALER SCALER 2041 -zylonite2 MACH_ZYLONITE2 ZYLONITE2 2042 -aspenite MACH_ASPENITE ASPENITE 2043 -teton MACH_TETON TETON 2044 -ttc_dkb MACH_TTC_DKB TTC_DKB 2045 -bishop2 MACH_BISHOP2 BISHOP2 2046 -ippv5 MACH_IPPV5 IPPV5 2047 -farm926 MACH_FARM926 FARM926 2048 -mmccpu MACH_MMCCPU MMCCPU 2049 -sgmsfl MACH_SGMSFL SGMSFL 2050 -tt8000 MACH_TT8000 TT8000 2051 -zrn4300lp MACH_ZRN4300LP ZRN4300LP 2052 -mptc MACH_MPTC MPTC 2053 -h6051 MACH_H6051 H6051 2054 -pvg610_101 MACH_PVG610_101 PVG610_101 2055 -stamp9261_pc_evb MACH_STAMP9261_PC_EVB STAMP9261_PC_EVB 2056 -pelco_odysseus MACH_PELCO_ODYSSEUS PELCO_ODYSSEUS 2057 -tny_a9260 MACH_TNY_A9260 TNY_A9260 2058 -tny_a9g20 MACH_TNY_A9G20 TNY_A9G20 2059 -aesop_mp2530f MACH_AESOP_MP2530F AESOP_MP2530F 2060 -dx900 MACH_DX900 DX900 2061 -cpodc2 MACH_CPODC2 CPODC2 2062 -tilt_8925 MACH_TILT_8925 TILT_8925 2063 -davinci_dm357_evm MACH_DAVINCI_DM357_EVM DAVINCI_DM357_EVM 2064 -swordfish MACH_SWORDFISH SWORDFISH 2065 -corvus MACH_CORVUS CORVUS 2066 -taurus MACH_TAURUS TAURUS 2067 -axm MACH_AXM AXM 2068 -axc MACH_AXC AXC 2069 -baby MACH_BABY BABY 2070 -mp200 MACH_MP200 MP200 2071 -pcm043 MACH_PCM043 PCM043 2072 -hanlin_v3c MACH_HANLIN_V3C HANLIN_V3C 2073 -kbk9g20 MACH_KBK9G20 KBK9G20 2074 -adsturbog5 MACH_ADSTURBOG5 ADSTURBOG5 2075 -avenger_lite1 MACH_AVENGER_LITE1 AVENGER_LITE1 2076 -suc82x MACH_SUC SUC 2077 -at91sam7s256 MACH_AT91SAM7S256 AT91SAM7S256 2078 -mendoza MACH_MENDOZA MENDOZA 2079 -kira MACH_KIRA KIRA 2080 -mx1hbm MACH_MX1HBM MX1HBM 2081 -quatro43xx MACH_QUATRO43XX QUATRO43XX 2082 -quatro4230 MACH_QUATRO4230 QUATRO4230 2083 -nsb400 MACH_NSB400 NSB400 2084 -drp255 MACH_DRP255 DRP255 2085 -thoth MACH_THOTH THOTH 2086 -firestone MACH_FIRESTONE FIRESTONE 2087 -asusp750 MACH_ASUSP750 ASUSP750 2088 -ctera_dl MACH_CTERA_DL CTERA_DL 2089 -socr MACH_SOCR SOCR 2090 -htcoxygen MACH_HTCOXYGEN HTCOXYGEN 2091 -heroc MACH_HEROC HEROC 2092 -zeno6800 MACH_ZENO6800 ZENO6800 2093 -sc2mcs MACH_SC2MCS SC2MCS 2094 -gene100 MACH_GENE100 GENE100 2095 -as353x MACH_AS353X AS353X 2096 -sheevaplug MACH_SHEEVAPLUG SHEEVAPLUG 2097 -at91sam9g20 MACH_AT91SAM9G20 AT91SAM9G20 2098 -mv88f6192gtw_fe MACH_MV88F6192GTW_FE MV88F6192GTW_FE 2099 -cc9200 MACH_CC9200 CC9200 2100 -sm9200 MACH_SM9200 SM9200 2101 -tp9200 MACH_TP9200 TP9200 2102 -snapperdv MACH_SNAPPERDV SNAPPERDV 2103 -avengers_lite MACH_AVENGERS_LITE AVENGERS_LITE 2104 -avengers_lite1 MACH_AVENGERS_LITE1 AVENGERS_LITE1 2105 -omap3axon MACH_OMAP3AXON OMAP3AXON 2106 -ma8xx MACH_MA8XX MA8XX 2107 -mp201ek MACH_MP201EK MP201EK 2108 -davinci_tux MACH_DAVINCI_TUX DAVINCI_TUX 2109 -mpa1600 MACH_MPA1600 MPA1600 2110 -pelco_troy MACH_PELCO_TROY PELCO_TROY 2111 -nsb667 MACH_NSB667 NSB667 2112 -rovers5_4mpix MACH_ROVERS5_4MPIX ROVERS5_4MPIX 2113 -twocom MACH_TWOCOM TWOCOM 2114 -ubisys_p9_rcu3r2 MACH_UBISYS_P9_RCU3R2 UBISYS_P9_RCU3R2 2115 -hero_espresso MACH_HERO_ESPRESSO HERO_ESPRESSO 2116 -afeusb MACH_AFEUSB AFEUSB 2117 -t830 MACH_T830 T830 2118 -spd8020_cc MACH_SPD8020_CC SPD8020_CC 2119 -om_3d7k MACH_OM_3D7K OM_3D7K 2120 -picocom2 MACH_PICOCOM2 PICOCOM2 2121 -uwg4mx27 MACH_UWG4MX27 UWG4MX27 2122 -uwg4mx31 MACH_UWG4MX31 UWG4MX31 2123 -cherry MACH_CHERRY CHERRY 2124 -mx51_babbage MACH_MX51_BABBAGE MX51_BABBAGE 2125 -s3c2440turkiye MACH_S3C2440TURKIYE S3C2440TURKIYE 2126 -tx37 MACH_TX37 TX37 2127 -sbc2800_9g20 MACH_SBC2800_9G20 SBC2800_9G20 2128 -benzglb MACH_BENZGLB BENZGLB 2129 -benztd MACH_BENZTD BENZTD 2130 -cartesio_plus MACH_CARTESIO_PLUS CARTESIO_PLUS 2131 -solrad_g20 MACH_SOLRAD_G20 SOLRAD_G20 2132 -mx27wallace MACH_MX27WALLACE MX27WALLACE 2133 -fmzwebmodul MACH_FMZWEBMODUL FMZWEBMODUL 2134 -rd78x00_masa MACH_RD78X00_MASA RD78X00_MASA 2135 -smallogger MACH_SMALLOGGER SMALLOGGER 2136 +htcvenus MACH_HTCVENUS HTCVENUS 2006 diff --git a/trunk/arch/m68k/include/asm/param.h b/trunk/arch/m68k/include/asm/param.h index 85c41b75aa78..40d1112a4588 100644 --- a/trunk/arch/m68k/include/asm/param.h +++ b/trunk/arch/m68k/include/asm/param.h @@ -1,26 +1,5 @@ -#ifndef _M68K_PARAM_H -#define _M68K_PARAM_H - -#ifdef __KERNEL__ -# 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() */ -#endif - -#ifndef HZ -#define HZ 100 -#endif - #ifdef __uClinux__ -#define EXEC_PAGESIZE 4096 +#include "param_no.h" #else -#define EXEC_PAGESIZE 8192 -#endif - -#ifndef NOGROUP -#define NOGROUP (-1) +#include "param_mm.h" #endif - -#define MAXHOSTNAMELEN 64 /* max length of hostname */ - -#endif /* _M68K_PARAM_H */ diff --git a/trunk/arch/m68k/include/asm/param_mm.h b/trunk/arch/m68k/include/asm/param_mm.h new file mode 100644 index 000000000000..536a27888358 --- /dev/null +++ b/trunk/arch/m68k/include/asm/param_mm.h @@ -0,0 +1,22 @@ +#ifndef _M68K_PARAM_H +#define _M68K_PARAM_H + +#ifdef __KERNEL__ +# 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() */ +#endif + +#ifndef HZ +#define HZ 100 +#endif + +#define EXEC_PAGESIZE 8192 + +#ifndef NOGROUP +#define NOGROUP (-1) +#endif + +#define MAXHOSTNAMELEN 64 /* max length of hostname */ + +#endif /* _M68K_PARAM_H */ diff --git a/trunk/arch/m68k/include/asm/param_no.h b/trunk/arch/m68k/include/asm/param_no.h new file mode 100644 index 000000000000..6044397adb64 --- /dev/null +++ b/trunk/arch/m68k/include/asm/param_no.h @@ -0,0 +1,22 @@ +#ifndef _M68KNOMMU_PARAM_H +#define _M68KNOMMU_PARAM_H + +#ifdef __KERNEL__ +#define HZ CONFIG_HZ +#define USER_HZ HZ +#define CLOCKS_PER_SEC (USER_HZ) +#endif + +#ifndef HZ +#define HZ 100 +#endif + +#define EXEC_PAGESIZE 4096 + +#ifndef NOGROUP +#define NOGROUP (-1) +#endif + +#define MAXHOSTNAMELEN 64 /* max length of hostname */ + +#endif /* _M68KNOMMU_PARAM_H */ diff --git a/trunk/arch/m68k/include/asm/ptrace.h b/trunk/arch/m68k/include/asm/ptrace.h index 8c9194b98548..e83cd2f66101 100644 --- a/trunk/arch/m68k/include/asm/ptrace.h +++ b/trunk/arch/m68k/include/asm/ptrace.h @@ -1,87 +1,5 @@ -#ifndef _M68K_PTRACE_H -#define _M68K_PTRACE_H - -#define PT_D1 0 -#define PT_D2 1 -#define PT_D3 2 -#define PT_D4 3 -#define PT_D5 4 -#define PT_D6 5 -#define PT_D7 6 -#define PT_A0 7 -#define PT_A1 8 -#define PT_A2 9 -#define PT_A3 10 -#define PT_A4 11 -#define PT_A5 12 -#define PT_A6 13 -#define PT_D0 14 -#define PT_USP 15 -#define PT_ORIG_D0 16 -#define PT_SR 17 -#define PT_PC 18 - -#ifndef __ASSEMBLY__ - -/* this struct defines the way the registers are stored on the - stack during a system call. */ - -struct pt_regs { - long d1; - long d2; - long d3; - long d4; - long d5; - long a0; - long a1; - long a2; - long d0; - long orig_d0; - long stkadj; -#ifdef CONFIG_COLDFIRE - unsigned format : 4; /* frame format specifier */ - unsigned vector : 12; /* vector offset */ - unsigned short sr; - unsigned long pc; +#ifdef __uClinux__ +#include "ptrace_no.h" #else - unsigned short sr; - unsigned long pc; - unsigned format : 4; /* frame format specifier */ - unsigned vector : 12; /* vector offset */ +#include "ptrace_mm.h" #endif -}; - -/* - * This is the extended stack used by signal handlers and the context - * switcher: it's pushed after the normal "struct pt_regs". - */ -struct switch_stack { - unsigned long d6; - unsigned long d7; - unsigned long a3; - unsigned long a4; - unsigned long a5; - unsigned long a6; - unsigned long retpc; -}; - -/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ -#define PTRACE_GETREGS 12 -#define PTRACE_SETREGS 13 -#define PTRACE_GETFPREGS 14 -#define PTRACE_SETFPREGS 15 - -#ifdef __KERNEL__ - -#ifndef PS_S -#define PS_S (0x2000) -#define PS_M (0x1000) -#endif - -#define user_mode(regs) (!((regs)->sr & PS_S)) -#define instruction_pointer(regs) ((regs)->pc) -#define profile_pc(regs) instruction_pointer(regs) -extern void show_regs(struct pt_regs *); -#endif /* __KERNEL__ */ -#endif /* __ASSEMBLY__ */ -#endif /* _M68K_PTRACE_H */ diff --git a/trunk/arch/m68k/include/asm/ptrace_mm.h b/trunk/arch/m68k/include/asm/ptrace_mm.h new file mode 100644 index 000000000000..57e763d79bf4 --- /dev/null +++ b/trunk/arch/m68k/include/asm/ptrace_mm.h @@ -0,0 +1,80 @@ +#ifndef _M68K_PTRACE_H +#define _M68K_PTRACE_H + +#define PT_D1 0 +#define PT_D2 1 +#define PT_D3 2 +#define PT_D4 3 +#define PT_D5 4 +#define PT_D6 5 +#define PT_D7 6 +#define PT_A0 7 +#define PT_A1 8 +#define PT_A2 9 +#define PT_A3 10 +#define PT_A4 11 +#define PT_A5 12 +#define PT_A6 13 +#define PT_D0 14 +#define PT_USP 15 +#define PT_ORIG_D0 16 +#define PT_SR 17 +#define PT_PC 18 + +#ifndef __ASSEMBLY__ + +/* this struct defines the way the registers are stored on the + stack during a system call. */ + +struct pt_regs { + long d1; + long d2; + long d3; + long d4; + long d5; + long a0; + long a1; + long a2; + long d0; + long orig_d0; + long stkadj; + unsigned short sr; + unsigned long pc; + unsigned format : 4; /* frame format specifier */ + unsigned vector : 12; /* vector offset */ +}; + +/* + * This is the extended stack used by signal handlers and the context + * switcher: it's pushed after the normal "struct pt_regs". + */ +struct switch_stack { + unsigned long d6; + unsigned long d7; + unsigned long a3; + unsigned long a4; + unsigned long a5; + unsigned long a6; + unsigned long retpc; +}; + +/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ +#define PTRACE_GETREGS 12 +#define PTRACE_SETREGS 13 +#define PTRACE_GETFPREGS 14 +#define PTRACE_SETFPREGS 15 + +#ifdef __KERNEL__ + +#ifndef PS_S +#define PS_S (0x2000) +#define PS_M (0x1000) +#endif + +#define user_mode(regs) (!((regs)->sr & PS_S)) +#define instruction_pointer(regs) ((regs)->pc) +#define profile_pc(regs) instruction_pointer(regs) +extern void show_regs(struct pt_regs *); +#endif /* __KERNEL__ */ +#endif /* __ASSEMBLY__ */ +#endif /* _M68K_PTRACE_H */ diff --git a/trunk/arch/m68k/include/asm/ptrace_no.h b/trunk/arch/m68k/include/asm/ptrace_no.h new file mode 100644 index 000000000000..8c9194b98548 --- /dev/null +++ b/trunk/arch/m68k/include/asm/ptrace_no.h @@ -0,0 +1,87 @@ +#ifndef _M68K_PTRACE_H +#define _M68K_PTRACE_H + +#define PT_D1 0 +#define PT_D2 1 +#define PT_D3 2 +#define PT_D4 3 +#define PT_D5 4 +#define PT_D6 5 +#define PT_D7 6 +#define PT_A0 7 +#define PT_A1 8 +#define PT_A2 9 +#define PT_A3 10 +#define PT_A4 11 +#define PT_A5 12 +#define PT_A6 13 +#define PT_D0 14 +#define PT_USP 15 +#define PT_ORIG_D0 16 +#define PT_SR 17 +#define PT_PC 18 + +#ifndef __ASSEMBLY__ + +/* this struct defines the way the registers are stored on the + stack during a system call. */ + +struct pt_regs { + long d1; + long d2; + long d3; + long d4; + long d5; + long a0; + long a1; + long a2; + long d0; + long orig_d0; + long stkadj; +#ifdef CONFIG_COLDFIRE + unsigned format : 4; /* frame format specifier */ + unsigned vector : 12; /* vector offset */ + unsigned short sr; + unsigned long pc; +#else + unsigned short sr; + unsigned long pc; + unsigned format : 4; /* frame format specifier */ + unsigned vector : 12; /* vector offset */ +#endif +}; + +/* + * This is the extended stack used by signal handlers and the context + * switcher: it's pushed after the normal "struct pt_regs". + */ +struct switch_stack { + unsigned long d6; + unsigned long d7; + unsigned long a3; + unsigned long a4; + unsigned long a5; + unsigned long a6; + unsigned long retpc; +}; + +/* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */ +#define PTRACE_GETREGS 12 +#define PTRACE_SETREGS 13 +#define PTRACE_GETFPREGS 14 +#define PTRACE_SETFPREGS 15 + +#ifdef __KERNEL__ + +#ifndef PS_S +#define PS_S (0x2000) +#define PS_M (0x1000) +#endif + +#define user_mode(regs) (!((regs)->sr & PS_S)) +#define instruction_pointer(regs) ((regs)->pc) +#define profile_pc(regs) instruction_pointer(regs) +extern void show_regs(struct pt_regs *); +#endif /* __KERNEL__ */ +#endif /* __ASSEMBLY__ */ +#endif /* _M68K_PTRACE_H */ diff --git a/trunk/arch/m68k/include/asm/setup.h b/trunk/arch/m68k/include/asm/setup.h index 4dfb3952b375..842f86f75ccd 100644 --- a/trunk/arch/m68k/include/asm/setup.h +++ b/trunk/arch/m68k/include/asm/setup.h @@ -1,376 +1,5 @@ -/* -** asm/setup.h -- Definition of the Linux/m68k setup information -** -** Copyright 1992 by Greg Harp -** -** 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. -** -** Created 09/29/92 by Greg Harp -** -** 5/2/94 Roman Hodek: -** Added bi_atari part of the machine dependent union bi_un; for now it -** contains just a model field to distinguish between TT and Falcon. -** 26/7/96 Roman Zippel: -** Renamed to setup.h; added some useful macros to allow gcc some -** optimizations if possible. -** 5/10/96 Geert Uytterhoeven: -** Redesign of the boot information structure; moved boot information -** structure to bootinfo.h -*/ - -#ifndef _M68K_SETUP_H -#define _M68K_SETUP_H - - - - /* - * Linux/m68k Architectures - */ - -#define MACH_AMIGA 1 -#define MACH_ATARI 2 -#define MACH_MAC 3 -#define MACH_APOLLO 4 -#define MACH_SUN3 5 -#define MACH_MVME147 6 -#define MACH_MVME16x 7 -#define MACH_BVME6000 8 -#define MACH_HP300 9 -#define MACH_Q40 10 -#define MACH_SUN3X 11 - -#define COMMAND_LINE_SIZE 256 - -#ifdef __KERNEL__ - -#define CL_SIZE COMMAND_LINE_SIZE - -#ifndef __ASSEMBLY__ -extern unsigned long m68k_machtype; -#endif /* !__ASSEMBLY__ */ - -#if !defined(CONFIG_AMIGA) -# define MACH_IS_AMIGA (0) -#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \ - || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \ - || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ - || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) -# define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA) +#ifdef __uClinux__ +#include "setup_no.h" #else -# define MACH_AMIGA_ONLY -# define MACH_IS_AMIGA (1) -# define MACH_TYPE (MACH_AMIGA) +#include "setup_mm.h" #endif - -#if !defined(CONFIG_ATARI) -# define MACH_IS_ATARI (0) -#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \ - || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \ - || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ - || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) -# define MACH_IS_ATARI (m68k_machtype == MACH_ATARI) -#else -# define MACH_ATARI_ONLY -# define MACH_IS_ATARI (1) -# define MACH_TYPE (MACH_ATARI) -#endif - -#if !defined(CONFIG_MAC) -# define MACH_IS_MAC (0) -#elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \ - || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \ - || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ - || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) -# define MACH_IS_MAC (m68k_machtype == MACH_MAC) -#else -# define MACH_MAC_ONLY -# define MACH_IS_MAC (1) -# define MACH_TYPE (MACH_MAC) -#endif - -#if defined(CONFIG_SUN3) -#define MACH_IS_SUN3 (1) -#define MACH_SUN3_ONLY (1) -#define MACH_TYPE (MACH_SUN3) -#else -#define MACH_IS_SUN3 (0) -#endif - -#if !defined (CONFIG_APOLLO) -# define MACH_IS_APOLLO (0) -#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ - || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \ - || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ - || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) -# define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO) -#else -# define MACH_APOLLO_ONLY -# define MACH_IS_APOLLO (1) -# define MACH_TYPE (MACH_APOLLO) -#endif - -#if !defined (CONFIG_MVME147) -# define MACH_IS_MVME147 (0) -#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ - || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \ - || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ - || defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x) -# define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147) -#else -# define MACH_MVME147_ONLY -# define MACH_IS_MVME147 (1) -# define MACH_TYPE (MACH_MVME147) -#endif - -#if !defined (CONFIG_MVME16x) -# define MACH_IS_MVME16x (0) -#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ - || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \ - || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ - || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) -# define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x) -#else -# define MACH_MVME16x_ONLY -# define MACH_IS_MVME16x (1) -# define MACH_TYPE (MACH_MVME16x) -#endif - -#if !defined (CONFIG_BVME6000) -# define MACH_IS_BVME6000 (0) -#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ - || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \ - || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ - || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) -# define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000) -#else -# define MACH_BVME6000_ONLY -# define MACH_IS_BVME6000 (1) -# define MACH_TYPE (MACH_BVME6000) -#endif - -#if !defined (CONFIG_HP300) -# define MACH_IS_HP300 (0) -#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ - || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \ - || defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \ - || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) -# define MACH_IS_HP300 (m68k_machtype == MACH_HP300) -#else -# define MACH_HP300_ONLY -# define MACH_IS_HP300 (1) -# define MACH_TYPE (MACH_HP300) -#endif - -#if !defined (CONFIG_Q40) -# define MACH_IS_Q40 (0) -#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ - || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \ - || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \ - || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) -# define MACH_IS_Q40 (m68k_machtype == MACH_Q40) -#else -# define MACH_Q40_ONLY -# define MACH_IS_Q40 (1) -# define MACH_TYPE (MACH_Q40) -#endif - -#if !defined (CONFIG_SUN3X) -# define MACH_IS_SUN3X (0) -#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ - || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \ - || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \ - || defined(CONFIG_Q40) || defined(CONFIG_MVME147) -# define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X) -#else -# define CONFIG_SUN3X_ONLY -# define MACH_IS_SUN3X (1) -# define MACH_TYPE (MACH_SUN3X) -#endif - -#ifndef MACH_TYPE -# define MACH_TYPE (m68k_machtype) -#endif - -#endif /* __KERNEL__ */ - - - /* - * CPU, FPU and MMU types - * - * Note: we may rely on the following equalities: - * - * CPU_68020 == MMU_68851 - * CPU_68030 == MMU_68030 - * CPU_68040 == FPU_68040 == MMU_68040 - * CPU_68060 == FPU_68060 == MMU_68060 - */ - -#define CPUB_68020 0 -#define CPUB_68030 1 -#define CPUB_68040 2 -#define CPUB_68060 3 - -#define CPU_68020 (1< + +/* We have a bigger command line buffer. */ +#undef COMMAND_LINE_SIZE + +#endif /* __KERNEL__ */ + +#define COMMAND_LINE_SIZE 512 diff --git a/trunk/arch/m68k/include/asm/sigcontext.h b/trunk/arch/m68k/include/asm/sigcontext.h index 523db2a51cf3..bff6d40345a9 100644 --- a/trunk/arch/m68k/include/asm/sigcontext.h +++ b/trunk/arch/m68k/include/asm/sigcontext.h @@ -1,24 +1,5 @@ -#ifndef _ASM_M68k_SIGCONTEXT_H -#define _ASM_M68k_SIGCONTEXT_H - -struct sigcontext { - unsigned long sc_mask; /* old sigmask */ - unsigned long sc_usp; /* old user stack pointer */ - unsigned long sc_d0; - unsigned long sc_d1; - unsigned long sc_a0; - unsigned long sc_a1; #ifdef __uClinux__ - unsigned long sc_a5; -#endif - unsigned short sc_sr; - unsigned long sc_pc; - unsigned short sc_formatvec; -#ifndef __uClinux__ - unsigned long sc_fpregs[2*3]; /* room for two fp registers */ - unsigned long sc_fpcntl[3]; - unsigned char sc_fpstate[216]; -#endif -}; - +#include "sigcontext_no.h" +#else +#include "sigcontext_mm.h" #endif diff --git a/trunk/arch/m68k/include/asm/sigcontext_mm.h b/trunk/arch/m68k/include/asm/sigcontext_mm.h new file mode 100644 index 000000000000..64fbe34cf26f --- /dev/null +++ b/trunk/arch/m68k/include/asm/sigcontext_mm.h @@ -0,0 +1,19 @@ +#ifndef _ASM_M68k_SIGCONTEXT_H +#define _ASM_M68k_SIGCONTEXT_H + +struct sigcontext { + unsigned long sc_mask; /* old sigmask */ + unsigned long sc_usp; /* old user stack pointer */ + unsigned long sc_d0; + unsigned long sc_d1; + unsigned long sc_a0; + unsigned long sc_a1; + unsigned short sc_sr; + unsigned long sc_pc; + unsigned short sc_formatvec; + unsigned long sc_fpregs[2*3]; /* room for two fp registers */ + unsigned long sc_fpcntl[3]; + unsigned char sc_fpstate[216]; +}; + +#endif diff --git a/trunk/arch/m68k/include/asm/sigcontext_no.h b/trunk/arch/m68k/include/asm/sigcontext_no.h new file mode 100644 index 000000000000..36c293fc133d --- /dev/null +++ b/trunk/arch/m68k/include/asm/sigcontext_no.h @@ -0,0 +1,17 @@ +#ifndef _ASM_M68KNOMMU_SIGCONTEXT_H +#define _ASM_M68KNOMMU_SIGCONTEXT_H + +struct sigcontext { + unsigned long sc_mask; /* old sigmask */ + unsigned long sc_usp; /* old user stack pointer */ + unsigned long sc_d0; + unsigned long sc_d1; + unsigned long sc_a0; + unsigned long sc_a1; + unsigned long sc_a5; + unsigned short sc_sr; + unsigned long sc_pc; + unsigned short sc_formatvec; +}; + +#endif diff --git a/trunk/arch/m68k/include/asm/siginfo.h b/trunk/arch/m68k/include/asm/siginfo.h index ca7dde8fd223..61219d7affc8 100644 --- a/trunk/arch/m68k/include/asm/siginfo.h +++ b/trunk/arch/m68k/include/asm/siginfo.h @@ -1,97 +1,5 @@ -#ifndef _M68K_SIGINFO_H -#define _M68K_SIGINFO_H - -#ifndef __uClinux__ -#define HAVE_ARCH_SIGINFO_T -#define HAVE_ARCH_COPY_SIGINFO -#endif - -#include - -#ifndef __uClinux__ - -typedef struct siginfo { - int si_signo; - int si_errno; - int si_code; - - union { - int _pad[SI_PAD_SIZE]; - - /* kill() */ - struct { - __kernel_pid_t _pid; /* sender's pid */ - __kernel_uid_t _uid; /* backwards compatibility */ - __kernel_uid32_t _uid32; /* sender's uid */ - } _kill; - - /* POSIX.1b timers */ - struct { - timer_t _tid; /* timer id */ - int _overrun; /* overrun count */ - char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; - sigval_t _sigval; /* same as below */ - int _sys_private; /* not to be passed to user */ - } _timer; - - /* POSIX.1b signals */ - struct { - __kernel_pid_t _pid; /* sender's pid */ - __kernel_uid_t _uid; /* backwards compatibility */ - sigval_t _sigval; - __kernel_uid32_t _uid32; /* sender's uid */ - } _rt; - - /* SIGCHLD */ - struct { - __kernel_pid_t _pid; /* which child */ - __kernel_uid_t _uid; /* backwards compatibility */ - int _status; /* exit code */ - clock_t _utime; - clock_t _stime; - __kernel_uid32_t _uid32; /* sender's uid */ - } _sigchld; - - /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ - struct { - void *_addr; /* faulting insn/memory ref. */ - } _sigfault; - - /* SIGPOLL */ - struct { - int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ - int _fd; - } _sigpoll; - } _sifields; -} siginfo_t; - -#define UID16_SIGINFO_COMPAT_NEEDED - -/* - * How these fields are to be accessed. - */ -#undef si_uid -#ifdef __KERNEL__ -#define si_uid _sifields._kill._uid32 -#define si_uid16 _sifields._kill._uid +#ifdef __uClinux__ +#include "siginfo_no.h" #else -#define si_uid _sifields._kill._uid -#endif - -#ifdef __KERNEL__ - -#include - -static inline void copy_siginfo(struct siginfo *to, struct siginfo *from) -{ - if (from->si_code < 0) - memcpy(to, from, sizeof(*to)); - else - /* _sigchld is currently the largest know union member */ - memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); -} - -#endif /* __KERNEL__ */ -#endif /* !__uClinux__ */ - +#include "siginfo_mm.h" #endif diff --git a/trunk/arch/m68k/include/asm/siginfo_mm.h b/trunk/arch/m68k/include/asm/siginfo_mm.h new file mode 100644 index 000000000000..05a8d6d90b58 --- /dev/null +++ b/trunk/arch/m68k/include/asm/siginfo_mm.h @@ -0,0 +1,92 @@ +#ifndef _M68K_SIGINFO_H +#define _M68K_SIGINFO_H + +#define HAVE_ARCH_SIGINFO_T +#define HAVE_ARCH_COPY_SIGINFO + +#include + +typedef struct siginfo { + int si_signo; + int si_errno; + int si_code; + + union { + int _pad[SI_PAD_SIZE]; + + /* kill() */ + struct { + __kernel_pid_t _pid; /* sender's pid */ + __kernel_uid_t _uid; /* backwards compatibility */ + __kernel_uid32_t _uid32; /* sender's uid */ + } _kill; + + /* POSIX.1b timers */ + struct { + timer_t _tid; /* timer id */ + int _overrun; /* overrun count */ + char _pad[sizeof( __ARCH_SI_UID_T) - sizeof(int)]; + sigval_t _sigval; /* same as below */ + int _sys_private; /* not to be passed to user */ + } _timer; + + /* POSIX.1b signals */ + struct { + __kernel_pid_t _pid; /* sender's pid */ + __kernel_uid_t _uid; /* backwards compatibility */ + sigval_t _sigval; + __kernel_uid32_t _uid32; /* sender's uid */ + } _rt; + + /* SIGCHLD */ + struct { + __kernel_pid_t _pid; /* which child */ + __kernel_uid_t _uid; /* backwards compatibility */ + int _status; /* exit code */ + clock_t _utime; + clock_t _stime; + __kernel_uid32_t _uid32; /* sender's uid */ + } _sigchld; + + /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ + struct { + void *_addr; /* faulting insn/memory ref. */ + } _sigfault; + + /* SIGPOLL */ + struct { + int _band; /* POLL_IN, POLL_OUT, POLL_MSG */ + int _fd; + } _sigpoll; + } _sifields; +} siginfo_t; + +#define UID16_SIGINFO_COMPAT_NEEDED + +/* + * How these fields are to be accessed. + */ +#undef si_uid +#ifdef __KERNEL__ +#define si_uid _sifields._kill._uid32 +#define si_uid16 _sifields._kill._uid +#else +#define si_uid _sifields._kill._uid +#endif + +#ifdef __KERNEL__ + +#include + +static inline void copy_siginfo(struct siginfo *to, struct siginfo *from) +{ + if (from->si_code < 0) + memcpy(to, from, sizeof(*to)); + else + /* _sigchld is currently the largest know union member */ + memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld)); +} + +#endif /* __KERNEL__ */ + +#endif diff --git a/trunk/arch/m68k/include/asm/siginfo_no.h b/trunk/arch/m68k/include/asm/siginfo_no.h new file mode 100644 index 000000000000..b18e5f4064ae --- /dev/null +++ b/trunk/arch/m68k/include/asm/siginfo_no.h @@ -0,0 +1,6 @@ +#ifndef _M68KNOMMU_SIGINFO_H +#define _M68KNOMMU_SIGINFO_H + +#include + +#endif diff --git a/trunk/arch/m68k/include/asm/signal.h b/trunk/arch/m68k/include/asm/signal.h index 08788fdefde0..3c19988bd93c 100644 --- a/trunk/arch/m68k/include/asm/signal.h +++ b/trunk/arch/m68k/include/asm/signal.h @@ -1,213 +1,5 @@ -#ifndef _M68K_SIGNAL_H -#define _M68K_SIGNAL_H - -#include - -/* Avoid too many header ordering problems. */ -struct siginfo; - -#ifdef __KERNEL__ -/* Most things should be clean enough to redefine this at will, if care - is taken to make libc match. */ - -#define _NSIG 64 -#define _NSIG_BPW 32 -#define _NSIG_WORDS (_NSIG / _NSIG_BPW) - -typedef unsigned long old_sigset_t; /* at least 32 bits */ - -typedef struct { - unsigned long sig[_NSIG_WORDS]; -} sigset_t; - +#ifdef __uClinux__ +#include "signal_no.h" #else -/* Here we must cater to libcs that poke about in kernel headers. */ - -#define NSIG 32 -typedef unsigned long sigset_t; - -#endif /* __KERNEL__ */ - -#define SIGHUP 1 -#define SIGINT 2 -#define SIGQUIT 3 -#define SIGILL 4 -#define SIGTRAP 5 -#define SIGABRT 6 -#define SIGIOT 6 -#define SIGBUS 7 -#define SIGFPE 8 -#define SIGKILL 9 -#define SIGUSR1 10 -#define SIGSEGV 11 -#define SIGUSR2 12 -#define SIGPIPE 13 -#define SIGALRM 14 -#define SIGTERM 15 -#define SIGSTKFLT 16 -#define SIGCHLD 17 -#define SIGCONT 18 -#define SIGSTOP 19 -#define SIGTSTP 20 -#define SIGTTIN 21 -#define SIGTTOU 22 -#define SIGURG 23 -#define SIGXCPU 24 -#define SIGXFSZ 25 -#define SIGVTALRM 26 -#define SIGPROF 27 -#define SIGWINCH 28 -#define SIGIO 29 -#define SIGPOLL SIGIO -/* -#define SIGLOST 29 -*/ -#define SIGPWR 30 -#define SIGSYS 31 -#define SIGUNUSED 31 - -/* These should not be considered constants from userland. */ -#define SIGRTMIN 32 -#define SIGRTMAX _NSIG - -/* - * SA_FLAGS values: - * - * SA_ONSTACK indicates that a registered stack_t will be used. - * 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. - * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. - * SA_NODEFER prevents the current signal from being masked in the handler. - * - * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single - * Unix names RESETHAND and NODEFER respectively. - */ -#define SA_NOCLDSTOP 0x00000001 -#define SA_NOCLDWAIT 0x00000002 -#define SA_SIGINFO 0x00000004 -#define SA_ONSTACK 0x08000000 -#define SA_RESTART 0x10000000 -#define SA_NODEFER 0x40000000 -#define SA_RESETHAND 0x80000000 - -#define SA_NOMASK SA_NODEFER -#define SA_ONESHOT SA_RESETHAND - -/* - * sigaltstack controls - */ -#define SS_ONSTACK 1 -#define SS_DISABLE 2 - -#define MINSIGSTKSZ 2048 -#define SIGSTKSZ 8192 - -#include - -#ifdef __KERNEL__ -struct old_sigaction { - __sighandler_t sa_handler; - old_sigset_t sa_mask; - unsigned long sa_flags; - __sigrestore_t sa_restorer; -}; - -struct sigaction { - __sighandler_t sa_handler; - unsigned long sa_flags; - __sigrestore_t sa_restorer; - sigset_t sa_mask; /* mask last for extensibility */ -}; - -struct k_sigaction { - struct sigaction sa; -}; -#else -/* Here we must cater to libcs that poke about in kernel headers. */ - -struct sigaction { - union { - __sighandler_t _sa_handler; - void (*_sa_sigaction)(int, struct siginfo *, void *); - } _u; - sigset_t sa_mask; - unsigned long sa_flags; - void (*sa_restorer)(void); -}; - -#define sa_handler _u._sa_handler -#define sa_sigaction _u._sa_sigaction - -#endif /* __KERNEL__ */ - -typedef struct sigaltstack { - void __user *ss_sp; - int ss_flags; - size_t ss_size; -} stack_t; - -#ifdef __KERNEL__ -#include - -#ifndef __uClinux__ -#define __HAVE_ARCH_SIG_BITOPS - -static inline void sigaddset(sigset_t *set, int _sig) -{ - asm ("bfset %0{%1,#1}" - : "+od" (*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) - : "cc"); -} - -static inline int __const_sigismember(sigset_t *set, int _sig) -{ - unsigned long sig = _sig - 1; - return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); -} - -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"); - return ret; -} - -#define sigismember(set,sig) \ - (__builtin_constant_p(sig) ? \ - __const_sigismember(set,sig) : \ - __gen_sigismember(set,sig)) - -static inline int sigfindinword(unsigned long word) -{ - asm ("bfffo %1{#0,#0},%0" - : "=d" (word) - : "d" (word & -word) - : "cc"); - return word ^ 31; -} - -struct pt_regs; -extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); - -#else - -#undef __HAVE_ARCH_SIG_BITOPS -#define ptrace_signal_deliver(regs, cookie) do { } while (0) - -#endif /* __uClinux__ */ -#endif /* __KERNEL__ */ - -#endif /* _M68K_SIGNAL_H */ +#include "signal_mm.h" +#endif diff --git a/trunk/arch/m68k/include/asm/signal_mm.h b/trunk/arch/m68k/include/asm/signal_mm.h new file mode 100644 index 000000000000..3db8a81942f1 --- /dev/null +++ b/trunk/arch/m68k/include/asm/signal_mm.h @@ -0,0 +1,206 @@ +#ifndef _M68K_SIGNAL_H +#define _M68K_SIGNAL_H + +#include + +/* Avoid too many header ordering problems. */ +struct siginfo; + +#ifdef __KERNEL__ +/* Most things should be clean enough to redefine this at will, if care + is taken to make libc match. */ + +#define _NSIG 64 +#define _NSIG_BPW 32 +#define _NSIG_WORDS (_NSIG / _NSIG_BPW) + +typedef unsigned long old_sigset_t; /* at least 32 bits */ + +typedef struct { + unsigned long sig[_NSIG_WORDS]; +} sigset_t; + +#else +/* Here we must cater to libcs that poke about in kernel headers. */ + +#define NSIG 32 +typedef unsigned long sigset_t; + +#endif /* __KERNEL__ */ + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT 6 +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGIO 29 +#define SIGPOLL SIGIO +/* +#define SIGLOST 29 +*/ +#define SIGPWR 30 +#define SIGSYS 31 +#define SIGUNUSED 31 + +/* These should not be considered constants from userland. */ +#define SIGRTMIN 32 +#define SIGRTMAX _NSIG + +/* + * SA_FLAGS values: + * + * SA_ONSTACK indicates that a registered stack_t will be used. + * 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. + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. + * SA_NODEFER prevents the current signal from being masked in the handler. + * + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single + * Unix names RESETHAND and NODEFER respectively. + */ +#define SA_NOCLDSTOP 0x00000001 +#define SA_NOCLDWAIT 0x00000002 +#define SA_SIGINFO 0x00000004 +#define SA_ONSTACK 0x08000000 +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 +#define SA_RESETHAND 0x80000000 + +#define SA_NOMASK SA_NODEFER +#define SA_ONESHOT SA_RESETHAND + +/* + * sigaltstack controls + */ +#define SS_ONSTACK 1 +#define SS_DISABLE 2 + +#define MINSIGSTKSZ 2048 +#define SIGSTKSZ 8192 + +#include + +#ifdef __KERNEL__ +struct old_sigaction { + __sighandler_t sa_handler; + old_sigset_t sa_mask; + unsigned long sa_flags; + __sigrestore_t sa_restorer; +}; + +struct sigaction { + __sighandler_t sa_handler; + unsigned long sa_flags; + __sigrestore_t sa_restorer; + sigset_t sa_mask; /* mask last for extensibility */ +}; + +struct k_sigaction { + struct sigaction sa; +}; +#else +/* Here we must cater to libcs that poke about in kernel headers. */ + +struct sigaction { + union { + __sighandler_t _sa_handler; + void (*_sa_sigaction)(int, struct siginfo *, void *); + } _u; + sigset_t sa_mask; + unsigned long sa_flags; + void (*sa_restorer)(void); +}; + +#define sa_handler _u._sa_handler +#define sa_sigaction _u._sa_sigaction + +#endif /* __KERNEL__ */ + +typedef struct sigaltstack { + void __user *ss_sp; + int ss_flags; + size_t ss_size; +} stack_t; + +#ifdef __KERNEL__ +#include + +#define __HAVE_ARCH_SIG_BITOPS + +static inline void sigaddset(sigset_t *set, int _sig) +{ + asm ("bfset %0{%1,#1}" + : "+od" (*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) + : "cc"); +} + +static inline int __const_sigismember(sigset_t *set, int _sig) +{ + unsigned long sig = _sig - 1; + return 1 & (set->sig[sig / _NSIG_BPW] >> (sig % _NSIG_BPW)); +} + +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"); + return ret; +} + +#define sigismember(set,sig) \ + (__builtin_constant_p(sig) ? \ + __const_sigismember(set,sig) : \ + __gen_sigismember(set,sig)) + +static inline int sigfindinword(unsigned long word) +{ + asm ("bfffo %1{#0,#0},%0" + : "=d" (word) + : "d" (word & -word) + : "cc"); + return word ^ 31; +} + +struct pt_regs; +extern void ptrace_signal_deliver(struct pt_regs *regs, void *cookie); + +#endif /* __KERNEL__ */ + +#endif /* _M68K_SIGNAL_H */ diff --git a/trunk/arch/m68k/include/asm/signal_no.h b/trunk/arch/m68k/include/asm/signal_no.h new file mode 100644 index 000000000000..216c08be54a0 --- /dev/null +++ b/trunk/arch/m68k/include/asm/signal_no.h @@ -0,0 +1,159 @@ +#ifndef _M68KNOMMU_SIGNAL_H +#define _M68KNOMMU_SIGNAL_H + +#include + +/* Avoid too many header ordering problems. */ +struct siginfo; + +#ifdef __KERNEL__ +/* Most things should be clean enough to redefine this at will, if care + is taken to make libc match. */ + +#define _NSIG 64 +#define _NSIG_BPW 32 +#define _NSIG_WORDS (_NSIG / _NSIG_BPW) + +typedef unsigned long old_sigset_t; /* at least 32 bits */ + +typedef struct { + unsigned long sig[_NSIG_WORDS]; +} sigset_t; + +#else +/* Here we must cater to libcs that poke about in kernel headers. */ + +#define NSIG 32 +typedef unsigned long sigset_t; + +#endif /* __KERNEL__ */ + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT 6 +#define SIGBUS 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 +#define SIGURG 23 +#define SIGXCPU 24 +#define SIGXFSZ 25 +#define SIGVTALRM 26 +#define SIGPROF 27 +#define SIGWINCH 28 +#define SIGIO 29 +#define SIGPOLL SIGIO +/* +#define SIGLOST 29 +*/ +#define SIGPWR 30 +#define SIGSYS 31 +#define SIGUNUSED 31 + +/* These should not be considered constants from userland. */ +#define SIGRTMIN 32 +#define SIGRTMAX _NSIG + +/* + * SA_FLAGS values: + * + * SA_ONSTACK indicates that a registered stack_t will be used. + * 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. + * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. + * SA_NODEFER prevents the current signal from being masked in the handler. + * + * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single + * Unix names RESETHAND and NODEFER respectively. + */ +#define SA_NOCLDSTOP 0x00000001 +#define SA_NOCLDWAIT 0x00000002 +#define SA_SIGINFO 0x00000004 +#define SA_ONSTACK 0x08000000 +#define SA_RESTART 0x10000000 +#define SA_NODEFER 0x40000000 +#define SA_RESETHAND 0x80000000 + +#define SA_NOMASK SA_NODEFER +#define SA_ONESHOT SA_RESETHAND + +/* + * sigaltstack controls + */ +#define SS_ONSTACK 1 +#define SS_DISABLE 2 + +#define MINSIGSTKSZ 2048 +#define SIGSTKSZ 8192 + +#include + +#ifdef __KERNEL__ +struct old_sigaction { + __sighandler_t sa_handler; + old_sigset_t sa_mask; + unsigned long sa_flags; + void (*sa_restorer)(void); +}; + +struct sigaction { + __sighandler_t sa_handler; + unsigned long sa_flags; + void (*sa_restorer)(void); + sigset_t sa_mask; /* mask last for extensibility */ +}; + +struct k_sigaction { + struct sigaction sa; +}; +#else +/* Here we must cater to libcs that poke about in kernel headers. */ + +struct sigaction { + union { + __sighandler_t _sa_handler; + void (*_sa_sigaction)(int, struct siginfo *, void *); + } _u; + sigset_t sa_mask; + unsigned long sa_flags; + void (*sa_restorer)(void); +}; + +#define sa_handler _u._sa_handler +#define sa_sigaction _u._sa_sigaction + +#endif /* __KERNEL__ */ + +typedef struct sigaltstack { + void *ss_sp; + int ss_flags; + size_t ss_size; +} stack_t; + +#ifdef __KERNEL__ + +#include +#undef __HAVE_ARCH_SIG_BITOPS + +#define ptrace_signal_deliver(regs, cookie) do { } while (0) + +#endif /* __KERNEL__ */ + +#endif /* _M68KNOMMU_SIGNAL_H */ diff --git a/trunk/arch/m68k/include/asm/swab.h b/trunk/arch/m68k/include/asm/swab.h index 9e3054ea59e9..7d7dde1c73ec 100644 --- a/trunk/arch/m68k/include/asm/swab.h +++ b/trunk/arch/m68k/include/asm/swab.h @@ -1,27 +1,5 @@ -#ifndef _M68K_SWAB_H -#define _M68K_SWAB_H - -#include -#include - -#define __SWAB_64_THRU_32__ - -#if defined (__mcfisaaplus__) || defined (__mcfisac__) -static inline __attribute_const__ __u32 __arch_swab32(__u32 val) -{ - __asm__("byterev %0" : "=d" (val) : "0" (val)); - return val; -} - -#define __arch_swab32 __arch_swab32 -#elif !defined(__uClinux__) - -static inline __attribute_const__ __u32 __arch_swab32(__u32 val) -{ - __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val)); - return val; -} -#define __arch_swab32 __arch_swab32 +#ifdef __uClinux__ +#include "swab_no.h" +#else +#include "swab_mm.h" #endif - -#endif /* _M68K_SWAB_H */ diff --git a/trunk/arch/m68k/include/asm/swab_mm.h b/trunk/arch/m68k/include/asm/swab_mm.h new file mode 100644 index 000000000000..7221e3066825 --- /dev/null +++ b/trunk/arch/m68k/include/asm/swab_mm.h @@ -0,0 +1,16 @@ +#ifndef _M68K_SWAB_H +#define _M68K_SWAB_H + +#include +#include + +#define __SWAB_64_THRU_32__ + +static inline __attribute_const__ __u32 __arch_swab32(__u32 val) +{ + __asm__("rolw #8,%0; swap %0; rolw #8,%0" : "=d" (val) : "0" (val)); + return val; +} +#define __arch_swab32 __arch_swab32 + +#endif /* _M68K_SWAB_H */ diff --git a/trunk/arch/m68k/include/asm/swab_no.h b/trunk/arch/m68k/include/asm/swab_no.h new file mode 100644 index 000000000000..e582257db300 --- /dev/null +++ b/trunk/arch/m68k/include/asm/swab_no.h @@ -0,0 +1,24 @@ +#ifndef _M68KNOMMU_SWAB_H +#define _M68KNOMMU_SWAB_H + +#include + +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) +# define __SWAB_64_THRU_32__ +#endif + +#if defined (__mcfisaaplus__) || defined (__mcfisac__) +static inline __attribute_const__ __u32 __arch_swab32(__u32 val) +{ + asm( + "byterev %0" + : "=d" (val) + : "0" (val) + ); + return val; +} + +#define __arch_swab32 __arch_swab32 +#endif + +#endif /* _M68KNOMMU_SWAB_H */ diff --git a/trunk/arch/m68k/include/asm/unistd.h b/trunk/arch/m68k/include/asm/unistd.h index 3c19027331fa..df1d9d4cb1fd 100644 --- a/trunk/arch/m68k/include/asm/unistd.h +++ b/trunk/arch/m68k/include/asm/unistd.h @@ -1,372 +1,5 @@ -#ifndef _ASM_M68K_UNISTD_H_ -#define _ASM_M68K_UNISTD_H_ - -/* - * This file contains the system call numbers. - */ - -#define __NR_restart_syscall 0 -#define __NR_exit 1 -#define __NR_fork 2 -#define __NR_read 3 -#define __NR_write 4 -#define __NR_open 5 -#define __NR_close 6 -#define __NR_waitpid 7 -#define __NR_creat 8 -#define __NR_link 9 -#define __NR_unlink 10 -#define __NR_execve 11 -#define __NR_chdir 12 -#define __NR_time 13 -#define __NR_mknod 14 -#define __NR_chmod 15 -#define __NR_chown 16 -#define __NR_break 17 -#define __NR_oldstat 18 -#define __NR_lseek 19 -#define __NR_getpid 20 -#define __NR_mount 21 -#define __NR_umount 22 -#define __NR_setuid 23 -#define __NR_getuid 24 -#define __NR_stime 25 -#define __NR_ptrace 26 -#define __NR_alarm 27 -#define __NR_oldfstat 28 -#define __NR_pause 29 -#define __NR_utime 30 -#define __NR_stty 31 -#define __NR_gtty 32 -#define __NR_access 33 -#define __NR_nice 34 -#define __NR_ftime 35 -#define __NR_sync 36 -#define __NR_kill 37 -#define __NR_rename 38 -#define __NR_mkdir 39 -#define __NR_rmdir 40 -#define __NR_dup 41 -#define __NR_pipe 42 -#define __NR_times 43 -#define __NR_prof 44 -#define __NR_brk 45 -#define __NR_setgid 46 -#define __NR_getgid 47 -#define __NR_signal 48 -#define __NR_geteuid 49 -#define __NR_getegid 50 -#define __NR_acct 51 -#define __NR_umount2 52 -#define __NR_lock 53 -#define __NR_ioctl 54 -#define __NR_fcntl 55 -#define __NR_mpx 56 -#define __NR_setpgid 57 -#define __NR_ulimit 58 -#define __NR_oldolduname 59 -#define __NR_umask 60 -#define __NR_chroot 61 -#define __NR_ustat 62 -#define __NR_dup2 63 -#define __NR_getppid 64 -#define __NR_getpgrp 65 -#define __NR_setsid 66 -#define __NR_sigaction 67 -#define __NR_sgetmask 68 -#define __NR_ssetmask 69 -#define __NR_setreuid 70 -#define __NR_setregid 71 -#define __NR_sigsuspend 72 -#define __NR_sigpending 73 -#define __NR_sethostname 74 -#define __NR_setrlimit 75 -#define __NR_getrlimit 76 -#define __NR_getrusage 77 -#define __NR_gettimeofday 78 -#define __NR_settimeofday 79 -#define __NR_getgroups 80 -#define __NR_setgroups 81 -#define __NR_select 82 -#define __NR_symlink 83 -#define __NR_oldlstat 84 -#define __NR_readlink 85 -#define __NR_uselib 86 -#define __NR_swapon 87 -#define __NR_reboot 88 -#define __NR_readdir 89 -#define __NR_mmap 90 -#define __NR_munmap 91 -#define __NR_truncate 92 -#define __NR_ftruncate 93 -#define __NR_fchmod 94 -#define __NR_fchown 95 -#define __NR_getpriority 96 -#define __NR_setpriority 97 -#define __NR_profil 98 -#define __NR_statfs 99 -#define __NR_fstatfs 100 -#define __NR_ioperm 101 -#define __NR_socketcall 102 -#define __NR_syslog 103 -#define __NR_setitimer 104 -#define __NR_getitimer 105 -#define __NR_stat 106 -#define __NR_lstat 107 -#define __NR_fstat 108 -#define __NR_olduname 109 -#define __NR_iopl /* 110 */ not supported -#define __NR_vhangup 111 -#define __NR_idle /* 112 */ Obsolete -#define __NR_vm86 /* 113 */ not supported -#define __NR_wait4 114 -#define __NR_swapoff 115 -#define __NR_sysinfo 116 -#define __NR_ipc 117 -#define __NR_fsync 118 -#define __NR_sigreturn 119 -#define __NR_clone 120 -#define __NR_setdomainname 121 -#define __NR_uname 122 -#define __NR_cacheflush 123 -#define __NR_adjtimex 124 -#define __NR_mprotect 125 -#define __NR_sigprocmask 126 -#define __NR_create_module 127 -#define __NR_init_module 128 -#define __NR_delete_module 129 -#define __NR_get_kernel_syms 130 -#define __NR_quotactl 131 -#define __NR_getpgid 132 -#define __NR_fchdir 133 -#define __NR_bdflush 134 -#define __NR_sysfs 135 -#define __NR_personality 136 -#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ -#define __NR_setfsuid 138 -#define __NR_setfsgid 139 -#define __NR__llseek 140 -#define __NR_getdents 141 -#define __NR__newselect 142 -#define __NR_flock 143 -#define __NR_msync 144 -#define __NR_readv 145 -#define __NR_writev 146 -#define __NR_getsid 147 -#define __NR_fdatasync 148 -#define __NR__sysctl 149 -#define __NR_mlock 150 -#define __NR_munlock 151 -#define __NR_mlockall 152 -#define __NR_munlockall 153 -#define __NR_sched_setparam 154 -#define __NR_sched_getparam 155 -#define __NR_sched_setscheduler 156 -#define __NR_sched_getscheduler 157 -#define __NR_sched_yield 158 -#define __NR_sched_get_priority_max 159 -#define __NR_sched_get_priority_min 160 -#define __NR_sched_rr_get_interval 161 -#define __NR_nanosleep 162 -#define __NR_mremap 163 -#define __NR_setresuid 164 -#define __NR_getresuid 165 -#define __NR_getpagesize 166 -#define __NR_query_module 167 -#define __NR_poll 168 -#define __NR_nfsservctl 169 -#define __NR_setresgid 170 -#define __NR_getresgid 171 -#define __NR_prctl 172 -#define __NR_rt_sigreturn 173 -#define __NR_rt_sigaction 174 -#define __NR_rt_sigprocmask 175 -#define __NR_rt_sigpending 176 -#define __NR_rt_sigtimedwait 177 -#define __NR_rt_sigqueueinfo 178 -#define __NR_rt_sigsuspend 179 -#define __NR_pread64 180 -#define __NR_pwrite64 181 -#define __NR_lchown 182 -#define __NR_getcwd 183 -#define __NR_capget 184 -#define __NR_capset 185 -#define __NR_sigaltstack 186 -#define __NR_sendfile 187 -#define __NR_getpmsg 188 /* some people actually want streams */ -#define __NR_putpmsg 189 /* some people actually want streams */ -#define __NR_vfork 190 -#define __NR_ugetrlimit 191 -#define __NR_mmap2 192 -#define __NR_truncate64 193 -#define __NR_ftruncate64 194 -#define __NR_stat64 195 -#define __NR_lstat64 196 -#define __NR_fstat64 197 -#define __NR_chown32 198 -#define __NR_getuid32 199 -#define __NR_getgid32 200 -#define __NR_geteuid32 201 -#define __NR_getegid32 202 -#define __NR_setreuid32 203 -#define __NR_setregid32 204 -#define __NR_getgroups32 205 -#define __NR_setgroups32 206 -#define __NR_fchown32 207 -#define __NR_setresuid32 208 -#define __NR_getresuid32 209 -#define __NR_setresgid32 210 -#define __NR_getresgid32 211 -#define __NR_lchown32 212 -#define __NR_setuid32 213 -#define __NR_setgid32 214 -#define __NR_setfsuid32 215 -#define __NR_setfsgid32 216 -#define __NR_pivot_root 217 -#define __NR_getdents64 220 -#define __NR_gettid 221 -#define __NR_tkill 222 -#define __NR_setxattr 223 -#define __NR_lsetxattr 224 -#define __NR_fsetxattr 225 -#define __NR_getxattr 226 -#define __NR_lgetxattr 227 -#define __NR_fgetxattr 228 -#define __NR_listxattr 229 -#define __NR_llistxattr 230 -#define __NR_flistxattr 231 -#define __NR_removexattr 232 -#define __NR_lremovexattr 233 -#define __NR_fremovexattr 234 -#define __NR_futex 235 -#define __NR_sendfile64 236 -#define __NR_mincore 237 -#define __NR_madvise 238 -#define __NR_fcntl64 239 -#define __NR_readahead 240 -#define __NR_io_setup 241 -#define __NR_io_destroy 242 -#define __NR_io_getevents 243 -#define __NR_io_submit 244 -#define __NR_io_cancel 245 -#define __NR_fadvise64 246 -#define __NR_exit_group 247 -#define __NR_lookup_dcookie 248 -#define __NR_epoll_create 249 -#define __NR_epoll_ctl 250 -#define __NR_epoll_wait 251 -#define __NR_remap_file_pages 252 -#define __NR_set_tid_address 253 -#define __NR_timer_create 254 -#define __NR_timer_settime 255 -#define __NR_timer_gettime 256 -#define __NR_timer_getoverrun 257 -#define __NR_timer_delete 258 -#define __NR_clock_settime 259 -#define __NR_clock_gettime 260 -#define __NR_clock_getres 261 -#define __NR_clock_nanosleep 262 -#define __NR_statfs64 263 -#define __NR_fstatfs64 264 -#define __NR_tgkill 265 -#define __NR_utimes 266 -#define __NR_fadvise64_64 267 -#define __NR_mbind 268 -#define __NR_get_mempolicy 269 -#define __NR_set_mempolicy 270 -#define __NR_mq_open 271 -#define __NR_mq_unlink 272 -#define __NR_mq_timedsend 273 -#define __NR_mq_timedreceive 274 -#define __NR_mq_notify 275 -#define __NR_mq_getsetattr 276 -#define __NR_waitid 277 -#define __NR_vserver 278 -#define __NR_add_key 279 -#define __NR_request_key 280 -#define __NR_keyctl 281 -#define __NR_ioprio_set 282 -#define __NR_ioprio_get 283 -#define __NR_inotify_init 284 -#define __NR_inotify_add_watch 285 -#define __NR_inotify_rm_watch 286 -#define __NR_migrate_pages 287 -#define __NR_openat 288 -#define __NR_mkdirat 289 -#define __NR_mknodat 290 -#define __NR_fchownat 291 -#define __NR_futimesat 292 -#define __NR_fstatat64 293 -#define __NR_unlinkat 294 -#define __NR_renameat 295 -#define __NR_linkat 296 -#define __NR_symlinkat 297 -#define __NR_readlinkat 298 -#define __NR_fchmodat 299 -#define __NR_faccessat 300 -#define __NR_pselect6 301 -#define __NR_ppoll 302 -#define __NR_unshare 303 -#define __NR_set_robust_list 304 -#define __NR_get_robust_list 305 -#define __NR_splice 306 -#define __NR_sync_file_range 307 -#define __NR_tee 308 -#define __NR_vmsplice 309 -#define __NR_move_pages 310 -#define __NR_sched_setaffinity 311 -#define __NR_sched_getaffinity 312 -#define __NR_kexec_load 313 -#define __NR_getcpu 314 -#define __NR_epoll_pwait 315 -#define __NR_utimensat 316 -#define __NR_signalfd 317 -#define __NR_timerfd_create 318 -#define __NR_eventfd 319 -#define __NR_fallocate 320 -#define __NR_timerfd_settime 321 -#define __NR_timerfd_gettime 322 -#define __NR_signalfd4 323 -#define __NR_eventfd2 324 -#define __NR_epoll_create1 325 -#define __NR_dup3 326 -#define __NR_pipe2 327 -#define __NR_inotify_init1 328 - -#ifdef __KERNEL__ - -#define NR_syscalls 329 - -#define __ARCH_WANT_IPC_PARSE_VERSION -#define __ARCH_WANT_OLD_READDIR -#define __ARCH_WANT_OLD_STAT -#define __ARCH_WANT_STAT64 -#define __ARCH_WANT_SYS_ALARM -#define __ARCH_WANT_SYS_GETHOSTNAME -#define __ARCH_WANT_SYS_PAUSE -#define __ARCH_WANT_SYS_SGETMASK -#define __ARCH_WANT_SYS_SIGNAL -#define __ARCH_WANT_SYS_TIME -#define __ARCH_WANT_SYS_UTIME -#define __ARCH_WANT_SYS_WAITPID -#define __ARCH_WANT_SYS_SOCKETCALL -#define __ARCH_WANT_SYS_FADVISE64 -#define __ARCH_WANT_SYS_GETPGRP -#define __ARCH_WANT_SYS_LLSEEK -#define __ARCH_WANT_SYS_NICE -#define __ARCH_WANT_SYS_OLD_GETRLIMIT -#define __ARCH_WANT_SYS_OLDUMOUNT -#define __ARCH_WANT_SYS_SIGPENDING -#define __ARCH_WANT_SYS_SIGPROCMASK -#define __ARCH_WANT_SYS_RT_SIGACTION - -/* - * "Conditional" syscalls - * - * What we want is __attribute__((weak,alias("sys_ni_syscall"))), - * but it doesn't work on all toolchains, so we just do it by hand - */ -#define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") - -#endif /* __KERNEL__ */ -#endif /* _ASM_M68K_UNISTD_H_ */ +#ifdef __uClinux__ +#include "unistd_no.h" +#else +#include "unistd_mm.h" +#endif diff --git a/trunk/arch/m68k/include/asm/unistd_mm.h b/trunk/arch/m68k/include/asm/unistd_mm.h new file mode 100644 index 000000000000..3c19027331fa --- /dev/null +++ b/trunk/arch/m68k/include/asm/unistd_mm.h @@ -0,0 +1,372 @@ +#ifndef _ASM_M68K_UNISTD_H_ +#define _ASM_M68K_UNISTD_H_ + +/* + * This file contains the system call numbers. + */ + +#define __NR_restart_syscall 0 +#define __NR_exit 1 +#define __NR_fork 2 +#define __NR_read 3 +#define __NR_write 4 +#define __NR_open 5 +#define __NR_close 6 +#define __NR_waitpid 7 +#define __NR_creat 8 +#define __NR_link 9 +#define __NR_unlink 10 +#define __NR_execve 11 +#define __NR_chdir 12 +#define __NR_time 13 +#define __NR_mknod 14 +#define __NR_chmod 15 +#define __NR_chown 16 +#define __NR_break 17 +#define __NR_oldstat 18 +#define __NR_lseek 19 +#define __NR_getpid 20 +#define __NR_mount 21 +#define __NR_umount 22 +#define __NR_setuid 23 +#define __NR_getuid 24 +#define __NR_stime 25 +#define __NR_ptrace 26 +#define __NR_alarm 27 +#define __NR_oldfstat 28 +#define __NR_pause 29 +#define __NR_utime 30 +#define __NR_stty 31 +#define __NR_gtty 32 +#define __NR_access 33 +#define __NR_nice 34 +#define __NR_ftime 35 +#define __NR_sync 36 +#define __NR_kill 37 +#define __NR_rename 38 +#define __NR_mkdir 39 +#define __NR_rmdir 40 +#define __NR_dup 41 +#define __NR_pipe 42 +#define __NR_times 43 +#define __NR_prof 44 +#define __NR_brk 45 +#define __NR_setgid 46 +#define __NR_getgid 47 +#define __NR_signal 48 +#define __NR_geteuid 49 +#define __NR_getegid 50 +#define __NR_acct 51 +#define __NR_umount2 52 +#define __NR_lock 53 +#define __NR_ioctl 54 +#define __NR_fcntl 55 +#define __NR_mpx 56 +#define __NR_setpgid 57 +#define __NR_ulimit 58 +#define __NR_oldolduname 59 +#define __NR_umask 60 +#define __NR_chroot 61 +#define __NR_ustat 62 +#define __NR_dup2 63 +#define __NR_getppid 64 +#define __NR_getpgrp 65 +#define __NR_setsid 66 +#define __NR_sigaction 67 +#define __NR_sgetmask 68 +#define __NR_ssetmask 69 +#define __NR_setreuid 70 +#define __NR_setregid 71 +#define __NR_sigsuspend 72 +#define __NR_sigpending 73 +#define __NR_sethostname 74 +#define __NR_setrlimit 75 +#define __NR_getrlimit 76 +#define __NR_getrusage 77 +#define __NR_gettimeofday 78 +#define __NR_settimeofday 79 +#define __NR_getgroups 80 +#define __NR_setgroups 81 +#define __NR_select 82 +#define __NR_symlink 83 +#define __NR_oldlstat 84 +#define __NR_readlink 85 +#define __NR_uselib 86 +#define __NR_swapon 87 +#define __NR_reboot 88 +#define __NR_readdir 89 +#define __NR_mmap 90 +#define __NR_munmap 91 +#define __NR_truncate 92 +#define __NR_ftruncate 93 +#define __NR_fchmod 94 +#define __NR_fchown 95 +#define __NR_getpriority 96 +#define __NR_setpriority 97 +#define __NR_profil 98 +#define __NR_statfs 99 +#define __NR_fstatfs 100 +#define __NR_ioperm 101 +#define __NR_socketcall 102 +#define __NR_syslog 103 +#define __NR_setitimer 104 +#define __NR_getitimer 105 +#define __NR_stat 106 +#define __NR_lstat 107 +#define __NR_fstat 108 +#define __NR_olduname 109 +#define __NR_iopl /* 110 */ not supported +#define __NR_vhangup 111 +#define __NR_idle /* 112 */ Obsolete +#define __NR_vm86 /* 113 */ not supported +#define __NR_wait4 114 +#define __NR_swapoff 115 +#define __NR_sysinfo 116 +#define __NR_ipc 117 +#define __NR_fsync 118 +#define __NR_sigreturn 119 +#define __NR_clone 120 +#define __NR_setdomainname 121 +#define __NR_uname 122 +#define __NR_cacheflush 123 +#define __NR_adjtimex 124 +#define __NR_mprotect 125 +#define __NR_sigprocmask 126 +#define __NR_create_module 127 +#define __NR_init_module 128 +#define __NR_delete_module 129 +#define __NR_get_kernel_syms 130 +#define __NR_quotactl 131 +#define __NR_getpgid 132 +#define __NR_fchdir 133 +#define __NR_bdflush 134 +#define __NR_sysfs 135 +#define __NR_personality 136 +#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ +#define __NR_setfsuid 138 +#define __NR_setfsgid 139 +#define __NR__llseek 140 +#define __NR_getdents 141 +#define __NR__newselect 142 +#define __NR_flock 143 +#define __NR_msync 144 +#define __NR_readv 145 +#define __NR_writev 146 +#define __NR_getsid 147 +#define __NR_fdatasync 148 +#define __NR__sysctl 149 +#define __NR_mlock 150 +#define __NR_munlock 151 +#define __NR_mlockall 152 +#define __NR_munlockall 153 +#define __NR_sched_setparam 154 +#define __NR_sched_getparam 155 +#define __NR_sched_setscheduler 156 +#define __NR_sched_getscheduler 157 +#define __NR_sched_yield 158 +#define __NR_sched_get_priority_max 159 +#define __NR_sched_get_priority_min 160 +#define __NR_sched_rr_get_interval 161 +#define __NR_nanosleep 162 +#define __NR_mremap 163 +#define __NR_setresuid 164 +#define __NR_getresuid 165 +#define __NR_getpagesize 166 +#define __NR_query_module 167 +#define __NR_poll 168 +#define __NR_nfsservctl 169 +#define __NR_setresgid 170 +#define __NR_getresgid 171 +#define __NR_prctl 172 +#define __NR_rt_sigreturn 173 +#define __NR_rt_sigaction 174 +#define __NR_rt_sigprocmask 175 +#define __NR_rt_sigpending 176 +#define __NR_rt_sigtimedwait 177 +#define __NR_rt_sigqueueinfo 178 +#define __NR_rt_sigsuspend 179 +#define __NR_pread64 180 +#define __NR_pwrite64 181 +#define __NR_lchown 182 +#define __NR_getcwd 183 +#define __NR_capget 184 +#define __NR_capset 185 +#define __NR_sigaltstack 186 +#define __NR_sendfile 187 +#define __NR_getpmsg 188 /* some people actually want streams */ +#define __NR_putpmsg 189 /* some people actually want streams */ +#define __NR_vfork 190 +#define __NR_ugetrlimit 191 +#define __NR_mmap2 192 +#define __NR_truncate64 193 +#define __NR_ftruncate64 194 +#define __NR_stat64 195 +#define __NR_lstat64 196 +#define __NR_fstat64 197 +#define __NR_chown32 198 +#define __NR_getuid32 199 +#define __NR_getgid32 200 +#define __NR_geteuid32 201 +#define __NR_getegid32 202 +#define __NR_setreuid32 203 +#define __NR_setregid32 204 +#define __NR_getgroups32 205 +#define __NR_setgroups32 206 +#define __NR_fchown32 207 +#define __NR_setresuid32 208 +#define __NR_getresuid32 209 +#define __NR_setresgid32 210 +#define __NR_getresgid32 211 +#define __NR_lchown32 212 +#define __NR_setuid32 213 +#define __NR_setgid32 214 +#define __NR_setfsuid32 215 +#define __NR_setfsgid32 216 +#define __NR_pivot_root 217 +#define __NR_getdents64 220 +#define __NR_gettid 221 +#define __NR_tkill 222 +#define __NR_setxattr 223 +#define __NR_lsetxattr 224 +#define __NR_fsetxattr 225 +#define __NR_getxattr 226 +#define __NR_lgetxattr 227 +#define __NR_fgetxattr 228 +#define __NR_listxattr 229 +#define __NR_llistxattr 230 +#define __NR_flistxattr 231 +#define __NR_removexattr 232 +#define __NR_lremovexattr 233 +#define __NR_fremovexattr 234 +#define __NR_futex 235 +#define __NR_sendfile64 236 +#define __NR_mincore 237 +#define __NR_madvise 238 +#define __NR_fcntl64 239 +#define __NR_readahead 240 +#define __NR_io_setup 241 +#define __NR_io_destroy 242 +#define __NR_io_getevents 243 +#define __NR_io_submit 244 +#define __NR_io_cancel 245 +#define __NR_fadvise64 246 +#define __NR_exit_group 247 +#define __NR_lookup_dcookie 248 +#define __NR_epoll_create 249 +#define __NR_epoll_ctl 250 +#define __NR_epoll_wait 251 +#define __NR_remap_file_pages 252 +#define __NR_set_tid_address 253 +#define __NR_timer_create 254 +#define __NR_timer_settime 255 +#define __NR_timer_gettime 256 +#define __NR_timer_getoverrun 257 +#define __NR_timer_delete 258 +#define __NR_clock_settime 259 +#define __NR_clock_gettime 260 +#define __NR_clock_getres 261 +#define __NR_clock_nanosleep 262 +#define __NR_statfs64 263 +#define __NR_fstatfs64 264 +#define __NR_tgkill 265 +#define __NR_utimes 266 +#define __NR_fadvise64_64 267 +#define __NR_mbind 268 +#define __NR_get_mempolicy 269 +#define __NR_set_mempolicy 270 +#define __NR_mq_open 271 +#define __NR_mq_unlink 272 +#define __NR_mq_timedsend 273 +#define __NR_mq_timedreceive 274 +#define __NR_mq_notify 275 +#define __NR_mq_getsetattr 276 +#define __NR_waitid 277 +#define __NR_vserver 278 +#define __NR_add_key 279 +#define __NR_request_key 280 +#define __NR_keyctl 281 +#define __NR_ioprio_set 282 +#define __NR_ioprio_get 283 +#define __NR_inotify_init 284 +#define __NR_inotify_add_watch 285 +#define __NR_inotify_rm_watch 286 +#define __NR_migrate_pages 287 +#define __NR_openat 288 +#define __NR_mkdirat 289 +#define __NR_mknodat 290 +#define __NR_fchownat 291 +#define __NR_futimesat 292 +#define __NR_fstatat64 293 +#define __NR_unlinkat 294 +#define __NR_renameat 295 +#define __NR_linkat 296 +#define __NR_symlinkat 297 +#define __NR_readlinkat 298 +#define __NR_fchmodat 299 +#define __NR_faccessat 300 +#define __NR_pselect6 301 +#define __NR_ppoll 302 +#define __NR_unshare 303 +#define __NR_set_robust_list 304 +#define __NR_get_robust_list 305 +#define __NR_splice 306 +#define __NR_sync_file_range 307 +#define __NR_tee 308 +#define __NR_vmsplice 309 +#define __NR_move_pages 310 +#define __NR_sched_setaffinity 311 +#define __NR_sched_getaffinity 312 +#define __NR_kexec_load 313 +#define __NR_getcpu 314 +#define __NR_epoll_pwait 315 +#define __NR_utimensat 316 +#define __NR_signalfd 317 +#define __NR_timerfd_create 318 +#define __NR_eventfd 319 +#define __NR_fallocate 320 +#define __NR_timerfd_settime 321 +#define __NR_timerfd_gettime 322 +#define __NR_signalfd4 323 +#define __NR_eventfd2 324 +#define __NR_epoll_create1 325 +#define __NR_dup3 326 +#define __NR_pipe2 327 +#define __NR_inotify_init1 328 + +#ifdef __KERNEL__ + +#define NR_syscalls 329 + +#define __ARCH_WANT_IPC_PARSE_VERSION +#define __ARCH_WANT_OLD_READDIR +#define __ARCH_WANT_OLD_STAT +#define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SYS_ALARM +#define __ARCH_WANT_SYS_GETHOSTNAME +#define __ARCH_WANT_SYS_PAUSE +#define __ARCH_WANT_SYS_SGETMASK +#define __ARCH_WANT_SYS_SIGNAL +#define __ARCH_WANT_SYS_TIME +#define __ARCH_WANT_SYS_UTIME +#define __ARCH_WANT_SYS_WAITPID +#define __ARCH_WANT_SYS_SOCKETCALL +#define __ARCH_WANT_SYS_FADVISE64 +#define __ARCH_WANT_SYS_GETPGRP +#define __ARCH_WANT_SYS_LLSEEK +#define __ARCH_WANT_SYS_NICE +#define __ARCH_WANT_SYS_OLD_GETRLIMIT +#define __ARCH_WANT_SYS_OLDUMOUNT +#define __ARCH_WANT_SYS_SIGPENDING +#define __ARCH_WANT_SYS_SIGPROCMASK +#define __ARCH_WANT_SYS_RT_SIGACTION + +/* + * "Conditional" syscalls + * + * What we want is __attribute__((weak,alias("sys_ni_syscall"))), + * but it doesn't work on all toolchains, so we just do it by hand + */ +#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/trunk/arch/m68k/include/asm/unistd_no.h b/trunk/arch/m68k/include/asm/unistd_no.h new file mode 100644 index 000000000000..b034a2f7b444 --- /dev/null +++ b/trunk/arch/m68k/include/asm/unistd_no.h @@ -0,0 +1,372 @@ +#ifndef _ASM_M68K_UNISTD_H_ +#define _ASM_M68K_UNISTD_H_ + +/* + * This file contains the system call numbers. + */ + +#define __NR_restart_syscall 0 +#define __NR_exit 1 +#define __NR_fork 2 +#define __NR_read 3 +#define __NR_write 4 +#define __NR_open 5 +#define __NR_close 6 +#define __NR_waitpid 7 +#define __NR_creat 8 +#define __NR_link 9 +#define __NR_unlink 10 +#define __NR_execve 11 +#define __NR_chdir 12 +#define __NR_time 13 +#define __NR_mknod 14 +#define __NR_chmod 15 +#define __NR_chown 16 +#define __NR_break 17 +#define __NR_oldstat 18 +#define __NR_lseek 19 +#define __NR_getpid 20 +#define __NR_mount 21 +#define __NR_umount 22 +#define __NR_setuid 23 +#define __NR_getuid 24 +#define __NR_stime 25 +#define __NR_ptrace 26 +#define __NR_alarm 27 +#define __NR_oldfstat 28 +#define __NR_pause 29 +#define __NR_utime 30 +#define __NR_stty 31 +#define __NR_gtty 32 +#define __NR_access 33 +#define __NR_nice 34 +#define __NR_ftime 35 +#define __NR_sync 36 +#define __NR_kill 37 +#define __NR_rename 38 +#define __NR_mkdir 39 +#define __NR_rmdir 40 +#define __NR_dup 41 +#define __NR_pipe 42 +#define __NR_times 43 +#define __NR_prof 44 +#define __NR_brk 45 +#define __NR_setgid 46 +#define __NR_getgid 47 +#define __NR_signal 48 +#define __NR_geteuid 49 +#define __NR_getegid 50 +#define __NR_acct 51 +#define __NR_umount2 52 +#define __NR_lock 53 +#define __NR_ioctl 54 +#define __NR_fcntl 55 +#define __NR_mpx 56 +#define __NR_setpgid 57 +#define __NR_ulimit 58 +#define __NR_oldolduname 59 +#define __NR_umask 60 +#define __NR_chroot 61 +#define __NR_ustat 62 +#define __NR_dup2 63 +#define __NR_getppid 64 +#define __NR_getpgrp 65 +#define __NR_setsid 66 +#define __NR_sigaction 67 +#define __NR_sgetmask 68 +#define __NR_ssetmask 69 +#define __NR_setreuid 70 +#define __NR_setregid 71 +#define __NR_sigsuspend 72 +#define __NR_sigpending 73 +#define __NR_sethostname 74 +#define __NR_setrlimit 75 +#define __NR_getrlimit 76 +#define __NR_getrusage 77 +#define __NR_gettimeofday 78 +#define __NR_settimeofday 79 +#define __NR_getgroups 80 +#define __NR_setgroups 81 +#define __NR_select 82 +#define __NR_symlink 83 +#define __NR_oldlstat 84 +#define __NR_readlink 85 +#define __NR_uselib 86 +#define __NR_swapon 87 +#define __NR_reboot 88 +#define __NR_readdir 89 +#define __NR_mmap 90 +#define __NR_munmap 91 +#define __NR_truncate 92 +#define __NR_ftruncate 93 +#define __NR_fchmod 94 +#define __NR_fchown 95 +#define __NR_getpriority 96 +#define __NR_setpriority 97 +#define __NR_profil 98 +#define __NR_statfs 99 +#define __NR_fstatfs 100 +#define __NR_ioperm 101 +#define __NR_socketcall 102 +#define __NR_syslog 103 +#define __NR_setitimer 104 +#define __NR_getitimer 105 +#define __NR_stat 106 +#define __NR_lstat 107 +#define __NR_fstat 108 +#define __NR_olduname 109 +#define __NR_iopl /* 110 */ not supported +#define __NR_vhangup 111 +#define __NR_idle /* 112 */ Obsolete +#define __NR_vm86 /* 113 */ not supported +#define __NR_wait4 114 +#define __NR_swapoff 115 +#define __NR_sysinfo 116 +#define __NR_ipc 117 +#define __NR_fsync 118 +#define __NR_sigreturn 119 +#define __NR_clone 120 +#define __NR_setdomainname 121 +#define __NR_uname 122 +#define __NR_cacheflush 123 +#define __NR_adjtimex 124 +#define __NR_mprotect 125 +#define __NR_sigprocmask 126 +#define __NR_create_module 127 +#define __NR_init_module 128 +#define __NR_delete_module 129 +#define __NR_get_kernel_syms 130 +#define __NR_quotactl 131 +#define __NR_getpgid 132 +#define __NR_fchdir 133 +#define __NR_bdflush 134 +#define __NR_sysfs 135 +#define __NR_personality 136 +#define __NR_afs_syscall 137 /* Syscall for Andrew File System */ +#define __NR_setfsuid 138 +#define __NR_setfsgid 139 +#define __NR__llseek 140 +#define __NR_getdents 141 +#define __NR__newselect 142 +#define __NR_flock 143 +#define __NR_msync 144 +#define __NR_readv 145 +#define __NR_writev 146 +#define __NR_getsid 147 +#define __NR_fdatasync 148 +#define __NR__sysctl 149 +#define __NR_mlock 150 +#define __NR_munlock 151 +#define __NR_mlockall 152 +#define __NR_munlockall 153 +#define __NR_sched_setparam 154 +#define __NR_sched_getparam 155 +#define __NR_sched_setscheduler 156 +#define __NR_sched_getscheduler 157 +#define __NR_sched_yield 158 +#define __NR_sched_get_priority_max 159 +#define __NR_sched_get_priority_min 160 +#define __NR_sched_rr_get_interval 161 +#define __NR_nanosleep 162 +#define __NR_mremap 163 +#define __NR_setresuid 164 +#define __NR_getresuid 165 +#define __NR_getpagesize 166 +#define __NR_query_module 167 +#define __NR_poll 168 +#define __NR_nfsservctl 169 +#define __NR_setresgid 170 +#define __NR_getresgid 171 +#define __NR_prctl 172 +#define __NR_rt_sigreturn 173 +#define __NR_rt_sigaction 174 +#define __NR_rt_sigprocmask 175 +#define __NR_rt_sigpending 176 +#define __NR_rt_sigtimedwait 177 +#define __NR_rt_sigqueueinfo 178 +#define __NR_rt_sigsuspend 179 +#define __NR_pread64 180 +#define __NR_pwrite64 181 +#define __NR_lchown 182 +#define __NR_getcwd 183 +#define __NR_capget 184 +#define __NR_capset 185 +#define __NR_sigaltstack 186 +#define __NR_sendfile 187 +#define __NR_getpmsg 188 /* some people actually want streams */ +#define __NR_putpmsg 189 /* some people actually want streams */ +#define __NR_vfork 190 +#define __NR_ugetrlimit 191 +#define __NR_mmap2 192 +#define __NR_truncate64 193 +#define __NR_ftruncate64 194 +#define __NR_stat64 195 +#define __NR_lstat64 196 +#define __NR_fstat64 197 +#define __NR_chown32 198 +#define __NR_getuid32 199 +#define __NR_getgid32 200 +#define __NR_geteuid32 201 +#define __NR_getegid32 202 +#define __NR_setreuid32 203 +#define __NR_setregid32 204 +#define __NR_getgroups32 205 +#define __NR_setgroups32 206 +#define __NR_fchown32 207 +#define __NR_setresuid32 208 +#define __NR_getresuid32 209 +#define __NR_setresgid32 210 +#define __NR_getresgid32 211 +#define __NR_lchown32 212 +#define __NR_setuid32 213 +#define __NR_setgid32 214 +#define __NR_setfsuid32 215 +#define __NR_setfsgid32 216 +#define __NR_pivot_root 217 +#define __NR_getdents64 220 +#define __NR_gettid 221 +#define __NR_tkill 222 +#define __NR_setxattr 223 +#define __NR_lsetxattr 224 +#define __NR_fsetxattr 225 +#define __NR_getxattr 226 +#define __NR_lgetxattr 227 +#define __NR_fgetxattr 228 +#define __NR_listxattr 229 +#define __NR_llistxattr 230 +#define __NR_flistxattr 231 +#define __NR_removexattr 232 +#define __NR_lremovexattr 233 +#define __NR_fremovexattr 234 +#define __NR_futex 235 +#define __NR_sendfile64 236 +#define __NR_mincore 237 +#define __NR_madvise 238 +#define __NR_fcntl64 239 +#define __NR_readahead 240 +#define __NR_io_setup 241 +#define __NR_io_destroy 242 +#define __NR_io_getevents 243 +#define __NR_io_submit 244 +#define __NR_io_cancel 245 +#define __NR_fadvise64 246 +#define __NR_exit_group 247 +#define __NR_lookup_dcookie 248 +#define __NR_epoll_create 249 +#define __NR_epoll_ctl 250 +#define __NR_epoll_wait 251 +#define __NR_remap_file_pages 252 +#define __NR_set_tid_address 253 +#define __NR_timer_create 254 +#define __NR_timer_settime 255 +#define __NR_timer_gettime 256 +#define __NR_timer_getoverrun 257 +#define __NR_timer_delete 258 +#define __NR_clock_settime 259 +#define __NR_clock_gettime 260 +#define __NR_clock_getres 261 +#define __NR_clock_nanosleep 262 +#define __NR_statfs64 263 +#define __NR_fstatfs64 264 +#define __NR_tgkill 265 +#define __NR_utimes 266 +#define __NR_fadvise64_64 267 +#define __NR_mbind 268 +#define __NR_get_mempolicy 269 +#define __NR_set_mempolicy 270 +#define __NR_mq_open 271 +#define __NR_mq_unlink 272 +#define __NR_mq_timedsend 273 +#define __NR_mq_timedreceive 274 +#define __NR_mq_notify 275 +#define __NR_mq_getsetattr 276 +#define __NR_waitid 277 +#define __NR_vserver 278 +#define __NR_add_key 279 +#define __NR_request_key 280 +#define __NR_keyctl 281 +#define __NR_ioprio_set 282 +#define __NR_ioprio_get 283 +#define __NR_inotify_init 284 +#define __NR_inotify_add_watch 285 +#define __NR_inotify_rm_watch 286 +#define __NR_migrate_pages 287 +#define __NR_openat 288 +#define __NR_mkdirat 289 +#define __NR_mknodat 290 +#define __NR_fchownat 291 +#define __NR_futimesat 292 +#define __NR_fstatat64 293 +#define __NR_unlinkat 294 +#define __NR_renameat 295 +#define __NR_linkat 296 +#define __NR_symlinkat 297 +#define __NR_readlinkat 298 +#define __NR_fchmodat 299 +#define __NR_faccessat 300 +#define __NR_pselect6 301 +#define __NR_ppoll 302 +#define __NR_unshare 303 +#define __NR_set_robust_list 304 +#define __NR_get_robust_list 305 +#define __NR_splice 306 +#define __NR_sync_file_range 307 +#define __NR_tee 308 +#define __NR_vmsplice 309 +#define __NR_move_pages 310 +#define __NR_sched_setaffinity 311 +#define __NR_sched_getaffinity 312 +#define __NR_kexec_load 313 +#define __NR_getcpu 314 +#define __NR_epoll_pwait 315 +#define __NR_utimensat 316 +#define __NR_signalfd 317 +#define __NR_timerfd_create 318 +#define __NR_eventfd 319 +#define __NR_fallocate 320 +#define __NR_timerfd_settime 321 +#define __NR_timerfd_gettime 322 +#define __NR_signalfd4 323 +#define __NR_eventfd2 324 +#define __NR_epoll_create1 325 +#define __NR_dup3 326 +#define __NR_pipe2 327 +#define __NR_inotify_init1 328 + +#ifdef __KERNEL__ + +#define NR_syscalls 329 + +#define __ARCH_WANT_IPC_PARSE_VERSION +#define __ARCH_WANT_OLD_READDIR +#define __ARCH_WANT_OLD_STAT +#define __ARCH_WANT_STAT64 +#define __ARCH_WANT_SYS_ALARM +#define __ARCH_WANT_SYS_GETHOSTNAME +#define __ARCH_WANT_SYS_PAUSE +#define __ARCH_WANT_SYS_SGETMASK +#define __ARCH_WANT_SYS_SIGNAL +#define __ARCH_WANT_SYS_TIME +#define __ARCH_WANT_SYS_UTIME +#define __ARCH_WANT_SYS_WAITPID +#define __ARCH_WANT_SYS_SOCKETCALL +#define __ARCH_WANT_SYS_FADVISE64 +#define __ARCH_WANT_SYS_GETPGRP +#define __ARCH_WANT_SYS_LLSEEK +#define __ARCH_WANT_SYS_NICE +#define __ARCH_WANT_SYS_OLD_GETRLIMIT +#define __ARCH_WANT_SYS_OLDUMOUNT +#define __ARCH_WANT_SYS_SIGPENDING +#define __ARCH_WANT_SYS_SIGPROCMASK +#define __ARCH_WANT_SYS_RT_SIGACTION + +/* + * "Conditional" syscalls + * + * What we want is __attribute__((weak,alias("sys_ni_syscall"))), + * but it doesn't work on all toolchains, so we just do it by hand + */ +#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/trunk/arch/powerpc/configs/ps3_defconfig b/trunk/arch/powerpc/configs/ps3_defconfig index ac14f5245d2a..b6eee7c93cdd 100644 --- a/trunk/arch/powerpc/configs/ps3_defconfig +++ b/trunk/arch/powerpc/configs/ps3_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.29-rc8 -# Fri Mar 13 09:28:45 2009 +# Linux kernel version: 2.6.27-rc3 +# Wed Aug 20 08:16:53 2008 # CONFIG_PPC64=y @@ -16,14 +16,13 @@ CONFIG_PPC_FPU=y CONFIG_ALTIVEC=y # CONFIG_VSX is not set CONFIG_PPC_STD_MMU=y -CONFIG_PPC_STD_MMU_64=y CONFIG_PPC_MM_SLICES=y CONFIG_VIRT_CPU_ACCOUNTING=y CONFIG_SMP=y CONFIG_NR_CPUS=2 CONFIG_64BIT=y CONFIG_WORD_SIZE=64 -CONFIG_ARCH_PHYS_ADDR_T_64BIT=y +CONFIG_PPC_MERGE=y CONFIG_MMU=y CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_GENERIC_TIME=y @@ -47,7 +46,7 @@ CONFIG_PPC=y CONFIG_EARLY_PRINTK=y CONFIG_COMPAT=y CONFIG_SYSVIPC_COMPAT=y -CONFIG_SCHED_OMIT_FRAME_POINTER=y +CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_PPC_OF=y CONFIG_OF=y @@ -75,19 +74,10 @@ CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set # CONFIG_AUDIT is not set - -# -# RCU Subsystem -# -CONFIG_CLASSIC_RCU=y -# CONFIG_TREE_RCU is not set -# CONFIG_PREEMPT_RCU is not set -# CONFIG_TREE_RCU_TRACE is not set -# CONFIG_PREEMPT_RCU_TRACE is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=17 -# CONFIG_GROUP_SCHED is not set # CONFIG_CGROUPS is not set +# CONFIG_GROUP_SCHED is not set CONFIG_SYSFS_DEPRECATED=y CONFIG_SYSFS_DEPRECATED_V2=y # CONFIG_RELAY is not set @@ -96,13 +86,11 @@ CONFIG_NAMESPACES=y # CONFIG_IPC_NS is not set # CONFIG_USER_NS is not set # CONFIG_PID_NS is not set -# CONFIG_NET_NS is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y -CONFIG_ANON_INODES=y -CONFIG_EMBEDDED=y +# CONFIG_EMBEDDED is not set CONFIG_SYSCTL_SYSCALL=y CONFIG_KALLSYMS=y CONFIG_KALLSYMS_ALL=y @@ -111,36 +99,37 @@ CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y +# CONFIG_COMPAT_BRK is not set CONFIG_BASE_FULL=y CONFIG_FUTEX=y +CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -CONFIG_AIO=y CONFIG_VM_EVENT_COUNTERS=y -# CONFIG_COMPAT_BRK is not set CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set CONFIG_PROFILING=y -CONFIG_TRACEPOINTS=y -CONFIG_MARKERS=y +# CONFIG_MARKERS is not set CONFIG_OPROFILE=m CONFIG_HAVE_OPROFILE=y # CONFIG_KPROBES is not set CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y -CONFIG_HAVE_SYSCALL_WRAPPERS=y CONFIG_HAVE_IOREMAP_PROT=y CONFIG_HAVE_KPROBES=y CONFIG_HAVE_KRETPROBES=y CONFIG_HAVE_ARCH_TRACEHOOK=y CONFIG_HAVE_DMA_ATTRS=y CONFIG_USE_GENERIC_SMP_HELPERS=y +# CONFIG_HAVE_CLK is not set +CONFIG_PROC_PAGE_MONITOR=y # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y +# CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 CONFIG_MODULES=y # CONFIG_MODULE_FORCE_LOAD is not set @@ -148,6 +137,7 @@ 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 CONFIG_STOP_MACHINE=y CONFIG_BLOCK=y # CONFIG_BLK_DEV_IO_TRACE is not set @@ -167,7 +157,7 @@ CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="anticipatory" -# CONFIG_FREEZER is not set +CONFIG_CLASSIC_RCU=y # # Platform support @@ -193,20 +183,18 @@ CONFIG_PS3_STORAGE=y CONFIG_PS3_DISK=y CONFIG_PS3_ROM=y CONFIG_PS3_FLASH=y -CONFIG_PS3_VRAM=m +CONFIG_OPROFILE_PS3=y CONFIG_PS3_LPM=m CONFIG_PPC_CELL=y # CONFIG_PPC_CELL_NATIVE is not set # CONFIG_PPC_IBM_CELL_BLADE is not set # CONFIG_PPC_CELLEB is not set -# CONFIG_PPC_CELL_QPACE is not set # # Cell Broadband Engine options # CONFIG_SPU_FS=y CONFIG_SPU_FS_64K_LS=y -# CONFIG_SPU_TRACE is not set CONFIG_SPU_BASE=y # CONFIG_PQ2ADS is not set # CONFIG_IPIC is not set @@ -222,7 +210,6 @@ CONFIG_SPU_BASE=y # CONFIG_GENERIC_IOMAP is not set # CONFIG_CPU_FREQ is not set # CONFIG_FSL_ULI1575 is not set -# CONFIG_SIMPLE_GPIO is not set # # Kernel options @@ -242,8 +229,6 @@ CONFIG_PREEMPT_NONE=y # CONFIG_PREEMPT is not set CONFIG_BINFMT_ELF=y CONFIG_COMPAT_BINFMT_ELF=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set -# CONFIG_HAVE_AOUT is not set CONFIG_BINFMT_MISC=y CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y # CONFIG_IOMMU_VMERGE is not set @@ -266,6 +251,7 @@ CONFIG_SELECT_MEMORY_MODEL=y CONFIG_SPARSEMEM_MANUAL=y CONFIG_SPARSEMEM=y CONFIG_HAVE_MEMORY_PRESENT=y +# CONFIG_SPARSEMEM_STATIC is not set CONFIG_SPARSEMEM_EXTREME=y CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y # CONFIG_SPARSEMEM_VMEMMAP is not set @@ -275,14 +261,11 @@ CONFIG_MEMORY_HOTPLUG_SPARSE=y CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4 CONFIG_MIGRATION=y -CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_RESOURCES_64BIT=y CONFIG_ZONE_DMA_FLAG=1 CONFIG_BOUNCE=y -CONFIG_UNEVICTABLE_LRU=y CONFIG_ARCH_MEMORY_PROBE=y CONFIG_PPC_HAS_HASH_64K=y -CONFIG_PPC_4K_PAGES=y -# CONFIG_PPC_16K_PAGES is not set # CONFIG_PPC_64K_PAGES is not set CONFIG_FORCE_MAX_ZONEORDER=13 CONFIG_SCHED_SMT=y @@ -316,7 +299,6 @@ CONFIG_NET=y # # Networking options # -CONFIG_COMPAT_NET_DEV_OPS=y CONFIG_PACKET=y CONFIG_PACKET_MMAP=y CONFIG_UNIX=y @@ -379,7 +361,6 @@ CONFIG_IPV6_NDISC_NODETYPE=y # CONFIG_TIPC is not set # CONFIG_ATM is not set # CONFIG_BRIDGE is not set -# CONFIG_NET_DSA is not set # CONFIG_VLAN_8021Q is not set # CONFIG_DECNET is not set # CONFIG_LLC2 is not set @@ -390,7 +371,6 @@ CONFIG_IPV6_NDISC_NODETYPE=y # CONFIG_ECONET is not set # CONFIG_WAN_ROUTER is not set # CONFIG_NET_SCHED is not set -# CONFIG_DCB is not set # # Network testing @@ -412,37 +392,39 @@ CONFIG_BT_HIDP=m # # Bluetooth device drivers # -CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIUSB=m +CONFIG_BT_HCIUSB_SCO=y # 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_HCIVHCI is not set # CONFIG_AF_RXRPC is not set -# CONFIG_PHONET is not set -CONFIG_WIRELESS=y + +# +# Wireless +# CONFIG_CFG80211=m -# CONFIG_CFG80211_REG_DEBUG is not set CONFIG_NL80211=y -# CONFIG_WIRELESS_OLD_REGULATORY is not set CONFIG_WIRELESS_EXT=y # CONFIG_WIRELESS_EXT_SYSFS is not set -# CONFIG_LIB80211 is not set CONFIG_MAC80211=m # # Rate control algorithm selection # CONFIG_MAC80211_RC_PID=y -# CONFIG_MAC80211_RC_MINSTREL is not set CONFIG_MAC80211_RC_DEFAULT_PID=y -# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set CONFIG_MAC80211_RC_DEFAULT="pid" # CONFIG_MAC80211_MESH is not set # CONFIG_MAC80211_LEDS is not set # CONFIG_MAC80211_DEBUGFS is not set # CONFIG_MAC80211_DEBUG_MENU is not set -# CONFIG_WIMAX 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_RFKILL is not set # CONFIG_NET_9P is not set @@ -468,7 +450,6 @@ CONFIG_MTD_DEBUG=y CONFIG_MTD_DEBUG_VERBOSE=0 # CONFIG_MTD_CONCAT is not set # CONFIG_MTD_PARTITIONS is not set -# CONFIG_MTD_TESTS is not set # # User Modules And Translation Layers @@ -513,6 +494,7 @@ CONFIG_MTD_CFI_I2=y # # CONFIG_MTD_SLRAM is not set # CONFIG_MTD_PHRAM is not set +CONFIG_MTD_PS3VRAM=y # CONFIG_MTD_MTDRAM is not set # CONFIG_MTD_BLOCK2MTD is not set @@ -525,11 +507,6 @@ CONFIG_MTD_CFI_I2=y # CONFIG_MTD_NAND is not set # CONFIG_MTD_ONENAND is not set -# -# LPDDR flash memory drivers -# -# CONFIG_MTD_LPDDR is not set - # # UBI - Unsorted block images # @@ -551,13 +528,8 @@ CONFIG_BLK_DEV_RAM_SIZE=65535 # CONFIG_ATA_OVER_ETH is not set # CONFIG_BLK_DEV_HD is not set CONFIG_MISC_DEVICES=y -# CONFIG_ENCLOSURE_SERVICES is not set -# CONFIG_C2PORT is not set - -# -# EEPROM support -# # CONFIG_EEPROM_93CX6 is not set +# CONFIG_ENCLOSURE_SERVICES is not set CONFIG_HAVE_IDE=y # CONFIG_IDE is not set @@ -603,17 +575,7 @@ CONFIG_SCSI_WAIT_SCAN=m # CONFIG_SCSI_LOWLEVEL is not set # CONFIG_SCSI_DH is not set # CONFIG_ATA is not set -CONFIG_MD=y -# CONFIG_BLK_DEV_MD is not set -CONFIG_BLK_DEV_DM=m -# CONFIG_DM_DEBUG is not set -# 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_DM_DELAY is not set -# CONFIG_DM_UEVENT is not set +# CONFIG_MD is not set # CONFIG_MACINTOSH_DRIVERS is not set CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set @@ -629,9 +591,6 @@ CONFIG_MII=m # CONFIG_IBM_NEW_EMAC_RGMII is not set # CONFIG_IBM_NEW_EMAC_TAH is not set # CONFIG_IBM_NEW_EMAC_EMAC4 is not set -# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set -# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set -# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set # CONFIG_B44 is not set CONFIG_NETDEV_1000=y CONFIG_GELIC_NET=y @@ -645,7 +604,6 @@ CONFIG_GELIC_WIRELESS_OLD_PSK_INTERFACE=y # CONFIG_WLAN_PRE80211 is not set CONFIG_WLAN_80211=y # CONFIG_LIBERTAS is not set -# CONFIG_LIBERTAS_THINFIRM is not set # CONFIG_USB_ZD1201 is not set # CONFIG_USB_NET_RNDIS_WLAN is not set # CONFIG_RTL8187 is not set @@ -657,11 +615,13 @@ CONFIG_WLAN_80211=y # CONFIG_B43LEGACY is not set CONFIG_ZD1211RW=m # CONFIG_ZD1211RW_DEBUG is not set -# CONFIG_RT2X00 is not set - -# -# Enable WiMAX (Networking options) to see the WiMAX drivers -# +CONFIG_RT2X00=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB_FIRMWARE=y +# CONFIG_RT2500USB is not set +CONFIG_RT73USB=m +# CONFIG_RT2X00_DEBUG is not set # # USB Network Adapters @@ -674,7 +634,6 @@ CONFIG_USB_USBNET=m CONFIG_USB_NET_AX8817X=m # CONFIG_USB_NET_CDCETHER is not set # CONFIG_USB_NET_DM9601 is not set -# CONFIG_USB_NET_SMSC95XX is not set # CONFIG_USB_NET_GL620A is not set # CONFIG_USB_NET_NET1080 is not set # CONFIG_USB_NET_PLUSB is not set @@ -705,7 +664,7 @@ CONFIG_SLHC=m # Input device support # CONFIG_INPUT=y -CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_INPUT_FF_MEMLESS is not set # CONFIG_INPUT_POLLDEV is not set # @@ -776,10 +735,8 @@ CONFIG_DEVKMEM=y # Non-8250 serial port support # CONFIG_UNIX98_PTYS=y -# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=16 -# CONFIG_HVC_UDBG is not set # CONFIG_IPMI_HANDLER is not set # CONFIG_HW_RANDOM is not set # CONFIG_R3964 is not set @@ -796,11 +753,11 @@ CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y # CONFIG_THERMAL is not set # CONFIG_THERMAL_HWMON is not set # CONFIG_WATCHDOG is not set -CONFIG_SSB_POSSIBLE=y # # Sonics Silicon Backplane # +CONFIG_SSB_POSSIBLE=y # CONFIG_SSB is not set # @@ -810,7 +767,6 @@ CONFIG_SSB_POSSIBLE=y # CONFIG_MFD_SM501 is not set # CONFIG_HTC_PASIC3 is not set # CONFIG_MFD_TMIO is not set -# CONFIG_REGULATOR is not set # # Multimedia devices @@ -836,7 +792,6 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m CONFIG_FB=y # CONFIG_FIRMWARE_EDID is not set # CONFIG_FB_DDC is not set -# CONFIG_FB_BOOT_VESA_SUPPORT is not set # CONFIG_FB_CFB_FILLRECT is not set # CONFIG_FB_CFB_COPYAREA is not set # CONFIG_FB_CFB_IMAGEBLIT is not set @@ -862,8 +817,6 @@ CONFIG_FB_SYS_FOPS=y CONFIG_FB_PS3=y CONFIG_FB_PS3_DEFAULT_SIZE_M=9 # CONFIG_FB_VIRTUAL is not set -# CONFIG_FB_METRONOME is not set -# CONFIG_FB_MB862XX is not set # CONFIG_BACKLIGHT_LCD_SUPPORT is not set # @@ -888,7 +841,6 @@ CONFIG_FB_LOGO_EXTRA=y # CONFIG_LOGO_LINUX_VGA16 is not set CONFIG_LOGO_LINUX_CLUT224=y CONFIG_SOUND=m -# CONFIG_SOUND_OSS_CORE is not set CONFIG_SND=m CONFIG_SND_TIMER=m CONFIG_SND_PCM=m @@ -897,7 +849,6 @@ CONFIG_SND_RAWMIDI=m # CONFIG_SND_SEQUENCER is not set # CONFIG_SND_MIXER_OSS is not set # CONFIG_SND_PCM_OSS is not set -# CONFIG_SND_HRTIMER is not set # CONFIG_SND_DYNAMIC_MINORS is not set CONFIG_SND_SUPPORT_OLD_API=y CONFIG_SND_VERBOSE_PROCFS=y @@ -922,40 +873,15 @@ CONFIG_HIDRAW=y # USB Input Devices # CONFIG_USB_HID=m -# CONFIG_HID_PID is not set -CONFIG_USB_HIDDEV=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 - -# -# Special HID drivers -# -# CONFIG_HID_COMPAT is not set -# CONFIG_HID_A4TECH is not set -# CONFIG_HID_APPLE is not set -# CONFIG_HID_BELKIN is not set -# CONFIG_HID_CHERRY is not set -# CONFIG_HID_CHICONY is not set -# CONFIG_HID_CYPRESS is not set -# CONFIG_HID_EZKEY is not set -# CONFIG_HID_GYRATION is not set -# CONFIG_HID_LOGITECH is not set -# CONFIG_HID_MICROSOFT is not set -# CONFIG_HID_MONTEREY is not set -# CONFIG_HID_NTRIG is not set -# CONFIG_HID_PANTHERLORD is not set -# CONFIG_HID_PETALYNX is not set -# CONFIG_HID_SAMSUNG is not set -# CONFIG_HID_SONY is not set -# CONFIG_HID_SUNPLUS is not set -# CONFIG_GREENASIA_FF is not set -# CONFIG_HID_TOPSEED is not set -# CONFIG_THRUSTMASTER_FF is not set -# CONFIG_ZEROPLUS_FF is not set CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y CONFIG_USB_ARCH_HAS_OHCI=y @@ -972,11 +898,7 @@ CONFIG_USB_DEVICEFS=y # CONFIG_USB_DYNAMIC_MINORS is not set CONFIG_USB_SUSPEND=y # CONFIG_USB_OTG is not set -# CONFIG_USB_OTG_WHITELIST is not set -# CONFIG_USB_OTG_BLACKLIST_HUB is not set -CONFIG_USB_MON=m -# CONFIG_USB_WUSB is not set -# CONFIG_USB_WUSB_CBAF is not set +CONFIG_USB_MON=y # # USB Host Controller Drivers @@ -987,7 +909,6 @@ CONFIG_USB_EHCI_HCD=m # CONFIG_USB_EHCI_TT_NEWSCHED is not set CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y # CONFIG_USB_EHCI_HCD_PPC_OF is not set -# CONFIG_USB_OXU210HP_HCD is not set # CONFIG_USB_ISP116X_HCD is not set # CONFIG_USB_ISP1760_HCD is not set CONFIG_USB_OHCI_HCD=m @@ -997,7 +918,6 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y CONFIG_USB_OHCI_LITTLE_ENDIAN=y # CONFIG_USB_SL811_HCD is not set # CONFIG_USB_R8A66597_HCD is not set -# CONFIG_USB_HWA_HCD is not set # # Enable Host or Gadget support to see Inventra options @@ -1009,20 +929,20 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y # CONFIG_USB_ACM is not set # CONFIG_USB_PRINTER is not set # CONFIG_USB_WDM is not set -# CONFIG_USB_TMC is not set # -# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; +# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # # -# see USB_STORAGE Help for more information +# 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 @@ -1030,6 +950,7 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_STORAGE_ALAUDA is not set # CONFIG_USB_STORAGE_ONETOUCH is not set # CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_SIERRA is not set # CONFIG_USB_STORAGE_CYPRESS_ATACB is not set # CONFIG_USB_LIBUSUAL is not set @@ -1050,7 +971,6 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_EMI62 is not set # CONFIG_USB_EMI26 is not set # CONFIG_USB_ADUTUX is not set -# CONFIG_USB_SEVSEG is not set # CONFIG_USB_RIO500 is not set # CONFIG_USB_LEGOTOWER is not set # CONFIG_USB_LCD is not set @@ -1068,12 +988,7 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_IOWARRIOR is not set # CONFIG_USB_TEST is not set # CONFIG_USB_ISIGHTFW is not set -# CONFIG_USB_VST is not set # CONFIG_USB_GADGET is not set - -# -# OTG and related infrastructure -# # CONFIG_MMC is not set # CONFIG_MEMSTICK is not set # CONFIG_NEW_LEDS is not set @@ -1099,15 +1014,12 @@ CONFIG_RTC_INTF_DEV=y # Platform RTC drivers # # CONFIG_RTC_DRV_CMOS is not set -# CONFIG_RTC_DRV_DS1286 is not set # CONFIG_RTC_DRV_DS1511 is not set # CONFIG_RTC_DRV_DS1553 is not set # CONFIG_RTC_DRV_DS1742 is not set # CONFIG_RTC_DRV_STK17TA8 is not set # CONFIG_RTC_DRV_M48T86 is not set -# CONFIG_RTC_DRV_M48T35 is not set # CONFIG_RTC_DRV_M48T59 is not set -# CONFIG_RTC_DRV_BQ4802 is not set # CONFIG_RTC_DRV_V3020 is not set # @@ -1116,7 +1028,6 @@ CONFIG_RTC_INTF_DEV=y CONFIG_RTC_DRV_PPC=m # CONFIG_DMADEVICES is not set # CONFIG_UIO is not set -# CONFIG_STAGING is not set # # File systems @@ -1124,35 +1035,26 @@ CONFIG_RTC_DRV_PPC=m 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=y CONFIG_EXT3_FS_XATTR=y # CONFIG_EXT3_FS_POSIX_ACL is not set # CONFIG_EXT3_FS_SECURITY is not set -CONFIG_EXT4_FS=y -# CONFIG_EXT4DEV_COMPAT is not set -CONFIG_EXT4_FS_XATTR=y -# CONFIG_EXT4_FS_POSIX_ACL is not set -# CONFIG_EXT4_FS_SECURITY is not set -CONFIG_JBD=m +# CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y # CONFIG_JBD_DEBUG is not set -CONFIG_JBD2=y -# CONFIG_JBD2_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_FILE_LOCKING=y # CONFIG_XFS_FS is not set # CONFIG_GFS2_FS is not set # CONFIG_OCFS2_FS is not set -# CONFIG_BTRFS_FS is not set CONFIG_DNOTIFY=y CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y CONFIG_QUOTA=y # CONFIG_QUOTA_NETLINK_INTERFACE is not set CONFIG_PRINT_QUOTA_WARNING=y -CONFIG_QUOTA_TREE=y # CONFIG_QFMT_V1 is not set CONFIG_QFMT_V2=y CONFIG_QUOTACTL=y @@ -1185,14 +1087,16 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y CONFIG_PROC_SYSCTL=y -CONFIG_PROC_PAGE_MONITOR=y CONFIG_SYSFS=y CONFIG_TMPFS=y # CONFIG_TMPFS_POSIX_ACL is not set CONFIG_HUGETLBFS=y CONFIG_HUGETLB_PAGE=y # CONFIG_CONFIGFS_FS is not set -CONFIG_MISC_FILESYSTEMS=y + +# +# Miscellaneous filesystems +# # CONFIG_ADFS_FS is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set @@ -1202,7 +1106,6 @@ CONFIG_MISC_FILESYSTEMS=y # CONFIG_EFS_FS is not set # CONFIG_JFFS2_FS is not set # CONFIG_CRAMFS is not set -# CONFIG_SQUASHFS is not set # CONFIG_VXFS_FS is not set # CONFIG_MINIX_FS is not set # CONFIG_OMFS_FS is not set @@ -1223,7 +1126,6 @@ CONFIG_LOCKD_V4=y CONFIG_NFS_COMMON=y CONFIG_SUNRPC=y CONFIG_SUNRPC_GSS=y -# CONFIG_SUNRPC_REGISTER_V4 is not set CONFIG_RPCSEC_GSS_KRB5=y # CONFIG_RPCSEC_GSS_SPKM3 is not set # CONFIG_SMB_FS is not set @@ -1288,9 +1190,9 @@ CONFIG_NLS_ISO8859_1=y # Library routines # CONFIG_BITREVERSE=y -CONFIG_GENERIC_FIND_LAST_BIT=y +# CONFIG_GENERIC_FIND_FIRST_BIT is not set CONFIG_CRC_CCITT=m -CONFIG_CRC16=y +# CONFIG_CRC16 is not set CONFIG_CRC_T10DIF=y CONFIG_CRC_ITU_T=m CONFIG_CRC32=y @@ -1348,44 +1250,27 @@ CONFIG_DEBUG_WRITECOUNT=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DEBUG_LIST=y # CONFIG_DEBUG_SG is not set -# CONFIG_DEBUG_NOTIFIERS is not set +CONFIG_FRAME_POINTER=y # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_RCU_CPU_STALL_DETECTOR is not set # CONFIG_BACKTRACE_SELF_TEST is not set -# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set # CONFIG_FAULT_INJECTION is not set # CONFIG_LATENCYTOP is not set CONFIG_SYSCTL_SYSCALL_CHECK=y -CONFIG_NOP_TRACER=y -CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FTRACE=y CONFIG_HAVE_DYNAMIC_FTRACE=y -CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y -CONFIG_RING_BUFFER=y -CONFIG_TRACING=y - -# -# Tracers -# -# CONFIG_FUNCTION_TRACER is not set +# CONFIG_FTRACE is not set # CONFIG_IRQSOFF_TRACER is not set # CONFIG_SCHED_TRACER is not set # CONFIG_CONTEXT_SWITCH_TRACER is not set -# CONFIG_BOOT_TRACER is not set -# CONFIG_TRACE_BRANCH_PROFILING is not set -# CONFIG_STACK_TRACER is not set -# CONFIG_FTRACE_STARTUP_TEST is not set -# CONFIG_DYNAMIC_PRINTK_DEBUG is not set # CONFIG_SAMPLES is not set CONFIG_HAVE_ARCH_KGDB=y # CONFIG_KGDB is not set -CONFIG_PRINT_STACK_DEPTH=64 CONFIG_DEBUG_STACKOVERFLOW=y # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_PAGEALLOC is not set # CONFIG_CODE_PATCHING_SELFTEST is not set # CONFIG_FTR_FIXUP_SELFTEST is not set -# CONFIG_MSI_BITMAP_SELFTEST is not set # CONFIG_XMON is not set CONFIG_IRQSTACKS=y # CONFIG_VIRQ_DEBUG is not set @@ -1397,26 +1282,16 @@ CONFIG_IRQSTACKS=y # # CONFIG_KEYS is not set # CONFIG_SECURITY is not set -# CONFIG_SECURITYFS is not set # CONFIG_SECURITY_FILE_CAPABILITIES is not set CONFIG_CRYPTO=y # # Crypto core or helper # -# CONFIG_CRYPTO_FIPS is not set CONFIG_CRYPTO_ALGAPI=y -CONFIG_CRYPTO_ALGAPI2=y CONFIG_CRYPTO_AEAD=m -CONFIG_CRYPTO_AEAD2=y CONFIG_CRYPTO_BLKCIPHER=y -CONFIG_CRYPTO_BLKCIPHER2=y -CONFIG_CRYPTO_HASH=y -CONFIG_CRYPTO_HASH2=y -CONFIG_CRYPTO_RNG=m -CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_MANAGER=y -CONFIG_CRYPTO_MANAGER2=y CONFIG_CRYPTO_GF128MUL=m # CONFIG_CRYPTO_NULL is not set # CONFIG_CRYPTO_CRYPTD is not set @@ -1488,11 +1363,6 @@ CONFIG_CRYPTO_SALSA20=m # # CONFIG_CRYPTO_DEFLATE is not set CONFIG_CRYPTO_LZO=m - -# -# Random Number Generation -# -# CONFIG_CRYPTO_ANSI_CPRNG is not set CONFIG_CRYPTO_HW=y # CONFIG_PPC_CLOCK is not set # CONFIG_VIRTUALIZATION is not set diff --git a/trunk/arch/powerpc/include/asm/cputable.h b/trunk/arch/powerpc/include/asm/cputable.h index 21172badd708..4911104791c3 100644 --- a/trunk/arch/powerpc/include/asm/cputable.h +++ b/trunk/arch/powerpc/include/asm/cputable.h @@ -241,11 +241,9 @@ extern const char *powerpc_base_platform; /* We need to mark all pages as being coherent if we're SMP or we have a * 74[45]x and an MPC107 host bridge. Also 83xx and PowerQUICC II * require it for PCI "streaming/prefetch" to work properly. - * This is also required by 52xx family. */ #if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) \ - || defined(CONFIG_PPC_83xx) || defined(CONFIG_8260) \ - || defined(CONFIG_PPC_MPC52xx) + || defined(CONFIG_PPC_83xx) || defined(CONFIG_8260) #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT #else #define CPU_FTR_COMMON 0 diff --git a/trunk/arch/powerpc/kernel/head_32.S b/trunk/arch/powerpc/kernel/head_32.S index d794a637e421..a1c4cfd25ded 100644 --- a/trunk/arch/powerpc/kernel/head_32.S +++ b/trunk/arch/powerpc/kernel/head_32.S @@ -511,11 +511,8 @@ InstructionTLBMiss: and r1,r1,r2 /* writable if _RW and _DIRTY */ rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */ rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */ - ori r1,r1,0xe04 /* clear out reserved bits */ + ori r1,r1,0xe14 /* clear out reserved bits and M */ andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */ -BEGIN_FTR_SECTION - rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */ -END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT) mtspr SPRN_RPA,r1 mfspr r3,SPRN_IMISS tlbli r3 @@ -588,11 +585,8 @@ DataLoadTLBMiss: and r1,r1,r2 /* writable if _RW and _DIRTY */ rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */ rlwimi r3,r3,32-1,31,31 /* _PAGE_USER -> PP lsb */ - ori r1,r1,0xe04 /* clear out reserved bits */ + ori r1,r1,0xe14 /* clear out reserved bits and M */ andc r1,r3,r1 /* PP = user? (rw&dirty? 2: 3): 0 */ -BEGIN_FTR_SECTION - rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */ -END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT) mtspr SPRN_RPA,r1 mfspr r3,SPRN_DMISS tlbld r3 @@ -659,11 +653,8 @@ DataStoreTLBMiss: stw r3,0(r2) /* update PTE (accessed/dirty bits) */ /* Convert linux-style PTE to low word of PPC-style PTE */ rlwimi r3,r3,32-1,30,30 /* _PAGE_USER -> PP msb */ - li r1,0xe05 /* clear out reserved bits & PP lsb */ + li r1,0xe15 /* clear out reserved bits and M */ andc r1,r3,r1 /* PP = user? 2: 0 */ -BEGIN_FTR_SECTION - rlwinm r1,r1,0,~_PAGE_COHERENT /* clear M (coherence not required) */ -END_FTR_SECTION_IFCLR(CPU_FTR_NEED_COHERENT) mtspr SPRN_RPA,r1 mfspr r3,SPRN_DMISS tlbld r3 diff --git a/trunk/arch/powerpc/platforms/ps3/Kconfig b/trunk/arch/powerpc/platforms/ps3/Kconfig index 740ef56a1550..920cf7a454b1 100644 --- a/trunk/arch/powerpc/platforms/ps3/Kconfig +++ b/trunk/arch/powerpc/platforms/ps3/Kconfig @@ -128,13 +128,6 @@ config PS3_FLASH be disabled on the kernel command line using "ps3flash=off", to not allocate this fixed buffer. -config PS3_VRAM - tristate "PS3 Video RAM Storage Driver" - depends on FB_PS3=y && BLOCK && m - help - This driver allows you to use excess PS3 video RAM as volatile - storage or system swap. - config PS3_LPM tristate "PS3 Logical Performance Monitor support" depends on PPC_PS3 diff --git a/trunk/arch/s390/include/asm/mman.h b/trunk/arch/s390/include/asm/mman.h index da01432e8f44..7839767d837e 100644 --- a/trunk/arch/s390/include/asm/mman.h +++ b/trunk/arch/s390/include/asm/mman.h @@ -22,9 +22,4 @@ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ -#if defined(__KERNEL__) && !defined(__ASSEMBLY__) && defined(CONFIG_64BIT) -int s390_mmap_check(unsigned long addr, unsigned long len); -#define arch_mmap_check(addr,len,flags) s390_mmap_check(addr,len) -#endif - #endif /* __S390_MMAN_H__ */ diff --git a/trunk/arch/s390/include/asm/processor.h b/trunk/arch/s390/include/asm/processor.h index db4523fe38ac..066b99502e09 100644 --- a/trunk/arch/s390/include/asm/processor.h +++ b/trunk/arch/s390/include/asm/processor.h @@ -61,7 +61,7 @@ extern void print_cpu_info(struct cpuinfo_S390 *); extern int get_cpu_capability(unsigned int *); /* - * User space process size: 2GB for 31 bit, 4TB or 8PT for 64 bit. + * User space process size: 2GB for 31 bit, 4TB for 64 bit. */ #ifndef __s390x__ @@ -70,7 +70,8 @@ extern int get_cpu_capability(unsigned int *); #else /* __s390x__ */ -#define TASK_SIZE_OF(tsk) ((tsk)->mm->context.asce_limit) +#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk,TIF_31BIT) ? \ + (1UL << 31) : (1UL << 53)) #define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \ (1UL << 30) : (1UL << 41)) #define TASK_SIZE TASK_SIZE_OF(current) diff --git a/trunk/arch/s390/include/asm/topology.h b/trunk/arch/s390/include/asm/topology.h index c979c3b56ab0..c93eb50e1d09 100644 --- a/trunk/arch/s390/include/asm/topology.h +++ b/trunk/arch/s390/include/asm/topology.h @@ -30,8 +30,6 @@ static inline void s390_init_cpu_topology(void) }; #endif -#define SD_MC_INIT SD_CPU_INIT - #include #endif /* _ASM_S390_TOPOLOGY_H */ diff --git a/trunk/arch/s390/kernel/mcount.S b/trunk/arch/s390/kernel/mcount.S index 80641224a095..397d131a345f 100644 --- a/trunk/arch/s390/kernel/mcount.S +++ b/trunk/arch/s390/kernel/mcount.S @@ -5,8 +5,6 @@ * */ -#include - #ifndef CONFIG_64BIT .globl _mcount _mcount: @@ -16,7 +14,7 @@ _mcount: ahi %r15,-96 l %r3,100(%r15) la %r2,0(%r14) - st %r1,__SF_BACKCHAIN(%r15) + st %r1,0(%r15) la %r3,0(%r3) bras %r14,0f .long ftrace_trace_function @@ -40,7 +38,7 @@ _mcount: stg %r14,112(%r15) lgr %r1,%r15 aghi %r15,-160 - stg %r1,__SF_BACKCHAIN(%r15) + stg %r1,0(%r15) lgr %r2,%r14 lg %r3,168(%r15) larl %r14,ftrace_trace_function diff --git a/trunk/arch/s390/lib/div64.c b/trunk/arch/s390/lib/div64.c index d9e62c0b576a..a5f8300bf3ee 100644 --- a/trunk/arch/s390/lib/div64.c +++ b/trunk/arch/s390/lib/div64.c @@ -61,7 +61,7 @@ static uint32_t __div64_31(uint64_t *n, uint32_t base) " clr %0,%3\n" " jl 0f\n" " slr %0,%3\n" - " ahi %1,1\n" + " alr %1,%2\n" "0:\n" : "+d" (reg2), "+d" (reg3), "=d" (tmp) : "d" (base), "2" (1UL) : "cc" ); diff --git a/trunk/arch/s390/lib/uaccess_pt.c b/trunk/arch/s390/lib/uaccess_pt.c index b0b84c35b0ad..d66215b0fde9 100644 --- a/trunk/arch/s390/lib/uaccess_pt.c +++ b/trunk/arch/s390/lib/uaccess_pt.c @@ -119,6 +119,8 @@ static size_t __user_copy_pt(unsigned long uaddr, void *kptr, goto fault; pfn = pte_pfn(*pte); + if (!pfn_valid(pfn)) + goto out; offset = uaddr & (PAGE_SIZE - 1); size = min(n - done, PAGE_SIZE - offset); @@ -133,6 +135,7 @@ static size_t __user_copy_pt(unsigned long uaddr, void *kptr, done += size; uaddr += size; } while (done < n); +out: spin_unlock(&mm->page_table_lock); return n - done; fault: @@ -160,6 +163,9 @@ static unsigned long __dat_user_addr(unsigned long uaddr) goto fault; pfn = pte_pfn(*pte); + if (!pfn_valid(pfn)) + goto out; + ret = (pfn << PAGE_SHIFT) + (uaddr & (PAGE_SIZE - 1)); out: return ret; @@ -238,6 +244,11 @@ static size_t strnlen_user_pt(size_t count, const char __user *src) goto fault; pfn = pte_pfn(*pte); + if (!pfn_valid(pfn)) { + done = -1; + goto out; + } + offset = uaddr & (PAGE_SIZE-1); addr = (char *)(pfn << PAGE_SHIFT) + offset; len = min(count - done, PAGE_SIZE - offset); @@ -245,6 +256,7 @@ static size_t strnlen_user_pt(size_t count, const char __user *src) done += len_str; uaddr += len_str; } while ((len_str == len) && (done < count)); +out: spin_unlock(&mm->page_table_lock); return done + 1; fault: @@ -313,7 +325,12 @@ static size_t copy_in_user_pt(size_t n, void __user *to, } pfn_from = pte_pfn(*pte_from); + if (!pfn_valid(pfn_from)) + goto out; pfn_to = pte_pfn(*pte_to); + if (!pfn_valid(pfn_to)) + goto out; + offset_from = uaddr_from & (PAGE_SIZE-1); offset_to = uaddr_from & (PAGE_SIZE-1); offset_max = max(offset_from, offset_to); @@ -325,6 +342,7 @@ static size_t copy_in_user_pt(size_t n, void __user *to, uaddr_from += size; uaddr_to += size; } while (done < n); +out: spin_unlock(&mm->page_table_lock); return n - done; fault: diff --git a/trunk/arch/s390/mm/mmap.c b/trunk/arch/s390/mm/mmap.c index e008d236cc15..5932a824547a 100644 --- a/trunk/arch/s390/mm/mmap.c +++ b/trunk/arch/s390/mm/mmap.c @@ -35,7 +35,7 @@ * Leave an at least ~128 MB hole. */ #define MIN_GAP (128*1024*1024) -#define MAX_GAP (STACK_TOP/6*5) +#define MAX_GAP (TASK_SIZE/6*5) static inline unsigned long mmap_base(void) { @@ -46,7 +46,7 @@ static inline unsigned long mmap_base(void) else if (gap > MAX_GAP) gap = MAX_GAP; - return STACK_TOP - (gap & PAGE_MASK); + return TASK_SIZE - (gap & PAGE_MASK); } static inline int mmap_is_legacy(void) @@ -89,58 +89,42 @@ EXPORT_SYMBOL_GPL(arch_pick_mmap_layout); #else -int s390_mmap_check(unsigned long addr, unsigned long len) -{ - if (!test_thread_flag(TIF_31BIT) && - len >= TASK_SIZE && TASK_SIZE < (1UL << 53)) - return crst_table_upgrade(current->mm, 1UL << 53); - return 0; -} - static unsigned long s390_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { struct mm_struct *mm = current->mm; - unsigned long area; int rc; - area = arch_get_unmapped_area(filp, addr, len, pgoff, flags); - if (!(area & ~PAGE_MASK)) - return area; - if (area == -ENOMEM && - !test_thread_flag(TIF_31BIT) && TASK_SIZE < (1UL << 53)) { - /* Upgrade the page table to 4 levels and retry. */ - rc = crst_table_upgrade(mm, 1UL << 53); + addr = arch_get_unmapped_area(filp, addr, len, pgoff, flags); + if (addr & ~PAGE_MASK) + return addr; + if (unlikely(mm->context.asce_limit < addr + len)) { + rc = crst_table_upgrade(mm, addr + len); if (rc) return (unsigned long) rc; - area = arch_get_unmapped_area(filp, addr, len, pgoff, flags); } - return area; + return addr; } static unsigned long -s390_get_unmapped_area_topdown(struct file *filp, const unsigned long addr, +s390_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, const unsigned long len, const unsigned long pgoff, const unsigned long flags) { struct mm_struct *mm = current->mm; - unsigned long area; + unsigned long addr = addr0; int rc; - area = arch_get_unmapped_area_topdown(filp, addr, len, pgoff, flags); - if (!(area & ~PAGE_MASK)) - return area; - if (area == -ENOMEM && - !test_thread_flag(TIF_31BIT) && TASK_SIZE < (1UL << 53)) { - /* Upgrade the page table to 4 levels and retry. */ - rc = crst_table_upgrade(mm, 1UL << 53); + addr = arch_get_unmapped_area_topdown(filp, addr, len, pgoff, flags); + if (addr & ~PAGE_MASK) + return addr; + if (unlikely(mm->context.asce_limit < addr + len)) { + rc = crst_table_upgrade(mm, addr + len); if (rc) return (unsigned long) rc; - area = arch_get_unmapped_area_topdown(filp, addr, len, - pgoff, flags); } - return area; + return addr; } /* * This function, called very early during the creation of a new diff --git a/trunk/arch/s390/mm/pgtable.c b/trunk/arch/s390/mm/pgtable.c index 6b6ddc4ea02b..0767827540b1 100644 --- a/trunk/arch/s390/mm/pgtable.c +++ b/trunk/arch/s390/mm/pgtable.c @@ -117,7 +117,6 @@ int crst_table_upgrade(struct mm_struct *mm, unsigned long limit) crst_table_init(table, entry); pgd_populate(mm, (pgd_t *) table, (pud_t *) pgd); mm->pgd = (pgd_t *) table; - mm->task_size = mm->context.asce_limit; table = NULL; } spin_unlock(&mm->page_table_lock); @@ -155,7 +154,6 @@ void crst_table_downgrade(struct mm_struct *mm, unsigned long limit) BUG(); } mm->pgd = (pgd_t *) (pgd_val(*pgd) & _REGION_ENTRY_ORIGIN); - mm->task_size = mm->context.asce_limit; crst_table_free(mm, (unsigned long *) pgd); } update_mm(mm, current); diff --git a/trunk/arch/sparc/include/asm/pil.h b/trunk/arch/sparc/include/asm/pil.h index 266937030546..32a7efe76d00 100644 --- a/trunk/arch/sparc/include/asm/pil.h +++ b/trunk/arch/sparc/include/asm/pil.h @@ -24,7 +24,6 @@ #define PIL_DEVICE_IRQ 5 #define PIL_SMP_CALL_FUNC_SNGL 6 #define PIL_DEFERRED_PCR_WORK 7 -#define PIL_KGDB_CAPTURE 8 #define PIL_NORMAL_MAX 14 #define PIL_NMI 15 diff --git a/trunk/arch/sparc/kernel/kgdb_64.c b/trunk/arch/sparc/kernel/kgdb_64.c index f5a0fd490b59..fefbe6dc51be 100644 --- a/trunk/arch/sparc/kernel/kgdb_64.c +++ b/trunk/arch/sparc/kernel/kgdb_64.c @@ -108,7 +108,7 @@ void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) } #ifdef CONFIG_SMP -void smp_kgdb_capture_client(int irq, struct pt_regs *regs) +void smp_kgdb_capture_client(struct pt_regs *regs) { unsigned long flags; diff --git a/trunk/arch/sparc/kernel/pci_common.c b/trunk/arch/sparc/kernel/pci_common.c index b775658a927d..64e6edf17b9d 100644 --- a/trunk/arch/sparc/kernel/pci_common.c +++ b/trunk/arch/sparc/kernel/pci_common.c @@ -368,7 +368,7 @@ static void pci_register_iommu_region(struct pci_pbm_info *pbm) const u32 *vdma = of_get_property(pbm->op->node, "virtual-dma", NULL); if (vdma) { - struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL); + struct resource *rp = kmalloc(sizeof(*rp), GFP_KERNEL); if (!rp) { prom_printf("Cannot allocate IOMMU resource.\n"); diff --git a/trunk/arch/sparc/kernel/ttable.S b/trunk/arch/sparc/kernel/ttable.S index 76d837fc47d3..d9bdfb9d5c18 100644 --- a/trunk/arch/sparc/kernel/ttable.S +++ b/trunk/arch/sparc/kernel/ttable.S @@ -64,12 +64,7 @@ tl0_irq6: TRAP_IRQ(smp_call_function_single_client, 6) tl0_irq6: BTRAP(0x46) #endif tl0_irq7: TRAP_IRQ(deferred_pcr_work_irq, 7) -#ifdef CONFIG_KGDB -tl0_irq8: TRAP_IRQ(smp_kgdb_capture_client, 8) -#else -tl0_irq8: BTRAP(0x48) -#endif -tl0_irq9: BTRAP(0x49) +tl0_irq8: BTRAP(0x48) BTRAP(0x49) tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) tl0_irq14: TRAP_IRQ(timer_interrupt, 14) tl0_irq15: TRAP_NMI_IRQ(perfctr_irq, 15) diff --git a/trunk/arch/sparc/mm/ultra.S b/trunk/arch/sparc/mm/ultra.S index b57a5942ba64..80c788ec7c32 100644 --- a/trunk/arch/sparc/mm/ultra.S +++ b/trunk/arch/sparc/mm/ultra.S @@ -679,8 +679,28 @@ xcall_new_mmu_context_version: #ifdef CONFIG_KGDB .globl xcall_kgdb_capture xcall_kgdb_capture: - wr %g0, (1 << PIL_KGDB_CAPTURE), %set_softint - retry +661: rdpr %pstate, %g2 + wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate + .section .sun4v_2insn_patch, "ax" + .word 661b + nop + nop + .previous + + rdpr %pil, %g2 + wrpr %g0, PIL_NORMAL_MAX, %pil + sethi %hi(109f), %g7 + ba,pt %xcc, etrap_irq +109: or %g7, %lo(109b), %g7 +#ifdef CONFIG_TRACE_IRQFLAGS + call trace_hardirqs_off + nop +#endif + call smp_kgdb_capture_client + add %sp, PTREGS_OFF, %o0 + /* Has to be a non-v9 branch due to the large distance. */ + ba rtrap_xcall + ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 #endif #endif /* CONFIG_SMP */ diff --git a/trunk/arch/x86/kernel/cpu/cpufreq/longhaul.c b/trunk/arch/x86/kernel/cpu/cpufreq/longhaul.c index 4e18d5119828..a4cff5d6e380 100644 --- a/trunk/arch/x86/kernel/cpu/cpufreq/longhaul.c +++ b/trunk/arch/x86/kernel/cpu/cpufreq/longhaul.c @@ -303,7 +303,7 @@ static void longhaul_setstate(unsigned int table_index) outb(3, 0x22); } else if ((pr != NULL) && pr->flags.bm_control) { /* Disable bus master arbitration */ - acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1); + acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); } switch (longhaul_version) { @@ -326,7 +326,7 @@ static void longhaul_setstate(unsigned int table_index) case TYPE_POWERSAVER: if (longhaul_flags & USE_ACPI_C3) { /* Don't allow wakeup */ - acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, 0); + acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0); do_powersaver(cx->address, clock_ratio_index, dir); } else { do_powersaver(0, clock_ratio_index, dir); @@ -339,7 +339,7 @@ static void longhaul_setstate(unsigned int table_index) outb(0, 0x22); } else if ((pr != NULL) && pr->flags.bm_control) { /* Enable bus master arbitration */ - acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0); + acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); } outb(pic2_mask,0xA1); /* restore mask */ outb(pic1_mask,0x21); diff --git a/trunk/arch/x86/kernel/kprobes.c b/trunk/arch/x86/kernel/kprobes.c index 4558dd3918cf..e948b28a5a9a 100644 --- a/trunk/arch/x86/kernel/kprobes.c +++ b/trunk/arch/x86/kernel/kprobes.c @@ -193,9 +193,6 @@ static int __kprobes can_boost(kprobe_opcode_t *opcodes) kprobe_opcode_t opcode; kprobe_opcode_t *orig_opcodes = opcodes; - if (search_exception_tables(opcodes)) - return 0; /* Page fault may occur on this address. */ - retry: if (opcodes - orig_opcodes > MAX_INSN_SIZE - 1) return 0; diff --git a/trunk/arch/x86/kernel/tsc.c b/trunk/arch/x86/kernel/tsc.c index d5cebb52d45b..599e58168631 100644 --- a/trunk/arch/x86/kernel/tsc.c +++ b/trunk/arch/x86/kernel/tsc.c @@ -273,43 +273,30 @@ static unsigned long pit_calibrate_tsc(u32 latch, unsigned long ms, int loopmin) * use the TSC value at the transitions to calculate a pretty * good value for the TSC frequencty. */ -static inline int pit_expect_msb(unsigned char val, u64 *tscp, unsigned long *deltap) +static inline int pit_expect_msb(unsigned char val) { - int count; - u64 tsc = 0; + int count = 0; for (count = 0; count < 50000; count++) { /* Ignore LSB */ inb(0x42); if (inb(0x42) != val) break; - tsc = get_cycles(); } - *deltap = get_cycles() - tsc; - *tscp = tsc; - - /* - * We require _some_ success, but the quality control - * will be based on the error terms on the TSC values. - */ - return count > 5; + return count > 50; } /* - * How many MSB values do we want to see? We aim for - * a maximum error rate of 500ppm (in practice the - * real error is much smaller), but refuse to spend - * more than 25ms on it. + * How many MSB values do we want to see? We aim for a + * 15ms calibration, which assuming a 2us counter read + * error should give us roughly 150 ppm precision for + * the calibration. */ -#define MAX_QUICK_PIT_MS 25 -#define MAX_QUICK_PIT_ITERATIONS (MAX_QUICK_PIT_MS * PIT_TICK_RATE / 1000 / 256) +#define QUICK_PIT_MS 15 +#define QUICK_PIT_ITERATIONS (QUICK_PIT_MS * PIT_TICK_RATE / 1000 / 256) static unsigned long quick_pit_calibrate(void) { - int i; - u64 tsc, delta; - unsigned long d1, d2; - /* Set the Gate high, disable speaker */ outb((inb(0x61) & ~0x02) | 0x01, 0x61); @@ -328,52 +315,45 @@ static unsigned long quick_pit_calibrate(void) outb(0xff, 0x42); outb(0xff, 0x42); - /* - * The PIT starts counting at the next edge, so we - * need to delay for a microsecond. The easiest way - * to do that is to just read back the 16-bit counter - * once from the PIT. - */ - inb(0x42); - inb(0x42); - - if (pit_expect_msb(0xff, &tsc, &d1)) { - for (i = 1; i <= MAX_QUICK_PIT_ITERATIONS; i++) { - if (!pit_expect_msb(0xff-i, &delta, &d2)) - break; - - /* - * Iterate until the error is less than 500 ppm - */ - delta -= tsc; - if (d1+d2 < delta >> 11) - goto success; + if (pit_expect_msb(0xff)) { + int i; + u64 t1, t2, delta; + unsigned char expect = 0xfe; + + t1 = get_cycles(); + for (i = 0; i < QUICK_PIT_ITERATIONS; i++, expect--) { + if (!pit_expect_msb(expect)) + goto failed; } + t2 = get_cycles(); + + /* + * Make sure we can rely on the second TSC timestamp: + */ + if (!pit_expect_msb(expect)) + goto failed; + + /* + * Ok, if we get here, then we've seen the + * MSB of the PIT decrement QUICK_PIT_ITERATIONS + * times, and each MSB had many hits, so we never + * had any sudden jumps. + * + * As a result, we can depend on there not being + * any odd delays anywhere, and the TSC reads are + * reliable. + * + * kHz = ticks / time-in-seconds / 1000; + * kHz = (t2 - t1) / (QPI * 256 / PIT_TICK_RATE) / 1000 + * kHz = ((t2 - t1) * PIT_TICK_RATE) / (QPI * 256 * 1000) + */ + delta = (t2 - t1)*PIT_TICK_RATE; + do_div(delta, QUICK_PIT_ITERATIONS*256*1000); + printk("Fast TSC calibration using PIT\n"); + return delta; } - printk("Fast TSC calibration failed\n"); +failed: return 0; - -success: - /* - * Ok, if we get here, then we've seen the - * MSB of the PIT decrement 'i' times, and the - * error has shrunk to less than 500 ppm. - * - * As a result, we can depend on there not being - * any odd delays anywhere, and the TSC reads are - * reliable (within the error). We also adjust the - * delta to the middle of the error bars, just - * because it looks nicer. - * - * kHz = ticks / time-in-seconds / 1000; - * kHz = (t2 - t1) / (I * 256 / PIT_TICK_RATE) / 1000 - * kHz = ((t2 - t1) * PIT_TICK_RATE) / (I * 256 * 1000) - */ - delta += (long)(d2 - d1)/2; - delta *= PIT_TICK_RATE; - do_div(delta, i*256*1000); - printk("Fast TSC calibration using PIT\n"); - return delta; } /** diff --git a/trunk/drivers/acpi/Kconfig b/trunk/drivers/acpi/Kconfig index 431f8b439553..8a851d0f4384 100644 --- a/trunk/drivers/acpi/Kconfig +++ b/trunk/drivers/acpi/Kconfig @@ -11,9 +11,9 @@ menuconfig ACPI select PNP select CPU_IDLE default y - help + ---help--- Advanced Configuration and Power Interface (ACPI) support for - Linux requires an ACPI-compliant platform (hardware/firmware), + Linux requires an ACPI compliant platform (hardware/firmware), and assumes the presence of OS-directed configuration and power management (OSPM) software. This option will enlarge your kernel by about 70K. @@ -23,19 +23,20 @@ menuconfig ACPI the Plug-and-Play BIOS specification (PnP BIOS), the MultiProcessor Specification (MPS), and the Advanced Power Management (APM) specification. If both ACPI and APM support - are configured, ACPI is used. + are configured, whichever is loaded first shall be used. - The project home page for the Linux ACPI subsystem is here: - + The ACPI SourceForge project contains the latest source code, + documentation, tools, mailing list subscription, and other + information. This project is available at: + Linux support for ACPI is based on Intel Corporation's ACPI - Component Architecture (ACPI CA). For more information on the - ACPI CA, see: - + Component Architecture (ACPI CA). For more information see: + - ACPI is an open industry specification co-developed by - Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba. - The specification is available at: + ACPI is an open industry specification co-developed by Compaq, + Intel, Microsoft, Phoenix, and Toshiba. The specification is + available at: if ACPI @@ -48,14 +49,14 @@ config ACPI_SLEEP config ACPI_PROCFS bool "Deprecated /proc/acpi files" depends on PROC_FS - help + ---help--- For backwards compatibility, this option allows deprecated /proc/acpi/ files to exist, even when they have been replaced by functions in /sys. The deprecated files (and their replacements) include: /proc/acpi/sleep (/sys/power/state) - /proc/acpi/info (/sys/module/acpi/parameters/acpica_version) + /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version) /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT) /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP) /proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer) @@ -65,12 +66,11 @@ config ACPI_PROCFS and functions which do not yet exist in /sys. Say N to delete /proc/acpi/ files that have moved to /sys/ - config ACPI_PROCFS_POWER bool "Deprecated power /proc/acpi directories" depends on PROC_FS default y - help + ---help--- For backwards compatibility, this option allows deprecated power /proc/acpi/ directories to exist, even when they have been replaced by functions in /sys. @@ -86,19 +86,19 @@ config ACPI_SYSFS_POWER bool "Future power /sys interface" select POWER_SUPPLY default y - help + ---help--- Say N to disable power /sys interface config ACPI_PROC_EVENT bool "Deprecated /proc/acpi/event support" depends on PROC_FS default y - help - A user-space daemon, acpid, typically reads /proc/acpi/event - and handles all ACPI-generated events. + ---help--- + A user-space daemon, acpi, typically read /proc/acpi/event + and handled all ACPI sub-system generated events. - These events are now delivered to user-space either - via the input layer or as netlink events. + These events are now delivered to user-space via + either the input layer, or as netlink events. This build option enables the old code for legacy user-space implementation. After some time, this will @@ -112,13 +112,10 @@ config ACPI_AC depends on X86 default y help - This driver supports the AC Adapter object, which indicates - whether a system is on AC or not. If you have a system that can + This driver adds support for the AC Adapter object, which indicates + whether a system is on AC, or not. If you have a system that can switch between A/C and battery, say Y. - To compile this driver as a module, choose M here: - the module will be called ac. - config ACPI_BATTERY tristate "Battery" depends on X86 @@ -128,21 +125,15 @@ config ACPI_BATTERY /proc/acpi/battery. If you have a mobile system with a battery, say Y. - To compile this driver as a module, choose M here: - the module will be called battery. - config ACPI_BUTTON tristate "Button" depends on INPUT default y help - This driver handles events on the power, sleep, and lid buttons. + This driver handles events on the power, sleep and lid buttons. A daemon reads /proc/acpi/event and perform user-defined actions such as shutting down the system. This is necessary for - software-controlled poweroff. - - To compile this driver as a module, choose M here: - the module will be called button. + software controlled poweroff. config ACPI_VIDEO tristate "Video" @@ -150,45 +141,38 @@ config ACPI_VIDEO depends on INPUT select THERMAL help - This driver implements the ACPI Extensions For Display Adapters + This driver implement the ACPI Extensions For Display Adapters for integrated graphics devices on motherboard, as specified in - ACPI 2.0 Specification, Appendix B. This supports basic operations - such as defining the video POST device, retrieving EDID information, - and setting up a video output. - - To compile this driver as a module, choose M here: - the module will be called video. + ACPI 2.0 Specification, Appendix B, allowing to perform some basic + control like defining the video POST device, retrieving EDID information + or to setup a video output, etc. + Note that this is an ref. implementation only. It may or may not work + for your integrated video device. config ACPI_FAN tristate "Fan" select THERMAL default y help - This driver supports ACPI fan devices, allowing user-mode + This driver adds support for ACPI fan devices, allowing user-mode applications to perform basic fan control (on, off, status). - To compile this driver as a module, choose M here: - the module will be called fan. - config ACPI_DOCK bool "Dock" depends on EXPERIMENTAL help - This driver supports ACPI-controlled docking stations and removable - drive bays such as the IBM Ultrabay and the Dell Module Bay. + This driver adds support for ACPI controlled docking stations and removable + drive bays such as the IBM ultrabay or the Dell Module Bay. config ACPI_PROCESSOR tristate "Processor" select THERMAL default y help - This driver installs ACPI as the idle handler for Linux and uses - ACPI C2 and C3 processor states to save power on systems that + This driver installs ACPI as the idle handler for Linux, and uses + ACPI C2 and C3 processor states to save power, on systems that support it. It is required by several flavors of cpufreq - performance-state drivers. - - To compile this driver as a module, choose M here: - the module will be called processor. + Performance-state drivers. config ACPI_HOTPLUG_CPU bool @@ -202,14 +186,11 @@ config ACPI_THERMAL select THERMAL default y help - This driver supports ACPI thermal zones. Most mobile and + This driver adds support for ACPI thermal zones. Most mobile and some desktop systems support ACPI thermal zones. It is HIGHLY recommended that this option be enabled, as your processor(s) may be damaged without it. - To compile this driver as a module, choose M here: - the module will be called thermal. - config ACPI_NUMA bool "NUMA support" depends on NUMA @@ -237,7 +218,7 @@ config ACPI_BLACKLIST_YEAR int "Disable ACPI for systems before Jan 1st this year" if X86_32 default 0 help - Enter a 4-digit year, e.g., 2001, to disable ACPI by default + enter a 4-digit year, eg. 2001 to disable ACPI by default on platforms with DMI BIOS date before January 1st that year. "acpi=force" can be used to override this mechanism. @@ -268,13 +249,10 @@ config ACPI_PCI_SLOT tristate "PCI slot detection driver" default n help - This driver creates entries in /sys/bus/pci/slots/ for all PCI - slots in the system. This can help correlate PCI bus addresses, - i.e., segment/bus/device/function tuples, with physical slots in - the system. If you are unsure, say N. - - To compile this driver as a module, choose M here: - the module will be called pci_slot. + This driver will attempt to discover all PCI slots in your system, + and creates entries in /sys/bus/pci/slots/. This feature can + help you correlate PCI bus addresses with the physical geography + of your slots. If you are unsure, say N. config X86_PM_TIMER bool "Power Management Timer Support" if EMBEDDED @@ -293,43 +271,43 @@ config X86_PM_TIMER systems require this timer. config ACPI_CONTAINER - tristate "Container and Module Devices (EXPERIMENTAL)" + tristate "ACPI0004,PNP0A05 and PNP0A06 Container Driver (EXPERIMENTAL)" depends on EXPERIMENTAL default (ACPI_HOTPLUG_MEMORY || ACPI_HOTPLUG_CPU || ACPI_HOTPLUG_IO) - help - This driver supports ACPI Container and Module devices (IDs - ACPI0004, PNP0A05, and PNP0A06). + ---help--- + This allows _physical_ insertion and removal of CPUs and memory. + This can be useful, for example, on NUMA machines that support + ACPI based physical hotplug of nodes, or non-NUMA machines that + support physical cpu/memory hot-plug. - This helps support hotplug of nodes, CPUs, and memory. - - To compile this driver as a module, choose M here: - the module will be called container. + If one selects "m", this driver can be loaded with + "modprobe container". config ACPI_HOTPLUG_MEMORY tristate "Memory Hotplug" depends on MEMORY_HOTPLUG default n help - This driver supports ACPI memory hotplug. The driver - fields notifications on ACPI memory devices (PNP0C80), - which represent memory ranges that may be onlined or - offlined during runtime. + This driver adds supports for ACPI Memory Hotplug. This driver + provides support for fielding notifications on ACPI memory + devices (PNP0C80) which represent memory ranges that may be + onlined or offlined during runtime. - If your hardware and firmware do not support adding or - removing memory devices at runtime, you need not enable - this driver. + Enabling this driver assumes that your platform hardware + and firmware have support for hot-plugging physical memory. If + your system does not support physically adding or ripping out + memory DIMMs at some platform defined granularity (individually + or as a bank) at runtime, then you need not enable this driver. - To compile this driver as a module, choose M here: - the module will be called acpi_memhotplug. + If one selects "m," this driver can be loaded using the following + command: + $>modprobe acpi_memhotplug config ACPI_SBS tristate "Smart Battery System" depends on X86 help - This driver supports the Smart Battery System, another + This driver adds support for the Smart Battery System, another type of access to battery information, found on some laptops. - To compile this driver as a module, choose M here: - the modules will be called sbs and sbshc. - endif # ACPI diff --git a/trunk/drivers/acpi/Makefile b/trunk/drivers/acpi/Makefile index 61675e21fba2..b130ea0d0759 100644 --- a/trunk/drivers/acpi/Makefile +++ b/trunk/drivers/acpi/Makefile @@ -32,8 +32,10 @@ ifdef CONFIG_CPU_FREQ processor-objs += processor_perflib.o endif -obj-y += bus.o glue.o scan.o ec.o \ - power.o system.o event.o +obj-y += bus.o glue.o +obj-y += scan.o +# Keep EC driver first. Initialization of others depend on it. +obj-y += ec.o obj-$(CONFIG_ACPI_AC) += ac.o obj-$(CONFIG_ACPI_BATTERY) += battery.o obj-$(CONFIG_ACPI_BUTTON) += button.o @@ -49,6 +51,8 @@ obj-$(CONFIG_ACPI_PCI_SLOT) += pci_slot.o obj-$(CONFIG_ACPI_PROCESSOR) += processor.o obj-$(CONFIG_ACPI_CONTAINER) += container.o obj-$(CONFIG_ACPI_THERMAL) += thermal.o +obj-y += power.o +obj-y += system.o event.o obj-$(CONFIG_ACPI_DEBUG) += debug.o obj-$(CONFIG_ACPI_NUMA) += numa.o obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o diff --git a/trunk/drivers/acpi/acpica/Makefile b/trunk/drivers/acpi/acpica/Makefile index 17e50824a6f1..3f23298ee3fd 100644 --- a/trunk/drivers/acpi/acpica/Makefile +++ b/trunk/drivers/acpi/acpica/Makefile @@ -18,7 +18,7 @@ obj-y += exconfig.o exfield.o exnames.o exoparg6.o exresolv.o exstorob.o\ excreate.o exmisc.o exoparg2.o exregion.o exstore.o exutils.o \ exdump.o exmutex.o exoparg3.o exresnte.o exstoren.o -obj-y += hwacpi.o hwgpe.o hwregs.o hwsleep.o hwxface.o hwvalid.o +obj-y += hwacpi.o hwgpe.o hwregs.o hwsleep.o hwxface.o obj-$(ACPI_FUTURE_USAGE) += hwtimer.o @@ -41,4 +41,4 @@ obj-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o obj-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \ utcopy.o utdelete.o utglobal.o utmath.o utobject.o \ - utstate.o utmutex.o utobject.o utresrc.o utlock.o + utstate.o utmutex.o utobject.o utresrc.o diff --git a/trunk/drivers/acpi/acpica/acglobal.h b/trunk/drivers/acpi/acpica/acglobal.h index 16e5210ae936..ddb40f5c68fc 100644 --- a/trunk/drivers/acpi/acpica/acglobal.h +++ b/trunk/drivers/acpi/acpica/acglobal.h @@ -148,12 +148,9 @@ ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list; ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT; ACPI_EXTERN struct acpi_table_facs *acpi_gbl_FACS; -/* These addresses are calculated from the FADT Event Block addresses */ +/* These addresses are calculated from FADT address values */ -ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_status; ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable; - -ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_status; ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable; /* @@ -165,10 +162,6 @@ ACPI_EXTERN u8 acpi_gbl_integer_bit_width; ACPI_EXTERN u8 acpi_gbl_integer_byte_width; ACPI_EXTERN u8 acpi_gbl_integer_nybble_width; -/* Reader/Writer lock is used for namespace walk and dynamic table unload */ - -ACPI_EXTERN struct acpi_rw_lock acpi_gbl_namespace_rw_lock; - /***************************************************************************** * * Mutual exlusion within ACPICA subsystem @@ -252,7 +245,6 @@ ACPI_EXTERN u8 acpi_gbl_step_to_next_call; ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present; ACPI_EXTERN u8 acpi_gbl_events_initialized; ACPI_EXTERN u8 acpi_gbl_system_awake_and_running; -ACPI_EXTERN u8 acpi_gbl_osi_data; #ifndef DEFINE_ACPI_GLOBALS @@ -379,6 +371,7 @@ ACPI_EXTERN char *acpi_gbl_db_buffer; ACPI_EXTERN char *acpi_gbl_db_filename; ACPI_EXTERN u32 acpi_gbl_db_debug_level; ACPI_EXTERN u32 acpi_gbl_db_console_debug_level; +ACPI_EXTERN struct acpi_table_header *acpi_gbl_db_table_ptr; ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node; /* diff --git a/trunk/drivers/acpi/acpica/achware.h b/trunk/drivers/acpi/acpica/achware.h index 4afa3d8e0efb..58c69dc49ab4 100644 --- a/trunk/drivers/acpi/acpica/achware.h +++ b/trunk/drivers/acpi/acpica/achware.h @@ -64,21 +64,13 @@ u32 acpi_hw_get_mode(void); */ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id); -acpi_status acpi_hw_write_pm1_control(u32 pm1a_control, u32 pm1b_control); - -acpi_status acpi_hw_register_read(u32 register_id, u32 *return_value); +acpi_status +acpi_hw_register_read(u32 register_id, u32 * return_value); acpi_status acpi_hw_register_write(u32 register_id, u32 value); acpi_status acpi_hw_clear_acpi_status(void); -/* - * hwvalid - Port I/O with validation - */ -acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width); - -acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width); - /* * hwgpe - GPE support */ diff --git a/trunk/drivers/acpi/acpica/aclocal.h b/trunk/drivers/acpi/acpica/aclocal.h index 772ee5c4ccca..492d02761bb7 100644 --- a/trunk/drivers/acpi/acpica/aclocal.h +++ b/trunk/drivers/acpi/acpica/aclocal.h @@ -108,14 +108,6 @@ static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = { #endif #endif -/* Lock structure for reader/writer interfaces */ - -struct acpi_rw_lock { - acpi_mutex writer_mutex; - acpi_mutex reader_mutex; - u32 num_readers; -}; - /* * Predefined handles for spinlocks used within the subsystem. * These spinlocks are created by acpi_ut_mutex_initialize @@ -780,19 +772,7 @@ struct acpi_bit_register_info { * must be preserved. */ #define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */ - -/* Write-only bits must be zeroed by software */ - -#define ACPI_PM1_CONTROL_WRITEONLY_BITS 0x2004 /* Bits 13, 2 */ - -/* For control registers, both ignored and reserved bits must be preserved */ - -#define ACPI_PM1_CONTROL_IGNORED_BITS 0x0201 /* Bits 9, 0(SCI_EN) */ -#define ACPI_PM1_CONTROL_RESERVED_BITS 0xC1F8 /* Bits 14-15, 3-8 */ -#define ACPI_PM1_CONTROL_PRESERVED_BITS \ - (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS) - -#define ACPI_PM2_CONTROL_PRESERVED_BITS 0xFFFFFFFE /* All except bit 0 */ +#define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0200 /* Bit 9 (whatever) */ /* * Register IDs @@ -801,10 +781,12 @@ struct acpi_bit_register_info { #define ACPI_REGISTER_PM1_STATUS 0x01 #define ACPI_REGISTER_PM1_ENABLE 0x02 #define ACPI_REGISTER_PM1_CONTROL 0x03 -#define ACPI_REGISTER_PM2_CONTROL 0x04 -#define ACPI_REGISTER_PM_TIMER 0x05 -#define ACPI_REGISTER_PROCESSOR_BLOCK 0x06 -#define ACPI_REGISTER_SMI_COMMAND_BLOCK 0x07 +#define ACPI_REGISTER_PM1A_CONTROL 0x04 +#define ACPI_REGISTER_PM1B_CONTROL 0x05 +#define ACPI_REGISTER_PM2_CONTROL 0x06 +#define ACPI_REGISTER_PM_TIMER 0x07 +#define ACPI_REGISTER_PROCESSOR_BLOCK 0x08 +#define ACPI_REGISTER_SMI_COMMAND_BLOCK 0x09 /* Masks used to access the bit_registers */ @@ -836,7 +818,7 @@ struct acpi_bit_register_info { #define ACPI_BITMASK_SCI_ENABLE 0x0001 #define ACPI_BITMASK_BUS_MASTER_RLD 0x0002 #define ACPI_BITMASK_GLOBAL_LOCK_RELEASE 0x0004 -#define ACPI_BITMASK_SLEEP_TYPE 0x1C00 +#define ACPI_BITMASK_SLEEP_TYPE_X 0x1C00 #define ACPI_BITMASK_SLEEP_ENABLE 0x2000 #define ACPI_BITMASK_ARB_DISABLE 0x0001 @@ -862,35 +844,11 @@ struct acpi_bit_register_info { #define ACPI_BITPOSITION_SCI_ENABLE 0x00 #define ACPI_BITPOSITION_BUS_MASTER_RLD 0x01 #define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE 0x02 -#define ACPI_BITPOSITION_SLEEP_TYPE 0x0A +#define ACPI_BITPOSITION_SLEEP_TYPE_X 0x0A #define ACPI_BITPOSITION_SLEEP_ENABLE 0x0D #define ACPI_BITPOSITION_ARB_DISABLE 0x00 -/* Structs and definitions for _OSI support and I/O port validation */ - -#define ACPI_OSI_WIN_2000 0x01 -#define ACPI_OSI_WIN_XP 0x02 -#define ACPI_OSI_WIN_XP_SP1 0x03 -#define ACPI_OSI_WINSRV_2003 0x04 -#define ACPI_OSI_WIN_XP_SP2 0x05 -#define ACPI_OSI_WINSRV_2003_SP1 0x06 -#define ACPI_OSI_WIN_VISTA 0x07 - -#define ACPI_ALWAYS_ILLEGAL 0x00 - -struct acpi_interface_info { - char *name; - u8 value; -}; - -struct acpi_port_info { - char *name; - u16 start; - u16 end; - u8 osi_dependency; -}; - /***************************************************************************** * * Resource descriptors diff --git a/trunk/drivers/acpi/acpica/acmacros.h b/trunk/drivers/acpi/acpica/acmacros.h index 91ac7d7b4402..9c127e8e2d6d 100644 --- a/trunk/drivers/acpi/acpica/acmacros.h +++ b/trunk/drivers/acpi/acpica/acmacros.h @@ -292,6 +292,10 @@ #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) +/* Macro to test the object type */ + +#define ACPI_GET_OBJECT_TYPE(d) (((union acpi_operand_object *)(void *)(d))->common.type) + /* * Macros for the master AML opcode table */ diff --git a/trunk/drivers/acpi/acpica/acobject.h b/trunk/drivers/acpi/acpica/acobject.h index 544dcf834922..eb6f038b03d9 100644 --- a/trunk/drivers/acpi/acpica/acobject.h +++ b/trunk/drivers/acpi/acpica/acobject.h @@ -97,6 +97,7 @@ #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 */ /****************************************************************************** * diff --git a/trunk/drivers/acpi/acpica/acpredef.h b/trunk/drivers/acpi/acpica/acpredef.h index 63f656ae3604..16a9ca9a66e4 100644 --- a/trunk/drivers/acpi/acpica/acpredef.h +++ b/trunk/drivers/acpi/acpica/acpredef.h @@ -52,44 +52,41 @@ * 1) PTYPE1 packages do not contain sub-packages. * * ACPI_PTYPE1_FIXED: Fixed length, 1 or 2 object types: - * object type - * count - * object type - * count + * object type + * count + * object type + * count * * ACPI_PTYPE1_VAR: Variable length: - * object type (Int/Buf/Ref) + * object type (Int/Buf/Ref) * - * ACPI_PTYPE1_OPTION: Package has some required and some optional elements - * (Used for _PRW) + * ACPI_PTYPE1_OPTION: Package has some required and some optional elements: + * Used for _PRW * * * 2) PTYPE2 packages contain a variable number of sub-packages. Each of the * different types describe the contents of each of the sub-packages. * * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types: - * object type - * count - * object type - * count - * (Used for _ALR,_MLS,_PSS,_TRT,_TSS) + * object type + * count + * object type + * count * * ACPI_PTYPE2_COUNT: Each subpackage has a count as first element: - * object type - * (Used for _CSD,_PSD,_TSD) + * object type * * ACPI_PTYPE2_PKG_COUNT: Count of subpackages at start, 1 or 2 object types: - * object type - * count - * object type - * count - * (Used for _CST) + * object type + * count + * object type + * count * - * ACPI_PTYPE2_FIXED: Each subpackage is of fixed length - * (Used for _PRT) + * ACPI_PTYPE2_FIXED: Each subpackage is of fixed length: + * Used for _PRT * * ACPI_PTYPE2_MIN: Each subpackage has a variable but minimum length - * (Used for _HPX) + * Used for _HPX * *****************************************************************************/ diff --git a/trunk/drivers/acpi/acpica/actables.h b/trunk/drivers/acpi/acpica/actables.h index 01c76b8ea7ba..7ce6e33c7f78 100644 --- a/trunk/drivers/acpi/acpica/actables.h +++ b/trunk/drivers/acpi/acpica/actables.h @@ -49,7 +49,7 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count); /* * tbfadt - FADT parse/convert/validate */ -void acpi_tb_parse_fadt(u32 table_index); +void acpi_tb_parse_fadt(u32 table_index, u8 flags); void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length); @@ -79,7 +79,7 @@ void acpi_tb_delete_table(struct acpi_table_desc *table_desc); void acpi_tb_terminate(void); -acpi_status acpi_tb_delete_namespace_by_owner(u32 table_index); +void acpi_tb_delete_namespace_by_owner(u32 table_index); acpi_status acpi_tb_allocate_owner_id(u32 table_index); @@ -109,8 +109,9 @@ acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length); void acpi_tb_install_table(acpi_physical_address address, - char *signature, u32 table_index); + u8 flags, char *signature, u32 table_index); -acpi_status acpi_tb_parse_root_table(acpi_physical_address rsdp_address); +acpi_status +acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags); #endif /* __ACTABLES_H__ */ diff --git a/trunk/drivers/acpi/acpica/acutils.h b/trunk/drivers/acpi/acpica/acutils.h index 897810ba0ccc..80d8813484fe 100644 --- a/trunk/drivers/acpi/acpica/acutils.h +++ b/trunk/drivers/acpi/acpica/acutils.h @@ -345,21 +345,6 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node, acpi_status acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest); -/* - * utlock - reader/writer locks - */ -acpi_status acpi_ut_create_rw_lock(struct acpi_rw_lock *lock); - -void acpi_ut_delete_rw_lock(struct acpi_rw_lock *lock); - -acpi_status acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock); - -acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock); - -acpi_status acpi_ut_acquire_write_lock(struct acpi_rw_lock *lock); - -void acpi_ut_release_write_lock(struct acpi_rw_lock *lock); - /* * utobject - internal object create/delete/cache routines */ diff --git a/trunk/drivers/acpi/acpica/dsinit.c b/trunk/drivers/acpi/acpica/dsinit.c index 3aae13f30c5e..eb144b13d8fa 100644 --- a/trunk/drivers/acpi/acpica/dsinit.c +++ b/trunk/drivers/acpi/acpica/dsinit.c @@ -180,23 +180,11 @@ acpi_ds_initialize_objects(u32 table_index, /* Walk entire namespace from the supplied root */ - status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* - * We don't use acpi_walk_namespace since we do not want to acquire - * the namespace reader lock. - */ - status = - acpi_ns_walk_namespace(ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX, - ACPI_NS_WALK_UNLOCK, acpi_ds_init_one_object, - &info, NULL); + 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")); } - (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); status = acpi_get_table_by_index(table_index, &table); if (ACPI_FAILURE(status)) { diff --git a/trunk/drivers/acpi/acpica/dsmthdat.c b/trunk/drivers/acpi/acpica/dsmthdat.c index 22b1a3ce2c94..da0f5468184c 100644 --- a/trunk/drivers/acpi/acpica/dsmthdat.c +++ b/trunk/drivers/acpi/acpica/dsmthdat.c @@ -713,6 +713,6 @@ acpi_ds_method_data_get_type(u16 opcode, /* Get the object type */ - return_VALUE(object->type); + return_VALUE(ACPI_GET_OBJECT_TYPE(object)); } #endif diff --git a/trunk/drivers/acpi/acpica/dsobject.c b/trunk/drivers/acpi/acpica/dsobject.c index dab3f48f0b42..15c628e6aa00 100644 --- a/trunk/drivers/acpi/acpica/dsobject.c +++ b/trunk/drivers/acpi/acpica/dsobject.c @@ -565,7 +565,7 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state, /* Re-type the object according to its argument */ - node->type = obj_desc->common.type; + node->type = ACPI_GET_OBJECT_TYPE(obj_desc); /* Attach obj to node */ @@ -619,7 +619,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, /* Perform per-object initialization */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_BUFFER: /* @@ -803,7 +803,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state, default: ACPI_ERROR((AE_INFO, "Unimplemented data type: %X", - obj_desc->common.type)); + ACPI_GET_OBJECT_TYPE(obj_desc))); status = AE_AML_OPERAND_TYPE; break; diff --git a/trunk/drivers/acpi/acpica/dsopcode.c b/trunk/drivers/acpi/acpica/dsopcode.c index b4c87b5053e6..0c3b4dd60e8a 100644 --- a/trunk/drivers/acpi/acpica/dsopcode.c +++ b/trunk/drivers/acpi/acpica/dsopcode.c @@ -397,6 +397,30 @@ 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, + acpi_ut_get_node_name(node)); + + 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); } @@ -460,7 +484,7 @@ acpi_ds_init_buffer_field(u16 aml_opcode, /* Host object must be a Buffer */ - if (buffer_desc->common.type != ACPI_TYPE_BUFFER) { + if (ACPI_GET_OBJECT_TYPE(buffer_desc) != ACPI_TYPE_BUFFER) { ACPI_ERROR((AE_INFO, "Target of Create Field is not a Buffer object - %s", acpi_ut_get_object_type_name(buffer_desc))); @@ -1341,8 +1365,10 @@ acpi_ds_exec_end_control_op(struct acpi_walk_state * walk_state, if ((ACPI_GET_DESCRIPTOR_TYPE (walk_state->results->results.obj_desc[0]) == ACPI_DESC_TYPE_OPERAND) - && ((walk_state->results->results.obj_desc[0])-> - common.type == ACPI_TYPE_LOCAL_REFERENCE) + && + (ACPI_GET_OBJECT_TYPE + (walk_state->results->results.obj_desc[0]) == + ACPI_TYPE_LOCAL_REFERENCE) && ((walk_state->results->results.obj_desc[0])-> reference.class != ACPI_REFCLASS_INDEX)) { status = diff --git a/trunk/drivers/acpi/acpica/dsutils.c b/trunk/drivers/acpi/acpica/dsutils.c index dfa104102926..dabc23a46176 100644 --- a/trunk/drivers/acpi/acpica/dsutils.c +++ b/trunk/drivers/acpi/acpica/dsutils.c @@ -816,7 +816,7 @@ acpi_status acpi_ds_evaluate_name_path(struct acpi_walk_state *walk_state) goto push_result; } - type = (*operand)->common.type; + type = ACPI_GET_OBJECT_TYPE(*operand); status = acpi_ex_resolve_to_value(operand, walk_state); if (ACPI_FAILURE(status)) { diff --git a/trunk/drivers/acpi/acpica/dswexec.c b/trunk/drivers/acpi/acpica/dswexec.c index f0280856dc0e..350e6656bc89 100644 --- a/trunk/drivers/acpi/acpica/dswexec.c +++ b/trunk/drivers/acpi/acpica/dswexec.c @@ -138,10 +138,11 @@ acpi_ds_get_predicate_value(struct acpi_walk_state *walk_state, goto cleanup; } - if (local_obj_desc->common.type != ACPI_TYPE_INTEGER) { + 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", - obj_desc, walk_state, obj_desc->common.type)); + obj_desc, walk_state, + ACPI_GET_OBJECT_TYPE(obj_desc))); status = AE_AML_OPERAND_TYPE; goto cleanup; diff --git a/trunk/drivers/acpi/acpica/evevent.c b/trunk/drivers/acpi/acpica/evevent.c index cd55c774e882..803edd9e3f6a 100644 --- a/trunk/drivers/acpi/acpica/evevent.c +++ b/trunk/drivers/acpi/acpica/evevent.c @@ -183,7 +183,7 @@ acpi_status acpi_ev_install_xrupt_handlers(void) * * RETURN: Status * - * DESCRIPTION: Install the fixed event handlers and disable all fixed events. + * DESCRIPTION: Install the fixed event handlers and enable the fixed events. * ******************************************************************************/ @@ -200,13 +200,12 @@ static acpi_status acpi_ev_fixed_event_initialize(void) acpi_gbl_fixed_event_handlers[i].handler = NULL; acpi_gbl_fixed_event_handlers[i].context = NULL; - /* Disable the fixed event */ + /* Enable the fixed event */ if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) { status = - acpi_write_bit_register(acpi_gbl_fixed_event_info - [i].enable_register_id, - ACPI_DISABLE_EVENT); + acpi_set_register(acpi_gbl_fixed_event_info[i]. + enable_register_id, 0); if (ACPI_FAILURE(status)) { return (status); } @@ -289,17 +288,16 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event) /* Clear the status bit */ - (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. - status_register_id, ACPI_CLEAR_STATUS); + (void)acpi_set_register(acpi_gbl_fixed_event_info[event]. + status_register_id, 1); /* * Make sure we've got a handler. If not, report an error. The event is * disabled to prevent further interrupts. */ if (NULL == acpi_gbl_fixed_event_handlers[event].handler) { - (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, - ACPI_DISABLE_EVENT); + (void)acpi_set_register(acpi_gbl_fixed_event_info[event]. + enable_register_id, 0); ACPI_ERROR((AE_INFO, "No installed handler for fixed event [%08X]", diff --git a/trunk/drivers/acpi/acpica/evgpe.c b/trunk/drivers/acpi/acpica/evgpe.c index b9d8ee69ca6c..f345ced36477 100644 --- a/trunk/drivers/acpi/acpica/evgpe.c +++ b/trunk/drivers/acpi/acpica/evgpe.c @@ -88,10 +88,10 @@ acpi_ev_set_gpe_type(struct acpi_gpe_event_info *gpe_event_info, u8 type) status = acpi_ev_disable_gpe(gpe_event_info); - /* Clear the type bits and insert the new Type */ + /* Type was validated above */ - gpe_event_info->flags &= ~ACPI_GPE_TYPE_MASK; - gpe_event_info->flags |= type; + gpe_event_info->flags &= ~ACPI_GPE_TYPE_MASK; /* Clear type bits */ + gpe_event_info->flags |= type; /* Insert type */ return_ACPI_STATUS(status); } @@ -122,7 +122,6 @@ acpi_ev_update_gpe_enable_masks(struct acpi_gpe_event_info *gpe_event_info, if (!gpe_register_info) { return_ACPI_STATUS(AE_NOT_EXIST); } - register_bit = (u8) (1 << (gpe_event_info->gpe_number - gpe_register_info->base_gpe_number)); diff --git a/trunk/drivers/acpi/acpica/evgpeblk.c b/trunk/drivers/acpi/acpica/evgpeblk.c index 7b3463639422..484cc0565d5b 100644 --- a/trunk/drivers/acpi/acpica/evgpeblk.c +++ b/trunk/drivers/acpi/acpica/evgpeblk.c @@ -104,9 +104,9 @@ u8 acpi_ev_valid_gpe_event(struct acpi_gpe_event_info *gpe_event_info) while (gpe_block) { if ((&gpe_block->event_info[0] <= gpe_event_info) && - (&gpe_block->event_info[((acpi_size) - gpe_block-> - register_count) * 8] > + (&gpe_block-> + event_info[((acpi_size) gpe_block-> + register_count) * 8] > gpe_event_info)) { return (TRUE); } @@ -210,9 +210,10 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, /* Now look at the individual GPEs in this byte register */ for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { - gpe_event_info = &gpe_block->event_info[((acpi_size) i * - ACPI_GPE_REGISTER_WIDTH) - + j]; + gpe_event_info = + &gpe_block-> + event_info[((acpi_size) i * + ACPI_GPE_REGISTER_WIDTH) + j]; if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_HANDLER) { @@ -292,8 +293,8 @@ acpi_ev_save_method_info(acpi_handle obj_handle, /* 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)); + "Ignoring unknown GPE method type: %s (name not of form _Lxx or _Exx)", + name)); return_ACPI_STATUS(AE_OK); } @@ -305,16 +306,17 @@ acpi_ev_save_method_info(acpi_handle obj_handle, /* 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)); + "Could not extract GPE number from name: %s (name is not of form _Lxx or _Exx)", + name)); return_ACPI_STATUS(AE_OK); } /* Ensure that we have a valid GPE number for this GPE block */ if ((gpe_number < gpe_block->block_base_number) || - (gpe_number >= (gpe_block->block_base_number + - (gpe_block->register_count * 8)))) { + (gpe_number >= + (gpe_block->block_base_number + + (gpe_block->register_count * 8)))) { /* * Not valid for this GPE block, just ignore it. However, it may be * valid for a different GPE block, since GPE0 and GPE1 methods both @@ -406,7 +408,7 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle, */ obj_desc = pkg_desc->package.elements[0]; - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { /* Use FADT-defined GPE device (from definition of _PRW) */ @@ -415,15 +417,15 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle, /* Integer is the GPE number in the FADT described GPE blocks */ gpe_number = (u32) obj_desc->integer.value; - } else if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { + } 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) || - ((obj_desc->package.elements[0])->common.type != - ACPI_TYPE_LOCAL_REFERENCE) || - ((obj_desc->package.elements[1])->common.type != - ACPI_TYPE_INTEGER)) { + (ACPI_GET_OBJECT_TYPE(obj_desc->package.elements[0]) != + ACPI_TYPE_LOCAL_REFERENCE) + || (ACPI_GET_OBJECT_TYPE(obj_desc->package.elements[1]) != + ACPI_TYPE_INTEGER)) { goto cleanup; } @@ -448,11 +450,11 @@ acpi_ev_match_prw_and_gpe(acpi_handle obj_handle, */ if ((gpe_device == target_gpe_device) && (gpe_number >= gpe_block->block_base_number) && - (gpe_number < gpe_block->block_base_number + - (gpe_block->register_count * 8))) { - gpe_event_info = &gpe_block->event_info[gpe_number - - gpe_block-> - block_base_number]; + (gpe_number < + gpe_block->block_base_number + (gpe_block->register_count * 8))) { + gpe_event_info = + &gpe_block->event_info[gpe_number - + gpe_block->block_base_number]; /* Mark GPE for WAKE-ONLY but WAKE_DISABLED */ @@ -1031,8 +1033,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, * 1) are "runtime" or "run/wake" GPEs, and * 2) have a corresponding _Lxx or _Exx method * - * Any other GPEs within this block must be enabled via the - * acpi_enable_gpe() external interface. + * Any other GPEs within this block must be enabled via the acpi_enable_gpe() + * external interface. */ wake_gpe_count = 0; gpe_enabled_count = 0; @@ -1042,13 +1044,14 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, /* Get the info block for this particular GPE */ - gpe_event_info = &gpe_block->event_info[((acpi_size) i * - ACPI_GPE_REGISTER_WIDTH) - + j]; + gpe_event_info = + &gpe_block-> + event_info[((acpi_size) i * + ACPI_GPE_REGISTER_WIDTH) + j]; if (((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == - ACPI_GPE_DISPATCH_METHOD) && - (gpe_event_info->flags & ACPI_GPE_TYPE_RUNTIME)) { + ACPI_GPE_DISPATCH_METHOD) + && (gpe_event_info->flags & ACPI_GPE_TYPE_RUNTIME)) { gpe_enabled_count++; } @@ -1102,8 +1105,8 @@ acpi_status acpi_ev_gpe_initialize(void) /* * Initialize the GPE Block(s) defined in the FADT * - * Why the GPE register block lengths are divided by 2: From the ACPI - * Spec, section "General-Purpose Event Registers", we have: + * Why the GPE register block lengths are divided by 2: From the ACPI Spec, + * section "General-Purpose Event Registers", we have: * * "Each register block contains two registers of equal length * GPEx_STS and GPEx_EN (where x is 0 or 1). The length of the @@ -1160,8 +1163,7 @@ acpi_status acpi_ev_gpe_initialize(void) if ((register_count0) && (gpe_number_max >= acpi_gbl_FADT.gpe1_base)) { ACPI_ERROR((AE_INFO, - "GPE0 block (GPE 0 to %d) overlaps the GPE1 block " - "(GPE %d to %d) - Ignoring GPE1", + "GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d) - Ignoring GPE1", gpe_number_max, acpi_gbl_FADT.gpe1_base, acpi_gbl_FADT.gpe1_base + ((register_count1 * diff --git a/trunk/drivers/acpi/acpica/evmisc.c b/trunk/drivers/acpi/acpica/evmisc.c index ce224e1eaa89..5f893057bcc6 100644 --- a/trunk/drivers/acpi/acpica/evmisc.c +++ b/trunk/drivers/acpi/acpica/evmisc.c @@ -163,10 +163,10 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, * 2) Global device notify handler * 3) Per-device notify handler */ - if ((acpi_gbl_system_notify.handler && - (notify_value <= ACPI_MAX_SYS_NOTIFY)) || - (acpi_gbl_device_notify.handler && - (notify_value > ACPI_MAX_SYS_NOTIFY)) || handler_obj) { + if ((acpi_gbl_system_notify.handler + && (notify_value <= ACPI_MAX_SYS_NOTIFY)) + || (acpi_gbl_device_notify.handler + && (notify_value > ACPI_MAX_SYS_NOTIFY)) || handler_obj) { notify_info = acpi_ut_create_generic_state(); if (!notify_info) { return (AE_NO_MEMORY); @@ -174,8 +174,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, if (!handler_obj) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "Executing system notify handler for Notify (%4.4s, %X) " - "node %p\n", + "Executing system notify handler for Notify (%4.4s, %X) node %p\n", acpi_ut_get_node_name(node), notify_value, node)); } @@ -535,9 +534,8 @@ acpi_status acpi_ev_release_global_lock(void) */ if (pending) { status = - acpi_write_bit_register - (ACPI_BITREG_GLOBAL_LOCK_RELEASE, - ACPI_ENABLE_EVENT); + acpi_set_register(ACPI_BITREG_GLOBAL_LOCK_RELEASE, + 1); } ACPI_DEBUG_PRINT((ACPI_DB_EXEC, diff --git a/trunk/drivers/acpi/acpica/evregion.c b/trunk/drivers/acpi/acpica/evregion.c index 538d63264555..665c0887ab4d 100644 --- a/trunk/drivers/acpi/acpica/evregion.c +++ b/trunk/drivers/acpi/acpica/evregion.c @@ -691,7 +691,7 @@ acpi_ev_install_handler(acpi_handle obj_handle, /* Devices are handled different than regions */ - if (obj_desc->common.type == ACPI_TYPE_DEVICE) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_DEVICE) { /* Check if this Device already has a handler for this address space */ @@ -703,8 +703,7 @@ acpi_ev_install_handler(acpi_handle obj_handle, if (next_handler_obj->address_space.space_id == handler_obj->address_space.space_id) { ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, - "Found handler for region [%s] in device %p(%p) " - "handler %p\n", + "Found handler for region [%s] in device %p(%p) handler %p\n", acpi_ut_get_region_name (handler_obj->address_space. space_id), obj_desc, diff --git a/trunk/drivers/acpi/acpica/evrgnini.c b/trunk/drivers/acpi/acpica/evrgnini.c index 284a7becbe96..f3f1fb45c3dc 100644 --- a/trunk/drivers/acpi/acpica/evrgnini.c +++ b/trunk/drivers/acpi/acpica/evrgnini.c @@ -241,8 +241,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, status = AE_OK; } else { ACPI_EXCEPTION((AE_INFO, status, - "Could not install PciConfig handler " - "for Root Bridge %4.4s", + "Could not install PciConfig handler for Root Bridge %4.4s", acpi_ut_get_node_name (pci_root_node))); } @@ -294,8 +293,9 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, * Get the PCI device and function numbers from the _ADR object contained * in the parent's scope. */ - status = acpi_ut_evaluate_numeric_object(METHOD_NAME__ADR, - pci_device_node, &pci_value); + status = + acpi_ut_evaluate_numeric_object(METHOD_NAME__ADR, pci_device_node, + &pci_value); /* * The default is zero, and since the allocation above zeroed the data, @@ -308,16 +308,18 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, /* The PCI segment number comes from the _SEG method */ - status = acpi_ut_evaluate_numeric_object(METHOD_NAME__SEG, - pci_root_node, &pci_value); + status = + acpi_ut_evaluate_numeric_object(METHOD_NAME__SEG, pci_root_node, + &pci_value); if (ACPI_SUCCESS(status)) { pci_id->segment = ACPI_LOWORD(pci_value); } /* The PCI bus number comes from the _BBN method */ - status = acpi_ut_evaluate_numeric_object(METHOD_NAME__BBN, - pci_root_node, &pci_value); + status = + acpi_ut_evaluate_numeric_object(METHOD_NAME__BBN, pci_root_node, + &pci_value); if (ACPI_SUCCESS(status)) { pci_id->bus = ACPI_LOWORD(pci_value); } @@ -630,8 +632,8 @@ acpi_ev_initialize_region(union acpi_operand_object *region_obj, acpi_ns_locked); /* - * Tell all users that this region is usable by - * running the _REG method + * Tell all users that this region is usable by running the _REG + * method */ if (acpi_ns_locked) { status = diff --git a/trunk/drivers/acpi/acpica/evxface.c b/trunk/drivers/acpi/acpica/evxface.c index 10b8543dd466..3aca9010a11e 100644 --- a/trunk/drivers/acpi/acpica/evxface.c +++ b/trunk/drivers/acpi/acpica/evxface.c @@ -631,8 +631,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device, /* Setup up dispatch flags to indicate handler (vs. method) */ - gpe_event_info->flags &= - ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); + gpe_event_info->flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); /* Clear bits */ gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER); acpi_os_release_lock(acpi_gbl_gpe_lock, flags); diff --git a/trunk/drivers/acpi/acpica/evxfevnt.c b/trunk/drivers/acpi/acpica/evxfevnt.c index d0a080747ec3..35485e4b60a6 100644 --- a/trunk/drivers/acpi/acpica/evxfevnt.c +++ b/trunk/drivers/acpi/acpica/evxfevnt.c @@ -172,8 +172,8 @@ acpi_status acpi_enable_event(u32 event, u32 flags) * register bit) */ status = - acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, ACPI_ENABLE_EVENT); + acpi_set_register(acpi_gbl_fixed_event_info[event]. + enable_register_id, 1); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -181,8 +181,8 @@ acpi_status acpi_enable_event(u32 event, u32 flags) /* Make sure that the hardware responded */ status = - acpi_read_bit_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, &value); + acpi_get_register(acpi_gbl_fixed_event_info[event]. + enable_register_id, &value); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -354,15 +354,15 @@ acpi_status acpi_disable_event(u32 event, u32 flags) * register bit) */ status = - acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, ACPI_DISABLE_EVENT); + acpi_set_register(acpi_gbl_fixed_event_info[event]. + enable_register_id, 0); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } status = - acpi_read_bit_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, &value); + acpi_get_register(acpi_gbl_fixed_event_info[event]. + enable_register_id, &value); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -407,8 +407,8 @@ acpi_status acpi_clear_event(u32 event) * register bit) */ status = - acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. - status_register_id, ACPI_CLEAR_STATUS); + acpi_set_register(acpi_gbl_fixed_event_info[event]. + status_register_id, 1); return_ACPI_STATUS(status); } @@ -495,7 +495,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) /* Get the status of the requested fixed event */ status = - acpi_read_bit_register(acpi_gbl_fixed_event_info[event]. + acpi_get_register(acpi_gbl_fixed_event_info[event]. enable_register_id, &value); if (ACPI_FAILURE(status)) return_ACPI_STATUS(status); @@ -503,7 +503,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) *event_status = value; status = - acpi_read_bit_register(acpi_gbl_fixed_event_info[event]. + acpi_get_register(acpi_gbl_fixed_event_info[event]. status_register_id, &value); if (ACPI_FAILURE(status)) return_ACPI_STATUS(status); diff --git a/trunk/drivers/acpi/acpica/evxfregn.c b/trunk/drivers/acpi/acpica/evxfregn.c index 7c3d2d356ffb..479e7a3721be 100644 --- a/trunk/drivers/acpi/acpica/evxfregn.c +++ b/trunk/drivers/acpi/acpica/evxfregn.c @@ -193,8 +193,7 @@ acpi_remove_address_space_handler(acpi_handle device, /* Matched space_id, first dereference this in the Regions */ ACPI_DEBUG_PRINT((ACPI_DB_OPREGION, - "Removing address handler %p(%p) for region %s " - "on Device %p(%p)\n", + "Removing address handler %p(%p) for region %s on Device %p(%p)\n", handler_obj, handler, acpi_ut_get_region_name(space_id), node, obj_desc)); diff --git a/trunk/drivers/acpi/acpica/exconfig.c b/trunk/drivers/acpi/acpica/exconfig.c index 3deb20a126b2..932bbc26aa04 100644 --- a/trunk/drivers/acpi/acpica/exconfig.c +++ b/trunk/drivers/acpi/acpica/exconfig.c @@ -291,7 +291,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, /* Source Object can be either an op_region or a Buffer/Field */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_REGION: ACPI_DEBUG_PRINT((ACPI_DB_EXEC, @@ -501,7 +501,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle) */ if ((!ddb_handle) || (ACPI_GET_DESCRIPTOR_TYPE(ddb_handle) != ACPI_DESC_TYPE_OPERAND) || - (ddb_handle->common.type != ACPI_TYPE_LOCAL_REFERENCE)) { + (ACPI_GET_OBJECT_TYPE(ddb_handle) != ACPI_TYPE_LOCAL_REFERENCE)) { return_ACPI_STATUS(AE_BAD_PARAMETER); } @@ -520,14 +520,13 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle) } } - /* Delete the portion of the namespace owned by this table */ - - status = acpi_tb_delete_namespace_by_owner(table_index); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - + /* + * Delete the entire namespace under this table Node + * (Offset contains the table_id) + */ + acpi_tb_delete_namespace_by_owner(table_index); (void)acpi_tb_release_owner_id(table_index); + acpi_tb_set_table_loaded_flag(table_index, FALSE); /* Table unloaded, remove a reference to the ddb_handle object */ diff --git a/trunk/drivers/acpi/acpica/exconvrt.c b/trunk/drivers/acpi/acpica/exconvrt.c index 37d0d39e60a6..0be10188316e 100644 --- a/trunk/drivers/acpi/acpica/exconvrt.c +++ b/trunk/drivers/acpi/acpica/exconvrt.c @@ -82,7 +82,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc, ACPI_FUNCTION_TRACE_PTR(ex_convert_to_integer, obj_desc); - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_INTEGER: /* No conversion necessary */ @@ -116,7 +116,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc, /* String conversion is different than Buffer conversion */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_STRING: /* @@ -206,7 +206,7 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc, ACPI_FUNCTION_TRACE_PTR(ex_convert_to_buffer, obj_desc); - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_BUFFER: /* No conversion necessary */ @@ -409,7 +409,7 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc, ACPI_FUNCTION_TRACE_PTR(ex_convert_to_string, obj_desc); - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_STRING: /* No conversion necessary */ @@ -605,7 +605,8 @@ acpi_ex_convert_to_target_type(acpi_object_type destination_type, default: /* No conversion allowed for these types */ - if (destination_type != source_desc->common.type) { + if (destination_type != + ACPI_GET_OBJECT_TYPE(source_desc)) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Explicit operator, will store (%s) over existing type (%s)\n", acpi_ut_get_object_type_name diff --git a/trunk/drivers/acpi/acpica/exdump.c b/trunk/drivers/acpi/acpica/exdump.c index 89d141fdae0b..aa313574b0df 100644 --- a/trunk/drivers/acpi/acpica/exdump.c +++ b/trunk/drivers/acpi/acpica/exdump.c @@ -350,7 +350,6 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, break; case ACPI_EXD_TYPE: - acpi_ex_out_string("Type", acpi_ut_get_object_type_name (obj_desc)); @@ -423,7 +422,6 @@ acpi_ex_dump_object(union acpi_operand_object *obj_desc, break; default: - acpi_os_printf("**** Invalid table opcode [%X] ****\n", info->opcode); return; @@ -494,7 +492,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) /* Decode object type */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_LOCAL_REFERENCE: acpi_os_printf("Reference: [%s] ", @@ -529,16 +527,44 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) type)); break; - case ACPI_REFCLASS_NAME: + case ACPI_REFCLASS_ARG: - acpi_os_printf("- [%4.4s]\n", - obj_desc->reference.node->name.ascii); + acpi_os_printf("%X", obj_desc->reference.value); + + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { + + /* Value is an Integer */ + + acpi_os_printf(" value is [%8.8X%8.8x]", + ACPI_FORMAT_UINT64(obj_desc-> + integer. + value)); + } + + acpi_os_printf("\n"); break; - case ACPI_REFCLASS_ARG: case ACPI_REFCLASS_LOCAL: - acpi_os_printf("%X\n", obj_desc->reference.value); + acpi_os_printf("%X", obj_desc->reference.value); + + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { + + /* Value is an Integer */ + + acpi_os_printf(" value is [%8.8X%8.8x]", + ACPI_FORMAT_UINT64(obj_desc-> + integer. + value)); + } + + acpi_os_printf("\n"); + break; + + case ACPI_REFCLASS_NAME: + + acpi_os_printf("- [%4.4s]\n", + obj_desc->reference.node->name.ascii); break; default: /* Unknown reference class */ @@ -635,8 +661,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) 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", obj_desc->field.bit_length, + ("RegionField: Bits=%X AccWidth=%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, obj_desc->field.field_flags & AML_FIELD_UPDATE_RULE_MASK, @@ -660,8 +686,9 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) if (!obj_desc->buffer_field.buffer_obj) { ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "*NULL*\n")); - } else if ((obj_desc->buffer_field.buffer_obj)->common.type != - ACPI_TYPE_BUFFER) { + } else + if (ACPI_GET_OBJECT_TYPE(obj_desc->buffer_field.buffer_obj) + != ACPI_TYPE_BUFFER) { acpi_os_printf("*not a Buffer*\n"); } else { acpi_ex_dump_operand(obj_desc->buffer_field.buffer_obj, @@ -710,7 +737,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) default: /* Unknown Type */ - acpi_os_printf("Unknown Type %X\n", obj_desc->common.type); + acpi_os_printf("Unknown Type %X\n", + ACPI_GET_OBJECT_TYPE(obj_desc)); break; } @@ -911,7 +939,7 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, /* Packages may only contain a few object types */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_INTEGER: acpi_os_printf("[Integer] = %8.8X%8.8X\n", @@ -962,7 +990,8 @@ acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, default: - acpi_os_printf("[Unknown Type] %X\n", obj_desc->common.type); + acpi_os_printf("[Unknown Type] %X\n", + ACPI_GET_OBJECT_TYPE(obj_desc)); break; } } diff --git a/trunk/drivers/acpi/acpica/exfield.c b/trunk/drivers/acpi/acpica/exfield.c index 546dcdd86785..a352d0233857 100644 --- a/trunk/drivers/acpi/acpica/exfield.c +++ b/trunk/drivers/acpi/acpica/exfield.c @@ -84,7 +84,7 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, return_ACPI_STATUS(AE_BAD_PARAMETER); } - if (obj_desc->common.type == ACPI_TYPE_BUFFER_FIELD) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_BUFFER_FIELD) { /* * If the buffer_field arguments have not been previously evaluated, * evaluate them now and save the results. @@ -95,8 +95,9 @@ acpi_ex_read_data_from_field(struct acpi_walk_state *walk_state, return_ACPI_STATUS(status); } } - } else if ((obj_desc->common.type == ACPI_TYPE_LOCAL_REGION_FIELD) && - (obj_desc->field.region_obj->region.space_id == + } else + if ((ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_REGION_FIELD) + && (obj_desc->field.region_obj->region.space_id == ACPI_ADR_SPACE_SMBUS)) { /* * This is an SMBus read. We must create a buffer to hold the data @@ -162,7 +163,7 @@ 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", - obj_desc, obj_desc->common.type, buffer, + 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", @@ -221,7 +222,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, return_ACPI_STATUS(AE_AML_NO_OPERAND); } - if (obj_desc->common.type == ACPI_TYPE_BUFFER_FIELD) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_BUFFER_FIELD) { /* * If the buffer_field arguments have not been previously evaluated, * evaluate them now and save the results. @@ -232,8 +233,9 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, return_ACPI_STATUS(status); } } - } else if ((obj_desc->common.type == ACPI_TYPE_LOCAL_REGION_FIELD) && - (obj_desc->field.region_obj->region.space_id == + } else + if ((ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_REGION_FIELD) + && (obj_desc->field.region_obj->region.space_id == ACPI_ADR_SPACE_SMBUS)) { /* * This is an SMBus write. We will bypass the entire field mechanism @@ -241,7 +243,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, * * Source must be a buffer of sufficient size (ACPI_SMBUS_BUFFER_SIZE). */ - if (source_desc->common.type != ACPI_TYPE_BUFFER) { + if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { ACPI_ERROR((AE_INFO, "SMBus write requires Buffer, found type %s", acpi_ut_get_object_type_name(source_desc))); @@ -289,7 +291,7 @@ acpi_ex_write_data_to_field(union acpi_operand_object *source_desc, /* Get a pointer to the data to be written */ - switch (source_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(source_desc)) { case ACPI_TYPE_INTEGER: buffer = &source_desc->integer.value; length = sizeof(source_desc->integer.value); @@ -312,14 +314,15 @@ 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", source_desc, - acpi_ut_get_type_name(source_desc->common.type), - source_desc->common.type, buffer, length)); + 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", obj_desc, - acpi_ut_get_type_name(obj_desc->common.type), - obj_desc->common.type, + acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE(obj_desc)), + ACPI_GET_OBJECT_TYPE(obj_desc), obj_desc->common_field.bit_length, obj_desc->common_field.start_field_bit_offset, obj_desc->common_field.base_byte_offset)); diff --git a/trunk/drivers/acpi/acpica/exfldio.c b/trunk/drivers/acpi/acpica/exfldio.c index 99cee61e655d..ef58ac4e687b 100644 --- a/trunk/drivers/acpi/acpica/exfldio.c +++ b/trunk/drivers/acpi/acpica/exfldio.c @@ -94,9 +94,9 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc, /* We must have a valid region */ - if (rgn_desc->common.type != ACPI_TYPE_REGION) { + if (ACPI_GET_OBJECT_TYPE(rgn_desc) != ACPI_TYPE_REGION) { ACPI_ERROR((AE_INFO, "Needed Region, found type %X (%s)", - rgn_desc->common.type, + ACPI_GET_OBJECT_TYPE(rgn_desc), acpi_ut_get_object_type_name(rgn_desc))); return_ACPI_STATUS(AE_AML_OPERAND_TYPE); @@ -113,6 +113,12 @@ 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 @@ -384,7 +390,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, * index_field - Write to an Index Register, then read/write from/to a * Data Register */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_BUFFER_FIELD: /* * If the buffer_field arguments have not been previously evaluated, @@ -521,7 +527,7 @@ acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, default: ACPI_ERROR((AE_INFO, "Wrong object type in field I/O %X", - obj_desc->common.type)); + ACPI_GET_OBJECT_TYPE(obj_desc))); status = AE_AML_INTERNAL; break; } diff --git a/trunk/drivers/acpi/acpica/exmisc.c b/trunk/drivers/acpi/acpica/exmisc.c index 998eac329937..6b0747ac683b 100644 --- a/trunk/drivers/acpi/acpica/exmisc.c +++ b/trunk/drivers/acpi/acpica/exmisc.c @@ -80,7 +80,7 @@ acpi_ex_get_object_reference(union acpi_operand_object *obj_desc, switch (ACPI_GET_DESCRIPTOR_TYPE(obj_desc)) { case ACPI_DESC_TYPE_OPERAND: - if (obj_desc->common.type != ACPI_TYPE_LOCAL_REFERENCE) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_LOCAL_REFERENCE) { return_ACPI_STATUS(AE_AML_OPERAND_TYPE); } @@ -260,7 +260,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, * guaranteed to be either Integer/String/Buffer by the operand * resolution mechanism. */ - switch (operand0->common.type) { + switch (ACPI_GET_OBJECT_TYPE(operand0)) { case ACPI_TYPE_INTEGER: status = acpi_ex_convert_to_integer(operand1, &local_operand1, 16); @@ -277,7 +277,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, default: ACPI_ERROR((AE_INFO, "Invalid object type: %X", - operand0->common.type)); + ACPI_GET_OBJECT_TYPE(operand0))); status = AE_AML_INTERNAL; } @@ -298,7 +298,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, * 2) Two Strings concatenated to produce a new String * 3) Two Buffers concatenated to produce a new Buffer */ - switch (operand0->common.type) { + switch (ACPI_GET_OBJECT_TYPE(operand0)) { case ACPI_TYPE_INTEGER: /* Result of two Integers is a Buffer */ @@ -379,7 +379,7 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0, /* Invalid object type, should not happen here */ ACPI_ERROR((AE_INFO, "Invalid object type: %X", - operand0->common.type)); + ACPI_GET_OBJECT_TYPE(operand0))); status = AE_AML_INTERNAL; goto cleanup; } @@ -581,7 +581,7 @@ acpi_ex_do_logical_op(u16 opcode, * guaranteed to be either Integer/String/Buffer by the operand * resolution mechanism. */ - switch (operand0->common.type) { + switch (ACPI_GET_OBJECT_TYPE(operand0)) { case ACPI_TYPE_INTEGER: status = acpi_ex_convert_to_integer(operand1, &local_operand1, 16); @@ -608,7 +608,7 @@ acpi_ex_do_logical_op(u16 opcode, /* * Two cases: 1) Both Integers, 2) Both Strings or Buffers */ - if (operand0->common.type == ACPI_TYPE_INTEGER) { + if (ACPI_GET_OBJECT_TYPE(operand0) == ACPI_TYPE_INTEGER) { /* * 1) Both operands are of type integer * Note: local_operand1 may have changed above diff --git a/trunk/drivers/acpi/acpica/exoparg1.c b/trunk/drivers/acpi/acpica/exoparg1.c index 9635d21e568d..b530480cc7d5 100644 --- a/trunk/drivers/acpi/acpica/exoparg1.c +++ b/trunk/drivers/acpi/acpica/exoparg1.c @@ -807,9 +807,11 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) acpi_namespace_node *) operand[0]); if (temp_desc - && ((temp_desc->common.type == ACPI_TYPE_STRING) - || (temp_desc->common.type == - ACPI_TYPE_LOCAL_REFERENCE))) { + && + ((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 { @@ -817,7 +819,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) goto cleanup; } } else { - switch ((operand[0])->common.type) { + switch (ACPI_GET_OBJECT_TYPE(operand[0])) { case ACPI_TYPE_LOCAL_REFERENCE: /* * This is a deref_of (local_x | arg_x) @@ -875,7 +877,8 @@ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) if (ACPI_GET_DESCRIPTOR_TYPE(operand[0]) != ACPI_DESC_TYPE_NAMED) { - if ((operand[0])->common.type == ACPI_TYPE_STRING) { + 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. diff --git a/trunk/drivers/acpi/acpica/exoparg2.c b/trunk/drivers/acpi/acpica/exoparg2.c index 85d95c92dfd3..0b4f513ca885 100644 --- a/trunk/drivers/acpi/acpica/exoparg2.c +++ b/trunk/drivers/acpi/acpica/exoparg2.c @@ -399,7 +399,7 @@ acpi_status acpi_ex_opcode_2A_1T_1R(struct acpi_walk_state *walk_state) * At this point, the Source operand is a String, Buffer, or Package. * Verify that the index is within range. */ - switch ((operand[0])->common.type) { + switch (ACPI_GET_OBJECT_TYPE(operand[0])) { case ACPI_TYPE_STRING: if (index >= operand[0]->string.length) { diff --git a/trunk/drivers/acpi/acpica/exoparg3.c b/trunk/drivers/acpi/acpica/exoparg3.c index 253f9e122584..c6520bbf882b 100644 --- a/trunk/drivers/acpi/acpica/exoparg3.c +++ b/trunk/drivers/acpi/acpica/exoparg3.c @@ -161,8 +161,9 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) * Create the return object. The Source operand is guaranteed to be * either a String or a Buffer, so just use its type. */ - return_desc = acpi_ut_create_internal_object((operand[0])-> - common.type); + return_desc = + acpi_ut_create_internal_object(ACPI_GET_OBJECT_TYPE + (operand[0])); if (!return_desc) { status = AE_NO_MEMORY; goto cleanup; @@ -190,7 +191,7 @@ acpi_status acpi_ex_opcode_3A_1T_1R(struct acpi_walk_state *walk_state) /* Strings always have a sub-pointer, not so for buffers */ - switch ((operand[0])->common.type) { + switch (ACPI_GET_OBJECT_TYPE(operand[0])) { case ACPI_TYPE_STRING: /* Always allocate a new buffer for the String */ diff --git a/trunk/drivers/acpi/acpica/exprep.c b/trunk/drivers/acpi/acpica/exprep.c index 52fec07064f0..a226f74d4a5c 100644 --- a/trunk/drivers/acpi/acpica/exprep.c +++ b/trunk/drivers/acpi/acpica/exprep.c @@ -279,7 +279,7 @@ acpi_ex_decode_field_access(union acpi_operand_object *obj_desc, return_UINT32(0); } - if (obj_desc->common.type == ACPI_TYPE_BUFFER_FIELD) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_BUFFER_FIELD) { /* * buffer_field access can be on any byte boundary, so the * byte_alignment is always 1 byte -- regardless of any byte_alignment diff --git a/trunk/drivers/acpi/acpica/exregion.c b/trunk/drivers/acpi/acpica/exregion.c index 3a54b737d2da..76ec8ff903b8 100644 --- a/trunk/drivers/acpi/acpica/exregion.c +++ b/trunk/drivers/acpi/acpica/exregion.c @@ -294,14 +294,14 @@ acpi_ex_system_io_space_handler(u32 function, switch (function) { case ACPI_READ: - status = acpi_hw_read_port((acpi_io_address) address, + status = acpi_os_read_port((acpi_io_address) address, &value32, bit_width); *value = value32; break; case ACPI_WRITE: - status = acpi_hw_write_port((acpi_io_address) address, + status = acpi_os_write_port((acpi_io_address) address, (u32) * value, bit_width); break; diff --git a/trunk/drivers/acpi/acpica/exresnte.c b/trunk/drivers/acpi/acpica/exresnte.c index 607958ff467c..a063a74006f6 100644 --- a/trunk/drivers/acpi/acpica/exresnte.c +++ b/trunk/drivers/acpi/acpica/exresnte.c @@ -136,7 +136,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, switch (entry_type) { case ACPI_TYPE_PACKAGE: - if (source_desc->common.type != ACPI_TYPE_PACKAGE) { + if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_PACKAGE) { ACPI_ERROR((AE_INFO, "Object not a Package, type %s", acpi_ut_get_object_type_name(source_desc))); return_ACPI_STATUS(AE_AML_OPERAND_TYPE); @@ -154,7 +154,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, case ACPI_TYPE_BUFFER: - if (source_desc->common.type != ACPI_TYPE_BUFFER) { + if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) { ACPI_ERROR((AE_INFO, "Object not a Buffer, type %s", acpi_ut_get_object_type_name(source_desc))); return_ACPI_STATUS(AE_AML_OPERAND_TYPE); @@ -172,7 +172,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, case ACPI_TYPE_STRING: - if (source_desc->common.type != ACPI_TYPE_STRING) { + if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_STRING) { ACPI_ERROR((AE_INFO, "Object not a String, type %s", acpi_ut_get_object_type_name(source_desc))); return_ACPI_STATUS(AE_AML_OPERAND_TYPE); @@ -186,7 +186,7 @@ acpi_ex_resolve_node_to_value(struct acpi_namespace_node **object_ptr, case ACPI_TYPE_INTEGER: - if (source_desc->common.type != ACPI_TYPE_INTEGER) { + if (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_INTEGER) { ACPI_ERROR((AE_INFO, "Object not a Integer, type %s", acpi_ut_get_object_type_name(source_desc))); return_ACPI_STATUS(AE_AML_OPERAND_TYPE); diff --git a/trunk/drivers/acpi/acpica/exresolv.c b/trunk/drivers/acpi/acpica/exresolv.c index c93b54ce7f78..f6105a6d6126 100644 --- a/trunk/drivers/acpi/acpica/exresolv.c +++ b/trunk/drivers/acpi/acpica/exresolv.c @@ -149,7 +149,7 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, /* This is a union acpi_operand_object */ - switch (stack_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(stack_desc)) { case ACPI_TYPE_LOCAL_REFERENCE: ref_type = stack_desc->reference.class; @@ -297,7 +297,8 @@ acpi_ex_resolve_object_to_value(union acpi_operand_object **stack_ptr, ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "FieldRead SourceDesc=%p Type=%X\n", - stack_desc, stack_desc->common.type)); + stack_desc, + ACPI_GET_OBJECT_TYPE(stack_desc))); status = acpi_ex_read_data_from_field(walk_state, stack_desc, @@ -385,7 +386,7 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, * specification of the object_type and size_of operators). This means * traversing the list of possibly many nested references. */ - while (obj_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) { + while (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_REFERENCE) { switch (obj_desc->reference.class) { case ACPI_REFCLASS_REFOF: case ACPI_REFCLASS_NAME: @@ -517,7 +518,7 @@ acpi_ex_resolve_multiple(struct acpi_walk_state *walk_state, * Now we are guaranteed to have an object that has not been created * via the ref_of or Index operators. */ - type = obj_desc->common.type; + type = ACPI_GET_OBJECT_TYPE(obj_desc); exit: /* Convert internal types to external types */ diff --git a/trunk/drivers/acpi/acpica/exresop.c b/trunk/drivers/acpi/acpica/exresop.c index 5c729a9e9131..3c3802764bfb 100644 --- a/trunk/drivers/acpi/acpica/exresop.c +++ b/trunk/drivers/acpi/acpica/exresop.c @@ -212,7 +212,7 @@ acpi_ex_resolve_operands(u16 opcode, /* ACPI internal object */ - object_type = obj_desc->common.type; + object_type = ACPI_GET_OBJECT_TYPE(obj_desc); /* Check for bad acpi_object_type */ @@ -287,7 +287,8 @@ acpi_ex_resolve_operands(u16 opcode, if ((ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_OPERAND) - && (obj_desc->common.type == ACPI_TYPE_STRING)) { + && (ACPI_GET_OBJECT_TYPE(obj_desc) == + ACPI_TYPE_STRING)) { /* * String found - the string references a named object and * must be resolved to a node @@ -335,7 +336,7 @@ acpi_ex_resolve_operands(u16 opcode, * -- All others must be resolved below. */ if ((opcode == AML_STORE_OP) && - ((*stack_ptr)->common.type == + (ACPI_GET_OBJECT_TYPE(*stack_ptr) == ACPI_TYPE_LOCAL_REFERENCE) && ((*stack_ptr)->reference.class == ACPI_REFCLASS_INDEX)) { goto next_operand; @@ -489,7 +490,7 @@ acpi_ex_resolve_operands(u16 opcode, /* Need an operand of type INTEGER, STRING or BUFFER */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_INTEGER: case ACPI_TYPE_STRING: case ACPI_TYPE_BUFFER: @@ -511,7 +512,7 @@ acpi_ex_resolve_operands(u16 opcode, /* Need an operand of type STRING or BUFFER */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_STRING: case ACPI_TYPE_BUFFER: @@ -552,7 +553,7 @@ acpi_ex_resolve_operands(u16 opcode, * The only reference allowed here is a direct reference to * a namespace node. */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_PACKAGE: case ACPI_TYPE_STRING: case ACPI_TYPE_BUFFER: @@ -575,7 +576,7 @@ acpi_ex_resolve_operands(u16 opcode, /* Need a buffer or package or (ACPI 2.0) String */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_PACKAGE: case ACPI_TYPE_STRING: case ACPI_TYPE_BUFFER: @@ -597,7 +598,7 @@ acpi_ex_resolve_operands(u16 opcode, /* Need an operand of type REGION or a BUFFER (which could be a resolved region field) */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_BUFFER: case ACPI_TYPE_REGION: @@ -618,7 +619,7 @@ acpi_ex_resolve_operands(u16 opcode, /* Used by the Store() operator only */ - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_INTEGER: case ACPI_TYPE_PACKAGE: case ACPI_TYPE_STRING: @@ -676,8 +677,8 @@ acpi_ex_resolve_operands(u16 opcode, * required object type (Simple cases only). */ status = acpi_ex_check_object_type(type_needed, - (*stack_ptr)->common.type, - *stack_ptr); + ACPI_GET_OBJECT_TYPE + (*stack_ptr), *stack_ptr); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } diff --git a/trunk/drivers/acpi/acpica/exstore.c b/trunk/drivers/acpi/acpica/exstore.c index 90d606196c99..e35e9b4f6a4e 100644 --- a/trunk/drivers/acpi/acpica/exstore.c +++ b/trunk/drivers/acpi/acpica/exstore.c @@ -129,7 +129,7 @@ acpi_ex_do_debug_object(union acpi_operand_object *source_desc, /* source_desc is of type ACPI_DESC_TYPE_OPERAND */ - switch (source_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(source_desc)) { case ACPI_TYPE_INTEGER: /* Output correct integer width */ @@ -324,7 +324,7 @@ acpi_ex_store(union acpi_operand_object *source_desc, /* Destination object must be a Reference or a Constant object */ - switch (dest_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(dest_desc)) { case ACPI_TYPE_LOCAL_REFERENCE: break; @@ -460,8 +460,9 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, */ obj_desc = *(index_desc->reference.where); - if (source_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE && - source_desc->reference.class == ACPI_REFCLASS_TABLE) { + if (ACPI_GET_OBJECT_TYPE(source_desc) == + ACPI_TYPE_LOCAL_REFERENCE + && source_desc->reference.class == ACPI_REFCLASS_TABLE) { /* This is a DDBHandle, just add a reference to it */ @@ -519,8 +520,8 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, * by the INDEX_OP code. */ obj_desc = index_desc->reference.object; - if ((obj_desc->common.type != ACPI_TYPE_BUFFER) && - (obj_desc->common.type != ACPI_TYPE_STRING)) { + if ((ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_BUFFER) && + (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_STRING)) { return_ACPI_STATUS(AE_AML_OPERAND_TYPE); } @@ -528,7 +529,7 @@ acpi_ex_store_object_to_index(union acpi_operand_object *source_desc, * The assignment of the individual elements will be slightly * different for each source type. */ - switch (source_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(source_desc)) { case ACPI_TYPE_INTEGER: /* Use the least-significant byte of the integer */ @@ -706,7 +707,8 @@ acpi_ex_store_object_to_node(union acpi_operand_object *source_desc, /* No conversions for all other types. Just attach the source object */ status = acpi_ns_attach_object(node, source_desc, - source_desc->common.type); + ACPI_GET_OBJECT_TYPE + (source_desc)); break; } diff --git a/trunk/drivers/acpi/acpica/exstoren.c b/trunk/drivers/acpi/acpica/exstoren.c index 608e838d537e..145d15305f70 100644 --- a/trunk/drivers/acpi/acpica/exstoren.c +++ b/trunk/drivers/acpi/acpica/exstoren.c @@ -96,7 +96,8 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, * are all essentially the same. This case handles the * "interchangeable" types Integer, String, and Buffer. */ - if (source_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) { + if (ACPI_GET_OBJECT_TYPE(source_desc) == + ACPI_TYPE_LOCAL_REFERENCE) { /* Resolve a reference object first */ @@ -116,11 +117,13 @@ acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, /* Must have a Integer, Buffer, or String */ - if ((source_desc->common.type != ACPI_TYPE_INTEGER) && - (source_desc->common.type != ACPI_TYPE_BUFFER) && - (source_desc->common.type != ACPI_TYPE_STRING) && - !((source_desc->common.type == ACPI_TYPE_LOCAL_REFERENCE) && - (source_desc->reference.class == ACPI_REFCLASS_TABLE))) { + if ((ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_INTEGER) && + (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_BUFFER) && + (ACPI_GET_OBJECT_TYPE(source_desc) != ACPI_TYPE_STRING) && + !((ACPI_GET_OBJECT_TYPE(source_desc) == + ACPI_TYPE_LOCAL_REFERENCE) + && (source_desc->reference.class == + ACPI_REFCLASS_TABLE))) { /* Conversion successful but still not a valid type */ @@ -215,7 +218,8 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, return_ACPI_STATUS(status); } - if (source_desc->common.type != dest_desc->common.type) { + if (ACPI_GET_OBJECT_TYPE(source_desc) != + ACPI_GET_OBJECT_TYPE(dest_desc)) { /* * The source type does not match the type of the destination. * Perform the "implicit conversion" of the source to the current type @@ -225,10 +229,11 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, * Otherwise, actual_src_desc is a temporary object to hold the * converted object. */ - status = acpi_ex_convert_to_target_type(dest_desc->common.type, - source_desc, - &actual_src_desc, - walk_state); + status = + acpi_ex_convert_to_target_type(ACPI_GET_OBJECT_TYPE + (dest_desc), source_desc, + &actual_src_desc, + walk_state); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -247,7 +252,7 @@ acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, * We now have two objects of identical types, and we can perform a * copy of the *value* of the source object. */ - switch (dest_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(dest_desc)) { case ACPI_TYPE_INTEGER: dest_desc->integer.value = actual_src_desc->integer.value; diff --git a/trunk/drivers/acpi/acpica/exutils.c b/trunk/drivers/acpi/acpica/exutils.c index 87730e944132..32b85d68e756 100644 --- a/trunk/drivers/acpi/acpica/exutils.c +++ b/trunk/drivers/acpi/acpica/exutils.c @@ -221,7 +221,7 @@ void acpi_ex_truncate_for32bit_table(union acpi_operand_object *obj_desc) */ if ((!obj_desc) || (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) != ACPI_DESC_TYPE_OPERAND) || - (obj_desc->common.type != ACPI_TYPE_INTEGER)) { + (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_INTEGER)) { return; } diff --git a/trunk/drivers/acpi/acpica/hwacpi.c b/trunk/drivers/acpi/acpica/hwacpi.c index 9af361a191e7..a9d4fea4167f 100644 --- a/trunk/drivers/acpi/acpica/hwacpi.c +++ b/trunk/drivers/acpi/acpica/hwacpi.c @@ -86,8 +86,7 @@ acpi_status acpi_hw_set_mode(u32 mode) */ if (!acpi_gbl_FADT.acpi_enable && !acpi_gbl_FADT.acpi_disable) { ACPI_ERROR((AE_INFO, - "No ACPI mode transition supported in this system " - "(enable/disable both zero)")); + "No ACPI mode transition supported in this system (enable/disable both zero)")); return_ACPI_STATUS(AE_OK); } @@ -96,7 +95,7 @@ acpi_status acpi_hw_set_mode(u32 mode) /* BIOS should have disabled ALL fixed and GP events */ - status = acpi_hw_write_port(acpi_gbl_FADT.smi_command, + status = acpi_os_write_port(acpi_gbl_FADT.smi_command, (u32) acpi_gbl_FADT.acpi_enable, 8); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Attempting to enable ACPI mode\n")); @@ -108,7 +107,7 @@ acpi_status acpi_hw_set_mode(u32 mode) * BIOS should clear all fixed status bits and restore fixed event * enable bits to default */ - status = acpi_hw_write_port(acpi_gbl_FADT.smi_command, + status = acpi_os_write_port(acpi_gbl_FADT.smi_command, (u32) acpi_gbl_FADT.acpi_disable, 8); ACPI_DEBUG_PRINT((ACPI_DB_INFO, @@ -173,7 +172,7 @@ u32 acpi_hw_get_mode(void) return_UINT32(ACPI_SYS_MODE_ACPI); } - status = acpi_read_bit_register(ACPI_BITREG_SCI_ENABLE, &value); + status = acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value); if (ACPI_FAILURE(status)) { return_UINT32(ACPI_SYS_MODE_LEGACY); } diff --git a/trunk/drivers/acpi/acpica/hwgpe.c b/trunk/drivers/acpi/acpica/hwgpe.c index d3b7e37c9eed..2013b66745d2 100644 --- a/trunk/drivers/acpi/acpica/hwgpe.c +++ b/trunk/drivers/acpi/acpica/hwgpe.c @@ -89,9 +89,10 @@ acpi_status acpi_hw_low_disable_gpe(struct acpi_gpe_event_info *gpe_event_info) /* Clear just the bit that corresponds to this GPE */ - ACPI_CLEAR_BIT(enable_mask, ((u32)1 << - (gpe_event_info->gpe_number - - gpe_register_info->base_gpe_number))); + ACPI_CLEAR_BIT(enable_mask, + ((u32) 1 << + (gpe_event_info->gpe_number - + gpe_register_info->base_gpe_number))); /* Write the updated enable mask */ @@ -155,9 +156,10 @@ acpi_status acpi_hw_clear_gpe(struct acpi_gpe_event_info * gpe_event_info) ACPI_FUNCTION_ENTRY(); - register_bit = (u8)(1 << - (gpe_event_info->gpe_number - - gpe_event_info->register_info->base_gpe_number)); + register_bit = (u8) + (1 << + (gpe_event_info->gpe_number - + gpe_event_info->register_info->base_gpe_number)); /* * Write a one to the appropriate bit in the status register to @@ -204,9 +206,10 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info, /* Get the register bitmask for this GPE */ - register_bit = (u8)(1 << - (gpe_event_info->gpe_number - - gpe_event_info->register_info->base_gpe_number)); + register_bit = (u8) + (1 << + (gpe_event_info->gpe_number - + gpe_event_info->register_info->base_gpe_number)); /* GPE currently enabled? (enabled for runtime?) */ diff --git a/trunk/drivers/acpi/acpica/hwregs.c b/trunk/drivers/acpi/acpica/hwregs.c index 7b2fb602b5cb..4dc43b018517 100644 --- a/trunk/drivers/acpi/acpica/hwregs.c +++ b/trunk/drivers/acpi/acpica/hwregs.c @@ -51,17 +51,6 @@ #define _COMPONENT ACPI_HARDWARE ACPI_MODULE_NAME("hwregs") -/* Local Prototypes */ -static acpi_status -acpi_hw_read_multiple(u32 *value, - struct acpi_generic_address *register_a, - struct acpi_generic_address *register_b); - -static acpi_status -acpi_hw_write_multiple(u32 value, - struct acpi_generic_address *register_a, - struct acpi_generic_address *register_b); - /******************************************************************************* * * FUNCTION: acpi_hw_clear_acpi_status @@ -71,9 +60,9 @@ acpi_hw_write_multiple(u32 value, * RETURN: Status * * DESCRIPTION: Clears all fixed and general purpose status bits + * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED * ******************************************************************************/ - acpi_status acpi_hw_clear_acpi_status(void) { acpi_status status; @@ -81,20 +70,28 @@ acpi_status acpi_hw_clear_acpi_status(void) ACPI_FUNCTION_TRACE(hw_clear_acpi_status); - ACPI_DEBUG_PRINT((ACPI_DB_IO, "About to write %04X to %0llX\n", + ACPI_DEBUG_PRINT((ACPI_DB_IO, "About to write %04X to %04X\n", ACPI_BITMASK_ALL_FIXED_STATUS, - acpi_gbl_xpm1a_status.address)); + (u16) acpi_gbl_FADT.xpm1a_event_block.address)); lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock); - /* Clear the fixed events in PM1 A/B */ - status = acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS, ACPI_BITMASK_ALL_FIXED_STATUS); if (ACPI_FAILURE(status)) { goto unlock_and_exit; } + /* Clear the fixed events */ + + if (acpi_gbl_FADT.xpm1b_event_block.address) { + status = acpi_write(ACPI_BITMASK_ALL_FIXED_STATUS, + &acpi_gbl_FADT.xpm1b_event_block); + if (ACPI_FAILURE(status)) { + goto unlock_and_exit; + } + } + /* Clear the GPE Bits in all GPE registers in all GPE blocks */ status = acpi_ev_walk_gpe_list(acpi_hw_clear_gpe_block, NULL); @@ -129,42 +126,6 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) return (&acpi_gbl_bit_register_info[register_id]); } -/****************************************************************************** - * - * FUNCTION: acpi_hw_write_pm1_control - * - * PARAMETERS: pm1a_control - Value to be written to PM1A control - * pm1b_control - Value to be written to PM1B control - * - * RETURN: Status - * - * DESCRIPTION: Write the PM1 A/B control registers. These registers are - * different than than the PM1 A/B status and enable registers - * in that different values can be written to the A/B registers. - * Most notably, the SLP_TYP bits can be different, as per the - * values returned from the _Sx predefined methods. - * - ******************************************************************************/ - -acpi_status acpi_hw_write_pm1_control(u32 pm1a_control, u32 pm1b_control) -{ - acpi_status status; - - ACPI_FUNCTION_TRACE(hw_write_pm1_control); - - status = acpi_write(pm1a_control, &acpi_gbl_FADT.xpm1a_control_block); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - if (acpi_gbl_FADT.xpm1b_control_block.address) { - status = - acpi_write(pm1b_control, - &acpi_gbl_FADT.xpm1b_control_block); - } - return_ACPI_STATUS(status); -} - /****************************************************************************** * * FUNCTION: acpi_hw_register_read @@ -180,56 +141,64 @@ acpi_status acpi_hw_write_pm1_control(u32 pm1a_control, u32 pm1b_control) acpi_status acpi_hw_register_read(u32 register_id, u32 * return_value) { - u32 value = 0; + u32 value1 = 0; + u32 value2 = 0; acpi_status status; ACPI_FUNCTION_TRACE(hw_register_read); switch (register_id) { - case ACPI_REGISTER_PM1_STATUS: /* PM1 A/B: 16-bit access each */ + case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */ + + status = acpi_read(&value1, &acpi_gbl_FADT.xpm1a_event_block); + if (ACPI_FAILURE(status)) { + goto exit; + } + + /* PM1B is optional */ - status = acpi_hw_read_multiple(&value, - &acpi_gbl_xpm1a_status, - &acpi_gbl_xpm1b_status); + status = acpi_read(&value2, &acpi_gbl_FADT.xpm1b_event_block); + value1 |= value2; break; - case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access each */ + case ACPI_REGISTER_PM1_ENABLE: /* 16-bit access */ - status = acpi_hw_read_multiple(&value, - &acpi_gbl_xpm1a_enable, - &acpi_gbl_xpm1b_enable); + status = acpi_read(&value1, &acpi_gbl_xpm1a_enable); + if (ACPI_FAILURE(status)) { + goto exit; + } + + /* PM1B is optional */ + + status = acpi_read(&value2, &acpi_gbl_xpm1b_enable); + value1 |= value2; break; - case ACPI_REGISTER_PM1_CONTROL: /* PM1 A/B: 16-bit access each */ + case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */ - status = acpi_hw_read_multiple(&value, - &acpi_gbl_FADT. - xpm1a_control_block, - &acpi_gbl_FADT. - xpm1b_control_block); + status = acpi_read(&value1, &acpi_gbl_FADT.xpm1a_control_block); + if (ACPI_FAILURE(status)) { + goto exit; + } - /* - * Zero the write-only bits. From the ACPI specification, "Hardware - * Write-Only Bits": "Upon reads to registers with write-only bits, - * software masks out all write-only bits." - */ - value &= ~ACPI_PM1_CONTROL_WRITEONLY_BITS; + status = acpi_read(&value2, &acpi_gbl_FADT.xpm1b_control_block); + value1 |= value2; break; case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ - status = acpi_read(&value, &acpi_gbl_FADT.xpm2_control_block); + status = acpi_read(&value1, &acpi_gbl_FADT.xpm2_control_block); break; case ACPI_REGISTER_PM_TIMER: /* 32-bit access */ - status = acpi_read(&value, &acpi_gbl_FADT.xpm_timer_block); + status = acpi_read(&value1, &acpi_gbl_FADT.xpm_timer_block); break; case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */ status = - acpi_hw_read_port(acpi_gbl_FADT.smi_command, &value, 8); + acpi_os_read_port(acpi_gbl_FADT.smi_command, &value1, 8); break; default: @@ -238,8 +207,10 @@ acpi_hw_register_read(u32 register_id, u32 * return_value) break; } + exit: + if (ACPI_SUCCESS(status)) { - *return_value = value; + *return_value = value1; } return_ACPI_STATUS(status); @@ -279,42 +250,52 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value) ACPI_FUNCTION_TRACE(hw_register_write); switch (register_id) { - case ACPI_REGISTER_PM1_STATUS: /* PM1 A/B: 16-bit access each */ - /* - * Handle the "ignored" bit in PM1 Status. According to the ACPI - * specification, ignored bits are to be preserved when writing. - * Normally, this would mean a read/modify/write sequence. However, - * preserving a bit in the status register is different. Writing a - * one clears the status, and writing a zero preserves the status. - * Therefore, we must always write zero to the ignored bit. - * - * This behavior is clarified in the ACPI 4.0 specification. - */ - value &= ~ACPI_PM1_STATUS_PRESERVED_BITS; + case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */ + + /* Perform a read first to preserve certain bits (per ACPI spec) */ - status = acpi_hw_write_multiple(value, - &acpi_gbl_xpm1a_status, - &acpi_gbl_xpm1b_status); + status = acpi_hw_register_read(ACPI_REGISTER_PM1_STATUS, + &read_value); + if (ACPI_FAILURE(status)) { + goto 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_write(value, &acpi_gbl_FADT.xpm1a_event_block); + if (ACPI_FAILURE(status)) { + goto exit; + } + + /* PM1B is optional */ + + status = acpi_write(value, &acpi_gbl_FADT.xpm1b_event_block); break; - case ACPI_REGISTER_PM1_ENABLE: /* PM1 A/B: 16-bit access */ + case ACPI_REGISTER_PM1_ENABLE: /* 16-bit access */ - status = acpi_hw_write_multiple(value, - &acpi_gbl_xpm1a_enable, - &acpi_gbl_xpm1b_enable); + status = acpi_write(value, &acpi_gbl_xpm1a_enable); + if (ACPI_FAILURE(status)) { + goto exit; + } + + /* PM1B is optional */ + + status = acpi_write(value, &acpi_gbl_xpm1b_enable); break; - case ACPI_REGISTER_PM1_CONTROL: /* PM1 A/B: 16-bit access each */ + 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_read_multiple(&read_value, - &acpi_gbl_FADT. - xpm1a_control_block, - &acpi_gbl_FADT. - xpm1b_control_block); + status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, + &read_value); if (ACPI_FAILURE(status)) { goto exit; } @@ -326,29 +307,25 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value) /* Now we can write the data */ - status = acpi_hw_write_multiple(value, - &acpi_gbl_FADT. - xpm1a_control_block, - &acpi_gbl_FADT. - xpm1b_control_block); - break; - - case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ - - /* - * For control registers, all reserved bits must be preserved, - * as per the ACPI spec. - */ - status = - acpi_read(&read_value, &acpi_gbl_FADT.xpm2_control_block); + status = acpi_write(value, &acpi_gbl_FADT.xpm1a_control_block); if (ACPI_FAILURE(status)) { goto exit; } - /* Insert the bits to be preserved */ + status = acpi_write(value, &acpi_gbl_FADT.xpm1b_control_block); + break; - ACPI_INSERT_BITS(value, ACPI_PM2_CONTROL_PRESERVED_BITS, - read_value); + case ACPI_REGISTER_PM1A_CONTROL: /* 16-bit access */ + + status = acpi_write(value, &acpi_gbl_FADT.xpm1a_control_block); + break; + + case ACPI_REGISTER_PM1B_CONTROL: /* 16-bit access */ + + status = acpi_write(value, &acpi_gbl_FADT.xpm1b_control_block); + break; + + case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ status = acpi_write(value, &acpi_gbl_FADT.xpm2_control_block); break; @@ -363,11 +340,10 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value) /* SMI_CMD is currently always in IO space */ status = - acpi_hw_write_port(acpi_gbl_FADT.smi_command, value, 8); + acpi_os_write_port(acpi_gbl_FADT.smi_command, value, 8); break; default: - ACPI_ERROR((AE_INFO, "Unknown Register ID: %X", register_id)); status = AE_BAD_PARAMETER; break; } @@ -375,103 +351,3 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value) exit: return_ACPI_STATUS(status); } - -/****************************************************************************** - * - * FUNCTION: acpi_hw_read_multiple - * - * PARAMETERS: Value - Where the register value is returned - * register_a - First ACPI register (required) - * register_b - Second ACPI register (optional) - * - * RETURN: Status - * - * DESCRIPTION: Read from the specified two-part ACPI register (such as PM1 A/B) - * - ******************************************************************************/ - -static acpi_status -acpi_hw_read_multiple(u32 *value, - struct acpi_generic_address *register_a, - struct acpi_generic_address *register_b) -{ - u32 value_a = 0; - u32 value_b = 0; - acpi_status status; - - /* The first register is always required */ - - status = acpi_read(&value_a, register_a); - if (ACPI_FAILURE(status)) { - return (status); - } - - /* Second register is optional */ - - if (register_b->address) { - status = acpi_read(&value_b, register_b); - if (ACPI_FAILURE(status)) { - return (status); - } - } - - /* - * OR the two return values together. No shifting or masking is necessary, - * because of how the PM1 registers are defined in the ACPI specification: - * - * "Although the bits can be split between the two register blocks (each - * register block has a unique pointer within the FADT), the bit positions - * are maintained. The register block with unimplemented bits (that is, - * those implemented in the other register block) always returns zeros, - * and writes have no side effects" - */ - *value = (value_a | value_b); - return (AE_OK); -} - -/****************************************************************************** - * - * FUNCTION: acpi_hw_write_multiple - * - * PARAMETERS: Value - The value to write - * register_a - First ACPI register (required) - * register_b - Second ACPI register (optional) - * - * RETURN: Status - * - * DESCRIPTION: Write to the specified two-part ACPI register (such as PM1 A/B) - * - ******************************************************************************/ - -static acpi_status -acpi_hw_write_multiple(u32 value, - struct acpi_generic_address *register_a, - struct acpi_generic_address *register_b) -{ - acpi_status status; - - /* The first register is always required */ - - status = acpi_write(value, register_a); - if (ACPI_FAILURE(status)) { - return (status); - } - - /* - * Second register is optional - * - * No bit shifting or clearing is necessary, because of how the PM1 - * registers are defined in the ACPI specification: - * - * "Although the bits can be split between the two register blocks (each - * register block has a unique pointer within the FADT), the bit positions - * are maintained. The register block with unimplemented bits (that is, - * those implemented in the other register block) always returns zeros, - * and writes have no side effects" - */ - if (register_b->address) { - status = acpi_write(value, register_b); - } - - return (status); -} diff --git a/trunk/drivers/acpi/acpica/hwsleep.c b/trunk/drivers/acpi/acpica/hwsleep.c index baa5fc05e124..a2af2a4f2f26 100644 --- a/trunk/drivers/acpi/acpica/hwsleep.c +++ b/trunk/drivers/acpi/acpica/hwsleep.c @@ -90,7 +90,6 @@ acpi_set_firmware_waking_vector(u32 physical_address) ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector) -#if ACPI_MACHINE_WIDTH == 64 /******************************************************************************* * * FUNCTION: acpi_set_firmware_waking_vector64 @@ -101,8 +100,7 @@ ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector) * RETURN: Status * * DESCRIPTION: Sets the 64-bit X_firmware_waking_vector field of the FACS, if - * it exists in the table. This function is intended for use with - * 64-bit host operating systems. + * it exists in the table. * ******************************************************************************/ acpi_status @@ -126,7 +124,6 @@ acpi_set_firmware_waking_vector64(u64 physical_address) } ACPI_EXPORT_SYMBOL(acpi_set_firmware_waking_vector64) -#endif /******************************************************************************* * @@ -150,8 +147,9 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state) ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_prep); - /* _PSW methods could be run here to enable wake-on keyboard, LAN, etc. */ - + /* + * _PSW methods could be run here to enable wake-on keyboard, LAN, etc. + */ status = acpi_get_sleep_type_data(sleep_state, &acpi_gbl_sleep_type_a, &acpi_gbl_sleep_type_b); @@ -225,8 +223,8 @@ ACPI_EXPORT_SYMBOL(acpi_enter_sleep_state_prep) ******************************************************************************/ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) { - u32 pm1a_control; - u32 pm1b_control; + u32 PM1Acontrol; + u32 PM1Bcontrol; struct acpi_bit_register_info *sleep_type_reg_info; struct acpi_bit_register_info *sleep_enable_reg_info; u32 in_value; @@ -244,14 +242,13 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) } sleep_type_reg_info = - acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE); + acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE_A); sleep_enable_reg_info = acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_ENABLE); /* Clear wake status */ - status = - acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS); + status = acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -292,25 +289,24 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) /* Get current value of PM1A control */ - status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, - &pm1a_control); + status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, &PM1Acontrol); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } ACPI_DEBUG_PRINT((ACPI_DB_INIT, "Entering sleep state [S%d]\n", sleep_state)); - /* Clear the SLP_EN and SLP_TYP fields */ + /* Clear SLP_EN and SLP_TYP fields */ - pm1a_control &= ~(sleep_type_reg_info->access_bit_mask | - sleep_enable_reg_info->access_bit_mask); - pm1b_control = pm1a_control; + PM1Acontrol &= ~(sleep_type_reg_info->access_bit_mask | + sleep_enable_reg_info->access_bit_mask); + PM1Bcontrol = PM1Acontrol; - /* Insert the SLP_TYP bits */ + /* Insert SLP_TYP bits */ - pm1a_control |= + PM1Acontrol |= (acpi_gbl_sleep_type_a << sleep_type_reg_info->bit_position); - pm1b_control |= + PM1Bcontrol |= (acpi_gbl_sleep_type_b << sleep_type_reg_info->bit_position); /* @@ -318,25 +314,37 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) * poorly implemented hardware. */ - /* Write #1: write the SLP_TYP data to the PM1 Control registers */ + /* Write #1: fill in SLP_TYP data */ - status = acpi_hw_write_pm1_control(pm1a_control, pm1b_control); + status = acpi_hw_register_write(ACPI_REGISTER_PM1A_CONTROL, + PM1Acontrol); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - /* Insert the sleep enable (SLP_EN) bit */ + status = acpi_hw_register_write(ACPI_REGISTER_PM1B_CONTROL, + PM1Bcontrol); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } - pm1a_control |= sleep_enable_reg_info->access_bit_mask; - pm1b_control |= sleep_enable_reg_info->access_bit_mask; + /* Insert SLP_ENABLE bit */ - /* Flush caches, as per ACPI specification */ + PM1Acontrol |= sleep_enable_reg_info->access_bit_mask; + PM1Bcontrol |= sleep_enable_reg_info->access_bit_mask; + + /* Write #2: SLP_TYP + SLP_EN */ ACPI_FLUSH_CPU_CACHE(); - /* Write #2: Write both SLP_TYP + SLP_EN */ + status = acpi_hw_register_write(ACPI_REGISTER_PM1A_CONTROL, + PM1Acontrol); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } - status = acpi_hw_write_pm1_control(pm1a_control, pm1b_control); + status = acpi_hw_register_write(ACPI_REGISTER_PM1B_CONTROL, + PM1Bcontrol); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -349,8 +357,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) * Wait ten seconds, then try again. This is to get S4/S5 to work on * all machines. * - * We wait so long to allow chipsets that poll this reg very slowly - * to still read the right value. Ideally, this block would go + * We wait so long to allow chipsets that poll this reg very slowly to + * still read the right value. Ideally, this block would go * away entirely. */ acpi_os_stall(10000000); @@ -366,7 +374,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) /* Wait until we enter sleep state */ do { - status = acpi_read_bit_register(ACPI_BITREG_WAKE_STATUS, + status = acpi_get_register_unlocked(ACPI_BITREG_WAKE_STATUS, &in_value); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); @@ -400,10 +408,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios); - /* Clear the wake status bit (PM1) */ - - status = - acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS); + status = acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -430,13 +435,12 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) ACPI_FLUSH_CPU_CACHE(); - status = acpi_hw_write_port(acpi_gbl_FADT.smi_command, + status = acpi_os_write_port(acpi_gbl_FADT.smi_command, (u32) acpi_gbl_FADT.S4bios_request, 8); do { acpi_os_stall(1000); - status = - acpi_read_bit_register(ACPI_BITREG_WAKE_STATUS, &in_value); + status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -467,8 +471,8 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) acpi_status status; struct acpi_bit_register_info *sleep_type_reg_info; struct acpi_bit_register_info *sleep_enable_reg_info; - u32 pm1a_control; - u32 pm1b_control; + u32 PM1Acontrol; + u32 PM1Bcontrol; ACPI_FUNCTION_TRACE(acpi_leave_sleep_state_prep); @@ -482,34 +486,38 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state) &acpi_gbl_sleep_type_b); if (ACPI_SUCCESS(status)) { sleep_type_reg_info = - acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE); + acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE_A); sleep_enable_reg_info = acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_ENABLE); /* Get current value of PM1A control */ status = acpi_hw_register_read(ACPI_REGISTER_PM1_CONTROL, - &pm1a_control); + &PM1Acontrol); if (ACPI_SUCCESS(status)) { - /* Clear the SLP_EN and SLP_TYP fields */ + /* Clear SLP_EN and SLP_TYP fields */ - pm1a_control &= ~(sleep_type_reg_info->access_bit_mask | - sleep_enable_reg_info-> - access_bit_mask); - pm1b_control = pm1a_control; + PM1Acontrol &= ~(sleep_type_reg_info->access_bit_mask | + sleep_enable_reg_info-> + access_bit_mask); + PM1Bcontrol = PM1Acontrol; - /* Insert the SLP_TYP bits */ + /* Insert SLP_TYP bits */ - pm1a_control |= (acpi_gbl_sleep_type_a << - sleep_type_reg_info->bit_position); - pm1b_control |= (acpi_gbl_sleep_type_b << - sleep_type_reg_info->bit_position); + PM1Acontrol |= + (acpi_gbl_sleep_type_a << sleep_type_reg_info-> + bit_position); + PM1Bcontrol |= + (acpi_gbl_sleep_type_b << sleep_type_reg_info-> + bit_position); - /* Write the control registers and ignore any errors */ + /* Just ignore any errors */ - (void)acpi_hw_write_pm1_control(pm1a_control, - pm1b_control); + (void)acpi_hw_register_write(ACPI_REGISTER_PM1A_CONTROL, + PM1Acontrol); + (void)acpi_hw_register_write(ACPI_REGISTER_PM1B_CONTROL, + PM1Bcontrol); } } @@ -595,21 +603,19 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) * it to determine whether the system is rebooting or resuming. Clear * it for compatibility. */ - acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, 1); + acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1); acpi_gbl_system_awake_and_running = TRUE; /* Enable power button */ (void) - acpi_write_bit_register(acpi_gbl_fixed_event_info - [ACPI_EVENT_POWER_BUTTON]. - enable_register_id, ACPI_ENABLE_EVENT); + acpi_set_register(acpi_gbl_fixed_event_info + [ACPI_EVENT_POWER_BUTTON].enable_register_id, 1); (void) - acpi_write_bit_register(acpi_gbl_fixed_event_info - [ACPI_EVENT_POWER_BUTTON]. - status_register_id, ACPI_CLEAR_STATUS); + acpi_set_register(acpi_gbl_fixed_event_info + [ACPI_EVENT_POWER_BUTTON].status_register_id, 1); arg.integer.value = ACPI_SST_WORKING; status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); diff --git a/trunk/drivers/acpi/acpica/hwvalid.c b/trunk/drivers/acpi/acpica/hwvalid.c deleted file mode 100644 index bd3c937b0ac0..000000000000 --- a/trunk/drivers/acpi/acpica/hwvalid.c +++ /dev/null @@ -1,258 +0,0 @@ - -/****************************************************************************** - * - * Module Name: hwvalid - I/O request validation - * - *****************************************************************************/ - -/* - * Copyright (C) 2000 - 2009, Intel Corp. - * 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, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the names - * of any contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. - */ - -#include -#include "accommon.h" - -#define _COMPONENT ACPI_HARDWARE -ACPI_MODULE_NAME("hwvalid") - -/* Local prototypes */ -static acpi_status -acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width); - -/* - * Protected I/O ports. Some ports are always illegal, and some are - * conditionally illegal. This table must remain ordered by port address. - * - * The table is used to implement the Microsoft port access rules that - * first appeared in Windows XP. Some ports are always illegal, and some - * ports are only illegal if the BIOS calls _OSI with a win_xP string or - * later (meaning that the BIOS itelf is post-XP.) - * - * This provides ACPICA with the desired port protections and - * Microsoft compatibility. - * - * Description of port entries: - * DMA: DMA controller - * PIC0: Programmable Interrupt Controller (8259_a) - * PIT1: System Timer 1 - * PIT2: System Timer 2 failsafe - * RTC: Real-time clock - * CMOS: Extended CMOS - * DMA1: DMA 1 page registers - * DMA1L: DMA 1 Ch 0 low page - * DMA2: DMA 2 page registers - * DMA2L: DMA 2 low page refresh - * ARBC: Arbitration control - * SETUP: Reserved system board setup - * POS: POS channel select - * PIC1: Cascaded PIC - * IDMA: ISA DMA - * ELCR: PIC edge/level registers - * PCI: PCI configuration space - */ -static const struct acpi_port_info acpi_protected_ports[] = { - {"DMA", 0x0000, 0x000F, ACPI_OSI_WIN_XP}, - {"PIC0", 0x0020, 0x0021, ACPI_ALWAYS_ILLEGAL}, - {"PIT1", 0x0040, 0x0043, ACPI_OSI_WIN_XP}, - {"PIT2", 0x0048, 0x004B, ACPI_OSI_WIN_XP}, - {"RTC", 0x0070, 0x0071, ACPI_OSI_WIN_XP}, - {"CMOS", 0x0074, 0x0076, ACPI_OSI_WIN_XP}, - {"DMA1", 0x0081, 0x0083, ACPI_OSI_WIN_XP}, - {"DMA1L", 0x0087, 0x0087, ACPI_OSI_WIN_XP}, - {"DMA2", 0x0089, 0x008B, ACPI_OSI_WIN_XP}, - {"DMA2L", 0x008F, 0x008F, ACPI_OSI_WIN_XP}, - {"ARBC", 0x0090, 0x0091, ACPI_OSI_WIN_XP}, - {"SETUP", 0x0093, 0x0094, ACPI_OSI_WIN_XP}, - {"POS", 0x0096, 0x0097, ACPI_OSI_WIN_XP}, - {"PIC1", 0x00A0, 0x00A1, ACPI_ALWAYS_ILLEGAL}, - {"IDMA", 0x00C0, 0x00DF, ACPI_OSI_WIN_XP}, - {"ELCR", 0x04D0, 0x04D1, ACPI_ALWAYS_ILLEGAL}, - {"PCI", 0x0CF8, 0x0CFF, ACPI_OSI_WIN_XP} -}; - -#define ACPI_PORT_INFO_ENTRIES ACPI_ARRAY_LENGTH (acpi_protected_ports) - -/****************************************************************************** - * - * FUNCTION: acpi_hw_validate_io_request - * - * PARAMETERS: Address Address of I/O port/register - * bit_width Number of bits (8,16,32) - * - * RETURN: Status - * - * DESCRIPTION: Validates an I/O request (address/length). Certain ports are - * always illegal and some ports are only illegal depending on - * the requests the BIOS AML code makes to the predefined - * _OSI method. - * - ******************************************************************************/ - -static acpi_status -acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width) -{ - u32 i; - u32 byte_width; - acpi_io_address last_address; - const struct acpi_port_info *port_info; - - ACPI_FUNCTION_TRACE(hw_validate_io_request); - - /* Supported widths are 8/16/32 */ - - if ((bit_width != 8) && (bit_width != 16) && (bit_width != 32)) { - return AE_BAD_PARAMETER; - } - - port_info = acpi_protected_ports; - byte_width = ACPI_DIV_8(bit_width); - last_address = address + byte_width - 1; - - ACPI_DEBUG_PRINT((ACPI_DB_IO, "Address %p LastAddress %p Length %X", - ACPI_CAST_PTR(void, address), ACPI_CAST_PTR(void, - last_address), - byte_width)); - - /* Maximum 16-bit address in I/O space */ - - if (last_address > ACPI_UINT16_MAX) { - ACPI_ERROR((AE_INFO, - "Illegal I/O port address/length above 64K: 0x%p/%X", - ACPI_CAST_PTR(void, address), byte_width)); - return_ACPI_STATUS(AE_AML_ILLEGAL_ADDRESS); - } - - /* Exit if requested address is not within the protected port table */ - - if (address > acpi_protected_ports[ACPI_PORT_INFO_ENTRIES - 1].end) { - return_ACPI_STATUS(AE_OK); - } - - /* Check request against the list of protected I/O ports */ - - for (i = 0; i < ACPI_PORT_INFO_ENTRIES; i++, port_info++) { - /* - * Check if the requested address range will write to a reserved - * port. Four cases to consider: - * - * 1) Address range is contained completely in the port address range - * 2) Address range overlaps port range at the port range start - * 3) Address range overlaps port range at the port range end - * 4) Address range completely encompasses the port range - */ - if ((address <= port_info->end) - && (last_address >= port_info->start)) { - - /* Port illegality may depend on the _OSI calls made by the BIOS */ - - if (acpi_gbl_osi_data >= port_info->osi_dependency) { - ACPI_ERROR((AE_INFO, - "Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)", - ACPI_CAST_PTR(void, address), - byte_width, port_info->name, - port_info->start, port_info->end)); - - return_ACPI_STATUS(AE_AML_ILLEGAL_ADDRESS); - } - } - - /* Finished if address range ends before the end of this port */ - - if (last_address <= port_info->end) { - break; - } - } - - return_ACPI_STATUS(AE_OK); -} - -/****************************************************************************** - * - * FUNCTION: acpi_hw_read_port - * - * PARAMETERS: Address Address of I/O port/register to read - * Value Where value is placed - * Width Number of bits - * - * RETURN: Value read from port - * - * DESCRIPTION: Read data from an I/O port or register. This is a front-end - * to acpi_os_read_port that performs validation on both the port - * address and the length. - * - *****************************************************************************/ - -acpi_status acpi_hw_read_port(acpi_io_address address, u32 *value, u32 width) -{ - acpi_status status; - - status = acpi_hw_validate_io_request(address, width); - if (ACPI_FAILURE(status)) { - return status; - } - - status = acpi_os_read_port(address, value, width); - return status; -} - -/****************************************************************************** - * - * FUNCTION: acpi_hw_write_port - * - * PARAMETERS: Address Address of I/O port/register to write - * Value Value to write - * Width Number of bits - * - * RETURN: None - * - * DESCRIPTION: Write data to an I/O port or register. This is a front-end - * to acpi_os_write_port that performs validation on both the port - * address and the length. - * - *****************************************************************************/ - -acpi_status acpi_hw_write_port(acpi_io_address address, u32 value, u32 width) -{ - acpi_status status; - - status = acpi_hw_validate_io_request(address, width); - if (ACPI_FAILURE(status)) { - return status; - } - - status = acpi_os_write_port(address, value, width); - return status; -} diff --git a/trunk/drivers/acpi/acpica/hwxface.c b/trunk/drivers/acpi/acpica/hwxface.c index 9829979f2bdd..ae597c0ab53f 100644 --- a/trunk/drivers/acpi/acpica/hwxface.c +++ b/trunk/drivers/acpi/acpica/hwxface.c @@ -107,18 +107,19 @@ acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg) ACPI_FUNCTION_NAME(acpi_read); /* - * Must have a valid pointer to a GAS structure, and a non-zero address - * within. + * Must have a valid pointer to a GAS structure, and + * a non-zero address within. However, don't return an error + * because the PM1A/B code must not fail if B isn't present. */ if (!reg) { - return (AE_BAD_PARAMETER); + return (AE_OK); } /* Get a local copy of the address. Handles possible alignment issues */ ACPI_MOVE_64_TO_64(&address, ®->address); if (!address) { - return (AE_BAD_ADDRESS); + return (AE_OK); } /* Supported widths are 8/16/32 */ @@ -133,8 +134,8 @@ acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg) *value = 0; /* - * Two address spaces supported: Memory or IO. PCI_Config is - * not supported here because the GAS structure is insufficient + * Two address spaces supported: Memory or IO. + * PCI_Config is not supported here because the GAS struct is insufficient */ switch (reg->space_id) { case ACPI_ADR_SPACE_SYSTEM_MEMORY: @@ -146,7 +147,7 @@ acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg) case ACPI_ADR_SPACE_SYSTEM_IO: status = - acpi_hw_read_port((acpi_io_address) address, value, width); + acpi_os_read_port((acpi_io_address) address, value, width); break; default: @@ -186,18 +187,19 @@ acpi_status acpi_write(u32 value, struct acpi_generic_address *reg) ACPI_FUNCTION_NAME(acpi_write); /* - * Must have a valid pointer to a GAS structure, and a non-zero address - * within. + * Must have a valid pointer to a GAS structure, and + * a non-zero address within. However, don't return an error + * because the PM1A/B code must not fail if B isn't present. */ if (!reg) { - return (AE_BAD_PARAMETER); + return (AE_OK); } /* Get a local copy of the address. Handles possible alignment issues */ ACPI_MOVE_64_TO_64(&address, ®->address); if (!address) { - return (AE_BAD_ADDRESS); + return (AE_OK); } /* Supported widths are 8/16/32 */ @@ -220,7 +222,7 @@ acpi_status acpi_write(u32 value, struct acpi_generic_address *reg) case ACPI_ADR_SPACE_SYSTEM_IO: - status = acpi_hw_write_port((acpi_io_address) address, value, + status = acpi_os_write_port((acpi_io_address) address, value, width); break; @@ -242,36 +244,24 @@ ACPI_EXPORT_SYMBOL(acpi_write) /******************************************************************************* * - * FUNCTION: acpi_read_bit_register + * FUNCTION: acpi_get_register_unlocked * - * PARAMETERS: register_id - ID of ACPI Bit Register to access - * return_value - Value that was read from the register, - * normalized to bit position zero. + * PARAMETERS: register_id - ID of ACPI bit_register to access + * return_value - Value that was read from the register * - * RETURN: Status and the value read from the 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. Does not acquire the HW lock. * - * SUPPORTS: Bit fields in PM1 Status, PM1 Enable, PM1 Control, and - * PM2 Control. - * - * Note: The hardware lock is not required when reading the ACPI bit registers - * since almost all of them are single bit and it does not matter that - * the parent hardware register can be split across two physical - * registers. The only multi-bit field is SLP_TYP in the PM1 control - * register, but this field does not cross an 8-bit boundary (nor does - * it make much sense to actually read this field.) - * ******************************************************************************/ -acpi_status acpi_read_bit_register(u32 register_id, u32 *return_value) +acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value) { + u32 register_value = 0; struct acpi_bit_register_info *bit_reg_info; - u32 register_value; - u32 value; acpi_status status; - ACPI_FUNCTION_TRACE_U32(acpi_read_bit_register, register_id); + ACPI_FUNCTION_TRACE(acpi_get_register_unlocked); /* Get the info structure corresponding to the requested ACPI Register */ @@ -280,133 +270,209 @@ acpi_status acpi_read_bit_register(u32 register_id, u32 *return_value) return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* Read the entire parent register */ + /* Read from the register */ status = acpi_hw_register_read(bit_reg_info->parent_register, ®ister_value); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - /* Normalize the value that was read, mask off other bits */ + if (ACPI_SUCCESS(status)) { - value = ((register_value & bit_reg_info->access_bit_mask) - >> bit_reg_info->bit_position); + /* Normalize the value that was read */ - ACPI_DEBUG_PRINT((ACPI_DB_IO, - "BitReg %X, ParentReg %X, Actual %8.8X, ReturnValue %8.8X\n", - register_id, bit_reg_info->parent_register, - register_value, value)); + register_value = + ((register_value & bit_reg_info->access_bit_mask) + >> bit_reg_info->bit_position); - *return_value = value; - return_ACPI_STATUS(AE_OK); + *return_value = register_value; + + ACPI_DEBUG_PRINT((ACPI_DB_IO, "Read value %8.8X register %X\n", + register_value, + bit_reg_info->parent_register)); + } + + return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_read_bit_register) +ACPI_EXPORT_SYMBOL(acpi_get_register_unlocked) /******************************************************************************* * - * FUNCTION: acpi_write_bit_register + * FUNCTION: acpi_get_register * - * PARAMETERS: register_id - ID of ACPI Bit Register to access - * Value - Value to write to the register, in bit - * position zero. The bit is automaticallly - * shifted to the correct position. + * PARAMETERS: register_id - ID of ACPI bit_register to access + * return_value - Value that was read from the register * - * RETURN: Status + * 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 write function. Acquires the hardware lock - * since most operations require a read/modify/write sequence. + * DESCRIPTION: ACPI bit_register read function. * - * SUPPORTS: Bit fields in PM1 Status, PM1 Enable, PM1 Control, and - * PM2 Control. + ******************************************************************************/ +acpi_status acpi_get_register(u32 register_id, u32 *return_value) +{ + acpi_status status; + acpi_cpu_flags flags; + + flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock); + status = acpi_get_register_unlocked(register_id, return_value); + acpi_os_release_lock(acpi_gbl_hardware_lock, flags); + + return (status); +} + +ACPI_EXPORT_SYMBOL(acpi_get_register) + +/******************************************************************************* + * + * FUNCTION: acpi_set_register * - * Note that at this level, the fact that there may be actually two - * hardware registers (A and B - and B may not exist) is abstracted. + * PARAMETERS: register_id - ID of ACPI bit_register to access + * Value - (only used on write) value to write to the + * Register, NOT pre-normalized to the bit pos + * + * RETURN: Status + * + * DESCRIPTION: ACPI Bit Register write function. * ******************************************************************************/ -acpi_status acpi_write_bit_register(u32 register_id, u32 value) +acpi_status acpi_set_register(u32 register_id, u32 value) { + u32 register_value = 0; struct acpi_bit_register_info *bit_reg_info; + acpi_status status; acpi_cpu_flags lock_flags; - u32 register_value; - acpi_status status = AE_OK; - ACPI_FUNCTION_TRACE_U32(acpi_write_bit_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", + register_id)); return_ACPI_STATUS(AE_BAD_PARAMETER); } lock_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock); + /* Always do a register read first so we can insert the new bits */ + + status = acpi_hw_register_read(bit_reg_info->parent_register, + ®ister_value); + if (ACPI_FAILURE(status)) { + goto unlock_and_exit; + } + /* - * At this point, we know that the parent register is one of the - * following: PM1 Status, PM1 Enable, PM1 Control, or PM2 Control + * Decode the Register ID + * Register ID = [Register block ID] | [bit ID] + * + * Check bit ID to fine locate Register offset. + * Check Mask to determine Register offset, and then read-write. */ - if (bit_reg_info->parent_register != ACPI_REGISTER_PM1_STATUS) { + switch (bit_reg_info->parent_register) { + case ACPI_REGISTER_PM1_STATUS: + /* - * 1) Case for PM1 Enable, PM1 Control, and PM2 Control - * - * Perform a register read to preserve the bits that we are not - * interested in + * 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. */ - status = acpi_hw_register_read(bit_reg_info->parent_register, - ®ister_value); - if (ACPI_FAILURE(status)) { - goto unlock_and_exit; + value = ACPI_REGISTER_PREPARE_BITS(value, + bit_reg_info->bit_position, + bit_reg_info-> + access_bit_mask); + if (value) { + status = + acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS, + (u16) value); + register_value = 0; } + break; + + case ACPI_REGISTER_PM1_ENABLE: - /* - * Insert the input bit into the value that was just read - * and write the register - */ ACPI_REGISTER_INSERT_VALUE(register_value, bit_reg_info->bit_position, bit_reg_info->access_bit_mask, value); - status = acpi_hw_register_write(bit_reg_info->parent_register, - register_value); - } else { + status = acpi_hw_register_write(ACPI_REGISTER_PM1_ENABLE, + (u16) register_value); + break; + + case ACPI_REGISTER_PM1_CONTROL: + /* - * 2) Case for PM1 Status - * - * The Status register is different from the rest. Clear an event - * by writing 1, 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. + * Write the PM1 Control register. + * Note that at this level, the fact that there are actually TWO + * registers (A and B - and B may not exist) is abstracted. */ - register_value = ACPI_REGISTER_PREPARE_BITS(value, - bit_reg_info-> - bit_position, - bit_reg_info-> - access_bit_mask); + ACPI_DEBUG_PRINT((ACPI_DB_IO, "PM1 control: Read %X\n", + register_value)); - /* No need to write the register if value is all zeros */ + ACPI_REGISTER_INSERT_VALUE(register_value, + bit_reg_info->bit_position, + bit_reg_info->access_bit_mask, + value); - if (register_value) { - status = - acpi_hw_register_write(ACPI_REGISTER_PM1_STATUS, - register_value); + status = acpi_hw_register_write(ACPI_REGISTER_PM1_CONTROL, + (u16) register_value); + break; + + case ACPI_REGISTER_PM2_CONTROL: + + status = acpi_hw_register_read(ACPI_REGISTER_PM2_CONTROL, + ®ister_value); + if (ACPI_FAILURE(status)) { + goto unlock_and_exit; } - } - ACPI_DEBUG_PRINT((ACPI_DB_IO, - "BitReg %X, ParentReg %X, Value %8.8X, Actual %8.8X\n", - register_id, bit_reg_info->parent_register, value, - register_value)); + ACPI_DEBUG_PRINT((ACPI_DB_IO, + "PM2 control: Read %X from %8.8X%8.8X\n", + register_value, + ACPI_FORMAT_UINT64(acpi_gbl_FADT. + xpm2_control_block. + address))); + + ACPI_REGISTER_INSERT_VALUE(register_value, + bit_reg_info->bit_position, + bit_reg_info->access_bit_mask, + value); + + ACPI_DEBUG_PRINT((ACPI_DB_IO, + "About to write %4.4X to %8.8X%8.8X\n", + register_value, + ACPI_FORMAT_UINT64(acpi_gbl_FADT. + xpm2_control_block. + address))); -unlock_and_exit: + status = acpi_hw_register_write(ACPI_REGISTER_PM2_CONTROL, + (u8) (register_value)); + break; + + default: + break; + } + + unlock_and_exit: acpi_os_release_lock(acpi_gbl_hardware_lock, lock_flags); + + /* Normalize the value that was read */ + + ACPI_DEBUG_EXEC(register_value = + ((register_value & bit_reg_info->access_bit_mask) >> + bit_reg_info->bit_position)); + + ACPI_DEBUG_PRINT((ACPI_DB_IO, + "Set bits: %8.8X actual %8.8X register %X\n", value, + register_value, bit_reg_info->parent_register)); return_ACPI_STATUS(status); } -ACPI_EXPORT_SYMBOL(acpi_write_bit_register) +ACPI_EXPORT_SYMBOL(acpi_set_register) /******************************************************************************* * @@ -468,7 +534,7 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 *sleep_type_a, u8 *sleep_type_b) /* It must be of type Package */ - else if (info->return_object->common.type != 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; @@ -489,13 +555,12 @@ 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 (((info->return_object->package.elements[0])->common.type + else if ((ACPI_GET_OBJECT_TYPE(info->return_object->package.elements[0]) != ACPI_TYPE_INTEGER) || - ((info->return_object->package.elements[1])->common.type + (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)", + "Sleep State return package elements are not both Integers (%s, %s)", acpi_ut_get_object_type_name(info->return_object-> package.elements[0]), acpi_ut_get_object_type_name(info->return_object-> diff --git a/trunk/drivers/acpi/acpica/nsaccess.c b/trunk/drivers/acpi/acpica/nsaccess.c index 9c3cdbe2d82a..88303ebe924c 100644 --- a/trunk/drivers/acpi/acpica/nsaccess.c +++ b/trunk/drivers/acpi/acpica/nsaccess.c @@ -118,8 +118,9 @@ acpi_status acpi_ns_root_initialize(void) } /* - * Name entered successfully. If entry in pre_defined_names[] specifies - * an initial value, create the initial value. + * Name entered successfully. + * If entry in pre_defined_names[] specifies an + * initial value, create the initial value. */ if (init_val->val) { status = acpi_os_predefined_override(init_val, &val); @@ -177,8 +178,9 @@ acpi_status acpi_ns_root_initialize(void) case ACPI_TYPE_STRING: - /* Build an object around the static string */ - + /* + * Build an object around the static string + */ obj_desc->string.length = (u32) ACPI_STRLEN(val); obj_desc->string.pointer = val; @@ -232,7 +234,8 @@ acpi_status acpi_ns_root_initialize(void) /* Store pointer to value descriptor in the Node */ status = acpi_ns_attach_object(new_node, obj_desc, - obj_desc->common.type); + ACPI_GET_OBJECT_TYPE + (obj_desc)); /* Remove local reference to the object */ @@ -312,8 +315,10 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, return_ACPI_STATUS(AE_NO_NAMESPACE); } - /* Get the prefix scope. A null scope means use the root scope */ - + /* + * Get the prefix scope. + * A null scope means use the root scope + */ if ((!scope_info) || (!scope_info->scope.node)) { ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "Null scope prefix, using root node (%p)\n", @@ -333,8 +338,8 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, 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. + * 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) { @@ -344,7 +349,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, } } - /* Save type. TBD: may be no longer necessary */ + /* Save type TBD: may be no longer necessary */ type_to_check_for = type; @@ -409,7 +414,6 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, /* Name is fully qualified, no search rules apply */ search_parent_flag = ACPI_NS_NO_UPSEARCH; - /* * Point past this prefix to the name segment * part or the next Parent Prefix @@ -425,8 +429,7 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, /* Current scope has no parent scope */ ACPI_ERROR((AE_INFO, - "ACPI path has too many parent prefixes (^) " - "- reached beyond root node")); + "ACPI path has too many parent prefixes (^) - reached beyond root node")); return_ACPI_STATUS(AE_NOT_FOUND); } } @@ -528,9 +531,9 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, while (num_segments && current_node) { num_segments--; if (!num_segments) { - - /* This is the last segment, enable typechecking */ - + /* + * This is the last segment, enable typechecking + */ this_search_type = type; /* @@ -581,9 +584,9 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, if (num_segments > 0) { /* * If we have an alias to an object that opens a scope (such as a - * device or processor), we need to dereference the alias here so - * that we can access any children of the original node (via the - * remaining segments). + * device or processor), we need to dereference the alias here so that + * we can access any children of the original node (via the remaining + * segments). */ if (this_node->type == ACPI_TYPE_LOCAL_ALIAS) { if (!this_node->object) { @@ -591,8 +594,8 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, } if (acpi_ns_opens_scope - (((struct acpi_namespace_node *) - this_node->object)->type)) { + (((struct acpi_namespace_node *)this_node-> + object)->type)) { this_node = (struct acpi_namespace_node *) this_node->object; @@ -636,8 +639,8 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, /* * If this is the last name segment and we are not looking for a - * specific type, but the type of found object is known, use that - * type to (later) see if it opens a scope. + * specific type, but the type of found object is known, use that type + * to (later) see if it opens a scope. */ if (type == ACPI_TYPE_ANY) { type = this_node->type; @@ -650,8 +653,9 @@ acpi_ns_lookup(union acpi_generic_state *scope_info, current_node = this_node; } - /* Always check if we need to open a new scope */ - + /* + * Always check if we need to open a new scope + */ if (!(flags & ACPI_NS_DONT_OPEN_SCOPE) && (walk_state)) { /* * If entry is a type which opens a scope, push the new scope on the diff --git a/trunk/drivers/acpi/acpica/nsalloc.c b/trunk/drivers/acpi/acpica/nsalloc.c index aceb93111967..f976d848fe82 100644 --- a/trunk/drivers/acpi/acpica/nsalloc.c +++ b/trunk/drivers/acpi/acpica/nsalloc.c @@ -76,7 +76,8 @@ struct acpi_namespace_node *acpi_ns_create_node(u32 name) ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_allocated++); #ifdef ACPI_DBG_TRACK_ALLOCATIONS - temp = acpi_gbl_ns_node_list->total_allocated - + temp = + acpi_gbl_ns_node_list->total_allocated - acpi_gbl_ns_node_list->total_freed; if (temp > acpi_gbl_ns_node_list->max_occupied) { acpi_gbl_ns_node_list->max_occupied = temp; @@ -144,8 +145,9 @@ 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); return_VOID; @@ -181,8 +183,9 @@ void acpi_ns_install_node(struct acpi_walk_state *walk_state, struct acpi_namesp ACPI_FUNCTION_TRACE(ns_install_node); /* - * Get the owner ID from the Walk state. The owner ID is used to track - * table deletion and deletion of objects created by methods. + * Get the owner ID from the Walk state + * The owner ID is used to track table deletion and + * deletion of objects created by methods */ if (walk_state) { owner_id = walk_state->owner_id; @@ -257,8 +260,9 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) return_VOID; } - /* Deallocate all children at this level */ - + /* + * Deallocate all children at this level + */ do { /* Get the things we need */ @@ -281,8 +285,9 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) "Object %p, Remaining %X\n", child_node, acpi_gbl_current_node_count)); - /* Detach an object if there is one, then free the child node */ - + /* + * Detach an object if there is one, then free the child node + */ acpi_ns_detach_object(child_node); /* Now we can delete the node */ @@ -299,6 +304,7 @@ void acpi_ns_delete_children(struct acpi_namespace_node *parent_node) /* Clear the parent's child pointer */ parent_node->child = NULL; + return_VOID; } diff --git a/trunk/drivers/acpi/acpica/nsdump.c b/trunk/drivers/acpi/acpica/nsdump.c index 2bad613db73a..0da33c8e9ba2 100644 --- a/trunk/drivers/acpi/acpica/nsdump.c +++ b/trunk/drivers/acpi/acpica/nsdump.c @@ -181,12 +181,6 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, } this_node = acpi_ns_map_handle_to_node(obj_handle); - if (!this_node) { - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Invalid object handle %p\n", - obj_handle)); - return (AE_OK); - } - type = this_node->type; /* Check if the owner matches */ @@ -220,8 +214,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, acpi_os_printf("%4.4s", acpi_ut_get_node_name(this_node)); } - /* Now we can print out the pertinent information */ - + /* + * Now we can print out the pertinent information + */ acpi_os_printf(" %-12s %p %2.2X ", acpi_ut_get_type_name(type), this_node, this_node->owner_id); @@ -514,7 +509,7 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, case ACPI_DESC_TYPE_OPERAND: - obj_type = obj_desc->common.type; + obj_type = ACPI_GET_OBJECT_TYPE(obj_desc); if (obj_type > ACPI_TYPE_LOCAL_MAX) { acpi_os_printf @@ -544,8 +539,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, goto cleanup; } - /* Valid object, get the pointer to next level, if any */ - + /* + * Valid object, get the pointer to next level, if any + */ switch (obj_type) { case ACPI_TYPE_BUFFER: case ACPI_TYPE_STRING: @@ -606,14 +602,14 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, * display_type - 0 or ACPI_DISPLAY_SUMMARY * max_depth - Maximum depth of dump. Use ACPI_UINT32_MAX * for an effectively unlimited depth. - * owner_id - Dump only objects owned by this ID. Use + * owner_id - Dump only objects owned by this ID. Use * ACPI_UINT32_MAX to match all owners. * start_handle - Where in namespace to start/end search * * RETURN: None * - * DESCRIPTION: Dump typed objects within the loaded namespace. Uses - * acpi_ns_walk_namespace in conjunction with acpi_ns_dump_one_object. + * DESCRIPTION: Dump typed objects within the loaded namespace. + * Uses acpi_ns_walk_namespace in conjunction with acpi_ns_dump_one_object. * ******************************************************************************/ diff --git a/trunk/drivers/acpi/acpica/nseval.c b/trunk/drivers/acpi/acpica/nseval.c index 8e7dec1176c9..0f3d5f9b5966 100644 --- a/trunk/drivers/acpi/acpica/nseval.c +++ b/trunk/drivers/acpi/acpica/nseval.c @@ -155,7 +155,7 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info) } - ACPI_DUMP_PATHNAME(info->resolved_node, "ACPI: Execute Method", + ACPI_DUMP_PATHNAME(info->resolved_node, "Execute Method:", ACPI_LV_INFO, _COMPONENT); ACPI_DEBUG_PRINT((ACPI_DB_EXEC, diff --git a/trunk/drivers/acpi/acpica/nsinit.c b/trunk/drivers/acpi/acpica/nsinit.c index 2adfcf329e15..13501cb81863 100644 --- a/trunk/drivers/acpi/acpica/nsinit.c +++ b/trunk/drivers/acpi/acpica/nsinit.c @@ -103,8 +103,7 @@ acpi_status acpi_ns_initialize_objects(void) } ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, - "\nInitialized %hd/%hd Regions %hd/%hd Fields %hd/%hd " - "Buffers %hd/%hd Packages (%hd nodes)\n", + "\nInitialized %hd/%hd Regions %hd/%hd Fields %hd/%hd Buffers %hd/%hd Packages (%hd nodes)\n", info.op_region_init, info.op_region_count, info.field_init, info.field_count, info.buffer_init, info.buffer_count, @@ -149,8 +148,7 @@ 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:")); + "Initializing Device/Processor/Thermal objects by executing _INI methods:")); /* Tree analysis: find all subtrees that contain _INI methods */ @@ -182,8 +180,7 @@ acpi_status acpi_ns_initialize_devices(void) } ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, - "\nExecuted %hd _INI methods requiring %hd _STA executions " - "(examined %hd objects)\n", + "\nExecuted %hd _INI methods requiring %hd _STA executions (examined %hd objects)\n", info.num_INI, info.num_STA, info.device_count)); return_ACPI_STATUS(status); @@ -266,14 +263,16 @@ acpi_ns_init_one_object(acpi_handle obj_handle, return (AE_OK); } - /* If the object is already initialized, nothing else to do */ - + /* + * If the object is already initialized, nothing else to do + */ if (obj_desc->common.flags & AOPOBJ_DATA_VALID) { return (AE_OK); } - /* Must lock the interpreter before executing AML code */ - + /* + * Must lock the interpreter before executing AML code + */ acpi_ex_enter_interpreter(); /* diff --git a/trunk/drivers/acpi/acpica/nsload.c b/trunk/drivers/acpi/acpica/nsload.c index dcd7a6adbbbc..a0ba9e12379e 100644 --- a/trunk/drivers/acpi/acpica/nsload.c +++ b/trunk/drivers/acpi/acpica/nsload.c @@ -128,12 +128,12 @@ acpi_ns_load_table(u32 table_index, struct acpi_namespace_node *node) * parse trees. */ ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "**** Begin Table Method Parsing and Object Initialization\n")); + "**** Begin Table Method Parsing and Object Initialization ****\n")); status = acpi_ds_initialize_objects(table_index, node); ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "**** Completed Table Method Parsing and Object Initialization\n")); + "**** Completed Table Method Parsing and Object Initialization ****\n")); return_ACPI_STATUS(status); } diff --git a/trunk/drivers/acpi/acpica/nsobject.c b/trunk/drivers/acpi/acpica/nsobject.c index 3eb20bfda9d8..08a97a57f8f9 100644 --- a/trunk/drivers/acpi/acpica/nsobject.c +++ b/trunk/drivers/acpi/acpica/nsobject.c @@ -209,7 +209,8 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node) obj_desc = node->object; - if (!obj_desc || (obj_desc->common.type == ACPI_TYPE_LOCAL_DATA)) { + if (!obj_desc || + (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA)) { return_VOID; } @@ -219,7 +220,8 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node) if (ACPI_GET_DESCRIPTOR_TYPE(obj_desc) == ACPI_DESC_TYPE_OPERAND) { node->object = obj_desc->common.next_object; if (node->object && - ((node->object)->common.type != ACPI_TYPE_LOCAL_DATA)) { + (ACPI_GET_OBJECT_TYPE(node->object) != + ACPI_TYPE_LOCAL_DATA)) { node->object = node->object->common.next_object; } } @@ -265,7 +267,7 @@ union acpi_operand_object *acpi_ns_get_attached_object(struct ((ACPI_GET_DESCRIPTOR_TYPE(node->object) != ACPI_DESC_TYPE_OPERAND) && (ACPI_GET_DESCRIPTOR_TYPE(node->object) != ACPI_DESC_TYPE_NAMED)) - || ((node->object)->common.type == ACPI_TYPE_LOCAL_DATA)) { + || (ACPI_GET_OBJECT_TYPE(node->object) == ACPI_TYPE_LOCAL_DATA)) { return_PTR(NULL); } @@ -292,9 +294,9 @@ union acpi_operand_object *acpi_ns_get_secondary_object(union ACPI_FUNCTION_TRACE_PTR(ns_get_secondary_object, obj_desc); if ((!obj_desc) || - (obj_desc->common.type == ACPI_TYPE_LOCAL_DATA) || + (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) || (!obj_desc->common.next_object) || - ((obj_desc->common.next_object)->common.type == + (ACPI_GET_OBJECT_TYPE(obj_desc->common.next_object) == ACPI_TYPE_LOCAL_DATA)) { return_PTR(NULL); } @@ -329,7 +331,7 @@ acpi_ns_attach_data(struct acpi_namespace_node *node, prev_obj_desc = NULL; obj_desc = node->object; while (obj_desc) { - if ((obj_desc->common.type == ACPI_TYPE_LOCAL_DATA) && + if ((ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) && (obj_desc->data.handler == handler)) { return (AE_ALREADY_EXISTS); } @@ -383,7 +385,7 @@ acpi_ns_detach_data(struct acpi_namespace_node * node, prev_obj_desc = NULL; obj_desc = node->object; while (obj_desc) { - if ((obj_desc->common.type == ACPI_TYPE_LOCAL_DATA) && + if ((ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) && (obj_desc->data.handler == handler)) { if (prev_obj_desc) { prev_obj_desc->common.next_object = @@ -426,7 +428,7 @@ acpi_ns_get_attached_data(struct acpi_namespace_node * node, obj_desc = node->object; while (obj_desc) { - if ((obj_desc->common.type == ACPI_TYPE_LOCAL_DATA) && + if ((ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_LOCAL_DATA) && (obj_desc->data.handler == handler)) { *data = obj_desc->data.pointer; return (AE_OK); diff --git a/trunk/drivers/acpi/acpica/nsparse.c b/trunk/drivers/acpi/acpica/nsparse.c index 662a4bd5b621..b9e8d0070b6f 100644 --- a/trunk/drivers/acpi/acpica/nsparse.c +++ b/trunk/drivers/acpi/acpica/nsparse.c @@ -176,8 +176,9 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node) * performs another complete parse of the AML. */ ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 1\n")); - status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, - table_index, start_node); + status = + acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS1, table_index, + start_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -192,8 +193,9 @@ acpi_ns_parse_table(u32 table_index, struct acpi_namespace_node *start_node) * parse objects are all cached. */ ACPI_DEBUG_PRINT((ACPI_DB_PARSE, "**** Start pass 2\n")); - status = acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, - table_index, start_node); + status = + acpi_ns_one_complete_parse(ACPI_IMODE_LOAD_PASS2, table_index, + start_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } diff --git a/trunk/drivers/acpi/acpica/nspredef.c b/trunk/drivers/acpi/acpica/nspredef.c index d9e8cbc6e679..452703290d35 100644 --- a/trunk/drivers/acpi/acpica/nspredef.c +++ b/trunk/drivers/acpi/acpica/nspredef.c @@ -79,9 +79,7 @@ acpi_ns_check_package(char *pathname, static acpi_status acpi_ns_check_package_elements(char *pathname, union acpi_operand_object **elements, - u8 type1, - u32 count1, - u8 type2, u32 count2, u32 start_index); + u8 type1, u32 count1, u8 type2, u32 count2); static acpi_status acpi_ns_check_object_type(char *pathname, @@ -223,7 +221,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, /* For returned Package objects, check the type of all sub-objects */ - if (return_object->common.type == ACPI_TYPE_PACKAGE) { + if (ACPI_GET_OBJECT_TYPE(return_object) == ACPI_TYPE_PACKAGE) { status = acpi_ns_check_package(pathname, return_object_ptr, predefined); @@ -304,8 +302,7 @@ acpi_ns_check_parameter_count(char *pathname, if ((user_param_count != required_params_current) && (user_param_count != required_params_old)) { ACPI_WARNING((AE_INFO, - "%s: Parameter count mismatch - " - "caller passed %d, ACPI requires %d", + "%s: Parameter count mismatch - caller passed %d, ACPI requires %d", pathname, user_param_count, required_params_current)); } @@ -475,7 +472,7 @@ acpi_ns_check_package(char *pathname, package->ret_info. object_type2, package->ret_info. - count2, 0); + count2); if (ACPI_FAILURE(status)) { return (status); } @@ -626,7 +623,7 @@ acpi_ns_check_package(char *pathname, object_type2, package-> ret_info. - count2, 0); + count2); if (ACPI_FAILURE(status)) { return (status); } @@ -675,8 +672,7 @@ acpi_ns_check_package(char *pathname, object_type1, sub_package-> package. - count, 0, 0, - 0); + count, 0, 0); if (ACPI_FAILURE(status)) { return (status); } @@ -714,8 +710,7 @@ acpi_ns_check_package(char *pathname, ret_info. object_type1, (expected_count - - 1), 0, 0, - 1); + - 1), 0, 0); if (ACPI_FAILURE(status)) { return (status); } @@ -763,7 +758,6 @@ acpi_ns_check_package(char *pathname, * Count1 - Count for first group * Type2 - Object type for second group * Count2 - Count for second group - * start_index - Start of the first group of elements * * RETURN: Status * @@ -775,9 +769,7 @@ acpi_ns_check_package(char *pathname, static acpi_status acpi_ns_check_package_elements(char *pathname, union acpi_operand_object **elements, - u8 type1, - u32 count1, - u8 type2, u32 count2, u32 start_index) + u8 type1, u32 count1, u8 type2, u32 count2) { union acpi_operand_object **this_element = elements; acpi_status status; @@ -790,7 +782,7 @@ acpi_ns_check_package_elements(char *pathname, */ for (i = 0; i < count1; i++) { status = acpi_ns_check_object_type(pathname, this_element, - type1, i + start_index); + type1, i); if (ACPI_FAILURE(status)) { return (status); } @@ -799,8 +791,7 @@ acpi_ns_check_package_elements(char *pathname, for (i = 0; i < count2; i++) { status = acpi_ns_check_object_type(pathname, this_element, - type2, - (i + count1 + start_index)); + type2, (i + count1)); if (ACPI_FAILURE(status)) { return (status); } @@ -867,7 +858,7 @@ acpi_ns_check_object_type(char *pathname, * from all of the predefined names (including elements of returned * packages) */ - switch (return_object->common.type) { + switch (ACPI_GET_OBJECT_TYPE(return_object)) { case ACPI_TYPE_INTEGER: return_btype = ACPI_RTYPE_INTEGER; break; @@ -910,7 +901,7 @@ acpi_ns_check_object_type(char *pathname, /* For reference objects, check that the reference type is correct */ - if (return_object->common.type == ACPI_TYPE_LOCAL_REFERENCE) { + if (ACPI_GET_OBJECT_TYPE(return_object) == ACPI_TYPE_LOCAL_REFERENCE) { status = acpi_ns_check_reference(pathname, return_object); } @@ -983,8 +974,7 @@ acpi_ns_check_reference(char *pathname, } ACPI_WARNING((AE_INFO, - "%s: Return type mismatch - " - "unexpected reference object type [%s] %2.2X", + "%s: Return type mismatch - unexpected reference object type [%s] %2.2X", pathname, acpi_ut_get_reference_name(return_object), return_object->reference.class)); @@ -1016,7 +1006,7 @@ acpi_ns_repair_object(u32 expected_btypes, union acpi_operand_object *new_object; acpi_size length; - switch (return_object->common.type) { + switch (ACPI_GET_OBJECT_TYPE(return_object)) { case ACPI_TYPE_BUFFER: if (!(expected_btypes & ACPI_RTYPE_STRING)) { diff --git a/trunk/drivers/acpi/acpica/nssearch.c b/trunk/drivers/acpi/acpica/nssearch.c index f9b4f51bf8f2..6fea13f3f52d 100644 --- a/trunk/drivers/acpi/acpica/nssearch.c +++ b/trunk/drivers/acpi/acpica/nssearch.c @@ -167,8 +167,7 @@ acpi_ns_search_one_scope(u32 target_name, /* Searched entire namespace level, not found */ ACPI_DEBUG_PRINT((ACPI_DB_NAMES, - "Name [%4.4s] (%s) not found in search in scope [%4.4s] " - "%p first child %p\n", + "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, @@ -240,8 +239,9 @@ acpi_ns_search_parent_tree(u32 target_name, acpi_ut_get_node_name(parent_node), ACPI_CAST_PTR(char, &target_name))); - /* Search parents until target is found or we have backed up to the root */ - + /* + * Search parents until target is found or we have backed up to the root + */ while (parent_node) { /* * Search parent scope. Use TYPE_ANY because we don't care about the @@ -395,9 +395,9 @@ acpi_ns_search_and_enter(u32 target_name, return_ACPI_STATUS(AE_NO_MEMORY); } #ifdef ACPI_ASL_COMPILER - - /* Node is an object defined by an External() statement */ - + /* + * Node is an object defined by an External() statement + */ if (flags & ACPI_NS_EXTERNAL) { new_node->flags |= ANOBJ_IS_EXTERNAL; } diff --git a/trunk/drivers/acpi/acpica/nsutils.c b/trunk/drivers/acpi/acpica/nsutils.c index 78277ed08339..3e1149bf4aa5 100644 --- a/trunk/drivers/acpi/acpica/nsutils.c +++ b/trunk/drivers/acpi/acpica/nsutils.c @@ -325,8 +325,9 @@ void acpi_ns_get_internal_name_length(struct acpi_namestring_info *info) next_external_char++; } } else { - /* Handle Carat prefixes */ - + /* + * Handle Carat prefixes + */ while (*next_external_char == '^') { info->num_carats++; next_external_char++; @@ -551,8 +552,9 @@ acpi_ns_externalize_name(u32 internal_name_length, return_ACPI_STATUS(AE_BAD_PARAMETER); } - /* Check for a prefix (one '\' | one or more '^') */ - + /* + * Check for a prefix (one '\' | one or more '^'). + */ switch (internal_name[0]) { case '\\': prefix_length = 1; @@ -578,7 +580,7 @@ acpi_ns_externalize_name(u32 internal_name_length, } /* - * Check for object names. Note that there could be 0-255 of these + * Check for object names. Note that there could be 0-255 of these * 4-byte elements. */ if (prefix_length < internal_name_length) { @@ -635,8 +637,9 @@ acpi_ns_externalize_name(u32 internal_name_length, return_ACPI_STATUS(AE_BAD_PATHNAME); } - /* Build the converted_name */ - + /* + * Build converted_name + */ *converted_name = ACPI_ALLOCATE_ZEROED(required_length); if (!(*converted_name)) { return_ACPI_STATUS(AE_NO_MEMORY); @@ -682,9 +685,6 @@ acpi_ns_externalize_name(u32 internal_name_length, * and keep all pointers within this subsystem - however this introduces * more (and perhaps unnecessary) overhead. * - * The current implemenation is basically a placeholder until such time comes - * that it is needed. - * ******************************************************************************/ struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle) @@ -692,8 +692,9 @@ struct acpi_namespace_node *acpi_ns_map_handle_to_node(acpi_handle handle) ACPI_FUNCTION_ENTRY(); - /* Parameter validation */ - + /* + * Simple implementation + */ if ((!handle) || (handle == ACPI_ROOT_OBJECT)) { return (acpi_gbl_root_node); } @@ -871,7 +872,7 @@ acpi_ns_get_node(struct acpi_namespace_node *prefix_node, (flags | ACPI_NS_DONT_OPEN_SCOPE), NULL, return_node); if (ACPI_FAILURE(status)) { - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s, %s\n", + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s, %s\n", pathname, acpi_format_exception(status))); } diff --git a/trunk/drivers/acpi/acpica/nswalk.c b/trunk/drivers/acpi/acpica/nswalk.c index 83e3aa6d4b9b..200895fa2728 100644 --- a/trunk/drivers/acpi/acpica/nswalk.c +++ b/trunk/drivers/acpi/acpica/nswalk.c @@ -135,8 +135,8 @@ struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, struct * starting (and ending) at the node specified by start_handle. * The user_function is called whenever a node that matches * the type parameter is found. If the user function returns - * a non-zero value, the search is terminated immediately and - * this value is returned to the caller. + * a non-zero value, the search is terminated immediately and this + * value is returned to the caller. * * The point of this procedure is to provide a generic namespace * walk routine that can be called from multiple places to @@ -200,10 +200,10 @@ acpi_ns_walk_namespace(acpi_object_type type, /* * Ignore all temporary namespace nodes (created during control * method execution) unless told otherwise. These temporary nodes - * can cause a race condition because they can be deleted during - * the execution of the user function (if the namespace is - * unlocked before invocation of the user function.) Only the - * debugger namespace dump will examine the temporary nodes. + * can cause a race condition because they can be deleted during the + * execution of the user function (if the namespace is unlocked before + * invocation of the user function.) Only the debugger namespace dump + * will examine the temporary nodes. */ if ((child_node->flags & ANOBJ_TEMPORARY) && !(flags & ACPI_NS_WALK_TEMP_NODES)) { diff --git a/trunk/drivers/acpi/acpica/nsxfeval.c b/trunk/drivers/acpi/acpica/nsxfeval.c index 045054037c2d..22a7171ac1ed 100644 --- a/trunk/drivers/acpi/acpica/nsxfeval.c +++ b/trunk/drivers/acpi/acpica/nsxfeval.c @@ -387,7 +387,8 @@ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info) /* We are interested in reference objects only */ - if ((info->return_object)->common.type != ACPI_TYPE_LOCAL_REFERENCE) { + if (ACPI_GET_OBJECT_TYPE(info->return_object) != + ACPI_TYPE_LOCAL_REFERENCE) { return; } @@ -475,40 +476,21 @@ acpi_walk_namespace(acpi_object_type type, } /* - * Need to acquire the namespace reader lock to prevent interference - * with any concurrent table unloads (which causes the deletion of - * namespace objects). We cannot allow the deletion of a namespace node - * while the user function is using it. The exception to this are the - * nodes created and deleted during control method execution -- these - * nodes are marked as temporary nodes and are ignored by the namespace - * walk. Thus, control methods can be executed while holding the - * namespace deletion lock (and the user function can execute control - * methods.) - */ - status = acpi_ut_acquire_read_lock(&acpi_gbl_namespace_rw_lock); - if (ACPI_FAILURE(status)) { - return status; - } - - /* - * Lock the namespace around the walk. The namespace will be - * unlocked/locked around each call to the user function - since the user - * function must be allowed to make ACPICA calls itself (for example, it - * will typically execute control methods during device enumeration.) + * Lock the namespace around the walk. + * The namespace will be unlocked/locked around each call + * to the user function - since this function + * must be allowed to make Acpi calls itself. */ status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { - goto unlock_and_exit; + return_ACPI_STATUS(status); } status = acpi_ns_walk_namespace(type, start_object, max_depth, - ACPI_NS_WALK_UNLOCK, user_function, - context, return_value); + ACPI_NS_WALK_UNLOCK, + user_function, context, return_value); (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); - - unlock_and_exit: - (void)acpi_ut_release_read_lock(&acpi_gbl_namespace_rw_lock); return_ACPI_STATUS(status); } diff --git a/trunk/drivers/acpi/acpica/rscalc.c b/trunk/drivers/acpi/acpica/rscalc.c index b6667ff059e5..52865ee6bc77 100644 --- a/trunk/drivers/acpi/acpica/rscalc.c +++ b/trunk/drivers/acpi/acpica/rscalc.c @@ -557,9 +557,9 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, table_index++) { if (*sub_object_list && /* Null object allowed */ ((ACPI_TYPE_STRING == - (*sub_object_list)->common.type) || + ACPI_GET_OBJECT_TYPE(*sub_object_list)) || ((ACPI_TYPE_LOCAL_REFERENCE == - (*sub_object_list)->common.type) && + ACPI_GET_OBJECT_TYPE(*sub_object_list)) && ((*sub_object_list)->reference.class == ACPI_REFCLASS_NAME)))) { name_found = TRUE; @@ -575,7 +575,8 @@ acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, /* Was a String type found? */ if (name_found) { - if ((*sub_object_list)->common.type == ACPI_TYPE_STRING) { + if (ACPI_GET_OBJECT_TYPE(*sub_object_list) == + ACPI_TYPE_STRING) { /* * The length String.Length field does not include the * terminating NULL, add 1 diff --git a/trunk/drivers/acpi/acpica/rscreate.c b/trunk/drivers/acpi/acpica/rscreate.c index 663f692fffcf..61566b1a0616 100644 --- a/trunk/drivers/acpi/acpica/rscreate.c +++ b/trunk/drivers/acpi/acpica/rscreate.c @@ -212,7 +212,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, /* Each element of the top-level package must also be a package */ - if ((*top_object_list)->common.type != ACPI_TYPE_PACKAGE) { + if (ACPI_GET_OBJECT_TYPE(*top_object_list) != ACPI_TYPE_PACKAGE) { ACPI_ERROR((AE_INFO, "(PRT[%X]) Need sub-package, found %s", index, @@ -240,7 +240,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, /* 1) First subobject: Dereference the PRT.Address */ obj_desc = sub_object_list[0]; - if (obj_desc->common.type != ACPI_TYPE_INTEGER) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_INTEGER) { ACPI_ERROR((AE_INFO, "(PRT[%X].Address) Need Integer, found %s", index, @@ -253,7 +253,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, /* 2) Second subobject: Dereference the PRT.Pin */ obj_desc = sub_object_list[1]; - if (obj_desc->common.type != ACPI_TYPE_INTEGER) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_INTEGER) { ACPI_ERROR((AE_INFO, "(PRT[%X].Pin) Need Integer, found %s", index, @@ -265,7 +265,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, * If BIOS erroneously reversed the _PRT source_name and source_index, * then reverse them back. */ - if ((sub_object_list[3])->common.type != + if (ACPI_GET_OBJECT_TYPE(sub_object_list[3]) != ACPI_TYPE_INTEGER) { if (acpi_gbl_enable_interpreter_slack) { source_name_index = 3; @@ -291,7 +291,8 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, * other ACPI implementations. */ obj_desc = sub_object_list[3]; - if (!obj_desc || (obj_desc->common.type != ACPI_TYPE_INTEGER)) { + if (!obj_desc + || (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_INTEGER)) { sub_object_list[3] = sub_object_list[2]; sub_object_list[2] = obj_desc; @@ -306,7 +307,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, */ obj_desc = sub_object_list[source_name_index]; if (obj_desc) { - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_LOCAL_REFERENCE: if (obj_desc->reference.class != @@ -379,7 +380,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, /* 4) Fourth subobject: Dereference the PRT.source_index */ obj_desc = sub_object_list[source_index_index]; - if (obj_desc->common.type != ACPI_TYPE_INTEGER) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_INTEGER) { ACPI_ERROR((AE_INFO, "(PRT[%X].SourceIndex) Need Integer, found %s", index, diff --git a/trunk/drivers/acpi/acpica/tbfadt.c b/trunk/drivers/acpi/acpica/tbfadt.c index 71e655d14cb0..3636e4f8fb73 100644 --- a/trunk/drivers/acpi/acpica/tbfadt.c +++ b/trunk/drivers/acpi/acpica/tbfadt.c @@ -57,8 +57,6 @@ static void acpi_tb_convert_fadt(void); static void acpi_tb_validate_fadt(void); -static void acpi_tb_setup_fadt_registers(void); - /* Table for conversion of FADT to common internal format and FADT validation */ typedef struct acpi_fadt_info { @@ -132,38 +130,7 @@ static struct acpi_fadt_info fadt_info_table[] = { ACPI_FADT_SEPARATE_LENGTH} }; -#define ACPI_FADT_INFO_ENTRIES \ - (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info)) - -/* Table used to split Event Blocks into separate status/enable registers */ - -typedef struct acpi_fadt_pm_info { - struct acpi_generic_address *target; - u8 source; - u8 register_num; - -} acpi_fadt_pm_info; - -static struct acpi_fadt_pm_info fadt_pm_info_table[] = { - {&acpi_gbl_xpm1a_status, - ACPI_FADT_OFFSET(xpm1a_event_block), - 0}, - - {&acpi_gbl_xpm1a_enable, - ACPI_FADT_OFFSET(xpm1a_event_block), - 1}, - - {&acpi_gbl_xpm1b_status, - ACPI_FADT_OFFSET(xpm1b_event_block), - 0}, - - {&acpi_gbl_xpm1b_enable, - ACPI_FADT_OFFSET(xpm1b_event_block), - 1} -}; - -#define ACPI_FADT_PM_INFO_ENTRIES \ - (sizeof (fadt_pm_info_table) / sizeof (struct acpi_fadt_pm_info)) +#define ACPI_FADT_INFO_ENTRIES (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info)) /******************************************************************************* * @@ -205,6 +172,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, * FUNCTION: acpi_tb_parse_fadt * * PARAMETERS: table_index - Index for the FADT + * Flags - Flags * * RETURN: None * @@ -213,7 +181,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address, * ******************************************************************************/ -void acpi_tb_parse_fadt(u32 table_index) +void acpi_tb_parse_fadt(u32 table_index, u8 flags) { u32 length; struct acpi_table_header *table; @@ -240,7 +208,7 @@ void acpi_tb_parse_fadt(u32 table_index) */ (void)acpi_tb_verify_checksum(table, length); - /* Create a local copy of the FADT in common ACPI 2.0+ format */ + /* Obtain a local copy of the FADT in common ACPI 2.0+ format */ acpi_tb_create_local_fadt(table, length); @@ -251,10 +219,10 @@ void acpi_tb_parse_fadt(u32 table_index) /* Obtain the DSDT and FACS tables via their addresses within the FADT */ acpi_tb_install_table((acpi_physical_address) acpi_gbl_FADT.Xdsdt, - ACPI_SIG_DSDT, ACPI_TABLE_INDEX_DSDT); + flags, ACPI_SIG_DSDT, ACPI_TABLE_INDEX_DSDT); acpi_tb_install_table((acpi_physical_address) acpi_gbl_FADT.Xfacs, - ACPI_SIG_FACS, ACPI_TABLE_INDEX_FACS); + flags, ACPI_SIG_FACS, ACPI_TABLE_INDEX_FACS); } /******************************************************************************* @@ -298,17 +266,11 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) ACPI_MEMCPY(&acpi_gbl_FADT, table, ACPI_MIN(length, sizeof(struct acpi_table_fadt))); - /* Convert the local copy of the FADT to the common internal format */ - + /* + * 1) Convert the local copy of the FADT to the common internal format + * 2) Validate some of the important values within the FADT + */ acpi_tb_convert_fadt(); - - /* Validate FADT values now, before we make any changes */ - - acpi_tb_validate_fadt(); - - /* Initialize the global ACPI register structures */ - - acpi_tb_setup_fadt_registers(); } /******************************************************************************* @@ -320,35 +282,31 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length) * RETURN: None * * DESCRIPTION: Converts all versions of the FADT to a common internal format. - * Expand 32-bit addresses to 64-bit as necessary. + * Expand all 32-bit addresses to 64-bit. * * NOTE: acpi_gbl_FADT must be of size (struct acpi_table_fadt), * and must contain a copy of the actual FADT. * - * Notes on 64-bit register addresses: - * - * After this FADT conversion, later ACPICA code will only use the 64-bit "X" - * fields of the FADT for all ACPI register addresses. + * ACPICA will use the "X" fields of the FADT for all addresses. * - * The 64-bit "X" fields are optional extensions to the original 32-bit FADT - * V1.0 fields. Even if they are present in the FADT, they are optional and - * are unused if the BIOS sets them to zero. Therefore, we must copy/expand - * 32-bit V1.0 fields if the corresponding X field is zero. + * "X" fields are optional extensions to the original V1.0 fields. Even if + * they are present in the structure, they can be optionally not used by + * setting them to zero. Therefore, we must selectively expand V1.0 fields + * if the corresponding X field is zero. * - * For ACPI 1.0 FADTs, all 32-bit address fields are expanded to the - * corresponding "X" fields in the internal FADT. + * For ACPI 1.0 FADTs, all address fields are expanded to the corresponding + * "X" fields. * - * For ACPI 2.0+ FADTs, all valid (non-zero) 32-bit address fields are expanded - * to the corresponding 64-bit X fields. For compatibility with other ACPI - * implementations, we ignore the 64-bit field if the 32-bit field is valid, - * regardless of whether the host OS is 32-bit or 64-bit. + * For ACPI 2.0 FADTs, any "X" fields that are NULL are filled in by + * expanding the corresponding ACPI 1.0 field. * ******************************************************************************/ static void acpi_tb_convert_fadt(void) { - struct acpi_generic_address *address64; - u32 address32; + u8 pm1_register_bit_width; + u8 pm1_register_byte_width; + struct acpi_generic_address *target64; u32 i; /* Update the local FADT table header length */ @@ -397,56 +355,140 @@ static void acpi_tb_convert_fadt(void) * Expand the ACPI 1.0 32-bit addresses to the ACPI 2.0 64-bit "X" * generic address structures as necessary. Later code will always use * the 64-bit address structures. - * - * March 2009: - * We now always use the 32-bit address if it is valid (non-null). This - * is not in accordance with the ACPI specification which states that - * the 64-bit address supersedes the 32-bit version, but we do this for - * compatibility with other ACPI implementations. Most notably, in the - * case where both the 32 and 64 versions are non-null, we use the 32-bit - * version. This is the only address that is guaranteed to have been - * tested by the BIOS manufacturer. */ for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) { - address32 = *ACPI_ADD_PTR(u32, - &acpi_gbl_FADT, - fadt_info_table[i].address32); + target64 = + ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT, + fadt_info_table[i].address64); - address64 = ACPI_ADD_PTR(struct acpi_generic_address, - &acpi_gbl_FADT, - fadt_info_table[i].address64); + /* Expand only if the 64-bit X target is null */ - /* - * If both 32- and 64-bit addresses are valid (non-zero), - * they must match. - */ - if (address64->address && address32 && - (address64->address != (u64) address32)) { - ACPI_ERROR((AE_INFO, - "32/64X address mismatch in %s: %8.8X/%8.8X%8.8X, using 32", - fadt_info_table[i].name, address32, - ACPI_FORMAT_UINT64(address64->address))); - } + if (!target64->address) { - /* Always use 32-bit address if it is valid (non-null) */ + /* The space_id is always I/O for the 32-bit legacy address fields */ - if (address32) { - /* - * Copy the 32-bit address to the 64-bit GAS structure. The - * Space ID is always I/O for 32-bit legacy address fields - */ - acpi_tb_init_generic_address(address64, + acpi_tb_init_generic_address(target64, ACPI_ADR_SPACE_SYSTEM_IO, *ACPI_ADD_PTR(u8, &acpi_gbl_FADT, fadt_info_table [i].length), - address32); + (u64) * ACPI_ADD_PTR(u32, + &acpi_gbl_FADT, + fadt_info_table + [i]. + address32)); + } + } + + /* Validate FADT values now, before we make any changes */ + + acpi_tb_validate_fadt(); + + /* + * Optionally check all register lengths against the default values and + * update them if they are incorrect. + */ + if (acpi_gbl_use_default_register_widths) { + for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) { + target64 = + ACPI_ADD_PTR(struct acpi_generic_address, + &acpi_gbl_FADT, + fadt_info_table[i].address64); + + /* + * If a valid register (Address != 0) and the (default_length > 0) + * (Not a GPE register), then check the width against the default. + */ + if ((target64->address) && + (fadt_info_table[i].default_length > 0) && + (fadt_info_table[i].default_length != + target64->bit_width)) { + ACPI_WARNING((AE_INFO, + "Invalid length for %s: %d, using default %d", + fadt_info_table[i].name, + target64->bit_width, + fadt_info_table[i]. + default_length)); + + /* Incorrect size, set width to the default */ + + target64->bit_width = + fadt_info_table[i].default_length; + } } } + + /* + * Get the length of the individual PM1 registers (enable and status). + * Each register is defined to be (event block length / 2). + */ + pm1_register_bit_width = + (u8)ACPI_DIV_2(acpi_gbl_FADT.xpm1a_event_block.bit_width); + pm1_register_byte_width = (u8)ACPI_DIV_8(pm1_register_bit_width); + + /* + * Adjust the lengths of the PM1 Event Blocks so that they can be used to + * access the PM1 status register(s). Use (width / 2) + */ + acpi_gbl_FADT.xpm1a_event_block.bit_width = pm1_register_bit_width; + acpi_gbl_FADT.xpm1b_event_block.bit_width = pm1_register_bit_width; + + /* + * Calculate separate GAS structs for the PM1 Enable registers. + * These addresses do not appear (directly) in the FADT, so it is + * useful to calculate them once, here. + * + * The PM event blocks are split into two register blocks, first is the + * PM Status Register block, followed immediately by the PM Enable + * Register block. Each is of length (xpm1x_event_block.bit_width/2). + * + * On various systems the v2 fields (and particularly the bit widths) + * cannot be relied upon, though. Hence resort to using the v1 length + * here (and warn about the inconsistency). + */ + if (acpi_gbl_FADT.xpm1a_event_block.bit_width + != acpi_gbl_FADT.pm1_event_length * 8) + printk(KERN_WARNING "FADT: " + "X_PM1a_EVT_BLK.bit_width (%u) does not match" + " PM1_EVT_LEN (%u)\n", + acpi_gbl_FADT.xpm1a_event_block.bit_width, + acpi_gbl_FADT.pm1_event_length); + + /* The PM1A register block is required */ + + acpi_tb_init_generic_address(&acpi_gbl_xpm1a_enable, + acpi_gbl_FADT.xpm1a_event_block.space_id, + pm1_register_byte_width, + (acpi_gbl_FADT.xpm1a_event_block.address + + pm1_register_byte_width)); + /* Don't forget to copy space_id of the GAS */ + acpi_gbl_xpm1a_enable.space_id = + acpi_gbl_FADT.xpm1a_event_block.space_id; + + /* The PM1B register block is optional, ignore if not present */ + + if (acpi_gbl_FADT.xpm1b_event_block.address) { + if (acpi_gbl_FADT.xpm1b_event_block.bit_width + != acpi_gbl_FADT.pm1_event_length * 8) + printk(KERN_WARNING "FADT: " + "X_PM1b_EVT_BLK.bit_width (%u) does not match" + " PM1_EVT_LEN (%u)\n", + acpi_gbl_FADT.xpm1b_event_block.bit_width, + acpi_gbl_FADT.pm1_event_length); + acpi_tb_init_generic_address(&acpi_gbl_xpm1b_enable, + acpi_gbl_FADT.xpm1b_event_block.space_id, + pm1_register_byte_width, + (acpi_gbl_FADT.xpm1b_event_block. + address + pm1_register_byte_width)); + /* Don't forget to copy space_id of the GAS */ + acpi_gbl_xpm1b_enable.space_id = + acpi_gbl_FADT.xpm1b_event_block.space_id; + + } } -/******************************************************************************* +/****************************************************************************** * * FUNCTION: acpi_tb_validate_fadt * @@ -483,22 +525,18 @@ static void acpi_tb_validate_fadt(void) (acpi_gbl_FADT.Xfacs != (u64) acpi_gbl_FADT.facs)) { ACPI_WARNING((AE_INFO, "32/64X FACS address mismatch in FADT - " - "%8.8X/%8.8X%8.8X, using 32", + "two FACS tables! %8.8X/%8.8X%8.8X", acpi_gbl_FADT.facs, ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xfacs))); - - acpi_gbl_FADT.Xfacs = (u64) acpi_gbl_FADT.facs; } if (acpi_gbl_FADT.dsdt && (acpi_gbl_FADT.Xdsdt != (u64) acpi_gbl_FADT.dsdt)) { ACPI_WARNING((AE_INFO, "32/64X DSDT address mismatch in FADT - " - "%8.8X/%8.8X%8.8X, using 32", + "two DSDT tables! %8.8X/%8.8X%8.8X", acpi_gbl_FADT.dsdt, ACPI_FORMAT_UINT64(acpi_gbl_FADT.Xdsdt))); - - acpi_gbl_FADT.Xdsdt = (u64) acpi_gbl_FADT.dsdt; } /* Examine all of the 64-bit extended address fields (X fields) */ @@ -523,8 +561,7 @@ static void acpi_tb_validate_fadt(void) * For each extended field, check for length mismatch between the * legacy length field and the corresponding 64-bit X length field. */ - if (address64->address && - (address64->bit_width != ACPI_MUL_8(length))) { + if (address64 && (address64->bit_width != ACPI_MUL_8(length))) { ACPI_WARNING((AE_INFO, "32/64X length mismatch in %s: %d/%d", name, ACPI_MUL_8(length), @@ -538,8 +575,7 @@ static void acpi_tb_validate_fadt(void) */ if (!address64->address || !length) { ACPI_ERROR((AE_INFO, - "Required field %s has zero address and/or length:" - " %8.8X%8.8X/%X", + "Required field %s has zero address and/or length: %8.8X%8.8X/%X", name, ACPI_FORMAT_UINT64(address64-> address), @@ -548,112 +584,27 @@ static void acpi_tb_validate_fadt(void) } else if (fadt_info_table[i].type & ACPI_FADT_SEPARATE_LENGTH) { /* * Field is optional (PM2Control, GPE0, GPE1) AND has its own - * length field. If present, both the address and length must - * be valid. + * length field. If present, both the address and length must be valid. */ - if ((address64->address && !length) || - (!address64->address && length)) { + if ((address64->address && !length) + || (!address64->address && length)) { ACPI_WARNING((AE_INFO, - "Optional field %s has zero address or length: " - "%8.8X%8.8X/%X", + "Optional field %s has zero address or length: %8.8X%8.8X/%X", name, ACPI_FORMAT_UINT64(address64-> address), length)); } } - } -} -/******************************************************************************* - * - * FUNCTION: acpi_tb_setup_fadt_registers - * - * PARAMETERS: None, uses acpi_gbl_FADT. - * - * RETURN: None - * - * DESCRIPTION: Initialize global ACPI PM1 register definitions. Optionally, - * force FADT register definitions to their default lengths. - * - ******************************************************************************/ - -static void acpi_tb_setup_fadt_registers(void) -{ - struct acpi_generic_address *target64; - struct acpi_generic_address *source64; - u8 pm1_register_byte_width; - u32 i; + /* If both 32- and 64-bit addresses are valid (non-zero), they must match */ - /* - * Optionally check all register lengths against the default values and - * update them if they are incorrect. - */ - if (acpi_gbl_use_default_register_widths) { - for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) { - target64 = - ACPI_ADD_PTR(struct acpi_generic_address, - &acpi_gbl_FADT, - fadt_info_table[i].address64); - - /* - * If a valid register (Address != 0) and the (default_length > 0) - * (Not a GPE register), then check the width against the default. - */ - if ((target64->address) && - (fadt_info_table[i].default_length > 0) && - (fadt_info_table[i].default_length != - target64->bit_width)) { - ACPI_WARNING((AE_INFO, - "Invalid length for %s: %d, using default %d", - fadt_info_table[i].name, - target64->bit_width, - fadt_info_table[i]. - default_length)); - - /* Incorrect size, set width to the default */ - - target64->bit_width = - fadt_info_table[i].default_length; - } - } - } - - /* - * Get the length of the individual PM1 registers (enable and status). - * Each register is defined to be (event block length / 2). Extra divide - * by 8 converts bits to bytes. - */ - pm1_register_byte_width = (u8) - ACPI_DIV_16(acpi_gbl_FADT.xpm1a_event_block.bit_width); - - /* - * Calculate separate GAS structs for the PM1x (A/B) Status and Enable - * registers. These addresses do not appear (directly) in the FADT, so it - * is useful to pre-calculate them from the PM1 Event Block definitions. - * - * The PM event blocks are split into two register blocks, first is the - * PM Status Register block, followed immediately by the PM Enable - * Register block. Each is of length (pm1_event_length/2) - * - * Note: The PM1A event block is required by the ACPI specification. - * However, the PM1B event block is optional and is rarely, if ever, - * used. - */ - - for (i = 0; i < ACPI_FADT_PM_INFO_ENTRIES; i++) { - source64 = - ACPI_ADD_PTR(struct acpi_generic_address, &acpi_gbl_FADT, - fadt_pm_info_table[i].source); - - if (source64->address) { - acpi_tb_init_generic_address(fadt_pm_info_table[i]. - target, source64->space_id, - pm1_register_byte_width, - source64->address + - (fadt_pm_info_table[i]. - register_num * - pm1_register_byte_width)); + if (address64->address && *address32 && + (address64->address != (u64) * address32)) { + ACPI_ERROR((AE_INFO, + "32/64X address mismatch in %s: %8.8X/%8.8X%8.8X, using 64X", + name, *address32, + ACPI_FORMAT_UINT64(address64->address))); } } } diff --git a/trunk/drivers/acpi/acpica/tbinstal.c b/trunk/drivers/acpi/acpica/tbinstal.c index f865d5a096de..37374b21969d 100644 --- a/trunk/drivers/acpi/acpica/tbinstal.c +++ b/trunk/drivers/acpi/acpica/tbinstal.c @@ -103,9 +103,7 @@ acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc) * * RETURN: Status * - * DESCRIPTION: This function is called to add an ACPI table. It is used to - * dynamically load tables via the Load and load_table AML - * operators. + * DESCRIPTION: This function is called to add the ACPI table * ******************************************************************************/ @@ -114,7 +112,6 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) { u32 i; acpi_status status = AE_OK; - struct acpi_table_header *override_table = NULL; ACPI_FUNCTION_TRACE(tb_add_table); @@ -204,29 +201,6 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index) } } - /* - * ACPI Table Override: - * Allow the host to override dynamically loaded tables. - */ - status = acpi_os_table_override(table_desc->pointer, &override_table); - if (ACPI_SUCCESS(status) && override_table) { - ACPI_INFO((AE_INFO, - "%4.4s @ 0x%p Table override, replaced with:", - table_desc->pointer->signature, - ACPI_CAST_PTR(void, table_desc->address))); - - /* We can delete the table that was passed as a parameter */ - - acpi_tb_delete_table(table_desc); - - /* Setup descriptor for the new table */ - - table_desc->address = ACPI_PTR_TO_PHYSADDR(override_table); - table_desc->pointer = override_table; - table_desc->length = override_table->length; - table_desc->flags = ACPI_TABLE_ORIGIN_OVERRIDE; - } - /* Add the table to the global root table list */ status = acpi_tb_store_table(table_desc->address, table_desc->pointer, @@ -273,9 +247,8 @@ acpi_status acpi_tb_resize_root_table_list(void) /* Increase the Table Array size */ tables = ACPI_ALLOCATE_ZEROED(((acpi_size) acpi_gbl_root_table_list. - size + - ACPI_ROOT_TABLE_SIZE_INCREMENT) * - sizeof(struct acpi_table_desc)); + size + ACPI_ROOT_TABLE_SIZE_INCREMENT) + * sizeof(struct acpi_table_desc)); if (!tables) { ACPI_ERROR((AE_INFO, "Could not allocate new root table array")); @@ -434,56 +407,27 @@ void acpi_tb_terminate(void) * * PARAMETERS: table_index - Table index * - * RETURN: Status + * RETURN: None * * DESCRIPTION: Delete all namespace objects created when this table was loaded. * ******************************************************************************/ -acpi_status acpi_tb_delete_namespace_by_owner(u32 table_index) +void acpi_tb_delete_namespace_by_owner(u32 table_index) { acpi_owner_id owner_id; - acpi_status status; - - ACPI_FUNCTION_TRACE(tb_delete_namespace_by_owner); - - status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - if (table_index >= acpi_gbl_root_table_list.count) { - - /* The table index does not exist */ + (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); + if (table_index < acpi_gbl_root_table_list.count) { + owner_id = + acpi_gbl_root_table_list.tables[table_index].owner_id; + } else { (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); - return_ACPI_STATUS(AE_NOT_EXIST); + return; } - /* Get the owner ID for this table, used to delete namespace nodes */ - - owner_id = acpi_gbl_root_table_list.tables[table_index].owner_id; (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); - - /* - * Need to acquire the namespace writer lock to prevent interference - * with any concurrent namespace walks. The interpreter must be - * released during the deletion since the acquisition of the deletion - * lock may block, and also since the execution of a namespace walk - * must be allowed to use the interpreter. - */ - acpi_ut_release_mutex(ACPI_MTX_INTERPRETER); - status = acpi_ut_acquire_write_lock(&acpi_gbl_namespace_rw_lock); - acpi_ns_delete_namespace_by_owner(owner_id); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - acpi_ut_release_write_lock(&acpi_gbl_namespace_rw_lock); - - status = acpi_ut_acquire_mutex(ACPI_MTX_INTERPRETER); - return_ACPI_STATUS(status); } /******************************************************************************* @@ -591,8 +535,8 @@ u8 acpi_tb_is_table_loaded(u32 table_index) (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); if (table_index < acpi_gbl_root_table_list.count) { is_loaded = (u8) - (acpi_gbl_root_table_list.tables[table_index].flags & - ACPI_TABLE_IS_LOADED); + (acpi_gbl_root_table_list.tables[table_index]. + flags & ACPI_TABLE_IS_LOADED); } (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); diff --git a/trunk/drivers/acpi/acpica/tbutils.c b/trunk/drivers/acpi/acpica/tbutils.c index ef7d2c2d8f0b..22ce48985720 100644 --- a/trunk/drivers/acpi/acpica/tbutils.c +++ b/trunk/drivers/acpi/acpica/tbutils.c @@ -177,23 +177,19 @@ acpi_tb_print_table_header(acpi_physical_address address, struct acpi_table_header *header) { - /* - * The reason that the Address is cast to a void pointer is so that we - * can use %p which will work properly on both 32-bit and 64-bit hosts. - */ if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) { - /* FACS only has signature and length fields */ + /* FACS only has signature and length fields of common table header */ - ACPI_INFO((AE_INFO, "%4.4s %p %05X", - header->signature, ACPI_CAST_PTR(void, address), + ACPI_INFO((AE_INFO, "%4.4s %08lX, %04X", + header->signature, (unsigned long)address, header->length)); } else if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_RSDP)) { /* RSDP has no common fields */ - ACPI_INFO((AE_INFO, "RSDP %p %05X (v%.2d %6.6s)", - ACPI_CAST_PTR (void, address), + ACPI_INFO((AE_INFO, "RSDP %08lX, %04X (r%d %6.6s)", + (unsigned long)address, (ACPI_CAST_PTR(struct acpi_table_rsdp, header)-> revision > 0) ? ACPI_CAST_PTR(struct acpi_table_rsdp, @@ -206,8 +202,8 @@ acpi_tb_print_table_header(acpi_physical_address address, /* Standard ACPI table with full common header */ ACPI_INFO((AE_INFO, - "%4.4s %p %05X (v%.2d %6.6s %8.8s %08X %4.4s %08X)", - header->signature, ACPI_CAST_PTR (void, address), + "%4.4s %08lX, %04X (r%d %6.6s %8.8s %8X %4.4s %8X)", + header->signature, (unsigned long)address, header->length, header->revision, header->oem_id, header->oem_table_id, header->oem_revision, header->asl_compiler_id, @@ -284,28 +280,22 @@ u8 acpi_tb_checksum(u8 *buffer, u32 length) * FUNCTION: acpi_tb_install_table * * PARAMETERS: Address - Physical address of DSDT or FACS + * Flags - Flags * Signature - Table signature, NULL if no need to * match * table_index - Index into root table array * * RETURN: None * - * DESCRIPTION: Install an ACPI table into the global data structure. The - * table override mechanism is implemented here to allow the host - * OS to replace any table before it is installed in the root - * table array. + * DESCRIPTION: Install an ACPI table into the global data structure. * ******************************************************************************/ void acpi_tb_install_table(acpi_physical_address address, - char *signature, u32 table_index) + u8 flags, char *signature, u32 table_index) { - u8 flags; - acpi_status status; - struct acpi_table_header *table_to_install; - struct acpi_table_header *mapped_table; - struct acpi_table_header *override_table = NULL; + struct acpi_table_header *table; if (!address) { ACPI_ERROR((AE_INFO, @@ -316,69 +306,41 @@ acpi_tb_install_table(acpi_physical_address address, /* Map just the table header */ - mapped_table = - acpi_os_map_memory(address, sizeof(struct acpi_table_header)); - if (!mapped_table) { + table = acpi_os_map_memory(address, sizeof(struct acpi_table_header)); + if (!table) { return; } - /* If a particular signature is expected (DSDT/FACS), it must match */ + /* If a particular signature is expected, signature must match */ - if (signature && !ACPI_COMPARE_NAME(mapped_table->signature, signature)) { + if (signature && !ACPI_COMPARE_NAME(table->signature, signature)) { ACPI_ERROR((AE_INFO, - "Invalid signature 0x%X for ACPI table, expected [%s]", - *ACPI_CAST_PTR(u32, mapped_table->signature), - signature)); + "Invalid signature 0x%X for ACPI table [%s]", + *ACPI_CAST_PTR(u32, table->signature), signature)); goto unmap_and_exit; } - /* - * ACPI Table Override: - * - * Before we install the table, let the host OS override it with a new - * one if desired. Any table within the RSDT/XSDT can be replaced, - * including the DSDT which is pointed to by the FADT. - */ - status = acpi_os_table_override(mapped_table, &override_table); - if (ACPI_SUCCESS(status) && override_table) { - ACPI_INFO((AE_INFO, - "%4.4s @ 0x%p Table override, replaced with:", - mapped_table->signature, ACPI_CAST_PTR(void, - address))); - - acpi_gbl_root_table_list.tables[table_index].pointer = - override_table; - address = ACPI_PTR_TO_PHYSADDR(override_table); - - table_to_install = override_table; - flags = ACPI_TABLE_ORIGIN_OVERRIDE; - } else { - table_to_install = mapped_table; - flags = ACPI_TABLE_ORIGIN_MAPPED; - } - /* Initialize the table entry */ acpi_gbl_root_table_list.tables[table_index].address = address; - acpi_gbl_root_table_list.tables[table_index].length = - table_to_install->length; + acpi_gbl_root_table_list.tables[table_index].length = table->length; acpi_gbl_root_table_list.tables[table_index].flags = flags; ACPI_MOVE_32_TO_32(& (acpi_gbl_root_table_list.tables[table_index]. - signature), table_to_install->signature); + signature), table->signature); - acpi_tb_print_table_header(address, table_to_install); + acpi_tb_print_table_header(address, table); if (table_index == ACPI_TABLE_INDEX_DSDT) { /* Global integer width is based upon revision of the DSDT */ - acpi_ut_set_integer_width(table_to_install->revision); + acpi_ut_set_integer_width(table->revision); } unmap_and_exit: - acpi_os_unmap_memory(mapped_table, sizeof(struct acpi_table_header)); + acpi_os_unmap_memory(table, sizeof(struct acpi_table_header)); } /******************************************************************************* @@ -417,8 +379,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) } else { /* * 32-bit platform, XSDT: Truncate 64-bit to 32-bit and return - * 64-bit platform, XSDT: Move (unaligned) 64-bit to local, - * return 64-bit + * 64-bit platform, XSDT: Move (unaligned) 64-bit to local, return 64-bit */ ACPI_MOVE_64_TO_64(&address64, table_entry); @@ -428,8 +389,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) /* Will truncate 64-bit address to 32 bits, issue warning */ ACPI_WARNING((AE_INFO, - "64-bit Physical Address in XSDT is too large (%8.8X%8.8X)," - " truncating", + "64-bit Physical Address in XSDT is too large (%8.8X%8.8X), truncating", ACPI_FORMAT_UINT64(address64))); } #endif @@ -442,6 +402,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) * FUNCTION: acpi_tb_parse_root_table * * PARAMETERS: Rsdp - Pointer to the RSDP + * Flags - Flags * * RETURN: Status * @@ -455,7 +416,7 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) ******************************************************************************/ acpi_status __init -acpi_tb_parse_root_table(acpi_physical_address rsdp_address) +acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) { struct acpi_table_rsdp *rsdp; u32 table_entry_size; @@ -552,12 +513,13 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address) /* Calculate the number of tables described in the root table */ - table_count = (u32)((table->length - sizeof(struct acpi_table_header)) / - table_entry_size); + table_count = + (u32) ((table->length - + sizeof(struct acpi_table_header)) / table_entry_size); + /* - * First two entries in the table array are reserved for the DSDT - * and FACS, which are not actually present in the RSDT/XSDT - they - * come from the FADT + * First two entries in the table array are reserved for the DSDT and FACS, + * which are not actually present in the RSDT/XSDT - they come from the FADT */ table_entry = ACPI_CAST_PTR(u8, table) + sizeof(struct acpi_table_header); @@ -605,14 +567,14 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address) */ for (i = 2; i < acpi_gbl_root_table_list.count; i++) { acpi_tb_install_table(acpi_gbl_root_table_list.tables[i]. - address, NULL, i); + address, flags, NULL, i); /* Special case for FADT - get the DSDT and FACS */ if (ACPI_COMPARE_NAME (&acpi_gbl_root_table_list.tables[i].signature, ACPI_SIG_FADT)) { - acpi_tb_parse_fadt(i); + acpi_tb_parse_fadt(i, flags); } } diff --git a/trunk/drivers/acpi/acpica/tbxface.c b/trunk/drivers/acpi/acpica/tbxface.c index dbca22651504..c3e841f3cde9 100644 --- a/trunk/drivers/acpi/acpica/tbxface.c +++ b/trunk/drivers/acpi/acpica/tbxface.c @@ -150,7 +150,8 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array, * Root Table Array. This array contains the information of the RSDT/XSDT * in a common, more useable format. */ - status = acpi_tb_parse_root_table(rsdp_address); + status = + acpi_tb_parse_root_table(rsdp_address, ACPI_TABLE_ORIGIN_MAPPED); return_ACPI_STATUS(status); } @@ -246,7 +247,7 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) ACPI_EXPORT_SYMBOL(acpi_load_table) -/******************************************************************************* +/****************************************************************************** * * FUNCTION: acpi_get_table_header * @@ -261,7 +262,7 @@ ACPI_EXPORT_SYMBOL(acpi_load_table) * NOTE: Caller is responsible in unmapping the header with * acpi_os_unmap_memory * - ******************************************************************************/ + *****************************************************************************/ acpi_status acpi_get_table_header(char *signature, u32 instance, struct acpi_table_header *out_table_header) @@ -276,8 +277,9 @@ acpi_get_table_header(char *signature, return (AE_BAD_PARAMETER); } - /* Walk the root table list */ - + /* + * Walk the root table list + */ for (i = 0, j = 0; i < acpi_gbl_root_table_list.count; i++) { if (!ACPI_COMPARE_NAME (&(acpi_gbl_root_table_list.tables[i].signature), @@ -290,8 +292,8 @@ acpi_get_table_header(char *signature, } if (!acpi_gbl_root_table_list.tables[i].pointer) { - if ((acpi_gbl_root_table_list.tables[i].flags & - ACPI_TABLE_ORIGIN_MASK) == + if ((acpi_gbl_root_table_list.tables[i]. + flags & ACPI_TABLE_ORIGIN_MASK) == ACPI_TABLE_ORIGIN_MAPPED) { header = acpi_os_map_memory(acpi_gbl_root_table_list. @@ -322,7 +324,7 @@ acpi_get_table_header(char *signature, ACPI_EXPORT_SYMBOL(acpi_get_table_header) -/******************************************************************************* +/****************************************************************************** * * FUNCTION: acpi_unload_table_id * @@ -373,7 +375,7 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id) * * DESCRIPTION: Finds and verifies an ACPI table. * - ******************************************************************************/ + *****************************************************************************/ acpi_status acpi_get_table(char *signature, u32 instance, struct acpi_table_header **out_table) @@ -388,8 +390,9 @@ acpi_get_table(char *signature, return (AE_BAD_PARAMETER); } - /* Walk the root table list */ - + /* + * Walk the root table list + */ for (i = 0, j = 0; i < acpi_gbl_root_table_list.count; i++) { if (!ACPI_COMPARE_NAME (&(acpi_gbl_root_table_list.tables[i].signature), @@ -488,6 +491,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table_by_index) static acpi_status acpi_tb_load_namespace(void) { acpi_status status; + struct acpi_table_header *table; u32 i; ACPI_FUNCTION_TRACE(tb_load_namespace); @@ -511,28 +515,58 @@ static acpi_status acpi_tb_load_namespace(void) goto unlock_and_exit; } - /* A valid DSDT is required */ + /* + * Find DSDT table + */ + status = + acpi_os_table_override(acpi_gbl_root_table_list. + tables[ACPI_TABLE_INDEX_DSDT].pointer, + &table); + if (ACPI_SUCCESS(status) && table) { + /* + * DSDT table has been found + */ + acpi_tb_delete_table(&acpi_gbl_root_table_list. + tables[ACPI_TABLE_INDEX_DSDT]); + acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT].pointer = + table; + acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT].length = + table->length; + acpi_gbl_root_table_list.tables[ACPI_TABLE_INDEX_DSDT].flags = + ACPI_TABLE_ORIGIN_UNKNOWN; + + ACPI_INFO((AE_INFO, "Table DSDT replaced by host OS")); + acpi_tb_print_table_header(0, table); + + if (no_auto_ssdt == 0) { + printk(KERN_WARNING "ACPI: DSDT override uses original SSDTs unless \"acpi_no_auto_ssdt\"\n"); + } + } status = acpi_tb_verify_table(&acpi_gbl_root_table_list. tables[ACPI_TABLE_INDEX_DSDT]); if (ACPI_FAILURE(status)) { + /* A valid DSDT is required */ + status = AE_NO_ACPI_TABLES; goto unlock_and_exit; } (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); - /* Load and parse tables */ - + /* + * Load and parse tables. + */ status = acpi_ns_load_table(ACPI_TABLE_INDEX_DSDT, acpi_gbl_root_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ - + /* + * Load any SSDT or PSDT tables. Note: Loop leaves tables locked + */ (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); for (i = 0; i < acpi_gbl_root_table_list.count; ++i) { if ((!ACPI_COMPARE_NAME @@ -585,8 +619,9 @@ acpi_status acpi_load_tables(void) ACPI_FUNCTION_TRACE(acpi_load_tables); - /* Load the namespace from the tables */ - + /* + * Load the namespace from the tables + */ status = acpi_tb_load_namespace(); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, diff --git a/trunk/drivers/acpi/acpica/tbxfroot.c b/trunk/drivers/acpi/acpica/tbxfroot.c index 85ea834199e2..b7fc8dd43341 100644 --- a/trunk/drivers/acpi/acpica/tbxfroot.c +++ b/trunk/drivers/acpi/acpica/tbxfroot.c @@ -75,8 +75,8 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) * Note: Sometimes there exists more than one RSDP in memory; the valid * RSDP has a valid checksum, all others have an invalid checksum. */ - if (ACPI_STRNCMP((char *)rsdp, ACPI_SIG_RSDP, - sizeof(ACPI_SIG_RSDP) - 1) != 0) { + if (ACPI_STRNCMP((char *)rsdp, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1) + != 0) { /* Nope, BAD Signature */ diff --git a/trunk/drivers/acpi/acpica/utcopy.c b/trunk/drivers/acpi/acpica/utcopy.c index 919624f123d5..b0dcfd3c872a 100644 --- a/trunk/drivers/acpi/acpica/utcopy.c +++ b/trunk/drivers/acpi/acpica/utcopy.c @@ -135,11 +135,11 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object, * In general, the external object will be the same type as * the internal object */ - external_object->type = internal_object->common.type; + external_object->type = ACPI_GET_OBJECT_TYPE(internal_object); /* However, only a limited number of external types are supported */ - switch (internal_object->common.type) { + switch (ACPI_GET_OBJECT_TYPE(internal_object)) { case ACPI_TYPE_STRING: external_object->string.pointer = (char *)data_space; @@ -222,8 +222,8 @@ acpi_ut_copy_isimple_to_esimple(union acpi_operand_object *internal_object, */ ACPI_ERROR((AE_INFO, "Unsupported object type, cannot convert to external object: %s", - acpi_ut_get_type_name(internal_object->common. - type))); + acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE + (internal_object)))); return_ACPI_STATUS(AE_SUPPORT); } @@ -355,7 +355,7 @@ acpi_ut_copy_ipackage_to_epackage(union acpi_operand_object *internal_object, info.object_space = 0; info.num_packages = 1; - external_object->type = internal_object->common.type; + external_object->type = ACPI_GET_OBJECT_TYPE(internal_object); external_object->package.count = internal_object->package.count; external_object->package.elements = ACPI_CAST_PTR(union acpi_object, info.free_space); @@ -399,7 +399,7 @@ acpi_ut_copy_iobject_to_eobject(union acpi_operand_object *internal_object, ACPI_FUNCTION_TRACE(ut_copy_iobject_to_eobject); - if (internal_object->common.type == ACPI_TYPE_PACKAGE) { + if (ACPI_GET_OBJECT_TYPE(internal_object) == ACPI_TYPE_PACKAGE) { /* * Package object: Copy all subobjects (including * nested packages) @@ -496,9 +496,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_ALLOCATE_ZEROED((acpi_size) external_object->string. + length + 1); if (!internal_object->string.pointer) { goto error_exit; } @@ -698,7 +697,7 @@ acpi_ut_copy_simple_object(union acpi_operand_object *source_desc, /* Handle the objects with extra data */ - switch (dest_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(dest_desc)) { case ACPI_TYPE_BUFFER: /* * Allocate and copy the actual buffer if and only if: @@ -815,8 +814,8 @@ acpi_ut_copy_ielement_to_ielement(u8 object_type, * This is a simple object, just copy it */ target_object = - acpi_ut_create_internal_object(source_object-> - common.type); + acpi_ut_create_internal_object(ACPI_GET_OBJECT_TYPE + (source_object)); if (!target_object) { return (AE_NO_MEMORY); } @@ -893,7 +892,7 @@ acpi_ut_copy_ipackage_to_ipackage(union acpi_operand_object *source_obj, ACPI_FUNCTION_TRACE(ut_copy_ipackage_to_ipackage); - dest_obj->common.type = source_obj->common.type; + dest_obj->common.type = ACPI_GET_OBJECT_TYPE(source_obj); dest_obj->common.flags = source_obj->common.flags; dest_obj->package.count = source_obj->package.count; @@ -951,14 +950,15 @@ acpi_ut_copy_iobject_to_iobject(union acpi_operand_object *source_desc, /* Create the top level object */ - *dest_desc = acpi_ut_create_internal_object(source_desc->common.type); + *dest_desc = + acpi_ut_create_internal_object(ACPI_GET_OBJECT_TYPE(source_desc)); if (!*dest_desc) { return_ACPI_STATUS(AE_NO_MEMORY); } /* Copy the object and possible subobjects */ - if (source_desc->common.type == ACPI_TYPE_PACKAGE) { + if (ACPI_GET_OBJECT_TYPE(source_desc) == ACPI_TYPE_PACKAGE) { status = acpi_ut_copy_ipackage_to_ipackage(source_desc, *dest_desc, walk_state); diff --git a/trunk/drivers/acpi/acpica/utdelete.c b/trunk/drivers/acpi/acpica/utdelete.c index a5ee23bc4f55..a0be9e39531e 100644 --- a/trunk/drivers/acpi/acpica/utdelete.c +++ b/trunk/drivers/acpi/acpica/utdelete.c @@ -86,7 +86,7 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object) * Must delete or free any pointers within the object that are not * actual ACPI objects (for example, a raw buffer pointer). */ - switch (object->common.type) { + switch (ACPI_GET_OBJECT_TYPE(object)) { case ACPI_TYPE_STRING: ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, @@ -382,7 +382,7 @@ acpi_ut_update_ref_count(union acpi_operand_object *object, u32 action) object, new_count)); } - if (object->common.type == ACPI_TYPE_METHOD) { + if (ACPI_GET_OBJECT_TYPE(object) == ACPI_TYPE_METHOD) { ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Method Obj %p Refs=%X, [Decremented]\n", object, new_count)); @@ -469,7 +469,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action) * All sub-objects must have their reference count incremented also. * Different object types have different subobjects. */ - switch (object->common.type) { + switch (ACPI_GET_OBJECT_TYPE(object)) { case ACPI_TYPE_DEVICE: case ACPI_TYPE_PROCESSOR: case ACPI_TYPE_POWER: diff --git a/trunk/drivers/acpi/acpica/uteval.c b/trunk/drivers/acpi/acpica/uteval.c index 006b16c26017..9c9897dbe907 100644 --- a/trunk/drivers/acpi/acpica/uteval.c +++ b/trunk/drivers/acpi/acpica/uteval.c @@ -59,35 +59,26 @@ acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, /* * Strings supported by the _OSI predefined (internal) method. - * - * March 2009: Removed "Linux" as this host no longer wants to respond true - * for this string. Basically, the only safe OS strings are windows-related - * and in many or most cases represent the only test path within the - * BIOS-provided ASL code. - * - * The second element of each entry is used to track the newest version of - * Windows that the BIOS has requested. */ -static struct acpi_interface_info acpi_interfaces_supported[] = { +static char *acpi_interfaces_supported[] = { /* Operating System Vendor Strings */ - {"Windows 2000", ACPI_OSI_WIN_2000}, /* Windows 2000 */ - {"Windows 2001", ACPI_OSI_WIN_XP}, /* Windows XP */ - {"Windows 2001 SP1", ACPI_OSI_WIN_XP_SP1}, /* Windows XP SP1 */ - {"Windows 2001.1", ACPI_OSI_WINSRV_2003}, /* Windows Server 2003 */ - {"Windows 2001 SP2", ACPI_OSI_WIN_XP_SP2}, /* Windows XP SP2 */ - {"Windows 2001.1 SP1", ACPI_OSI_WINSRV_2003_SP1}, /* Windows Server 2003 SP1 - Added 03/2006 */ - {"Windows 2006", ACPI_OSI_WIN_VISTA}, /* Windows Vista - Added 03/2006 */ + "Windows 2000", /* Windows 2000 */ + "Windows 2001", /* Windows XP */ + "Windows 2001 SP1", /* Windows XP SP1 */ + "Windows 2001 SP2", /* Windows XP SP2 */ + "Windows 2001.1", /* Windows Server 2003 */ + "Windows 2001.1 SP1", /* Windows Server 2003 SP1 - Added 03/2006 */ + "Windows 2006", /* Windows Vista - Added 03/2006 */ /* Feature Group Strings */ - {"Extended Address Space Descriptor", 0} - - /* - * 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. - */ + "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. + */ }; /******************************************************************************* @@ -107,7 +98,6 @@ 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; - u32 return_value; u32 i; ACPI_FUNCTION_TRACE(ut_osi_implementation); @@ -126,28 +116,19 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) return_ACPI_STATUS(AE_NO_MEMORY); } - /* Default return value is 0, NOT SUPPORTED */ + /* Default return value is 0, NOT-SUPPORTED */ - return_value = 0; + return_desc->integer.value = 0; + walk_state->return_desc = return_desc; /* Compare input string to static table of supported interfaces */ for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_interfaces_supported); i++) { - if (!ACPI_STRCMP(string_desc->string.pointer, - acpi_interfaces_supported[i].name)) { - /* - * The interface is supported. - * Update the osi_data if necessary. We keep track of the latest - * version of Windows that has been requested by the BIOS. - */ - if (acpi_interfaces_supported[i].value > - acpi_gbl_osi_data) { - acpi_gbl_osi_data = - acpi_interfaces_supported[i].value; - } - - return_value = ACPI_UINT32_MAX; - goto exit; + if (!ACPI_STRCMP + (string_desc->string.pointer, + acpi_interfaces_supported[i])) { + return_desc->integer.value = ACPI_UINT32_MAX; + goto done; } } @@ -158,22 +139,15 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) */ status = acpi_os_validate_interface(string_desc->string.pointer); if (ACPI_SUCCESS(status)) { - - /* The interface is supported */ - - return_value = ACPI_UINT32_MAX; + return_desc->integer.value = ACPI_UINT32_MAX; } -exit: - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, - "ACPI: BIOS _OSI(%s) is %ssupported\n", - string_desc->string.pointer, return_value == 0 ? "not " : "")); +done: + ACPI_DEBUG_PRINT_RAW((ACPI_DB_INFO, "ACPI: BIOS _OSI(%s) %ssupported\n", + string_desc->string.pointer, + return_desc->integer.value == 0 ? "not-" : "")); - /* Complete the return value */ - - return_desc->integer.value = return_value; - walk_state->return_desc = return_desc; - return_ACPI_STATUS (AE_OK); + return_ACPI_STATUS(AE_OK); } /******************************************************************************* @@ -193,8 +167,8 @@ acpi_status acpi_osi_invalidate(char *interface) int i; for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_interfaces_supported); i++) { - if (!ACPI_STRCMP(interface, acpi_interfaces_supported[i].name)) { - *acpi_interfaces_supported[i].name = '\0'; + if (!ACPI_STRCMP(interface, acpi_interfaces_supported[i])) { + *acpi_interfaces_supported[i] = '\0'; return AE_OK; } } @@ -274,7 +248,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, /* Map the return object type to the bitmapped type */ - switch ((info->return_object)->common.type) { + switch (ACPI_GET_OBJECT_TYPE(info->return_object)) { case ACPI_TYPE_INTEGER: return_btype = ACPI_BTYPE_INTEGER; break; @@ -444,7 +418,7 @@ acpi_ut_execute_HID(struct acpi_namespace_node *device_node, return_ACPI_STATUS(status); } - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { /* Convert the Numeric HID to string */ @@ -485,7 +459,7 @@ acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, struct acpi_compatible_id *one_cid) { - switch (obj_desc->common.type) { + switch (ACPI_GET_OBJECT_TYPE(obj_desc)) { case ACPI_TYPE_INTEGER: /* Convert the Numeric CID to string */ @@ -553,7 +527,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node, /* Get the number of _CIDs returned */ count = 1; - if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_PACKAGE) { count = obj_desc->package.count; } @@ -581,7 +555,7 @@ 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 (obj_desc->common.type == ACPI_TYPE_PACKAGE) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_PACKAGE) { /* Translate each package element */ @@ -646,7 +620,7 @@ acpi_ut_execute_UID(struct acpi_namespace_node *device_node, return_ACPI_STATUS(status); } - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { + if (ACPI_GET_OBJECT_TYPE(obj_desc) == ACPI_TYPE_INTEGER) { /* Convert the Numeric UID to string */ diff --git a/trunk/drivers/acpi/acpica/utglobal.c b/trunk/drivers/acpi/acpica/utglobal.c index 59e46f257c02..a3ab9d9da299 100644 --- a/trunk/drivers/acpi/acpica/utglobal.c +++ b/trunk/drivers/acpi/acpica/utglobal.c @@ -294,9 +294,12 @@ struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] = { /* ACPI_BITREG_GLOBAL_LOCK_RELEASE */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE, ACPI_BITMASK_GLOBAL_LOCK_RELEASE}, - /* ACPI_BITREG_SLEEP_TYPE */ {ACPI_REGISTER_PM1_CONTROL, - ACPI_BITPOSITION_SLEEP_TYPE, - ACPI_BITMASK_SLEEP_TYPE}, + /* ACPI_BITREG_SLEEP_TYPE_A */ {ACPI_REGISTER_PM1_CONTROL, + ACPI_BITPOSITION_SLEEP_TYPE_X, + ACPI_BITMASK_SLEEP_TYPE_X}, + /* ACPI_BITREG_SLEEP_TYPE_B */ {ACPI_REGISTER_PM1_CONTROL, + ACPI_BITPOSITION_SLEEP_TYPE_X, + ACPI_BITMASK_SLEEP_TYPE_X}, /* ACPI_BITREG_SLEEP_ENABLE */ {ACPI_REGISTER_PM1_CONTROL, ACPI_BITPOSITION_SLEEP_ENABLE, ACPI_BITMASK_SLEEP_ENABLE}, @@ -473,7 +476,7 @@ char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc) return ("[NULL Object Descriptor]"); } - return (acpi_ut_get_type_name(obj_desc->common.type)); + return (acpi_ut_get_type_name(ACPI_GET_OBJECT_TYPE(obj_desc))); } /******************************************************************************* @@ -746,10 +749,7 @@ acpi_status acpi_ut_init_globals(void) for (i = 0; i < ACPI_NUM_OWNERID_MASKS; i++) { acpi_gbl_owner_id_mask[i] = 0; } - - /* Last owner_iD is never valid */ - - acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; + acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; /* Last ID is never valid */ /* GPE support */ @@ -789,7 +789,6 @@ acpi_status acpi_ut_init_globals(void) acpi_gbl_trace_dbg_layer = 0; acpi_gbl_debugger_configuration = DEBUGGER_THREADING; acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT; - acpi_gbl_osi_data = 0; /* Hardware oriented */ diff --git a/trunk/drivers/acpi/acpica/utlock.c b/trunk/drivers/acpi/acpica/utlock.c deleted file mode 100644 index 25e03120686d..000000000000 --- a/trunk/drivers/acpi/acpica/utlock.c +++ /dev/null @@ -1,175 +0,0 @@ -/****************************************************************************** - * - * Module Name: utlock - Reader/Writer lock interfaces - * - *****************************************************************************/ - -/* - * Copyright (C) 2000 - 2009, Intel Corp. - * 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, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the names - * of any contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. - */ - -#include -#include "accommon.h" - -#define _COMPONENT ACPI_UTILITIES -ACPI_MODULE_NAME("utlock") - -/******************************************************************************* - * - * FUNCTION: acpi_ut_create_rw_lock - * acpi_ut_delete_rw_lock - * - * PARAMETERS: Lock - Pointer to a valid RW lock - * - * RETURN: Status - * - * DESCRIPTION: Reader/writer lock creation and deletion interfaces. - * - ******************************************************************************/ -acpi_status acpi_ut_create_rw_lock(struct acpi_rw_lock *lock) -{ - acpi_status status; - - lock->num_readers = 0; - status = acpi_os_create_mutex(&lock->reader_mutex); - if (ACPI_FAILURE(status)) { - return status; - } - - status = acpi_os_create_mutex(&lock->writer_mutex); - return status; -} - -void acpi_ut_delete_rw_lock(struct acpi_rw_lock *lock) -{ - - acpi_os_delete_mutex(lock->reader_mutex); - acpi_os_delete_mutex(lock->writer_mutex); - - lock->num_readers = 0; - lock->reader_mutex = NULL; - lock->writer_mutex = NULL; -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_acquire_read_lock - * acpi_ut_release_read_lock - * - * PARAMETERS: Lock - Pointer to a valid RW lock - * - * RETURN: Status - * - * DESCRIPTION: Reader interfaces for reader/writer locks. On acquisition, - * only the first reader acquires the write mutex. On release, - * only the last reader releases the write mutex. Although this - * algorithm can in theory starve writers, this should not be a - * problem with ACPICA since the subsystem is infrequently used - * in comparison to (for example) an I/O system. - * - ******************************************************************************/ - -acpi_status acpi_ut_acquire_read_lock(struct acpi_rw_lock *lock) -{ - acpi_status status; - - status = acpi_os_acquire_mutex(lock->reader_mutex, ACPI_WAIT_FOREVER); - if (ACPI_FAILURE(status)) { - return status; - } - - /* Acquire the write lock only for the first reader */ - - lock->num_readers++; - if (lock->num_readers == 1) { - status = - acpi_os_acquire_mutex(lock->writer_mutex, - ACPI_WAIT_FOREVER); - } - - acpi_os_release_mutex(lock->reader_mutex); - return status; -} - -acpi_status acpi_ut_release_read_lock(struct acpi_rw_lock *lock) -{ - acpi_status status; - - status = acpi_os_acquire_mutex(lock->reader_mutex, ACPI_WAIT_FOREVER); - if (ACPI_FAILURE(status)) { - return status; - } - - /* Release the write lock only for the very last reader */ - - lock->num_readers--; - if (lock->num_readers == 0) { - acpi_os_release_mutex(lock->writer_mutex); - } - - acpi_os_release_mutex(lock->reader_mutex); - return status; -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_acquire_write_lock - * acpi_ut_release_write_lock - * - * PARAMETERS: Lock - Pointer to a valid RW lock - * - * RETURN: Status - * - * DESCRIPTION: Writer interfaces for reader/writer locks. Simply acquire or - * release the writer mutex associated with the lock. Acquisition - * of the lock is fully exclusive and will block all readers and - * writers until it is released. - * - ******************************************************************************/ - -acpi_status acpi_ut_acquire_write_lock(struct acpi_rw_lock *lock) -{ - acpi_status status; - - status = acpi_os_acquire_mutex(lock->writer_mutex, ACPI_WAIT_FOREVER); - return status; -} - -void acpi_ut_release_write_lock(struct acpi_rw_lock *lock) -{ - - acpi_os_release_mutex(lock->writer_mutex); -} diff --git a/trunk/drivers/acpi/acpica/utmisc.c b/trunk/drivers/acpi/acpica/utmisc.c index 1c9e250caefb..c1f7f4e1a72d 100644 --- a/trunk/drivers/acpi/acpica/utmisc.c +++ b/trunk/drivers/acpi/acpica/utmisc.c @@ -938,7 +938,8 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object, if ((!this_source_obj) || (ACPI_GET_DESCRIPTOR_TYPE(this_source_obj) != ACPI_DESC_TYPE_OPERAND) - || (this_source_obj->common.type != ACPI_TYPE_PACKAGE)) { + || (ACPI_GET_OBJECT_TYPE(this_source_obj) != + ACPI_TYPE_PACKAGE)) { status = walk_callback(ACPI_COPY_TYPE_SIMPLE, this_source_obj, state, context); diff --git a/trunk/drivers/acpi/acpica/utmutex.c b/trunk/drivers/acpi/acpica/utmutex.c index 26c93a748e64..14eb52c4d647 100644 --- a/trunk/drivers/acpi/acpica/utmutex.c +++ b/trunk/drivers/acpi/acpica/utmutex.c @@ -60,8 +60,7 @@ static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id); * * RETURN: Status * - * DESCRIPTION: Create the system mutex objects. This includes mutexes, - * spin locks, and reader/writer locks. + * DESCRIPTION: Create the system mutex objects. * ******************************************************************************/ @@ -72,8 +71,9 @@ acpi_status acpi_ut_mutex_initialize(void) ACPI_FUNCTION_TRACE(ut_mutex_initialize); - /* Create each of the predefined mutex objects */ - + /* + * Create each of the predefined mutex objects + */ for (i = 0; i < ACPI_NUM_MUTEX; i++) { status = acpi_ut_create_mutex(i); if (ACPI_FAILURE(status)) { @@ -86,9 +86,6 @@ acpi_status acpi_ut_mutex_initialize(void) spin_lock_init(acpi_gbl_gpe_lock); spin_lock_init(acpi_gbl_hardware_lock); - /* Create the reader/writer lock for namespace access */ - - status = acpi_ut_create_rw_lock(&acpi_gbl_namespace_rw_lock); return_ACPI_STATUS(status); } @@ -100,8 +97,7 @@ acpi_status acpi_ut_mutex_initialize(void) * * RETURN: None. * - * DESCRIPTION: Delete all of the system mutex objects. This includes mutexes, - * spin locks, and reader/writer locks. + * DESCRIPTION: Delete all of the system mutex objects. * ******************************************************************************/ @@ -111,8 +107,9 @@ void acpi_ut_mutex_terminate(void) ACPI_FUNCTION_TRACE(ut_mutex_terminate); - /* Delete each predefined mutex object */ - + /* + * Delete each predefined mutex object + */ for (i = 0; i < ACPI_NUM_MUTEX; i++) { (void)acpi_ut_delete_mutex(i); } @@ -121,10 +118,6 @@ void acpi_ut_mutex_terminate(void) acpi_os_delete_lock(acpi_gbl_gpe_lock); acpi_os_delete_lock(acpi_gbl_hardware_lock); - - /* Delete the reader/writer lock */ - - acpi_ut_delete_rw_lock(&acpi_gbl_namespace_rw_lock); return_VOID; } diff --git a/trunk/drivers/acpi/acpica/utobject.c b/trunk/drivers/acpi/acpica/utobject.c index 0207b625274a..fd5ea7543e5b 100644 --- a/trunk/drivers/acpi/acpica/utobject.c +++ b/trunk/drivers/acpi/acpica/utobject.c @@ -310,7 +310,7 @@ u8 acpi_ut_valid_internal_object(void *object) /* Check for a null pointer */ if (!object) { - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "**** Null Object Ptr\n")); + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "**** Null Object Ptr\n")); return (FALSE); } @@ -324,7 +324,7 @@ u8 acpi_ut_valid_internal_object(void *object) return (TRUE); default: - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%p is not not an ACPI operand obj [%s]\n", object, acpi_ut_get_descriptor_name(object))); break; @@ -457,7 +457,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, * must be accessed bytewise or there may be alignment problems on * certain processors */ - switch (internal_object->common.type) { + switch (ACPI_GET_OBJECT_TYPE(internal_object)) { case ACPI_TYPE_STRING: length += (acpi_size) internal_object->string.length + 1; @@ -518,7 +518,8 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, ACPI_ERROR((AE_INFO, "Cannot convert to external object - " "unsupported type [%s] %X in object %p", acpi_ut_get_object_type_name(internal_object), - internal_object->common.type, internal_object)); + ACPI_GET_OBJECT_TYPE(internal_object), + internal_object)); status = AE_TYPE; break; } @@ -663,7 +664,7 @@ acpi_ut_get_object_size(union acpi_operand_object *internal_object, if ((ACPI_GET_DESCRIPTOR_TYPE(internal_object) == ACPI_DESC_TYPE_OPERAND) - && (internal_object->common.type == ACPI_TYPE_PACKAGE)) { + && (ACPI_GET_OBJECT_TYPE(internal_object) == ACPI_TYPE_PACKAGE)) { status = acpi_ut_get_package_object_size(internal_object, obj_length); diff --git a/trunk/drivers/acpi/bus.c b/trunk/drivers/acpi/bus.c index e8f7b64e92da..765fd1c56cd6 100644 --- a/trunk/drivers/acpi/bus.c +++ b/trunk/drivers/acpi/bus.c @@ -39,8 +39,6 @@ #include #include -#include "internal.h" - #define _COMPONENT ACPI_BUS_COMPONENT ACPI_MODULE_NAME("bus"); @@ -760,7 +758,8 @@ static int __init acpi_bus_init(void) acpi_status status = AE_OK; extern acpi_status acpi_os_initialize1(void); - acpi_os_initialize1(); + + status = acpi_os_initialize1(); status = acpi_enable_subsystem(ACPI_NO_HARDWARE_INIT | ACPI_NO_ACPI_ENABLE); @@ -770,6 +769,12 @@ static int __init acpi_bus_init(void) goto error1; } + if (ACPI_FAILURE(status)) { + printk(KERN_ERR PREFIX + "Unable to initialize ACPI OS objects\n"); + goto error1; + } + /* * ACPI 2.0 requires the EC driver to be loaded and work before * the EC device is found in the namespace (i.e. before acpi_initialize_objects() @@ -848,7 +853,6 @@ static int __init acpi_init(void) acpi_kobj = NULL; } - init_acpi_device_notify(); result = acpi_bus_init(); if (!result) { @@ -863,23 +867,11 @@ static int __init acpi_init(void) } } else disable_acpi(); - - if (acpi_disabled) - return result; - /* * If the laptop falls into the DMI check table, the power state check * will be disabled in the course of device power transistion. */ dmi_check_system(power_nocheck_dmi_table); - - acpi_scan_init(); - acpi_ec_init(); - acpi_power_init(); - acpi_system_init(); - acpi_debug_init(); - acpi_sleep_proc_init(); - acpi_wakeup_device_init(); return result; } diff --git a/trunk/drivers/acpi/debug.c b/trunk/drivers/acpi/debug.c index 9cb189f3c77c..20223cbd0d1c 100644 --- a/trunk/drivers/acpi/debug.c +++ b/trunk/drivers/acpi/debug.c @@ -297,15 +297,17 @@ acpi_system_write_debug(struct file *file, return count; } -#endif -int __init acpi_debug_init(void) +static int __init acpi_debug_init(void) { -#ifdef CONFIG_ACPI_PROCFS struct proc_dir_entry *entry; int error = 0; char *name; + + if (acpi_disabled) + return 0; + /* 'debug_layer' [R/W] */ name = ACPI_SYSTEM_FILE_DEBUG_LAYER; entry = @@ -336,7 +338,7 @@ int __init acpi_debug_init(void) remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir); error = -ENODEV; goto Done; -#else - return 0; -#endif } + +subsys_initcall(acpi_debug_init); +#endif diff --git a/trunk/drivers/acpi/ec.c b/trunk/drivers/acpi/ec.c index bf88f1803801..2fe15060dcdc 100644 --- a/trunk/drivers/acpi/ec.c +++ b/trunk/drivers/acpi/ec.c @@ -1069,10 +1069,13 @@ static struct acpi_driver acpi_ec_driver = { }, }; -int __init acpi_ec_init(void) +static int __init acpi_ec_init(void) { int result = 0; + if (acpi_disabled) + return 0; + acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir); if (!acpi_ec_dir) return -ENODEV; @@ -1087,6 +1090,8 @@ int __init acpi_ec_init(void) return result; } +subsys_initcall(acpi_ec_init); + /* EC driver currently not unloadable */ #if 0 static void __exit acpi_ec_exit(void) diff --git a/trunk/drivers/acpi/fan.c b/trunk/drivers/acpi/fan.c index ae41cf3cf4e5..eaaee1660bdf 100644 --- a/trunk/drivers/acpi/fan.c +++ b/trunk/drivers/acpi/fan.c @@ -68,35 +68,31 @@ static struct acpi_driver acpi_fan_driver = { }; /* thermal cooling device callbacks */ -static int fan_get_max_state(struct thermal_cooling_device *cdev, unsigned long - *state) +static int fan_get_max_state(struct thermal_cooling_device *cdev, char *buf) { /* ACPI fan device only support two states: ON/OFF */ - *state = 1; - return 0; + return sprintf(buf, "1\n"); } -static int fan_get_cur_state(struct thermal_cooling_device *cdev, unsigned long - *state) +static int fan_get_cur_state(struct thermal_cooling_device *cdev, char *buf) { struct acpi_device *device = cdev->devdata; + int state; int result; - int acpi_state; if (!device) return -EINVAL; - result = acpi_bus_get_power(device->handle, &acpi_state); + result = acpi_bus_get_power(device->handle, &state); if (result) return result; - *state = (acpi_state == ACPI_STATE_D3 ? 0 : - (acpi_state == ACPI_STATE_D0 ? 1 : -1)); - return 0; + return sprintf(buf, "%s\n", state == ACPI_STATE_D3 ? "0" : + (state == ACPI_STATE_D0 ? "1" : "unknown")); } static int -fan_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state) +fan_set_cur_state(struct thermal_cooling_device *cdev, unsigned int state) { struct acpi_device *device = cdev->devdata; int result; diff --git a/trunk/drivers/acpi/glue.c b/trunk/drivers/acpi/glue.c index 8bd2c2a6884d..5479b9f42513 100644 --- a/trunk/drivers/acpi/glue.c +++ b/trunk/drivers/acpi/glue.c @@ -286,8 +286,10 @@ static int acpi_platform_notify_remove(struct device *dev) return 0; } -int __init init_acpi_device_notify(void) +static int __init init_acpi_device_notify(void) { + if (acpi_disabled) + return 0; if (platform_notify || platform_notify_remove) { printk(KERN_ERR PREFIX "Can't use platform_notify\n"); return 0; @@ -296,3 +298,5 @@ int __init init_acpi_device_notify(void) platform_notify_remove = acpi_platform_notify_remove; return 0; } + +arch_initcall(init_acpi_device_notify); diff --git a/trunk/drivers/acpi/internal.h b/trunk/drivers/acpi/internal.h deleted file mode 100644 index 11a69b53004e..000000000000 --- a/trunk/drivers/acpi/internal.h +++ /dev/null @@ -1,43 +0,0 @@ -/* For use by Linux/ACPI infrastructure, not drivers */ - -int init_acpi_device_notify(void); -int acpi_scan_init(void); -int acpi_system_init(void); - -#ifdef CONFIG_ACPI_DEBUG -int acpi_debug_init(void); -#else -static inline int acpi_debug_init(void) { return 0; } -#endif - -/* -------------------------------------------------------------------------- - Power Resource - -------------------------------------------------------------------------- */ -int acpi_power_init(void); -int acpi_device_sleep_wake(struct acpi_device *dev, - int enable, int sleep_state, int dev_state); -int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state); -int acpi_disable_wakeup_device_power(struct acpi_device *dev); -int acpi_power_get_inferred_state(struct acpi_device *device); -int acpi_power_transition(struct acpi_device *device, int state); -extern int acpi_power_nocheck; - -int acpi_wakeup_device_init(void); - -/* -------------------------------------------------------------------------- - Embedded Controller - -------------------------------------------------------------------------- */ -int acpi_ec_init(void); -int acpi_ec_ecdt_probe(void); -int acpi_boot_ec_enable(void); - -/*-------------------------------------------------------------------------- - Suspend/Resume - -------------------------------------------------------------------------- */ -extern int acpi_sleep_init(void); - -#ifdef CONFIG_ACPI_SLEEP -int acpi_sleep_proc_init(void); -#else -static inline int acpi_sleep_proc_init(void) { return 0; } -#endif diff --git a/trunk/drivers/acpi/numa.c b/trunk/drivers/acpi/numa.c index 3a0d8ef25c75..c5e292aab0e3 100644 --- a/trunk/drivers/acpi/numa.c +++ b/trunk/drivers/acpi/numa.c @@ -277,7 +277,7 @@ int acpi_get_node(acpi_handle *handle) int pxm, node = -1; pxm = acpi_get_pxm(handle); - if (pxm >= 0 && pxm < MAX_PXM_DOMAINS) + if (pxm >= 0) node = acpi_map_pxm_to_node(pxm); return node; diff --git a/trunk/drivers/acpi/osl.c b/trunk/drivers/acpi/osl.c index 1e35f342957c..b3193ec0a2ef 100644 --- a/trunk/drivers/acpi/osl.c +++ b/trunk/drivers/acpi/osl.c @@ -1317,6 +1317,54 @@ acpi_os_validate_interface (char *interface) return AE_SUPPORT; } +#ifdef CONFIG_X86 + +struct aml_port_desc { + uint start; + uint end; + char* name; + char warned; +}; + +static struct aml_port_desc aml_invalid_port_list[] = { + {0x20, 0x21, "PIC0", 0}, + {0xA0, 0xA1, "PIC1", 0}, + {0x4D0, 0x4D1, "ELCR", 0} +}; + +/* + * valid_aml_io_address() + * + * if valid, return true + * else invalid, warn once, return false + */ +static bool valid_aml_io_address(uint address, uint length) +{ + int i; + int entries = sizeof(aml_invalid_port_list) / sizeof(struct aml_port_desc); + + for (i = 0; i < entries; ++i) { + if ((address >= aml_invalid_port_list[i].start && + address <= aml_invalid_port_list[i].end) || + (address + length >= aml_invalid_port_list[i].start && + address + length <= aml_invalid_port_list[i].end)) + { + if (!aml_invalid_port_list[i].warned) + { + printk(KERN_ERR "ACPI: Denied BIOS AML access" + " to invalid port 0x%x+0x%x (%s)\n", + address, length, + aml_invalid_port_list[i].name); + aml_invalid_port_list[i].warned = 1; + } + return false; /* invalid */ + } + } + return true; /* valid */ +} +#else +static inline bool valid_aml_io_address(uint address, uint length) { return true; } +#endif /****************************************************************************** * * FUNCTION: acpi_os_validate_address @@ -1346,6 +1394,8 @@ acpi_os_validate_address ( switch (space_id) { case ACPI_ADR_SPACE_SYSTEM_IO: + if (!valid_aml_io_address(address, length)) + return AE_AML_ILLEGAL_ADDRESS; case ACPI_ADR_SPACE_SYSTEM_MEMORY: /* Only interference checks against SystemIO and SytemMemory are needed */ diff --git a/trunk/drivers/acpi/pci_irq.c b/trunk/drivers/acpi/pci_irq.c index be6b9093f8df..891bdf6679f3 100644 --- a/trunk/drivers/acpi/pci_irq.c +++ b/trunk/drivers/acpi/pci_irq.c @@ -319,7 +319,7 @@ static struct acpi_prt_entry *acpi_pci_irq_lookup(struct pci_dev *dev, int pin) */ bridge = dev->bus->self; while (bridge) { - pin = pci_swizzle_interrupt_pin(dev, pin); + pin = (((pin - 1) + PCI_SLOT(dev->devfn)) % 4) + 1; if ((bridge->class >> 8) == PCI_CLASS_BRIDGE_CARDBUS) { /* PC card has the same IRQ as its cardbridge */ diff --git a/trunk/drivers/acpi/pci_link.c b/trunk/drivers/acpi/pci_link.c index 16e0f9d3d17c..6c772ca76bd1 100644 --- a/trunk/drivers/acpi/pci_link.c +++ b/trunk/drivers/acpi/pci_link.c @@ -43,14 +43,13 @@ #include #include -#define _COMPONENT ACPI_PCI_COMPONENT +#define _COMPONENT ACPI_PCI_COMPONENT ACPI_MODULE_NAME("pci_link"); #define ACPI_PCI_LINK_CLASS "pci_irq_routing" #define ACPI_PCI_LINK_DEVICE_NAME "PCI Interrupt Link" #define ACPI_PCI_LINK_FILE_INFO "info" #define ACPI_PCI_LINK_FILE_STATUS "state" -#define ACPI_PCI_LINK_MAX_POSSIBLE 16 - +#define ACPI_PCI_LINK_MAX_POSSIBLE 16 static int acpi_pci_link_add(struct acpi_device *device); static int acpi_pci_link_remove(struct acpi_device *device, int type); @@ -67,7 +66,7 @@ static struct acpi_driver acpi_pci_link_driver = { .ops = { .add = acpi_pci_link_add, .remove = acpi_pci_link_remove, - }, + }, }; /* @@ -77,7 +76,7 @@ static struct acpi_driver acpi_pci_link_driver = { struct acpi_pci_link_irq { u8 active; /* Current IRQ */ u8 triggering; /* All IRQs */ - u8 polarity; /* All IRQs */ + u8 polarity; /* All IRQs */ u8 resource_type; u8 possible_count; u8 possible[ACPI_PCI_LINK_MAX_POSSIBLE]; @@ -86,13 +85,16 @@ struct acpi_pci_link_irq { }; struct acpi_pci_link { - struct list_head list; - struct acpi_device *device; - struct acpi_pci_link_irq irq; - int refcnt; + struct list_head node; + struct acpi_device *device; + struct acpi_pci_link_irq irq; + int refcnt; }; -static LIST_HEAD(acpi_link_list); +static struct { + int count; + struct list_head entries; +} acpi_link; static DEFINE_MUTEX(acpi_link_lock); /* -------------------------------------------------------------------------- @@ -102,11 +104,12 @@ static DEFINE_MUTEX(acpi_link_lock); /* * set context (link) possible list from resource list */ -static acpi_status acpi_pci_link_check_possible(struct acpi_resource *resource, - void *context) +static acpi_status +acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) { struct acpi_pci_link *link = context; - u32 i; + u32 i = 0; + switch (resource->type) { case ACPI_RESOURCE_TYPE_START_DEPENDENT: @@ -176,6 +179,10 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link) { acpi_status status; + + if (!link) + return -EINVAL; + status = acpi_walk_resources(link->device->handle, METHOD_NAME__PRS, acpi_pci_link_check_possible, link); if (ACPI_FAILURE(status)) { @@ -190,10 +197,11 @@ static int acpi_pci_link_get_possible(struct acpi_pci_link *link) return 0; } -static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource, - void *context) +static acpi_status +acpi_pci_link_check_current(struct acpi_resource *resource, void *context) { - int *irq = context; + int *irq = (int *)context; + switch (resource->type) { case ACPI_RESOURCE_TYPE_START_DEPENDENT: @@ -250,9 +258,12 @@ static acpi_status acpi_pci_link_check_current(struct acpi_resource *resource, static int acpi_pci_link_get_current(struct acpi_pci_link *link) { int result = 0; - acpi_status status; + acpi_status status = AE_OK; int irq = 0; + if (!link) + return -EINVAL; + link->irq.active = 0; /* in practice, status disabled is meaningless, ignore it */ @@ -297,15 +308,16 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link) static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) { - int result; - acpi_status status; + int result = 0; + acpi_status status = AE_OK; struct { struct acpi_resource res; struct acpi_resource end; } *resource; struct acpi_buffer buffer = { 0, NULL }; - if (!irq) + + if (!link || !irq) return -EINVAL; resource = kzalloc(sizeof(*resource) + 1, irqs_disabled() ? GFP_ATOMIC: GFP_KERNEL); @@ -467,22 +479,30 @@ static int acpi_irq_penalty[ACPI_MAX_IRQS] = { PIRQ_PENALTY_PCI_AVAILABLE, /* IRQ9 PCI, often acpi */ PIRQ_PENALTY_PCI_AVAILABLE, /* IRQ10 PCI */ PIRQ_PENALTY_PCI_AVAILABLE, /* IRQ11 PCI */ - PIRQ_PENALTY_ISA_USED, /* IRQ12 mouse */ - PIRQ_PENALTY_ISA_USED, /* IRQ13 fpe, sometimes */ - PIRQ_PENALTY_ISA_USED, /* IRQ14 ide0 */ - PIRQ_PENALTY_ISA_USED, /* IRQ15 ide1 */ + PIRQ_PENALTY_ISA_USED, /* IRQ12 mouse */ + PIRQ_PENALTY_ISA_USED, /* IRQ13 fpe, sometimes */ + PIRQ_PENALTY_ISA_USED, /* IRQ14 ide0 */ + PIRQ_PENALTY_ISA_USED, /* IRQ15 ide1 */ /* >IRQ15 */ }; int __init acpi_irq_penalty_init(void) { - struct acpi_pci_link *link; - int i; + struct list_head *node = NULL; + struct acpi_pci_link *link = NULL; + int i = 0; + /* * Update penalties to facilitate IRQ balancing. */ - list_for_each_entry(link, &acpi_link_list, list) { + 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"); + continue; + } /* * reflect the possible and active irqs in the penalty table -- @@ -507,6 +527,7 @@ int __init acpi_irq_penalty_init(void) } /* Add a penalty for the SCI */ acpi_irq_penalty[acpi_gbl_FADT.sci_interrupt] += PIRQ_PENALTY_PCI_USING; + return 0; } @@ -517,6 +538,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) int irq; int i; + if (link->irq.initialized) { if (link->refcnt == 0) /* This means the link is disabled but initialized */ @@ -544,10 +566,11 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) /* * if active found, use it; else pick entry from end of possible list. */ - if (link->irq.active) + if (link->irq.active) { irq = link->irq.active; - else + } else { irq = link->irq.possible[link->irq.possible_count - 1]; + } if (acpi_irq_balance || !link->irq.active) { /* @@ -576,6 +599,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) } link->irq.initialized = 1; + return 0; } @@ -584,12 +608,16 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) * success: return IRQ >= 0 * failure: return -1 */ -int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, - int *polarity, char **name) + +int +acpi_pci_link_allocate_irq(acpi_handle handle, + int index, + int *triggering, int *polarity, char **name) { - int result; - struct acpi_device *device; - struct acpi_pci_link *link; + int result = 0; + struct acpi_device *device = NULL; + struct acpi_pci_link *link = NULL; + result = acpi_bus_get_device(handle, &device); if (result) { @@ -641,10 +669,11 @@ int acpi_pci_link_allocate_irq(acpi_handle handle, int index, int *triggering, */ int acpi_pci_link_free_irq(acpi_handle handle) { - struct acpi_device *device; - struct acpi_pci_link *link; + struct acpi_device *device = NULL; + struct acpi_pci_link *link = NULL; acpi_status result; + result = acpi_bus_get_device(handle, &device); if (result) { printk(KERN_ERR PREFIX "Invalid link device\n"); @@ -679,9 +708,9 @@ int acpi_pci_link_free_irq(acpi_handle handle) "Link %s is dereferenced\n", acpi_device_bid(link->device))); - if (link->refcnt == 0) + if (link->refcnt == 0) { acpi_evaluate_object(link->device->handle, "_DIS", NULL, NULL); - + } mutex_unlock(&acpi_link_lock); return (link->irq.active); } @@ -692,11 +721,15 @@ int acpi_pci_link_free_irq(acpi_handle handle) static int acpi_pci_link_add(struct acpi_device *device) { - int result; - struct acpi_pci_link *link; - int i; + int result = 0; + struct acpi_pci_link *link = NULL; + int i = 0; int found = 0; + + if (!device) + return -EINVAL; + link = kzalloc(sizeof(struct acpi_pci_link), GFP_KERNEL); if (!link) return -ENOMEM; @@ -734,7 +767,9 @@ static int acpi_pci_link_add(struct acpi_device *device) printk("\n"); - list_add_tail(&link->list, &acpi_link_list); + /* TBD: Acquire/release lock */ + list_add_tail(&link->node, &acpi_link.entries); + acpi_link.count++; end: /* disable all links -- to be activated on use */ @@ -749,17 +784,24 @@ static int acpi_pci_link_add(struct acpi_device *device) static int acpi_pci_link_resume(struct acpi_pci_link *link) { + if (link->refcnt && link->irq.active && link->irq.initialized) return (acpi_pci_link_set(link, link->irq.active)); - - return 0; + else + return 0; } static int irqrouter_resume(struct sys_device *dev) { - struct acpi_pci_link *link; + struct list_head *node = NULL; + struct acpi_pci_link *link = NULL; - list_for_each_entry(link, &acpi_link_list, list) { + 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"); + continue; + } acpi_pci_link_resume(link); } return 0; @@ -767,15 +809,20 @@ static int irqrouter_resume(struct sys_device *dev) static int acpi_pci_link_remove(struct acpi_device *device, int type) { - struct acpi_pci_link *link; + struct acpi_pci_link *link = NULL; + + + if (!device || !acpi_driver_data(device)) + return -EINVAL; link = acpi_driver_data(device); mutex_lock(&acpi_link_lock); - list_del(&link->list); + list_del(&link->node); mutex_unlock(&acpi_link_lock); kfree(link); + return 0; } @@ -884,6 +931,7 @@ static int __init irqrouter_init_sysfs(void) { int error; + if (acpi_disabled || acpi_noirq) return 0; @@ -909,6 +957,9 @@ static int __init acpi_pci_link_init(void) acpi_irq_balance = 0; } + acpi_link.count = 0; + INIT_LIST_HEAD(&acpi_link.entries); + if (acpi_bus_register_driver(&acpi_pci_link_driver) < 0) return -ENODEV; diff --git a/trunk/drivers/acpi/power.c b/trunk/drivers/acpi/power.c index 11968ba28feb..c926e7d4a0d6 100644 --- a/trunk/drivers/acpi/power.c +++ b/trunk/drivers/acpi/power.c @@ -773,10 +773,14 @@ static int acpi_power_resume(struct acpi_device *device) return 0; } -int __init acpi_power_init(void) +static int __init acpi_power_init(void) { int result = 0; + + if (acpi_disabled) + return 0; + INIT_LIST_HEAD(&acpi_power_resource_list); acpi_power_dir = proc_mkdir(ACPI_POWER_CLASS, acpi_root_dir); @@ -791,3 +795,5 @@ int __init acpi_power_init(void) return 0; } + +subsys_initcall(acpi_power_init); diff --git a/trunk/drivers/acpi/proc.c b/trunk/drivers/acpi/proc.c index 05dfdc96802e..428c911dba08 100644 --- a/trunk/drivers/acpi/proc.c +++ b/trunk/drivers/acpi/proc.c @@ -496,8 +496,11 @@ static u32 rtc_handler(void *context) } #endif /* HAVE_ACPI_LEGACY_ALARM */ -int __init acpi_sleep_proc_init(void) +static int __init acpi_sleep_proc_init(void) { + if (acpi_disabled) + return 0; + #ifdef CONFIG_ACPI_PROCFS /* 'sleep' [R/W] */ proc_create("sleep", S_IFREG | S_IRUGO | S_IWUSR, @@ -524,3 +527,5 @@ int __init acpi_sleep_proc_init(void) return 0; } + +late_initcall(acpi_sleep_proc_init); diff --git a/trunk/drivers/acpi/processor_idle.c b/trunk/drivers/acpi/processor_idle.c index 4e6e758bd397..7bc22a471fe3 100644 --- a/trunk/drivers/acpi/processor_idle.c +++ b/trunk/drivers/acpi/processor_idle.c @@ -64,6 +64,7 @@ #define _COMPONENT ACPI_PROCESSOR_COMPONENT ACPI_MODULE_NAME("processor_idle"); #define ACPI_PROCESSOR_FILE_POWER "power" +#define US_TO_PM_TIMER_TICKS(t) ((t * (PM_TIMER_FREQUENCY/1000)) / 1000) #define PM_TIMER_TICK_NS (1000000000ULL/PM_TIMER_FREQUENCY) #define C2_OVERHEAD 1 /* 1us */ #define C3_OVERHEAD 1 /* 1us */ @@ -77,10 +78,6 @@ module_param(nocst, uint, 0000); static unsigned int latency_factor __read_mostly = 2; module_param(latency_factor, uint, 0644); -static s64 us_to_pm_timer_ticks(s64 t) -{ - return div64_u64(t * PM_TIMER_FREQUENCY, 1000000); -} /* * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. * For now disable this. Probably a bug somewhere else. @@ -104,6 +101,57 @@ static int set_max_cstate(const 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}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET43WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET45WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET47WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET50WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET52WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET55WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET56WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET59WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET61WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET62WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET64WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET65WW") }, (void*)1}, + { set_max_cstate, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET68WW") }, (void*)1}, + { set_max_cstate, "Medion 41700", { + DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), + DMI_MATCH(DMI_BIOS_VERSION,"R01-A1J")}, (void *)1}, { set_max_cstate, "Clevo 5600D", { DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")}, @@ -111,6 +159,25 @@ static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = { {}, }; +static inline u32 ticks_elapsed(u32 t1, u32 t2) +{ + if (t2 >= t1) + return (t2 - t1); + else if (!(acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER)) + return (((0x00FFFFFF - t1) + t2) & 0x00FFFFFF); + else + return ((0xFFFFFFFF - t1) + t2); +} + +static inline u32 ticks_elapsed_in_us(u32 t1, u32 t2) +{ + if (t2 >= t1) + return PM_TIMER_TICKS_TO_US(t2 - t1); + else if (!(acpi_gbl_FADT.flags & ACPI_FADT_32BIT_TIMER)) + return PM_TIMER_TICKS_TO_US(((0x00FFFFFF - t1) + t2) & 0x00FFFFFF); + else + return PM_TIMER_TICKS_TO_US((0xFFFFFFFF - t1) + t2); +} /* * Callers should disable interrupts before the call and enable @@ -563,7 +630,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, * In either case, the proper way to * handle BM_RLD is to set it and leave it set. */ - acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, 1); + acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1); return; } @@ -733,9 +800,9 @@ static int acpi_idle_bm_check(void) { u32 bm_status = 0; - acpi_read_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status); + acpi_get_register_unlocked(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status); if (bm_status) - acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_STATUS, 1); + acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, 1); /* * PIIX4 Erratum #18: Note that BM_STS doesn't always reflect * the true state of bus mastering activity; forcing us to @@ -786,8 +853,7 @@ static inline void acpi_idle_do_entry(struct acpi_processor_cx *cx) static int acpi_idle_enter_c1(struct cpuidle_device *dev, struct cpuidle_state *state) { - ktime_t kt1, kt2; - s64 idle_time; + u32 t1, t2; struct acpi_processor *pr; struct acpi_processor_cx *cx = cpuidle_get_statedata(state); @@ -805,15 +871,14 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, return 0; } - kt1 = ktime_get_real(); + t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); acpi_idle_do_entry(cx); - kt2 = ktime_get_real(); - idle_time = ktime_to_us(ktime_sub(kt2, kt1)); + t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); local_irq_enable(); cx->usage++; - return idle_time; + return ticks_elapsed_in_us(t1, t2); } /** @@ -826,9 +891,8 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, { struct acpi_processor *pr; struct acpi_processor_cx *cx = cpuidle_get_statedata(state); - ktime_t kt1, kt2; - s64 idle_time; - s64 sleep_ticks = 0; + u32 t1, t2; + int sleep_ticks = 0; pr = __get_cpu_var(processors); @@ -861,19 +925,18 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, if (cx->type == ACPI_STATE_C3) ACPI_FLUSH_CPU_CACHE(); - kt1 = ktime_get_real(); + t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); /* Tell the scheduler that we are going deep-idle: */ sched_clock_idle_sleep_event(); acpi_idle_do_entry(cx); - kt2 = ktime_get_real(); - idle_time = ktime_to_us(ktime_sub(kt2, kt1)); + t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); #if defined (CONFIG_GENERIC_TIME) && defined (CONFIG_X86) /* TSC could halt in idle, so notify users */ if (tsc_halts_in_c(cx->type)) mark_tsc_unstable("TSC halts in idle");; #endif - sleep_ticks = us_to_pm_timer_ticks(idle_time); + sleep_ticks = ticks_elapsed(t1, t2); /* Tell the scheduler how much we idled: */ sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS); @@ -885,7 +948,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, acpi_state_timer_broadcast(pr, cx, 0); cx->time += sleep_ticks; - return idle_time; + return ticks_elapsed_in_us(t1, t2); } static int c3_cpu_count; @@ -903,10 +966,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, { struct acpi_processor *pr; struct acpi_processor_cx *cx = cpuidle_get_statedata(state); - ktime_t kt1, kt2; - s64 idle_time; - s64 sleep_ticks = 0; - + u32 t1, t2; + int sleep_ticks = 0; pr = __get_cpu_var(processors); @@ -967,21 +1028,20 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, c3_cpu_count++; /* Disable bus master arbitration when all CPUs are in C3 */ if (c3_cpu_count == num_online_cpus()) - acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 1); + acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); spin_unlock(&c3_lock); } else if (!pr->flags.bm_check) { ACPI_FLUSH_CPU_CACHE(); } - kt1 = ktime_get_real(); + t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); acpi_idle_do_entry(cx); - kt2 = ktime_get_real(); - idle_time = ktime_to_us(ktime_sub(kt2, kt1)); + t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); /* Re-enable bus master arbitration */ if (pr->flags.bm_check && pr->flags.bm_control) { spin_lock(&c3_lock); - acpi_write_bit_register(ACPI_BITREG_ARB_DISABLE, 0); + acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); c3_cpu_count--; spin_unlock(&c3_lock); } @@ -991,7 +1051,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, if (tsc_halts_in_c(ACPI_STATE_C3)) mark_tsc_unstable("TSC halts in idle"); #endif - sleep_ticks = us_to_pm_timer_ticks(idle_time); + sleep_ticks = ticks_elapsed(t1, t2); /* Tell the scheduler how much we idled: */ sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS); @@ -1002,7 +1062,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, acpi_state_timer_broadcast(pr, cx, 0); cx->time += sleep_ticks; - return idle_time; + return ticks_elapsed_in_us(t1, t2); } struct cpuidle_driver acpi_idle_driver = { diff --git a/trunk/drivers/acpi/processor_thermal.c b/trunk/drivers/acpi/processor_thermal.c index 0e47e299a9ac..b1eb376fae45 100644 --- a/trunk/drivers/acpi/processor_thermal.c +++ b/trunk/drivers/acpi/processor_thermal.c @@ -373,8 +373,7 @@ static int acpi_processor_max_state(struct acpi_processor *pr) return max_state; } static int -processor_get_max_state(struct thermal_cooling_device *cdev, - unsigned long *state) +processor_get_max_state(struct thermal_cooling_device *cdev, char *buf) { struct acpi_device *device = cdev->devdata; struct acpi_processor *pr = acpi_driver_data(device); @@ -382,29 +381,28 @@ processor_get_max_state(struct thermal_cooling_device *cdev, if (!device || !pr) return -EINVAL; - *state = acpi_processor_max_state(pr); - return 0; + return sprintf(buf, "%d\n", acpi_processor_max_state(pr)); } static int -processor_get_cur_state(struct thermal_cooling_device *cdev, - unsigned long *cur_state) +processor_get_cur_state(struct thermal_cooling_device *cdev, char *buf) { struct acpi_device *device = cdev->devdata; struct acpi_processor *pr = acpi_driver_data(device); + int cur_state; if (!device || !pr) return -EINVAL; - *cur_state = cpufreq_get_cur_state(pr->id); + cur_state = cpufreq_get_cur_state(pr->id); if (pr->flags.throttling) - *cur_state += pr->throttling.state; - return 0; + cur_state += pr->throttling.state; + + return sprintf(buf, "%d\n", cur_state); } static int -processor_set_cur_state(struct thermal_cooling_device *cdev, - unsigned long state) +processor_set_cur_state(struct thermal_cooling_device *cdev, unsigned int state) { struct acpi_device *device = cdev->devdata; struct acpi_processor *pr = acpi_driver_data(device); diff --git a/trunk/drivers/acpi/scan.c b/trunk/drivers/acpi/scan.c index b7308efce458..c54d7b6c4066 100644 --- a/trunk/drivers/acpi/scan.c +++ b/trunk/drivers/acpi/scan.c @@ -11,8 +11,6 @@ #include -#include "internal.h" - #define _COMPONENT ACPI_BUS_COMPONENT ACPI_MODULE_NAME("scan"); #define STRUCT_TO_INT(s) (*((int*)&s)) @@ -397,10 +395,22 @@ static int acpi_device_remove(struct device * dev) return 0; } +static void acpi_device_shutdown(struct device *dev) +{ + struct acpi_device *acpi_dev = to_acpi_device(dev); + struct acpi_driver *acpi_drv = acpi_dev->driver; + + if (acpi_drv && acpi_drv->ops.shutdown) + acpi_drv->ops.shutdown(acpi_dev); + + return ; +} + struct bus_type acpi_bus_type = { .name = "acpi", .suspend = acpi_device_suspend, .resume = acpi_device_resume, + .shutdown = acpi_device_shutdown, .match = acpi_bus_match, .probe = acpi_device_probe, .remove = acpi_device_remove, @@ -1514,11 +1524,16 @@ static int acpi_bus_scan_fixed(struct acpi_device *root) return result; } -int __init acpi_scan_init(void) + +static int __init acpi_scan_init(void) { int result; struct acpi_bus_ops ops; + + if (acpi_disabled) + return 0; + memset(&ops, 0, sizeof(ops)); ops.acpi_op_add = 1; ops.acpi_op_start = 1; @@ -1551,3 +1566,5 @@ int __init acpi_scan_init(void) Done: return result; } + +subsys_initcall(acpi_scan_init); diff --git a/trunk/drivers/acpi/sleep.c b/trunk/drivers/acpi/sleep.c index 91a284b54dbf..519266654f06 100644 --- a/trunk/drivers/acpi/sleep.c +++ b/trunk/drivers/acpi/sleep.c @@ -21,8 +21,6 @@ #include #include - -#include "internal.h" #include "sleep.h" u8 sleep_states[ACPI_S_STATE_COUNT]; @@ -250,7 +248,7 @@ static int acpi_suspend_enter(suspend_state_t pm_state) /* If ACPI is not enabled by the BIOS, we need to enable it here. */ if (set_sci_en_on_resume) - acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1); + acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1); else acpi_enable(); @@ -380,22 +378,6 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Macmini1,1"), }, }, - { - .callback = init_old_suspend_ordering, - .ident = "Asus Pundit P1-AH2 (M2N8L motherboard)", - .matches = { - DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTek Computer INC."), - DMI_MATCH(DMI_BOARD_NAME, "M2N8L"), - }, - }, - { - .callback = init_set_sci_en_on_resume, - .ident = "Toshiba Satellite L300", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), - DMI_MATCH(DMI_PRODUCT_NAME, "Satellite L300"), - }, - }, {}, }; #endif /* CONFIG_SUSPEND */ diff --git a/trunk/drivers/acpi/system.c b/trunk/drivers/acpi/system.c index 44be75ee7264..391d0358a592 100644 --- a/trunk/drivers/acpi/system.c +++ b/trunk/drivers/acpi/system.c @@ -62,7 +62,6 @@ module_param_call(acpica_version, NULL, param_get_acpica_version, NULL, 0444); -------------------------------------------------------------------------- */ static LIST_HEAD(acpi_table_attr_list); static struct kobject *tables_kobj; -static struct kobject *dynamic_tables_kobj; struct acpi_table_attr { struct bin_attribute attr; @@ -129,40 +128,6 @@ static void acpi_table_attr_init(struct acpi_table_attr *table_attr, return; } -static acpi_status -acpi_sysfs_table_handler(u32 event, void *table, void *context) -{ - struct acpi_table_attr *table_attr; - - switch (event) { - case ACPI_TABLE_EVENT_LOAD: - table_attr = - kzalloc(sizeof(struct acpi_table_attr), GFP_KERNEL); - if (!table_attr) - return AE_NO_MEMORY; - - acpi_table_attr_init(table_attr, table); - if (sysfs_create_bin_file(dynamic_tables_kobj, - &table_attr->attr)) { - kfree(table_attr); - return AE_ERROR; - } else - list_add_tail(&table_attr->node, - &acpi_table_attr_list); - break; - case ACPI_TABLE_EVENT_UNLOAD: - /* - * we do not need to do anything right now - * because the table is not deleted from the - * global table list when unloading it. - */ - break; - default: - return AE_BAD_PARAMETER; - } - return AE_OK; -} - static int acpi_system_sysfs_init(void) { struct acpi_table_attr *table_attr; @@ -172,11 +137,7 @@ static int acpi_system_sysfs_init(void) tables_kobj = kobject_create_and_add("tables", acpi_kobj); if (!tables_kobj) - goto err; - - dynamic_tables_kobj = kobject_create_and_add("dynamic", tables_kobj); - if (!dynamic_tables_kobj) - goto err_dynamic_tables; + return -ENOMEM; do { result = acpi_get_table_by_index(table_index, &table_header); @@ -201,14 +162,8 @@ static int acpi_system_sysfs_init(void) } } while (!result); kobject_uevent(tables_kobj, KOBJ_ADD); - kobject_uevent(dynamic_tables_kobj, KOBJ_ADD); - result = acpi_install_table_handler(acpi_sysfs_table_handler, NULL); - - return result == AE_OK ? 0 : -EINVAL; -err_dynamic_tables: - kobject_put(tables_kobj); -err: - return -ENOMEM; + + return 0; } /* @@ -616,9 +571,12 @@ static int acpi_system_procfs_init(void) } #endif -int __init acpi_system_init(void) +static int __init acpi_system_init(void) { - int result; + int result = 0; + + if (acpi_disabled) + return 0; result = acpi_system_procfs_init(); if (result) @@ -628,3 +586,5 @@ int __init acpi_system_init(void) return result; } + +subsys_initcall(acpi_system_init); diff --git a/trunk/drivers/acpi/thermal.c b/trunk/drivers/acpi/thermal.c index 6b959976b7a4..99e6f1f8ea45 100644 --- a/trunk/drivers/acpi/thermal.c +++ b/trunk/drivers/acpi/thermal.c @@ -37,11 +37,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include @@ -190,6 +190,7 @@ struct acpi_thermal { struct acpi_thermal_state state; struct acpi_thermal_trips trips; struct acpi_handle_list devices; + struct timer_list timer; struct thermal_zone_device *thermal_zone; int tz_enabled; struct mutex lock; @@ -289,11 +290,6 @@ static int acpi_thermal_set_polling(struct acpi_thermal *tz, int seconds) tz->polling_frequency = seconds * 10; /* Convert value to deci-seconds */ - tz->thermal_zone->polling_delay = seconds * 1000; - - if (tz->tz_enabled) - thermal_zone_device_update(tz->thermal_zone); - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency set to %lu seconds\n", tz->polling_frequency/10)); @@ -573,18 +569,392 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) return acpi_thermal_trips_update(tz, ACPI_TRIPS_INIT); } +static int acpi_thermal_critical(struct acpi_thermal *tz) +{ + if (!tz || !tz->trips.critical.flags.valid) + return -EINVAL; + + if (tz->temperature >= tz->trips.critical.temperature) { + printk(KERN_WARNING PREFIX "Critical trip point\n"); + tz->trips.critical.flags.enabled = 1; + } else if (tz->trips.critical.flags.enabled) + tz->trips.critical.flags.enabled = 0; + + acpi_bus_generate_proc_event(tz->device, ACPI_THERMAL_NOTIFY_CRITICAL, + tz->trips.critical.flags.enabled); + acpi_bus_generate_netlink_event(tz->device->pnp.device_class, + dev_name(&tz->device->dev), + ACPI_THERMAL_NOTIFY_CRITICAL, + tz->trips.critical.flags.enabled); + + /* take no action if nocrt is set */ + if(!nocrt) { + printk(KERN_EMERG + "Critical temperature reached (%ld C), shutting down.\n", + KELVIN_TO_CELSIUS(tz->temperature)); + orderly_poweroff(true); + } + + return 0; +} + +static int acpi_thermal_hot(struct acpi_thermal *tz) +{ + if (!tz || !tz->trips.hot.flags.valid) + return -EINVAL; + + if (tz->temperature >= tz->trips.hot.temperature) { + printk(KERN_WARNING PREFIX "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_proc_event(tz->device, ACPI_THERMAL_NOTIFY_HOT, + tz->trips.hot.flags.enabled); + acpi_bus_generate_netlink_event(tz->device->pnp.device_class, + dev_name(&tz->device->dev), + ACPI_THERMAL_NOTIFY_HOT, + tz->trips.hot.flags.enabled); + + /* TBD: Call user-mode "sleep(S4)" function if nocrt is cleared */ + + return 0; +} + +static void acpi_thermal_passive(struct acpi_thermal *tz) +{ + int result = 1; + struct acpi_thermal_passive *passive = NULL; + int trend = 0; + int i = 0; + + + if (!tz || !tz->trips.passive.flags.valid) + return; + + passive = &(tz->trips.passive); + + /* + * Above Trip? + * ----------- + * Calculate the thermal trend (using the passive cooling equation) + * and modify the performance limit for all passive cooling devices + * accordingly. Note that we assume symmetry. + */ + if (tz->temperature >= passive->temperature) { + trend = + (passive->tc1 * (tz->temperature - tz->last_temperature)) + + (passive->tc2 * (tz->temperature - passive->temperature)); + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "trend[%d]=(tc1[%lu]*(tmp[%lu]-last[%lu]))+(tc2[%lu]*(tmp[%lu]-psv[%lu]))\n", + trend, passive->tc1, tz->temperature, + tz->last_temperature, passive->tc2, + tz->temperature, passive->temperature)); + passive->flags.enabled = 1; + /* Heating up? */ + if (trend > 0) + for (i = 0; i < passive->devices.count; i++) + acpi_processor_set_thermal_limit(passive-> + devices. + handles[i], + ACPI_PROCESSOR_LIMIT_INCREMENT); + /* Cooling off? */ + else if (trend < 0) { + for (i = 0; i < passive->devices.count; i++) + /* + * assume that we are on highest + * freq/lowest thrott and can leave + * passive mode, even in error case + */ + if (!acpi_processor_set_thermal_limit + (passive->devices.handles[i], + ACPI_PROCESSOR_LIMIT_DECREMENT)) + result = 0; + /* + * Leave cooling mode, even if the temp might + * higher than trip point This is because some + * machines might have long thermal polling + * frequencies (tsp) defined. We will fall back + * into passive mode in next cycle (probably quicker) + */ + if (result) { + passive->flags.enabled = 0; + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "Disabling passive cooling, still above threshold," + " but we are cooling down\n")); + } + } + return; + } + + /* + * Below Trip? + * ----------- + * Implement passive cooling hysteresis to slowly increase performance + * and avoid thrashing around the passive trip point. Note that we + * assume symmetry. + */ + if (!passive->flags.enabled) + return; + for (i = 0; i < passive->devices.count; i++) + if (!acpi_processor_set_thermal_limit + (passive->devices.handles[i], + ACPI_PROCESSOR_LIMIT_DECREMENT)) + result = 0; + if (result) { + passive->flags.enabled = 0; + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "Disabling passive cooling (zone is cool)\n")); + } +} + +static void acpi_thermal_active(struct acpi_thermal *tz) +{ + int result = 0; + struct acpi_thermal_active *active = NULL; + int i = 0; + int j = 0; + unsigned long maxtemp = 0; + + + if (!tz) + return; + + for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) { + active = &(tz->trips.active[i]); + if (!active || !active->flags.valid) + break; + if (tz->temperature >= active->temperature) { + /* + * Above Threshold? + * ---------------- + * If not already enabled, turn ON all cooling devices + * associated with this active threshold. + */ + if (active->temperature > maxtemp) + tz->state.active_index = i; + maxtemp = active->temperature; + if (active->flags.enabled) + continue; + for (j = 0; j < active->devices.count; j++) { + result = + acpi_bus_set_power(active->devices. + handles[j], + ACPI_STATE_D0); + if (result) { + printk(KERN_WARNING PREFIX + "Unable to turn cooling device [%p] 'on'\n", + active->devices. + handles[j]); + continue; + } + active->flags.enabled = 1; + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "Cooling device [%p] now 'on'\n", + active->devices.handles[j])); + } + continue; + } + if (!active->flags.enabled) + continue; + /* + * Below Threshold? + * ---------------- + * Turn OFF all cooling devices associated with this + * threshold. + */ + for (j = 0; j < active->devices.count; j++) { + 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]); + continue; + } + active->flags.enabled = 0; + ACPI_DEBUG_PRINT((ACPI_DB_INFO, + "Cooling device [%p] now 'off'\n", + active->devices.handles[j])); + } + } +} + +static void acpi_thermal_check(void *context); + +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); +} + +static void acpi_thermal_active_off(void *data) +{ + int result = 0; + struct acpi_thermal *tz = data; + int i = 0; + int j = 0; + struct acpi_thermal_active *active = NULL; + + if (!tz) { + printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); + return; + } + + result = acpi_thermal_get_temperature(tz); + if (result) + return; + + for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) { + active = &(tz->trips.active[i]); + if (!active || !active->flags.valid) + break; + if (tz->temperature >= active->temperature) { + /* + * If the thermal temperature is greater than the + * active threshod, unnecessary to turn off the + * the active cooling device. + */ + continue; + } + /* + * Below Threshold? + * ---------------- + * Turn OFF all cooling devices associated with this + * threshold. + */ + for (j = 0; j < active->devices.count; j++) + result = acpi_bus_set_power(active->devices.handles[j], + ACPI_STATE_D3); + } +} + static void acpi_thermal_check(void *data) { + int result = 0; struct acpi_thermal *tz = data; + unsigned long sleep_time = 0; + unsigned long timeout_jiffies = 0; + int i = 0; + struct acpi_thermal_state state; + + + if (!tz) { + printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); + return; + } + + /* Check if someone else is already running */ + if (!mutex_trylock(&tz->lock)) + return; + + state = tz->state; + + result = acpi_thermal_get_temperature(tz); + if (result) + goto unlock; + + if (!tz->tz_enabled) + goto unlock; + + memset(&tz->state, 0, sizeof(tz->state)); + + /* + * Check Trip Points + * ----------------- + * Compare the current temperature to the trip point values to see + * if we've entered one of the thermal policy states. Note that + * this function determines when a state is entered, but the + * individual policy decides when it is exited (e.g. hysteresis). + */ + if (tz->trips.critical.flags.valid) + state.critical |= + (tz->temperature >= tz->trips.critical.temperature); + if (tz->trips.hot.flags.valid) + state.hot |= (tz->temperature >= tz->trips.hot.temperature); + if (tz->trips.passive.flags.valid) + state.passive |= + (tz->temperature >= tz->trips.passive.temperature); + for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) + if (tz->trips.active[i].flags.valid) + state.active |= + (tz->temperature >= + tz->trips.active[i].temperature); + + /* + * Invoke Policy + * ------------- + * Separated from the above check to allow individual policy to + * determine when to exit a given state. + */ + if (state.critical) + acpi_thermal_critical(tz); + if (state.hot) + acpi_thermal_hot(tz); + if (state.passive) + acpi_thermal_passive(tz); + if (state.active) + acpi_thermal_active(tz); + + /* + * Calculate State + * --------------- + * Again, separated from the above two to allow independent policy + * decisions. + */ + tz->state.critical = tz->trips.critical.flags.enabled; + tz->state.hot = tz->trips.hot.flags.enabled; + tz->state.passive = tz->trips.passive.flags.enabled; + tz->state.active = 0; + for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE; i++) + tz->state.active |= tz->trips.active[i].flags.enabled; + + /* + * Calculate Sleep Time + * -------------------- + * If we're in the passive state, use _TSP's value. Otherwise + * use the default polling frequency (e.g. _TZP). If no polling + * frequency is specified then we'll wait forever (at least until + * a thermal event occurs). Note that _TSP and _TZD values are + * given in 1/10th seconds (we must covert to milliseconds). + */ + if (tz->state.passive) { + sleep_time = tz->trips.passive.tsp * 100; + timeout_jiffies = jiffies + (HZ * sleep_time) / 1000; + } else if (tz->polling_frequency > 0) { + sleep_time = tz->polling_frequency * 100; + timeout_jiffies = round_jiffies(jiffies + (HZ * sleep_time) / 1000); + } - thermal_zone_device_update(tz->thermal_zone); + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s: temperature[%lu] sleep[%lu]\n", + tz->name, tz->temperature, sleep_time)); + + /* + * Schedule Next Poll + * ------------------ + */ + if (!sleep_time) { + if (timer_pending(&(tz->timer))) + del_timer(&(tz->timer)); + } else { + if (timer_pending(&(tz->timer))) + mod_timer(&(tz->timer), timeout_jiffies); + else { + tz->timer.data = (unsigned long)tz; + tz->timer.function = acpi_thermal_run; + tz->timer.expires = timeout_jiffies; + add_timer(&(tz->timer)); + } + } + unlock: + mutex_unlock(&tz->lock); } /* sys I/F for generic thermal sysfs support */ #define KELVIN_TO_MILLICELSIUS(t) (t * 100 - 273200) -static int thermal_get_temp(struct thermal_zone_device *thermal, - unsigned long *temp) +static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) { struct acpi_thermal *tz = thermal->devdata; int result; @@ -596,28 +966,25 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, if (result) return result; - *temp = KELVIN_TO_MILLICELSIUS(tz->temperature); - return 0; + return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature)); } static const char enabled[] = "kernel"; static const char disabled[] = "user"; static int thermal_get_mode(struct thermal_zone_device *thermal, - enum thermal_device_mode *mode) + char *buf) { struct acpi_thermal *tz = thermal->devdata; if (!tz) return -EINVAL; - *mode = tz->tz_enabled ? THERMAL_DEVICE_ENABLED : - THERMAL_DEVICE_DISABLED; - - return 0; + return sprintf(buf, "%s\n", tz->tz_enabled ? + enabled : disabled); } static int thermal_set_mode(struct thermal_zone_device *thermal, - enum thermal_device_mode mode) + const char *buf) { struct acpi_thermal *tz = thermal->devdata; int enable; @@ -628,9 +995,9 @@ static int thermal_set_mode(struct thermal_zone_device *thermal, /* * enable/disable thermal management from ACPI thermal driver */ - if (mode == THERMAL_DEVICE_ENABLED) + if (!strncmp(buf, enabled, sizeof enabled - 1)) enable = 1; - else if (mode == THERMAL_DEVICE_DISABLED) + else if (!strncmp(buf, disabled, sizeof disabled - 1)) enable = 0; else return -EINVAL; @@ -646,7 +1013,7 @@ static int thermal_set_mode(struct thermal_zone_device *thermal, } static int thermal_get_trip_type(struct thermal_zone_device *thermal, - int trip, enum thermal_trip_type *type) + int trip, char *buf) { struct acpi_thermal *tz = thermal->devdata; int i; @@ -655,35 +1022,27 @@ static int thermal_get_trip_type(struct thermal_zone_device *thermal, return -EINVAL; if (tz->trips.critical.flags.valid) { - if (!trip) { - *type = THERMAL_TRIP_CRITICAL; - return 0; - } + if (!trip) + return sprintf(buf, "critical\n"); trip--; } if (tz->trips.hot.flags.valid) { - if (!trip) { - *type = THERMAL_TRIP_HOT; - return 0; - } + if (!trip) + return sprintf(buf, "hot\n"); trip--; } if (tz->trips.passive.flags.valid) { - if (!trip) { - *type = THERMAL_TRIP_PASSIVE; - return 0; - } + if (!trip) + return sprintf(buf, "passive\n"); trip--; } for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && tz->trips.active[i].flags.valid; i++) { - if (!trip) { - *type = THERMAL_TRIP_ACTIVE; - return 0; - } + if (!trip) + return sprintf(buf, "active%d\n", i); trip--; } @@ -691,7 +1050,7 @@ static int thermal_get_trip_type(struct thermal_zone_device *thermal, } static int thermal_get_trip_temp(struct thermal_zone_device *thermal, - int trip, unsigned long *temp) + int trip, char *buf) { struct acpi_thermal *tz = thermal->devdata; int i; @@ -700,39 +1059,31 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal, return -EINVAL; if (tz->trips.critical.flags.valid) { - if (!trip) { - *temp = KELVIN_TO_MILLICELSIUS( - tz->trips.critical.temperature); - return 0; - } + if (!trip) + return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( + tz->trips.critical.temperature)); trip--; } if (tz->trips.hot.flags.valid) { - if (!trip) { - *temp = KELVIN_TO_MILLICELSIUS( - tz->trips.hot.temperature); - return 0; - } + if (!trip) + return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( + tz->trips.hot.temperature)); trip--; } if (tz->trips.passive.flags.valid) { - if (!trip) { - *temp = KELVIN_TO_MILLICELSIUS( - tz->trips.passive.temperature); - return 0; - } + if (!trip) + return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( + tz->trips.passive.temperature)); trip--; } for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && tz->trips.active[i].flags.valid; i++) { - if (!trip) { - *temp = KELVIN_TO_MILLICELSIUS( - tz->trips.active[i].temperature); - return 0; - } + if (!trip) + return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( + tz->trips.active[i].temperature)); trip--; } @@ -751,29 +1102,6 @@ static int thermal_get_crit_temp(struct thermal_zone_device *thermal, return -EINVAL; } -static int thermal_notify(struct thermal_zone_device *thermal, int trip, - enum thermal_trip_type trip_type) -{ - u8 type = 0; - struct acpi_thermal *tz = thermal->devdata; - - if (trip_type == THERMAL_TRIP_CRITICAL) - type = ACPI_THERMAL_NOTIFY_CRITICAL; - else if (trip_type == THERMAL_TRIP_HOT) - type = ACPI_THERMAL_NOTIFY_HOT; - else - return 0; - - acpi_bus_generate_proc_event(tz->device, type, 1); - acpi_bus_generate_netlink_event(tz->device->pnp.device_class, - dev_name(&tz->device->dev), type, 1); - - if (trip_type == THERMAL_TRIP_CRITICAL && nocrt) - return 1; - - return 0; -} - typedef int (*cb)(struct thermal_zone_device *, int, struct thermal_cooling_device *); static int acpi_thermal_cooling_device_cb(struct thermal_zone_device *thermal, @@ -866,7 +1194,6 @@ static struct thermal_zone_device_ops acpi_thermal_zone_ops = { .get_trip_type = thermal_get_trip_type, .get_trip_temp = thermal_get_trip_temp, .get_crit_temp = thermal_get_crit_temp, - .notify = thermal_notify, }; static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) @@ -887,21 +1214,8 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz) for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && tz->trips.active[i].flags.valid; i++, trips++); - - if (tz->trips.passive.flags.valid) - tz->thermal_zone = - thermal_zone_device_register("acpitz", trips, tz, - &acpi_thermal_zone_ops, - tz->trips.passive.tc1, - tz->trips.passive.tc2, - tz->trips.passive.tsp*100, - tz->polling_frequency*100); - else - tz->thermal_zone = - thermal_zone_device_register("acpitz", trips, tz, - &acpi_thermal_zone_ops, - 0, 0, 0, - tz->polling_frequency); + tz->thermal_zone = thermal_zone_device_register("acpitz", + trips, tz, &acpi_thermal_zone_ops); if (IS_ERR(tz->thermal_zone)) return -ENODEV; @@ -1133,13 +1447,13 @@ static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset) if (!tz) goto end; - if (!tz->thermal_zone->polling_delay) { + if (!tz->polling_frequency) { seq_puts(seq, "\n"); goto end; } - seq_printf(seq, "polling frequency: %d seconds\n", - (tz->thermal_zone->polling_delay / 1000)); + seq_printf(seq, "polling frequency: %lu seconds\n", + (tz->polling_frequency / 10)); end: return 0; @@ -1369,6 +1683,12 @@ static int acpi_thermal_add(struct acpi_device *device) if (result) goto unregister_thermal_zone; + init_timer(&tz->timer); + + acpi_thermal_active_off(tz); + + acpi_thermal_check(tz); + status = acpi_install_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, acpi_thermal_notify, tz); @@ -1397,15 +1717,36 @@ static int acpi_thermal_remove(struct acpi_device *device, int type) acpi_status status = AE_OK; struct acpi_thermal *tz = NULL; + if (!device || !acpi_driver_data(device)) return -EINVAL; tz = acpi_driver_data(device); + /* avoid timer adding new defer task */ + tz->zombie = 1; + /* wait for running timer (on other CPUs) finish */ + del_timer_sync(&(tz->timer)); + /* synchronize deferred task */ + acpi_os_wait_events_complete(NULL); + /* deferred task may reinsert timer */ + del_timer_sync(&(tz->timer)); + status = acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, acpi_thermal_notify); + /* Terminate policy */ + if (tz->trips.passive.flags.valid && tz->trips.passive.flags.enabled) { + tz->trips.passive.flags.enabled = 0; + acpi_thermal_passive(tz); + } + if (tz->trips.active[0].flags.valid + && tz->trips.active[0].flags.enabled) { + tz->trips.active[0].flags.enabled = 0; + acpi_thermal_active(tz); + } + acpi_thermal_remove_fs(device); acpi_thermal_unregister_thermal_zone(tz); mutex_destroy(&tz->lock); diff --git a/trunk/drivers/acpi/video.c b/trunk/drivers/acpi/video.c index 5259d502add6..bb5ed059114a 100644 --- a/trunk/drivers/acpi/video.c +++ b/trunk/drivers/acpi/video.c @@ -358,36 +358,32 @@ static struct output_properties acpi_output_properties = { /* thermal cooling device callbacks */ -static int video_get_max_state(struct thermal_cooling_device *cdev, unsigned - long *state) +static int video_get_max_state(struct thermal_cooling_device *cdev, char *buf) { struct acpi_device *device = cdev->devdata; struct acpi_video_device *video = acpi_driver_data(device); - *state = video->brightness->count - 3; - return 0; + return sprintf(buf, "%d\n", video->brightness->count - 3); } -static int video_get_cur_state(struct thermal_cooling_device *cdev, unsigned - long *state) +static int video_get_cur_state(struct thermal_cooling_device *cdev, char *buf) { struct acpi_device *device = cdev->devdata; struct acpi_video_device *video = acpi_driver_data(device); unsigned long long level; - int offset; + int state; acpi_video_device_lcd_get_level_current(video, &level); - for (offset = 2; offset < video->brightness->count; offset++) - if (level == video->brightness->levels[offset]) { - *state = video->brightness->count - offset - 1; - return 0; - } + for (state = 2; state < video->brightness->count; state++) + if (level == video->brightness->levels[state]) + return sprintf(buf, "%d\n", + video->brightness->count - state - 1); return -EINVAL; } static int -video_set_cur_state(struct thermal_cooling_device *cdev, unsigned long state) +video_set_cur_state(struct thermal_cooling_device *cdev, unsigned int state) { struct acpi_device *device = cdev->devdata; struct acpi_video_device *video = acpi_driver_data(device); diff --git a/trunk/drivers/acpi/wakeup.c b/trunk/drivers/acpi/wakeup.c index 5aee8c26cc9f..2d34806d45dd 100644 --- a/trunk/drivers/acpi/wakeup.c +++ b/trunk/drivers/acpi/wakeup.c @@ -8,8 +8,6 @@ #include #include #include - -#include "internal.h" #include "sleep.h" #define _COMPONENT ACPI_SYSTEM_COMPONENT @@ -138,10 +136,13 @@ void acpi_disable_wakeup_device(u8 sleep_state) spin_unlock(&acpi_device_lock); } -int __init acpi_wakeup_device_init(void) +static int __init acpi_wakeup_device_init(void) { struct list_head *node, *next; + if (acpi_disabled) + return 0; + spin_lock(&acpi_device_lock); list_for_each_safe(node, next, &acpi_wakeup_device_list) { struct acpi_device *dev = container_of(node, @@ -162,3 +163,5 @@ int __init acpi_wakeup_device_init(void) spin_unlock(&acpi_device_lock); return 0; } + +late_initcall(acpi_wakeup_device_init); diff --git a/trunk/drivers/block/Makefile b/trunk/drivers/block/Makefile index 87e120e0a79c..204332b29578 100644 --- a/trunk/drivers/block/Makefile +++ b/trunk/drivers/block/Makefile @@ -9,7 +9,6 @@ obj-$(CONFIG_MAC_FLOPPY) += swim3.o obj-$(CONFIG_BLK_DEV_FD) += floppy.o obj-$(CONFIG_AMIGA_FLOPPY) += amiflop.o obj-$(CONFIG_PS3_DISK) += ps3disk.o -obj-$(CONFIG_PS3_VRAM) += ps3vram.o obj-$(CONFIG_ATARI_FLOPPY) += ataflop.o obj-$(CONFIG_AMIGA_Z2RAM) += z2ram.o obj-$(CONFIG_BLK_DEV_RAM) += brd.o diff --git a/trunk/drivers/block/ps3vram.c b/trunk/drivers/block/ps3vram.c deleted file mode 100644 index 393ed6760d78..000000000000 --- a/trunk/drivers/block/ps3vram.c +++ /dev/null @@ -1,865 +0,0 @@ -/* - * ps3vram - Use extra PS3 video ram as MTD block device. - * - * Copyright 2009 Sony Corporation - * - * Based on the MTD ps3vram driver, which is - * Copyright (c) 2007-2008 Jim Paris - * Added support RSX DMA Vivien Chappelier - */ - -#include -#include -#include -#include - -#include -#include -#include - - -#define DEVICE_NAME "ps3vram" - - -#define XDR_BUF_SIZE (2 * 1024 * 1024) /* XDR buffer (must be 1MiB aligned) */ -#define XDR_IOIF 0x0c000000 - -#define FIFO_BASE XDR_IOIF -#define FIFO_SIZE (64 * 1024) - -#define DMA_PAGE_SIZE (4 * 1024) - -#define CACHE_PAGE_SIZE (256 * 1024) -#define CACHE_PAGE_COUNT ((XDR_BUF_SIZE - FIFO_SIZE) / CACHE_PAGE_SIZE) - -#define CACHE_OFFSET CACHE_PAGE_SIZE -#define FIFO_OFFSET 0 - -#define CTRL_PUT 0x10 -#define CTRL_GET 0x11 -#define CTRL_TOP 0x15 - -#define UPLOAD_SUBCH 1 -#define DOWNLOAD_SUBCH 2 - -#define NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN 0x0000030c -#define NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY 0x00000104 - -#define L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT 0x601 - -#define CACHE_PAGE_PRESENT 1 -#define CACHE_PAGE_DIRTY 2 - -struct ps3vram_tag { - unsigned int address; - unsigned int flags; -}; - -struct ps3vram_cache { - unsigned int page_count; - unsigned int page_size; - struct ps3vram_tag *tags; - unsigned int hit; - unsigned int miss; -}; - -struct ps3vram_priv { - struct request_queue *queue; - struct gendisk *gendisk; - - u64 size; - - u64 memory_handle; - u64 context_handle; - u32 *ctrl; - u32 *reports; - u8 __iomem *ddr_base; - u8 *xdr_buf; - - u32 *fifo_base; - u32 *fifo_ptr; - - struct ps3vram_cache cache; - - /* Used to serialize cache/DMA operations */ - struct mutex lock; -}; - - -static int ps3vram_major; - - -static struct block_device_operations ps3vram_fops = { - .owner = THIS_MODULE, -}; - - -#define DMA_NOTIFIER_HANDLE_BASE 0x66604200 /* first DMA notifier handle */ -#define DMA_NOTIFIER_OFFSET_BASE 0x1000 /* first DMA notifier offset */ -#define DMA_NOTIFIER_SIZE 0x40 -#define NOTIFIER 7 /* notifier used for completion report */ - -static char *size = "256M"; -module_param(size, charp, 0); -MODULE_PARM_DESC(size, "memory size"); - -static u32 *ps3vram_get_notifier(u32 *reports, int notifier) -{ - return (void *)reports + DMA_NOTIFIER_OFFSET_BASE + - DMA_NOTIFIER_SIZE * notifier; -} - -static void ps3vram_notifier_reset(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER); - int i; - - for (i = 0; i < 4; i++) - notify[i] = 0xffffffff; -} - -static int ps3vram_notifier_wait(struct ps3_system_bus_device *dev, - unsigned int timeout_ms) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER); - unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms); - - do { - if (!notify[3]) - return 0; - msleep(1); - } while (time_before(jiffies, timeout)); - - return -ETIMEDOUT; -} - -static void ps3vram_init_ring(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - - priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET; - priv->ctrl[CTRL_GET] = FIFO_BASE + FIFO_OFFSET; -} - -static int ps3vram_wait_ring(struct ps3_system_bus_device *dev, - unsigned int timeout_ms) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms); - - do { - if (priv->ctrl[CTRL_PUT] == priv->ctrl[CTRL_GET]) - return 0; - msleep(1); - } while (time_before(jiffies, timeout)); - - dev_warn(&dev->core, "FIFO timeout (%08x/%08x/%08x)\n", - priv->ctrl[CTRL_PUT], priv->ctrl[CTRL_GET], - priv->ctrl[CTRL_TOP]); - - return -ETIMEDOUT; -} - -static void ps3vram_out_ring(struct ps3vram_priv *priv, u32 data) -{ - *(priv->fifo_ptr)++ = data; -} - -static void ps3vram_begin_ring(struct ps3vram_priv *priv, u32 chan, u32 tag, - u32 size) -{ - ps3vram_out_ring(priv, (size << 18) | (chan << 13) | tag); -} - -static void ps3vram_rewind_ring(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - int status; - - ps3vram_out_ring(priv, 0x20000000 | (FIFO_BASE + FIFO_OFFSET)); - - priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET; - - /* asking the HV for a blit will kick the FIFO */ - status = lv1_gpu_context_attribute(priv->context_handle, - L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT, 0, - 0, 0, 0); - if (status) - dev_err(&dev->core, - "%s: lv1_gpu_context_attribute failed %d\n", __func__, - status); - - priv->fifo_ptr = priv->fifo_base; -} - -static void ps3vram_fire_ring(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - int status; - - mutex_lock(&ps3_gpu_mutex); - - priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET + - (priv->fifo_ptr - priv->fifo_base) * sizeof(u32); - - /* asking the HV for a blit will kick the FIFO */ - status = lv1_gpu_context_attribute(priv->context_handle, - L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT, 0, - 0, 0, 0); - if (status) - dev_err(&dev->core, - "%s: lv1_gpu_context_attribute failed %d\n", __func__, - status); - - if ((priv->fifo_ptr - priv->fifo_base) * sizeof(u32) > - FIFO_SIZE - 1024) { - dev_dbg(&dev->core, "FIFO full, rewinding\n"); - ps3vram_wait_ring(dev, 200); - ps3vram_rewind_ring(dev); - } - - mutex_unlock(&ps3_gpu_mutex); -} - -static void ps3vram_bind(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - - ps3vram_begin_ring(priv, UPLOAD_SUBCH, 0, 1); - ps3vram_out_ring(priv, 0x31337303); - ps3vram_begin_ring(priv, UPLOAD_SUBCH, 0x180, 3); - ps3vram_out_ring(priv, DMA_NOTIFIER_HANDLE_BASE + NOTIFIER); - ps3vram_out_ring(priv, 0xfeed0001); /* DMA system RAM instance */ - ps3vram_out_ring(priv, 0xfeed0000); /* DMA video RAM instance */ - - ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, 0, 1); - ps3vram_out_ring(priv, 0x3137c0de); - ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, 0x180, 3); - ps3vram_out_ring(priv, DMA_NOTIFIER_HANDLE_BASE + NOTIFIER); - ps3vram_out_ring(priv, 0xfeed0000); /* DMA video RAM instance */ - ps3vram_out_ring(priv, 0xfeed0001); /* DMA system RAM instance */ - - ps3vram_fire_ring(dev); -} - -static int ps3vram_upload(struct ps3_system_bus_device *dev, - unsigned int src_offset, unsigned int dst_offset, - int len, int count) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - - ps3vram_begin_ring(priv, UPLOAD_SUBCH, - NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); - ps3vram_out_ring(priv, XDR_IOIF + src_offset); - ps3vram_out_ring(priv, dst_offset); - ps3vram_out_ring(priv, len); - ps3vram_out_ring(priv, len); - ps3vram_out_ring(priv, len); - ps3vram_out_ring(priv, count); - ps3vram_out_ring(priv, (1 << 8) | 1); - ps3vram_out_ring(priv, 0); - - ps3vram_notifier_reset(dev); - ps3vram_begin_ring(priv, UPLOAD_SUBCH, - NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY, 1); - ps3vram_out_ring(priv, 0); - ps3vram_begin_ring(priv, UPLOAD_SUBCH, 0x100, 1); - ps3vram_out_ring(priv, 0); - ps3vram_fire_ring(dev); - if (ps3vram_notifier_wait(dev, 200) < 0) { - dev_warn(&dev->core, "%s: Notifier timeout\n", __func__); - return -1; - } - - return 0; -} - -static int ps3vram_download(struct ps3_system_bus_device *dev, - unsigned int src_offset, unsigned int dst_offset, - int len, int count) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - - ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, - NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); - ps3vram_out_ring(priv, src_offset); - ps3vram_out_ring(priv, XDR_IOIF + dst_offset); - ps3vram_out_ring(priv, len); - ps3vram_out_ring(priv, len); - ps3vram_out_ring(priv, len); - ps3vram_out_ring(priv, count); - ps3vram_out_ring(priv, (1 << 8) | 1); - ps3vram_out_ring(priv, 0); - - ps3vram_notifier_reset(dev); - ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, - NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY, 1); - ps3vram_out_ring(priv, 0); - ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, 0x100, 1); - ps3vram_out_ring(priv, 0); - ps3vram_fire_ring(dev); - if (ps3vram_notifier_wait(dev, 200) < 0) { - dev_warn(&dev->core, "%s: Notifier timeout\n", __func__); - return -1; - } - - return 0; -} - -static void ps3vram_cache_evict(struct ps3_system_bus_device *dev, int entry) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - struct ps3vram_cache *cache = &priv->cache; - - if (!(cache->tags[entry].flags & CACHE_PAGE_DIRTY)) - return; - - dev_dbg(&dev->core, "Flushing %d: 0x%08x\n", entry, - cache->tags[entry].address); - if (ps3vram_upload(dev, CACHE_OFFSET + entry * cache->page_size, - cache->tags[entry].address, DMA_PAGE_SIZE, - cache->page_size / DMA_PAGE_SIZE) < 0) { - dev_err(&dev->core, - "Failed to upload from 0x%x to " "0x%x size 0x%x\n", - entry * cache->page_size, cache->tags[entry].address, - cache->page_size); - } - cache->tags[entry].flags &= ~CACHE_PAGE_DIRTY; -} - -static void ps3vram_cache_load(struct ps3_system_bus_device *dev, int entry, - unsigned int address) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - struct ps3vram_cache *cache = &priv->cache; - - dev_dbg(&dev->core, "Fetching %d: 0x%08x\n", entry, address); - if (ps3vram_download(dev, address, - CACHE_OFFSET + entry * cache->page_size, - DMA_PAGE_SIZE, - cache->page_size / DMA_PAGE_SIZE) < 0) { - dev_err(&dev->core, - "Failed to download from 0x%x to 0x%x size 0x%x\n", - address, entry * cache->page_size, cache->page_size); - } - - cache->tags[entry].address = address; - cache->tags[entry].flags |= CACHE_PAGE_PRESENT; -} - - -static void ps3vram_cache_flush(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - struct ps3vram_cache *cache = &priv->cache; - int i; - - dev_dbg(&dev->core, "FLUSH\n"); - for (i = 0; i < cache->page_count; i++) { - ps3vram_cache_evict(dev, i); - cache->tags[i].flags = 0; - } -} - -static unsigned int ps3vram_cache_match(struct ps3_system_bus_device *dev, - loff_t address) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - struct ps3vram_cache *cache = &priv->cache; - unsigned int base; - unsigned int offset; - int i; - static int counter; - - offset = (unsigned int) (address & (cache->page_size - 1)); - base = (unsigned int) (address - offset); - - /* fully associative check */ - for (i = 0; i < cache->page_count; i++) { - if ((cache->tags[i].flags & CACHE_PAGE_PRESENT) && - cache->tags[i].address == base) { - cache->hit++; - dev_dbg(&dev->core, "Found entry %d: 0x%08x\n", i, - cache->tags[i].address); - return i; - } - } - - /* choose a random entry */ - i = (jiffies + (counter++)) % cache->page_count; - dev_dbg(&dev->core, "Using entry %d\n", i); - - ps3vram_cache_evict(dev, i); - ps3vram_cache_load(dev, i, base); - - cache->miss++; - return i; -} - -static int ps3vram_cache_init(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - - priv->cache.page_count = CACHE_PAGE_COUNT; - priv->cache.page_size = CACHE_PAGE_SIZE; - priv->cache.tags = kzalloc(sizeof(struct ps3vram_tag) * - CACHE_PAGE_COUNT, GFP_KERNEL); - if (priv->cache.tags == NULL) { - dev_err(&dev->core, "Could not allocate cache tags\n"); - return -ENOMEM; - } - - dev_info(&dev->core, "Created ram cache: %d entries, %d KiB each\n", - CACHE_PAGE_COUNT, CACHE_PAGE_SIZE / 1024); - - return 0; -} - -static void ps3vram_cache_cleanup(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - - ps3vram_cache_flush(dev); - kfree(priv->cache.tags); -} - -static int ps3vram_read(struct ps3_system_bus_device *dev, loff_t from, - size_t len, size_t *retlen, u_char *buf) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - unsigned int cached, count; - - dev_dbg(&dev->core, "%s: from=0x%08x len=0x%zx\n", __func__, - (unsigned int)from, len); - - if (from >= priv->size) - return -EIO; - - if (len > priv->size - from) - len = priv->size - from; - - /* Copy from vram to buf */ - count = len; - while (count) { - unsigned int offset, avail; - unsigned int entry; - - offset = (unsigned int) (from & (priv->cache.page_size - 1)); - avail = priv->cache.page_size - offset; - - mutex_lock(&priv->lock); - - entry = ps3vram_cache_match(dev, from); - cached = CACHE_OFFSET + entry * priv->cache.page_size + offset; - - dev_dbg(&dev->core, "%s: from=%08x cached=%08x offset=%08x " - "avail=%08x count=%08x\n", __func__, - (unsigned int)from, cached, offset, avail, count); - - if (avail > count) - avail = count; - memcpy(buf, priv->xdr_buf + cached, avail); - - mutex_unlock(&priv->lock); - - buf += avail; - count -= avail; - from += avail; - } - - *retlen = len; - return 0; -} - -static int ps3vram_write(struct ps3_system_bus_device *dev, loff_t to, - size_t len, size_t *retlen, const u_char *buf) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - unsigned int cached, count; - - if (to >= priv->size) - return -EIO; - - if (len > priv->size - to) - len = priv->size - to; - - /* Copy from buf to vram */ - count = len; - while (count) { - unsigned int offset, avail; - unsigned int entry; - - offset = (unsigned int) (to & (priv->cache.page_size - 1)); - avail = priv->cache.page_size - offset; - - mutex_lock(&priv->lock); - - entry = ps3vram_cache_match(dev, to); - cached = CACHE_OFFSET + entry * priv->cache.page_size + offset; - - dev_dbg(&dev->core, "%s: to=%08x cached=%08x offset=%08x " - "avail=%08x count=%08x\n", __func__, (unsigned int)to, - cached, offset, avail, count); - - if (avail > count) - avail = count; - memcpy(priv->xdr_buf + cached, buf, avail); - - priv->cache.tags[entry].flags |= CACHE_PAGE_DIRTY; - - mutex_unlock(&priv->lock); - - buf += avail; - count -= avail; - to += avail; - } - - *retlen = len; - return 0; -} - -static int ps3vram_proc_show(struct seq_file *m, void *v) -{ - struct ps3vram_priv *priv = m->private; - - seq_printf(m, "hit:%u\nmiss:%u\n", priv->cache.hit, priv->cache.miss); - return 0; -} - -static int ps3vram_proc_open(struct inode *inode, struct file *file) -{ - return single_open(file, ps3vram_proc_show, PDE(inode)->data); -} - -static const struct file_operations ps3vram_proc_fops = { - .owner = THIS_MODULE, - .open = ps3vram_proc_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; - -static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - struct proc_dir_entry *pde; - - pde = proc_create(DEVICE_NAME, 0444, NULL, &ps3vram_proc_fops); - if (!pde) { - dev_warn(&dev->core, "failed to create /proc entry\n"); - return; - } - - pde->owner = THIS_MODULE; - pde->data = priv; -} - -static int ps3vram_make_request(struct request_queue *q, struct bio *bio) -{ - struct ps3_system_bus_device *dev = q->queuedata; - int write = bio_data_dir(bio) == WRITE; - const char *op = write ? "write" : "read"; - loff_t offset = bio->bi_sector << 9; - int error = 0; - struct bio_vec *bvec; - unsigned int i; - - dev_dbg(&dev->core, "%s\n", __func__); - - bio_for_each_segment(bvec, bio, i) { - /* PS3 is ppc64, so we don't handle highmem */ - char *ptr = page_address(bvec->bv_page) + bvec->bv_offset; - size_t len = bvec->bv_len, retlen; - - dev_dbg(&dev->core, " %s %zu bytes at offset %llu\n", op, - len, offset); - if (write) - error = ps3vram_write(dev, offset, len, &retlen, ptr); - else - error = ps3vram_read(dev, offset, len, &retlen, ptr); - - if (error) { - dev_err(&dev->core, "%s failed\n", op); - goto out; - } - - if (retlen != len) { - dev_err(&dev->core, "Short %s\n", op); - goto out; - } - - offset += len; - } - - dev_dbg(&dev->core, "%s completed\n", op); - -out: - bio_endio(bio, error); - return 0; -} - -static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv; - int error, status; - struct request_queue *queue; - struct gendisk *gendisk; - u64 ddr_lpar, ctrl_lpar, info_lpar, reports_lpar, ddr_size, - reports_size; - char *rest; - - priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (!priv) { - error = -ENOMEM; - goto fail; - } - - mutex_init(&priv->lock); - dev->core.driver_data = priv; - - priv = dev->core.driver_data; - - /* Allocate XDR buffer (1MiB aligned) */ - priv->xdr_buf = (void *)__get_free_pages(GFP_KERNEL, - get_order(XDR_BUF_SIZE)); - if (priv->xdr_buf == NULL) { - dev_err(&dev->core, "Could not allocate XDR buffer\n"); - error = -ENOMEM; - goto fail_free_priv; - } - - /* Put FIFO at begginning of XDR buffer */ - priv->fifo_base = (u32 *) (priv->xdr_buf + FIFO_OFFSET); - priv->fifo_ptr = priv->fifo_base; - - /* XXX: Need to open GPU, in case ps3fb or snd_ps3 aren't loaded */ - if (ps3_open_hv_device(dev)) { - dev_err(&dev->core, "ps3_open_hv_device failed\n"); - error = -EAGAIN; - goto out_close_gpu; - } - - /* Request memory */ - status = -1; - ddr_size = ALIGN(memparse(size, &rest), 1024*1024); - if (!ddr_size) { - dev_err(&dev->core, "Specified size is too small\n"); - error = -EINVAL; - goto out_close_gpu; - } - - while (ddr_size > 0) { - status = lv1_gpu_memory_allocate(ddr_size, 0, 0, 0, 0, - &priv->memory_handle, - &ddr_lpar); - if (!status) - break; - ddr_size -= 1024*1024; - } - if (status) { - dev_err(&dev->core, "lv1_gpu_memory_allocate failed %d\n", - status); - error = -ENOMEM; - goto out_free_xdr_buf; - } - - /* Request context */ - status = lv1_gpu_context_allocate(priv->memory_handle, 0, - &priv->context_handle, &ctrl_lpar, - &info_lpar, &reports_lpar, - &reports_size); - if (status) { - dev_err(&dev->core, "lv1_gpu_context_allocate failed %d\n", - status); - error = -ENOMEM; - goto out_free_memory; - } - - /* Map XDR buffer to RSX */ - status = lv1_gpu_context_iomap(priv->context_handle, XDR_IOIF, - ps3_mm_phys_to_lpar(__pa(priv->xdr_buf)), - XDR_BUF_SIZE, 0); - if (status) { - dev_err(&dev->core, "lv1_gpu_context_iomap failed %d\n", - status); - error = -ENOMEM; - goto out_free_context; - } - - priv->ddr_base = ioremap_flags(ddr_lpar, ddr_size, _PAGE_NO_CACHE); - - if (!priv->ddr_base) { - dev_err(&dev->core, "ioremap DDR failed\n"); - error = -ENOMEM; - goto out_free_context; - } - - priv->ctrl = ioremap(ctrl_lpar, 64 * 1024); - if (!priv->ctrl) { - dev_err(&dev->core, "ioremap CTRL failed\n"); - error = -ENOMEM; - goto out_unmap_vram; - } - - priv->reports = ioremap(reports_lpar, reports_size); - if (!priv->reports) { - dev_err(&dev->core, "ioremap REPORTS failed\n"); - error = -ENOMEM; - goto out_unmap_ctrl; - } - - mutex_lock(&ps3_gpu_mutex); - ps3vram_init_ring(dev); - mutex_unlock(&ps3_gpu_mutex); - - priv->size = ddr_size; - - ps3vram_bind(dev); - - mutex_lock(&ps3_gpu_mutex); - error = ps3vram_wait_ring(dev, 100); - mutex_unlock(&ps3_gpu_mutex); - if (error < 0) { - dev_err(&dev->core, "Failed to initialize channels\n"); - error = -ETIMEDOUT; - goto out_unmap_reports; - } - - ps3vram_cache_init(dev); - ps3vram_proc_init(dev); - - queue = blk_alloc_queue(GFP_KERNEL); - if (!queue) { - dev_err(&dev->core, "blk_alloc_queue failed\n"); - error = -ENOMEM; - goto out_cache_cleanup; - } - - priv->queue = queue; - queue->queuedata = dev; - blk_queue_make_request(queue, ps3vram_make_request); - blk_queue_max_phys_segments(queue, MAX_PHYS_SEGMENTS); - blk_queue_max_hw_segments(queue, MAX_HW_SEGMENTS); - blk_queue_max_segment_size(queue, MAX_SEGMENT_SIZE); - blk_queue_max_sectors(queue, SAFE_MAX_SECTORS); - - gendisk = alloc_disk(1); - if (!gendisk) { - dev_err(&dev->core, "alloc_disk failed\n"); - error = -ENOMEM; - goto fail_cleanup_queue; - } - - priv->gendisk = gendisk; - gendisk->major = ps3vram_major; - gendisk->first_minor = 0; - gendisk->fops = &ps3vram_fops; - gendisk->queue = queue; - gendisk->private_data = dev; - gendisk->driverfs_dev = &dev->core; - strlcpy(gendisk->disk_name, DEVICE_NAME, sizeof(gendisk->disk_name)); - set_capacity(gendisk, priv->size >> 9); - - dev_info(&dev->core, "%s: Using %lu MiB of GPU memory\n", - gendisk->disk_name, get_capacity(gendisk) >> 11); - - add_disk(gendisk); - return 0; - -fail_cleanup_queue: - blk_cleanup_queue(queue); -out_cache_cleanup: - remove_proc_entry(DEVICE_NAME, NULL); - ps3vram_cache_cleanup(dev); -out_unmap_reports: - iounmap(priv->reports); -out_unmap_ctrl: - iounmap(priv->ctrl); -out_unmap_vram: - iounmap(priv->ddr_base); -out_free_context: - lv1_gpu_context_free(priv->context_handle); -out_free_memory: - lv1_gpu_memory_free(priv->memory_handle); -out_close_gpu: - ps3_close_hv_device(dev); -out_free_xdr_buf: - free_pages((unsigned long) priv->xdr_buf, get_order(XDR_BUF_SIZE)); -fail_free_priv: - kfree(priv); - dev->core.driver_data = NULL; -fail: - return error; -} - -static int ps3vram_remove(struct ps3_system_bus_device *dev) -{ - struct ps3vram_priv *priv = dev->core.driver_data; - - del_gendisk(priv->gendisk); - put_disk(priv->gendisk); - blk_cleanup_queue(priv->queue); - remove_proc_entry(DEVICE_NAME, NULL); - ps3vram_cache_cleanup(dev); - iounmap(priv->reports); - iounmap(priv->ctrl); - iounmap(priv->ddr_base); - lv1_gpu_context_free(priv->context_handle); - lv1_gpu_memory_free(priv->memory_handle); - ps3_close_hv_device(dev); - free_pages((unsigned long) priv->xdr_buf, get_order(XDR_BUF_SIZE)); - kfree(priv); - dev->core.driver_data = NULL; - return 0; -} - -static struct ps3_system_bus_driver ps3vram = { - .match_id = PS3_MATCH_ID_GPU, - .match_sub_id = PS3_MATCH_SUB_ID_GPU_RAMDISK, - .core.name = DEVICE_NAME, - .core.owner = THIS_MODULE, - .probe = ps3vram_probe, - .remove = ps3vram_remove, - .shutdown = ps3vram_remove, -}; - - -static int __init ps3vram_init(void) -{ - int error; - - if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) - return -ENODEV; - - error = register_blkdev(0, DEVICE_NAME); - if (error <= 0) { - pr_err("%s: register_blkdev failed %d\n", DEVICE_NAME, error); - return error; - } - ps3vram_major = error; - - pr_info("%s: registered block device major %d\n", DEVICE_NAME, - ps3vram_major); - - error = ps3_system_bus_driver_register(&ps3vram); - if (error) - unregister_blkdev(ps3vram_major, DEVICE_NAME); - - return error; -} - -static void __exit ps3vram_exit(void) -{ - ps3_system_bus_driver_unregister(&ps3vram); - unregister_blkdev(ps3vram_major, DEVICE_NAME); -} - -module_init(ps3vram_init); -module_exit(ps3vram_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("PS3 Video RAM Storage Driver"); -MODULE_AUTHOR("Sony Corporation"); -MODULE_ALIAS(PS3_MODULE_ALIAS_GPU_RAMDISK); diff --git a/trunk/drivers/block/xsysace.c b/trunk/drivers/block/xsysace.c index 119be3442f28..381d686fc1a3 100644 --- a/trunk/drivers/block/xsysace.c +++ b/trunk/drivers/block/xsysace.c @@ -489,28 +489,6 @@ static void ace_fsm_dostate(struct ace_device *ace) ace->fsm_state, ace->id_req_count); #endif - /* Verify that there is actually a CF in the slot. If not, then - * bail out back to the idle state and wake up all the waiters */ - status = ace_in32(ace, ACE_STATUS); - if ((status & ACE_STATUS_CFDETECT) == 0) { - ace->fsm_state = ACE_FSM_STATE_IDLE; - ace->media_change = 1; - set_capacity(ace->gd, 0); - dev_info(ace->dev, "No CF in slot\n"); - - /* Drop all pending requests */ - while ((req = elv_next_request(ace->queue)) != NULL) - end_request(req, 0); - - /* Drop back to IDLE state and notify waiters */ - ace->fsm_state = ACE_FSM_STATE_IDLE; - ace->id_result = -EIO; - while (ace->id_req_count) { - complete(&ace->id_completion); - ace->id_req_count--; - } - } - switch (ace->fsm_state) { case ACE_FSM_STATE_IDLE: /* See if there is anything to do */ diff --git a/trunk/drivers/dca/dca-sysfs.c b/trunk/drivers/dca/dca-sysfs.c index ee916c9857ee..bb538b9690e0 100644 --- a/trunk/drivers/dca/dca-sysfs.c +++ b/trunk/drivers/dca/dca-sysfs.c @@ -1,24 +1,3 @@ -/* - * Copyright(c) 2007 - 2009 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. - */ - #include #include #include diff --git a/trunk/drivers/hid/usbhid/hiddev.c b/trunk/drivers/hid/usbhid/hiddev.c index 1f5b5d4c3c34..4940e4d70c2d 100644 --- a/trunk/drivers/hid/usbhid/hiddev.c +++ b/trunk/drivers/hid/usbhid/hiddev.c @@ -306,7 +306,7 @@ static int hiddev_open(struct inode *inode, struct file *file) return 0; bail: file->private_data = NULL; - kfree(list); + kfree(list->hiddev); return res; } @@ -323,7 +323,7 @@ static ssize_t hiddev_write(struct file * file, const char __user * buffer, size */ static ssize_t hiddev_read(struct file * file, char __user * buffer, size_t count, loff_t *ppos) { - DEFINE_WAIT(wait); + DECLARE_WAITQUEUE(wait, current); struct hiddev_list *list = file->private_data; int event_size; int retval; diff --git a/trunk/drivers/isdn/gigaset/bas-gigaset.c b/trunk/drivers/isdn/gigaset/bas-gigaset.c index 831ddce1467b..18dd8aacbe8d 100644 --- a/trunk/drivers/isdn/gigaset/bas-gigaset.c +++ b/trunk/drivers/isdn/gigaset/bas-gigaset.c @@ -46,9 +46,6 @@ MODULE_PARM_DESC(cidmode, "Call-ID mode"); /* length limit according to Siemens 3070usb-protokoll.doc ch. 2.1 */ #define IF_WRITEBUF 264 -/* interrupt pipe message size according to ibid. ch. 2.2 */ -#define IP_MSGSIZE 3 - /* Values for the Gigaset 307x */ #define USB_GIGA_VENDOR_ID 0x0681 #define USB_3070_PRODUCT_ID 0x0001 @@ -113,7 +110,7 @@ struct bas_cardstate { unsigned char *rcvbuf; /* AT reply receive buffer */ struct urb *urb_int_in; /* URB for interrupt pipe */ - unsigned char *int_in_buf; + unsigned char int_in_buf[3]; spinlock_t lock; /* locks all following */ int basstate; /* bitmap (BS_*) */ @@ -660,7 +657,7 @@ static void read_int_callback(struct urb *urb) } /* drop incomplete packets even if the missing bytes wouldn't matter */ - if (unlikely(urb->actual_length < IP_MSGSIZE)) { + if (unlikely(urb->actual_length < 3)) { dev_warn(cs->dev, "incomplete interrupt packet (%d bytes)\n", urb->actual_length); goto resubmit; @@ -2130,7 +2127,6 @@ static void gigaset_reinitbcshw(struct bc_state *bcs) static void gigaset_freecshw(struct cardstate *cs) { /* timers, URBs and rcvbuf are disposed of in disconnect */ - kfree(cs->hw.bas->int_in_buf); kfree(cs->hw.bas); cs->hw.bas = NULL; } @@ -2144,12 +2140,6 @@ static int gigaset_initcshw(struct cardstate *cs) pr_err("out of memory\n"); return 0; } - ucs->int_in_buf = kmalloc(IP_MSGSIZE, GFP_KERNEL); - if (!ucs->int_in_buf) { - kfree(ucs); - pr_err("out of memory\n"); - return 0; - } ucs->urb_cmd_in = NULL; ucs->urb_cmd_out = NULL; @@ -2302,7 +2292,7 @@ static int gigaset_probe(struct usb_interface *interface, usb_fill_int_urb(ucs->urb_int_in, udev, usb_rcvintpipe(udev, (endpoint->bEndpointAddress) & 0x0f), - ucs->int_in_buf, IP_MSGSIZE, read_int_callback, cs, + ucs->int_in_buf, 3, read_int_callback, cs, endpoint->bInterval); if ((rc = usb_submit_urb(ucs->urb_int_in, GFP_KERNEL)) != 0) { dev_err(cs->dev, "could not submit interrupt URB: %s\n", diff --git a/trunk/drivers/md/dm-crypt.c b/trunk/drivers/md/dm-crypt.c index bfefd079a955..35bda49796fb 100644 --- a/trunk/drivers/md/dm-crypt.c +++ b/trunk/drivers/md/dm-crypt.c @@ -60,7 +60,6 @@ struct dm_crypt_io { }; struct dm_crypt_request { - struct convert_context *ctx; struct scatterlist sg_in; struct scatterlist sg_out; }; @@ -336,18 +335,6 @@ static void crypt_convert_init(struct crypt_config *cc, init_completion(&ctx->restart); } -static struct dm_crypt_request *dmreq_of_req(struct crypt_config *cc, - struct ablkcipher_request *req) -{ - return (struct dm_crypt_request *)((char *)req + cc->dmreq_start); -} - -static struct ablkcipher_request *req_of_dmreq(struct crypt_config *cc, - struct dm_crypt_request *dmreq) -{ - return (struct ablkcipher_request *)((char *)dmreq - cc->dmreq_start); -} - static int crypt_convert_block(struct crypt_config *cc, struct convert_context *ctx, struct ablkcipher_request *req) @@ -358,11 +345,10 @@ static int crypt_convert_block(struct crypt_config *cc, u8 *iv; int r = 0; - dmreq = dmreq_of_req(cc, req); + dmreq = (struct dm_crypt_request *)((char *)req + cc->dmreq_start); iv = (u8 *)ALIGN((unsigned long)(dmreq + 1), crypto_ablkcipher_alignmask(cc->tfm) + 1); - dmreq->ctx = ctx; sg_init_table(&dmreq->sg_in, 1); sg_set_page(&dmreq->sg_in, bv_in->bv_page, 1 << SECTOR_SHIFT, bv_in->bv_offset + ctx->offset_in); @@ -409,9 +395,8 @@ static void crypt_alloc_req(struct crypt_config *cc, cc->req = mempool_alloc(cc->req_pool, GFP_NOIO); ablkcipher_request_set_tfm(cc->req, cc->tfm); ablkcipher_request_set_callback(cc->req, CRYPTO_TFM_REQ_MAY_BACKLOG | - CRYPTO_TFM_REQ_MAY_SLEEP, - kcryptd_async_done, - dmreq_of_req(cc, cc->req)); + CRYPTO_TFM_REQ_MAY_SLEEP, + kcryptd_async_done, ctx); } /* @@ -568,22 +553,19 @@ static void crypt_inc_pending(struct dm_crypt_io *io) static void crypt_dec_pending(struct dm_crypt_io *io) { struct crypt_config *cc = io->target->private; - struct bio *base_bio = io->base_bio; - struct dm_crypt_io *base_io = io->base_io; - int error = io->error; if (!atomic_dec_and_test(&io->pending)) return; - mempool_free(io, cc->io_pool); - - if (likely(!base_io)) - bio_endio(base_bio, error); + if (likely(!io->base_io)) + bio_endio(io->base_bio, io->error); else { - if (error && !base_io->error) - base_io->error = error; - crypt_dec_pending(base_io); + if (io->error && !io->base_io->error) + io->base_io->error = io->error; + crypt_dec_pending(io->base_io); } + + mempool_free(io, cc->io_pool); } /* @@ -839,8 +821,7 @@ static void kcryptd_crypt_read_convert(struct dm_crypt_io *io) static void kcryptd_async_done(struct crypto_async_request *async_req, int error) { - struct dm_crypt_request *dmreq = async_req->data; - struct convert_context *ctx = dmreq->ctx; + struct convert_context *ctx = async_req->data; struct dm_crypt_io *io = container_of(ctx, struct dm_crypt_io, ctx); struct crypt_config *cc = io->target->private; @@ -849,7 +830,7 @@ static void kcryptd_async_done(struct crypto_async_request *async_req, return; } - mempool_free(req_of_dmreq(cc, dmreq), cc->req_pool); + mempool_free(ablkcipher_request_cast(async_req), cc->req_pool); if (!atomic_dec_and_test(&ctx->pending)) return; diff --git a/trunk/drivers/md/dm-io.c b/trunk/drivers/md/dm-io.c index 36e2b5e46a6b..f14813be4eff 100644 --- a/trunk/drivers/md/dm-io.c +++ b/trunk/drivers/md/dm-io.c @@ -292,8 +292,6 @@ static void do_region(int rw, unsigned region, struct dm_io_region *where, (PAGE_SIZE >> SECTOR_SHIFT)); num_bvecs = 1 + min_t(int, bio_get_nr_vecs(where->bdev), num_bvecs); - if (unlikely(num_bvecs > BIO_MAX_PAGES)) - num_bvecs = BIO_MAX_PAGES; bio = bio_alloc_bioset(GFP_NOIO, num_bvecs, io->client->bios); bio->bi_sector = where->sector + (where->count - remaining); bio->bi_bdev = where->bdev; diff --git a/trunk/drivers/md/dm-ioctl.c b/trunk/drivers/md/dm-ioctl.c index f01096549a93..54d0588fc1f6 100644 --- a/trunk/drivers/md/dm-ioctl.c +++ b/trunk/drivers/md/dm-ioctl.c @@ -704,8 +704,7 @@ static int dev_rename(struct dm_ioctl *param, size_t param_size) char *new_name = (char *) param + param->data_start; if (new_name < param->data || - invalid_str(new_name, (void *) param + param_size) || - strlen(new_name) > DM_NAME_LEN - 1) { + invalid_str(new_name, (void *) param + param_size)) { DMWARN("Invalid new logical volume name supplied."); return -EINVAL; } @@ -1064,7 +1063,7 @@ static int table_load(struct dm_ioctl *param, size_t param_size) r = populate_table(t, param, param_size); if (r) { - dm_table_destroy(t); + dm_table_put(t); goto out; } @@ -1072,7 +1071,7 @@ static int table_load(struct dm_ioctl *param, size_t param_size) hc = dm_get_mdptr(md); if (!hc || hc->md != md) { DMWARN("device has been removed from the dev hash table."); - dm_table_destroy(t); + dm_table_put(t); up_write(&_hash_lock); r = -ENXIO; goto out; diff --git a/trunk/drivers/md/dm.c b/trunk/drivers/md/dm.c index 8d40f27cce89..51ba1db4b3e7 100644 --- a/trunk/drivers/md/dm.c +++ b/trunk/drivers/md/dm.c @@ -525,12 +525,9 @@ static int __noflush_suspending(struct mapped_device *md) static void dec_pending(struct dm_io *io, int error) { unsigned long flags; - int io_error; - struct bio *bio; - struct mapped_device *md = io->md; /* Push-back supersedes any I/O errors */ - if (error && !(io->error > 0 && __noflush_suspending(md))) + if (error && !(io->error > 0 && __noflush_suspending(io->md))) io->error = error; if (atomic_dec_and_test(&io->io_count)) { @@ -540,27 +537,24 @@ static void dec_pending(struct dm_io *io, int error) * This must be handled before the sleeper on * suspend queue merges the pushback list. */ - spin_lock_irqsave(&md->pushback_lock, flags); - if (__noflush_suspending(md)) - bio_list_add(&md->pushback, io->bio); + spin_lock_irqsave(&io->md->pushback_lock, flags); + if (__noflush_suspending(io->md)) + bio_list_add(&io->md->pushback, io->bio); else /* noflush suspend was interrupted. */ io->error = -EIO; - spin_unlock_irqrestore(&md->pushback_lock, flags); + spin_unlock_irqrestore(&io->md->pushback_lock, flags); } end_io_acct(io); - io_error = io->error; - bio = io->bio; - - free_io(md, io); - - if (io_error != DM_ENDIO_REQUEUE) { - trace_block_bio_complete(md->queue, bio); + if (io->error != DM_ENDIO_REQUEUE) { + trace_block_bio_complete(io->md->queue, io->bio); - bio_endio(bio, io_error); + bio_endio(io->bio, io->error); } + + free_io(io->md, io); } } @@ -568,7 +562,6 @@ static void clone_endio(struct bio *bio, int error) { int r = 0; struct dm_target_io *tio = bio->bi_private; - struct dm_io *io = tio->io; struct mapped_device *md = tio->io->md; dm_endio_fn endio = tio->ti->type->end_io; @@ -592,14 +585,15 @@ static void clone_endio(struct bio *bio, int error) } } + dec_pending(tio->io, error); + /* * Store md for cleanup instead of tio which is about to get freed. */ bio->bi_private = md->bs; - free_tio(md, tio); bio_put(bio); - dec_pending(io, error); + free_tio(md, tio); } static sector_t max_io_len(struct mapped_device *md, diff --git a/trunk/drivers/mtd/devices/Kconfig b/trunk/drivers/mtd/devices/Kconfig index 6fde0a2e3567..bc33200535fc 100644 --- a/trunk/drivers/mtd/devices/Kconfig +++ b/trunk/drivers/mtd/devices/Kconfig @@ -120,6 +120,13 @@ config MTD_PHRAM doesn't have access to, memory beyond the mem=xxx limit, nvram, memory on the video card, etc... +config MTD_PS3VRAM + tristate "PS3 video RAM" + depends on FB_PS3 + help + This driver allows you to use excess PS3 video RAM as volatile + storage or system swap. + config MTD_LART tristate "28F160xx flash driver for LART" depends on SA1100_LART diff --git a/trunk/drivers/mtd/devices/Makefile b/trunk/drivers/mtd/devices/Makefile index 0993d5cf3923..e51521df4e40 100644 --- a/trunk/drivers/mtd/devices/Makefile +++ b/trunk/drivers/mtd/devices/Makefile @@ -16,3 +16,4 @@ obj-$(CONFIG_MTD_LART) += lart.o obj-$(CONFIG_MTD_BLOCK2MTD) += block2mtd.o obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataflash.o obj-$(CONFIG_MTD_M25P80) += m25p80.o +obj-$(CONFIG_MTD_PS3VRAM) += ps3vram.o diff --git a/trunk/drivers/mtd/devices/ps3vram.c b/trunk/drivers/mtd/devices/ps3vram.c new file mode 100644 index 000000000000..d21e9beb7ed2 --- /dev/null +++ b/trunk/drivers/mtd/devices/ps3vram.c @@ -0,0 +1,768 @@ +/** + * ps3vram - Use extra PS3 video ram as MTD block device. + * + * Copyright (c) 2007-2008 Jim Paris + * Added support RSX DMA Vivien Chappelier + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#define DEVICE_NAME "ps3vram" + +#define XDR_BUF_SIZE (2 * 1024 * 1024) /* XDR buffer (must be 1MiB aligned) */ +#define XDR_IOIF 0x0c000000 + +#define FIFO_BASE XDR_IOIF +#define FIFO_SIZE (64 * 1024) + +#define DMA_PAGE_SIZE (4 * 1024) + +#define CACHE_PAGE_SIZE (256 * 1024) +#define CACHE_PAGE_COUNT ((XDR_BUF_SIZE - FIFO_SIZE) / CACHE_PAGE_SIZE) + +#define CACHE_OFFSET CACHE_PAGE_SIZE +#define FIFO_OFFSET 0 + +#define CTRL_PUT 0x10 +#define CTRL_GET 0x11 +#define CTRL_TOP 0x15 + +#define UPLOAD_SUBCH 1 +#define DOWNLOAD_SUBCH 2 + +#define NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN 0x0000030c +#define NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY 0x00000104 + +#define L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT 0x601 + +struct mtd_info ps3vram_mtd; + +#define CACHE_PAGE_PRESENT 1 +#define CACHE_PAGE_DIRTY 2 + +struct ps3vram_tag { + unsigned int address; + unsigned int flags; +}; + +struct ps3vram_cache { + unsigned int page_count; + unsigned int page_size; + struct ps3vram_tag *tags; +}; + +struct ps3vram_priv { + u64 memory_handle; + u64 context_handle; + u32 *ctrl; + u32 *reports; + u8 __iomem *ddr_base; + u8 *xdr_buf; + + u32 *fifo_base; + u32 *fifo_ptr; + + struct device *dev; + struct ps3vram_cache cache; + + /* Used to serialize cache/DMA operations */ + struct mutex lock; +}; + +#define DMA_NOTIFIER_HANDLE_BASE 0x66604200 /* first DMA notifier handle */ +#define DMA_NOTIFIER_OFFSET_BASE 0x1000 /* first DMA notifier offset */ +#define DMA_NOTIFIER_SIZE 0x40 +#define NOTIFIER 7 /* notifier used for completion report */ + +/* A trailing '-' means to subtract off ps3fb_videomemory.size */ +char *size = "256M-"; +module_param(size, charp, 0); +MODULE_PARM_DESC(size, "memory size"); + +static u32 *ps3vram_get_notifier(u32 *reports, int notifier) +{ + return (void *) reports + + DMA_NOTIFIER_OFFSET_BASE + + DMA_NOTIFIER_SIZE * notifier; +} + +static void ps3vram_notifier_reset(struct mtd_info *mtd) +{ + int i; + + struct ps3vram_priv *priv = mtd->priv; + u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER); + for (i = 0; i < 4; i++) + notify[i] = 0xffffffff; +} + +static int ps3vram_notifier_wait(struct mtd_info *mtd, unsigned int timeout_ms) +{ + struct ps3vram_priv *priv = mtd->priv; + u32 *notify = ps3vram_get_notifier(priv->reports, NOTIFIER); + unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms); + + do { + if (!notify[3]) + return 0; + msleep(1); + } while (time_before(jiffies, timeout)); + + return -ETIMEDOUT; +} + +static void ps3vram_init_ring(struct mtd_info *mtd) +{ + struct ps3vram_priv *priv = mtd->priv; + + priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET; + priv->ctrl[CTRL_GET] = FIFO_BASE + FIFO_OFFSET; +} + +static int ps3vram_wait_ring(struct mtd_info *mtd, unsigned int timeout_ms) +{ + struct ps3vram_priv *priv = mtd->priv; + unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms); + + do { + if (priv->ctrl[CTRL_PUT] == priv->ctrl[CTRL_GET]) + return 0; + msleep(1); + } while (time_before(jiffies, timeout)); + + dev_dbg(priv->dev, "%s:%d: FIFO timeout (%08x/%08x/%08x)\n", __func__, + __LINE__, priv->ctrl[CTRL_PUT], priv->ctrl[CTRL_GET], + priv->ctrl[CTRL_TOP]); + + return -ETIMEDOUT; +} + +static void ps3vram_out_ring(struct ps3vram_priv *priv, u32 data) +{ + *(priv->fifo_ptr)++ = data; +} + +static void ps3vram_begin_ring(struct ps3vram_priv *priv, u32 chan, + u32 tag, u32 size) +{ + ps3vram_out_ring(priv, (size << 18) | (chan << 13) | tag); +} + +static void ps3vram_rewind_ring(struct mtd_info *mtd) +{ + struct ps3vram_priv *priv = mtd->priv; + u64 status; + + ps3vram_out_ring(priv, 0x20000000 | (FIFO_BASE + FIFO_OFFSET)); + + priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET; + + /* asking the HV for a blit will kick the fifo */ + status = lv1_gpu_context_attribute(priv->context_handle, + L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT, + 0, 0, 0, 0); + if (status) + dev_err(priv->dev, "%s:%d: lv1_gpu_context_attribute failed\n", + __func__, __LINE__); + + priv->fifo_ptr = priv->fifo_base; +} + +static void ps3vram_fire_ring(struct mtd_info *mtd) +{ + struct ps3vram_priv *priv = mtd->priv; + u64 status; + + mutex_lock(&ps3_gpu_mutex); + + priv->ctrl[CTRL_PUT] = FIFO_BASE + FIFO_OFFSET + + (priv->fifo_ptr - priv->fifo_base) * sizeof(u32); + + /* asking the HV for a blit will kick the fifo */ + status = lv1_gpu_context_attribute(priv->context_handle, + L1GPU_CONTEXT_ATTRIBUTE_FB_BLIT, + 0, 0, 0, 0); + if (status) + dev_err(priv->dev, "%s:%d: lv1_gpu_context_attribute failed\n", + __func__, __LINE__); + + if ((priv->fifo_ptr - priv->fifo_base) * sizeof(u32) > + FIFO_SIZE - 1024) { + dev_dbg(priv->dev, "%s:%d: fifo full, rewinding\n", __func__, + __LINE__); + ps3vram_wait_ring(mtd, 200); + ps3vram_rewind_ring(mtd); + } + + mutex_unlock(&ps3_gpu_mutex); +} + +static void ps3vram_bind(struct mtd_info *mtd) +{ + struct ps3vram_priv *priv = mtd->priv; + + ps3vram_begin_ring(priv, UPLOAD_SUBCH, 0, 1); + ps3vram_out_ring(priv, 0x31337303); + ps3vram_begin_ring(priv, UPLOAD_SUBCH, 0x180, 3); + ps3vram_out_ring(priv, DMA_NOTIFIER_HANDLE_BASE + NOTIFIER); + ps3vram_out_ring(priv, 0xfeed0001); /* DMA system RAM instance */ + ps3vram_out_ring(priv, 0xfeed0000); /* DMA video RAM instance */ + + ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, 0, 1); + ps3vram_out_ring(priv, 0x3137c0de); + ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, 0x180, 3); + ps3vram_out_ring(priv, DMA_NOTIFIER_HANDLE_BASE + NOTIFIER); + ps3vram_out_ring(priv, 0xfeed0000); /* DMA video RAM instance */ + ps3vram_out_ring(priv, 0xfeed0001); /* DMA system RAM instance */ + + ps3vram_fire_ring(mtd); +} + +static int ps3vram_upload(struct mtd_info *mtd, unsigned int src_offset, + unsigned int dst_offset, int len, int count) +{ + struct ps3vram_priv *priv = mtd->priv; + + ps3vram_begin_ring(priv, UPLOAD_SUBCH, + NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); + ps3vram_out_ring(priv, XDR_IOIF + src_offset); + ps3vram_out_ring(priv, dst_offset); + ps3vram_out_ring(priv, len); + ps3vram_out_ring(priv, len); + ps3vram_out_ring(priv, len); + ps3vram_out_ring(priv, count); + ps3vram_out_ring(priv, (1 << 8) | 1); + ps3vram_out_ring(priv, 0); + + ps3vram_notifier_reset(mtd); + ps3vram_begin_ring(priv, UPLOAD_SUBCH, + NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY, 1); + ps3vram_out_ring(priv, 0); + ps3vram_begin_ring(priv, UPLOAD_SUBCH, 0x100, 1); + ps3vram_out_ring(priv, 0); + ps3vram_fire_ring(mtd); + if (ps3vram_notifier_wait(mtd, 200) < 0) { + dev_dbg(priv->dev, "%s:%d: notifier timeout\n", __func__, + __LINE__); + return -1; + } + + return 0; +} + +static int ps3vram_download(struct mtd_info *mtd, unsigned int src_offset, + unsigned int dst_offset, int len, int count) +{ + struct ps3vram_priv *priv = mtd->priv; + + ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, + NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); + ps3vram_out_ring(priv, src_offset); + ps3vram_out_ring(priv, XDR_IOIF + dst_offset); + ps3vram_out_ring(priv, len); + ps3vram_out_ring(priv, len); + ps3vram_out_ring(priv, len); + ps3vram_out_ring(priv, count); + ps3vram_out_ring(priv, (1 << 8) | 1); + ps3vram_out_ring(priv, 0); + + ps3vram_notifier_reset(mtd); + ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, + NV_MEMORY_TO_MEMORY_FORMAT_NOTIFY, 1); + ps3vram_out_ring(priv, 0); + ps3vram_begin_ring(priv, DOWNLOAD_SUBCH, 0x100, 1); + ps3vram_out_ring(priv, 0); + ps3vram_fire_ring(mtd); + if (ps3vram_notifier_wait(mtd, 200) < 0) { + dev_dbg(priv->dev, "%s:%d: notifier timeout\n", __func__, + __LINE__); + return -1; + } + + return 0; +} + +static void ps3vram_cache_evict(struct mtd_info *mtd, int entry) +{ + struct ps3vram_priv *priv = mtd->priv; + struct ps3vram_cache *cache = &priv->cache; + + if (cache->tags[entry].flags & CACHE_PAGE_DIRTY) { + dev_dbg(priv->dev, "%s:%d: flushing %d : 0x%08x\n", __func__, + __LINE__, entry, cache->tags[entry].address); + if (ps3vram_upload(mtd, + CACHE_OFFSET + entry * cache->page_size, + cache->tags[entry].address, + DMA_PAGE_SIZE, + cache->page_size / DMA_PAGE_SIZE) < 0) { + dev_dbg(priv->dev, "%s:%d: failed to upload from " + "0x%x to 0x%x size 0x%x\n", __func__, __LINE__, + entry * cache->page_size, + cache->tags[entry].address, cache->page_size); + } + cache->tags[entry].flags &= ~CACHE_PAGE_DIRTY; + } +} + +static void ps3vram_cache_load(struct mtd_info *mtd, int entry, + unsigned int address) +{ + struct ps3vram_priv *priv = mtd->priv; + struct ps3vram_cache *cache = &priv->cache; + + dev_dbg(priv->dev, "%s:%d: fetching %d : 0x%08x\n", __func__, __LINE__, + entry, address); + if (ps3vram_download(mtd, + address, + CACHE_OFFSET + entry * cache->page_size, + DMA_PAGE_SIZE, + cache->page_size / DMA_PAGE_SIZE) < 0) { + dev_err(priv->dev, "%s:%d: failed to download from " + "0x%x to 0x%x size 0x%x\n", __func__, __LINE__, address, + entry * cache->page_size, cache->page_size); + } + + cache->tags[entry].address = address; + cache->tags[entry].flags |= CACHE_PAGE_PRESENT; +} + + +static void ps3vram_cache_flush(struct mtd_info *mtd) +{ + struct ps3vram_priv *priv = mtd->priv; + struct ps3vram_cache *cache = &priv->cache; + int i; + + dev_dbg(priv->dev, "%s:%d: FLUSH\n", __func__, __LINE__); + for (i = 0; i < cache->page_count; i++) { + ps3vram_cache_evict(mtd, i); + cache->tags[i].flags = 0; + } +} + +static unsigned int ps3vram_cache_match(struct mtd_info *mtd, loff_t address) +{ + struct ps3vram_priv *priv = mtd->priv; + struct ps3vram_cache *cache = &priv->cache; + unsigned int base; + unsigned int offset; + int i; + static int counter; + + offset = (unsigned int) (address & (cache->page_size - 1)); + base = (unsigned int) (address - offset); + + /* fully associative check */ + for (i = 0; i < cache->page_count; i++) { + if ((cache->tags[i].flags & CACHE_PAGE_PRESENT) && + cache->tags[i].address == base) { + dev_dbg(priv->dev, "%s:%d: found entry %d : 0x%08x\n", + __func__, __LINE__, i, cache->tags[i].address); + return i; + } + } + + /* choose a random entry */ + i = (jiffies + (counter++)) % cache->page_count; + dev_dbg(priv->dev, "%s:%d: using entry %d\n", __func__, __LINE__, i); + + ps3vram_cache_evict(mtd, i); + ps3vram_cache_load(mtd, i, base); + + return i; +} + +static int ps3vram_cache_init(struct mtd_info *mtd) +{ + struct ps3vram_priv *priv = mtd->priv; + + priv->cache.page_count = CACHE_PAGE_COUNT; + priv->cache.page_size = CACHE_PAGE_SIZE; + priv->cache.tags = kzalloc(sizeof(struct ps3vram_tag) * + CACHE_PAGE_COUNT, GFP_KERNEL); + if (priv->cache.tags == NULL) { + dev_err(priv->dev, "%s:%d: could not allocate cache tags\n", + __func__, __LINE__); + return -ENOMEM; + } + + dev_info(priv->dev, "created ram cache: %d entries, %d KiB each\n", + CACHE_PAGE_COUNT, CACHE_PAGE_SIZE / 1024); + + return 0; +} + +static void ps3vram_cache_cleanup(struct mtd_info *mtd) +{ + struct ps3vram_priv *priv = mtd->priv; + + ps3vram_cache_flush(mtd); + kfree(priv->cache.tags); +} + +static int ps3vram_erase(struct mtd_info *mtd, struct erase_info *instr) +{ + struct ps3vram_priv *priv = mtd->priv; + + if (instr->addr + instr->len > mtd->size) + return -EINVAL; + + mutex_lock(&priv->lock); + + ps3vram_cache_flush(mtd); + + /* Set bytes to 0xFF */ + memset_io(priv->ddr_base + instr->addr, 0xFF, instr->len); + + mutex_unlock(&priv->lock); + + instr->state = MTD_ERASE_DONE; + mtd_erase_callback(instr); + + return 0; +} + +static int ps3vram_read(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, u_char *buf) +{ + struct ps3vram_priv *priv = mtd->priv; + unsigned int cached, count; + + dev_dbg(priv->dev, "%s:%d: from=0x%08x len=0x%zx\n", __func__, __LINE__, + (unsigned int)from, len); + + if (from >= mtd->size) + return -EINVAL; + + if (len > mtd->size - from) + len = mtd->size - from; + + /* Copy from vram to buf */ + count = len; + while (count) { + unsigned int offset, avail; + unsigned int entry; + + offset = (unsigned int) (from & (priv->cache.page_size - 1)); + avail = priv->cache.page_size - offset; + + mutex_lock(&priv->lock); + + entry = ps3vram_cache_match(mtd, from); + cached = CACHE_OFFSET + entry * priv->cache.page_size + offset; + + dev_dbg(priv->dev, "%s:%d: from=%08x cached=%08x offset=%08x " + "avail=%08x count=%08x\n", __func__, __LINE__, + (unsigned int)from, cached, offset, avail, count); + + if (avail > count) + avail = count; + memcpy(buf, priv->xdr_buf + cached, avail); + + mutex_unlock(&priv->lock); + + buf += avail; + count -= avail; + from += avail; + } + + *retlen = len; + return 0; +} + +static int ps3vram_write(struct mtd_info *mtd, loff_t to, size_t len, + size_t *retlen, const u_char *buf) +{ + struct ps3vram_priv *priv = mtd->priv; + unsigned int cached, count; + + if (to >= mtd->size) + return -EINVAL; + + if (len > mtd->size - to) + len = mtd->size - to; + + /* Copy from buf to vram */ + count = len; + while (count) { + unsigned int offset, avail; + unsigned int entry; + + offset = (unsigned int) (to & (priv->cache.page_size - 1)); + avail = priv->cache.page_size - offset; + + mutex_lock(&priv->lock); + + entry = ps3vram_cache_match(mtd, to); + cached = CACHE_OFFSET + entry * priv->cache.page_size + offset; + + dev_dbg(priv->dev, "%s:%d: to=%08x cached=%08x offset=%08x " + "avail=%08x count=%08x\n", __func__, __LINE__, + (unsigned int)to, cached, offset, avail, count); + + if (avail > count) + avail = count; + memcpy(priv->xdr_buf + cached, buf, avail); + + priv->cache.tags[entry].flags |= CACHE_PAGE_DIRTY; + + mutex_unlock(&priv->lock); + + buf += avail; + count -= avail; + to += avail; + } + + *retlen = len; + return 0; +} + +static int __devinit ps3vram_probe(struct ps3_system_bus_device *dev) +{ + struct ps3vram_priv *priv; + int status; + u64 ddr_lpar; + u64 ctrl_lpar; + u64 info_lpar; + u64 reports_lpar; + u64 ddr_size; + u64 reports_size; + int ret = -ENOMEM; + char *rest; + + ret = -EIO; + ps3vram_mtd.priv = kzalloc(sizeof(struct ps3vram_priv), GFP_KERNEL); + if (!ps3vram_mtd.priv) + goto out; + priv = ps3vram_mtd.priv; + + mutex_init(&priv->lock); + priv->dev = &dev->core; + + /* Allocate XDR buffer (1MiB aligned) */ + priv->xdr_buf = (void *)__get_free_pages(GFP_KERNEL, + get_order(XDR_BUF_SIZE)); + if (priv->xdr_buf == NULL) { + dev_dbg(&dev->core, "%s:%d: could not allocate XDR buffer\n", + __func__, __LINE__); + ret = -ENOMEM; + goto out_free_priv; + } + + /* Put FIFO at begginning of XDR buffer */ + priv->fifo_base = (u32 *) (priv->xdr_buf + FIFO_OFFSET); + priv->fifo_ptr = priv->fifo_base; + + /* XXX: Need to open GPU, in case ps3fb or snd_ps3 aren't loaded */ + if (ps3_open_hv_device(dev)) { + dev_err(&dev->core, "%s:%d: ps3_open_hv_device failed\n", + __func__, __LINE__); + ret = -EAGAIN; + goto out_close_gpu; + } + + /* Request memory */ + status = -1; + ddr_size = memparse(size, &rest); + if (*rest == '-') + ddr_size -= ps3fb_videomemory.size; + ddr_size = ALIGN(ddr_size, 1024*1024); + if (ddr_size <= 0) { + dev_err(&dev->core, "%s:%d: specified size is too small\n", + __func__, __LINE__); + ret = -EINVAL; + goto out_close_gpu; + } + + while (ddr_size > 0) { + status = lv1_gpu_memory_allocate(ddr_size, 0, 0, 0, 0, + &priv->memory_handle, + &ddr_lpar); + if (!status) + break; + ddr_size -= 1024*1024; + } + if (status || ddr_size <= 0) { + dev_err(&dev->core, "%s:%d: lv1_gpu_memory_allocate failed\n", + __func__, __LINE__); + ret = -ENOMEM; + goto out_free_xdr_buf; + } + + /* Request context */ + status = lv1_gpu_context_allocate(priv->memory_handle, + 0, + &priv->context_handle, + &ctrl_lpar, + &info_lpar, + &reports_lpar, + &reports_size); + if (status) { + dev_err(&dev->core, "%s:%d: lv1_gpu_context_allocate failed\n", + __func__, __LINE__); + ret = -ENOMEM; + goto out_free_memory; + } + + /* Map XDR buffer to RSX */ + status = lv1_gpu_context_iomap(priv->context_handle, XDR_IOIF, + ps3_mm_phys_to_lpar(__pa(priv->xdr_buf)), + XDR_BUF_SIZE, 0); + if (status) { + dev_err(&dev->core, "%s:%d: lv1_gpu_context_iomap failed\n", + __func__, __LINE__); + ret = -ENOMEM; + goto out_free_context; + } + + priv->ddr_base = ioremap_flags(ddr_lpar, ddr_size, _PAGE_NO_CACHE); + + if (!priv->ddr_base) { + dev_err(&dev->core, "%s:%d: ioremap failed\n", __func__, + __LINE__); + ret = -ENOMEM; + goto out_free_context; + } + + priv->ctrl = ioremap(ctrl_lpar, 64 * 1024); + if (!priv->ctrl) { + dev_err(&dev->core, "%s:%d: ioremap failed\n", __func__, + __LINE__); + ret = -ENOMEM; + goto out_unmap_vram; + } + + priv->reports = ioremap(reports_lpar, reports_size); + if (!priv->reports) { + dev_err(&dev->core, "%s:%d: ioremap failed\n", __func__, + __LINE__); + ret = -ENOMEM; + goto out_unmap_ctrl; + } + + mutex_lock(&ps3_gpu_mutex); + ps3vram_init_ring(&ps3vram_mtd); + mutex_unlock(&ps3_gpu_mutex); + + ps3vram_mtd.name = "ps3vram"; + ps3vram_mtd.size = ddr_size; + ps3vram_mtd.flags = MTD_CAP_RAM; + ps3vram_mtd.erase = ps3vram_erase; + ps3vram_mtd.point = NULL; + ps3vram_mtd.unpoint = NULL; + ps3vram_mtd.read = ps3vram_read; + ps3vram_mtd.write = ps3vram_write; + ps3vram_mtd.owner = THIS_MODULE; + ps3vram_mtd.type = MTD_RAM; + ps3vram_mtd.erasesize = CACHE_PAGE_SIZE; + ps3vram_mtd.writesize = 1; + + ps3vram_bind(&ps3vram_mtd); + + mutex_lock(&ps3_gpu_mutex); + ret = ps3vram_wait_ring(&ps3vram_mtd, 100); + mutex_unlock(&ps3_gpu_mutex); + if (ret < 0) { + dev_err(&dev->core, "%s:%d: failed to initialize channels\n", + __func__, __LINE__); + ret = -ETIMEDOUT; + goto out_unmap_reports; + } + + ps3vram_cache_init(&ps3vram_mtd); + + if (add_mtd_device(&ps3vram_mtd)) { + dev_err(&dev->core, "%s:%d: add_mtd_device failed\n", + __func__, __LINE__); + ret = -EAGAIN; + goto out_cache_cleanup; + } + + dev_info(&dev->core, "reserved %u MiB of gpu memory\n", + (unsigned int)(ddr_size / 1024 / 1024)); + + return 0; + +out_cache_cleanup: + ps3vram_cache_cleanup(&ps3vram_mtd); +out_unmap_reports: + iounmap(priv->reports); +out_unmap_ctrl: + iounmap(priv->ctrl); +out_unmap_vram: + iounmap(priv->ddr_base); +out_free_context: + lv1_gpu_context_free(priv->context_handle); +out_free_memory: + lv1_gpu_memory_free(priv->memory_handle); +out_close_gpu: + ps3_close_hv_device(dev); +out_free_xdr_buf: + free_pages((unsigned long) priv->xdr_buf, get_order(XDR_BUF_SIZE)); +out_free_priv: + kfree(ps3vram_mtd.priv); + ps3vram_mtd.priv = NULL; +out: + return ret; +} + +static int ps3vram_shutdown(struct ps3_system_bus_device *dev) +{ + struct ps3vram_priv *priv; + + priv = ps3vram_mtd.priv; + + del_mtd_device(&ps3vram_mtd); + ps3vram_cache_cleanup(&ps3vram_mtd); + iounmap(priv->reports); + iounmap(priv->ctrl); + iounmap(priv->ddr_base); + lv1_gpu_context_free(priv->context_handle); + lv1_gpu_memory_free(priv->memory_handle); + ps3_close_hv_device(dev); + free_pages((unsigned long) priv->xdr_buf, get_order(XDR_BUF_SIZE)); + kfree(priv); + return 0; +} + +static struct ps3_system_bus_driver ps3vram_driver = { + .match_id = PS3_MATCH_ID_GPU, + .match_sub_id = PS3_MATCH_SUB_ID_GPU_RAMDISK, + .core.name = DEVICE_NAME, + .core.owner = THIS_MODULE, + .probe = ps3vram_probe, + .remove = ps3vram_shutdown, + .shutdown = ps3vram_shutdown, +}; + +static int __init ps3vram_init(void) +{ + return ps3_system_bus_driver_register(&ps3vram_driver); +} + +static void __exit ps3vram_exit(void) +{ + ps3_system_bus_driver_unregister(&ps3vram_driver); +} + +module_init(ps3vram_init); +module_exit(ps3vram_exit); + +MODULE_LICENSE("GPL"); +MODULE_AUTHOR("Jim Paris "); +MODULE_DESCRIPTION("MTD driver for PS3 video RAM"); +MODULE_ALIAS(PS3_MODULE_ALIAS_GPU_RAMDISK); diff --git a/trunk/drivers/net/Kconfig b/trunk/drivers/net/Kconfig index 62d732a886f1..a2f185fd7072 100644 --- a/trunk/drivers/net/Kconfig +++ b/trunk/drivers/net/Kconfig @@ -1040,17 +1040,6 @@ config NI65 To compile this driver as a module, choose M here. The module will be called ni65. -config DNET - tristate "Dave ethernet support (DNET)" - depends on NET_ETHERNET && HAS_IOMEM - select PHYLIB - help - The Dave ethernet interface (DNET) is found on Qong Board FPGA. - Say Y to include support for the DNET chip. - - To compile this driver as a module, choose M here: the module - will be called dnet. - source "drivers/net/tulip/Kconfig" config AT1700 @@ -2630,8 +2619,6 @@ config QLGE source "drivers/net/sfc/Kconfig" -source "drivers/net/benet/Kconfig" - endif # NETDEV_10000 source "drivers/net/tokenring/Kconfig" diff --git a/trunk/drivers/net/Makefile b/trunk/drivers/net/Makefile index 471baaff229f..aca8492db654 100644 --- a/trunk/drivers/net/Makefile +++ b/trunk/drivers/net/Makefile @@ -22,7 +22,6 @@ obj-$(CONFIG_GIANFAR) += gianfar_driver.o obj-$(CONFIG_TEHUTI) += tehuti.o obj-$(CONFIG_ENIC) += enic/ obj-$(CONFIG_JME) += jme.o -obj-$(CONFIG_BE2NET) += benet/ gianfar_driver-objs := gianfar.o \ gianfar_ethtool.o \ @@ -232,7 +231,6 @@ obj-$(CONFIG_ENC28J60) += enc28j60.o obj-$(CONFIG_XTENSA_XT2000_SONIC) += xtsonic.o -obj-$(CONFIG_DNET) += dnet.o obj-$(CONFIG_MACB) += macb.o obj-$(CONFIG_ARM) += arm/ diff --git a/trunk/drivers/net/benet/Kconfig b/trunk/drivers/net/benet/Kconfig deleted file mode 100644 index c6934f179c09..000000000000 --- a/trunk/drivers/net/benet/Kconfig +++ /dev/null @@ -1,7 +0,0 @@ -config BE2NET - tristate "ServerEngines' 10Gbps NIC - BladeEngine 2" - depends on PCI && INET - select INET_LRO - help - This driver implements the NIC functionality for ServerEngines' - 10Gbps network adapter - BladeEngine 2. diff --git a/trunk/drivers/net/benet/Makefile b/trunk/drivers/net/benet/Makefile deleted file mode 100644 index a60cd8051135..000000000000 --- a/trunk/drivers/net/benet/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -# Makefile to build the network driver for ServerEngine's BladeEngine. -# - -obj-$(CONFIG_BE2NET) += be2net.o - -be2net-y := be_main.o be_cmds.o be_ethtool.o diff --git a/trunk/drivers/net/benet/be.h b/trunk/drivers/net/benet/be.h deleted file mode 100644 index f327be57ca96..000000000000 --- a/trunk/drivers/net/benet/be.h +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright (C) 2005 - 2009 ServerEngines - * 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 version 2 - * as published by the Free Software Foundation. The full GNU General - * Public License is included in this distribution in the file called COPYING. - * - * Contact Information: - * linux-drivers@serverengines.com - * - * ServerEngines - * 209 N. Fair Oaks Ave - * Sunnyvale, CA 94085 - */ - -#ifndef BE_H -#define BE_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "be_hw.h" - -#define DRV_VER "2.0.348" -#define DRV_NAME "be2net" -#define BE_NAME "ServerEngines BladeEngine2 10Gbps NIC" -#define DRV_DESC BE_NAME "Driver" - -/* Number of bytes of an RX frame that are copied to skb->data */ -#define BE_HDR_LEN 64 -#define BE_MAX_JUMBO_FRAME_SIZE 9018 -#define BE_MIN_MTU 256 - -#define BE_NUM_VLANS_SUPPORTED 64 -#define BE_MAX_EQD 96 -#define BE_MAX_TX_FRAG_COUNT 30 - -#define EVNT_Q_LEN 1024 -#define TX_Q_LEN 2048 -#define TX_CQ_LEN 1024 -#define RX_Q_LEN 1024 /* Does not support any other value */ -#define RX_CQ_LEN 1024 -#define MCC_Q_LEN 64 /* total size not to exceed 8 pages */ -#define MCC_CQ_LEN 256 - -#define BE_NAPI_WEIGHT 64 -#define MAX_RX_POST BE_NAPI_WEIGHT /* Frags posted at a time */ -#define RX_FRAGS_REFILL_WM (RX_Q_LEN - MAX_RX_POST) - -#define BE_MAX_LRO_DESCRIPTORS 16 -#define BE_MAX_FRAGS_PER_FRAME 16 - -struct be_dma_mem { - void *va; - dma_addr_t dma; - u32 size; -}; - -struct be_queue_info { - struct be_dma_mem dma_mem; - u16 len; - u16 entry_size; /* Size of an element in the queue */ - u16 id; - u16 tail, head; - bool created; - atomic_t used; /* Number of valid elements in the queue */ -}; - -struct be_ctrl_info { - u8 __iomem *csr; - u8 __iomem *db; /* Door Bell */ - u8 __iomem *pcicfg; /* PCI config space */ - int pci_func; - - /* Mbox used for cmd request/response */ - spinlock_t cmd_lock; /* For serializing cmds to BE card */ - struct be_dma_mem mbox_mem; - /* Mbox mem is adjusted to align to 16 bytes. The allocated addr - * is stored for freeing purpose */ - struct be_dma_mem mbox_mem_alloced; -}; - -#include "be_cmds.h" - -struct be_drvr_stats { - u32 be_tx_reqs; /* number of TX requests initiated */ - u32 be_tx_stops; /* number of times TX Q was stopped */ - u32 be_fwd_reqs; /* number of send reqs through forwarding i/f */ - u32 be_tx_wrbs; /* number of tx WRBs used */ - u32 be_tx_events; /* number of tx completion events */ - u32 be_tx_compl; /* number of tx completion entries processed */ - u64 be_tx_jiffies; - ulong be_tx_bytes; - ulong be_tx_bytes_prev; - u32 be_tx_rate; - - u32 cache_barrier[16]; - - u32 be_ethrx_post_fail;/* number of ethrx buffer alloc failures */ - u32 be_polls; /* number of times NAPI called poll function */ - u32 be_rx_events; /* number of ucast rx completion events */ - u32 be_rx_compl; /* number of rx completion entries processed */ - u32 be_lro_hgram_data[8]; /* histogram of LRO data packets */ - u32 be_lro_hgram_ack[8]; /* histogram of LRO ACKs */ - u64 be_rx_jiffies; - ulong be_rx_bytes; - ulong be_rx_bytes_prev; - u32 be_rx_rate; - /* number of non ether type II frames dropped where - * frame len > length field of Mac Hdr */ - u32 be_802_3_dropped_frames; - /* number of non ether type II frames malformed where - * in frame len < length field of Mac Hdr */ - u32 be_802_3_malformed_frames; - u32 be_rxcp_err; /* Num rx completion entries w/ err set. */ - ulong rx_fps_jiffies; /* jiffies at last FPS calc */ - u32 be_rx_frags; - u32 be_prev_rx_frags; - u32 be_rx_fps; /* Rx frags per second */ -}; - -struct be_stats_obj { - struct be_drvr_stats drvr_stats; - struct net_device_stats net_stats; - struct be_dma_mem cmd; -}; - -struct be_eq_obj { - struct be_queue_info q; - char desc[32]; - - /* Adaptive interrupt coalescing (AIC) info */ - bool enable_aic; - u16 min_eqd; /* in usecs */ - u16 max_eqd; /* in usecs */ - u16 cur_eqd; /* in usecs */ - - struct napi_struct napi; -}; - -struct be_tx_obj { - struct be_queue_info q; - struct be_queue_info cq; - /* Remember the skbs that were transmitted */ - struct sk_buff *sent_skb_list[TX_Q_LEN]; -}; - -/* Struct to remember the pages posted for rx frags */ -struct be_rx_page_info { - struct page *page; - dma_addr_t bus; - u16 page_offset; - bool last_page_user; -}; - -struct be_rx_obj { - struct be_queue_info q; - struct be_queue_info cq; - struct be_rx_page_info page_info_tbl[RX_Q_LEN]; - struct net_lro_mgr lro_mgr; - struct net_lro_desc lro_desc[BE_MAX_LRO_DESCRIPTORS]; -}; - -#define BE_NUM_MSIX_VECTORS 2 /* 1 each for Tx and Rx */ -struct be_adapter { - struct pci_dev *pdev; - struct net_device *netdev; - - /* Mbox, pci config, csr address information */ - struct be_ctrl_info ctrl; - - struct msix_entry msix_entries[BE_NUM_MSIX_VECTORS]; - bool msix_enabled; - bool isr_registered; - - /* TX Rings */ - struct be_eq_obj tx_eq; - struct be_tx_obj tx_obj; - - u32 cache_line_break[8]; - - /* Rx rings */ - struct be_eq_obj rx_eq; - struct be_rx_obj rx_obj; - u32 big_page_size; /* Compounded page size shared by rx wrbs */ - bool rx_post_starved; /* Zero rx frags have been posted to BE */ - - struct vlan_group *vlan_grp; - u16 num_vlans; - u8 vlan_tag[VLAN_GROUP_ARRAY_LEN]; - - struct be_stats_obj stats; - /* Work queue used to perform periodic tasks like getting statistics */ - struct delayed_work work; - - /* Ethtool knobs and info */ - bool rx_csum; /* BE card must perform rx-checksumming */ - u32 max_rx_coal; - char fw_ver[FW_VER_LEN]; - u32 if_handle; /* Used to configure filtering */ - u32 pmac_id; /* MAC addr handle used by BE card */ - - struct be_link_info link; - u32 port_num; -}; - -extern struct ethtool_ops be_ethtool_ops; - -#define drvr_stats(adapter) (&adapter->stats.drvr_stats) - -#define BE_SET_NETDEV_OPS(netdev, ops) (netdev->netdev_ops = ops) - -static inline u32 MODULO(u16 val, u16 limit) -{ - BUG_ON(limit & (limit - 1)); - return val & (limit - 1); -} - -static inline void index_adv(u16 *index, u16 val, u16 limit) -{ - *index = MODULO((*index + val), limit); -} - -static inline void index_inc(u16 *index, u16 limit) -{ - *index = MODULO((*index + 1), limit); -} - -#define PAGE_SHIFT_4K 12 -#define PAGE_SIZE_4K (1 << PAGE_SHIFT_4K) - -/* Returns number of pages spanned by the data starting at the given addr */ -#define PAGES_4K_SPANNED(_address, size) \ - ((u32)((((size_t)(_address) & (PAGE_SIZE_4K - 1)) + \ - (size) + (PAGE_SIZE_4K - 1)) >> PAGE_SHIFT_4K)) - -/* Byte offset into the page corresponding to given address */ -#define OFFSET_IN_PAGE(addr) \ - ((size_t)(addr) & (PAGE_SIZE_4K-1)) - -/* Returns bit offset within a DWORD of a bitfield */ -#define AMAP_BIT_OFFSET(_struct, field) \ - (((size_t)&(((_struct *)0)->field))%32) - -/* Returns the bit mask of the field that is NOT shifted into location. */ -static inline u32 amap_mask(u32 bitsize) -{ - return (bitsize == 32 ? 0xFFFFFFFF : (1 << bitsize) - 1); -} - -static inline void -amap_set(void *ptr, u32 dw_offset, u32 mask, u32 offset, u32 value) -{ - u32 *dw = (u32 *) ptr + dw_offset; - *dw &= ~(mask << offset); - *dw |= (mask & value) << offset; -} - -#define AMAP_SET_BITS(_struct, field, ptr, val) \ - amap_set(ptr, \ - offsetof(_struct, field)/32, \ - amap_mask(sizeof(((_struct *)0)->field)), \ - AMAP_BIT_OFFSET(_struct, field), \ - val) - -static inline u32 amap_get(void *ptr, u32 dw_offset, u32 mask, u32 offset) -{ - u32 *dw = (u32 *) ptr; - return mask & (*(dw + dw_offset) >> offset); -} - -#define AMAP_GET_BITS(_struct, field, ptr) \ - amap_get(ptr, \ - offsetof(_struct, field)/32, \ - amap_mask(sizeof(((_struct *)0)->field)), \ - AMAP_BIT_OFFSET(_struct, field)) - -#define be_dws_cpu_to_le(wrb, len) swap_dws(wrb, len) -#define be_dws_le_to_cpu(wrb, len) swap_dws(wrb, len) -static inline void swap_dws(void *wrb, int len) -{ -#ifdef __BIG_ENDIAN - u32 *dw = wrb; - BUG_ON(len % 4); - do { - *dw = cpu_to_le32(*dw); - dw++; - len -= 4; - } while (len); -#endif /* __BIG_ENDIAN */ -} - -static inline u8 is_tcp_pkt(struct sk_buff *skb) -{ - u8 val = 0; - - if (ip_hdr(skb)->version == 4) - val = (ip_hdr(skb)->protocol == IPPROTO_TCP); - else if (ip_hdr(skb)->version == 6) - val = (ipv6_hdr(skb)->nexthdr == NEXTHDR_TCP); - - return val; -} - -static inline u8 is_udp_pkt(struct sk_buff *skb) -{ - u8 val = 0; - - if (ip_hdr(skb)->version == 4) - val = (ip_hdr(skb)->protocol == IPPROTO_UDP); - else if (ip_hdr(skb)->version == 6) - val = (ipv6_hdr(skb)->nexthdr == NEXTHDR_UDP); - - return val; -} - -#endif /* BE_H */ diff --git a/trunk/drivers/net/benet/be_cmds.c b/trunk/drivers/net/benet/be_cmds.c deleted file mode 100644 index d444aed962bc..000000000000 --- a/trunk/drivers/net/benet/be_cmds.c +++ /dev/null @@ -1,861 +0,0 @@ -/* - * Copyright (C) 2005 - 2009 ServerEngines - * 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 version 2 - * as published by the Free Software Foundation. The full GNU General - * Public License is included in this distribution in the file called COPYING. - * - * Contact Information: - * linux-drivers@serverengines.com - * - * ServerEngines - * 209 N. Fair Oaks Ave - * Sunnyvale, CA 94085 - */ - -#include "be.h" - -static int be_mbox_db_ready_wait(void __iomem *db) -{ - int cnt = 0, wait = 5; - u32 ready; - - do { - ready = ioread32(db) & MPU_MAILBOX_DB_RDY_MASK; - if (ready) - break; - - if (cnt > 200000) { - printk(KERN_WARNING DRV_NAME - ": mbox_db poll timed out\n"); - return -1; - } - - if (cnt > 50) - wait = 200; - cnt += wait; - udelay(wait); - } while (true); - - return 0; -} - -/* - * Insert the mailbox address into the doorbell in two steps - */ -static int be_mbox_db_ring(struct be_ctrl_info *ctrl) -{ - int status; - u16 compl_status, extd_status; - u32 val = 0; - void __iomem *db = ctrl->db + MPU_MAILBOX_DB_OFFSET; - struct be_dma_mem *mbox_mem = &ctrl->mbox_mem; - struct be_mcc_mailbox *mbox = mbox_mem->va; - struct be_mcc_cq_entry *cqe = &mbox->cqe; - - memset(cqe, 0, sizeof(*cqe)); - - val &= ~MPU_MAILBOX_DB_RDY_MASK; - val |= MPU_MAILBOX_DB_HI_MASK; - /* at bits 2 - 31 place mbox dma addr msb bits 34 - 63 */ - val |= (upper_32_bits(mbox_mem->dma) >> 2) << 2; - iowrite32(val, db); - - /* wait for ready to be set */ - status = be_mbox_db_ready_wait(db); - if (status != 0) - return status; - - val = 0; - val &= ~MPU_MAILBOX_DB_RDY_MASK; - val &= ~MPU_MAILBOX_DB_HI_MASK; - /* at bits 2 - 31 place mbox dma addr lsb bits 4 - 33 */ - val |= (u32)(mbox_mem->dma >> 4) << 2; - iowrite32(val, db); - - status = be_mbox_db_ready_wait(db); - if (status != 0) - return status; - - /* compl entry has been made now */ - be_dws_le_to_cpu(cqe, sizeof(*cqe)); - if (!(cqe->flags & CQE_FLAGS_VALID_MASK)) { - printk(KERN_WARNING DRV_NAME ": ERROR invalid mbox compl\n"); - return -1; - } - - compl_status = (cqe->status >> CQE_STATUS_COMPL_SHIFT) & - CQE_STATUS_COMPL_MASK; - if (compl_status != MCC_STATUS_SUCCESS) { - extd_status = (cqe->status >> CQE_STATUS_EXTD_SHIFT) & - CQE_STATUS_EXTD_MASK; - printk(KERN_WARNING DRV_NAME - ": ERROR in cmd compl. status(compl/extd)=%d/%d\n", - compl_status, extd_status); - } - - return compl_status; -} - -static int be_POST_stage_get(struct be_ctrl_info *ctrl, u16 *stage) -{ - u32 sem = ioread32(ctrl->csr + MPU_EP_SEMAPHORE_OFFSET); - - *stage = sem & EP_SEMAPHORE_POST_STAGE_MASK; - if ((sem >> EP_SEMAPHORE_POST_ERR_SHIFT) & EP_SEMAPHORE_POST_ERR_MASK) - return -1; - else - return 0; -} - -static int be_POST_stage_poll(struct be_ctrl_info *ctrl, u16 poll_stage) -{ - u16 stage, cnt, error; - for (cnt = 0; cnt < 5000; cnt++) { - error = be_POST_stage_get(ctrl, &stage); - if (error) - return -1; - - if (stage == poll_stage) - break; - udelay(1000); - } - if (stage != poll_stage) - return -1; - return 0; -} - - -int be_cmd_POST(struct be_ctrl_info *ctrl) -{ - u16 stage, error; - - error = be_POST_stage_get(ctrl, &stage); - if (error) - goto err; - - if (stage == POST_STAGE_ARMFW_RDY) - return 0; - - if (stage != POST_STAGE_AWAITING_HOST_RDY) - goto err; - - /* On awaiting host rdy, reset and again poll on awaiting host rdy */ - iowrite32(POST_STAGE_BE_RESET, ctrl->csr + MPU_EP_SEMAPHORE_OFFSET); - error = be_POST_stage_poll(ctrl, POST_STAGE_AWAITING_HOST_RDY); - if (error) - goto err; - - /* Now kickoff POST and poll on armfw ready */ - iowrite32(POST_STAGE_HOST_RDY, ctrl->csr + MPU_EP_SEMAPHORE_OFFSET); - error = be_POST_stage_poll(ctrl, POST_STAGE_ARMFW_RDY); - if (error) - goto err; - - return 0; -err: - printk(KERN_WARNING DRV_NAME ": ERROR, stage=%d\n", stage); - return -1; -} - -static inline void *embedded_payload(struct be_mcc_wrb *wrb) -{ - return wrb->payload.embedded_payload; -} - -static inline struct be_sge *nonembedded_sgl(struct be_mcc_wrb *wrb) -{ - return &wrb->payload.sgl[0]; -} - -/* Don't touch the hdr after it's prepared */ -static void be_wrb_hdr_prepare(struct be_mcc_wrb *wrb, int payload_len, - bool embedded, u8 sge_cnt) -{ - if (embedded) - wrb->embedded |= MCC_WRB_EMBEDDED_MASK; - else - wrb->embedded |= (sge_cnt & MCC_WRB_SGE_CNT_MASK) << - MCC_WRB_SGE_CNT_SHIFT; - wrb->payload_length = payload_len; - be_dws_cpu_to_le(wrb, 20); -} - -/* Don't touch the hdr after it's prepared */ -static void be_cmd_hdr_prepare(struct be_cmd_req_hdr *req_hdr, - u8 subsystem, u8 opcode, int cmd_len) -{ - req_hdr->opcode = opcode; - req_hdr->subsystem = subsystem; - req_hdr->request_length = cpu_to_le32(cmd_len - sizeof(*req_hdr)); -} - -static void be_cmd_page_addrs_prepare(struct phys_addr *pages, u32 max_pages, - struct be_dma_mem *mem) -{ - int i, buf_pages = min(PAGES_4K_SPANNED(mem->va, mem->size), max_pages); - u64 dma = (u64)mem->dma; - - for (i = 0; i < buf_pages; i++) { - pages[i].lo = cpu_to_le32(dma & 0xFFFFFFFF); - pages[i].hi = cpu_to_le32(upper_32_bits(dma)); - dma += PAGE_SIZE_4K; - } -} - -/* Converts interrupt delay in microseconds to multiplier value */ -static u32 eq_delay_to_mult(u32 usec_delay) -{ -#define MAX_INTR_RATE 651042 - const u32 round = 10; - u32 multiplier; - - if (usec_delay == 0) - multiplier = 0; - else { - u32 interrupt_rate = 1000000 / usec_delay; - /* Max delay, corresponding to the lowest interrupt rate */ - if (interrupt_rate == 0) - multiplier = 1023; - else { - multiplier = (MAX_INTR_RATE - interrupt_rate) * round; - multiplier /= interrupt_rate; - /* Round the multiplier to the closest value.*/ - multiplier = (multiplier + round/2) / round; - multiplier = min(multiplier, (u32)1023); - } - } - return multiplier; -} - -static inline struct be_mcc_wrb *wrb_from_mbox(struct be_dma_mem *mbox_mem) -{ - return &((struct be_mcc_mailbox *)(mbox_mem->va))->wrb; -} - -int be_cmd_eq_create(struct be_ctrl_info *ctrl, - struct be_queue_info *eq, int eq_delay) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_eq_create *req = embedded_payload(wrb); - struct be_cmd_resp_eq_create *resp = embedded_payload(wrb); - struct be_dma_mem *q_mem = &eq->dma_mem; - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_EQ_CREATE, sizeof(*req)); - - req->num_pages = cpu_to_le16(PAGES_4K_SPANNED(q_mem->va, q_mem->size)); - - AMAP_SET_BITS(struct amap_eq_context, func, req->context, - ctrl->pci_func); - AMAP_SET_BITS(struct amap_eq_context, valid, req->context, 1); - /* 4byte eqe*/ - AMAP_SET_BITS(struct amap_eq_context, size, req->context, 0); - AMAP_SET_BITS(struct amap_eq_context, count, req->context, - __ilog2_u32(eq->len/256)); - AMAP_SET_BITS(struct amap_eq_context, delaymult, req->context, - eq_delay_to_mult(eq_delay)); - be_dws_cpu_to_le(req->context, sizeof(req->context)); - - be_cmd_page_addrs_prepare(req->pages, ARRAY_SIZE(req->pages), q_mem); - - status = be_mbox_db_ring(ctrl); - if (!status) { - eq->id = le16_to_cpu(resp->eq_id); - eq->created = true; - } - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_mac_addr_query(struct be_ctrl_info *ctrl, u8 *mac_addr, - u8 type, bool permanent, u32 if_handle) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_mac_query *req = embedded_payload(wrb); - struct be_cmd_resp_mac_query *resp = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_NTWK_MAC_QUERY, sizeof(*req)); - - req->type = type; - if (permanent) { - req->permanent = 1; - } else { - req->if_id = cpu_to_le16((u16)if_handle); - req->permanent = 0; - } - - status = be_mbox_db_ring(ctrl); - if (!status) - memcpy(mac_addr, resp->mac.addr, ETH_ALEN); - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_pmac_add(struct be_ctrl_info *ctrl, u8 *mac_addr, - u32 if_id, u32 *pmac_id) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_pmac_add *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_NTWK_PMAC_ADD, sizeof(*req)); - - req->if_id = cpu_to_le32(if_id); - memcpy(req->mac_address, mac_addr, ETH_ALEN); - - status = be_mbox_db_ring(ctrl); - if (!status) { - struct be_cmd_resp_pmac_add *resp = embedded_payload(wrb); - *pmac_id = le32_to_cpu(resp->pmac_id); - } - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_pmac_del(struct be_ctrl_info *ctrl, u32 if_id, u32 pmac_id) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_pmac_del *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_NTWK_PMAC_DEL, sizeof(*req)); - - req->if_id = cpu_to_le32(if_id); - req->pmac_id = cpu_to_le32(pmac_id); - - status = be_mbox_db_ring(ctrl); - spin_unlock(&ctrl->cmd_lock); - - return status; -} - -int be_cmd_cq_create(struct be_ctrl_info *ctrl, - struct be_queue_info *cq, struct be_queue_info *eq, - bool sol_evts, bool no_delay, int coalesce_wm) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_cq_create *req = embedded_payload(wrb); - struct be_cmd_resp_cq_create *resp = embedded_payload(wrb); - struct be_dma_mem *q_mem = &cq->dma_mem; - void *ctxt = &req->context; - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_CQ_CREATE, sizeof(*req)); - - req->num_pages = cpu_to_le16(PAGES_4K_SPANNED(q_mem->va, q_mem->size)); - - AMAP_SET_BITS(struct amap_cq_context, coalescwm, ctxt, coalesce_wm); - AMAP_SET_BITS(struct amap_cq_context, nodelay, ctxt, no_delay); - AMAP_SET_BITS(struct amap_cq_context, count, ctxt, - __ilog2_u32(cq->len/256)); - AMAP_SET_BITS(struct amap_cq_context, valid, ctxt, 1); - AMAP_SET_BITS(struct amap_cq_context, solevent, ctxt, sol_evts); - AMAP_SET_BITS(struct amap_cq_context, eventable, ctxt, 1); - AMAP_SET_BITS(struct amap_cq_context, eqid, ctxt, eq->id); - AMAP_SET_BITS(struct amap_cq_context, armed, ctxt, 0); - AMAP_SET_BITS(struct amap_cq_context, func, ctxt, ctrl->pci_func); - be_dws_cpu_to_le(ctxt, sizeof(req->context)); - - be_cmd_page_addrs_prepare(req->pages, ARRAY_SIZE(req->pages), q_mem); - - status = be_mbox_db_ring(ctrl); - if (!status) { - cq->id = le16_to_cpu(resp->cq_id); - cq->created = true; - } - spin_unlock(&ctrl->cmd_lock); - - return status; -} - -int be_cmd_txq_create(struct be_ctrl_info *ctrl, - struct be_queue_info *txq, - struct be_queue_info *cq) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_eth_tx_create *req = embedded_payload(wrb); - struct be_dma_mem *q_mem = &txq->dma_mem; - void *ctxt = &req->context; - int status; - u32 len_encoded; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, OPCODE_ETH_TX_CREATE, - sizeof(*req)); - - req->num_pages = PAGES_4K_SPANNED(q_mem->va, q_mem->size); - req->ulp_num = BE_ULP1_NUM; - req->type = BE_ETH_TX_RING_TYPE_STANDARD; - - len_encoded = fls(txq->len); /* log2(len) + 1 */ - if (len_encoded == 16) - len_encoded = 0; - AMAP_SET_BITS(struct amap_tx_context, tx_ring_size, ctxt, len_encoded); - AMAP_SET_BITS(struct amap_tx_context, pci_func_id, ctxt, - ctrl->pci_func); - AMAP_SET_BITS(struct amap_tx_context, ctx_valid, ctxt, 1); - AMAP_SET_BITS(struct amap_tx_context, cq_id_send, ctxt, cq->id); - - be_dws_cpu_to_le(ctxt, sizeof(req->context)); - - be_cmd_page_addrs_prepare(req->pages, ARRAY_SIZE(req->pages), q_mem); - - status = be_mbox_db_ring(ctrl); - if (!status) { - struct be_cmd_resp_eth_tx_create *resp = embedded_payload(wrb); - txq->id = le16_to_cpu(resp->cid); - txq->created = true; - } - spin_unlock(&ctrl->cmd_lock); - - return status; -} - -int be_cmd_rxq_create(struct be_ctrl_info *ctrl, - struct be_queue_info *rxq, u16 cq_id, u16 frag_size, - u16 max_frame_size, u32 if_id, u32 rss) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_eth_rx_create *req = embedded_payload(wrb); - struct be_dma_mem *q_mem = &rxq->dma_mem; - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, OPCODE_ETH_RX_CREATE, - sizeof(*req)); - - req->cq_id = cpu_to_le16(cq_id); - req->frag_size = fls(frag_size) - 1; - req->num_pages = 2; - be_cmd_page_addrs_prepare(req->pages, ARRAY_SIZE(req->pages), q_mem); - req->interface_id = cpu_to_le32(if_id); - req->max_frame_size = cpu_to_le16(max_frame_size); - req->rss_queue = cpu_to_le32(rss); - - status = be_mbox_db_ring(ctrl); - if (!status) { - struct be_cmd_resp_eth_rx_create *resp = embedded_payload(wrb); - rxq->id = le16_to_cpu(resp->id); - rxq->created = true; - } - spin_unlock(&ctrl->cmd_lock); - - return status; -} - -/* Generic destroyer function for all types of queues */ -int be_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q, - int queue_type) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_q_destroy *req = embedded_payload(wrb); - u8 subsys = 0, opcode = 0; - int status; - - spin_lock(&ctrl->cmd_lock); - - memset(wrb, 0, sizeof(*wrb)); - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - switch (queue_type) { - case QTYPE_EQ: - subsys = CMD_SUBSYSTEM_COMMON; - opcode = OPCODE_COMMON_EQ_DESTROY; - break; - case QTYPE_CQ: - subsys = CMD_SUBSYSTEM_COMMON; - opcode = OPCODE_COMMON_CQ_DESTROY; - break; - case QTYPE_TXQ: - subsys = CMD_SUBSYSTEM_ETH; - opcode = OPCODE_ETH_TX_DESTROY; - break; - case QTYPE_RXQ: - subsys = CMD_SUBSYSTEM_ETH; - opcode = OPCODE_ETH_RX_DESTROY; - break; - default: - printk(KERN_WARNING DRV_NAME ":bad Q type in Q destroy cmd\n"); - status = -1; - goto err; - } - be_cmd_hdr_prepare(&req->hdr, subsys, opcode, sizeof(*req)); - req->id = cpu_to_le16(q->id); - - status = be_mbox_db_ring(ctrl); -err: - spin_unlock(&ctrl->cmd_lock); - - return status; -} - -/* Create an rx filtering policy configuration on an i/f */ -int be_cmd_if_create(struct be_ctrl_info *ctrl, u32 flags, u8 *mac, - bool pmac_invalid, u32 *if_handle, u32 *pmac_id) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_if_create *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_NTWK_INTERFACE_CREATE, sizeof(*req)); - - req->capability_flags = cpu_to_le32(flags); - req->enable_flags = cpu_to_le32(flags); - if (!pmac_invalid) - memcpy(req->mac_addr, mac, ETH_ALEN); - - status = be_mbox_db_ring(ctrl); - if (!status) { - struct be_cmd_resp_if_create *resp = embedded_payload(wrb); - *if_handle = le32_to_cpu(resp->interface_id); - if (!pmac_invalid) - *pmac_id = le32_to_cpu(resp->pmac_id); - } - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_if_destroy(struct be_ctrl_info *ctrl, u32 interface_id) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_if_destroy *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_NTWK_INTERFACE_DESTROY, sizeof(*req)); - - req->interface_id = cpu_to_le32(interface_id); - status = be_mbox_db_ring(ctrl); - - spin_unlock(&ctrl->cmd_lock); - - return status; -} - -/* Get stats is a non embedded command: the request is not embedded inside - * WRB but is a separate dma memory block - */ -int be_cmd_get_stats(struct be_ctrl_info *ctrl, struct be_dma_mem *nonemb_cmd) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_get_stats *req = nonemb_cmd->va; - struct be_sge *sge = nonembedded_sgl(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - memset(req, 0, sizeof(*req)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), false, 1); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, - OPCODE_ETH_GET_STATISTICS, sizeof(*req)); - sge->pa_hi = cpu_to_le32(upper_32_bits(nonemb_cmd->dma)); - sge->pa_lo = cpu_to_le32(nonemb_cmd->dma & 0xFFFFFFFF); - sge->len = cpu_to_le32(nonemb_cmd->size); - - status = be_mbox_db_ring(ctrl); - if (!status) { - struct be_cmd_resp_get_stats *resp = nonemb_cmd->va; - be_dws_le_to_cpu(&resp->hw_stats, sizeof(resp->hw_stats)); - } - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_link_status_query(struct be_ctrl_info *ctrl, - struct be_link_info *link) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_link_status *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_NTWK_LINK_STATUS_QUERY, sizeof(*req)); - - status = be_mbox_db_ring(ctrl); - if (!status) { - struct be_cmd_resp_link_status *resp = embedded_payload(wrb); - link->speed = resp->mac_speed; - link->duplex = resp->mac_duplex; - link->fault = resp->mac_fault; - } else { - link->speed = PHY_LINK_SPEED_ZERO; - } - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_get_fw_ver(struct be_ctrl_info *ctrl, char *fw_ver) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_get_fw_version *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_GET_FW_VERSION, sizeof(*req)); - - status = be_mbox_db_ring(ctrl); - if (!status) { - struct be_cmd_resp_get_fw_version *resp = embedded_payload(wrb); - strncpy(fw_ver, resp->firmware_version_string, FW_VER_LEN); - } - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -/* set the EQ delay interval of an EQ to specified value */ -int be_cmd_modify_eqd(struct be_ctrl_info *ctrl, u32 eq_id, u32 eqd) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_modify_eq_delay *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_MODIFY_EQ_DELAY, sizeof(*req)); - - req->num_eq = cpu_to_le32(1); - req->delay[0].eq_id = cpu_to_le32(eq_id); - req->delay[0].phase = 0; - req->delay[0].delay_multiplier = cpu_to_le32(eqd); - - status = be_mbox_db_ring(ctrl); - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_vlan_config(struct be_ctrl_info *ctrl, u32 if_id, u16 *vtag_array, - u32 num, bool untagged, bool promiscuous) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_vlan_config *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_NTWK_VLAN_CONFIG, sizeof(*req)); - - req->interface_id = if_id; - req->promiscuous = promiscuous; - req->untagged = untagged; - req->num_vlan = num; - if (!promiscuous) { - memcpy(req->normal_vlan, vtag_array, - req->num_vlan * sizeof(vtag_array[0])); - } - - status = be_mbox_db_ring(ctrl); - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_promiscuous_config(struct be_ctrl_info *ctrl, u8 port_num, bool en) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_promiscuous_config *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_ETH, - OPCODE_ETH_PROMISCUOUS, sizeof(*req)); - - if (port_num) - req->port1_promiscuous = en; - else - req->port0_promiscuous = en; - - status = be_mbox_db_ring(ctrl); - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_mcast_mac_set(struct be_ctrl_info *ctrl, u32 if_id, u8 *mac_table, - u32 num, bool promiscuous) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_mcast_mac_config *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_NTWK_MULTICAST_SET, sizeof(*req)); - - req->interface_id = if_id; - req->promiscuous = promiscuous; - if (!promiscuous) { - req->num_mac = cpu_to_le16(num); - if (num) - memcpy(req->mac, mac_table, ETH_ALEN * num); - } - - status = be_mbox_db_ring(ctrl); - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_set_flow_control(struct be_ctrl_info *ctrl, u32 tx_fc, u32 rx_fc) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_set_flow_control *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_SET_FLOW_CONTROL, sizeof(*req)); - - req->tx_flow_control = cpu_to_le16((u16)tx_fc); - req->rx_flow_control = cpu_to_le16((u16)rx_fc); - - status = be_mbox_db_ring(ctrl); - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_get_flow_control(struct be_ctrl_info *ctrl, u32 *tx_fc, u32 *rx_fc) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_get_flow_control *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_GET_FLOW_CONTROL, sizeof(*req)); - - status = be_mbox_db_ring(ctrl); - if (!status) { - struct be_cmd_resp_get_flow_control *resp = - embedded_payload(wrb); - *tx_fc = le16_to_cpu(resp->tx_flow_control); - *rx_fc = le16_to_cpu(resp->rx_flow_control); - } - - spin_unlock(&ctrl->cmd_lock); - return status; -} - -int be_cmd_query_fw_cfg(struct be_ctrl_info *ctrl, u32 *port_num) -{ - struct be_mcc_wrb *wrb = wrb_from_mbox(&ctrl->mbox_mem); - struct be_cmd_req_query_fw_cfg *req = embedded_payload(wrb); - int status; - - spin_lock(&ctrl->cmd_lock); - - memset(wrb, 0, sizeof(*wrb)); - - be_wrb_hdr_prepare(wrb, sizeof(*req), true, 0); - - be_cmd_hdr_prepare(&req->hdr, CMD_SUBSYSTEM_COMMON, - OPCODE_COMMON_QUERY_FIRMWARE_CONFIG, sizeof(*req)); - - status = be_mbox_db_ring(ctrl); - if (!status) { - struct be_cmd_resp_query_fw_cfg *resp = embedded_payload(wrb); - *port_num = le32_to_cpu(resp->phys_port); - } - - spin_unlock(&ctrl->cmd_lock); - return status; -} diff --git a/trunk/drivers/net/benet/be_cmds.h b/trunk/drivers/net/benet/be_cmds.h deleted file mode 100644 index e499e2d5b8c3..000000000000 --- a/trunk/drivers/net/benet/be_cmds.h +++ /dev/null @@ -1,688 +0,0 @@ -/* - * Copyright (C) 2005 - 2009 ServerEngines - * 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 version 2 - * as published by the Free Software Foundation. The full GNU General - * Public License is included in this distribution in the file called COPYING. - * - * Contact Information: - * linux-drivers@serverengines.com - * - * ServerEngines - * 209 N. Fair Oaks Ave - * Sunnyvale, CA 94085 - */ - -/* - * The driver sends configuration and managements command requests to the - * firmware in the BE. These requests are communicated to the processor - * using Work Request Blocks (WRBs) submitted to the MCC-WRB ring or via one - * WRB inside a MAILBOX. - * The commands are serviced by the ARM processor in the BladeEngine's MPU. - */ - -struct be_sge { - u32 pa_lo; - u32 pa_hi; - u32 len; -}; - -#define MCC_WRB_EMBEDDED_MASK 1 /* bit 0 of dword 0*/ -#define MCC_WRB_SGE_CNT_SHIFT 3 /* bits 3 - 7 of dword 0 */ -#define MCC_WRB_SGE_CNT_MASK 0x1F /* bits 3 - 7 of dword 0 */ -struct be_mcc_wrb { - u32 embedded; /* dword 0 */ - u32 payload_length; /* dword 1 */ - u32 tag0; /* dword 2 */ - u32 tag1; /* dword 3 */ - u32 rsvd; /* dword 4 */ - union { - u8 embedded_payload[236]; /* used by embedded cmds */ - struct be_sge sgl[19]; /* used by non-embedded cmds */ - } payload; -}; - -#define CQE_FLAGS_VALID_MASK (1 << 31) -#define CQE_FLAGS_ASYNC_MASK (1 << 30) -#define CQE_FLAGS_COMPLETED_MASK (1 << 28) -#define CQE_FLAGS_CONSUMED_MASK (1 << 27) - -/* Completion Status */ -enum { - MCC_STATUS_SUCCESS = 0x0, -/* The client does not have sufficient privileges to execute the command */ - MCC_STATUS_INSUFFICIENT_PRIVILEGES = 0x1, -/* A parameter in the command was invalid. */ - MCC_STATUS_INVALID_PARAMETER = 0x2, -/* There are insufficient chip resources to execute the command */ - MCC_STATUS_INSUFFICIENT_RESOURCES = 0x3, -/* The command is completing because the queue was getting flushed */ - MCC_STATUS_QUEUE_FLUSHING = 0x4, -/* The command is completing with a DMA error */ - MCC_STATUS_DMA_FAILED = 0x5 -}; - -#define CQE_STATUS_COMPL_MASK 0xFFFF -#define CQE_STATUS_COMPL_SHIFT 0 /* bits 0 - 15 */ -#define CQE_STATUS_EXTD_MASK 0xFFFF -#define CQE_STATUS_EXTD_SHIFT 0 /* bits 0 - 15 */ - -struct be_mcc_cq_entry { - u32 status; /* dword 0 */ - u32 tag0; /* dword 1 */ - u32 tag1; /* dword 2 */ - u32 flags; /* dword 3 */ -}; - -struct be_mcc_mailbox { - struct be_mcc_wrb wrb; - struct be_mcc_cq_entry cqe; -}; - -#define CMD_SUBSYSTEM_COMMON 0x1 -#define CMD_SUBSYSTEM_ETH 0x3 - -#define OPCODE_COMMON_NTWK_MAC_QUERY 1 -#define OPCODE_COMMON_NTWK_MAC_SET 2 -#define OPCODE_COMMON_NTWK_MULTICAST_SET 3 -#define OPCODE_COMMON_NTWK_VLAN_CONFIG 4 -#define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY 5 -#define OPCODE_COMMON_CQ_CREATE 12 -#define OPCODE_COMMON_EQ_CREATE 13 -#define OPCODE_COMMON_MCC_CREATE 21 -#define OPCODE_COMMON_NTWK_RX_FILTER 34 -#define OPCODE_COMMON_GET_FW_VERSION 35 -#define OPCODE_COMMON_SET_FLOW_CONTROL 36 -#define OPCODE_COMMON_GET_FLOW_CONTROL 37 -#define OPCODE_COMMON_SET_FRAME_SIZE 39 -#define OPCODE_COMMON_MODIFY_EQ_DELAY 41 -#define OPCODE_COMMON_FIRMWARE_CONFIG 42 -#define OPCODE_COMMON_NTWK_INTERFACE_CREATE 50 -#define OPCODE_COMMON_NTWK_INTERFACE_DESTROY 51 -#define OPCODE_COMMON_CQ_DESTROY 54 -#define OPCODE_COMMON_EQ_DESTROY 55 -#define OPCODE_COMMON_QUERY_FIRMWARE_CONFIG 58 -#define OPCODE_COMMON_NTWK_PMAC_ADD 59 -#define OPCODE_COMMON_NTWK_PMAC_DEL 60 - -#define OPCODE_ETH_ACPI_CONFIG 2 -#define OPCODE_ETH_PROMISCUOUS 3 -#define OPCODE_ETH_GET_STATISTICS 4 -#define OPCODE_ETH_TX_CREATE 7 -#define OPCODE_ETH_RX_CREATE 8 -#define OPCODE_ETH_TX_DESTROY 9 -#define OPCODE_ETH_RX_DESTROY 10 - -struct be_cmd_req_hdr { - u8 opcode; /* dword 0 */ - u8 subsystem; /* dword 0 */ - u8 port_number; /* dword 0 */ - u8 domain; /* dword 0 */ - u32 timeout; /* dword 1 */ - u32 request_length; /* dword 2 */ - u32 rsvd; /* dword 3 */ -}; - -#define RESP_HDR_INFO_OPCODE_SHIFT 0 /* bits 0 - 7 */ -#define RESP_HDR_INFO_SUBSYS_SHIFT 8 /* bits 8 - 15 */ -struct be_cmd_resp_hdr { - u32 info; /* dword 0 */ - u32 status; /* dword 1 */ - u32 response_length; /* dword 2 */ - u32 actual_resp_len; /* dword 3 */ -}; - -struct phys_addr { - u32 lo; - u32 hi; -}; - -/************************** - * BE Command definitions * - **************************/ - -/* Pseudo amap definition in which each bit of the actual structure is defined - * as a byte: used to calculate offset/shift/mask of each field */ -struct amap_eq_context { - u8 cidx[13]; /* dword 0*/ - u8 rsvd0[3]; /* dword 0*/ - u8 epidx[13]; /* dword 0*/ - u8 valid; /* dword 0*/ - u8 rsvd1; /* dword 0*/ - u8 size; /* dword 0*/ - u8 pidx[13]; /* dword 1*/ - u8 rsvd2[3]; /* dword 1*/ - u8 pd[10]; /* dword 1*/ - u8 count[3]; /* dword 1*/ - u8 solevent; /* dword 1*/ - u8 stalled; /* dword 1*/ - u8 armed; /* dword 1*/ - u8 rsvd3[4]; /* dword 2*/ - u8 func[8]; /* dword 2*/ - u8 rsvd4; /* dword 2*/ - u8 delaymult[10]; /* dword 2*/ - u8 rsvd5[2]; /* dword 2*/ - u8 phase[2]; /* dword 2*/ - u8 nodelay; /* dword 2*/ - u8 rsvd6[4]; /* dword 2*/ - u8 rsvd7[32]; /* dword 3*/ -} __packed; - -struct be_cmd_req_eq_create { - struct be_cmd_req_hdr hdr; - u16 num_pages; /* sword */ - u16 rsvd0; /* sword */ - u8 context[sizeof(struct amap_eq_context) / 8]; - struct phys_addr pages[8]; -} __packed; - -struct be_cmd_resp_eq_create { - struct be_cmd_resp_hdr resp_hdr; - u16 eq_id; /* sword */ - u16 rsvd0; /* sword */ -} __packed; - -/******************** Mac query ***************************/ -enum { - MAC_ADDRESS_TYPE_STORAGE = 0x0, - MAC_ADDRESS_TYPE_NETWORK = 0x1, - MAC_ADDRESS_TYPE_PD = 0x2, - MAC_ADDRESS_TYPE_MANAGEMENT = 0x3 -}; - -struct mac_addr { - u16 size_of_struct; - u8 addr[ETH_ALEN]; -} __packed; - -struct be_cmd_req_mac_query { - struct be_cmd_req_hdr hdr; - u8 type; - u8 permanent; - u16 if_id; -} __packed; - -struct be_cmd_resp_mac_query { - struct be_cmd_resp_hdr hdr; - struct mac_addr mac; -}; - -/******************** PMac Add ***************************/ -struct be_cmd_req_pmac_add { - struct be_cmd_req_hdr hdr; - u32 if_id; - u8 mac_address[ETH_ALEN]; - u8 rsvd0[2]; -} __packed; - -struct be_cmd_resp_pmac_add { - struct be_cmd_resp_hdr hdr; - u32 pmac_id; -}; - -/******************** PMac Del ***************************/ -struct be_cmd_req_pmac_del { - struct be_cmd_req_hdr hdr; - u32 if_id; - u32 pmac_id; -}; - -/******************** Create CQ ***************************/ -/* Pseudo amap definition in which each bit of the actual structure is defined - * as a byte: used to calculate offset/shift/mask of each field */ -struct amap_cq_context { - u8 cidx[11]; /* dword 0*/ - u8 rsvd0; /* dword 0*/ - u8 coalescwm[2]; /* dword 0*/ - u8 nodelay; /* dword 0*/ - u8 epidx[11]; /* dword 0*/ - u8 rsvd1; /* dword 0*/ - u8 count[2]; /* dword 0*/ - u8 valid; /* dword 0*/ - u8 solevent; /* dword 0*/ - u8 eventable; /* dword 0*/ - u8 pidx[11]; /* dword 1*/ - u8 rsvd2; /* dword 1*/ - u8 pd[10]; /* dword 1*/ - u8 eqid[8]; /* dword 1*/ - u8 stalled; /* dword 1*/ - u8 armed; /* dword 1*/ - u8 rsvd3[4]; /* dword 2*/ - u8 func[8]; /* dword 2*/ - u8 rsvd4[20]; /* dword 2*/ - u8 rsvd5[32]; /* dword 3*/ -} __packed; - -struct be_cmd_req_cq_create { - struct be_cmd_req_hdr hdr; - u16 num_pages; - u16 rsvd0; - u8 context[sizeof(struct amap_cq_context) / 8]; - struct phys_addr pages[8]; -} __packed; - -struct be_cmd_resp_cq_create { - struct be_cmd_resp_hdr hdr; - u16 cq_id; - u16 rsvd0; -} __packed; - -/******************** Create TxQ ***************************/ -#define BE_ETH_TX_RING_TYPE_STANDARD 2 -#define BE_ULP1_NUM 1 - -/* Pseudo amap definition in which each bit of the actual structure is defined - * as a byte: used to calculate offset/shift/mask of each field */ -struct amap_tx_context { - u8 rsvd0[16]; /* dword 0 */ - u8 tx_ring_size[4]; /* dword 0 */ - u8 rsvd1[26]; /* dword 0 */ - u8 pci_func_id[8]; /* dword 1 */ - u8 rsvd2[9]; /* dword 1 */ - u8 ctx_valid; /* dword 1 */ - u8 cq_id_send[16]; /* dword 2 */ - u8 rsvd3[16]; /* dword 2 */ - u8 rsvd4[32]; /* dword 3 */ - u8 rsvd5[32]; /* dword 4 */ - u8 rsvd6[32]; /* dword 5 */ - u8 rsvd7[32]; /* dword 6 */ - u8 rsvd8[32]; /* dword 7 */ - u8 rsvd9[32]; /* dword 8 */ - u8 rsvd10[32]; /* dword 9 */ - u8 rsvd11[32]; /* dword 10 */ - u8 rsvd12[32]; /* dword 11 */ - u8 rsvd13[32]; /* dword 12 */ - u8 rsvd14[32]; /* dword 13 */ - u8 rsvd15[32]; /* dword 14 */ - u8 rsvd16[32]; /* dword 15 */ -} __packed; - -struct be_cmd_req_eth_tx_create { - struct be_cmd_req_hdr hdr; - u8 num_pages; - u8 ulp_num; - u8 type; - u8 bound_port; - u8 context[sizeof(struct amap_tx_context) / 8]; - struct phys_addr pages[8]; -} __packed; - -struct be_cmd_resp_eth_tx_create { - struct be_cmd_resp_hdr hdr; - u16 cid; - u16 rsvd0; -} __packed; - -/******************** Create RxQ ***************************/ -struct be_cmd_req_eth_rx_create { - struct be_cmd_req_hdr hdr; - u16 cq_id; - u8 frag_size; - u8 num_pages; - struct phys_addr pages[2]; - u32 interface_id; - u16 max_frame_size; - u16 rsvd0; - u32 rss_queue; -} __packed; - -struct be_cmd_resp_eth_rx_create { - struct be_cmd_resp_hdr hdr; - u16 id; - u8 cpu_id; - u8 rsvd0; -} __packed; - -/******************** Q Destroy ***************************/ -/* Type of Queue to be destroyed */ -enum { - QTYPE_EQ = 1, - QTYPE_CQ, - QTYPE_TXQ, - QTYPE_RXQ -}; - -struct be_cmd_req_q_destroy { - struct be_cmd_req_hdr hdr; - u16 id; - u16 bypass_flush; /* valid only for rx q destroy */ -} __packed; - -/************ I/f Create (it's actually I/f Config Create)**********/ - -/* Capability flags for the i/f */ -enum be_if_flags { - BE_IF_FLAGS_RSS = 0x4, - BE_IF_FLAGS_PROMISCUOUS = 0x8, - BE_IF_FLAGS_BROADCAST = 0x10, - BE_IF_FLAGS_UNTAGGED = 0x20, - BE_IF_FLAGS_ULP = 0x40, - BE_IF_FLAGS_VLAN_PROMISCUOUS = 0x80, - BE_IF_FLAGS_VLAN = 0x100, - BE_IF_FLAGS_MCAST_PROMISCUOUS = 0x200, - BE_IF_FLAGS_PASS_L2_ERRORS = 0x400, - BE_IF_FLAGS_PASS_L3L4_ERRORS = 0x800 -}; - -/* An RX interface is an object with one or more MAC addresses and - * filtering capabilities. */ -struct be_cmd_req_if_create { - struct be_cmd_req_hdr hdr; - u32 version; /* ignore currntly */ - u32 capability_flags; - u32 enable_flags; - u8 mac_addr[ETH_ALEN]; - u8 rsvd0; - u8 pmac_invalid; /* if set, don't attach the mac addr to the i/f */ - u32 vlan_tag; /* not used currently */ -} __packed; - -struct be_cmd_resp_if_create { - struct be_cmd_resp_hdr hdr; - u32 interface_id; - u32 pmac_id; -}; - -/****** I/f Destroy(it's actually I/f Config Destroy )**********/ -struct be_cmd_req_if_destroy { - struct be_cmd_req_hdr hdr; - u32 interface_id; -}; - -/*************** HW Stats Get **********************************/ -struct be_port_rxf_stats { - u32 rx_bytes_lsd; /* dword 0*/ - u32 rx_bytes_msd; /* dword 1*/ - u32 rx_total_frames; /* dword 2*/ - u32 rx_unicast_frames; /* dword 3*/ - u32 rx_multicast_frames; /* dword 4*/ - u32 rx_broadcast_frames; /* dword 5*/ - u32 rx_crc_errors; /* dword 6*/ - u32 rx_alignment_symbol_errors; /* dword 7*/ - u32 rx_pause_frames; /* dword 8*/ - u32 rx_control_frames; /* dword 9*/ - u32 rx_in_range_errors; /* dword 10*/ - u32 rx_out_range_errors; /* dword 11*/ - u32 rx_frame_too_long; /* dword 12*/ - u32 rx_address_match_errors; /* dword 13*/ - u32 rx_vlan_mismatch; /* dword 14*/ - u32 rx_dropped_too_small; /* dword 15*/ - u32 rx_dropped_too_short; /* dword 16*/ - u32 rx_dropped_header_too_small; /* dword 17*/ - u32 rx_dropped_tcp_length; /* dword 18*/ - u32 rx_dropped_runt; /* dword 19*/ - u32 rx_64_byte_packets; /* dword 20*/ - u32 rx_65_127_byte_packets; /* dword 21*/ - u32 rx_128_256_byte_packets; /* dword 22*/ - u32 rx_256_511_byte_packets; /* dword 23*/ - u32 rx_512_1023_byte_packets; /* dword 24*/ - u32 rx_1024_1518_byte_packets; /* dword 25*/ - u32 rx_1519_2047_byte_packets; /* dword 26*/ - u32 rx_2048_4095_byte_packets; /* dword 27*/ - u32 rx_4096_8191_byte_packets; /* dword 28*/ - u32 rx_8192_9216_byte_packets; /* dword 29*/ - u32 rx_ip_checksum_errs; /* dword 30*/ - u32 rx_tcp_checksum_errs; /* dword 31*/ - u32 rx_udp_checksum_errs; /* dword 32*/ - u32 rx_non_rss_packets; /* dword 33*/ - u32 rx_ipv4_packets; /* dword 34*/ - u32 rx_ipv6_packets; /* dword 35*/ - u32 rx_ipv4_bytes_lsd; /* dword 36*/ - u32 rx_ipv4_bytes_msd; /* dword 37*/ - u32 rx_ipv6_bytes_lsd; /* dword 38*/ - u32 rx_ipv6_bytes_msd; /* dword 39*/ - u32 rx_chute1_packets; /* dword 40*/ - u32 rx_chute2_packets; /* dword 41*/ - u32 rx_chute3_packets; /* dword 42*/ - u32 rx_management_packets; /* dword 43*/ - u32 rx_switched_unicast_packets; /* dword 44*/ - u32 rx_switched_multicast_packets; /* dword 45*/ - u32 rx_switched_broadcast_packets; /* dword 46*/ - u32 tx_bytes_lsd; /* dword 47*/ - u32 tx_bytes_msd; /* dword 48*/ - u32 tx_unicastframes; /* dword 49*/ - u32 tx_multicastframes; /* dword 50*/ - u32 tx_broadcastframes; /* dword 51*/ - u32 tx_pauseframes; /* dword 52*/ - u32 tx_controlframes; /* dword 53*/ - u32 tx_64_byte_packets; /* dword 54*/ - u32 tx_65_127_byte_packets; /* dword 55*/ - u32 tx_128_256_byte_packets; /* dword 56*/ - u32 tx_256_511_byte_packets; /* dword 57*/ - u32 tx_512_1023_byte_packets; /* dword 58*/ - u32 tx_1024_1518_byte_packets; /* dword 59*/ - u32 tx_1519_2047_byte_packets; /* dword 60*/ - u32 tx_2048_4095_byte_packets; /* dword 61*/ - u32 tx_4096_8191_byte_packets; /* dword 62*/ - u32 tx_8192_9216_byte_packets; /* dword 63*/ - u32 rx_fifo_overflow; /* dword 64*/ - u32 rx_input_fifo_overflow; /* dword 65*/ -}; - -struct be_rxf_stats { - struct be_port_rxf_stats port[2]; - u32 rx_drops_no_pbuf; /* dword 132*/ - u32 rx_drops_no_txpb; /* dword 133*/ - u32 rx_drops_no_erx_descr; /* dword 134*/ - u32 rx_drops_no_tpre_descr; /* dword 135*/ - u32 management_rx_port_packets; /* dword 136*/ - u32 management_rx_port_bytes; /* dword 137*/ - u32 management_rx_port_pause_frames; /* dword 138*/ - u32 management_rx_port_errors; /* dword 139*/ - u32 management_tx_port_packets; /* dword 140*/ - u32 management_tx_port_bytes; /* dword 141*/ - u32 management_tx_port_pause; /* dword 142*/ - u32 management_rx_port_rxfifo_overflow; /* dword 143*/ - u32 rx_drops_too_many_frags; /* dword 144*/ - u32 rx_drops_invalid_ring; /* dword 145*/ - u32 forwarded_packets; /* dword 146*/ - u32 rx_drops_mtu; /* dword 147*/ - u32 rsvd0[15]; -}; - -struct be_erx_stats { - u32 rx_drops_no_fragments[44]; /* dwordS 0 to 43*/ - u32 debug_wdma_sent_hold; /* dword 44*/ - u32 debug_wdma_pbfree_sent_hold; /* dword 45*/ - u32 debug_wdma_zerobyte_pbfree_sent_hold; /* dword 46*/ - u32 debug_pmem_pbuf_dealloc; /* dword 47*/ -}; - -struct be_hw_stats { - struct be_rxf_stats rxf; - u32 rsvd[48]; - struct be_erx_stats erx; -}; - -struct be_cmd_req_get_stats { - struct be_cmd_req_hdr hdr; - u8 rsvd[sizeof(struct be_hw_stats)]; -}; - -struct be_cmd_resp_get_stats { - struct be_cmd_resp_hdr hdr; - struct be_hw_stats hw_stats; -}; - -struct be_cmd_req_vlan_config { - struct be_cmd_req_hdr hdr; - u8 interface_id; - u8 promiscuous; - u8 untagged; - u8 num_vlan; - u16 normal_vlan[64]; -} __packed; - -struct be_cmd_req_promiscuous_config { - struct be_cmd_req_hdr hdr; - u8 port0_promiscuous; - u8 port1_promiscuous; - u16 rsvd0; -} __packed; - -struct macaddr { - u8 byte[ETH_ALEN]; -}; - -struct be_cmd_req_mcast_mac_config { - struct be_cmd_req_hdr hdr; - u16 num_mac; - u8 promiscuous; - u8 interface_id; - struct macaddr mac[32]; -} __packed; - -static inline struct be_hw_stats * -hw_stats_from_cmd(struct be_cmd_resp_get_stats *cmd) -{ - return &cmd->hw_stats; -} - -/******************** Link Status Query *******************/ -struct be_cmd_req_link_status { - struct be_cmd_req_hdr hdr; - u32 rsvd; -}; - -struct be_link_info { - u8 duplex; - u8 speed; - u8 fault; -}; - -enum { - PHY_LINK_DUPLEX_NONE = 0x0, - PHY_LINK_DUPLEX_HALF = 0x1, - PHY_LINK_DUPLEX_FULL = 0x2 -}; - -enum { - PHY_LINK_SPEED_ZERO = 0x0, /* => No link */ - PHY_LINK_SPEED_10MBPS = 0x1, - PHY_LINK_SPEED_100MBPS = 0x2, - PHY_LINK_SPEED_1GBPS = 0x3, - PHY_LINK_SPEED_10GBPS = 0x4 -}; - -struct be_cmd_resp_link_status { - struct be_cmd_resp_hdr hdr; - u8 physical_port; - u8 mac_duplex; - u8 mac_speed; - u8 mac_fault; - u8 mgmt_mac_duplex; - u8 mgmt_mac_speed; - u16 rsvd0; -} __packed; - -/******************** Get FW Version *******************/ -#define FW_VER_LEN 32 -struct be_cmd_req_get_fw_version { - struct be_cmd_req_hdr hdr; - u8 rsvd0[FW_VER_LEN]; - u8 rsvd1[FW_VER_LEN]; -} __packed; - -struct be_cmd_resp_get_fw_version { - struct be_cmd_resp_hdr hdr; - u8 firmware_version_string[FW_VER_LEN]; - u8 fw_on_flash_version_string[FW_VER_LEN]; -} __packed; - -/******************** Set Flow Contrl *******************/ -struct be_cmd_req_set_flow_control { - struct be_cmd_req_hdr hdr; - u16 tx_flow_control; - u16 rx_flow_control; -} __packed; - -/******************** Get Flow Contrl *******************/ -struct be_cmd_req_get_flow_control { - struct be_cmd_req_hdr hdr; - u32 rsvd; -}; - -struct be_cmd_resp_get_flow_control { - struct be_cmd_resp_hdr hdr; - u16 tx_flow_control; - u16 rx_flow_control; -} __packed; - -/******************** Modify EQ Delay *******************/ -struct be_cmd_req_modify_eq_delay { - struct be_cmd_req_hdr hdr; - u32 num_eq; - struct { - u32 eq_id; - u32 phase; - u32 delay_multiplier; - } delay[8]; -} __packed; - -struct be_cmd_resp_modify_eq_delay { - struct be_cmd_resp_hdr hdr; - u32 rsvd0; -} __packed; - -/******************** Get FW Config *******************/ -struct be_cmd_req_query_fw_cfg { - struct be_cmd_req_hdr hdr; - u32 rsvd[30]; -}; - -struct be_cmd_resp_query_fw_cfg { - struct be_cmd_resp_hdr hdr; - u32 be_config_number; - u32 asic_revision; - u32 phys_port; - u32 function_mode; - u32 rsvd[26]; -}; - -extern int be_pci_fnum_get(struct be_ctrl_info *ctrl); -extern int be_cmd_POST(struct be_ctrl_info *ctrl); -extern int be_cmd_mac_addr_query(struct be_ctrl_info *ctrl, u8 *mac_addr, - u8 type, bool permanent, u32 if_handle); -extern int be_cmd_pmac_add(struct be_ctrl_info *ctrl, u8 *mac_addr, - u32 if_id, u32 *pmac_id); -extern int be_cmd_pmac_del(struct be_ctrl_info *ctrl, u32 if_id, u32 pmac_id); -extern int be_cmd_if_create(struct be_ctrl_info *ctrl, u32 if_flags, u8 *mac, - bool pmac_invalid, u32 *if_handle, u32 *pmac_id); -extern int be_cmd_if_destroy(struct be_ctrl_info *ctrl, u32 if_handle); -extern int be_cmd_eq_create(struct be_ctrl_info *ctrl, - struct be_queue_info *eq, int eq_delay); -extern int be_cmd_cq_create(struct be_ctrl_info *ctrl, - struct be_queue_info *cq, struct be_queue_info *eq, - bool sol_evts, bool no_delay, - int num_cqe_dma_coalesce); -extern int be_cmd_txq_create(struct be_ctrl_info *ctrl, - struct be_queue_info *txq, - struct be_queue_info *cq); -extern int be_cmd_rxq_create(struct be_ctrl_info *ctrl, - struct be_queue_info *rxq, u16 cq_id, - u16 frag_size, u16 max_frame_size, u32 if_id, - u32 rss); -extern int be_cmd_q_destroy(struct be_ctrl_info *ctrl, struct be_queue_info *q, - int type); -extern int be_cmd_link_status_query(struct be_ctrl_info *ctrl, - struct be_link_info *link); -extern int be_cmd_reset(struct be_ctrl_info *ctrl); -extern int be_cmd_get_stats(struct be_ctrl_info *ctrl, - struct be_dma_mem *nonemb_cmd); -extern int be_cmd_get_fw_ver(struct be_ctrl_info *ctrl, char *fw_ver); - -extern int be_cmd_modify_eqd(struct be_ctrl_info *ctrl, u32 eq_id, u32 eqd); -extern int be_cmd_vlan_config(struct be_ctrl_info *ctrl, u32 if_id, - u16 *vtag_array, u32 num, bool untagged, - bool promiscuous); -extern int be_cmd_promiscuous_config(struct be_ctrl_info *ctrl, - u8 port_num, bool en); -extern int be_cmd_mcast_mac_set(struct be_ctrl_info *ctrl, u32 if_id, - u8 *mac_table, u32 num, bool promiscuous); -extern int be_cmd_set_flow_control(struct be_ctrl_info *ctrl, - u32 tx_fc, u32 rx_fc); -extern int be_cmd_get_flow_control(struct be_ctrl_info *ctrl, - u32 *tx_fc, u32 *rx_fc); -extern int be_cmd_query_fw_cfg(struct be_ctrl_info *ctrl, u32 *port_num); diff --git a/trunk/drivers/net/benet/be_ethtool.c b/trunk/drivers/net/benet/be_ethtool.c deleted file mode 100644 index 04f4b73fa8d8..000000000000 --- a/trunk/drivers/net/benet/be_ethtool.c +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright (C) 2005 - 2009 ServerEngines - * 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 version 2 - * as published by the Free Software Foundation. The full GNU General - * Public License is included in this distribution in the file called COPYING. - * - * Contact Information: - * linux-drivers@serverengines.com - * - * ServerEngines - * 209 N. Fair Oaks Ave - * Sunnyvale, CA 94085 - */ - -#include "be.h" -#include - -struct be_ethtool_stat { - char desc[ETH_GSTRING_LEN]; - int type; - int size; - int offset; -}; - -enum {NETSTAT, PORTSTAT, MISCSTAT, DRVSTAT, ERXSTAT}; -#define FIELDINFO(_struct, field) FIELD_SIZEOF(_struct, field), \ - offsetof(_struct, field) -#define NETSTAT_INFO(field) #field, NETSTAT,\ - FIELDINFO(struct net_device_stats,\ - field) -#define DRVSTAT_INFO(field) #field, DRVSTAT,\ - FIELDINFO(struct be_drvr_stats, field) -#define MISCSTAT_INFO(field) #field, MISCSTAT,\ - FIELDINFO(struct be_rxf_stats, field) -#define PORTSTAT_INFO(field) #field, PORTSTAT,\ - FIELDINFO(struct be_port_rxf_stats, \ - field) -#define ERXSTAT_INFO(field) #field, ERXSTAT,\ - FIELDINFO(struct be_erx_stats, field) - -static const struct be_ethtool_stat et_stats[] = { - {NETSTAT_INFO(rx_packets)}, - {NETSTAT_INFO(tx_packets)}, - {NETSTAT_INFO(rx_bytes)}, - {NETSTAT_INFO(tx_bytes)}, - {NETSTAT_INFO(rx_errors)}, - {NETSTAT_INFO(tx_errors)}, - {NETSTAT_INFO(rx_dropped)}, - {NETSTAT_INFO(tx_dropped)}, - {DRVSTAT_INFO(be_tx_reqs)}, - {DRVSTAT_INFO(be_tx_stops)}, - {DRVSTAT_INFO(be_fwd_reqs)}, - {DRVSTAT_INFO(be_tx_wrbs)}, - {DRVSTAT_INFO(be_polls)}, - {DRVSTAT_INFO(be_tx_events)}, - {DRVSTAT_INFO(be_rx_events)}, - {DRVSTAT_INFO(be_tx_compl)}, - {DRVSTAT_INFO(be_rx_compl)}, - {DRVSTAT_INFO(be_ethrx_post_fail)}, - {DRVSTAT_INFO(be_802_3_dropped_frames)}, - {DRVSTAT_INFO(be_802_3_malformed_frames)}, - {DRVSTAT_INFO(be_tx_rate)}, - {DRVSTAT_INFO(be_rx_rate)}, - {PORTSTAT_INFO(rx_unicast_frames)}, - {PORTSTAT_INFO(rx_multicast_frames)}, - {PORTSTAT_INFO(rx_broadcast_frames)}, - {PORTSTAT_INFO(rx_crc_errors)}, - {PORTSTAT_INFO(rx_alignment_symbol_errors)}, - {PORTSTAT_INFO(rx_pause_frames)}, - {PORTSTAT_INFO(rx_control_frames)}, - {PORTSTAT_INFO(rx_in_range_errors)}, - {PORTSTAT_INFO(rx_out_range_errors)}, - {PORTSTAT_INFO(rx_frame_too_long)}, - {PORTSTAT_INFO(rx_address_match_errors)}, - {PORTSTAT_INFO(rx_vlan_mismatch)}, - {PORTSTAT_INFO(rx_dropped_too_small)}, - {PORTSTAT_INFO(rx_dropped_too_short)}, - {PORTSTAT_INFO(rx_dropped_header_too_small)}, - {PORTSTAT_INFO(rx_dropped_tcp_length)}, - {PORTSTAT_INFO(rx_dropped_runt)}, - {PORTSTAT_INFO(rx_fifo_overflow)}, - {PORTSTAT_INFO(rx_input_fifo_overflow)}, - {PORTSTAT_INFO(rx_ip_checksum_errs)}, - {PORTSTAT_INFO(rx_tcp_checksum_errs)}, - {PORTSTAT_INFO(rx_udp_checksum_errs)}, - {PORTSTAT_INFO(rx_non_rss_packets)}, - {PORTSTAT_INFO(rx_ipv4_packets)}, - {PORTSTAT_INFO(rx_ipv6_packets)}, - {PORTSTAT_INFO(tx_unicastframes)}, - {PORTSTAT_INFO(tx_multicastframes)}, - {PORTSTAT_INFO(tx_broadcastframes)}, - {PORTSTAT_INFO(tx_pauseframes)}, - {PORTSTAT_INFO(tx_controlframes)}, - {MISCSTAT_INFO(rx_drops_no_pbuf)}, - {MISCSTAT_INFO(rx_drops_no_txpb)}, - {MISCSTAT_INFO(rx_drops_no_erx_descr)}, - {MISCSTAT_INFO(rx_drops_no_tpre_descr)}, - {MISCSTAT_INFO(rx_drops_too_many_frags)}, - {MISCSTAT_INFO(rx_drops_invalid_ring)}, - {MISCSTAT_INFO(forwarded_packets)}, - {MISCSTAT_INFO(rx_drops_mtu)}, - {ERXSTAT_INFO(rx_drops_no_fragments)}, -}; -#define ETHTOOL_STATS_NUM ARRAY_SIZE(et_stats) - -static void -be_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo) -{ - struct be_adapter *adapter = netdev_priv(netdev); - - strcpy(drvinfo->driver, DRV_NAME); - strcpy(drvinfo->version, DRV_VER); - strncpy(drvinfo->fw_version, adapter->fw_ver, FW_VER_LEN); - strcpy(drvinfo->bus_info, pci_name(adapter->pdev)); - drvinfo->testinfo_len = 0; - drvinfo->regdump_len = 0; - drvinfo->eedump_len = 0; -} - -static int -be_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce) -{ - struct be_adapter *adapter = netdev_priv(netdev); - struct be_eq_obj *rx_eq = &adapter->rx_eq; - struct be_eq_obj *tx_eq = &adapter->tx_eq; - - coalesce->rx_max_coalesced_frames = adapter->max_rx_coal; - - coalesce->rx_coalesce_usecs = rx_eq->cur_eqd; - coalesce->rx_coalesce_usecs_high = rx_eq->max_eqd; - coalesce->rx_coalesce_usecs_low = rx_eq->min_eqd; - - coalesce->tx_coalesce_usecs = tx_eq->cur_eqd; - coalesce->tx_coalesce_usecs_high = tx_eq->max_eqd; - coalesce->tx_coalesce_usecs_low = tx_eq->min_eqd; - - coalesce->use_adaptive_rx_coalesce = rx_eq->enable_aic; - coalesce->use_adaptive_tx_coalesce = tx_eq->enable_aic; - - return 0; -} - -/* - * This routine is used to set interrup coalescing delay *as well as* - * the number of pkts to coalesce for LRO. - */ -static int -be_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce) -{ - struct be_adapter *adapter = netdev_priv(netdev); - struct be_ctrl_info *ctrl = &adapter->ctrl; - struct be_eq_obj *rx_eq = &adapter->rx_eq; - struct be_eq_obj *tx_eq = &adapter->tx_eq; - u32 tx_max, tx_min, tx_cur; - u32 rx_max, rx_min, rx_cur; - int status = 0; - - if (coalesce->use_adaptive_tx_coalesce == 1) - return -EINVAL; - - adapter->max_rx_coal = coalesce->rx_max_coalesced_frames; - if (adapter->max_rx_coal > MAX_SKB_FRAGS) - adapter->max_rx_coal = MAX_SKB_FRAGS - 1; - - /* if AIC is being turned on now, start with an EQD of 0 */ - if (rx_eq->enable_aic == 0 && - coalesce->use_adaptive_rx_coalesce == 1) { - rx_eq->cur_eqd = 0; - } - rx_eq->enable_aic = coalesce->use_adaptive_rx_coalesce; - - rx_max = coalesce->rx_coalesce_usecs_high; - rx_min = coalesce->rx_coalesce_usecs_low; - rx_cur = coalesce->rx_coalesce_usecs; - - tx_max = coalesce->tx_coalesce_usecs_high; - tx_min = coalesce->tx_coalesce_usecs_low; - tx_cur = coalesce->tx_coalesce_usecs; - - if (tx_cur > BE_MAX_EQD) - tx_cur = BE_MAX_EQD; - if (tx_eq->cur_eqd != tx_cur) { - status = be_cmd_modify_eqd(ctrl, tx_eq->q.id, tx_cur); - if (!status) - tx_eq->cur_eqd = tx_cur; - } - - if (rx_eq->enable_aic) { - if (rx_max > BE_MAX_EQD) - rx_max = BE_MAX_EQD; - if (rx_min > rx_max) - rx_min = rx_max; - rx_eq->max_eqd = rx_max; - rx_eq->min_eqd = rx_min; - if (rx_eq->cur_eqd > rx_max) - rx_eq->cur_eqd = rx_max; - if (rx_eq->cur_eqd < rx_min) - rx_eq->cur_eqd = rx_min; - } else { - if (rx_cur > BE_MAX_EQD) - rx_cur = BE_MAX_EQD; - if (rx_eq->cur_eqd != rx_cur) { - status = be_cmd_modify_eqd(ctrl, rx_eq->q.id, rx_cur); - if (!status) - rx_eq->cur_eqd = rx_cur; - } - } - return 0; -} - -static u32 be_get_rx_csum(struct net_device *netdev) -{ - struct be_adapter *adapter = netdev_priv(netdev); - - return adapter->rx_csum; -} - -static int be_set_rx_csum(struct net_device *netdev, uint32_t data) -{ - struct be_adapter *adapter = netdev_priv(netdev); - - if (data) - adapter->rx_csum = true; - else - adapter->rx_csum = false; - - return 0; -} - -static void -be_get_ethtool_stats(struct net_device *netdev, - struct ethtool_stats *stats, uint64_t *data) -{ - struct be_adapter *adapter = netdev_priv(netdev); - struct be_drvr_stats *drvr_stats = &adapter->stats.drvr_stats; - struct be_hw_stats *hw_stats = hw_stats_from_cmd(adapter->stats.cmd.va); - struct be_rxf_stats *rxf_stats = &hw_stats->rxf; - struct be_port_rxf_stats *port_stats = - &rxf_stats->port[adapter->port_num]; - struct net_device_stats *net_stats = &adapter->stats.net_stats; - struct be_erx_stats *erx_stats = &hw_stats->erx; - void *p = NULL; - int i; - - for (i = 0; i < ETHTOOL_STATS_NUM; i++) { - switch (et_stats[i].type) { - case NETSTAT: - p = net_stats; - break; - case DRVSTAT: - p = drvr_stats; - break; - case PORTSTAT: - p = port_stats; - break; - case MISCSTAT: - p = rxf_stats; - break; - case ERXSTAT: /* Currently only one ERX stat is provided */ - p = (u32 *)erx_stats + adapter->rx_obj.q.id; - break; - } - - p = (u8 *)p + et_stats[i].offset; - data[i] = (et_stats[i].size == sizeof(u64)) ? - *(u64 *)p: *(u32 *)p; - } - - return; -} - -static void -be_get_stat_strings(struct net_device *netdev, uint32_t stringset, - uint8_t *data) -{ - int i; - switch (stringset) { - case ETH_SS_STATS: - for (i = 0; i < ETHTOOL_STATS_NUM; i++) { - memcpy(data, et_stats[i].desc, ETH_GSTRING_LEN); - data += ETH_GSTRING_LEN; - } - break; - } -} - -static int be_get_stats_count(struct net_device *netdev) -{ - return ETHTOOL_STATS_NUM; -} - -static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) -{ - ecmd->speed = SPEED_10000; - ecmd->duplex = DUPLEX_FULL; - ecmd->autoneg = AUTONEG_DISABLE; - return 0; -} - -static void -be_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring) -{ - struct be_adapter *adapter = netdev_priv(netdev); - - ring->rx_max_pending = adapter->rx_obj.q.len; - ring->tx_max_pending = adapter->tx_obj.q.len; - - ring->rx_pending = atomic_read(&adapter->rx_obj.q.used); - ring->tx_pending = atomic_read(&adapter->tx_obj.q.used); -} - -static void -be_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd) -{ - struct be_adapter *adapter = netdev_priv(netdev); - - be_cmd_get_flow_control(&adapter->ctrl, &ecmd->tx_pause, - &ecmd->rx_pause); - ecmd->autoneg = AUTONEG_ENABLE; -} - -static int -be_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd) -{ - struct be_adapter *adapter = netdev_priv(netdev); - int status; - - if (ecmd->autoneg != AUTONEG_ENABLE) - return -EINVAL; - - status = be_cmd_set_flow_control(&adapter->ctrl, ecmd->tx_pause, - ecmd->rx_pause); - if (!status) - dev_warn(&adapter->pdev->dev, "Pause param set failed.\n"); - - return status; -} - -struct ethtool_ops be_ethtool_ops = { - .get_settings = be_get_settings, - .get_drvinfo = be_get_drvinfo, - .get_link = ethtool_op_get_link, - .get_coalesce = be_get_coalesce, - .set_coalesce = be_set_coalesce, - .get_ringparam = be_get_ringparam, - .get_pauseparam = be_get_pauseparam, - .set_pauseparam = be_set_pauseparam, - .get_rx_csum = be_get_rx_csum, - .set_rx_csum = be_set_rx_csum, - .get_tx_csum = ethtool_op_get_tx_csum, - .set_tx_csum = ethtool_op_set_tx_csum, - .get_sg = ethtool_op_get_sg, - .set_sg = ethtool_op_set_sg, - .get_tso = ethtool_op_get_tso, - .set_tso = ethtool_op_set_tso, - .get_strings = be_get_stat_strings, - .get_stats_count = be_get_stats_count, - .get_ethtool_stats = be_get_ethtool_stats, -}; diff --git a/trunk/drivers/net/benet/be_hw.h b/trunk/drivers/net/benet/be_hw.h deleted file mode 100644 index b132aa4893ca..000000000000 --- a/trunk/drivers/net/benet/be_hw.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (C) 2005 - 2009 ServerEngines - * 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 version 2 - * as published by the Free Software Foundation. The full GNU General - * Public License is included in this distribution in the file called COPYING. - * - * Contact Information: - * linux-drivers@serverengines.com - * - * ServerEngines - * 209 N. Fair Oaks Ave - * Sunnyvale, CA 94085 - */ - -/********* Mailbox door bell *************/ -/* Used for driver communication with the FW. - * The software must write this register twice to post any command. First, - * it writes the register with hi=1 and the upper bits of the physical address - * for the MAILBOX structure. Software must poll the ready bit until this - * is acknowledged. Then, sotware writes the register with hi=0 with the lower - * bits in the address. It must poll the ready bit until the command is - * complete. Upon completion, the MAILBOX will contain a valid completion - * queue entry. - */ -#define MPU_MAILBOX_DB_OFFSET 0x160 -#define MPU_MAILBOX_DB_RDY_MASK 0x1 /* bit 0 */ -#define MPU_MAILBOX_DB_HI_MASK 0x2 /* bit 1 */ - -#define MPU_EP_CONTROL 0 - -/********** MPU semphore ******************/ -#define MPU_EP_SEMAPHORE_OFFSET 0xac -#define EP_SEMAPHORE_POST_STAGE_MASK 0x0000FFFF -#define EP_SEMAPHORE_POST_ERR_MASK 0x1 -#define EP_SEMAPHORE_POST_ERR_SHIFT 31 -/* MPU semphore POST stage values */ -#define POST_STAGE_AWAITING_HOST_RDY 0x1 /* FW awaiting goahead from host */ -#define POST_STAGE_HOST_RDY 0x2 /* Host has given go-ahed to FW */ -#define POST_STAGE_BE_RESET 0x3 /* Host wants to reset chip */ -#define POST_STAGE_ARMFW_RDY 0xc000 /* FW is done with POST */ - -/********* Memory BAR register ************/ -#define PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET 0xfc -/* Host Interrupt Enable, if set interrupts are enabled although "PCI Interrupt - * Disable" may still globally block interrupts in addition to individual - * interrupt masks; a mechanism for the device driver to block all interrupts - * atomically without having to arbitrate for the PCI Interrupt Disable bit - * with the OS. - */ -#define MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK (1 << 29) /* bit 29 */ -/* PCI physical function number */ -#define MEMBAR_CTRL_INT_CTRL_PFUNC_MASK 0x7 /* bits 26 - 28 */ -#define MEMBAR_CTRL_INT_CTRL_PFUNC_SHIFT 26 - -/********* Event Q door bell *************/ -#define DB_EQ_OFFSET DB_CQ_OFFSET -#define DB_EQ_RING_ID_MASK 0x1FF /* bits 0 - 8 */ -/* Clear the interrupt for this eq */ -#define DB_EQ_CLR_SHIFT (9) /* bit 9 */ -/* Must be 1 */ -#define DB_EQ_EVNT_SHIFT (10) /* bit 10 */ -/* Number of event entries processed */ -#define DB_EQ_NUM_POPPED_SHIFT (16) /* bits 16 - 28 */ -/* Rearm bit */ -#define DB_EQ_REARM_SHIFT (29) /* bit 29 */ - -/********* Compl Q door bell *************/ -#define DB_CQ_OFFSET 0x120 -#define DB_CQ_RING_ID_MASK 0x3FF /* bits 0 - 9 */ -/* Number of event entries processed */ -#define DB_CQ_NUM_POPPED_SHIFT (16) /* bits 16 - 28 */ -/* Rearm bit */ -#define DB_CQ_REARM_SHIFT (29) /* bit 29 */ - -/********** TX ULP door bell *************/ -#define DB_TXULP1_OFFSET 0x60 -#define DB_TXULP_RING_ID_MASK 0x7FF /* bits 0 - 10 */ -/* Number of tx entries posted */ -#define DB_TXULP_NUM_POSTED_SHIFT (16) /* bits 16 - 29 */ -#define DB_TXULP_NUM_POSTED_MASK 0x3FFF /* bits 16 - 29 */ - -/********** RQ(erx) door bell ************/ -#define DB_RQ_OFFSET 0x100 -#define DB_RQ_RING_ID_MASK 0x3FF /* bits 0 - 9 */ -/* Number of rx frags posted */ -#define DB_RQ_NUM_POSTED_SHIFT (24) /* bits 24 - 31 */ - -/* - * BE descriptors: host memory data structures whose formats - * are hardwired in BE silicon. - */ -/* Event Queue Descriptor */ -#define EQ_ENTRY_VALID_MASK 0x1 /* bit 0 */ -#define EQ_ENTRY_RES_ID_MASK 0xFFFF /* bits 16 - 31 */ -#define EQ_ENTRY_RES_ID_SHIFT 16 -struct be_eq_entry { - u32 evt; -}; - -/* TX Queue Descriptor */ -#define ETH_WRB_FRAG_LEN_MASK 0xFFFF -struct be_eth_wrb { - u32 frag_pa_hi; /* dword 0 */ - u32 frag_pa_lo; /* dword 1 */ - u32 rsvd0; /* dword 2 */ - u32 frag_len; /* dword 3: bits 0 - 15 */ -} __packed; - -/* Pseudo amap definition for eth_hdr_wrb in which each bit of the - * actual structure is defined as a byte : used to calculate - * offset/shift/mask of each field */ -struct amap_eth_hdr_wrb { - u8 rsvd0[32]; /* dword 0 */ - u8 rsvd1[32]; /* dword 1 */ - u8 complete; /* dword 2 */ - u8 event; - u8 crc; - u8 forward; - u8 ipsec; - u8 mgmt; - u8 ipcs; - u8 udpcs; - u8 tcpcs; - u8 lso; - u8 vlan; - u8 gso[2]; - u8 num_wrb[5]; - u8 lso_mss[14]; - u8 len[16]; /* dword 3 */ - u8 vlan_tag[16]; -} __packed; - -struct be_eth_hdr_wrb { - u32 dw[4]; -}; - -/* TX Compl Queue Descriptor */ - -/* Pseudo amap definition for eth_tx_compl in which each bit of the - * actual structure is defined as a byte: used to calculate - * offset/shift/mask of each field */ -struct amap_eth_tx_compl { - u8 wrb_index[16]; /* dword 0 */ - u8 ct[2]; /* dword 0 */ - u8 port[2]; /* dword 0 */ - u8 rsvd0[8]; /* dword 0 */ - u8 status[4]; /* dword 0 */ - u8 user_bytes[16]; /* dword 1 */ - u8 nwh_bytes[8]; /* dword 1 */ - u8 lso; /* dword 1 */ - u8 cast_enc[2]; /* dword 1 */ - u8 rsvd1[5]; /* dword 1 */ - u8 rsvd2[32]; /* dword 2 */ - u8 pkts[16]; /* dword 3 */ - u8 ringid[11]; /* dword 3 */ - u8 hash_val[4]; /* dword 3 */ - u8 valid; /* dword 3 */ -} __packed; - -struct be_eth_tx_compl { - u32 dw[4]; -}; - -/* RX Queue Descriptor */ -struct be_eth_rx_d { - u32 fragpa_hi; - u32 fragpa_lo; -}; - -/* RX Compl Queue Descriptor */ - -/* Pseudo amap definition for eth_rx_compl in which each bit of the - * actual structure is defined as a byte: used to calculate - * offset/shift/mask of each field */ -struct amap_eth_rx_compl { - u8 vlan_tag[16]; /* dword 0 */ - u8 pktsize[14]; /* dword 0 */ - u8 port; /* dword 0 */ - u8 ip_opt; /* dword 0 */ - u8 err; /* dword 1 */ - u8 rsshp; /* dword 1 */ - u8 ipf; /* dword 1 */ - u8 tcpf; /* dword 1 */ - u8 udpf; /* dword 1 */ - u8 ipcksm; /* dword 1 */ - u8 l4_cksm; /* dword 1 */ - u8 ip_version; /* dword 1 */ - u8 macdst[6]; /* dword 1 */ - u8 vtp; /* dword 1 */ - u8 rsvd0; /* dword 1 */ - u8 fragndx[10]; /* dword 1 */ - u8 ct[2]; /* dword 1 */ - u8 sw; /* dword 1 */ - u8 numfrags[3]; /* dword 1 */ - u8 rss_flush; /* dword 2 */ - u8 cast_enc[2]; /* dword 2 */ - u8 qnq; /* dword 2 */ - u8 rss_bank; /* dword 2 */ - u8 rsvd1[23]; /* dword 2 */ - u8 lro_pkt; /* dword 2 */ - u8 rsvd2[2]; /* dword 2 */ - u8 valid; /* dword 2 */ - u8 rsshash[32]; /* dword 3 */ -} __packed; - -struct be_eth_rx_compl { - u32 dw[4]; -}; diff --git a/trunk/drivers/net/benet/be_main.c b/trunk/drivers/net/benet/be_main.c deleted file mode 100644 index 0ecaffb70e58..000000000000 --- a/trunk/drivers/net/benet/be_main.c +++ /dev/null @@ -1,1911 +0,0 @@ -/* - * Copyright (C) 2005 - 2009 ServerEngines - * 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 version 2 - * as published by the Free Software Foundation. The full GNU General - * Public License is included in this distribution in the file called COPYING. - * - * Contact Information: - * linux-drivers@serverengines.com - * - * ServerEngines - * 209 N. Fair Oaks Ave - * Sunnyvale, CA 94085 - */ - -#include "be.h" - -MODULE_VERSION(DRV_VER); -MODULE_DEVICE_TABLE(pci, be_dev_ids); -MODULE_DESCRIPTION(DRV_DESC " " DRV_VER); -MODULE_AUTHOR("ServerEngines Corporation"); -MODULE_LICENSE("GPL"); - -static unsigned int rx_frag_size = 2048; -module_param(rx_frag_size, uint, S_IRUGO); -MODULE_PARM_DESC(rx_frag_size, "Size of a fragment that holds rcvd data."); - -#define BE_VENDOR_ID 0x19a2 -#define BE2_DEVICE_ID_1 0x0211 -static DEFINE_PCI_DEVICE_TABLE(be_dev_ids) = { - { PCI_DEVICE(BE_VENDOR_ID, BE2_DEVICE_ID_1) }, - { 0 } -}; -MODULE_DEVICE_TABLE(pci, be_dev_ids); - -static void be_queue_free(struct be_adapter *adapter, struct be_queue_info *q) -{ - struct be_dma_mem *mem = &q->dma_mem; - if (mem->va) - pci_free_consistent(adapter->pdev, mem->size, - mem->va, mem->dma); -} - -static int be_queue_alloc(struct be_adapter *adapter, struct be_queue_info *q, - u16 len, u16 entry_size) -{ - struct be_dma_mem *mem = &q->dma_mem; - - memset(q, 0, sizeof(*q)); - q->len = len; - q->entry_size = entry_size; - mem->size = len * entry_size; - mem->va = pci_alloc_consistent(adapter->pdev, mem->size, &mem->dma); - if (!mem->va) - return -1; - memset(mem->va, 0, mem->size); - return 0; -} - -static inline void *queue_head_node(struct be_queue_info *q) -{ - return q->dma_mem.va + q->head * q->entry_size; -} - -static inline void *queue_tail_node(struct be_queue_info *q) -{ - return q->dma_mem.va + q->tail * q->entry_size; -} - -static inline void queue_head_inc(struct be_queue_info *q) -{ - index_inc(&q->head, q->len); -} - -static inline void queue_tail_inc(struct be_queue_info *q) -{ - index_inc(&q->tail, q->len); -} - -static void be_intr_set(struct be_ctrl_info *ctrl, bool enable) -{ - u8 __iomem *addr = ctrl->pcicfg + PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET; - u32 reg = ioread32(addr); - u32 enabled = reg & MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK; - if (!enabled && enable) { - reg |= MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK; - } else if (enabled && !enable) { - reg &= ~MEMBAR_CTRL_INT_CTRL_HOSTINTR_MASK; - } else { - printk(KERN_WARNING DRV_NAME - ": bad value in membar_int_ctrl reg=0x%x\n", reg); - return; - } - iowrite32(reg, addr); -} - -static void be_rxq_notify(struct be_ctrl_info *ctrl, u16 qid, u16 posted) -{ - u32 val = 0; - val |= qid & DB_RQ_RING_ID_MASK; - val |= posted << DB_RQ_NUM_POSTED_SHIFT; - iowrite32(val, ctrl->db + DB_RQ_OFFSET); -} - -static void be_txq_notify(struct be_ctrl_info *ctrl, u16 qid, u16 posted) -{ - u32 val = 0; - val |= qid & DB_TXULP_RING_ID_MASK; - val |= (posted & DB_TXULP_NUM_POSTED_MASK) << DB_TXULP_NUM_POSTED_SHIFT; - iowrite32(val, ctrl->db + DB_TXULP1_OFFSET); -} - -static void be_eq_notify(struct be_ctrl_info *ctrl, u16 qid, - bool arm, bool clear_int, u16 num_popped) -{ - u32 val = 0; - val |= qid & DB_EQ_RING_ID_MASK; - if (arm) - val |= 1 << DB_EQ_REARM_SHIFT; - if (clear_int) - val |= 1 << DB_EQ_CLR_SHIFT; - val |= 1 << DB_EQ_EVNT_SHIFT; - val |= num_popped << DB_EQ_NUM_POPPED_SHIFT; - iowrite32(val, ctrl->db + DB_EQ_OFFSET); -} - -static void be_cq_notify(struct be_ctrl_info *ctrl, u16 qid, - bool arm, u16 num_popped) -{ - u32 val = 0; - val |= qid & DB_CQ_RING_ID_MASK; - if (arm) - val |= 1 << DB_CQ_REARM_SHIFT; - val |= num_popped << DB_CQ_NUM_POPPED_SHIFT; - iowrite32(val, ctrl->db + DB_CQ_OFFSET); -} - - -static int be_mac_addr_set(struct net_device *netdev, void *p) -{ - struct be_adapter *adapter = netdev_priv(netdev); - struct sockaddr *addr = p; - int status = 0; - - if (netif_running(netdev)) { - status = be_cmd_pmac_del(&adapter->ctrl, adapter->if_handle, - adapter->pmac_id); - if (status) - return status; - - status = be_cmd_pmac_add(&adapter->ctrl, (u8 *)addr->sa_data, - adapter->if_handle, &adapter->pmac_id); - } - - if (!status) - memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); - - return status; -} - -static void netdev_stats_update(struct be_adapter *adapter) -{ - struct be_hw_stats *hw_stats = hw_stats_from_cmd(adapter->stats.cmd.va); - struct be_rxf_stats *rxf_stats = &hw_stats->rxf; - struct be_port_rxf_stats *port_stats = - &rxf_stats->port[adapter->port_num]; - struct net_device_stats *dev_stats = &adapter->stats.net_stats; - - dev_stats->rx_packets = port_stats->rx_total_frames; - dev_stats->tx_packets = port_stats->tx_unicastframes + - port_stats->tx_multicastframes + port_stats->tx_broadcastframes; - dev_stats->rx_bytes = (u64) port_stats->rx_bytes_msd << 32 | - (u64) port_stats->rx_bytes_lsd; - dev_stats->tx_bytes = (u64) port_stats->tx_bytes_msd << 32 | - (u64) port_stats->tx_bytes_lsd; - - /* bad pkts received */ - dev_stats->rx_errors = port_stats->rx_crc_errors + - port_stats->rx_alignment_symbol_errors + - port_stats->rx_in_range_errors + - port_stats->rx_out_range_errors + port_stats->rx_frame_too_long; - - /* packet transmit problems */ - dev_stats->tx_errors = 0; - - /* no space in linux buffers */ - dev_stats->rx_dropped = 0; - - /* no space available in linux */ - dev_stats->tx_dropped = 0; - - dev_stats->multicast = port_stats->tx_multicastframes; - dev_stats->collisions = 0; - - /* detailed rx errors */ - dev_stats->rx_length_errors = port_stats->rx_in_range_errors + - port_stats->rx_out_range_errors + port_stats->rx_frame_too_long; - /* receive ring buffer overflow */ - dev_stats->rx_over_errors = 0; - dev_stats->rx_crc_errors = port_stats->rx_crc_errors; - - /* frame alignment errors */ - dev_stats->rx_frame_errors = port_stats->rx_alignment_symbol_errors; - /* receiver fifo overrun */ - /* drops_no_pbuf is no per i/f, it's per BE card */ - dev_stats->rx_fifo_errors = port_stats->rx_fifo_overflow + - port_stats->rx_input_fifo_overflow + - rxf_stats->rx_drops_no_pbuf; - /* receiver missed packetd */ - dev_stats->rx_missed_errors = 0; - /* detailed tx_errors */ - dev_stats->tx_aborted_errors = 0; - dev_stats->tx_carrier_errors = 0; - dev_stats->tx_fifo_errors = 0; - dev_stats->tx_heartbeat_errors = 0; - dev_stats->tx_window_errors = 0; -} - -static void be_link_status_update(struct be_adapter *adapter) -{ - struct be_link_info *prev = &adapter->link; - struct be_link_info now = { 0 }; - struct net_device *netdev = adapter->netdev; - - be_cmd_link_status_query(&adapter->ctrl, &now); - - /* If link came up or went down */ - if (now.speed != prev->speed && (now.speed == PHY_LINK_SPEED_ZERO || - prev->speed == PHY_LINK_SPEED_ZERO)) { - if (now.speed == PHY_LINK_SPEED_ZERO) { - netif_stop_queue(netdev); - netif_carrier_off(netdev); - printk(KERN_INFO "%s: Link down\n", netdev->name); - } else { - netif_start_queue(netdev); - netif_carrier_on(netdev); - printk(KERN_INFO "%s: Link up\n", netdev->name); - } - } - *prev = now; -} - -/* Update the EQ delay n BE based on the RX frags consumed / sec */ -static void be_rx_eqd_update(struct be_adapter *adapter) -{ - u32 eqd; - struct be_ctrl_info *ctrl = &adapter->ctrl; - struct be_eq_obj *rx_eq = &adapter->rx_eq; - struct be_drvr_stats *stats = &adapter->stats.drvr_stats; - - /* Update once a second */ - if (((jiffies - stats->rx_fps_jiffies) < HZ) || rx_eq->enable_aic == 0) - return; - - stats->be_rx_fps = (stats->be_rx_frags - stats->be_prev_rx_frags) / - ((jiffies - stats->rx_fps_jiffies) / HZ); - - stats->rx_fps_jiffies = jiffies; - stats->be_prev_rx_frags = stats->be_rx_frags; - eqd = stats->be_rx_fps / 110000; - eqd = eqd << 3; - if (eqd > rx_eq->max_eqd) - eqd = rx_eq->max_eqd; - if (eqd < rx_eq->min_eqd) - eqd = rx_eq->min_eqd; - if (eqd < 10) - eqd = 0; - if (eqd != rx_eq->cur_eqd) - be_cmd_modify_eqd(ctrl, rx_eq->q.id, eqd); - - rx_eq->cur_eqd = eqd; -} - -static struct net_device_stats *be_get_stats(struct net_device *dev) -{ - struct be_adapter *adapter = netdev_priv(dev); - - return &adapter->stats.net_stats; -} - -static void be_tx_stats_update(struct be_adapter *adapter, - u32 wrb_cnt, u32 copied, bool stopped) -{ - struct be_drvr_stats *stats = &adapter->stats.drvr_stats; - stats->be_tx_reqs++; - stats->be_tx_wrbs += wrb_cnt; - stats->be_tx_bytes += copied; - if (stopped) - stats->be_tx_stops++; - - /* Update tx rate once in two seconds */ - if ((jiffies - stats->be_tx_jiffies) > 2 * HZ) { - u32 r; - r = (stats->be_tx_bytes - stats->be_tx_bytes_prev) / - ((u32) (jiffies - stats->be_tx_jiffies) / HZ); - r = (r / 1000000); /* M bytes/s */ - stats->be_tx_rate = (r * 8); /* M bits/s */ - stats->be_tx_jiffies = jiffies; - stats->be_tx_bytes_prev = stats->be_tx_bytes; - } -} - -/* Determine number of WRB entries needed to xmit data in an skb */ -static u32 wrb_cnt_for_skb(struct sk_buff *skb, bool *dummy) -{ - int cnt = 0; - while (skb) { - if (skb->len > skb->data_len) - cnt++; - cnt += skb_shinfo(skb)->nr_frags; - skb = skb_shinfo(skb)->frag_list; - } - /* to account for hdr wrb */ - cnt++; - if (cnt & 1) { - /* add a dummy to make it an even num */ - cnt++; - *dummy = true; - } else - *dummy = false; - BUG_ON(cnt > BE_MAX_TX_FRAG_COUNT); - return cnt; -} - -static inline void wrb_fill(struct be_eth_wrb *wrb, u64 addr, int len) -{ - wrb->frag_pa_hi = upper_32_bits(addr); - wrb->frag_pa_lo = addr & 0xFFFFFFFF; - wrb->frag_len = len & ETH_WRB_FRAG_LEN_MASK; -} - -static void wrb_fill_hdr(struct be_eth_hdr_wrb *hdr, struct sk_buff *skb, - bool vlan, u32 wrb_cnt, u32 len) -{ - memset(hdr, 0, sizeof(*hdr)); - - AMAP_SET_BITS(struct amap_eth_hdr_wrb, crc, hdr, 1); - - if (skb_shinfo(skb)->gso_segs > 1 && skb_shinfo(skb)->gso_size) { - AMAP_SET_BITS(struct amap_eth_hdr_wrb, lso, hdr, 1); - AMAP_SET_BITS(struct amap_eth_hdr_wrb, lso_mss, - hdr, skb_shinfo(skb)->gso_size); - } else if (skb->ip_summed == CHECKSUM_PARTIAL) { - if (is_tcp_pkt(skb)) - AMAP_SET_BITS(struct amap_eth_hdr_wrb, tcpcs, hdr, 1); - else if (is_udp_pkt(skb)) - AMAP_SET_BITS(struct amap_eth_hdr_wrb, udpcs, hdr, 1); - } - - if (vlan && vlan_tx_tag_present(skb)) { - AMAP_SET_BITS(struct amap_eth_hdr_wrb, vlan, hdr, 1); - AMAP_SET_BITS(struct amap_eth_hdr_wrb, vlan_tag, - hdr, vlan_tx_tag_get(skb)); - } - - AMAP_SET_BITS(struct amap_eth_hdr_wrb, event, hdr, 1); - AMAP_SET_BITS(struct amap_eth_hdr_wrb, complete, hdr, 1); - AMAP_SET_BITS(struct amap_eth_hdr_wrb, num_wrb, hdr, wrb_cnt); - AMAP_SET_BITS(struct amap_eth_hdr_wrb, len, hdr, len); -} - - -static int make_tx_wrbs(struct be_adapter *adapter, - struct sk_buff *skb, u32 wrb_cnt, bool dummy_wrb) -{ - u64 busaddr; - u32 i, copied = 0; - struct pci_dev *pdev = adapter->pdev; - struct sk_buff *first_skb = skb; - struct be_queue_info *txq = &adapter->tx_obj.q; - struct be_eth_wrb *wrb; - struct be_eth_hdr_wrb *hdr; - - atomic_add(wrb_cnt, &txq->used); - hdr = queue_head_node(txq); - queue_head_inc(txq); - - while (skb) { - if (skb->len > skb->data_len) { - int len = skb->len - skb->data_len; - busaddr = pci_map_single(pdev, skb->data, len, - PCI_DMA_TODEVICE); - wrb = queue_head_node(txq); - wrb_fill(wrb, busaddr, len); - be_dws_cpu_to_le(wrb, sizeof(*wrb)); - queue_head_inc(txq); - copied += len; - } - - for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { - struct skb_frag_struct *frag = - &skb_shinfo(skb)->frags[i]; - busaddr = pci_map_page(pdev, frag->page, - frag->page_offset, - frag->size, PCI_DMA_TODEVICE); - wrb = queue_head_node(txq); - wrb_fill(wrb, busaddr, frag->size); - be_dws_cpu_to_le(wrb, sizeof(*wrb)); - queue_head_inc(txq); - copied += frag->size; - } - skb = skb_shinfo(skb)->frag_list; - } - - if (dummy_wrb) { - wrb = queue_head_node(txq); - wrb_fill(wrb, 0, 0); - be_dws_cpu_to_le(wrb, sizeof(*wrb)); - queue_head_inc(txq); - } - - wrb_fill_hdr(hdr, first_skb, adapter->vlan_grp ? true : false, - wrb_cnt, copied); - be_dws_cpu_to_le(hdr, sizeof(*hdr)); - - return copied; -} - -static int be_xmit(struct sk_buff *skb, struct net_device *netdev) -{ - struct be_adapter *adapter = netdev_priv(netdev); - struct be_tx_obj *tx_obj = &adapter->tx_obj; - struct be_queue_info *txq = &tx_obj->q; - u32 wrb_cnt = 0, copied = 0; - u32 start = txq->head; - bool dummy_wrb, stopped = false; - - wrb_cnt = wrb_cnt_for_skb(skb, &dummy_wrb); - - copied = make_tx_wrbs(adapter, skb, wrb_cnt, dummy_wrb); - - /* record the sent skb in the sent_skb table */ - BUG_ON(tx_obj->sent_skb_list[start]); - tx_obj->sent_skb_list[start] = skb; - - /* Ensure that txq has space for the next skb; Else stop the queue - * *BEFORE* ringing the tx doorbell, so that we serialze the - * tx compls of the current transmit which'll wake up the queue - */ - if ((BE_MAX_TX_FRAG_COUNT + atomic_read(&txq->used)) >= txq->len) { - netif_stop_queue(netdev); - stopped = true; - } - - be_txq_notify(&adapter->ctrl, txq->id, wrb_cnt); - - netdev->trans_start = jiffies; - - be_tx_stats_update(adapter, wrb_cnt, copied, stopped); - return NETDEV_TX_OK; -} - -static int be_change_mtu(struct net_device *netdev, int new_mtu) -{ - struct be_adapter *adapter = netdev_priv(netdev); - if (new_mtu < BE_MIN_MTU || - new_mtu > BE_MAX_JUMBO_FRAME_SIZE) { - dev_info(&adapter->pdev->dev, - "MTU must be between %d and %d bytes\n", - BE_MIN_MTU, BE_MAX_JUMBO_FRAME_SIZE); - return -EINVAL; - } - dev_info(&adapter->pdev->dev, "MTU changed from %d to %d bytes\n", - netdev->mtu, new_mtu); - netdev->mtu = new_mtu; - return 0; -} - -/* - * if there are BE_NUM_VLANS_SUPPORTED or lesser number of VLANS configured, - * program them in BE. If more than BE_NUM_VLANS_SUPPORTED are configured, - * set the BE in promiscuous VLAN mode. - */ -static void be_vid_config(struct net_device *netdev) -{ - struct be_adapter *adapter = netdev_priv(netdev); - u16 vtag[BE_NUM_VLANS_SUPPORTED]; - u16 ntags = 0, i; - - if (adapter->num_vlans <= BE_NUM_VLANS_SUPPORTED) { - /* Construct VLAN Table to give to HW */ - for (i = 0; i < VLAN_GROUP_ARRAY_LEN; i++) { - if (adapter->vlan_tag[i]) { - vtag[ntags] = cpu_to_le16(i); - ntags++; - } - } - be_cmd_vlan_config(&adapter->ctrl, adapter->if_handle, - vtag, ntags, 1, 0); - } else { - be_cmd_vlan_config(&adapter->ctrl, adapter->if_handle, - NULL, 0, 1, 1); - } -} - -static void be_vlan_register(struct net_device *netdev, struct vlan_group *grp) -{ - struct be_adapter *adapter = netdev_priv(netdev); - struct be_eq_obj *rx_eq = &adapter->rx_eq; - struct be_eq_obj *tx_eq = &adapter->tx_eq; - struct be_ctrl_info *ctrl = &adapter->ctrl; - - be_eq_notify(ctrl, rx_eq->q.id, false, false, 0); - be_eq_notify(ctrl, tx_eq->q.id, false, false, 0); - adapter->vlan_grp = grp; - be_eq_notify(ctrl, rx_eq->q.id, true, false, 0); - be_eq_notify(ctrl, tx_eq->q.id, true, false, 0); -} - -static void be_vlan_add_vid(struct net_device *netdev, u16 vid) -{ - struct be_adapter *adapter = netdev_priv(netdev); - - adapter->num_vlans++; - adapter->vlan_tag[vid] = 1; - - be_vid_config(netdev); -} - -static void be_vlan_rem_vid(struct net_device *netdev, u16 vid) -{ - struct be_adapter *adapter = netdev_priv(netdev); - - adapter->num_vlans--; - adapter->vlan_tag[vid] = 0; - - vlan_group_set_device(adapter->vlan_grp, vid, NULL); - be_vid_config(netdev); -} - -static void be_set_multicast_filter(struct net_device *netdev) -{ - struct be_adapter *adapter = netdev_priv(netdev); - struct dev_mc_list *mc_ptr; - u8 mac_addr[32][ETH_ALEN]; - int i = 0; - - if (netdev->flags & IFF_ALLMULTI) { - /* set BE in Multicast promiscuous */ - be_cmd_mcast_mac_set(&adapter->ctrl, - adapter->if_handle, NULL, 0, true); - return; - } - - for (mc_ptr = netdev->mc_list; mc_ptr; mc_ptr = mc_ptr->next) { - memcpy(&mac_addr[i][0], mc_ptr->dmi_addr, ETH_ALEN); - if (++i >= 32) { - be_cmd_mcast_mac_set(&adapter->ctrl, - adapter->if_handle, &mac_addr[0][0], i, false); - i = 0; - } - - } - - if (i) { - /* reset the promiscuous mode also. */ - be_cmd_mcast_mac_set(&adapter->ctrl, - adapter->if_handle, &mac_addr[0][0], i, false); - } -} - -static void be_set_multicast_list(struct net_device *netdev) -{ - struct be_adapter *adapter = netdev_priv(netdev); - - if (netdev->flags & IFF_PROMISC) { - be_cmd_promiscuous_config(&adapter->ctrl, adapter->port_num, 1); - } else { - be_cmd_promiscuous_config(&adapter->ctrl, adapter->port_num, 0); - be_set_multicast_filter(netdev); - } -} - -static void be_rx_rate_update(struct be_adapter *adapter, u32 pktsize, - u16 numfrags) -{ - struct be_drvr_stats *stats = &adapter->stats.drvr_stats; - u32 rate; - - stats->be_rx_compl++; - stats->be_rx_frags += numfrags; - stats->be_rx_bytes += pktsize; - - /* Update the rate once in two seconds */ - if ((jiffies - stats->be_rx_jiffies) < 2 * HZ) - return; - - rate = (stats->be_rx_bytes - stats->be_rx_bytes_prev) / - ((u32) (jiffies - stats->be_rx_jiffies) / HZ); - rate = (rate / 1000000); /* MB/Sec */ - stats->be_rx_rate = (rate * 8); /* Mega Bits/Sec */ - stats->be_rx_jiffies = jiffies; - stats->be_rx_bytes_prev = stats->be_rx_bytes; -} - -static struct be_rx_page_info * -get_rx_page_info(struct be_adapter *adapter, u16 frag_idx) -{ - struct be_rx_page_info *rx_page_info; - struct be_queue_info *rxq = &adapter->rx_obj.q; - - rx_page_info = &adapter->rx_obj.page_info_tbl[frag_idx]; - BUG_ON(!rx_page_info->page); - - if (rx_page_info->last_page_user) - pci_unmap_page(adapter->pdev, pci_unmap_addr(rx_page_info, bus), - adapter->big_page_size, PCI_DMA_FROMDEVICE); - - atomic_dec(&rxq->used); - return rx_page_info; -} - -/* Throwaway the data in the Rx completion */ -static void be_rx_compl_discard(struct be_adapter *adapter, - struct be_eth_rx_compl *rxcp) -{ - struct be_queue_info *rxq = &adapter->rx_obj.q; - struct be_rx_page_info *page_info; - u16 rxq_idx, i, num_rcvd; - - rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp); - num_rcvd = AMAP_GET_BITS(struct amap_eth_rx_compl, numfrags, rxcp); - - for (i = 0; i < num_rcvd; i++) { - page_info = get_rx_page_info(adapter, rxq_idx); - put_page(page_info->page); - memset(page_info, 0, sizeof(*page_info)); - index_inc(&rxq_idx, rxq->len); - } -} - -/* - * skb_fill_rx_data forms a complete skb for an ether frame - * indicated by rxcp. - */ -static void skb_fill_rx_data(struct be_adapter *adapter, - struct sk_buff *skb, struct be_eth_rx_compl *rxcp) -{ - struct be_queue_info *rxq = &adapter->rx_obj.q; - struct be_rx_page_info *page_info; - u16 rxq_idx, i, num_rcvd; - u32 pktsize, hdr_len, curr_frag_len; - u8 *start; - - rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp); - pktsize = AMAP_GET_BITS(struct amap_eth_rx_compl, pktsize, rxcp); - num_rcvd = AMAP_GET_BITS(struct amap_eth_rx_compl, numfrags, rxcp); - - page_info = get_rx_page_info(adapter, rxq_idx); - - start = page_address(page_info->page) + page_info->page_offset; - prefetch(start); - - /* Copy data in the first descriptor of this completion */ - curr_frag_len = min(pktsize, rx_frag_size); - - /* Copy the header portion into skb_data */ - hdr_len = min((u32)BE_HDR_LEN, curr_frag_len); - memcpy(skb->data, start, hdr_len); - skb->len = curr_frag_len; - if (curr_frag_len <= BE_HDR_LEN) { /* tiny packet */ - /* Complete packet has now been moved to data */ - put_page(page_info->page); - skb->data_len = 0; - skb->tail += curr_frag_len; - } else { - skb_shinfo(skb)->nr_frags = 1; - skb_shinfo(skb)->frags[0].page = page_info->page; - skb_shinfo(skb)->frags[0].page_offset = - page_info->page_offset + hdr_len; - skb_shinfo(skb)->frags[0].size = curr_frag_len - hdr_len; - skb->data_len = curr_frag_len - hdr_len; - skb->tail += hdr_len; - } - memset(page_info, 0, sizeof(*page_info)); - - if (pktsize <= rx_frag_size) { - BUG_ON(num_rcvd != 1); - return; - } - - /* More frags present for this completion */ - pktsize -= curr_frag_len; /* account for above copied frag */ - for (i = 1; i < num_rcvd; i++) { - index_inc(&rxq_idx, rxq->len); - page_info = get_rx_page_info(adapter, rxq_idx); - - curr_frag_len = min(pktsize, rx_frag_size); - - skb_shinfo(skb)->frags[i].page = page_info->page; - skb_shinfo(skb)->frags[i].page_offset = page_info->page_offset; - skb_shinfo(skb)->frags[i].size = curr_frag_len; - skb->len += curr_frag_len; - skb->data_len += curr_frag_len; - skb_shinfo(skb)->nr_frags++; - pktsize -= curr_frag_len; - - memset(page_info, 0, sizeof(*page_info)); - } - - be_rx_rate_update(adapter, pktsize, num_rcvd); - return; -} - -/* Process the RX completion indicated by rxcp when LRO is disabled */ -static void be_rx_compl_process(struct be_adapter *adapter, - struct be_eth_rx_compl *rxcp) -{ - struct sk_buff *skb; - u32 vtp, vid; - int l4_cksm; - - l4_cksm = AMAP_GET_BITS(struct amap_eth_rx_compl, l4_cksm, rxcp); - vtp = AMAP_GET_BITS(struct amap_eth_rx_compl, vtp, rxcp); - - skb = netdev_alloc_skb(adapter->netdev, BE_HDR_LEN + NET_IP_ALIGN); - if (!skb) { - if (net_ratelimit()) - dev_warn(&adapter->pdev->dev, "skb alloc failed\n"); - be_rx_compl_discard(adapter, rxcp); - return; - } - - skb_reserve(skb, NET_IP_ALIGN); - - skb_fill_rx_data(adapter, skb, rxcp); - - if (l4_cksm && adapter->rx_csum) - skb->ip_summed = CHECKSUM_UNNECESSARY; - else - skb->ip_summed = CHECKSUM_NONE; - - skb->truesize = skb->len + sizeof(struct sk_buff); - skb->protocol = eth_type_trans(skb, adapter->netdev); - skb->dev = adapter->netdev; - - if (vtp) { - if (!adapter->vlan_grp || adapter->num_vlans == 0) { - kfree_skb(skb); - return; - } - vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); - vid = be16_to_cpu(vid); - vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid); - } else { - netif_receive_skb(skb); - } - - adapter->netdev->last_rx = jiffies; - - return; -} - -/* Process the RX completion indicated by rxcp when LRO is enabled */ -static void be_rx_compl_process_lro(struct be_adapter *adapter, - struct be_eth_rx_compl *rxcp) -{ - struct be_rx_page_info *page_info; - struct skb_frag_struct rx_frags[BE_MAX_FRAGS_PER_FRAME]; - struct be_queue_info *rxq = &adapter->rx_obj.q; - u32 num_rcvd, pkt_size, remaining, vlanf, curr_frag_len; - u16 i, rxq_idx = 0, vid; - - num_rcvd = AMAP_GET_BITS(struct amap_eth_rx_compl, numfrags, rxcp); - pkt_size = AMAP_GET_BITS(struct amap_eth_rx_compl, pktsize, rxcp); - vlanf = AMAP_GET_BITS(struct amap_eth_rx_compl, vtp, rxcp); - rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp); - - remaining = pkt_size; - for (i = 0; i < num_rcvd; i++) { - page_info = get_rx_page_info(adapter, rxq_idx); - - curr_frag_len = min(remaining, rx_frag_size); - - rx_frags[i].page = page_info->page; - rx_frags[i].page_offset = page_info->page_offset; - rx_frags[i].size = curr_frag_len; - remaining -= curr_frag_len; - - index_inc(&rxq_idx, rxq->len); - - memset(page_info, 0, sizeof(*page_info)); - } - - if (likely(!vlanf)) { - lro_receive_frags(&adapter->rx_obj.lro_mgr, rx_frags, pkt_size, - pkt_size, NULL, 0); - } else { - vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); - vid = be16_to_cpu(vid); - - if (!adapter->vlan_grp || adapter->num_vlans == 0) - return; - - lro_vlan_hwaccel_receive_frags(&adapter->rx_obj.lro_mgr, - rx_frags, pkt_size, pkt_size, adapter->vlan_grp, - vid, NULL, 0); - } - - be_rx_rate_update(adapter, pkt_size, num_rcvd); - return; -} - -static struct be_eth_rx_compl *be_rx_compl_get(struct be_adapter *adapter) -{ - struct be_eth_rx_compl *rxcp = queue_tail_node(&adapter->rx_obj.cq); - - if (rxcp->dw[offsetof(struct amap_eth_rx_compl, valid) / 32] == 0) - return NULL; - - be_dws_le_to_cpu(rxcp, sizeof(*rxcp)); - - rxcp->dw[offsetof(struct amap_eth_rx_compl, valid) / 32] = 0; - - queue_tail_inc(&adapter->rx_obj.cq); - return rxcp; -} - -static inline struct page *be_alloc_pages(u32 size) -{ - gfp_t alloc_flags = GFP_ATOMIC; - u32 order = get_order(size); - if (order > 0) - alloc_flags |= __GFP_COMP; - return alloc_pages(alloc_flags, order); -} - -/* - * Allocate a page, split it to fragments of size rx_frag_size and post as - * receive buffers to BE - */ -static void be_post_rx_frags(struct be_adapter *adapter) -{ - struct be_rx_page_info *page_info_tbl = adapter->rx_obj.page_info_tbl; - struct be_rx_page_info *page_info = NULL; - struct be_queue_info *rxq = &adapter->rx_obj.q; - struct page *pagep = NULL; - struct be_eth_rx_d *rxd; - u64 page_dmaaddr = 0, frag_dmaaddr; - u32 posted, page_offset = 0; - - - page_info = &page_info_tbl[rxq->head]; - for (posted = 0; posted < MAX_RX_POST && !page_info->page; posted++) { - if (!pagep) { - pagep = be_alloc_pages(adapter->big_page_size); - if (unlikely(!pagep)) { - drvr_stats(adapter)->be_ethrx_post_fail++; - break; - } - page_dmaaddr = pci_map_page(adapter->pdev, pagep, 0, - adapter->big_page_size, - PCI_DMA_FROMDEVICE); - page_info->page_offset = 0; - } else { - get_page(pagep); - page_info->page_offset = page_offset + rx_frag_size; - } - page_offset = page_info->page_offset; - page_info->page = pagep; - pci_unmap_addr_set(page_info, bus, page_dmaaddr); - frag_dmaaddr = page_dmaaddr + page_info->page_offset; - - rxd = queue_head_node(rxq); - rxd->fragpa_lo = cpu_to_le32(frag_dmaaddr & 0xFFFFFFFF); - rxd->fragpa_hi = cpu_to_le32(upper_32_bits(frag_dmaaddr)); - queue_head_inc(rxq); - - /* Any space left in the current big page for another frag? */ - if ((page_offset + rx_frag_size + rx_frag_size) > - adapter->big_page_size) { - pagep = NULL; - page_info->last_page_user = true; - } - page_info = &page_info_tbl[rxq->head]; - } - if (pagep) - page_info->last_page_user = true; - - if (posted) { - atomic_add(posted, &rxq->used); - be_rxq_notify(&adapter->ctrl, rxq->id, posted); - } else if (atomic_read(&rxq->used) == 0) { - /* Let be_worker replenish when memory is available */ - adapter->rx_post_starved = true; - } - - return; -} - -static struct be_eth_tx_compl * -be_tx_compl_get(struct be_adapter *adapter) -{ - struct be_queue_info *tx_cq = &adapter->tx_obj.cq; - struct be_eth_tx_compl *txcp = queue_tail_node(tx_cq); - - if (txcp->dw[offsetof(struct amap_eth_tx_compl, valid) / 32] == 0) - return NULL; - - be_dws_le_to_cpu(txcp, sizeof(*txcp)); - - txcp->dw[offsetof(struct amap_eth_tx_compl, valid) / 32] = 0; - - queue_tail_inc(tx_cq); - return txcp; -} - -static void be_tx_compl_process(struct be_adapter *adapter, u16 last_index) -{ - struct be_queue_info *txq = &adapter->tx_obj.q; - struct be_eth_wrb *wrb; - struct sk_buff **sent_skbs = adapter->tx_obj.sent_skb_list; - struct sk_buff *sent_skb; - u64 busaddr; - u16 cur_index, num_wrbs = 0; - - cur_index = txq->tail; - sent_skb = sent_skbs[cur_index]; - BUG_ON(!sent_skb); - sent_skbs[cur_index] = NULL; - - do { - cur_index = txq->tail; - wrb = queue_tail_node(txq); - be_dws_le_to_cpu(wrb, sizeof(*wrb)); - busaddr = ((u64)wrb->frag_pa_hi << 32) | (u64)wrb->frag_pa_lo; - if (busaddr != 0) { - pci_unmap_single(adapter->pdev, busaddr, - wrb->frag_len, PCI_DMA_TODEVICE); - } - num_wrbs++; - queue_tail_inc(txq); - } while (cur_index != last_index); - - atomic_sub(num_wrbs, &txq->used); - - kfree_skb(sent_skb); -} - -static void be_rx_q_clean(struct be_adapter *adapter) -{ - struct be_rx_page_info *page_info; - struct be_queue_info *rxq = &adapter->rx_obj.q; - struct be_queue_info *rx_cq = &adapter->rx_obj.cq; - struct be_eth_rx_compl *rxcp; - u16 tail; - - /* First cleanup pending rx completions */ - while ((rxcp = be_rx_compl_get(adapter)) != NULL) { - be_rx_compl_discard(adapter, rxcp); - be_cq_notify(&adapter->ctrl, rx_cq->id, true, 1); - } - - /* Then free posted rx buffer that were not used */ - tail = (rxq->head + rxq->len - atomic_read(&rxq->used)) % rxq->len; - for (; tail != rxq->head; index_inc(&tail, rxq->len)) { - page_info = get_rx_page_info(adapter, tail); - put_page(page_info->page); - memset(page_info, 0, sizeof(*page_info)); - } - BUG_ON(atomic_read(&rxq->used)); -} - -static void be_tx_q_clean(struct be_adapter *adapter) -{ - struct sk_buff **sent_skbs = adapter->tx_obj.sent_skb_list; - struct sk_buff *sent_skb; - struct be_queue_info *txq = &adapter->tx_obj.q; - u16 last_index; - bool dummy_wrb; - - while (atomic_read(&txq->used)) { - sent_skb = sent_skbs[txq->tail]; - last_index = txq->tail; - index_adv(&last_index, - wrb_cnt_for_skb(sent_skb, &dummy_wrb) - 1, txq->len); - be_tx_compl_process(adapter, last_index); - } -} - -static void be_tx_queues_destroy(struct be_adapter *adapter) -{ - struct be_queue_info *q; - - q = &adapter->tx_obj.q; - if (q->created) - be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_TXQ); - be_queue_free(adapter, q); - - q = &adapter->tx_obj.cq; - if (q->created) - be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_CQ); - be_queue_free(adapter, q); - - /* No more tx completions can be rcvd now; clean up if there are - * any pending completions or pending tx requests */ - be_tx_q_clean(adapter); - - q = &adapter->tx_eq.q; - if (q->created) - be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_EQ); - be_queue_free(adapter, q); -} - -static int be_tx_queues_create(struct be_adapter *adapter) -{ - struct be_queue_info *eq, *q, *cq; - - adapter->tx_eq.max_eqd = 0; - adapter->tx_eq.min_eqd = 0; - adapter->tx_eq.cur_eqd = 96; - adapter->tx_eq.enable_aic = false; - /* Alloc Tx Event queue */ - eq = &adapter->tx_eq.q; - if (be_queue_alloc(adapter, eq, EVNT_Q_LEN, sizeof(struct be_eq_entry))) - return -1; - - /* Ask BE to create Tx Event queue */ - if (be_cmd_eq_create(&adapter->ctrl, eq, adapter->tx_eq.cur_eqd)) - goto tx_eq_free; - /* Alloc TX eth compl queue */ - cq = &adapter->tx_obj.cq; - if (be_queue_alloc(adapter, cq, TX_CQ_LEN, - sizeof(struct be_eth_tx_compl))) - goto tx_eq_destroy; - - /* Ask BE to create Tx eth compl queue */ - if (be_cmd_cq_create(&adapter->ctrl, cq, eq, false, false, 3)) - goto tx_cq_free; - - /* Alloc TX eth queue */ - q = &adapter->tx_obj.q; - if (be_queue_alloc(adapter, q, TX_Q_LEN, sizeof(struct be_eth_wrb))) - goto tx_cq_destroy; - - /* Ask BE to create Tx eth queue */ - if (be_cmd_txq_create(&adapter->ctrl, q, cq)) - goto tx_q_free; - return 0; - -tx_q_free: - be_queue_free(adapter, q); -tx_cq_destroy: - be_cmd_q_destroy(&adapter->ctrl, cq, QTYPE_CQ); -tx_cq_free: - be_queue_free(adapter, cq); -tx_eq_destroy: - be_cmd_q_destroy(&adapter->ctrl, eq, QTYPE_EQ); -tx_eq_free: - be_queue_free(adapter, eq); - return -1; -} - -static void be_rx_queues_destroy(struct be_adapter *adapter) -{ - struct be_queue_info *q; - - q = &adapter->rx_obj.q; - if (q->created) { - be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_RXQ); - be_rx_q_clean(adapter); - } - be_queue_free(adapter, q); - - q = &adapter->rx_obj.cq; - if (q->created) - be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_CQ); - be_queue_free(adapter, q); - - q = &adapter->rx_eq.q; - if (q->created) - be_cmd_q_destroy(&adapter->ctrl, q, QTYPE_EQ); - be_queue_free(adapter, q); -} - -static int be_rx_queues_create(struct be_adapter *adapter) -{ - struct be_queue_info *eq, *q, *cq; - int rc; - - adapter->max_rx_coal = BE_MAX_FRAGS_PER_FRAME; - adapter->big_page_size = (1 << get_order(rx_frag_size)) * PAGE_SIZE; - adapter->rx_eq.max_eqd = BE_MAX_EQD; - adapter->rx_eq.min_eqd = 0; - adapter->rx_eq.cur_eqd = 0; - adapter->rx_eq.enable_aic = true; - - /* Alloc Rx Event queue */ - eq = &adapter->rx_eq.q; - rc = be_queue_alloc(adapter, eq, EVNT_Q_LEN, - sizeof(struct be_eq_entry)); - if (rc) - return rc; - - /* Ask BE to create Rx Event queue */ - rc = be_cmd_eq_create(&adapter->ctrl, eq, adapter->rx_eq.cur_eqd); - if (rc) - goto rx_eq_free; - - /* Alloc RX eth compl queue */ - cq = &adapter->rx_obj.cq; - rc = be_queue_alloc(adapter, cq, RX_CQ_LEN, - sizeof(struct be_eth_rx_compl)); - if (rc) - goto rx_eq_destroy; - - /* Ask BE to create Rx eth compl queue */ - rc = be_cmd_cq_create(&adapter->ctrl, cq, eq, false, false, 3); - if (rc) - goto rx_cq_free; - - /* Alloc RX eth queue */ - q = &adapter->rx_obj.q; - rc = be_queue_alloc(adapter, q, RX_Q_LEN, sizeof(struct be_eth_rx_d)); - if (rc) - goto rx_cq_destroy; - - /* Ask BE to create Rx eth queue */ - rc = be_cmd_rxq_create(&adapter->ctrl, q, cq->id, rx_frag_size, - BE_MAX_JUMBO_FRAME_SIZE, adapter->if_handle, false); - if (rc) - goto rx_q_free; - - return 0; -rx_q_free: - be_queue_free(adapter, q); -rx_cq_destroy: - be_cmd_q_destroy(&adapter->ctrl, cq, QTYPE_CQ); -rx_cq_free: - be_queue_free(adapter, cq); -rx_eq_destroy: - be_cmd_q_destroy(&adapter->ctrl, eq, QTYPE_EQ); -rx_eq_free: - be_queue_free(adapter, eq); - return rc; -} -static bool event_get(struct be_eq_obj *eq_obj, u16 *rid) -{ - struct be_eq_entry *entry = queue_tail_node(&eq_obj->q); - u32 evt = entry->evt; - - if (!evt) - return false; - - evt = le32_to_cpu(evt); - *rid = (evt >> EQ_ENTRY_RES_ID_SHIFT) & EQ_ENTRY_RES_ID_MASK; - entry->evt = 0; - queue_tail_inc(&eq_obj->q); - return true; -} - -static int event_handle(struct be_ctrl_info *ctrl, - struct be_eq_obj *eq_obj) -{ - u16 rid = 0, num = 0; - - while (event_get(eq_obj, &rid)) - num++; - - /* We can see an interrupt and no event */ - be_eq_notify(ctrl, eq_obj->q.id, true, true, num); - if (num) - napi_schedule(&eq_obj->napi); - - return num; -} - -static irqreturn_t be_intx(int irq, void *dev) -{ - struct be_adapter *adapter = dev; - struct be_ctrl_info *ctrl = &adapter->ctrl; - int rx, tx; - - tx = event_handle(ctrl, &adapter->tx_eq); - rx = event_handle(ctrl, &adapter->rx_eq); - - if (rx || tx) - return IRQ_HANDLED; - else - return IRQ_NONE; -} - -static irqreturn_t be_msix_rx(int irq, void *dev) -{ - struct be_adapter *adapter = dev; - - event_handle(&adapter->ctrl, &adapter->rx_eq); - - return IRQ_HANDLED; -} - -static irqreturn_t be_msix_tx(int irq, void *dev) -{ - struct be_adapter *adapter = dev; - - event_handle(&adapter->ctrl, &adapter->tx_eq); - - return IRQ_HANDLED; -} - -static inline bool do_lro(struct be_adapter *adapter, - struct be_eth_rx_compl *rxcp) -{ - int err = AMAP_GET_BITS(struct amap_eth_rx_compl, err, rxcp); - int tcp_frame = AMAP_GET_BITS(struct amap_eth_rx_compl, tcpf, rxcp); - - if (err) - drvr_stats(adapter)->be_rxcp_err++; - - return (!tcp_frame || err || (adapter->max_rx_coal <= 1)) ? - false : true; -} - -int be_poll_rx(struct napi_struct *napi, int budget) -{ - struct be_eq_obj *rx_eq = container_of(napi, struct be_eq_obj, napi); - struct be_adapter *adapter = - container_of(rx_eq, struct be_adapter, rx_eq); - struct be_queue_info *rx_cq = &adapter->rx_obj.cq; - struct be_eth_rx_compl *rxcp; - u32 work_done; - - for (work_done = 0; work_done < budget; work_done++) { - rxcp = be_rx_compl_get(adapter); - if (!rxcp) - break; - - if (do_lro(adapter, rxcp)) - be_rx_compl_process_lro(adapter, rxcp); - else - be_rx_compl_process(adapter, rxcp); - } - - lro_flush_all(&adapter->rx_obj.lro_mgr); - - /* Refill the queue */ - if (atomic_read(&adapter->rx_obj.q.used) < RX_FRAGS_REFILL_WM) - be_post_rx_frags(adapter); - - /* All consumed */ - if (work_done < budget) { - napi_complete(napi); - be_cq_notify(&adapter->ctrl, rx_cq->id, true, work_done); - } else { - /* More to be consumed; continue with interrupts disabled */ - be_cq_notify(&adapter->ctrl, rx_cq->id, false, work_done); - } - return work_done; -} - -/* For TX we don't honour budget; consume everything */ -int be_poll_tx(struct napi_struct *napi, int budget) -{ - struct be_eq_obj *tx_eq = container_of(napi, struct be_eq_obj, napi); - struct be_adapter *adapter = - container_of(tx_eq, struct be_adapter, tx_eq); - struct be_tx_obj *tx_obj = &adapter->tx_obj; - struct be_queue_info *tx_cq = &tx_obj->cq; - struct be_queue_info *txq = &tx_obj->q; - struct be_eth_tx_compl *txcp; - u32 num_cmpl = 0; - u16 end_idx; - - while ((txcp = be_tx_compl_get(adapter))) { - end_idx = AMAP_GET_BITS(struct amap_eth_tx_compl, - wrb_index, txcp); - be_tx_compl_process(adapter, end_idx); - num_cmpl++; - } - - /* As Tx wrbs have been freed up, wake up netdev queue if - * it was stopped due to lack of tx wrbs. - */ - if (netif_queue_stopped(adapter->netdev) && - atomic_read(&txq->used) < txq->len / 2) { - netif_wake_queue(adapter->netdev); - } - - napi_complete(napi); - - be_cq_notify(&adapter->ctrl, tx_cq->id, true, num_cmpl); - - drvr_stats(adapter)->be_tx_events++; - drvr_stats(adapter)->be_tx_compl += num_cmpl; - - return 1; -} - -static void be_worker(struct work_struct *work) -{ - struct be_adapter *adapter = - container_of(work, struct be_adapter, work.work); - int status; - - /* Check link */ - be_link_status_update(adapter); - - /* Get Stats */ - status = be_cmd_get_stats(&adapter->ctrl, &adapter->stats.cmd); - if (!status) - netdev_stats_update(adapter); - - /* Set EQ delay */ - be_rx_eqd_update(adapter); - - if (adapter->rx_post_starved) { - adapter->rx_post_starved = false; - be_post_rx_frags(adapter); - } - - schedule_delayed_work(&adapter->work, msecs_to_jiffies(1000)); -} - -static void be_msix_enable(struct be_adapter *adapter) -{ - int i, status; - - for (i = 0; i < BE_NUM_MSIX_VECTORS; i++) - adapter->msix_entries[i].entry = i; - - status = pci_enable_msix(adapter->pdev, adapter->msix_entries, - BE_NUM_MSIX_VECTORS); - if (status == 0) - adapter->msix_enabled = true; - return; -} - -static inline int be_msix_vec_get(struct be_adapter *adapter, u32 eq_id) -{ - return adapter->msix_entries[eq_id - - 8 * adapter->ctrl.pci_func].vector; -} - -static int be_msix_register(struct be_adapter *adapter) -{ - struct net_device *netdev = adapter->netdev; - struct be_eq_obj *tx_eq = &adapter->tx_eq; - struct be_eq_obj *rx_eq = &adapter->rx_eq; - int status, vec; - - sprintf(tx_eq->desc, "%s-tx", netdev->name); - vec = be_msix_vec_get(adapter, tx_eq->q.id); - status = request_irq(vec, be_msix_tx, 0, tx_eq->desc, adapter); - if (status) - goto err; - - sprintf(rx_eq->desc, "%s-rx", netdev->name); - vec = be_msix_vec_get(adapter, rx_eq->q.id); - status = request_irq(vec, be_msix_rx, 0, rx_eq->desc, adapter); - if (status) { /* Free TX IRQ */ - vec = be_msix_vec_get(adapter, tx_eq->q.id); - free_irq(vec, adapter); - goto err; - } - return 0; -err: - dev_warn(&adapter->pdev->dev, - "MSIX Request IRQ failed - err %d\n", status); - pci_disable_msix(adapter->pdev); - adapter->msix_enabled = false; - return status; -} - -static int be_irq_register(struct be_adapter *adapter) -{ - struct net_device *netdev = adapter->netdev; - int status; - - if (adapter->msix_enabled) { - status = be_msix_register(adapter); - if (status == 0) - goto done; - } - - /* INTx */ - netdev->irq = adapter->pdev->irq; - status = request_irq(netdev->irq, be_intx, IRQF_SHARED, netdev->name, - adapter); - if (status) { - dev_err(&adapter->pdev->dev, - "INTx request IRQ failed - err %d\n", status); - return status; - } -done: - adapter->isr_registered = true; - return 0; -} - -static void be_irq_unregister(struct be_adapter *adapter) -{ - struct net_device *netdev = adapter->netdev; - int vec; - - if (!adapter->isr_registered) - return; - - /* INTx */ - if (!adapter->msix_enabled) { - free_irq(netdev->irq, adapter); - goto done; - } - - /* MSIx */ - vec = be_msix_vec_get(adapter, adapter->tx_eq.q.id); - free_irq(vec, adapter); - vec = be_msix_vec_get(adapter, adapter->rx_eq.q.id); - free_irq(vec, adapter); -done: - adapter->isr_registered = false; - return; -} - -static int be_open(struct net_device *netdev) -{ - struct be_adapter *adapter = netdev_priv(netdev); - struct be_ctrl_info *ctrl = &adapter->ctrl; - struct be_eq_obj *rx_eq = &adapter->rx_eq; - struct be_eq_obj *tx_eq = &adapter->tx_eq; - u32 if_flags; - int status; - - if_flags = BE_IF_FLAGS_BROADCAST | BE_IF_FLAGS_PROMISCUOUS | - BE_IF_FLAGS_MCAST_PROMISCUOUS | BE_IF_FLAGS_UNTAGGED | - BE_IF_FLAGS_PASS_L3L4_ERRORS; - status = be_cmd_if_create(ctrl, if_flags, netdev->dev_addr, - false/* pmac_invalid */, &adapter->if_handle, - &adapter->pmac_id); - if (status != 0) - goto do_none; - - be_vid_config(netdev); - - status = be_cmd_set_flow_control(ctrl, true, true); - if (status != 0) - goto if_destroy; - - status = be_tx_queues_create(adapter); - if (status != 0) - goto if_destroy; - - status = be_rx_queues_create(adapter); - if (status != 0) - goto tx_qs_destroy; - - /* First time posting */ - be_post_rx_frags(adapter); - - napi_enable(&rx_eq->napi); - napi_enable(&tx_eq->napi); - - be_irq_register(adapter); - - be_intr_set(ctrl, true); - - /* The evt queues are created in the unarmed state; arm them */ - be_eq_notify(ctrl, rx_eq->q.id, true, false, 0); - be_eq_notify(ctrl, tx_eq->q.id, true, false, 0); - - /* The compl queues are created in the unarmed state; arm them */ - be_cq_notify(ctrl, adapter->rx_obj.cq.id, true, 0); - be_cq_notify(ctrl, adapter->tx_obj.cq.id, true, 0); - - be_link_status_update(adapter); - - schedule_delayed_work(&adapter->work, msecs_to_jiffies(100)); - return 0; - -tx_qs_destroy: - be_tx_queues_destroy(adapter); -if_destroy: - be_cmd_if_destroy(ctrl, adapter->if_handle); -do_none: - return status; -} - -static int be_close(struct net_device *netdev) -{ - struct be_adapter *adapter = netdev_priv(netdev); - struct be_ctrl_info *ctrl = &adapter->ctrl; - struct be_eq_obj *rx_eq = &adapter->rx_eq; - struct be_eq_obj *tx_eq = &adapter->tx_eq; - int vec; - - cancel_delayed_work(&adapter->work); - - netif_stop_queue(netdev); - netif_carrier_off(netdev); - adapter->link.speed = PHY_LINK_SPEED_ZERO; - - be_intr_set(ctrl, false); - - if (adapter->msix_enabled) { - vec = be_msix_vec_get(adapter, tx_eq->q.id); - synchronize_irq(vec); - vec = be_msix_vec_get(adapter, rx_eq->q.id); - synchronize_irq(vec); - } else { - synchronize_irq(netdev->irq); - } - be_irq_unregister(adapter); - - napi_disable(&rx_eq->napi); - napi_disable(&tx_eq->napi); - - be_rx_queues_destroy(adapter); - be_tx_queues_destroy(adapter); - - be_cmd_if_destroy(ctrl, adapter->if_handle); - return 0; -} - -static int be_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr, - void **ip_hdr, void **tcpudp_hdr, - u64 *hdr_flags, void *priv) -{ - struct ethhdr *eh; - struct vlan_ethhdr *veh; - struct iphdr *iph; - u8 *va = page_address(frag->page) + frag->page_offset; - unsigned long ll_hlen; - - prefetch(va); - eh = (struct ethhdr *)va; - *mac_hdr = eh; - ll_hlen = ETH_HLEN; - if (eh->h_proto != htons(ETH_P_IP)) { - if (eh->h_proto == htons(ETH_P_8021Q)) { - veh = (struct vlan_ethhdr *)va; - if (veh->h_vlan_encapsulated_proto != htons(ETH_P_IP)) - return -1; - - ll_hlen += VLAN_HLEN; - } else { - return -1; - } - } - *hdr_flags = LRO_IPV4; - iph = (struct iphdr *)(va + ll_hlen); - *ip_hdr = iph; - if (iph->protocol != IPPROTO_TCP) - return -1; - *hdr_flags |= LRO_TCP; - *tcpudp_hdr = (u8 *) (*ip_hdr) + (iph->ihl << 2); - - return 0; -} - -static void be_lro_init(struct be_adapter *adapter, struct net_device *netdev) -{ - struct net_lro_mgr *lro_mgr; - - lro_mgr = &adapter->rx_obj.lro_mgr; - lro_mgr->dev = netdev; - lro_mgr->features = LRO_F_NAPI; - lro_mgr->ip_summed = CHECKSUM_UNNECESSARY; - lro_mgr->ip_summed_aggr = CHECKSUM_UNNECESSARY; - lro_mgr->max_desc = BE_MAX_LRO_DESCRIPTORS; - lro_mgr->lro_arr = adapter->rx_obj.lro_desc; - lro_mgr->get_frag_header = be_get_frag_header; - lro_mgr->max_aggr = BE_MAX_FRAGS_PER_FRAME; -} - -static struct net_device_ops be_netdev_ops = { - .ndo_open = be_open, - .ndo_stop = be_close, - .ndo_start_xmit = be_xmit, - .ndo_get_stats = be_get_stats, - .ndo_set_rx_mode = be_set_multicast_list, - .ndo_set_mac_address = be_mac_addr_set, - .ndo_change_mtu = be_change_mtu, - .ndo_validate_addr = eth_validate_addr, - .ndo_vlan_rx_register = be_vlan_register, - .ndo_vlan_rx_add_vid = be_vlan_add_vid, - .ndo_vlan_rx_kill_vid = be_vlan_rem_vid, -}; - -static void be_netdev_init(struct net_device *netdev) -{ - struct be_adapter *adapter = netdev_priv(netdev); - - netdev->features |= NETIF_F_SG | NETIF_F_HW_VLAN_RX | NETIF_F_TSO | - NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_IP_CSUM | - NETIF_F_IPV6_CSUM | NETIF_F_TSO6; - - netdev->flags |= IFF_MULTICAST; - - BE_SET_NETDEV_OPS(netdev, &be_netdev_ops); - - SET_ETHTOOL_OPS(netdev, &be_ethtool_ops); - - be_lro_init(adapter, netdev); - - netif_napi_add(netdev, &adapter->rx_eq.napi, be_poll_rx, - BE_NAPI_WEIGHT); - netif_napi_add(netdev, &adapter->tx_eq.napi, be_poll_tx, - BE_NAPI_WEIGHT); - - netif_carrier_off(netdev); - netif_stop_queue(netdev); -} - -static void be_unmap_pci_bars(struct be_adapter *adapter) -{ - struct be_ctrl_info *ctrl = &adapter->ctrl; - if (ctrl->csr) - iounmap(ctrl->csr); - if (ctrl->db) - iounmap(ctrl->db); - if (ctrl->pcicfg) - iounmap(ctrl->pcicfg); -} - -static int be_map_pci_bars(struct be_adapter *adapter) -{ - u8 __iomem *addr; - - addr = ioremap_nocache(pci_resource_start(adapter->pdev, 2), - pci_resource_len(adapter->pdev, 2)); - if (addr == NULL) - return -ENOMEM; - adapter->ctrl.csr = addr; - - addr = ioremap_nocache(pci_resource_start(adapter->pdev, 4), - 128 * 1024); - if (addr == NULL) - goto pci_map_err; - adapter->ctrl.db = addr; - - addr = ioremap_nocache(pci_resource_start(adapter->pdev, 1), - pci_resource_len(adapter->pdev, 1)); - if (addr == NULL) - goto pci_map_err; - adapter->ctrl.pcicfg = addr; - - return 0; -pci_map_err: - be_unmap_pci_bars(adapter); - return -ENOMEM; -} - - -static void be_ctrl_cleanup(struct be_adapter *adapter) -{ - struct be_dma_mem *mem = &adapter->ctrl.mbox_mem_alloced; - - be_unmap_pci_bars(adapter); - - if (mem->va) - pci_free_consistent(adapter->pdev, mem->size, - mem->va, mem->dma); -} - -/* Initialize the mbox required to send cmds to BE */ -static int be_ctrl_init(struct be_adapter *adapter) -{ - struct be_ctrl_info *ctrl = &adapter->ctrl; - struct be_dma_mem *mbox_mem_alloc = &ctrl->mbox_mem_alloced; - struct be_dma_mem *mbox_mem_align = &ctrl->mbox_mem; - int status; - u32 val; - - status = be_map_pci_bars(adapter); - if (status) - return status; - - mbox_mem_alloc->size = sizeof(struct be_mcc_mailbox) + 16; - mbox_mem_alloc->va = pci_alloc_consistent(adapter->pdev, - mbox_mem_alloc->size, &mbox_mem_alloc->dma); - if (!mbox_mem_alloc->va) { - be_unmap_pci_bars(adapter); - return -1; - } - mbox_mem_align->size = sizeof(struct be_mcc_mailbox); - mbox_mem_align->va = PTR_ALIGN(mbox_mem_alloc->va, 16); - mbox_mem_align->dma = PTR_ALIGN(mbox_mem_alloc->dma, 16); - memset(mbox_mem_align->va, 0, sizeof(struct be_mcc_mailbox)); - spin_lock_init(&ctrl->cmd_lock); - - val = ioread32(ctrl->pcicfg + PCICFG_MEMBAR_CTRL_INT_CTRL_OFFSET); - ctrl->pci_func = (val >> MEMBAR_CTRL_INT_CTRL_PFUNC_SHIFT) & - MEMBAR_CTRL_INT_CTRL_PFUNC_MASK; - return 0; -} - -static void be_stats_cleanup(struct be_adapter *adapter) -{ - struct be_stats_obj *stats = &adapter->stats; - struct be_dma_mem *cmd = &stats->cmd; - - if (cmd->va) - pci_free_consistent(adapter->pdev, cmd->size, - cmd->va, cmd->dma); -} - -static int be_stats_init(struct be_adapter *adapter) -{ - struct be_stats_obj *stats = &adapter->stats; - struct be_dma_mem *cmd = &stats->cmd; - - cmd->size = sizeof(struct be_cmd_req_get_stats); - cmd->va = pci_alloc_consistent(adapter->pdev, cmd->size, &cmd->dma); - if (cmd->va == NULL) - return -1; - return 0; -} - -static void __devexit be_remove(struct pci_dev *pdev) -{ - struct be_adapter *adapter = pci_get_drvdata(pdev); - if (!adapter) - return; - - unregister_netdev(adapter->netdev); - - be_stats_cleanup(adapter); - - be_ctrl_cleanup(adapter); - - if (adapter->msix_enabled) { - pci_disable_msix(adapter->pdev); - adapter->msix_enabled = false; - } - - pci_set_drvdata(pdev, NULL); - pci_release_regions(pdev); - pci_disable_device(pdev); - - free_netdev(adapter->netdev); -} - -static int be_hw_up(struct be_adapter *adapter) -{ - struct be_ctrl_info *ctrl = &adapter->ctrl; - int status; - - status = be_cmd_POST(ctrl); - if (status) - return status; - - status = be_cmd_get_fw_ver(ctrl, adapter->fw_ver); - if (status) - return status; - - status = be_cmd_query_fw_cfg(ctrl, &adapter->port_num); - return status; -} - -static int __devinit be_probe(struct pci_dev *pdev, - const struct pci_device_id *pdev_id) -{ - int status = 0; - struct be_adapter *adapter; - struct net_device *netdev; - struct be_ctrl_info *ctrl; - u8 mac[ETH_ALEN]; - - status = pci_enable_device(pdev); - if (status) - goto do_none; - - status = pci_request_regions(pdev, DRV_NAME); - if (status) - goto disable_dev; - pci_set_master(pdev); - - netdev = alloc_etherdev(sizeof(struct be_adapter)); - if (netdev == NULL) { - status = -ENOMEM; - goto rel_reg; - } - adapter = netdev_priv(netdev); - adapter->pdev = pdev; - pci_set_drvdata(pdev, adapter); - adapter->netdev = netdev; - - be_msix_enable(adapter); - - status = pci_set_dma_mask(pdev, DMA_64BIT_MASK); - if (!status) { - netdev->features |= NETIF_F_HIGHDMA; - } else { - status = pci_set_dma_mask(pdev, DMA_32BIT_MASK); - if (status) { - dev_err(&pdev->dev, "Could not set PCI DMA Mask\n"); - goto free_netdev; - } - } - - ctrl = &adapter->ctrl; - status = be_ctrl_init(adapter); - if (status) - goto free_netdev; - - status = be_stats_init(adapter); - if (status) - goto ctrl_clean; - - status = be_hw_up(adapter); - if (status) - goto stats_clean; - - status = be_cmd_mac_addr_query(ctrl, mac, MAC_ADDRESS_TYPE_NETWORK, - true /* permanent */, 0); - if (status) - goto stats_clean; - memcpy(netdev->dev_addr, mac, ETH_ALEN); - - INIT_DELAYED_WORK(&adapter->work, be_worker); - be_netdev_init(netdev); - SET_NETDEV_DEV(netdev, &adapter->pdev->dev); - - status = register_netdev(netdev); - if (status != 0) - goto stats_clean; - - dev_info(&pdev->dev, BE_NAME " port %d\n", adapter->port_num); - return 0; - -stats_clean: - be_stats_cleanup(adapter); -ctrl_clean: - be_ctrl_cleanup(adapter); -free_netdev: - free_netdev(adapter->netdev); -rel_reg: - pci_release_regions(pdev); -disable_dev: - pci_disable_device(pdev); -do_none: - dev_warn(&pdev->dev, BE_NAME " initialization failed\n"); - return status; -} - -static int be_suspend(struct pci_dev *pdev, pm_message_t state) -{ - struct be_adapter *adapter = pci_get_drvdata(pdev); - struct net_device *netdev = adapter->netdev; - - netif_device_detach(netdev); - if (netif_running(netdev)) { - rtnl_lock(); - be_close(netdev); - rtnl_unlock(); - } - - pci_save_state(pdev); - pci_disable_device(pdev); - pci_set_power_state(pdev, pci_choose_state(pdev, state)); - return 0; -} - -static int be_resume(struct pci_dev *pdev) -{ - int status = 0; - struct be_adapter *adapter = pci_get_drvdata(pdev); - struct net_device *netdev = adapter->netdev; - - netif_device_detach(netdev); - - status = pci_enable_device(pdev); - if (status) - return status; - - pci_set_power_state(pdev, 0); - pci_restore_state(pdev); - - if (netif_running(netdev)) { - rtnl_lock(); - be_open(netdev); - rtnl_unlock(); - } - netif_device_attach(netdev); - return 0; -} - -static struct pci_driver be_driver = { - .name = DRV_NAME, - .id_table = be_dev_ids, - .probe = be_probe, - .remove = be_remove, - .suspend = be_suspend, - .resume = be_resume -}; - -static int __init be_init_module(void) -{ - if (rx_frag_size != 8192 && rx_frag_size != 4096 - && rx_frag_size != 2048) { - printk(KERN_WARNING DRV_NAME - " : Module param rx_frag_size must be 2048/4096/8192." - " Using 2048\n"); - rx_frag_size = 2048; - } - /* Ensure rx_frag_size is aligned to chache line */ - if (SKB_DATA_ALIGN(rx_frag_size) != rx_frag_size) { - printk(KERN_WARNING DRV_NAME - " : Bad module param rx_frag_size. Using 2048\n"); - rx_frag_size = 2048; - } - - return pci_register_driver(&be_driver); -} -module_init(be_init_module); - -static void __exit be_exit_module(void) -{ - pci_unregister_driver(&be_driver); -} -module_exit(be_exit_module); diff --git a/trunk/drivers/net/bnx2.c b/trunk/drivers/net/bnx2.c index 6b6530ffdf19..6500b7c4739f 100644 --- a/trunk/drivers/net/bnx2.c +++ b/trunk/drivers/net/bnx2.c @@ -57,8 +57,8 @@ #define DRV_MODULE_NAME "bnx2" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "1.9.3" -#define DRV_MODULE_RELDATE "March 17, 2009" +#define DRV_MODULE_VERSION "1.9.2" +#define DRV_MODULE_RELDATE "Feb 11, 2009" #define RUN_AT(x) (jiffies + (x)) @@ -5843,6 +5843,9 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { msix_ent[i].entry = i; msix_ent[i].vector = 0; + + snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); + bp->irq_tbl[i].handler = bnx2_msi_1shot; } rc = pci_enable_msix(bp->pdev, msix_ent, BNX2_MAX_MSIX_VEC); @@ -5851,11 +5854,8 @@ bnx2_enable_msix(struct bnx2 *bp, int msix_vecs) bp->irq_nvecs = msix_vecs; bp->flags |= BNX2_FLAG_USING_MSIX | BNX2_FLAG_ONE_SHOT_MSI; - for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { + for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) bp->irq_tbl[i].vector = msix_ent[i].vector; - snprintf(bp->irq_tbl[i].name, len, "%s-%d", dev->name, i); - bp->irq_tbl[i].handler = bnx2_msi_1shot; - } } static void diff --git a/trunk/drivers/net/bnx2x.h b/trunk/drivers/net/bnx2x.h index 3cf2b92eef3b..15a5cf0f676b 100644 --- a/trunk/drivers/net/bnx2x.h +++ b/trunk/drivers/net/bnx2x.h @@ -152,7 +152,7 @@ struct sw_rx_page { #define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT) #define SGE_PAGE_SIZE PAGE_SIZE #define SGE_PAGE_SHIFT PAGE_SHIFT -#define SGE_PAGE_ALIGN(addr) PAGE_ALIGN((typeof(PAGE_SIZE))addr) +#define SGE_PAGE_ALIGN(addr) PAGE_ALIGN(addr) #define BCM_RX_ETH_PAYLOAD_ALIGN 64 diff --git a/trunk/drivers/net/bnx2x_init.h b/trunk/drivers/net/bnx2x_init.h index 3b0c2499ef17..a6c0b3abba29 100644 --- a/trunk/drivers/net/bnx2x_init.h +++ b/trunk/drivers/net/bnx2x_init.h @@ -150,6 +150,7 @@ static void bnx2x_init_ind_wr(struct bnx2x *bp, u32 addr, const u32 *data, static void bnx2x_write_big_buf(struct bnx2x *bp, u32 addr, u32 len) { +#ifdef USE_DMAE int offset = 0; if (bp->dmae_ready) { @@ -163,6 +164,9 @@ static void bnx2x_write_big_buf(struct bnx2x *bp, u32 addr, u32 len) addr + offset, len); } else bnx2x_init_str_wr(bp, addr, bp->gunzip_buf, len); +#else + bnx2x_init_str_wr(bp, addr, bp->gunzip_buf, len); +#endif } static void bnx2x_init_fill(struct bnx2x *bp, u32 addr, int fill, u32 len) diff --git a/trunk/drivers/net/bnx2x_main.c b/trunk/drivers/net/bnx2x_main.c index 2e346a5e98cf..d3e7775a9ccf 100644 --- a/trunk/drivers/net/bnx2x_main.c +++ b/trunk/drivers/net/bnx2x_main.c @@ -57,7 +57,7 @@ #include "bnx2x.h" #include "bnx2x_init.h" -#define DRV_MODULE_VERSION "1.45.27" +#define DRV_MODULE_VERSION "1.45.26" #define DRV_MODULE_RELDATE "2009/01/26" #define BNX2X_BC_VER 0x040200 @@ -4035,10 +4035,10 @@ static void bnx2x_zero_sb(struct bnx2x *bp, int sb_id) { int port = BP_PORT(bp); - bnx2x_init_fill(bp, USTORM_INTMEM_ADDR + + bnx2x_init_fill(bp, BAR_USTRORM_INTMEM + USTORM_SB_HOST_STATUS_BLOCK_OFFSET(port, sb_id), 0, sizeof(struct ustorm_status_block)/4); - bnx2x_init_fill(bp, CSTORM_INTMEM_ADDR + + bnx2x_init_fill(bp, BAR_CSTRORM_INTMEM + CSTORM_SB_HOST_STATUS_BLOCK_OFFSET(port, sb_id), 0, sizeof(struct cstorm_status_block)/4); } @@ -4092,18 +4092,18 @@ static void bnx2x_zero_def_sb(struct bnx2x *bp) { int func = BP_FUNC(bp); - bnx2x_init_fill(bp, TSTORM_INTMEM_ADDR + - TSTORM_DEF_SB_HOST_STATUS_BLOCK_OFFSET(func), 0, - sizeof(struct tstorm_def_status_block)/4); - bnx2x_init_fill(bp, USTORM_INTMEM_ADDR + + bnx2x_init_fill(bp, BAR_USTRORM_INTMEM + USTORM_DEF_SB_HOST_STATUS_BLOCK_OFFSET(func), 0, sizeof(struct ustorm_def_status_block)/4); - bnx2x_init_fill(bp, CSTORM_INTMEM_ADDR + + bnx2x_init_fill(bp, BAR_CSTRORM_INTMEM + CSTORM_DEF_SB_HOST_STATUS_BLOCK_OFFSET(func), 0, sizeof(struct cstorm_def_status_block)/4); - bnx2x_init_fill(bp, XSTORM_INTMEM_ADDR + + bnx2x_init_fill(bp, BAR_XSTRORM_INTMEM + XSTORM_DEF_SB_HOST_STATUS_BLOCK_OFFSET(func), 0, sizeof(struct xstorm_def_status_block)/4); + bnx2x_init_fill(bp, BAR_TSTRORM_INTMEM + + TSTORM_DEF_SB_HOST_STATUS_BLOCK_OFFSET(func), 0, + sizeof(struct tstorm_def_status_block)/4); } static void bnx2x_init_def_sb(struct bnx2x *bp, @@ -4518,8 +4518,7 @@ static void bnx2x_init_context(struct bnx2x *bp) (USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_TPA | USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_SGE_RING); context->ustorm_st_context.common.sge_buff_size = - (u16)min((u32)SGE_PAGE_SIZE*PAGES_PER_SGE, - (u32)0xffff); + (u16)(BCM_PAGE_SIZE*PAGES_PER_SGE); context->ustorm_st_context.common.sge_page_base_hi = U64_HI(fp->rx_sge_mapping); context->ustorm_st_context.common.sge_page_base_lo = diff --git a/trunk/drivers/net/bonding/bond_main.c b/trunk/drivers/net/bonding/bond_main.c index 3d76686dceca..e0578fe8c0db 100644 --- a/trunk/drivers/net/bonding/bond_main.c +++ b/trunk/drivers/net/bonding/bond_main.c @@ -3537,26 +3537,11 @@ static int bond_slave_netdev_event(unsigned long event, struct net_device *slave } break; case NETDEV_CHANGE: - if (bond->params.mode == BOND_MODE_8023AD || bond_is_lb(bond)) { - struct slave *slave; - - slave = bond_get_slave_by_dev(bond, slave_dev); - if (slave) { - u16 old_speed = slave->speed; - u16 old_duplex = slave->duplex; - - bond_update_speed_duplex(slave); - - if (bond_is_lb(bond)) - break; - - if (old_speed != slave->speed) - bond_3ad_adapter_speed_changed(slave); - if (old_duplex != slave->duplex) - bond_3ad_adapter_duplex_changed(slave); - } - } - + /* + * TODO: is this what we get if somebody + * sets up a hierarchical bond, then rmmod's + * one of the slave bonding devices? + */ break; case NETDEV_DOWN: /* diff --git a/trunk/drivers/net/dm9000.c b/trunk/drivers/net/dm9000.c index 254ec62b5f58..bcf92917bbf3 100644 --- a/trunk/drivers/net/dm9000.c +++ b/trunk/drivers/net/dm9000.c @@ -930,15 +930,13 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id) struct net_device *dev = dev_id; board_info_t *db = netdev_priv(dev); int int_status; - unsigned long flags; u8 reg_save; dm9000_dbg(db, 3, "entering %s\n", __func__); /* A real interrupt coming */ - /* holders of db->lock must always block IRQs */ - spin_lock_irqsave(&db->lock, flags); + spin_lock(&db->lock); /* Save previous register address */ reg_save = readb(db->io_addr); @@ -974,7 +972,7 @@ static irqreturn_t dm9000_interrupt(int irq, void *dev_id) /* Restore previous register address */ writeb(reg_save, db->io_addr); - spin_unlock_irqrestore(&db->lock, flags); + spin_unlock(&db->lock); return IRQ_HANDLED; } diff --git a/trunk/drivers/net/dnet.c b/trunk/drivers/net/dnet.c deleted file mode 100644 index 1b4063222a82..000000000000 --- a/trunk/drivers/net/dnet.c +++ /dev/null @@ -1,994 +0,0 @@ -/* - * Dave DNET Ethernet Controller driver - * - * Copyright (C) 2008 Dave S.r.l. - * Copyright (C) 2009 Ilya Yanok, Emcraft Systems 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. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "dnet.h" - -#undef DEBUG - -/* function for reading internal MAC register */ -u16 dnet_readw_mac(struct dnet *bp, u16 reg) -{ - u16 data_read; - - /* issue a read */ - dnet_writel(bp, reg, MACREG_ADDR); - - /* since a read/write op to the MAC is very slow, - * we must wait before reading the data */ - ndelay(500); - - /* read data read from the MAC register */ - data_read = dnet_readl(bp, MACREG_DATA); - - /* all done */ - return data_read; -} - -/* function for writing internal MAC register */ -void dnet_writew_mac(struct dnet *bp, u16 reg, u16 val) -{ - /* load data to write */ - dnet_writel(bp, val, MACREG_DATA); - - /* issue a write */ - dnet_writel(bp, reg | DNET_INTERNAL_WRITE, MACREG_ADDR); - - /* since a read/write op to the MAC is very slow, - * we must wait before exiting */ - ndelay(500); -} - -static void __dnet_set_hwaddr(struct dnet *bp) -{ - u16 tmp; - - tmp = cpu_to_be16(*((u16 *) bp->dev->dev_addr)); - dnet_writew_mac(bp, DNET_INTERNAL_MAC_ADDR_0_REG, tmp); - tmp = cpu_to_be16(*((u16 *) (bp->dev->dev_addr + 2))); - dnet_writew_mac(bp, DNET_INTERNAL_MAC_ADDR_1_REG, tmp); - tmp = cpu_to_be16(*((u16 *) (bp->dev->dev_addr + 4))); - dnet_writew_mac(bp, DNET_INTERNAL_MAC_ADDR_2_REG, tmp); -} - -static void __devinit dnet_get_hwaddr(struct dnet *bp) -{ - u16 tmp; - u8 addr[6]; - - /* - * from MAC docs: - * "Note that the MAC address is stored in the registers in Hexadecimal - * form. For example, to set the MAC Address to: AC-DE-48-00-00-80 - * would require writing 0xAC (octet 0) to address 0x0B (high byte of - * Mac_addr[15:0]), 0xDE (octet 1) to address 0x0A (Low byte of - * Mac_addr[15:0]), 0x48 (octet 2) to address 0x0D (high byte of - * Mac_addr[15:0]), 0x00 (octet 3) to address 0x0C (Low byte of - * Mac_addr[15:0]), 0x00 (octet 4) to address 0x0F (high byte of - * Mac_addr[15:0]), and 0x80 (octet 5) to address * 0x0E (Low byte of - * Mac_addr[15:0]). - */ - tmp = dnet_readw_mac(bp, DNET_INTERNAL_MAC_ADDR_0_REG); - *((u16 *) addr) = be16_to_cpu(tmp); - tmp = dnet_readw_mac(bp, DNET_INTERNAL_MAC_ADDR_1_REG); - *((u16 *) (addr + 2)) = be16_to_cpu(tmp); - tmp = dnet_readw_mac(bp, DNET_INTERNAL_MAC_ADDR_2_REG); - *((u16 *) (addr + 4)) = be16_to_cpu(tmp); - - if (is_valid_ether_addr(addr)) - memcpy(bp->dev->dev_addr, addr, sizeof(addr)); -} - -static int dnet_mdio_read(struct mii_bus *bus, int mii_id, int regnum) -{ - struct dnet *bp = bus->priv; - u16 value; - - while (!(dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG) - & DNET_INTERNAL_GMII_MNG_CMD_FIN)) - cpu_relax(); - - /* only 5 bits allowed for phy-addr and reg_offset */ - mii_id &= 0x1f; - regnum &= 0x1f; - - /* prepare reg_value for a read */ - value = (mii_id << 8); - value |= regnum; - - /* write control word */ - dnet_writew_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG, value); - - /* wait for end of transfer */ - while (!(dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG) - & DNET_INTERNAL_GMII_MNG_CMD_FIN)) - cpu_relax(); - - value = dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_DAT_REG); - - pr_debug("mdio_read %02x:%02x <- %04x\n", mii_id, regnum, value); - - return value; -} - -static int dnet_mdio_write(struct mii_bus *bus, int mii_id, int regnum, - u16 value) -{ - struct dnet *bp = bus->priv; - u16 tmp; - - pr_debug("mdio_write %02x:%02x <- %04x\n", mii_id, regnum, value); - - while (!(dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG) - & DNET_INTERNAL_GMII_MNG_CMD_FIN)) - cpu_relax(); - - /* prepare for a write operation */ - tmp = (1 << 13); - - /* only 5 bits allowed for phy-addr and reg_offset */ - mii_id &= 0x1f; - regnum &= 0x1f; - - /* only 16 bits on data */ - value &= 0xffff; - - /* prepare reg_value for a write */ - tmp |= (mii_id << 8); - tmp |= regnum; - - /* write data to write first */ - dnet_writew_mac(bp, DNET_INTERNAL_GMII_MNG_DAT_REG, value); - - /* write control word */ - dnet_writew_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG, tmp); - - while (!(dnet_readw_mac(bp, DNET_INTERNAL_GMII_MNG_CTL_REG) - & DNET_INTERNAL_GMII_MNG_CMD_FIN)) - cpu_relax(); - - return 0; -} - -static int dnet_mdio_reset(struct mii_bus *bus) -{ - return 0; -} - -static void dnet_handle_link_change(struct net_device *dev) -{ - struct dnet *bp = netdev_priv(dev); - struct phy_device *phydev = bp->phy_dev; - unsigned long flags; - u32 mode_reg, ctl_reg; - - int status_change = 0; - - spin_lock_irqsave(&bp->lock, flags); - - mode_reg = dnet_readw_mac(bp, DNET_INTERNAL_MODE_REG); - ctl_reg = dnet_readw_mac(bp, DNET_INTERNAL_RXTX_CONTROL_REG); - - if (phydev->link) { - if (bp->duplex != phydev->duplex) { - if (phydev->duplex) - ctl_reg &= - ~(DNET_INTERNAL_RXTX_CONTROL_ENABLEHALFDUP); - else - ctl_reg |= - DNET_INTERNAL_RXTX_CONTROL_ENABLEHALFDUP; - - bp->duplex = phydev->duplex; - status_change = 1; - } - - if (bp->speed != phydev->speed) { - status_change = 1; - switch (phydev->speed) { - case 1000: - mode_reg |= DNET_INTERNAL_MODE_GBITEN; - break; - case 100: - case 10: - mode_reg &= ~DNET_INTERNAL_MODE_GBITEN; - break; - default: - printk(KERN_WARNING - "%s: Ack! Speed (%d) is not " - "10/100/1000!\n", dev->name, - phydev->speed); - break; - } - bp->speed = phydev->speed; - } - } - - if (phydev->link != bp->link) { - if (phydev->link) { - mode_reg |= - (DNET_INTERNAL_MODE_RXEN | DNET_INTERNAL_MODE_TXEN); - } else { - mode_reg &= - ~(DNET_INTERNAL_MODE_RXEN | - DNET_INTERNAL_MODE_TXEN); - bp->speed = 0; - bp->duplex = -1; - } - bp->link = phydev->link; - - status_change = 1; - } - - if (status_change) { - dnet_writew_mac(bp, DNET_INTERNAL_RXTX_CONTROL_REG, ctl_reg); - dnet_writew_mac(bp, DNET_INTERNAL_MODE_REG, mode_reg); - } - - spin_unlock_irqrestore(&bp->lock, flags); - - 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 dnet_mii_probe(struct net_device *dev) -{ - struct dnet *bp = netdev_priv(dev); - struct phy_device *phydev = NULL; - int phy_addr; - - /* find the first phy */ - for (phy_addr = 0; phy_addr < PHY_MAX_ADDR; phy_addr++) { - if (bp->mii_bus->phy_map[phy_addr]) { - phydev = bp->mii_bus->phy_map[phy_addr]; - break; - } - } - - if (!phydev) { - printk(KERN_ERR "%s: no PHY found\n", dev->name); - return -ENODEV; - } - - /* TODO : add pin_irq */ - - /* attach the mac to the phy */ - if (bp->capabilities & DNET_HAS_RMII) { - phydev = phy_connect(dev, dev_name(&phydev->dev), - &dnet_handle_link_change, 0, - PHY_INTERFACE_MODE_RMII); - } else { - phydev = phy_connect(dev, dev_name(&phydev->dev), - &dnet_handle_link_change, 0, - PHY_INTERFACE_MODE_MII); - } - - if (IS_ERR(phydev)) { - printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); - return PTR_ERR(phydev); - } - - /* mask with MAC supported features */ - if (bp->capabilities & DNET_HAS_GIGABIT) - phydev->supported &= PHY_GBIT_FEATURES; - else - phydev->supported &= PHY_BASIC_FEATURES; - - phydev->supported |= SUPPORTED_Asym_Pause | SUPPORTED_Pause; - - phydev->advertising = phydev->supported; - - bp->link = 0; - bp->speed = 0; - bp->duplex = -1; - bp->phy_dev = phydev; - - return 0; -} - -static int dnet_mii_init(struct dnet *bp) -{ - int err, i; - - bp->mii_bus = mdiobus_alloc(); - if (bp->mii_bus == NULL) - return -ENOMEM; - - bp->mii_bus->name = "dnet_mii_bus"; - bp->mii_bus->read = &dnet_mdio_read; - bp->mii_bus->write = &dnet_mdio_write; - bp->mii_bus->reset = &dnet_mdio_reset; - - snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%x", 0); - - bp->mii_bus->priv = bp; - - bp->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); - if (!bp->mii_bus->irq) { - err = -ENOMEM; - goto err_out; - } - - for (i = 0; i < PHY_MAX_ADDR; i++) - bp->mii_bus->irq[i] = PHY_POLL; - - platform_set_drvdata(bp->dev, bp->mii_bus); - - if (mdiobus_register(bp->mii_bus)) { - err = -ENXIO; - goto err_out_free_mdio_irq; - } - - if (dnet_mii_probe(bp->dev) != 0) { - err = -ENXIO; - goto err_out_unregister_bus; - } - - return 0; - -err_out_unregister_bus: - mdiobus_unregister(bp->mii_bus); -err_out_free_mdio_irq: - kfree(bp->mii_bus->irq); -err_out: - mdiobus_free(bp->mii_bus); - return err; -} - -/* For Neptune board: LINK1000 as Link LED and TX as activity LED */ -int dnet_phy_marvell_fixup(struct phy_device *phydev) -{ - return phy_write(phydev, 0x18, 0x4148); -} - -static void dnet_update_stats(struct dnet *bp) -{ - u32 __iomem *reg = bp->regs + DNET_RX_PKT_IGNR_CNT; - u32 *p = &bp->hw_stats.rx_pkt_ignr; - u32 *end = &bp->hw_stats.rx_byte + 1; - - WARN_ON((unsigned long)(end - p - 1) != - (DNET_RX_BYTE_CNT - DNET_RX_PKT_IGNR_CNT) / 4); - - for (; p < end; p++, reg++) - *p += readl(reg); - - reg = bp->regs + DNET_TX_UNICAST_CNT; - p = &bp->hw_stats.tx_unicast; - end = &bp->hw_stats.tx_byte + 1; - - WARN_ON((unsigned long)(end - p - 1) != - (DNET_TX_BYTE_CNT - DNET_TX_UNICAST_CNT) / 4); - - for (; p < end; p++, reg++) - *p += readl(reg); -} - -static int dnet_poll(struct napi_struct *napi, int budget) -{ - struct dnet *bp = container_of(napi, struct dnet, napi); - struct net_device *dev = bp->dev; - int npackets = 0; - unsigned int pkt_len; - struct sk_buff *skb; - unsigned int *data_ptr; - u32 int_enable; - u32 cmd_word; - int i; - - while (npackets < budget) { - /* - * break out of while loop if there are no more - * packets waiting - */ - if (!(dnet_readl(bp, RX_FIFO_WCNT) >> 16)) { - napi_complete(napi); - int_enable = dnet_readl(bp, INTR_ENB); - int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF; - dnet_writel(bp, int_enable, INTR_ENB); - return 0; - } - - cmd_word = dnet_readl(bp, RX_LEN_FIFO); - pkt_len = cmd_word & 0xFFFF; - - if (cmd_word & 0xDF180000) - printk(KERN_ERR "%s packet receive error %x\n", - __func__, cmd_word); - - skb = dev_alloc_skb(pkt_len + 5); - if (skb != NULL) { - /* Align IP on 16 byte boundaries */ - skb_reserve(skb, 2); - /* - * 'skb_put()' points to the start of sk_buff - * data area. - */ - data_ptr = (unsigned int *)skb_put(skb, pkt_len); - for (i = 0; i < (pkt_len + 3) >> 2; i++) - *data_ptr++ = dnet_readl(bp, RX_DATA_FIFO); - skb->protocol = eth_type_trans(skb, dev); - netif_receive_skb(skb); - npackets++; - } else - printk(KERN_NOTICE - "%s: No memory to allocate a sk_buff of " - "size %u.\n", dev->name, pkt_len); - } - - budget -= npackets; - - if (npackets < budget) { - /* We processed all packets available. Tell NAPI it can - * stop polling then re-enable rx interrupts */ - napi_complete(napi); - int_enable = dnet_readl(bp, INTR_ENB); - int_enable |= DNET_INTR_SRC_RX_CMDFIFOAF; - dnet_writel(bp, int_enable, INTR_ENB); - return 0; - } - - /* There are still packets waiting */ - return 1; -} - -static irqreturn_t dnet_interrupt(int irq, void *dev_id) -{ - struct net_device *dev = dev_id; - struct dnet *bp = netdev_priv(dev); - u32 int_src, int_enable, int_current; - unsigned long flags; - unsigned int handled = 0; - - spin_lock_irqsave(&bp->lock, flags); - - /* read and clear the DNET irq (clear on read) */ - int_src = dnet_readl(bp, INTR_SRC); - int_enable = dnet_readl(bp, INTR_ENB); - int_current = int_src & int_enable; - - /* restart the queue if we had stopped it for TX fifo almost full */ - if (int_current & DNET_INTR_SRC_TX_FIFOAE) { - int_enable = dnet_readl(bp, INTR_ENB); - int_enable &= ~DNET_INTR_ENB_TX_FIFOAE; - dnet_writel(bp, int_enable, INTR_ENB); - netif_wake_queue(dev); - handled = 1; - } - - /* RX FIFO error checking */ - if (int_current & - (DNET_INTR_SRC_RX_CMDFIFOFF | DNET_INTR_SRC_RX_DATAFIFOFF)) { - printk(KERN_ERR "%s: RX fifo error %x, irq %x\n", __func__, - dnet_readl(bp, RX_STATUS), int_current); - /* we can only flush the RX FIFOs */ - dnet_writel(bp, DNET_SYS_CTL_RXFIFOFLUSH, SYS_CTL); - ndelay(500); - dnet_writel(bp, 0, SYS_CTL); - handled = 1; - } - - /* TX FIFO error checking */ - if (int_current & - (DNET_INTR_SRC_TX_FIFOFULL | DNET_INTR_SRC_TX_DISCFRM)) { - printk(KERN_ERR "%s: TX fifo error %x, irq %x\n", __func__, - dnet_readl(bp, TX_STATUS), int_current); - /* we can only flush the TX FIFOs */ - dnet_writel(bp, DNET_SYS_CTL_TXFIFOFLUSH, SYS_CTL); - ndelay(500); - dnet_writel(bp, 0, SYS_CTL); - handled = 1; - } - - if (int_current & DNET_INTR_SRC_RX_CMDFIFOAF) { - if (napi_schedule_prep(&bp->napi)) { - /* - * There's no point taking any more interrupts - * until we have processed the buffers - */ - /* Disable Rx interrupts and schedule NAPI poll */ - int_enable = dnet_readl(bp, INTR_ENB); - int_enable &= ~DNET_INTR_SRC_RX_CMDFIFOAF; - dnet_writel(bp, int_enable, INTR_ENB); - __napi_schedule(&bp->napi); - } - handled = 1; - } - - if (!handled) - pr_debug("%s: irq %x remains\n", __func__, int_current); - - spin_unlock_irqrestore(&bp->lock, flags); - - return IRQ_RETVAL(handled); -} - -#ifdef DEBUG -static inline void dnet_print_skb(struct sk_buff *skb) -{ - int k; - printk(KERN_DEBUG PFX "data:"); - for (k = 0; k < skb->len; k++) - printk(" %02x", (unsigned int)skb->data[k]); - printk("\n"); -} -#else -#define dnet_print_skb(skb) do {} while (0) -#endif - -static int dnet_start_xmit(struct sk_buff *skb, struct net_device *dev) -{ - - struct dnet *bp = netdev_priv(dev); - u32 tx_status, irq_enable; - unsigned int len, i, tx_cmd, wrsz; - unsigned long flags; - unsigned int *bufp; - - tx_status = dnet_readl(bp, TX_STATUS); - - pr_debug("start_xmit: len %u head %p data %p\n", - skb->len, skb->head, skb->data); - dnet_print_skb(skb); - - /* frame size (words) */ - len = (skb->len + 3) >> 2; - - spin_lock_irqsave(&bp->lock, flags); - - tx_status = dnet_readl(bp, TX_STATUS); - - bufp = (unsigned int *)(((unsigned long) skb->data) & ~0x3UL); - wrsz = (u32) skb->len + 3; - wrsz += ((unsigned long) skb->data) & 0x3; - wrsz >>= 2; - tx_cmd = ((((unsigned long)(skb->data)) & 0x03) << 16) | (u32) skb->len; - - /* check if there is enough room for the current frame */ - if (wrsz < (DNET_FIFO_SIZE - dnet_readl(bp, TX_FIFO_WCNT))) { - for (i = 0; i < wrsz; i++) - dnet_writel(bp, *bufp++, TX_DATA_FIFO); - - /* - * inform MAC that a packet's written and ready to be - * shipped out - */ - dnet_writel(bp, tx_cmd, TX_LEN_FIFO); - } - - if (dnet_readl(bp, TX_FIFO_WCNT) > DNET_FIFO_TX_DATA_AF_TH) { - netif_stop_queue(dev); - tx_status = dnet_readl(bp, INTR_SRC); - irq_enable = dnet_readl(bp, INTR_ENB); - irq_enable |= DNET_INTR_ENB_TX_FIFOAE; - dnet_writel(bp, irq_enable, INTR_ENB); - } - - /* free the buffer */ - dev_kfree_skb(skb); - - spin_unlock_irqrestore(&bp->lock, flags); - - dev->trans_start = jiffies; - - return 0; -} - -static void dnet_reset_hw(struct dnet *bp) -{ - /* put ts_mac in IDLE state i.e. disable rx/tx */ - dnet_writew_mac(bp, DNET_INTERNAL_MODE_REG, DNET_INTERNAL_MODE_FCEN); - - /* - * RX FIFO almost full threshold: only cmd FIFO almost full is - * implemented for RX side - */ - dnet_writel(bp, DNET_FIFO_RX_CMD_AF_TH, RX_FIFO_TH); - /* - * TX FIFO almost empty threshold: only data FIFO almost empty - * is implemented for TX side - */ - dnet_writel(bp, DNET_FIFO_TX_DATA_AE_TH, TX_FIFO_TH); - - /* flush rx/tx fifos */ - dnet_writel(bp, DNET_SYS_CTL_RXFIFOFLUSH | DNET_SYS_CTL_TXFIFOFLUSH, - SYS_CTL); - msleep(1); - dnet_writel(bp, 0, SYS_CTL); -} - -static void dnet_init_hw(struct dnet *bp) -{ - u32 config; - - dnet_reset_hw(bp); - __dnet_set_hwaddr(bp); - - config = dnet_readw_mac(bp, DNET_INTERNAL_RXTX_CONTROL_REG); - - if (bp->dev->flags & IFF_PROMISC) - /* Copy All Frames */ - config |= DNET_INTERNAL_RXTX_CONTROL_ENPROMISC; - if (!(bp->dev->flags & IFF_BROADCAST)) - /* No BroadCast */ - config |= DNET_INTERNAL_RXTX_CONTROL_RXMULTICAST; - - config |= DNET_INTERNAL_RXTX_CONTROL_RXPAUSE | - DNET_INTERNAL_RXTX_CONTROL_RXBROADCAST | - DNET_INTERNAL_RXTX_CONTROL_DROPCONTROL | - DNET_INTERNAL_RXTX_CONTROL_DISCFXFCS; - - dnet_writew_mac(bp, DNET_INTERNAL_RXTX_CONTROL_REG, config); - - /* clear irq before enabling them */ - config = dnet_readl(bp, INTR_SRC); - - /* enable RX/TX interrupt, recv packet ready interrupt */ - dnet_writel(bp, DNET_INTR_ENB_GLOBAL_ENABLE | DNET_INTR_ENB_RX_SUMMARY | - DNET_INTR_ENB_TX_SUMMARY | DNET_INTR_ENB_RX_FIFOERR | - DNET_INTR_ENB_RX_ERROR | DNET_INTR_ENB_RX_FIFOFULL | - DNET_INTR_ENB_TX_FIFOFULL | DNET_INTR_ENB_TX_DISCFRM | - DNET_INTR_ENB_RX_PKTRDY, INTR_ENB); -} - -static int dnet_open(struct net_device *dev) -{ - struct dnet *bp = netdev_priv(dev); - - /* if the phy is not yet register, retry later */ - if (!bp->phy_dev) - return -EAGAIN; - - if (!is_valid_ether_addr(dev->dev_addr)) - return -EADDRNOTAVAIL; - - napi_enable(&bp->napi); - dnet_init_hw(bp); - - phy_start_aneg(bp->phy_dev); - - /* schedule a link state check */ - phy_start(bp->phy_dev); - - netif_start_queue(dev); - - return 0; -} - -static int dnet_close(struct net_device *dev) -{ - struct dnet *bp = netdev_priv(dev); - - netif_stop_queue(dev); - napi_disable(&bp->napi); - - if (bp->phy_dev) - phy_stop(bp->phy_dev); - - dnet_reset_hw(bp); - netif_carrier_off(dev); - - return 0; -} - -static inline void dnet_print_pretty_hwstats(struct dnet_stats *hwstat) -{ - pr_debug("%s\n", __func__); - pr_debug("----------------------------- RX statistics " - "-------------------------------\n"); - pr_debug("RX_PKT_IGNR_CNT %-8x\n", hwstat->rx_pkt_ignr); - pr_debug("RX_LEN_CHK_ERR_CNT %-8x\n", hwstat->rx_len_chk_err); - pr_debug("RX_LNG_FRM_CNT %-8x\n", hwstat->rx_lng_frm); - pr_debug("RX_SHRT_FRM_CNT %-8x\n", hwstat->rx_shrt_frm); - pr_debug("RX_IPG_VIOL_CNT %-8x\n", hwstat->rx_ipg_viol); - pr_debug("RX_CRC_ERR_CNT %-8x\n", hwstat->rx_crc_err); - pr_debug("RX_OK_PKT_CNT %-8x\n", hwstat->rx_ok_pkt); - pr_debug("RX_CTL_FRM_CNT %-8x\n", hwstat->rx_ctl_frm); - pr_debug("RX_PAUSE_FRM_CNT %-8x\n", hwstat->rx_pause_frm); - pr_debug("RX_MULTICAST_CNT %-8x\n", hwstat->rx_multicast); - pr_debug("RX_BROADCAST_CNT %-8x\n", hwstat->rx_broadcast); - pr_debug("RX_VLAN_TAG_CNT %-8x\n", hwstat->rx_vlan_tag); - pr_debug("RX_PRE_SHRINK_CNT %-8x\n", hwstat->rx_pre_shrink); - pr_debug("RX_DRIB_NIB_CNT %-8x\n", hwstat->rx_drib_nib); - pr_debug("RX_UNSUP_OPCD_CNT %-8x\n", hwstat->rx_unsup_opcd); - pr_debug("RX_BYTE_CNT %-8x\n", hwstat->rx_byte); - pr_debug("----------------------------- TX statistics " - "-------------------------------\n"); - pr_debug("TX_UNICAST_CNT %-8x\n", hwstat->tx_unicast); - pr_debug("TX_PAUSE_FRM_CNT %-8x\n", hwstat->tx_pause_frm); - pr_debug("TX_MULTICAST_CNT %-8x\n", hwstat->tx_multicast); - pr_debug("TX_BRDCAST_CNT %-8x\n", hwstat->tx_brdcast); - pr_debug("TX_VLAN_TAG_CNT %-8x\n", hwstat->tx_vlan_tag); - pr_debug("TX_BAD_FCS_CNT %-8x\n", hwstat->tx_bad_fcs); - pr_debug("TX_JUMBO_CNT %-8x\n", hwstat->tx_jumbo); - pr_debug("TX_BYTE_CNT %-8x\n", hwstat->tx_byte); -} - -static struct net_device_stats *dnet_get_stats(struct net_device *dev) -{ - - struct dnet *bp = netdev_priv(dev); - struct net_device_stats *nstat = &dev->stats; - struct dnet_stats *hwstat = &bp->hw_stats; - - /* read stats from hardware */ - dnet_update_stats(bp); - - /* Convert HW stats into netdevice stats */ - nstat->rx_errors = (hwstat->rx_len_chk_err + - hwstat->rx_lng_frm + hwstat->rx_shrt_frm + - /* ignore IGP violation error - hwstat->rx_ipg_viol + */ - hwstat->rx_crc_err + - hwstat->rx_pre_shrink + - hwstat->rx_drib_nib + hwstat->rx_unsup_opcd); - nstat->tx_errors = hwstat->tx_bad_fcs; - nstat->rx_length_errors = (hwstat->rx_len_chk_err + - hwstat->rx_lng_frm + - hwstat->rx_shrt_frm + hwstat->rx_pre_shrink); - nstat->rx_crc_errors = hwstat->rx_crc_err; - nstat->rx_frame_errors = hwstat->rx_pre_shrink + hwstat->rx_drib_nib; - nstat->rx_packets = hwstat->rx_ok_pkt; - nstat->tx_packets = (hwstat->tx_unicast + - hwstat->tx_multicast + hwstat->tx_brdcast); - nstat->rx_bytes = hwstat->rx_byte; - nstat->tx_bytes = hwstat->tx_byte; - nstat->multicast = hwstat->rx_multicast; - nstat->rx_missed_errors = hwstat->rx_pkt_ignr; - - dnet_print_pretty_hwstats(hwstat); - - return nstat; -} - -static int dnet_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) -{ - struct dnet *bp = netdev_priv(dev); - struct phy_device *phydev = bp->phy_dev; - - if (!phydev) - return -ENODEV; - - return phy_ethtool_gset(phydev, cmd); -} - -static int dnet_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) -{ - struct dnet *bp = netdev_priv(dev); - struct phy_device *phydev = bp->phy_dev; - - if (!phydev) - return -ENODEV; - - return phy_ethtool_sset(phydev, cmd); -} - -static int dnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) -{ - struct dnet *bp = netdev_priv(dev); - struct phy_device *phydev = bp->phy_dev; - - if (!netif_running(dev)) - return -EINVAL; - - if (!phydev) - return -ENODEV; - - return phy_mii_ioctl(phydev, if_mii(rq), cmd); -} - -static void dnet_get_drvinfo(struct net_device *dev, - struct ethtool_drvinfo *info) -{ - strcpy(info->driver, DRV_NAME); - strcpy(info->version, DRV_VERSION); - strcpy(info->bus_info, "0"); -} - -static const struct ethtool_ops dnet_ethtool_ops = { - .get_settings = dnet_get_settings, - .set_settings = dnet_set_settings, - .get_drvinfo = dnet_get_drvinfo, - .get_link = ethtool_op_get_link, -}; - -static const struct net_device_ops dnet_netdev_ops = { - .ndo_open = dnet_open, - .ndo_stop = dnet_close, - .ndo_get_stats = dnet_get_stats, - .ndo_start_xmit = dnet_start_xmit, - .ndo_do_ioctl = dnet_ioctl, - .ndo_set_mac_address = eth_mac_addr, - .ndo_validate_addr = eth_validate_addr, - .ndo_change_mtu = eth_change_mtu, -}; - -static int __devinit dnet_probe(struct platform_device *pdev) -{ - struct resource *res; - struct net_device *dev; - struct dnet *bp; - struct phy_device *phydev; - int err = -ENXIO; - unsigned int mem_base, mem_size, irq; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "no mmio resource defined\n"); - goto err_out; - } - mem_base = res->start; - mem_size = resource_size(res); - irq = platform_get_irq(pdev, 0); - - if (!request_mem_region(mem_base, mem_size, DRV_NAME)) { - dev_err(&pdev->dev, "no memory region available\n"); - err = -EBUSY; - goto err_out; - } - - err = -ENOMEM; - dev = alloc_etherdev(sizeof(*bp)); - if (!dev) { - dev_err(&pdev->dev, "etherdev alloc failed, aborting.\n"); - goto err_out; - } - - /* TODO: Actually, we have some interesting features... */ - dev->features |= 0; - - bp = netdev_priv(dev); - bp->dev = dev; - - SET_NETDEV_DEV(dev, &pdev->dev); - - spin_lock_init(&bp->lock); - - bp->regs = ioremap(mem_base, mem_size); - if (!bp->regs) { - dev_err(&pdev->dev, "failed to map registers, aborting.\n"); - err = -ENOMEM; - goto err_out_free_dev; - } - - dev->irq = irq; - err = request_irq(dev->irq, dnet_interrupt, 0, DRV_NAME, dev); - if (err) { - dev_err(&pdev->dev, "Unable to request IRQ %d (error %d)\n", - irq, err); - goto err_out_iounmap; - } - - dev->netdev_ops = &dnet_netdev_ops; - netif_napi_add(dev, &bp->napi, dnet_poll, 64); - dev->ethtool_ops = &dnet_ethtool_ops; - - dev->base_addr = (unsigned long)bp->regs; - - bp->capabilities = dnet_readl(bp, VERCAPS) & DNET_CAPS_MASK; - - dnet_get_hwaddr(bp); - - if (!is_valid_ether_addr(dev->dev_addr)) { - /* choose a random ethernet address */ - random_ether_addr(dev->dev_addr); - __dnet_set_hwaddr(bp); - } - - err = register_netdev(dev); - if (err) { - dev_err(&pdev->dev, "Cannot register net device, aborting.\n"); - goto err_out_free_irq; - } - - /* register the PHY board fixup (for Marvell 88E1111) */ - err = phy_register_fixup_for_uid(0x01410cc0, 0xfffffff0, - dnet_phy_marvell_fixup); - /* we can live without it, so just issue a warning */ - if (err) - dev_warn(&pdev->dev, "Cannot register PHY board fixup.\n"); - - if (dnet_mii_init(bp) != 0) - goto err_out_unregister_netdev; - - dev_info(&pdev->dev, "Dave DNET at 0x%p (0x%08x) irq %d %pM\n", - bp->regs, mem_base, dev->irq, dev->dev_addr); - dev_info(&pdev->dev, "has %smdio, %sirq, %sgigabit, %sdma \n", - (bp->capabilities & DNET_HAS_MDIO) ? "" : "no ", - (bp->capabilities & DNET_HAS_IRQ) ? "" : "no ", - (bp->capabilities & DNET_HAS_GIGABIT) ? "" : "no ", - (bp->capabilities & DNET_HAS_DMA) ? "" : "no "); - phydev = bp->phy_dev; - dev_info(&pdev->dev, "attached PHY driver [%s] " - "(mii_bus:phy_addr=%s, irq=%d)\n", - phydev->drv->name, dev_name(&phydev->dev), phydev->irq); - - return 0; - -err_out_unregister_netdev: - unregister_netdev(dev); -err_out_free_irq: - free_irq(dev->irq, dev); -err_out_iounmap: - iounmap(bp->regs); -err_out_free_dev: - free_netdev(dev); -err_out: - return err; -} - -static int __devexit dnet_remove(struct platform_device *pdev) -{ - - struct net_device *dev; - struct dnet *bp; - - dev = platform_get_drvdata(pdev); - - if (dev) { - bp = netdev_priv(dev); - if (bp->phy_dev) - phy_disconnect(bp->phy_dev); - mdiobus_unregister(bp->mii_bus); - kfree(bp->mii_bus->irq); - mdiobus_free(bp->mii_bus); - unregister_netdev(dev); - free_irq(dev->irq, dev); - iounmap(bp->regs); - free_netdev(dev); - } - - return 0; -} - -static struct platform_driver dnet_driver = { - .probe = dnet_probe, - .remove = __devexit_p(dnet_remove), - .driver = { - .name = "dnet", - }, -}; - -static int __init dnet_init(void) -{ - return platform_driver_register(&dnet_driver); -} - -static void __exit dnet_exit(void) -{ - platform_driver_unregister(&dnet_driver); -} - -module_init(dnet_init); -module_exit(dnet_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("Dave DNET Ethernet driver"); -MODULE_AUTHOR("Ilya Yanok , " - "Matteo Vit "); diff --git a/trunk/drivers/net/dnet.h b/trunk/drivers/net/dnet.h deleted file mode 100644 index 37f5b30fa78b..000000000000 --- a/trunk/drivers/net/dnet.h +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Dave DNET Ethernet Controller driver - * - * Copyright (C) 2008 Dave S.r.l. - * - * 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 _DNET_H -#define _DNET_H - -#define DRV_NAME "dnet" -#define DRV_VERSION "0.9.1" -#define PFX DRV_NAME ": " - -/* Register access macros */ -#define dnet_writel(port, value, reg) \ - writel((value), (port)->regs + DNET_##reg) -#define dnet_readl(port, reg) readl((port)->regs + DNET_##reg) - -/* ALL DNET FIFO REGISTERS */ -#define DNET_RX_LEN_FIFO 0x000 /* RX_LEN_FIFO */ -#define DNET_RX_DATA_FIFO 0x004 /* RX_DATA_FIFO */ -#define DNET_TX_LEN_FIFO 0x008 /* TX_LEN_FIFO */ -#define DNET_TX_DATA_FIFO 0x00C /* TX_DATA_FIFO */ - -/* ALL DNET CONTROL/STATUS REGISTERS OFFSETS */ -#define DNET_VERCAPS 0x100 /* VERCAPS */ -#define DNET_INTR_SRC 0x104 /* INTR_SRC */ -#define DNET_INTR_ENB 0x108 /* INTR_ENB */ -#define DNET_RX_STATUS 0x10C /* RX_STATUS */ -#define DNET_TX_STATUS 0x110 /* TX_STATUS */ -#define DNET_RX_FRAMES_CNT 0x114 /* RX_FRAMES_CNT */ -#define DNET_TX_FRAMES_CNT 0x118 /* TX_FRAMES_CNT */ -#define DNET_RX_FIFO_TH 0x11C /* RX_FIFO_TH */ -#define DNET_TX_FIFO_TH 0x120 /* TX_FIFO_TH */ -#define DNET_SYS_CTL 0x124 /* SYS_CTL */ -#define DNET_PAUSE_TMR 0x128 /* PAUSE_TMR */ -#define DNET_RX_FIFO_WCNT 0x12C /* RX_FIFO_WCNT */ -#define DNET_TX_FIFO_WCNT 0x130 /* TX_FIFO_WCNT */ - -/* ALL DNET MAC REGISTERS */ -#define DNET_MACREG_DATA 0x200 /* Mac-Reg Data */ -#define DNET_MACREG_ADDR 0x204 /* Mac-Reg Addr */ - -/* ALL DNET RX STATISTICS COUNTERS */ -#define DNET_RX_PKT_IGNR_CNT 0x300 -#define DNET_RX_LEN_CHK_ERR_CNT 0x304 -#define DNET_RX_LNG_FRM_CNT 0x308 -#define DNET_RX_SHRT_FRM_CNT 0x30C -#define DNET_RX_IPG_VIOL_CNT 0x310 -#define DNET_RX_CRC_ERR_CNT 0x314 -#define DNET_RX_OK_PKT_CNT 0x318 -#define DNET_RX_CTL_FRM_CNT 0x31C -#define DNET_RX_PAUSE_FRM_CNT 0x320 -#define DNET_RX_MULTICAST_CNT 0x324 -#define DNET_RX_BROADCAST_CNT 0x328 -#define DNET_RX_VLAN_TAG_CNT 0x32C -#define DNET_RX_PRE_SHRINK_CNT 0x330 -#define DNET_RX_DRIB_NIB_CNT 0x334 -#define DNET_RX_UNSUP_OPCD_CNT 0x338 -#define DNET_RX_BYTE_CNT 0x33C - -/* DNET TX STATISTICS COUNTERS */ -#define DNET_TX_UNICAST_CNT 0x400 -#define DNET_TX_PAUSE_FRM_CNT 0x404 -#define DNET_TX_MULTICAST_CNT 0x408 -#define DNET_TX_BRDCAST_CNT 0x40C -#define DNET_TX_VLAN_TAG_CNT 0x410 -#define DNET_TX_BAD_FCS_CNT 0x414 -#define DNET_TX_JUMBO_CNT 0x418 -#define DNET_TX_BYTE_CNT 0x41C - -/* SOME INTERNAL MAC-CORE REGISTER */ -#define DNET_INTERNAL_MODE_REG 0x0 -#define DNET_INTERNAL_RXTX_CONTROL_REG 0x2 -#define DNET_INTERNAL_MAX_PKT_SIZE_REG 0x4 -#define DNET_INTERNAL_IGP_REG 0x8 -#define DNET_INTERNAL_MAC_ADDR_0_REG 0xa -#define DNET_INTERNAL_MAC_ADDR_1_REG 0xc -#define DNET_INTERNAL_MAC_ADDR_2_REG 0xe -#define DNET_INTERNAL_TX_RX_STS_REG 0x12 -#define DNET_INTERNAL_GMII_MNG_CTL_REG 0x14 -#define DNET_INTERNAL_GMII_MNG_DAT_REG 0x16 - -#define DNET_INTERNAL_GMII_MNG_CMD_FIN (1 << 14) - -#define DNET_INTERNAL_WRITE (1 << 31) - -/* MAC-CORE REGISTER FIELDS */ - -/* MAC-CORE MODE REGISTER FIELDS */ -#define DNET_INTERNAL_MODE_GBITEN (1 << 0) -#define DNET_INTERNAL_MODE_FCEN (1 << 1) -#define DNET_INTERNAL_MODE_RXEN (1 << 2) -#define DNET_INTERNAL_MODE_TXEN (1 << 3) - -/* MAC-CORE RXTX CONTROL REGISTER FIELDS */ -#define DNET_INTERNAL_RXTX_CONTROL_RXSHORTFRAME (1 << 8) -#define DNET_INTERNAL_RXTX_CONTROL_RXBROADCAST (1 << 7) -#define DNET_INTERNAL_RXTX_CONTROL_RXMULTICAST (1 << 4) -#define DNET_INTERNAL_RXTX_CONTROL_RXPAUSE (1 << 3) -#define DNET_INTERNAL_RXTX_CONTROL_DISTXFCS (1 << 2) -#define DNET_INTERNAL_RXTX_CONTROL_DISCFXFCS (1 << 1) -#define DNET_INTERNAL_RXTX_CONTROL_ENPROMISC (1 << 0) -#define DNET_INTERNAL_RXTX_CONTROL_DROPCONTROL (1 << 6) -#define DNET_INTERNAL_RXTX_CONTROL_ENABLEHALFDUP (1 << 5) - -/* SYSTEM CONTROL REGISTER FIELDS */ -#define DNET_SYS_CTL_IGNORENEXTPKT (1 << 0) -#define DNET_SYS_CTL_SENDPAUSE (1 << 2) -#define DNET_SYS_CTL_RXFIFOFLUSH (1 << 3) -#define DNET_SYS_CTL_TXFIFOFLUSH (1 << 4) - -/* TX STATUS REGISTER FIELDS */ -#define DNET_TX_STATUS_FIFO_ALMOST_EMPTY (1 << 2) -#define DNET_TX_STATUS_FIFO_ALMOST_FULL (1 << 1) - -/* INTERRUPT SOURCE REGISTER FIELDS */ -#define DNET_INTR_SRC_TX_PKTSENT (1 << 0) -#define DNET_INTR_SRC_TX_FIFOAF (1 << 1) -#define DNET_INTR_SRC_TX_FIFOAE (1 << 2) -#define DNET_INTR_SRC_TX_DISCFRM (1 << 3) -#define DNET_INTR_SRC_TX_FIFOFULL (1 << 4) -#define DNET_INTR_SRC_RX_CMDFIFOAF (1 << 8) -#define DNET_INTR_SRC_RX_CMDFIFOFF (1 << 9) -#define DNET_INTR_SRC_RX_DATAFIFOFF (1 << 10) -#define DNET_INTR_SRC_TX_SUMMARY (1 << 16) -#define DNET_INTR_SRC_RX_SUMMARY (1 << 17) -#define DNET_INTR_SRC_PHY (1 << 19) - -/* INTERRUPT ENABLE REGISTER FIELDS */ -#define DNET_INTR_ENB_TX_PKTSENT (1 << 0) -#define DNET_INTR_ENB_TX_FIFOAF (1 << 1) -#define DNET_INTR_ENB_TX_FIFOAE (1 << 2) -#define DNET_INTR_ENB_TX_DISCFRM (1 << 3) -#define DNET_INTR_ENB_TX_FIFOFULL (1 << 4) -#define DNET_INTR_ENB_RX_PKTRDY (1 << 8) -#define DNET_INTR_ENB_RX_FIFOAF (1 << 9) -#define DNET_INTR_ENB_RX_FIFOERR (1 << 10) -#define DNET_INTR_ENB_RX_ERROR (1 << 11) -#define DNET_INTR_ENB_RX_FIFOFULL (1 << 12) -#define DNET_INTR_ENB_RX_FIFOAE (1 << 13) -#define DNET_INTR_ENB_TX_SUMMARY (1 << 16) -#define DNET_INTR_ENB_RX_SUMMARY (1 << 17) -#define DNET_INTR_ENB_GLOBAL_ENABLE (1 << 18) - -/* default values: - * almost empty = less than one full sized ethernet frame (no jumbo) inside - * the fifo almost full = can write less than one full sized ethernet frame - * (no jumbo) inside the fifo - */ -#define DNET_CFG_TX_FIFO_FULL_THRES 25 -#define DNET_CFG_RX_FIFO_FULL_THRES 20 - -/* - * Capabilities. Used by the driver to know the capabilities that the ethernet - * controller inside the FPGA have. - */ - -#define DNET_HAS_MDIO (1 << 0) -#define DNET_HAS_IRQ (1 << 1) -#define DNET_HAS_GIGABIT (1 << 2) -#define DNET_HAS_DMA (1 << 3) - -#define DNET_HAS_MII (1 << 4) /* or GMII */ -#define DNET_HAS_RMII (1 << 5) /* or RGMII */ - -#define DNET_CAPS_MASK 0xFFFF - -#define DNET_FIFO_SIZE 1024 /* 1K x 32 bit */ -#define DNET_FIFO_TX_DATA_AF_TH (DNET_FIFO_SIZE - 384) /* 384 = 1536 / 4 */ -#define DNET_FIFO_TX_DATA_AE_TH 384 - -#define DNET_FIFO_RX_CMD_AF_TH (1 << 16) /* just one frame inside the FIFO */ - -/* - * Hardware-collected statistics. - */ -struct dnet_stats { - u32 rx_pkt_ignr; - u32 rx_len_chk_err; - u32 rx_lng_frm; - u32 rx_shrt_frm; - u32 rx_ipg_viol; - u32 rx_crc_err; - u32 rx_ok_pkt; - u32 rx_ctl_frm; - u32 rx_pause_frm; - u32 rx_multicast; - u32 rx_broadcast; - u32 rx_vlan_tag; - u32 rx_pre_shrink; - u32 rx_drib_nib; - u32 rx_unsup_opcd; - u32 rx_byte; - u32 tx_unicast; - u32 tx_pause_frm; - u32 tx_multicast; - u32 tx_brdcast; - u32 tx_vlan_tag; - u32 tx_bad_fcs; - u32 tx_jumbo; - u32 tx_byte; -}; - -struct dnet { - void __iomem *regs; - spinlock_t lock; - struct platform_device *pdev; - struct net_device *dev; - struct dnet_stats hw_stats; - unsigned int capabilities; /* read from FPGA */ - struct napi_struct napi; - - /* PHY stuff */ - struct mii_bus *mii_bus; - struct phy_device *phy_dev; - unsigned int link; - unsigned int speed; - unsigned int duplex; -}; - -#endif /* _DNET_H */ diff --git a/trunk/drivers/net/ibm_newemac/core.c b/trunk/drivers/net/ibm_newemac/core.c index 6fd7aa61736e..87a706694fb3 100644 --- a/trunk/drivers/net/ibm_newemac/core.c +++ b/trunk/drivers/net/ibm_newemac/core.c @@ -2594,9 +2594,6 @@ static int __devinit emac_init_config(struct emac_instance *dev) if (of_device_is_compatible(np, "ibm,emac-460ex") || of_device_is_compatible(np, "ibm,emac-460gt")) dev->features |= EMAC_FTR_460EX_PHY_CLK_FIX; - if (of_device_is_compatible(np, "ibm,emac-405ex") || - of_device_is_compatible(np, "ibm,emac-405exr")) - dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; } else if (of_device_is_compatible(np, "ibm,emac4")) { dev->features |= EMAC_FTR_EMAC4; if (of_device_is_compatible(np, "ibm,emac-440gx")) diff --git a/trunk/drivers/net/igb/igb_main.c b/trunk/drivers/net/igb/igb_main.c index 9dd13ad12ce4..a50db5398fa5 100644 --- a/trunk/drivers/net/igb/igb_main.c +++ b/trunk/drivers/net/igb/igb_main.c @@ -1023,10 +1023,11 @@ static int __devinit igb_probe(struct pci_dev *pdev, struct net_device *netdev; struct igb_adapter *adapter; struct e1000_hw *hw; + struct pci_dev *us_dev; const struct e1000_info *ei = igb_info_tbl[ent->driver_data]; unsigned long mmio_start, mmio_len; - int i, err, pci_using_dac; - u16 eeprom_data = 0; + int i, err, pci_using_dac, pos; + u16 eeprom_data = 0, state = 0; u16 eeprom_apme_mask = IGB_EEPROM_APME; u32 part_num; int bars, need_ioport; @@ -1061,6 +1062,27 @@ static int __devinit igb_probe(struct pci_dev *pdev, } } + /* 82575 requires that the pci-e link partner disable the L0s state */ + switch (pdev->device) { + case E1000_DEV_ID_82575EB_COPPER: + case E1000_DEV_ID_82575EB_FIBER_SERDES: + case E1000_DEV_ID_82575GB_QUAD_COPPER: + us_dev = pdev->bus->self; + pos = pci_find_capability(us_dev, PCI_CAP_ID_EXP); + if (pos) { + pci_read_config_word(us_dev, pos + PCI_EXP_LNKCTL, + &state); + state &= ~PCIE_LINK_STATE_L0S; + pci_write_config_word(us_dev, pos + PCI_EXP_LNKCTL, + state); + dev_info(&pdev->dev, + "Disabling ASPM L0s upstream switch port %s\n", + pci_name(us_dev)); + } + default: + break; + } + err = pci_request_selected_regions(pdev, bars, igb_driver_name); if (err) goto err_pci_reg; diff --git a/trunk/drivers/net/ixgbe/ixgbe_main.c b/trunk/drivers/net/ixgbe/ixgbe_main.c index 5d364a96e35d..d2f4d5f508b7 100644 --- a/trunk/drivers/net/ixgbe/ixgbe_main.c +++ b/trunk/drivers/net/ixgbe/ixgbe_main.c @@ -3973,7 +3973,6 @@ static const struct net_device_ops ixgbe_netdev_ops = { .ndo_stop = ixgbe_close, .ndo_start_xmit = ixgbe_xmit_frame, .ndo_get_stats = ixgbe_get_stats, - .ndo_set_rx_mode = ixgbe_set_rx_mode, .ndo_set_multicast_list = ixgbe_set_rx_mode, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = ixgbe_set_mac, diff --git a/trunk/drivers/net/mv643xx_eth.c b/trunk/drivers/net/mv643xx_eth.c index b0bc3bc18e9c..13f11f402a99 100644 --- a/trunk/drivers/net/mv643xx_eth.c +++ b/trunk/drivers/net/mv643xx_eth.c @@ -2029,6 +2029,11 @@ static void port_start(struct mv643xx_eth_private *mp) txq_set_fixed_prio_mode(txq); } + /* + * Add configured unicast address to address filter table. + */ + mv643xx_eth_program_unicast_filter(mp->dev); + /* * Receive all unmatched unicast, TCP, UDP, BPDU and broadcast * frames to RX queue #0, and include the pseudo-header when @@ -2041,11 +2046,6 @@ static void port_start(struct mv643xx_eth_private *mp) */ wrlp(mp, PORT_CONFIG_EXT, 0x00000000); - /* - * Add configured unicast addresses to address filter table. - */ - mv643xx_eth_program_unicast_filter(mp->dev); - /* * Enable the receive queues. */ diff --git a/trunk/drivers/net/netxen/netxen_nic.h b/trunk/drivers/net/netxen/netxen_nic.h index 1ff066b2281a..f4dd9acb6877 100644 --- a/trunk/drivers/net/netxen/netxen_nic.h +++ b/trunk/drivers/net/netxen/netxen_nic.h @@ -1595,6 +1595,7 @@ dma_watchdog_wakeup(struct netxen_adapter *adapter) } +int netxen_is_flash_supported(struct netxen_adapter *adapter); int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 *mac); int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, __le64 *mac); extern void netxen_change_ringparam(struct netxen_adapter *adapter); diff --git a/trunk/drivers/net/netxen/netxen_nic_hw.c b/trunk/drivers/net/netxen/netxen_nic_hw.c index 7fea77088108..821cff68b3f3 100644 --- a/trunk/drivers/net/netxen/netxen_nic_hw.c +++ b/trunk/drivers/net/netxen/netxen_nic_hw.c @@ -706,6 +706,28 @@ int netxen_nic_change_mtu(struct net_device *netdev, int mtu) return rc; } +int netxen_is_flash_supported(struct netxen_adapter *adapter) +{ + const int locs[] = { 0, 0x4, 0x100, 0x4000, 0x4128 }; + int addr, val01, val02, i, j; + + /* if the flash size less than 4Mb, make huge war cry and die */ + for (j = 1; j < 4; j++) { + addr = j * NETXEN_NIC_WINDOW_MARGIN; + for (i = 0; i < ARRAY_SIZE(locs); i++) { + if (netxen_rom_fast_read(adapter, locs[i], &val01) == 0 + && netxen_rom_fast_read(adapter, (addr + locs[i]), + &val02) == 0) { + if (val01 == val02) + return -1; + } else + return -1; + } + } + + return 0; +} + static int netxen_get_flash_block(struct netxen_adapter *adapter, int base, int size, __le32 * buf) { diff --git a/trunk/drivers/net/netxen/netxen_nic_main.c b/trunk/drivers/net/netxen/netxen_nic_main.c index c172b6e24a96..13087782ac40 100644 --- a/trunk/drivers/net/netxen/netxen_nic_main.c +++ b/trunk/drivers/net/netxen/netxen_nic_main.c @@ -405,6 +405,9 @@ netxen_read_mac_addr(struct netxen_adapter *adapter) struct net_device *netdev = adapter->netdev; struct pci_dev *pdev = adapter->pdev; + if (netxen_is_flash_supported(adapter) != 0) + return -EIO; + if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { if (netxen_p3_get_mac_addr(adapter, &mac_addr) != 0) return -EIO; diff --git a/trunk/drivers/net/qlge/qlge.h b/trunk/drivers/net/qlge/qlge.h index aff9c5fec738..e6fdce9206cc 100644 --- a/trunk/drivers/net/qlge/qlge.h +++ b/trunk/drivers/net/qlge/qlge.h @@ -927,7 +927,6 @@ struct ib_mac_iocb_rsp { u8 flags1; #define IB_MAC_IOCB_RSP_OI 0x01 /* Overide intr delay */ #define IB_MAC_IOCB_RSP_I 0x02 /* Disble Intr Generation */ -#define IB_MAC_CSUM_ERR_MASK 0x1c /* A mask to use for csum errs */ #define IB_MAC_IOCB_RSP_TE 0x04 /* Checksum error */ #define IB_MAC_IOCB_RSP_NU 0x08 /* No checksum rcvd */ #define IB_MAC_IOCB_RSP_IE 0x10 /* IPv4 checksum error */ diff --git a/trunk/drivers/net/qlge/qlge_main.c b/trunk/drivers/net/qlge/qlge_main.c index 91191f761fba..8ea72dc60f79 100644 --- a/trunk/drivers/net/qlge/qlge_main.c +++ b/trunk/drivers/net/qlge/qlge_main.c @@ -1436,32 +1436,18 @@ static void ql_process_mac_rx_intr(struct ql_adapter *qdev, if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_P) { QPRINTK(qdev, RX_STATUS, DEBUG, "Promiscuous Packet.\n"); } - - skb->protocol = eth_type_trans(skb, ndev); - skb->ip_summed = CHECKSUM_NONE; - - /* If rx checksum is on, and there are no - * csum or frame errors. - */ - if (qdev->rx_csum && - !(ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) && - !(ib_mac_rsp->flags1 & IB_MAC_CSUM_ERR_MASK)) { - /* TCP frame. */ - if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_T) { - QPRINTK(qdev, RX_STATUS, DEBUG, - "TCP checksum done!\n"); - skb->ip_summed = CHECKSUM_UNNECESSARY; - } else if ((ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_U) && - (ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_V4)) { - /* Unfragmented ipv4 UDP frame. */ - struct iphdr *iph = (struct iphdr *) skb->data; - if (!(iph->frag_off & - cpu_to_be16(IP_MF|IP_OFFSET))) { - skb->ip_summed = CHECKSUM_UNNECESSARY; - QPRINTK(qdev, RX_STATUS, DEBUG, - "TCP checksum done!\n"); - } - } + if (ib_mac_rsp->flags1 & (IB_MAC_IOCB_RSP_IE | IB_MAC_IOCB_RSP_TE)) { + QPRINTK(qdev, RX_STATUS, ERR, + "Bad checksum for this %s packet.\n", + ((ib_mac_rsp-> + flags2 & IB_MAC_IOCB_RSP_T) ? "TCP" : "UDP")); + skb->ip_summed = CHECKSUM_NONE; + } else if (qdev->rx_csum && + ((ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_T) || + ((ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_U) && + !(ib_mac_rsp->flags1 & IB_MAC_IOCB_RSP_NU)))) { + QPRINTK(qdev, RX_STATUS, DEBUG, "RX checksum done!\n"); + skb->ip_summed = CHECKSUM_UNNECESSARY; } qdev->stats.rx_packets++; qdev->stats.rx_bytes += skb->len; @@ -1941,9 +1927,6 @@ static int qlge_send(struct sk_buff *skb, struct net_device *ndev) tx_ring = &qdev->tx_ring[tx_ring_idx]; - if (skb_padto(skb, ETH_ZLEN)) - return NETDEV_TX_OK; - if (unlikely(atomic_read(&tx_ring->tx_count) < 2)) { QPRINTK(qdev, TX_QUEUED, INFO, "%s: shutting down tx queue %d du to lack of resources.\n", @@ -2987,9 +2970,9 @@ static int ql_adapter_initialize(struct ql_adapter *qdev) mask = value << 16; ql_write32(qdev, SYS, mask | value); - /* Set the default queue, and VLAN behavior. */ - value = NIC_RCV_CFG_DFQ | NIC_RCV_CFG_RV; - mask = NIC_RCV_CFG_DFQ_MASK | (NIC_RCV_CFG_RV << 16); + /* Set the default queue. */ + value = NIC_RCV_CFG_DFQ; + mask = NIC_RCV_CFG_DFQ_MASK; ql_write32(qdev, NIC_RCV_CFG, (mask | value)); /* Set the MPI interrupt to enabled. */ @@ -3166,11 +3149,6 @@ static int ql_adapter_down(struct ql_adapter *qdev) ql_tx_ring_clean(qdev); - /* Call netif_napi_del() from common point. - */ - for (i = qdev->rss_ring_first_cq_id; i < qdev->rx_ring_count; i++) - netif_napi_del(&qdev->rx_ring[i].napi); - spin_lock(&qdev->hw_lock); status = ql_adapter_reset(qdev); if (status) @@ -3875,7 +3853,7 @@ static int qlge_suspend(struct pci_dev *pdev, pm_message_t state) { struct net_device *ndev = pci_get_drvdata(pdev); struct ql_adapter *qdev = netdev_priv(ndev); - int err; + int err, i; netif_device_detach(ndev); @@ -3885,6 +3863,9 @@ static int qlge_suspend(struct pci_dev *pdev, pm_message_t state) return err; } + for (i = qdev->rss_ring_first_cq_id; i < qdev->rx_ring_count; i++) + netif_napi_del(&qdev->rx_ring[i].napi); + err = pci_save_state(pdev); if (err) return err; diff --git a/trunk/drivers/net/r8169.c b/trunk/drivers/net/r8169.c index 43fedb9ecedb..b3473401c83a 100644 --- a/trunk/drivers/net/r8169.c +++ b/trunk/drivers/net/r8169.c @@ -81,9 +81,9 @@ static const int multicast_filter_limit = 32; #define RTL8169_TX_TIMEOUT (6*HZ) #define RTL8169_PHY_TIMEOUT (10*HZ) -#define RTL_EEPROM_SIG cpu_to_le32(0x8129) -#define RTL_EEPROM_SIG_MASK cpu_to_le32(0xffff) +#define RTL_EEPROM_SIG 0x8129 #define RTL_EEPROM_SIG_ADDR 0x0000 +#define RTL_EEPROM_MAC_ADDR 0x0007 /* write/read MMIO register */ #define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg)) @@ -293,6 +293,11 @@ enum rtl_register_content { /* Cfg9346Bits */ Cfg9346_Lock = 0x00, Cfg9346_Unlock = 0xc0, + Cfg9346_Program = 0x80, /* Programming mode */ + Cfg9346_EECS = 0x08, /* Chip select */ + Cfg9346_EESK = 0x04, /* Serial data clock */ + Cfg9346_EEDI = 0x02, /* Data input */ + Cfg9346_EEDO = 0x01, /* Data output */ /* rx_mode_bits */ AcceptErr = 0x20, @@ -305,6 +310,7 @@ enum rtl_register_content { /* RxConfigBits */ RxCfgFIFOShift = 13, RxCfgDMAShift = 8, + RxCfg9356SEL = 6, /* EEPROM type: 0 = 9346, 1 = 9356 */ /* TxConfigBits */ TxInterFrameGapShift = 24, @@ -1963,6 +1969,108 @@ static const struct net_device_ops rtl8169_netdev_ops = { }; +/* Delay between EEPROM clock transitions. Force out buffered PCI writes. */ +#define RTL_EEPROM_DELAY() RTL_R8(Cfg9346) +#define RTL_EEPROM_READ_CMD 6 + +/* read 16bit word stored in EEPROM. EEPROM is addressed by words. */ +static u16 rtl_eeprom_read(void __iomem *ioaddr, int addr) +{ + u16 result = 0; + int cmd, cmd_len, i; + + /* check for EEPROM address size (in bits) */ + if (RTL_R32(RxConfig) & (1 << RxCfg9356SEL)) { + /* EEPROM is 93C56 */ + cmd_len = 3 + 8; /* 3 bits for command id and 8 for address */ + cmd = (RTL_EEPROM_READ_CMD << 8) | (addr & 0xff); + } else { + /* EEPROM is 93C46 */ + cmd_len = 3 + 6; /* 3 bits for command id and 6 for address */ + cmd = (RTL_EEPROM_READ_CMD << 6) | (addr & 0x3f); + } + + /* enter programming mode */ + RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS); + RTL_EEPROM_DELAY(); + + /* write command and requested address */ + while (cmd_len--) { + u8 x = Cfg9346_Program | Cfg9346_EECS; + + x |= (cmd & (1 << cmd_len)) ? Cfg9346_EEDI : 0; + + /* write a bit */ + RTL_W8(Cfg9346, x); + RTL_EEPROM_DELAY(); + + /* raise clock */ + RTL_W8(Cfg9346, x | Cfg9346_EESK); + RTL_EEPROM_DELAY(); + } + + /* lower clock */ + RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS); + RTL_EEPROM_DELAY(); + + /* read back 16bit value */ + for (i = 16; i > 0; i--) { + /* raise clock */ + RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS | Cfg9346_EESK); + RTL_EEPROM_DELAY(); + + result <<= 1; + result |= (RTL_R8(Cfg9346) & Cfg9346_EEDO) ? 1 : 0; + + /* lower clock */ + RTL_W8(Cfg9346, Cfg9346_Program | Cfg9346_EECS); + RTL_EEPROM_DELAY(); + } + + RTL_W8(Cfg9346, Cfg9346_Program); + /* leave programming mode */ + RTL_W8(Cfg9346, Cfg9346_Lock); + + return result; +} + +static void rtl_init_mac_address(struct rtl8169_private *tp, + void __iomem *ioaddr) +{ + struct pci_dev *pdev = tp->pci_dev; + u16 x; + u8 mac[8]; + + /* read EEPROM signature */ + x = rtl_eeprom_read(ioaddr, RTL_EEPROM_SIG_ADDR); + + if (x != RTL_EEPROM_SIG) { + dev_info(&pdev->dev, "Missing EEPROM signature: %04x\n", x); + return; + } + + /* read MAC address */ + x = rtl_eeprom_read(ioaddr, RTL_EEPROM_MAC_ADDR); + mac[0] = x & 0xff; + mac[1] = x >> 8; + x = rtl_eeprom_read(ioaddr, RTL_EEPROM_MAC_ADDR + 1); + mac[2] = x & 0xff; + mac[3] = x >> 8; + x = rtl_eeprom_read(ioaddr, RTL_EEPROM_MAC_ADDR + 2); + mac[4] = x & 0xff; + mac[5] = x >> 8; + + if (netif_msg_probe(tp)) { + DECLARE_MAC_BUF(buf); + + dev_info(&pdev->dev, "MAC address found in EEPROM: %s\n", + print_mac(buf, mac)); + } + + if (is_valid_ether_addr(mac)) + rtl_rar_set(tp, mac); +} + static int __devinit rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -2141,6 +2249,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) tp->mmio_addr = ioaddr; + rtl_init_mac_address(tp, ioaddr); + /* Get MAC address */ for (i = 0; i < MAC_ADDR_LEN; i++) dev->dev_addr[i] = RTL_R8(MAC0 + i); @@ -3253,6 +3363,13 @@ static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev) opts1 |= FirstFrag; } else { len = skb->len; + + if (unlikely(len < ETH_ZLEN)) { + if (skb_padto(skb, ETH_ZLEN)) + goto err_update_stats; + len = ETH_ZLEN; + } + opts1 |= FirstFrag | LastFrag; tp->tx_skb[entry].skb = skb; } @@ -3290,6 +3407,7 @@ static int rtl8169_start_xmit(struct sk_buff *skb, struct net_device *dev) err_stop: netif_stop_queue(dev); ret = NETDEV_TX_BUSY; +err_update_stats: dev->stats.tx_dropped++; goto out; } diff --git a/trunk/drivers/net/sh_eth.c b/trunk/drivers/net/sh_eth.c index 7b1882765a0c..7f8e514eb5e9 100644 --- a/trunk/drivers/net/sh_eth.c +++ b/trunk/drivers/net/sh_eth.c @@ -687,7 +687,6 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) { struct net_device *ndev = netdev; struct sh_eth_private *mdp = netdev_priv(ndev); - irqreturn_t ret = IRQ_NONE; u32 ioaddr, boguscnt = RX_RING_SIZE; u32 intr_status = 0; @@ -697,13 +696,7 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) /* Get interrpt stat */ intr_status = ctrl_inl(ioaddr + EESR); /* Clear interrupt */ - if (intr_status & (EESR_FRC | EESR_RMAF | EESR_RRF | - EESR_RTLF | EESR_RTSF | EESR_PRE | EESR_CERF | - TX_CHECK | EESR_ERR_CHECK)) { - ctrl_outl(intr_status, ioaddr + EESR); - ret = IRQ_HANDLED; - } else - goto other_irq; + ctrl_outl(intr_status, ioaddr + EESR); if (intr_status & (EESR_FRC | /* Frame recv*/ EESR_RMAF | /* Multi cast address recv*/ @@ -730,10 +723,9 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev) ndev->name, intr_status); } -other_irq: spin_unlock(&mdp->lock); - return ret; + return IRQ_HANDLED; } static void sh_eth_timer(unsigned long data) @@ -852,13 +844,7 @@ static int sh_eth_open(struct net_device *ndev) int ret = 0; struct sh_eth_private *mdp = netdev_priv(ndev); - ret = request_irq(ndev->irq, &sh_eth_interrupt, -#if defined(CONFIG_CPU_SUBTYPE_SH7763) || defined(CONFIG_CPU_SUBTYPE_SH7764) - IRQF_SHARED, -#else - 0, -#endif - ndev->name, ndev); + ret = request_irq(ndev->irq, &sh_eth_interrupt, 0, ndev->name, ndev); if (ret) { printk(KERN_ERR "Can not assign IRQ number to %s\n", CARDNAME); return ret; diff --git a/trunk/drivers/net/sh_eth.h b/trunk/drivers/net/sh_eth.h index 1537e13e623d..73bc7181cc18 100644 --- a/trunk/drivers/net/sh_eth.h +++ b/trunk/drivers/net/sh_eth.h @@ -43,8 +43,8 @@ #define SH7763_SKB_ALIGN 32 /* Chip Base Address */ -# define SH_TSU_ADDR 0xFEE01800 -# define ARSTR SH_TSU_ADDR +# define SH_TSU_ADDR 0xFFE01800 +# define ARSTR 0xFFE01800 /* Chip Registers */ /* E-DMAC */ diff --git a/trunk/drivers/net/smsc911x.c b/trunk/drivers/net/smsc911x.c index d1590ac55e4b..9a78daec2fe9 100644 --- a/trunk/drivers/net/smsc911x.c +++ b/trunk/drivers/net/smsc911x.c @@ -1225,10 +1225,6 @@ static int smsc911x_open(struct net_device *dev) dev_info(&dev->dev, "SMSC911x/921x identified at %#08lx, IRQ: %d\n", (unsigned long)pdata->ioaddr, dev->irq); - /* Reset the last known duplex and carrier */ - pdata->last_duplex = -1; - pdata->last_carrier = -1; - /* Bring the PHY up */ phy_start(pdata->phy_dev); diff --git a/trunk/drivers/net/sungem.c b/trunk/drivers/net/sungem.c index c9c7650826c0..0fcb7503363d 100644 --- a/trunk/drivers/net/sungem.c +++ b/trunk/drivers/net/sungem.c @@ -2998,11 +2998,8 @@ static const struct net_device_ops gem_netdev_ops = { .ndo_do_ioctl = gem_ioctl, .ndo_tx_timeout = gem_tx_timeout, .ndo_change_mtu = gem_change_mtu, + .ndo_set_mac_address = eth_mac_addr, .ndo_validate_addr = eth_validate_addr, - .ndo_set_mac_address = gem_set_mac_address, -#ifdef CONFIG_NET_POLL_CONTROLLER - .ndo_poll_controller = gem_poll_controller, -#endif }; static int __devinit gem_init_one(struct pci_dev *pdev, @@ -3164,6 +3161,10 @@ static int __devinit gem_init_one(struct pci_dev *pdev, dev->watchdog_timeo = 5 * HZ; dev->irq = pdev->irq; dev->dma = 0; + dev->set_mac_address = gem_set_mac_address; +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = gem_poll_controller; +#endif /* Set that now, in case PM kicks in now */ pci_set_drvdata(pdev, dev); diff --git a/trunk/drivers/net/tulip/tulip_core.c b/trunk/drivers/net/tulip/tulip_core.c index 2abb5d3becc6..bee75fa87a9c 100644 --- a/trunk/drivers/net/tulip/tulip_core.c +++ b/trunk/drivers/net/tulip/tulip_core.c @@ -255,7 +255,6 @@ const char tulip_media_cap[32] = static void tulip_tx_timeout(struct net_device *dev); static void tulip_init_ring(struct net_device *dev); -static void tulip_free_ring(struct net_device *dev); static int tulip_start_xmit(struct sk_buff *skb, struct net_device *dev); static int tulip_open(struct net_device *dev); static int tulip_close(struct net_device *dev); @@ -503,21 +502,16 @@ tulip_open(struct net_device *dev) { int retval; - tulip_init_ring (dev); + if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev))) + return retval; - retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev); - if (retval) - goto free_ring; + tulip_init_ring (dev); tulip_up (dev); netif_start_queue (dev); return 0; - -free_ring: - tulip_free_ring (dev); - return retval; } @@ -774,11 +768,23 @@ static void tulip_down (struct net_device *dev) tulip_set_power_state (tp, 0, 1); } -static void tulip_free_ring (struct net_device *dev) + +static int tulip_close (struct net_device *dev) { struct tulip_private *tp = netdev_priv(dev); + void __iomem *ioaddr = tp->base_addr; int i; + netif_stop_queue (dev); + + tulip_down (dev); + + if (tulip_debug > 1) + printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", + dev->name, ioread32 (ioaddr + CSR5)); + + free_irq (dev->irq, dev); + /* Free all the skbuffs in the Rx queue. */ for (i = 0; i < RX_RING_SIZE; i++) { struct sk_buff *skb = tp->rx_buffers[i].skb; @@ -797,7 +803,6 @@ static void tulip_free_ring (struct net_device *dev) dev_kfree_skb (skb); } } - for (i = 0; i < TX_RING_SIZE; i++) { struct sk_buff *skb = tp->tx_buffers[i].skb; @@ -809,24 +814,6 @@ static void tulip_free_ring (struct net_device *dev) tp->tx_buffers[i].skb = NULL; tp->tx_buffers[i].mapping = 0; } -} - -static int tulip_close (struct net_device *dev) -{ - struct tulip_private *tp = netdev_priv(dev); - void __iomem *ioaddr = tp->base_addr; - - netif_stop_queue (dev); - - tulip_down (dev); - - if (tulip_debug > 1) - printk (KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n", - dev->name, ioread32 (ioaddr + CSR5)); - - free_irq (dev->irq, dev); - - tulip_free_ring (dev); return 0; } diff --git a/trunk/drivers/net/ucc_geth.c b/trunk/drivers/net/ucc_geth.c index 1f61e42c641d..e87986867ba5 100644 --- a/trunk/drivers/net/ucc_geth.c +++ b/trunk/drivers/net/ucc_geth.c @@ -1536,15 +1536,32 @@ static void adjust_link(struct net_device *dev) static int init_phy(struct net_device *dev) { struct ucc_geth_private *priv = netdev_priv(dev); - struct ucc_geth_info *ug_info = priv->ug_info; + struct device_node *np = priv->node; + struct device_node *phy, *mdio; + const phandle *ph; + char bus_name[MII_BUS_ID_SIZE]; + const unsigned int *id; struct phy_device *phydev; + char phy_id[BUS_ID_SIZE]; priv->oldlink = 0; priv->oldspeed = 0; priv->oldduplex = -1; - phydev = phy_connect(dev, ug_info->phy_bus_id, &adjust_link, 0, - priv->phy_interface); + ph = of_get_property(np, "phy-handle", NULL); + phy = of_find_node_by_phandle(*ph); + mdio = of_get_parent(phy); + + id = of_get_property(phy, "reg", NULL); + + of_node_put(phy); + of_node_put(mdio); + + uec_mdio_bus_name(bus_name, mdio); + snprintf(phy_id, sizeof(phy_id), "%s:%02x", + bus_name, *id); + + phydev = phy_connect(dev, phy_id, &adjust_link, 0, priv->phy_interface); if (IS_ERR(phydev)) { printk("%s: Could not attach to PHY\n", dev->name); @@ -3612,12 +3629,10 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); fixed_link = of_get_property(np, "fixed-link", NULL); if (fixed_link) { - snprintf(ug_info->phy_bus_id, sizeof(ug_info->phy_bus_id), - PHY_ID_FMT, "0", fixed_link[0]); + snprintf(ug_info->mdio_bus, MII_BUS_ID_SIZE, "0"); + ug_info->phy_address = fixed_link[0]; phy = NULL; } else { - char bus_name[MII_BUS_ID_SIZE]; - ph = of_get_property(np, "phy-handle", NULL); phy = of_find_node_by_phandle(*ph); @@ -3628,6 +3643,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma prop = of_get_property(phy, "reg", NULL); if (prop == NULL) return -1; + ug_info->phy_address = *prop; /* Set the bus id */ mdio = of_get_parent(phy); @@ -3641,9 +3657,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma if (err) return -1; - uec_mdio_bus_name(bus_name, mdio); - snprintf(ug_info->phy_bus_id, sizeof(ug_info->phy_bus_id), - "%s:%02x", bus_name, *prop); + snprintf(ug_info->mdio_bus, MII_BUS_ID_SIZE, "%x", res.start); } /* get the phy interface type, or default to MII */ diff --git a/trunk/drivers/net/ucc_geth.h b/trunk/drivers/net/ucc_geth.h index 611bdef2402b..16cbe42ba43c 100644 --- a/trunk/drivers/net/ucc_geth.h +++ b/trunk/drivers/net/ucc_geth.h @@ -1091,7 +1091,8 @@ struct ucc_geth_info { u32 eventRegMask; u16 pausePeriod; u16 extensionField; - char phy_bus_id[BUS_ID_SIZE]; + u8 phy_address; + char mdio_bus[MII_BUS_ID_SIZE]; u8 weightfactor[NUM_TX_QUEUES]; u8 interruptcoalescingmaxvalue[NUM_RX_QUEUES]; u8 l2qt[UCC_GETH_VLAN_PRIORITY_MAX]; diff --git a/trunk/drivers/net/via-velocity.c b/trunk/drivers/net/via-velocity.c index fb53ef872df3..c5691fdb7079 100644 --- a/trunk/drivers/net/via-velocity.c +++ b/trunk/drivers/net/via-velocity.c @@ -1838,19 +1838,17 @@ static void velocity_free_tx_buf(struct velocity_info *vptr, struct velocity_td_ { struct sk_buff *skb = tdinfo->skb; int i; - int pktlen; /* * Don't unmap the pre-allocated tx_bufs */ if (tdinfo->skb_dma) { - pktlen = (skb->len > ETH_ZLEN ? : ETH_ZLEN); for (i = 0; i < tdinfo->nskb_dma; i++) { #ifdef VELOCITY_ZERO_COPY_SUPPORT pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], le16_to_cpu(td->tdesc1.len), PCI_DMA_TODEVICE); #else - pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], pktlen, PCI_DMA_TODEVICE); + pci_unmap_single(vptr->pdev, tdinfo->skb_dma[i], skb->len, PCI_DMA_TODEVICE); #endif tdinfo->skb_dma[i] = 0; } @@ -2082,14 +2080,17 @@ static int velocity_xmit(struct sk_buff *skb, struct net_device *dev) struct tx_desc *td_ptr; struct velocity_td_info *tdinfo; unsigned long flags; - int pktlen; + int pktlen = skb->len; __le16 len; int index; - if (skb_padto(skb, ETH_ZLEN)) - goto out; - pktlen = max_t(unsigned int, skb->len, ETH_ZLEN); + + if (skb->len < ETH_ZLEN) { + if (skb_padto(skb, ETH_ZLEN)) + goto out; + pktlen = ETH_ZLEN; + } len = cpu_to_le16(pktlen); diff --git a/trunk/drivers/net/virtio_net.c b/trunk/drivers/net/virtio_net.c index e67d16c2e5f3..c68808336c8c 100644 --- a/trunk/drivers/net/virtio_net.c +++ b/trunk/drivers/net/virtio_net.c @@ -612,7 +612,6 @@ static struct ethtool_ops virtnet_ethtool_ops = { .set_tx_csum = virtnet_set_tx_csum, .set_sg = ethtool_op_set_sg, .set_tso = ethtool_op_set_tso, - .get_link = ethtool_op_get_link, }; #define MIN_MTU 68 @@ -740,8 +739,6 @@ static int virtnet_probe(struct virtio_device *vdev) goto unregister; } - netif_carrier_on(dev); - pr_debug("virtnet: registered device %s\n", dev->name); return 0; diff --git a/trunk/drivers/net/wireless/ath9k/ath9k.h b/trunk/drivers/net/wireless/ath9k/ath9k.h index 6650f609ece4..d27813502953 100644 --- a/trunk/drivers/net/wireless/ath9k/ath9k.h +++ b/trunk/drivers/net/wireless/ath9k/ath9k.h @@ -587,8 +587,8 @@ struct ath9k_country_entry { u8 iso[3]; }; -#define REG_WRITE(_ah, _reg, _val) ath9k_iowrite32((_ah), (_reg), (_val)) -#define REG_READ(_ah, _reg) ath9k_ioread32((_ah), (_reg)) +#define REG_WRITE(_ah, _reg, _val) iowrite32(_val, _ah->ah_sh + _reg) +#define REG_READ(_ah, _reg) ioread32(_ah->ah_sh + _reg) #define SM(_v, _f) (((_v) << _f##_S) & _f) #define MS(_v, _f) (((_v) & _f) >> _f##_S) diff --git a/trunk/drivers/net/wireless/ath9k/core.h b/trunk/drivers/net/wireless/ath9k/core.h index 139566cbbf65..4ca2aed236e0 100644 --- a/trunk/drivers/net/wireless/ath9k/core.h +++ b/trunk/drivers/net/wireless/ath9k/core.h @@ -701,7 +701,6 @@ struct ath_softc { struct ath_hal *sc_ah; void __iomem *mem; spinlock_t sc_resetlock; - spinlock_t sc_serial_rw; struct mutex mutex; u8 sc_curbssid[ETH_ALEN]; @@ -752,36 +751,4 @@ int ath_get_hal_qnum(u16 queue, struct ath_softc *sc); int ath_get_mac80211_qnum(u32 queue, struct ath_softc *sc); int ath_cabq_update(struct ath_softc *); -/* - * Read and write, they both share the same lock. We do this to serialize - * reads and writes on Atheros 802.11n PCI devices only. This is required - * as the FIFO on these devices can only accept sanely 2 requests. After - * that the device goes bananas. Serializing the reads/writes prevents this - * from happening. - */ - -static inline void ath9k_iowrite32(struct ath_hal *ah, u32 reg_offset, u32 val) -{ - if (ah->ah_config.serialize_regmode == SER_REG_MODE_ON) { - unsigned long flags; - spin_lock_irqsave(&ah->ah_sc->sc_serial_rw, flags); - iowrite32(val, ah->ah_sc->mem + reg_offset); - spin_unlock_irqrestore(&ah->ah_sc->sc_serial_rw, flags); - } else - iowrite32(val, ah->ah_sc->mem + reg_offset); -} - -static inline unsigned int ath9k_ioread32(struct ath_hal *ah, u32 reg_offset) -{ - u32 val; - if (ah->ah_config.serialize_regmode == SER_REG_MODE_ON) { - unsigned long flags; - spin_lock_irqsave(&ah->ah_sc->sc_serial_rw, flags); - val = ioread32(ah->ah_sc->mem + reg_offset); - spin_unlock_irqrestore(&ah->ah_sc->sc_serial_rw, flags); - } else - val = ioread32(ah->ah_sc->mem + reg_offset); - return val; -} - #endif /* CORE_H */ diff --git a/trunk/drivers/net/wireless/ath9k/hw.c b/trunk/drivers/net/wireless/ath9k/hw.c index c38a00bbce64..34474edefc97 100644 --- a/trunk/drivers/net/wireless/ath9k/hw.c +++ b/trunk/drivers/net/wireless/ath9k/hw.c @@ -437,25 +437,6 @@ static void ath9k_hw_set_defaults(struct ath_hal *ah) } ah->ah_config.intr_mitigation = 1; - - /* - * We need this for PCI devices only (Cardbus, PCI, miniPCI) - * _and_ if on non-uniprocessor systems (Multiprocessor/HT). - * This means we use it for all AR5416 devices, and the few - * minor PCI AR9280 devices out there. - * - * Serialization is required because these devices do not handle - * well the case of two concurrent reads/writes due to the latency - * involved. During one read/write another read/write can be issued - * on another CPU while the previous read/write may still be working - * on our hardware, if we hit this case the hardware poops in a loop. - * We prevent this by serializing reads and writes. - * - * This issue is not present on PCI-Express devices or pre-AR5416 - * devices (legacy, 802.11abg). - */ - if (num_possible_cpus() > 1) - ah->ah_config.serialize_regmode = SER_REG_MODE_AUTO; } static struct ath_hal_5416 *ath9k_hw_newstate(u16 devid, @@ -687,8 +668,7 @@ static struct ath_hal *ath9k_hw_do_attach(u16 devid, struct ath_softc *sc, } if (ah->ah_config.serialize_regmode == SER_REG_MODE_AUTO) { - if (ah->ah_macVersion == AR_SREV_VERSION_5416_PCI || - (AR_SREV_9280(ah) && !ah->ah_isPciExpress)) { + if (ah->ah_macVersion == AR_SREV_VERSION_5416_PCI) { ah->ah_config.serialize_regmode = SER_REG_MODE_ON; } else { diff --git a/trunk/drivers/net/wireless/ath9k/main.c b/trunk/drivers/net/wireless/ath9k/main.c index 3c04044a60bd..0e80990d8e84 100644 --- a/trunk/drivers/net/wireless/ath9k/main.c +++ b/trunk/drivers/net/wireless/ath9k/main.c @@ -1336,7 +1336,6 @@ static int ath_init(u16 devid, struct ath_softc *sc) printk(KERN_ERR "Unable to create debugfs files\n"); spin_lock_init(&sc->sc_resetlock); - spin_lock_init(&sc->sc_serial_rw); mutex_init(&sc->mutex); tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc); tasklet_init(&sc->bcon_tasklet, ath9k_beacon_tasklet, diff --git a/trunk/drivers/net/wireless/zd1211rw/zd_mac.c b/trunk/drivers/net/wireless/zd1211rw/zd_mac.c index 847057d682b1..a611ad857983 100644 --- a/trunk/drivers/net/wireless/zd1211rw/zd_mac.c +++ b/trunk/drivers/net/wireless/zd1211rw/zd_mac.c @@ -575,17 +575,13 @@ static int zd_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb) r = fill_ctrlset(mac, skb); if (r) - goto fail; + return r; info->rate_driver_data[0] = hw; r = zd_usb_tx(&mac->chip.usb, skb); if (r) - goto fail; - return 0; - -fail: - dev_kfree_skb(skb); + return r; return 0; } diff --git a/trunk/drivers/parisc/sba_iommu.c b/trunk/drivers/parisc/sba_iommu.c index e5999c4cedc8..6aad8546fd24 100644 --- a/trunk/drivers/parisc/sba_iommu.c +++ b/trunk/drivers/parisc/sba_iommu.c @@ -1367,7 +1367,9 @@ sba_ioc_init_pluto(struct parisc_device *sba, struct ioc *ioc, int ioc_num) ioc->pdir_size /= 2; ioc->pdir_base[PDIR_INDEX(iova_space_size/2)] = SBA_AGPGART_COOKIE; } +} #endif /*SBA_AGP_SUPPORT*/ + } static void diff --git a/trunk/drivers/pci/pci-acpi.c b/trunk/drivers/pci/pci-acpi.c index 368ca72dffbc..deea8a187eb8 100644 --- a/trunk/drivers/pci/pci-acpi.c +++ b/trunk/drivers/pci/pci-acpi.c @@ -386,12 +386,12 @@ static int __init acpi_pci_init(void) { int ret; - if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_MSI) { + if (acpi_gbl_FADT.boot_flags & BAF_MSI_NOT_SUPPORTED) { printk(KERN_INFO"ACPI FADT declares the system doesn't support MSI, so disable it\n"); pci_no_msi(); } - if (acpi_gbl_FADT.boot_flags & ACPI_FADT_NO_ASPM) { + if (acpi_gbl_FADT.boot_flags & BAF_PCIE_ASPM_CONTROL) { printk(KERN_INFO"ACPI FADT declares the system doesn't support PCIe ASPM, so disable it\n"); pcie_no_aspm(); } diff --git a/trunk/drivers/platform/x86/Kconfig b/trunk/drivers/platform/x86/Kconfig index 3608081bc3e0..b3866ad50227 100644 --- a/trunk/drivers/platform/x86/Kconfig +++ b/trunk/drivers/platform/x86/Kconfig @@ -15,7 +15,8 @@ menuconfig X86_PLATFORM_DEVICES if X86_PLATFORM_DEVICES config ACER_WMI - tristate "Acer WMI Laptop Extras" + tristate "Acer WMI Laptop Extras (EXPERIMENTAL)" + depends on EXPERIMENTAL depends on ACPI depends on LEDS_CLASS depends on NEW_LEDS @@ -38,9 +39,9 @@ config ASUS_LAPTOP tristate "Asus Laptop Extras (EXPERIMENTAL)" depends on ACPI depends on EXPERIMENTAL && !ACPI_ASUS - select LEDS_CLASS - select NEW_LEDS - select BACKLIGHT_CLASS_DEVICE + depends on LEDS_CLASS + depends on NEW_LEDS + depends on BACKLIGHT_CLASS_DEVICE depends on INPUT ---help--- This is the new Linux driver for Asus laptops. It may also support some @@ -184,11 +185,11 @@ config SONYPI_COMPAT config THINKPAD_ACPI tristate "ThinkPad ACPI Laptop Extras" depends on ACPI - depends on INPUT select BACKLIGHT_LCD_SUPPORT select BACKLIGHT_CLASS_DEVICE select HWMON select NVRAM + select INPUT select NEW_LEDS select LEDS_CLASS select NET @@ -314,8 +315,9 @@ config EEEPC_LAPTOP config ACPI_WMI - tristate "WMI" + tristate "WMI (EXPERIMENTAL)" depends on ACPI + depends on EXPERIMENTAL help This driver adds support for the ACPI-WMI (Windows Management Instrumentation) mapper device (PNP0C14) found on some systems. diff --git a/trunk/drivers/platform/x86/acer-wmi.c b/trunk/drivers/platform/x86/acer-wmi.c index a6a42e8c060b..6bcca616a704 100644 --- a/trunk/drivers/platform/x86/acer-wmi.c +++ b/trunk/drivers/platform/x86/acer-wmi.c @@ -1026,7 +1026,7 @@ static void acer_rfkill_exit(void) kfree(wireless_rfkill->data); rfkill_unregister(wireless_rfkill); if (has_cap(ACER_CAP_BLUETOOTH)) { - kfree(bluetooth_rfkill->data); + kfree(wireless_rfkill->data); rfkill_unregister(bluetooth_rfkill); } return; diff --git a/trunk/drivers/platform/x86/asus-laptop.c b/trunk/drivers/platform/x86/asus-laptop.c index eeafc6c0160d..56af6cf385b0 100644 --- a/trunk/drivers/platform/x86/asus-laptop.c +++ b/trunk/drivers/platform/x86/asus-laptop.c @@ -815,7 +815,6 @@ static int asus_setkeycode(struct input_dev *dev, int scancode, int keycode) static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) { static struct key_entry *key; - u16 count; /* TODO Find a better way to handle events count. */ if (!hotk) @@ -833,11 +832,9 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) lcd_blank(FB_BLANK_POWERDOWN); } - count = hotk->event_count[event % 128]++; - acpi_bus_generate_proc_event(hotk->device, event, count); acpi_bus_generate_netlink_event(hotk->device->pnp.device_class, dev_name(&hotk->device->dev), event, - count); + hotk->event_count[event % 128]++); if (hotk->inputdev) { key = asus_get_entry_by_scancode(event); diff --git a/trunk/drivers/platform/x86/eeepc-laptop.c b/trunk/drivers/platform/x86/eeepc-laptop.c index 6f54fd1757cd..786ed8661cb0 100644 --- a/trunk/drivers/platform/x86/eeepc-laptop.c +++ b/trunk/drivers/platform/x86/eeepc-laptop.c @@ -557,17 +557,13 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) static void eeepc_hotk_notify(acpi_handle handle, u32 event, void *data) { static struct key_entry *key; - u16 count; - if (!ehotk) return; if (event >= NOTIFY_BRN_MIN && event <= NOTIFY_BRN_MAX) notify_brn(); - count = ehotk->event_count[event % 128]++; - acpi_bus_generate_proc_event(ehotk->device, event, count); acpi_bus_generate_netlink_event(ehotk->device->pnp.device_class, dev_name(&ehotk->device->dev), event, - count); + ehotk->event_count[event % 128]++); if (ehotk->inputdev) { key = eepc_get_entry_by_scancode(event); if (key) { diff --git a/trunk/drivers/platform/x86/hp-wmi.c b/trunk/drivers/platform/x86/hp-wmi.c index f41135f2fb29..50d9019de2be 100644 --- a/trunk/drivers/platform/x86/hp-wmi.c +++ b/trunk/drivers/platform/x86/hp-wmi.c @@ -53,6 +53,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4"); static int __init hp_wmi_bios_setup(struct platform_device *device); static int __exit hp_wmi_bios_remove(struct platform_device *device); +static int hp_wmi_resume_handler(struct platform_device *device); struct bios_args { u32 signature; @@ -101,6 +102,7 @@ static struct platform_driver hp_wmi_driver = { }, .probe = hp_wmi_bios_setup, .remove = hp_wmi_bios_remove, + .resume = hp_wmi_resume_handler, }; static int hp_wmi_perform_query(int query, int write, int value) @@ -487,6 +489,29 @@ static int __exit hp_wmi_bios_remove(struct platform_device *device) return 0; } +static int hp_wmi_resume_handler(struct platform_device *device) +{ + struct key_entry *key; + + /* + * Docking state may have changed while suspended, so trigger + * an input event for the current state. As this is a switch, + * the input layer will only actually pass it on if the state + * changed. + */ + for (key = hp_wmi_keymap; key->type != KE_END; key++) { + switch (key->type) { + case KE_SW: + input_report_switch(hp_wmi_input_dev, key->keycode, + hp_wmi_dock_state()); + input_sync(hp_wmi_input_dev); + break; + } + } + + return 0; +} + static int __init hp_wmi_init(void) { int err; diff --git a/trunk/drivers/platform/x86/intel_menlow.c b/trunk/drivers/platform/x86/intel_menlow.c index 29432a50be45..27b7662955bb 100644 --- a/trunk/drivers/platform/x86/intel_menlow.c +++ b/trunk/drivers/platform/x86/intel_menlow.c @@ -57,8 +57,8 @@ MODULE_LICENSE("GPL"); * In that case max_cstate would be n-1 * GTHS returning '0' would mean that no bandwidth control states are supported */ -static int memory_get_max_bandwidth(struct thermal_cooling_device *cdev, - unsigned long *max_state) +static int memory_get_int_max_bandwidth(struct thermal_cooling_device *cdev, + unsigned long *max_state) { struct acpi_device *device = cdev->devdata; acpi_handle handle = device->handle; @@ -83,12 +83,22 @@ static int memory_get_max_bandwidth(struct thermal_cooling_device *cdev, return 0; } +static int memory_get_max_bandwidth(struct thermal_cooling_device *cdev, + char *buf) +{ + unsigned long value; + if (memory_get_int_max_bandwidth(cdev, &value)) + return -EINVAL; + + return sprintf(buf, "%ld\n", value); +} + static int memory_get_cur_bandwidth(struct thermal_cooling_device *cdev, - unsigned long *value) + char *buf) { struct acpi_device *device = cdev->devdata; acpi_handle handle = device->handle; - unsigned long long result; + unsigned long long value; struct acpi_object_list arg_list; union acpi_object arg; acpi_status status = AE_OK; @@ -98,16 +108,15 @@ static int memory_get_cur_bandwidth(struct thermal_cooling_device *cdev, arg.type = ACPI_TYPE_INTEGER; arg.integer.value = MEMORY_ARG_CUR_BANDWIDTH; status = acpi_evaluate_integer(handle, MEMORY_GET_BANDWIDTH, - &arg_list, &result); + &arg_list, &value); if (ACPI_FAILURE(status)) return -EFAULT; - *value = result; - return 0; + return sprintf(buf, "%llu\n", value); } static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev, - unsigned long state) + unsigned int state) { struct acpi_device *device = cdev->devdata; acpi_handle handle = device->handle; @@ -117,7 +126,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev, unsigned long long temp; unsigned long max_state; - if (memory_get_max_bandwidth(cdev, &max_state)) + if (memory_get_int_max_bandwidth(cdev, &max_state)) return -EFAULT; if (state > max_state) @@ -133,7 +142,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev, &temp); printk(KERN_INFO - "Bandwidth value was %ld: status is %d\n", state, status); + "Bandwidth value was %d: status is %d\n", state, status); if (ACPI_FAILURE(status)) return -EFAULT; diff --git a/trunk/drivers/platform/x86/thinkpad_acpi.c b/trunk/drivers/platform/x86/thinkpad_acpi.c index d2433204a40c..bcbc05107ba8 100644 --- a/trunk/drivers/platform/x86/thinkpad_acpi.c +++ b/trunk/drivers/platform/x86/thinkpad_acpi.c @@ -7532,7 +7532,7 @@ MODULE_ALIAS(TPACPI_DRVR_SHORTNAME); * if it is not there yet. */ #define IBM_BIOS_MODULE_ALIAS(__type) \ - MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW*") + MODULE_ALIAS("dmi:bvnIBM:bvr" __type "ET??WW") /* Non-ancient thinkpads */ MODULE_ALIAS("dmi:bvnIBM:*:svnIBM:*:pvrThinkPad*:rvnIBM:*"); @@ -7541,9 +7541,9 @@ MODULE_ALIAS("dmi:bvnLENOVO:*:svnLENOVO:*:pvrThinkPad*:rvnLENOVO:*"); /* Ancient thinkpad BIOSes have to be identified by * BIOS type or model number, and there are far less * BIOS types than model numbers... */ -IBM_BIOS_MODULE_ALIAS("I[BDHIMNOTWVYZ]"); -IBM_BIOS_MODULE_ALIAS("1[0368A-GIKM-PST]"); -IBM_BIOS_MODULE_ALIAS("K[UX-Z]"); +IBM_BIOS_MODULE_ALIAS("I[B,D,H,I,M,N,O,T,W,V,Y,Z]"); +IBM_BIOS_MODULE_ALIAS("1[0,3,6,8,A-G,I,K,M-P,S,T]"); +IBM_BIOS_MODULE_ALIAS("K[U,X-Z]"); MODULE_AUTHOR("Borislav Deianov, Henrique de Moraes Holschuh"); MODULE_DESCRIPTION(TPACPI_DESC); diff --git a/trunk/drivers/platform/x86/wmi.c b/trunk/drivers/platform/x86/wmi.c index 2f269e117b8f..8a8b377712c9 100644 --- a/trunk/drivers/platform/x86/wmi.c +++ b/trunk/drivers/platform/x86/wmi.c @@ -708,7 +708,7 @@ static int __init acpi_wmi_add(struct acpi_device *device) static int __init acpi_wmi_init(void) { - int result; + acpi_status result; INIT_LIST_HEAD(&wmi_blocks.list); diff --git a/trunk/drivers/sbus/char/openprom.c b/trunk/drivers/sbus/char/openprom.c index 124f660a0383..29dc735e1a20 100644 --- a/trunk/drivers/sbus/char/openprom.c +++ b/trunk/drivers/sbus/char/openprom.c @@ -51,7 +51,6 @@ MODULE_AUTHOR("Thomas K. Dyas (tdyas@noc.rutgers.edu) and Eddie C. Dost (ecd@sk MODULE_DESCRIPTION("OPENPROM Configuration Driver"); MODULE_LICENSE("GPL"); MODULE_VERSION("1.0"); -MODULE_ALIAS_MISCDEV(SUN_OPENPROM_MINOR); /* Private data kept by the driver for each descriptor. */ typedef struct openprom_private_data diff --git a/trunk/drivers/staging/Kconfig b/trunk/drivers/staging/Kconfig index 211af86a6c55..ce6badded47a 100644 --- a/trunk/drivers/staging/Kconfig +++ b/trunk/drivers/staging/Kconfig @@ -73,6 +73,8 @@ source "drivers/staging/rt2860/Kconfig" source "drivers/staging/rt2870/Kconfig" +source "drivers/staging/benet/Kconfig" + source "drivers/staging/comedi/Kconfig" source "drivers/staging/asus_oled/Kconfig" diff --git a/trunk/drivers/staging/Makefile b/trunk/drivers/staging/Makefile index 47a56f5ffabc..9ddcc2bb3365 100644 --- a/trunk/drivers/staging/Makefile +++ b/trunk/drivers/staging/Makefile @@ -19,6 +19,7 @@ obj-$(CONFIG_AGNX) += agnx/ obj-$(CONFIG_OTUS) += otus/ obj-$(CONFIG_RT2860) += rt2860/ obj-$(CONFIG_RT2870) += rt2870/ +obj-$(CONFIG_BENET) += benet/ obj-$(CONFIG_COMEDI) += comedi/ obj-$(CONFIG_ASUS_OLED) += asus_oled/ obj-$(CONFIG_PANEL) += panel/ diff --git a/trunk/drivers/staging/benet/Kconfig b/trunk/drivers/staging/benet/Kconfig new file mode 100644 index 000000000000..f6806074f998 --- /dev/null +++ b/trunk/drivers/staging/benet/Kconfig @@ -0,0 +1,7 @@ +config BENET + tristate "ServerEngines 10Gb NIC - BladeEngine" + depends on PCI && INET + select INET_LRO + help + This driver implements the NIC functionality for ServerEngines + 10Gb network adapter BladeEngine (EC 3210). diff --git a/trunk/drivers/staging/benet/MAINTAINERS b/trunk/drivers/staging/benet/MAINTAINERS new file mode 100644 index 000000000000..d5ce340218b3 --- /dev/null +++ b/trunk/drivers/staging/benet/MAINTAINERS @@ -0,0 +1,6 @@ +SERVER ENGINES 10Gbe NIC - BLADE-ENGINE +P: Subbu Seetharaman +M: subbus@serverengines.com +L: netdev@vger.kernel.org +W: http://www.serverengines.com +S: Supported diff --git a/trunk/drivers/staging/benet/Makefile b/trunk/drivers/staging/benet/Makefile new file mode 100644 index 000000000000..460b923b99bd --- /dev/null +++ b/trunk/drivers/staging/benet/Makefile @@ -0,0 +1,14 @@ +# +# Makefile to build the network driver for ServerEngine's BladeEngine +# +obj-$(CONFIG_BENET) += benet.o + +benet-y := be_init.o \ + be_int.o \ + be_netif.o \ + be_ethtool.o \ + funcobj.o \ + cq.o \ + eq.o \ + mpu.o \ + eth.o diff --git a/trunk/drivers/staging/benet/TODO b/trunk/drivers/staging/benet/TODO new file mode 100644 index 000000000000..a51dfb59a62f --- /dev/null +++ b/trunk/drivers/staging/benet/TODO @@ -0,0 +1,6 @@ +TODO: + - remove wrappers around common iowrite functions + - full netdev audit of common problems/issues + +Please send all patches and questions to Subbu Seetharaman + and Greg Kroah-Hartman diff --git a/trunk/drivers/staging/benet/asyncmesg.h b/trunk/drivers/staging/benet/asyncmesg.h new file mode 100644 index 000000000000..d1e779adb848 --- /dev/null +++ b/trunk/drivers/staging/benet/asyncmesg.h @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __asyncmesg_amap_h__ +#define __asyncmesg_amap_h__ +#include "fwcmd_common.h" + +/* --- ASYNC_EVENT_CODES --- */ +#define ASYNC_EVENT_CODE_LINK_STATE (1) +#define ASYNC_EVENT_CODE_ISCSI (2) + +/* --- ASYNC_LINK_STATES --- */ +#define ASYNC_EVENT_LINK_DOWN (0) /* Link Down on a port */ +#define ASYNC_EVENT_LINK_UP (1) /* Link Up on a port */ + +/* + * The last 4 bytes of the async events have this common format. It allows + * the driver to distinguish [link]MCC_CQ_ENTRY[/link] structs from + * asynchronous events. Both arrive on the same completion queue. This + * structure also contains the common fields used to decode the async event. + */ +struct BE_ASYNC_EVENT_TRAILER_AMAP { + u8 rsvd0[8]; /* DWORD 0 */ + u8 event_code[8]; /* DWORD 0 */ + u8 event_type[8]; /* DWORD 0 */ + u8 rsvd1[6]; /* DWORD 0 */ + u8 async_event; /* DWORD 0 */ + u8 valid; /* DWORD 0 */ +} __packed; +struct ASYNC_EVENT_TRAILER_AMAP { + u32 dw[1]; +}; + +/* + * Applicable in Initiator, Target and NIC modes. + * A link state async event is seen by all device drivers as soon they + * create an MCC ring. Thereafter, anytime the link status changes the + * drivers will receive a link state async event. Notifications continue to + * be sent until a driver destroys its MCC ring. A link down event is + * reported when either port loses link. A link up event is reported + * when either port regains link. When BE's failover mechanism is enabled, a + * link down on the active port causes traffic to be diverted to the standby + * port by the BE's ARM firmware (assuming the standby port has link). In + * this case, the standy port assumes the active status. Note: when link is + * restored on the failed port, traffic continues on the currently active + * port. The ARM firmware does not attempt to 'fail back' traffic to + * the restored port. + */ +struct BE_ASYNC_EVENT_LINK_STATE_AMAP { + u8 port0_link_status[8]; + u8 port1_link_status[8]; + u8 active_port[8]; + u8 rsvd0[8]; /* DWORD 0 */ + u8 port0_duplex[8]; + u8 port0_speed[8]; + u8 port1_duplex[8]; + u8 port1_speed[8]; + u8 port0_fault[8]; + u8 port1_fault[8]; + u8 rsvd1[2][8]; /* DWORD 2 */ + struct BE_ASYNC_EVENT_TRAILER_AMAP trailer; +} __packed; +struct ASYNC_EVENT_LINK_STATE_AMAP { + u32 dw[4]; +}; +#endif /* __asyncmesg_amap_h__ */ diff --git a/trunk/drivers/staging/benet/be_cm.h b/trunk/drivers/staging/benet/be_cm.h new file mode 100644 index 000000000000..b7a1dfd20c36 --- /dev/null +++ b/trunk/drivers/staging/benet/be_cm.h @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __be_cm_amap_h__ +#define __be_cm_amap_h__ +#include "be_common.h" +#include "etx_context.h" +#include "mpu_context.h" + +/* + * --- CEV_WATERMARK_ENUM --- + * CQ/EQ Watermark Encodings. Encoded as number of free entries in + * Queue when Watermark is reached. + */ +#define CEV_WMARK_0 (0) /* Watermark when Queue full */ +#define CEV_WMARK_16 (1) /* Watermark at 16 free entries */ +#define CEV_WMARK_32 (2) /* Watermark at 32 free entries */ +#define CEV_WMARK_48 (3) /* Watermark at 48 free entries */ +#define CEV_WMARK_64 (4) /* Watermark at 64 free entries */ +#define CEV_WMARK_80 (5) /* Watermark at 80 free entries */ +#define CEV_WMARK_96 (6) /* Watermark at 96 free entries */ +#define CEV_WMARK_112 (7) /* Watermark at 112 free entries */ +#define CEV_WMARK_128 (8) /* Watermark at 128 free entries */ +#define CEV_WMARK_144 (9) /* Watermark at 144 free entries */ +#define CEV_WMARK_160 (10) /* Watermark at 160 free entries */ +#define CEV_WMARK_176 (11) /* Watermark at 176 free entries */ +#define CEV_WMARK_192 (12) /* Watermark at 192 free entries */ +#define CEV_WMARK_208 (13) /* Watermark at 208 free entries */ +#define CEV_WMARK_224 (14) /* Watermark at 224 free entries */ +#define CEV_WMARK_240 (15) /* Watermark at 240 free entries */ + +/* + * --- CQ_CNT_ENUM --- + * Completion Queue Count Encodings. + */ +#define CEV_CQ_CNT_256 (0) /* CQ has 256 entries */ +#define CEV_CQ_CNT_512 (1) /* CQ has 512 entries */ +#define CEV_CQ_CNT_1024 (2) /* CQ has 1024 entries */ + +/* + * --- EQ_CNT_ENUM --- + * Event Queue Count Encodings. + */ +#define CEV_EQ_CNT_256 (0) /* EQ has 256 entries (16-byte EQEs only) */ +#define CEV_EQ_CNT_512 (1) /* EQ has 512 entries (16-byte EQEs only) */ +#define CEV_EQ_CNT_1024 (2) /* EQ has 1024 entries (4-byte or */ + /* 16-byte EQEs only) */ +#define CEV_EQ_CNT_2048 (3) /* EQ has 2048 entries (4-byte or */ + /* 16-byte EQEs only) */ +#define CEV_EQ_CNT_4096 (4) /* EQ has 4096 entries (4-byte EQEs only) */ + +/* + * --- EQ_SIZE_ENUM --- + * Event Queue Entry Size Encoding. + */ +#define CEV_EQ_SIZE_4 (0) /* EQE is 4 bytes */ +#define CEV_EQ_SIZE_16 (1) /* EQE is 16 bytes */ + +/* + * Completion Queue Context Table Entry. Contains the state of a CQ. + * Located in RAM within the CEV block. + */ +struct BE_CQ_CONTEXT_AMAP { + u8 Cidx[11]; /* DWORD 0 */ + u8 Watermark[4]; /* DWORD 0 */ + u8 NoDelay; /* DWORD 0 */ + u8 EPIdx[11]; /* DWORD 0 */ + u8 Count[2]; /* DWORD 0 */ + u8 valid; /* DWORD 0 */ + u8 SolEvent; /* DWORD 0 */ + u8 Eventable; /* DWORD 0 */ + u8 Pidx[11]; /* DWORD 1 */ + u8 PD[10]; /* DWORD 1 */ + u8 EQID[7]; /* DWORD 1 */ + u8 Func; /* DWORD 1 */ + u8 WME; /* DWORD 1 */ + u8 Stalled; /* DWORD 1 */ + u8 Armed; /* DWORD 1 */ +} __packed; +struct CQ_CONTEXT_AMAP { + u32 dw[2]; +}; + +/* + * Event Queue Context Table Entry. Contains the state of an EQ. + * Located in RAM in the CEV block. + */ +struct BE_EQ_CONTEXT_AMAP { + u8 Cidx[13]; /* DWORD 0 */ + u8 rsvd0[2]; /* DWORD 0 */ + u8 Func; /* DWORD 0 */ + u8 EPIdx[13]; /* DWORD 0 */ + u8 valid; /* DWORD 0 */ + u8 rsvd1; /* DWORD 0 */ + u8 Size; /* DWORD 0 */ + u8 Pidx[13]; /* DWORD 1 */ + u8 rsvd2[3]; /* DWORD 1 */ + u8 PD[10]; /* DWORD 1 */ + u8 Count[3]; /* DWORD 1 */ + u8 SolEvent; /* DWORD 1 */ + u8 Stalled; /* DWORD 1 */ + u8 Armed; /* DWORD 1 */ + u8 Watermark[4]; /* DWORD 2 */ + u8 WME; /* DWORD 2 */ + u8 rsvd3[3]; /* DWORD 2 */ + u8 EventVect[6]; /* DWORD 2 */ + u8 rsvd4[2]; /* DWORD 2 */ + u8 Delay[8]; /* DWORD 2 */ + u8 rsvd5[6]; /* DWORD 2 */ + u8 TMR; /* DWORD 2 */ + u8 rsvd6; /* DWORD 2 */ + u8 rsvd7[32]; /* DWORD 3 */ +} __packed; +struct EQ_CONTEXT_AMAP { + u32 dw[4]; +}; + +#endif /* __be_cm_amap_h__ */ diff --git a/trunk/drivers/staging/benet/be_common.h b/trunk/drivers/staging/benet/be_common.h new file mode 100644 index 000000000000..7e63dc5e3348 --- /dev/null +++ b/trunk/drivers/staging/benet/be_common.h @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __be_common_amap_h__ +#define __be_common_amap_h__ + +/* Physical Address. */ +struct BE_PHYS_ADDR_AMAP { + u8 lo[32]; /* DWORD 0 */ + u8 hi[32]; /* DWORD 1 */ +} __packed; +struct PHYS_ADDR_AMAP { + u32 dw[2]; +}; + +/* Virtual Address. */ +struct BE_VIRT_ADDR_AMAP { + u8 lo[32]; /* DWORD 0 */ + u8 hi[32]; /* DWORD 1 */ +} __packed; +struct VIRT_ADDR_AMAP { + u32 dw[2]; +}; + +/* Scatter gather element. */ +struct BE_SGE_AMAP { + u8 addr_hi[32]; /* DWORD 0 */ + u8 addr_lo[32]; /* DWORD 1 */ + u8 rsvd0[32]; /* DWORD 2 */ + u8 len[16]; /* DWORD 3 */ + u8 rsvd1[16]; /* DWORD 3 */ +} __packed; +struct SGE_AMAP { + u32 dw[4]; +}; + +#endif /* __be_common_amap_h__ */ diff --git a/trunk/drivers/staging/benet/be_ethtool.c b/trunk/drivers/staging/benet/be_ethtool.c new file mode 100644 index 000000000000..027af85707aa --- /dev/null +++ b/trunk/drivers/staging/benet/be_ethtool.c @@ -0,0 +1,348 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * be_ethtool.c + * + * This file contains various functions that ethtool can use + * to talk to the driver and the BE H/W. + */ + +#include "benet.h" + +#include + +static const char benet_gstrings_stats[][ETH_GSTRING_LEN] = { +/* net_device_stats */ + "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", + "rx_compressed", + "tc_compressed", +/* BE driver Stats */ + "bes_tx_reqs", + "bes_tx_fails", + "bes_fwd_reqs", + "bes_tx_wrbs", + "bes_interrupts", + "bes_events", + "bes_tx_events", + "bes_rx_events", + "bes_tx_compl", + "bes_rx_compl", + "bes_ethrx_post_fail", + "bes_802_3_dropped_frames", + "bes_802_3_malformed_frames", + "bes_rx_misc_pkts", + "bes_eth_tx_rate", + "bes_eth_rx_rate", + "Num Packets collected", + "Num Times Flushed", +}; + +#define NET_DEV_STATS_LEN \ + (sizeof(struct net_device_stats)/sizeof(unsigned long)) + +#define BENET_STATS_LEN ARRAY_SIZE(benet_gstrings_stats) + +static void +be_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + + strncpy(drvinfo->driver, be_driver_name, 32); + strncpy(drvinfo->version, be_drvr_ver, 32); + strncpy(drvinfo->fw_version, be_fw_ver, 32); + strcpy(drvinfo->bus_info, pci_name(adapter->pdev)); + drvinfo->testinfo_len = 0; + drvinfo->regdump_len = 0; + drvinfo->eedump_len = 0; +} + +static int +be_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + + coalesce->rx_max_coalesced_frames = adapter->max_rx_coal; + + coalesce->rx_coalesce_usecs = adapter->cur_eqd; + coalesce->rx_coalesce_usecs_high = adapter->max_eqd; + coalesce->rx_coalesce_usecs_low = adapter->min_eqd; + + coalesce->tx_coalesce_usecs = adapter->cur_eqd; + coalesce->tx_coalesce_usecs_high = adapter->max_eqd; + coalesce->tx_coalesce_usecs_low = adapter->min_eqd; + + coalesce->use_adaptive_rx_coalesce = adapter->enable_aic; + coalesce->use_adaptive_tx_coalesce = adapter->enable_aic; + + return 0; +} + +/* + * This routine is used to set interrup coalescing delay *as well as* + * the number of pkts to coalesce for LRO. + */ +static int +be_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + struct be_eq_object *eq_objectp; + u32 max, min, cur; + int status; + + adapter->max_rx_coal = coalesce->rx_max_coalesced_frames; + if (adapter->max_rx_coal >= BE_LRO_MAX_PKTS) + adapter->max_rx_coal = BE_LRO_MAX_PKTS; + + if (adapter->enable_aic == 0 && + coalesce->use_adaptive_rx_coalesce == 1) { + /* if AIC is being turned on now, start with an EQD of 0 */ + adapter->cur_eqd = 0; + } + adapter->enable_aic = coalesce->use_adaptive_rx_coalesce; + + /* round off to nearest multiple of 8 */ + max = (((coalesce->rx_coalesce_usecs_high + 4) >> 3) << 3); + min = (((coalesce->rx_coalesce_usecs_low + 4) >> 3) << 3); + cur = (((coalesce->rx_coalesce_usecs + 4) >> 3) << 3); + + if (adapter->enable_aic) { + /* accept low and high if AIC is enabled */ + if (max > MAX_EQD) + max = MAX_EQD; + if (min > max) + min = max; + adapter->max_eqd = max; + adapter->min_eqd = min; + if (adapter->cur_eqd > max) + adapter->cur_eqd = max; + if (adapter->cur_eqd < min) + adapter->cur_eqd = min; + } else { + /* accept specified coalesce_usecs only if AIC is disabled */ + if (cur > MAX_EQD) + cur = MAX_EQD; + eq_objectp = &pnob->event_q_obj; + status = + be_eq_modify_delay(&pnob->fn_obj, 1, &eq_objectp, &cur, + NULL, NULL, NULL); + if (status == BE_SUCCESS) + adapter->cur_eqd = cur; + } + return 0; +} + +static u32 be_get_rx_csum(struct net_device *netdev) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + return adapter->rx_csum; +} + +static int be_set_rx_csum(struct net_device *netdev, uint32_t data) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + + if (data) + adapter->rx_csum = 1; + else + adapter->rx_csum = 0; + + return 0; +} + +static void +be_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) +{ + switch (stringset) { + case ETH_SS_STATS: + memcpy(data, *benet_gstrings_stats, + sizeof(benet_gstrings_stats)); + break; + } +} + +static int be_get_stats_count(struct net_device *netdev) +{ + return BENET_STATS_LEN; +} + +static void +be_get_ethtool_stats(struct net_device *netdev, + struct ethtool_stats *stats, uint64_t *data) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + int i; + + benet_get_stats(netdev); + + for (i = 0; i <= NET_DEV_STATS_LEN; i++) + data[i] = ((unsigned long *)&adapter->benet_stats)[i]; + + data[i] = adapter->be_stat.bes_tx_reqs; + data[i++] = adapter->be_stat.bes_tx_fails; + data[i++] = adapter->be_stat.bes_fwd_reqs; + data[i++] = adapter->be_stat.bes_tx_wrbs; + + data[i++] = adapter->be_stat.bes_ints; + data[i++] = adapter->be_stat.bes_events; + data[i++] = adapter->be_stat.bes_tx_events; + data[i++] = adapter->be_stat.bes_rx_events; + data[i++] = adapter->be_stat.bes_tx_compl; + data[i++] = adapter->be_stat.bes_rx_compl; + data[i++] = adapter->be_stat.bes_ethrx_post_fail; + data[i++] = adapter->be_stat.bes_802_3_dropped_frames; + data[i++] = adapter->be_stat.bes_802_3_malformed_frames; + data[i++] = adapter->be_stat.bes_rx_misc_pkts; + data[i++] = adapter->be_stat.bes_eth_tx_rate; + data[i++] = adapter->be_stat.bes_eth_rx_rate; + data[i++] = adapter->be_stat.bes_rx_coal; + data[i++] = adapter->be_stat.bes_rx_flush; + +} + +static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) +{ + ecmd->speed = SPEED_10000; + ecmd->duplex = DUPLEX_FULL; + ecmd->autoneg = AUTONEG_DISABLE; + return 0; +} + +/* Get the Ring parameters from the pnob */ +static void +be_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring) +{ + struct be_net_object *pnob = netdev_priv(netdev); + + /* Pre Set Maxims */ + ring->rx_max_pending = pnob->rx_q_len; + ring->rx_mini_max_pending = ring->rx_mini_max_pending; + ring->rx_jumbo_max_pending = ring->rx_jumbo_max_pending; + ring->tx_max_pending = pnob->tx_q_len; + + /* Current hardware Settings */ + ring->rx_pending = atomic_read(&pnob->rx_q_posted); + ring->rx_mini_pending = ring->rx_mini_pending; + ring->rx_jumbo_pending = ring->rx_jumbo_pending; + ring->tx_pending = atomic_read(&pnob->tx_q_used); + +} + +static void +be_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd) +{ + struct be_net_object *pnob = netdev_priv(netdev); + bool rxfc, txfc; + int status; + + status = be_eth_get_flow_control(&pnob->fn_obj, &txfc, &rxfc); + if (status != BE_SUCCESS) { + dev_info(&netdev->dev, "Unable to get pause frame settings\n"); + /* return defaults */ + ecmd->rx_pause = 1; + ecmd->tx_pause = 0; + ecmd->autoneg = AUTONEG_ENABLE; + return; + } + + if (txfc == true) + ecmd->tx_pause = 1; + else + ecmd->tx_pause = 0; + + if (rxfc == true) + ecmd->rx_pause = 1; + else + ecmd->rx_pause = 0; + + ecmd->autoneg = AUTONEG_ENABLE; +} + +static int +be_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd) +{ + struct be_net_object *pnob = netdev_priv(netdev); + bool txfc, rxfc; + int status; + + if (ecmd->autoneg != AUTONEG_ENABLE) + return -EINVAL; + + if (ecmd->tx_pause) + txfc = true; + else + txfc = false; + + if (ecmd->rx_pause) + rxfc = true; + else + rxfc = false; + + status = be_eth_set_flow_control(&pnob->fn_obj, txfc, rxfc); + if (status != BE_SUCCESS) { + dev_info(&netdev->dev, "Unable to set pause frame settings\n"); + return -1; + } + return 0; +} + +struct ethtool_ops be_ethtool_ops = { + .get_settings = be_get_settings, + .get_drvinfo = be_get_drvinfo, + .get_link = ethtool_op_get_link, + .get_coalesce = be_get_coalesce, + .set_coalesce = be_set_coalesce, + .get_ringparam = be_get_ringparam, + .get_pauseparam = be_get_pauseparam, + .set_pauseparam = be_set_pauseparam, + .get_rx_csum = be_get_rx_csum, + .set_rx_csum = be_set_rx_csum, + .get_tx_csum = ethtool_op_get_tx_csum, + .set_tx_csum = ethtool_op_set_tx_csum, + .get_sg = ethtool_op_get_sg, + .set_sg = ethtool_op_set_sg, + .get_tso = ethtool_op_get_tso, + .set_tso = ethtool_op_set_tso, + .get_strings = be_get_strings, + .get_stats_count = be_get_stats_count, + .get_ethtool_stats = be_get_ethtool_stats, +}; diff --git a/trunk/drivers/staging/benet/be_init.c b/trunk/drivers/staging/benet/be_init.c new file mode 100644 index 000000000000..12a026c3f9e1 --- /dev/null +++ b/trunk/drivers/staging/benet/be_init.c @@ -0,0 +1,1382 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#include +#include "benet.h" + +#define DRVR_VERSION "1.0.728" + +static const struct pci_device_id be_device_id_table[] = { + {PCI_DEVICE(0x19a2, 0x0201)}, + {0} +}; + +MODULE_DEVICE_TABLE(pci, be_device_id_table); + +MODULE_VERSION(DRVR_VERSION); + +#define DRV_DESCRIPTION "ServerEngines BladeEngine Network Driver Version " + +MODULE_DESCRIPTION(DRV_DESCRIPTION DRVR_VERSION); +MODULE_AUTHOR("ServerEngines"); +MODULE_LICENSE("GPL"); + +static unsigned int msix = 1; +module_param(msix, uint, S_IRUGO); +MODULE_PARM_DESC(msix, "Use MSI-x interrupts"); + +static unsigned int rxbuf_size = 2048; /* Default RX frag size */ +module_param(rxbuf_size, uint, S_IRUGO); +MODULE_PARM_DESC(rxbuf_size, "Size of buffers to hold Rx data"); + +const char be_drvr_ver[] = DRVR_VERSION; +char be_fw_ver[32]; /* F/W version filled in by be_probe */ +char be_driver_name[] = "benet"; + +/* + * Number of entries in each queue. + */ +#define EVENT_Q_LEN 1024 +#define ETH_TXQ_LEN 2048 +#define ETH_TXCQ_LEN 1024 +#define ETH_RXQ_LEN 1024 /* Does not support any other value */ +#define ETH_UC_RXCQ_LEN 1024 +#define ETH_BC_RXCQ_LEN 256 +#define MCC_Q_LEN 64 /* total size not to exceed 8 pages */ +#define MCC_CQ_LEN 256 + +/* Bit mask describing events of interest to be traced */ +unsigned int trace_level; + +static int +init_pci_be_function(struct be_adapter *adapter, struct pci_dev *pdev) +{ + u64 pa; + + /* CSR */ + pa = pci_resource_start(pdev, 2); + adapter->csr_va = ioremap_nocache(pa, pci_resource_len(pdev, 2)); + if (adapter->csr_va == NULL) + return -ENOMEM; + + /* Door Bell */ + pa = pci_resource_start(pdev, 4); + adapter->db_va = ioremap_nocache(pa, (128 * 1024)); + if (adapter->db_va == NULL) { + iounmap(adapter->csr_va); + return -ENOMEM; + } + + /* PCI */ + pa = pci_resource_start(pdev, 1); + adapter->pci_va = ioremap_nocache(pa, pci_resource_len(pdev, 1)); + if (adapter->pci_va == NULL) { + iounmap(adapter->csr_va); + iounmap(adapter->db_va); + return -ENOMEM; + } + return 0; +} + +/* + This function enables the interrupt corresponding to the Event + queue ID for the given NetObject +*/ +void be_enable_eq_intr(struct be_net_object *pnob) +{ + struct CQ_DB_AMAP cqdb; + cqdb.dw[0] = 0; + AMAP_SET_BITS_PTR(CQ_DB, event, &cqdb, 1); + AMAP_SET_BITS_PTR(CQ_DB, rearm, &cqdb, 1); + AMAP_SET_BITS_PTR(CQ_DB, num_popped, &cqdb, 0); + AMAP_SET_BITS_PTR(CQ_DB, qid, &cqdb, pnob->event_q_id); + PD_WRITE(&pnob->fn_obj, cq_db, cqdb.dw[0]); +} + +/* + This function disables the interrupt corresponding to the Event + queue ID for the given NetObject +*/ +void be_disable_eq_intr(struct be_net_object *pnob) +{ + struct CQ_DB_AMAP cqdb; + cqdb.dw[0] = 0; + AMAP_SET_BITS_PTR(CQ_DB, event, &cqdb, 1); + AMAP_SET_BITS_PTR(CQ_DB, rearm, &cqdb, 0); + AMAP_SET_BITS_PTR(CQ_DB, num_popped, &cqdb, 0); + AMAP_SET_BITS_PTR(CQ_DB, qid, &cqdb, pnob->event_q_id); + PD_WRITE(&pnob->fn_obj, cq_db, cqdb.dw[0]); +} + +/* + This function enables the interrupt from the network function + of the BladeEngine. Use the function be_disable_eq_intr() + to enable the interrupt from the event queue of only one specific + NetObject +*/ +void be_enable_intr(struct be_net_object *pnob) +{ + struct PCICFG_HOST_TIMER_INT_CTRL_CSR_AMAP ctrl; + u32 host_intr; + + ctrl.dw[0] = PCICFG1_READ(&pnob->fn_obj, host_timer_int_ctrl); + host_intr = AMAP_GET_BITS_PTR(PCICFG_HOST_TIMER_INT_CTRL_CSR, + hostintr, ctrl.dw); + if (!host_intr) { + AMAP_SET_BITS_PTR(PCICFG_HOST_TIMER_INT_CTRL_CSR, + hostintr, ctrl.dw, 1); + PCICFG1_WRITE(&pnob->fn_obj, host_timer_int_ctrl, + ctrl.dw[0]); + } +} + +/* + This function disables the interrupt from the network function of + the BladeEngine. Use the function be_disable_eq_intr() to + disable the interrupt from the event queue of only one specific NetObject +*/ +void be_disable_intr(struct be_net_object *pnob) +{ + + struct PCICFG_HOST_TIMER_INT_CTRL_CSR_AMAP ctrl; + u32 host_intr; + ctrl.dw[0] = PCICFG1_READ(&pnob->fn_obj, host_timer_int_ctrl); + host_intr = AMAP_GET_BITS_PTR(PCICFG_HOST_TIMER_INT_CTRL_CSR, + hostintr, ctrl.dw); + if (host_intr) { + AMAP_SET_BITS_PTR(PCICFG_HOST_TIMER_INT_CTRL_CSR, hostintr, + ctrl.dw, 0); + PCICFG1_WRITE(&pnob->fn_obj, host_timer_int_ctrl, + ctrl.dw[0]); + } +} + +static int be_enable_msix(struct be_adapter *adapter) +{ + int i, ret; + + if (!msix) + return -1; + + for (i = 0; i < BE_MAX_REQ_MSIX_VECTORS; i++) + adapter->msix_entries[i].entry = i; + + ret = pci_enable_msix(adapter->pdev, adapter->msix_entries, + BE_MAX_REQ_MSIX_VECTORS); + + if (ret == 0) + adapter->msix_enabled = 1; + return ret; +} + +static int be_register_isr(struct be_adapter *adapter, + struct be_net_object *pnob) +{ + struct net_device *netdev = pnob->netdev; + int intx = 0, r; + + netdev->irq = adapter->pdev->irq; + r = be_enable_msix(adapter); + + if (r == 0) { + r = request_irq(adapter->msix_entries[0].vector, + be_int, IRQF_SHARED, netdev->name, netdev); + if (r) { + printk(KERN_WARNING + "MSIX Request IRQ failed - Errno %d\n", r); + intx = 1; + pci_disable_msix(adapter->pdev); + adapter->msix_enabled = 0; + } + } else { + intx = 1; + } + + if (intx) { + r = request_irq(netdev->irq, be_int, IRQF_SHARED, + netdev->name, netdev); + if (r) { + printk(KERN_WARNING + "INTx Request IRQ failed - Errno %d\n", r); + return -1; + } + } + adapter->isr_registered = 1; + return 0; +} + +static void be_unregister_isr(struct be_adapter *adapter) +{ + struct net_device *netdev = adapter->netdevp; + if (adapter->isr_registered) { + if (adapter->msix_enabled) { + free_irq(adapter->msix_entries[0].vector, netdev); + pci_disable_msix(adapter->pdev); + adapter->msix_enabled = 0; + } else { + free_irq(netdev->irq, netdev); + } + adapter->isr_registered = 0; + } +} + +/* + This function processes the Flush Completions that are issued by the + ARM F/W, when a Recv Ring is destroyed. A flush completion is + identified when a Rx COmpl descriptor has the tcpcksum and udpcksum + set and the pktsize is 32. These completions are received on the + Rx Completion Queue. +*/ +static u32 be_process_rx_flush_cmpl(struct be_net_object *pnob) +{ + struct ETH_RX_COMPL_AMAP *rxcp; + unsigned int i = 0; + while ((rxcp = be_get_rx_cmpl(pnob)) != NULL) { + be_notify_cmpl(pnob, 1, pnob->rx_cq_id, 1); + i++; + } + return i; +} + +static void be_tx_q_clean(struct be_net_object *pnob) +{ + while (atomic_read(&pnob->tx_q_used)) + process_one_tx_compl(pnob, tx_compl_lastwrb_idx_get(pnob)); +} + +static void be_rx_q_clean(struct be_net_object *pnob) +{ + if (pnob->rx_ctxt) { + int i; + struct be_rx_page_info *rx_page_info; + for (i = 0; i < pnob->rx_q_len; i++) { + rx_page_info = &(pnob->rx_page_info[i]); + if (!pnob->rx_pg_shared || rx_page_info->page_offset) { + pci_unmap_page(pnob->adapter->pdev, + pci_unmap_addr(rx_page_info, bus), + pnob->rx_buf_size, + PCI_DMA_FROMDEVICE); + } + if (rx_page_info->page) + put_page(rx_page_info->page); + memset(rx_page_info, 0, sizeof(struct be_rx_page_info)); + } + pnob->rx_pg_info_hd = 0; + } +} + +static void be_destroy_netobj(struct be_net_object *pnob) +{ + int status; + + if (pnob->tx_q_created) { + status = be_eth_sq_destroy(&pnob->tx_q_obj); + pnob->tx_q_created = 0; + } + + if (pnob->rx_q_created) { + status = be_eth_rq_destroy(&pnob->rx_q_obj); + if (status != 0) { + status = be_eth_rq_destroy_options(&pnob->rx_q_obj, 0, + NULL, NULL); + BUG_ON(status); + } + pnob->rx_q_created = 0; + } + + be_process_rx_flush_cmpl(pnob); + + if (pnob->tx_cq_created) { + status = be_cq_destroy(&pnob->tx_cq_obj); + pnob->tx_cq_created = 0; + } + + if (pnob->rx_cq_created) { + status = be_cq_destroy(&pnob->rx_cq_obj); + pnob->rx_cq_created = 0; + } + + if (pnob->mcc_q_created) { + status = be_mcc_ring_destroy(&pnob->mcc_q_obj); + pnob->mcc_q_created = 0; + } + if (pnob->mcc_cq_created) { + status = be_cq_destroy(&pnob->mcc_cq_obj); + pnob->mcc_cq_created = 0; + } + + if (pnob->event_q_created) { + status = be_eq_destroy(&pnob->event_q_obj); + pnob->event_q_created = 0; + } + be_function_cleanup(&pnob->fn_obj); +} + +/* + * free all resources associated with a pnob + * Called at the time of module cleanup as well a any error during + * module init. Some resources may be partially allocated in a NetObj. + */ +static void netobject_cleanup(struct be_adapter *adapter, + struct be_net_object *pnob) +{ + struct net_device *netdev = adapter->netdevp; + + if (netif_running(netdev)) { + netif_stop_queue(netdev); + be_wait_nic_tx_cmplx_cmpl(pnob); + be_disable_eq_intr(pnob); + } + + be_unregister_isr(adapter); + + if (adapter->tasklet_started) { + tasklet_kill(&(adapter->sts_handler)); + adapter->tasklet_started = 0; + } + if (pnob->fn_obj_created) + be_disable_intr(pnob); + + if (adapter->dev_state != BE_DEV_STATE_NONE) + unregister_netdev(netdev); + + if (pnob->fn_obj_created) + be_destroy_netobj(pnob); + + adapter->net_obj = NULL; + adapter->netdevp = NULL; + + be_rx_q_clean(pnob); + if (pnob->rx_ctxt) { + kfree(pnob->rx_page_info); + kfree(pnob->rx_ctxt); + } + + be_tx_q_clean(pnob); + kfree(pnob->tx_ctxt); + + if (pnob->mcc_q) + pci_free_consistent(adapter->pdev, pnob->mcc_q_size, + pnob->mcc_q, pnob->mcc_q_bus); + + if (pnob->mcc_wrb_ctxt) + free_pages((unsigned long)pnob->mcc_wrb_ctxt, + get_order(pnob->mcc_wrb_ctxt_size)); + + if (pnob->mcc_cq) + pci_free_consistent(adapter->pdev, pnob->mcc_cq_size, + pnob->mcc_cq, pnob->mcc_cq_bus); + + if (pnob->event_q) + pci_free_consistent(adapter->pdev, pnob->event_q_size, + pnob->event_q, pnob->event_q_bus); + + if (pnob->tx_cq) + pci_free_consistent(adapter->pdev, pnob->tx_cq_size, + pnob->tx_cq, pnob->tx_cq_bus); + + if (pnob->tx_q) + pci_free_consistent(adapter->pdev, pnob->tx_q_size, + pnob->tx_q, pnob->tx_q_bus); + + if (pnob->rx_q) + pci_free_consistent(adapter->pdev, pnob->rx_q_size, + pnob->rx_q, pnob->rx_q_bus); + + if (pnob->rx_cq) + pci_free_consistent(adapter->pdev, pnob->rx_cq_size, + pnob->rx_cq, pnob->rx_cq_bus); + + + if (pnob->mb_ptr) + pci_free_consistent(adapter->pdev, pnob->mb_size, pnob->mb_ptr, + pnob->mb_bus); + + free_netdev(netdev); +} + + +static int be_nob_ring_alloc(struct be_adapter *adapter, + struct be_net_object *pnob) +{ + u32 size; + + /* Mail box rd; mailbox pointer needs to be 16 byte aligned */ + pnob->mb_size = sizeof(struct MCC_MAILBOX_AMAP) + 16; + pnob->mb_ptr = pci_alloc_consistent(adapter->pdev, pnob->mb_size, + &pnob->mb_bus); + if (!pnob->mb_bus) + return -1; + memset(pnob->mb_ptr, 0, pnob->mb_size); + pnob->mb_rd.va = PTR_ALIGN(pnob->mb_ptr, 16); + pnob->mb_rd.pa = PTR_ALIGN(pnob->mb_bus, 16); + pnob->mb_rd.length = sizeof(struct MCC_MAILBOX_AMAP); + /* + * Event queue + */ + pnob->event_q_len = EVENT_Q_LEN; + pnob->event_q_size = pnob->event_q_len * sizeof(struct EQ_ENTRY_AMAP); + pnob->event_q = pci_alloc_consistent(adapter->pdev, pnob->event_q_size, + &pnob->event_q_bus); + if (!pnob->event_q_bus) + return -1; + memset(pnob->event_q, 0, pnob->event_q_size); + /* + * Eth TX queue + */ + pnob->tx_q_len = ETH_TXQ_LEN; + pnob->tx_q_port = 0; + pnob->tx_q_size = pnob->tx_q_len * sizeof(struct ETH_WRB_AMAP); + pnob->tx_q = pci_alloc_consistent(adapter->pdev, pnob->tx_q_size, + &pnob->tx_q_bus); + if (!pnob->tx_q_bus) + return -1; + memset(pnob->tx_q, 0, pnob->tx_q_size); + /* + * Eth TX Compl queue + */ + pnob->txcq_len = ETH_TXCQ_LEN; + pnob->tx_cq_size = pnob->txcq_len * sizeof(struct ETH_TX_COMPL_AMAP); + pnob->tx_cq = pci_alloc_consistent(adapter->pdev, pnob->tx_cq_size, + &pnob->tx_cq_bus); + if (!pnob->tx_cq_bus) + return -1; + memset(pnob->tx_cq, 0, pnob->tx_cq_size); + /* + * Eth RX queue + */ + pnob->rx_q_len = ETH_RXQ_LEN; + pnob->rx_q_size = pnob->rx_q_len * sizeof(struct ETH_RX_D_AMAP); + pnob->rx_q = pci_alloc_consistent(adapter->pdev, pnob->rx_q_size, + &pnob->rx_q_bus); + if (!pnob->rx_q_bus) + return -1; + memset(pnob->rx_q, 0, pnob->rx_q_size); + /* + * Eth Unicast RX Compl queue + */ + pnob->rx_cq_len = ETH_UC_RXCQ_LEN; + pnob->rx_cq_size = pnob->rx_cq_len * + sizeof(struct ETH_RX_COMPL_AMAP); + pnob->rx_cq = pci_alloc_consistent(adapter->pdev, pnob->rx_cq_size, + &pnob->rx_cq_bus); + if (!pnob->rx_cq_bus) + return -1; + memset(pnob->rx_cq, 0, pnob->rx_cq_size); + + /* TX resources */ + size = pnob->tx_q_len * sizeof(void **); + pnob->tx_ctxt = kzalloc(size, GFP_KERNEL); + if (pnob->tx_ctxt == NULL) + return -1; + + /* RX resources */ + size = pnob->rx_q_len * sizeof(void *); + pnob->rx_ctxt = kzalloc(size, GFP_KERNEL); + if (pnob->rx_ctxt == NULL) + return -1; + + size = (pnob->rx_q_len * sizeof(struct be_rx_page_info)); + pnob->rx_page_info = kzalloc(size, GFP_KERNEL); + if (pnob->rx_page_info == NULL) + return -1; + + adapter->eth_statsp = kzalloc(sizeof(struct FWCMD_ETH_GET_STATISTICS), + GFP_KERNEL); + if (adapter->eth_statsp == NULL) + return -1; + pnob->rx_buf_size = rxbuf_size; + return 0; +} + +/* + This function initializes the be_net_object for subsequent + network operations. + + Before calling this function, the driver must have allocated + space for the NetObject structure, initialized the structure, + allocated DMAable memory for all the network queues that form + part of the NetObject and populated the start address (virtual) + and number of entries allocated for each queue in the NetObject structure. + + The driver must also have allocated memory to hold the + mailbox structure (MCC_MAILBOX) and post the physical address, + virtual addresses and the size of the mailbox memory in the + NetObj.mb_rd. This structure is used by BECLIB for + initial communication with the embedded MCC processor. BECLIB + uses the mailbox until MCC rings are created for more efficient + communication with the MCC processor. + + If the driver wants to create multiple network interface for more + than one protection domain, it can call be_create_netobj() + multiple times once for each protection domain. A Maximum of + 32 protection domains are supported. + +*/ +static int +be_create_netobj(struct be_net_object *pnob, u8 __iomem *csr_va, + u8 __iomem *db_va, u8 __iomem *pci_va) +{ + int status = 0; + bool eventable = false, tx_no_delay = false, rx_no_delay = false; + struct be_eq_object *eq_objectp = NULL; + struct be_function_object *pfob = &pnob->fn_obj; + struct ring_desc rd; + u32 set_rxbuf_size; + u32 tx_cmpl_wm = CEV_WMARK_96; /* 0xffffffff to disable */ + u32 rx_cmpl_wm = CEV_WMARK_160; /* 0xffffffff to disable */ + u32 eq_delay = 0; /* delay in 8usec units. 0xffffffff to disable */ + + memset(&rd, 0, sizeof(struct ring_desc)); + + status = be_function_object_create(csr_va, db_va, pci_va, + BE_FUNCTION_TYPE_NETWORK, &pnob->mb_rd, pfob); + if (status != BE_SUCCESS) + return status; + pnob->fn_obj_created = true; + + if (tx_cmpl_wm == 0xffffffff) + tx_no_delay = true; + if (rx_cmpl_wm == 0xffffffff) + rx_no_delay = true; + /* + * now create the necessary rings + * Event Queue first. + */ + if (pnob->event_q_len) { + rd.va = pnob->event_q; + rd.pa = pnob->event_q_bus; + rd.length = pnob->event_q_size; + + status = be_eq_create(pfob, &rd, 4, pnob->event_q_len, + (u32) -1, /* CEV_WMARK_* or -1 */ + eq_delay, /* in 8us units, or -1 */ + &pnob->event_q_obj); + if (status != BE_SUCCESS) + goto error_ret; + pnob->event_q_id = pnob->event_q_obj.eq_id; + pnob->event_q_created = 1; + eventable = true; + eq_objectp = &pnob->event_q_obj; + } + /* + * Now Eth Tx Compl. queue. + */ + if (pnob->txcq_len) { + rd.va = pnob->tx_cq; + rd.pa = pnob->tx_cq_bus; + rd.length = pnob->tx_cq_size; + + status = be_cq_create(pfob, &rd, + pnob->txcq_len * sizeof(struct ETH_TX_COMPL_AMAP), + false, /* solicted events, */ + tx_no_delay, /* nodelay */ + tx_cmpl_wm, /* Watermark encodings */ + eq_objectp, &pnob->tx_cq_obj); + if (status != BE_SUCCESS) + goto error_ret; + + pnob->tx_cq_id = pnob->tx_cq_obj.cq_id; + pnob->tx_cq_created = 1; + } + /* + * Eth Tx queue + */ + if (pnob->tx_q_len) { + struct be_eth_sq_parameters ex_params = { 0 }; + u32 type; + + if (pnob->tx_q_port) { + /* TXQ to be bound to a specific port */ + type = BE_ETH_TX_RING_TYPE_BOUND; + ex_params.port = pnob->tx_q_port - 1; + } else + type = BE_ETH_TX_RING_TYPE_STANDARD; + + rd.va = pnob->tx_q; + rd.pa = pnob->tx_q_bus; + rd.length = pnob->tx_q_size; + + status = be_eth_sq_create_ex(pfob, &rd, + pnob->tx_q_len * sizeof(struct ETH_WRB_AMAP), + type, 2, &pnob->tx_cq_obj, + &ex_params, &pnob->tx_q_obj); + + if (status != BE_SUCCESS) + goto error_ret; + + pnob->tx_q_id = pnob->tx_q_obj.bid; + pnob->tx_q_created = 1; + } + /* + * Now Eth Rx compl. queue. Always needed. + */ + rd.va = pnob->rx_cq; + rd.pa = pnob->rx_cq_bus; + rd.length = pnob->rx_cq_size; + + status = be_cq_create(pfob, &rd, + pnob->rx_cq_len * sizeof(struct ETH_RX_COMPL_AMAP), + false, /* solicted events, */ + rx_no_delay, /* nodelay */ + rx_cmpl_wm, /* Watermark encodings */ + eq_objectp, &pnob->rx_cq_obj); + if (status != BE_SUCCESS) + goto error_ret; + + pnob->rx_cq_id = pnob->rx_cq_obj.cq_id; + pnob->rx_cq_created = 1; + + status = be_eth_rq_set_frag_size(pfob, pnob->rx_buf_size, + (u32 *) &set_rxbuf_size); + if (status != BE_SUCCESS) { + be_eth_rq_get_frag_size(pfob, (u32 *) &pnob->rx_buf_size); + if ((pnob->rx_buf_size != 2048) && (pnob->rx_buf_size != 4096) + && (pnob->rx_buf_size != 8192)) + goto error_ret; + } else { + if (pnob->rx_buf_size != set_rxbuf_size) + pnob->rx_buf_size = set_rxbuf_size; + } + /* + * Eth RX queue. be_eth_rq_create() always assumes 2 pages size + */ + rd.va = pnob->rx_q; + rd.pa = pnob->rx_q_bus; + rd.length = pnob->rx_q_size; + + status = be_eth_rq_create(pfob, &rd, &pnob->rx_cq_obj, + &pnob->rx_cq_obj, &pnob->rx_q_obj); + + if (status != BE_SUCCESS) + goto error_ret; + + pnob->rx_q_id = pnob->rx_q_obj.rid; + pnob->rx_q_created = 1; + + return BE_SUCCESS; /* All required queues created. */ + +error_ret: + be_destroy_netobj(pnob); + return status; +} + +static int be_nob_ring_init(struct be_adapter *adapter, + struct be_net_object *pnob) +{ + int status; + + pnob->event_q_tl = 0; + + pnob->tx_q_hd = 0; + pnob->tx_q_tl = 0; + + pnob->tx_cq_tl = 0; + + pnob->rx_cq_tl = 0; + + memset(pnob->event_q, 0, pnob->event_q_size); + memset(pnob->tx_cq, 0, pnob->tx_cq_size); + memset(pnob->tx_ctxt, 0, pnob->tx_q_len * sizeof(void **)); + memset(pnob->rx_ctxt, 0, pnob->rx_q_len * sizeof(void *)); + pnob->rx_pg_info_hd = 0; + pnob->rx_q_hd = 0; + atomic_set(&pnob->rx_q_posted, 0); + + status = be_create_netobj(pnob, adapter->csr_va, adapter->db_va, + adapter->pci_va); + if (status != BE_SUCCESS) + return -1; + + be_post_eth_rx_buffs(pnob); + return 0; +} + +/* This function handles async callback for link status */ +static void +be_link_status_async_callback(void *context, u32 event_code, void *event) +{ + struct ASYNC_EVENT_LINK_STATE_AMAP *link_status = event; + struct be_adapter *adapter = context; + bool link_enable = false; + struct be_net_object *pnob; + struct ASYNC_EVENT_TRAILER_AMAP *async_trailer; + struct net_device *netdev; + u32 async_event_code, async_event_type, active_port; + u32 port0_link_status, port1_link_status, port0_duplex, port1_duplex; + u32 port0_speed, port1_speed; + + if (event_code != ASYNC_EVENT_CODE_LINK_STATE) { + /* Not our event to handle */ + return; + } + async_trailer = (struct ASYNC_EVENT_TRAILER_AMAP *) + ((u8 *) event + sizeof(struct MCC_CQ_ENTRY_AMAP) - + sizeof(struct ASYNC_EVENT_TRAILER_AMAP)); + + async_event_code = AMAP_GET_BITS_PTR(ASYNC_EVENT_TRAILER, event_code, + async_trailer); + BUG_ON(async_event_code != ASYNC_EVENT_CODE_LINK_STATE); + + pnob = adapter->net_obj; + netdev = pnob->netdev; + + /* Determine if this event is a switch VLD or a physical link event */ + async_event_type = AMAP_GET_BITS_PTR(ASYNC_EVENT_TRAILER, event_type, + async_trailer); + active_port = AMAP_GET_BITS_PTR(ASYNC_EVENT_LINK_STATE, + active_port, link_status); + port0_link_status = AMAP_GET_BITS_PTR(ASYNC_EVENT_LINK_STATE, + port0_link_status, link_status); + port1_link_status = AMAP_GET_BITS_PTR(ASYNC_EVENT_LINK_STATE, + port1_link_status, link_status); + port0_duplex = AMAP_GET_BITS_PTR(ASYNC_EVENT_LINK_STATE, + port0_duplex, link_status); + port1_duplex = AMAP_GET_BITS_PTR(ASYNC_EVENT_LINK_STATE, + port1_duplex, link_status); + port0_speed = AMAP_GET_BITS_PTR(ASYNC_EVENT_LINK_STATE, + port0_speed, link_status); + port1_speed = AMAP_GET_BITS_PTR(ASYNC_EVENT_LINK_STATE, + port1_speed, link_status); + if (async_event_type == NTWK_LINK_TYPE_VIRTUAL) { + adapter->be_stat.bes_link_change_virtual++; + if (adapter->be_link_sts->active_port != active_port) { + dev_notice(&netdev->dev, + "Active port changed due to VLD on switch\n"); + } else { + dev_notice(&netdev->dev, "Link status update\n"); + } + + } else { + adapter->be_stat.bes_link_change_physical++; + if (adapter->be_link_sts->active_port != active_port) { + dev_notice(&netdev->dev, + "Active port changed due to port link" + " status change\n"); + } else { + dev_notice(&netdev->dev, "Link status update\n"); + } + } + + memset(adapter->be_link_sts, 0, sizeof(adapter->be_link_sts)); + + if ((port0_link_status == ASYNC_EVENT_LINK_UP) || + (port1_link_status == ASYNC_EVENT_LINK_UP)) { + if ((adapter->port0_link_sts == BE_PORT_LINK_DOWN) && + (adapter->port1_link_sts == BE_PORT_LINK_DOWN)) { + /* Earlier both the ports are down So link is up */ + link_enable = true; + } + + if (port0_link_status == ASYNC_EVENT_LINK_UP) { + adapter->port0_link_sts = BE_PORT_LINK_UP; + adapter->be_link_sts->mac0_duplex = port0_duplex; + adapter->be_link_sts->mac0_speed = port0_speed; + if (active_port == NTWK_PORT_A) + adapter->be_link_sts->active_port = 0; + } else + adapter->port0_link_sts = BE_PORT_LINK_DOWN; + + if (port1_link_status == ASYNC_EVENT_LINK_UP) { + adapter->port1_link_sts = BE_PORT_LINK_UP; + adapter->be_link_sts->mac1_duplex = port1_duplex; + adapter->be_link_sts->mac1_speed = port1_speed; + if (active_port == NTWK_PORT_B) + adapter->be_link_sts->active_port = 1; + } else + adapter->port1_link_sts = BE_PORT_LINK_DOWN; + + printk(KERN_INFO "Link Properties for %s:\n", netdev->name); + dev_info(&netdev->dev, "Link Properties:\n"); + be_print_link_info(adapter->be_link_sts); + + if (!link_enable) + return; + /* + * Both ports were down previously, but atleast one of + * them has come up if this netdevice's carrier is not up, + * then indicate to stack + */ + if (!netif_carrier_ok(netdev)) { + netif_start_queue(netdev); + netif_carrier_on(netdev); + } + return; + } + + /* Now both the ports are down. Tell the stack about it */ + dev_info(&netdev->dev, "Both ports are down\n"); + adapter->port0_link_sts = BE_PORT_LINK_DOWN; + adapter->port1_link_sts = BE_PORT_LINK_DOWN; + if (netif_carrier_ok(netdev)) { + netif_carrier_off(netdev); + netif_stop_queue(netdev); + } + return; +} + +static int be_mcc_create(struct be_adapter *adapter) +{ + struct be_net_object *pnob; + + pnob = adapter->net_obj; + /* + * Create the MCC ring so that all further communication with + * MCC can go thru the ring. we do this at the end since + * we do not want to be dealing with interrupts until the + * initialization is complete. + */ + pnob->mcc_q_len = MCC_Q_LEN; + pnob->mcc_q_size = pnob->mcc_q_len * sizeof(struct MCC_WRB_AMAP); + pnob->mcc_q = pci_alloc_consistent(adapter->pdev, pnob->mcc_q_size, + &pnob->mcc_q_bus); + if (!pnob->mcc_q_bus) + return -1; + /* + * space for MCC WRB context + */ + pnob->mcc_wrb_ctxtLen = MCC_Q_LEN; + pnob->mcc_wrb_ctxt_size = pnob->mcc_wrb_ctxtLen * + sizeof(struct be_mcc_wrb_context); + pnob->mcc_wrb_ctxt = (void *)__get_free_pages(GFP_KERNEL, + get_order(pnob->mcc_wrb_ctxt_size)); + if (pnob->mcc_wrb_ctxt == NULL) + return -1; + /* + * Space for MCC compl. ring + */ + pnob->mcc_cq_len = MCC_CQ_LEN; + pnob->mcc_cq_size = pnob->mcc_cq_len * sizeof(struct MCC_CQ_ENTRY_AMAP); + pnob->mcc_cq = pci_alloc_consistent(adapter->pdev, pnob->mcc_cq_size, + &pnob->mcc_cq_bus); + if (!pnob->mcc_cq_bus) + return -1; + return 0; +} + +/* + This function creates the MCC request and completion ring required + for communicating with the ARM processor. The caller must have + allocated required amount of memory for the MCC ring and MCC + completion ring and posted the virtual address and number of + entries in the corresponding members (mcc_q and mcc_cq) in the + NetObject struture. + + When this call is completed, all further communication with + ARM will switch from mailbox to this ring. + + pnob - Pointer to the NetObject structure. This NetObject should + have been created using a previous call to be_create_netobj() +*/ +int be_create_mcc_rings(struct be_net_object *pnob) +{ + int status = 0; + struct ring_desc rd; + struct be_function_object *pfob = &pnob->fn_obj; + + memset(&rd, 0, sizeof(struct ring_desc)); + if (pnob->mcc_cq_len) { + rd.va = pnob->mcc_cq; + rd.pa = pnob->mcc_cq_bus; + rd.length = pnob->mcc_cq_size; + + status = be_cq_create(pfob, &rd, + pnob->mcc_cq_len * sizeof(struct MCC_CQ_ENTRY_AMAP), + false, /* solicted events, */ + true, /* nodelay */ + 0, /* 0 Watermark since Nodelay is true */ + &pnob->event_q_obj, + &pnob->mcc_cq_obj); + + if (status != BE_SUCCESS) + return status; + + pnob->mcc_cq_id = pnob->mcc_cq_obj.cq_id; + pnob->mcc_cq_created = 1; + } + if (pnob->mcc_q_len) { + rd.va = pnob->mcc_q; + rd.pa = pnob->mcc_q_bus; + rd.length = pnob->mcc_q_size; + + status = be_mcc_ring_create(pfob, &rd, + pnob->mcc_q_len * sizeof(struct MCC_WRB_AMAP), + pnob->mcc_wrb_ctxt, pnob->mcc_wrb_ctxtLen, + &pnob->mcc_cq_obj, &pnob->mcc_q_obj); + + if (status != BE_SUCCESS) + return status; + + pnob->mcc_q_created = 1; + } + return BE_SUCCESS; +} + +static int be_mcc_init(struct be_adapter *adapter) +{ + u32 r; + struct be_net_object *pnob; + + pnob = adapter->net_obj; + memset(pnob->mcc_q, 0, pnob->mcc_q_size); + pnob->mcc_q_hd = 0; + + memset(pnob->mcc_wrb_ctxt, 0, pnob->mcc_wrb_ctxt_size); + + memset(pnob->mcc_cq, 0, pnob->mcc_cq_size); + pnob->mcc_cq_tl = 0; + + r = be_create_mcc_rings(adapter->net_obj); + if (r != BE_SUCCESS) + return -1; + + return 0; +} + +static void be_remove(struct pci_dev *pdev) +{ + struct be_net_object *pnob; + struct be_adapter *adapter; + + adapter = pci_get_drvdata(pdev); + if (!adapter) + return; + + pci_set_drvdata(pdev, NULL); + pnob = (struct be_net_object *)adapter->net_obj; + + flush_scheduled_work(); + + if (pnob) { + /* Unregister async callback function for link status updates */ + if (pnob->mcc_q_created) + be_mcc_add_async_event_callback(&pnob->mcc_q_obj, + NULL, NULL); + netobject_cleanup(adapter, pnob); + } + + if (adapter->csr_va) + iounmap(adapter->csr_va); + if (adapter->db_va) + iounmap(adapter->db_va); + if (adapter->pci_va) + iounmap(adapter->pci_va); + + pci_release_regions(adapter->pdev); + pci_disable_device(adapter->pdev); + + kfree(adapter->be_link_sts); + kfree(adapter->eth_statsp); + + if (adapter->timer_ctxt.get_stats_timer.function) + del_timer_sync(&adapter->timer_ctxt.get_stats_timer); + kfree(adapter); +} + +/* + * This function is called by the PCI sub-system when it finds a PCI + * device with dev/vendor IDs that match with one of our devices. + * All of the driver initialization is done in this function. + */ +static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id) +{ + int status = 0; + struct be_adapter *adapter; + struct FWCMD_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD get_fwv; + struct be_net_object *pnob; + struct net_device *netdev; + + status = pci_enable_device(pdev); + if (status) + goto error; + + status = pci_request_regions(pdev, be_driver_name); + if (status) + goto error_pci_req; + + pci_set_master(pdev); + adapter = kzalloc(sizeof(struct be_adapter), GFP_KERNEL); + if (adapter == NULL) { + status = -ENOMEM; + goto error_adapter; + } + adapter->dev_state = BE_DEV_STATE_NONE; + adapter->pdev = pdev; + pci_set_drvdata(pdev, adapter); + + adapter->enable_aic = 1; + adapter->max_eqd = MAX_EQD; + adapter->min_eqd = 0; + adapter->cur_eqd = 0; + + status = pci_set_dma_mask(pdev, DMA_64BIT_MASK); + if (!status) { + adapter->dma_64bit_cap = true; + } else { + adapter->dma_64bit_cap = false; + status = pci_set_dma_mask(pdev, DMA_32BIT_MASK); + if (status != 0) { + printk(KERN_ERR "Could not set PCI DMA Mask\n"); + goto cleanup; + } + } + + status = init_pci_be_function(adapter, pdev); + if (status != 0) { + printk(KERN_ERR "Failed to map PCI BARS\n"); + status = -ENOMEM; + goto cleanup; + } + + be_trace_set_level(DL_ALWAYS | DL_ERR); + + adapter->be_link_sts = kmalloc(sizeof(struct BE_LINK_STATUS), + GFP_KERNEL); + if (adapter->be_link_sts == NULL) { + printk(KERN_ERR "Memory allocation for link status " + "buffer failed\n"); + goto cleanup; + } + spin_lock_init(&adapter->txq_lock); + + netdev = alloc_etherdev(sizeof(struct be_net_object)); + if (netdev == NULL) { + status = -ENOMEM; + goto cleanup; + } + pnob = netdev_priv(netdev); + adapter->net_obj = pnob; + adapter->netdevp = netdev; + pnob->adapter = adapter; + pnob->netdev = netdev; + + status = be_nob_ring_alloc(adapter, pnob); + if (status != 0) + goto cleanup; + + status = be_nob_ring_init(adapter, pnob); + if (status != 0) + goto cleanup; + + be_rxf_mac_address_read_write(&pnob->fn_obj, false, false, false, + false, false, netdev->dev_addr, NULL, NULL); + + netdev->init = &benet_init; + netif_carrier_off(netdev); + netif_stop_queue(netdev); + + SET_NETDEV_DEV(netdev, &(adapter->pdev->dev)); + + netif_napi_add(netdev, &pnob->napi, be_poll, 64); + + /* if the rx_frag size if 2K, one page is shared as two RX frags */ + pnob->rx_pg_shared = + (pnob->rx_buf_size <= PAGE_SIZE / 2) ? true : false; + if (pnob->rx_buf_size != rxbuf_size) { + printk(KERN_WARNING + "Could not set Rx buffer size to %d. Using %d\n", + rxbuf_size, pnob->rx_buf_size); + rxbuf_size = pnob->rx_buf_size; + } + + tasklet_init(&(adapter->sts_handler), be_process_intr, + (unsigned long)adapter); + adapter->tasklet_started = 1; + spin_lock_init(&(adapter->int_lock)); + + status = be_register_isr(adapter, pnob); + if (status != 0) + goto cleanup; + + adapter->rx_csum = 1; + adapter->max_rx_coal = BE_LRO_MAX_PKTS; + + memset(&get_fwv, 0, + sizeof(struct FWCMD_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD)); + printk(KERN_INFO "BladeEngine Driver version:%s. " + "Copyright ServerEngines, Corporation 2005 - 2008\n", + be_drvr_ver); + status = be_function_get_fw_version(&pnob->fn_obj, &get_fwv, NULL, + NULL); + if (status == BE_SUCCESS) { + strncpy(be_fw_ver, get_fwv.firmware_version_string, 32); + printk(KERN_INFO "BladeEngine Firmware Version:%s\n", + get_fwv.firmware_version_string); + } else { + printk(KERN_WARNING "Unable to get BE Firmware Version\n"); + } + + sema_init(&adapter->get_eth_stat_sem, 0); + init_timer(&adapter->timer_ctxt.get_stats_timer); + atomic_set(&adapter->timer_ctxt.get_stat_flag, 0); + adapter->timer_ctxt.get_stats_timer.function = + &be_get_stats_timer_handler; + + status = be_mcc_create(adapter); + if (status < 0) + goto cleanup; + status = be_mcc_init(adapter); + if (status < 0) + goto cleanup; + + + status = be_mcc_add_async_event_callback(&adapter->net_obj->mcc_q_obj, + be_link_status_async_callback, (void *)adapter); + if (status != BE_SUCCESS) { + printk(KERN_WARNING "add_async_event_callback failed"); + printk(KERN_WARNING + "Link status changes may not be reflected\n"); + } + + status = register_netdev(netdev); + if (status != 0) + goto cleanup; + be_update_link_status(adapter); + adapter->dev_state = BE_DEV_STATE_INIT; + return 0; + +cleanup: + be_remove(pdev); + return status; +error_adapter: + pci_release_regions(pdev); +error_pci_req: + pci_disable_device(pdev); +error: + printk(KERN_ERR "BladeEngine initalization failed\n"); + return status; +} + +/* + * Get the current link status and print the status on console + */ +void be_update_link_status(struct be_adapter *adapter) +{ + int status; + struct be_net_object *pnob = adapter->net_obj; + + status = be_rxf_link_status(&pnob->fn_obj, adapter->be_link_sts, NULL, + NULL, NULL); + if (status == BE_SUCCESS) { + if (adapter->be_link_sts->mac0_speed && + adapter->be_link_sts->mac0_duplex) + adapter->port0_link_sts = BE_PORT_LINK_UP; + else + adapter->port0_link_sts = BE_PORT_LINK_DOWN; + + if (adapter->be_link_sts->mac1_speed && + adapter->be_link_sts->mac1_duplex) + adapter->port1_link_sts = BE_PORT_LINK_UP; + else + adapter->port1_link_sts = BE_PORT_LINK_DOWN; + + dev_info(&pnob->netdev->dev, "Link Properties:\n"); + be_print_link_info(adapter->be_link_sts); + return; + } + dev_info(&pnob->netdev->dev, "Could not get link status\n"); + return; +} + + +#ifdef CONFIG_PM +static void +be_pm_cleanup(struct be_adapter *adapter, + struct be_net_object *pnob, struct net_device *netdev) +{ + netif_carrier_off(netdev); + netif_stop_queue(netdev); + + be_wait_nic_tx_cmplx_cmpl(pnob); + be_disable_eq_intr(pnob); + + if (adapter->tasklet_started) { + tasklet_kill(&adapter->sts_handler); + adapter->tasklet_started = 0; + } + + be_unregister_isr(adapter); + be_disable_intr(pnob); + + be_tx_q_clean(pnob); + be_rx_q_clean(pnob); + + be_destroy_netobj(pnob); +} + +static int be_suspend(struct pci_dev *pdev, pm_message_t state) +{ + struct be_adapter *adapter = pci_get_drvdata(pdev); + struct net_device *netdev = adapter->netdevp; + struct be_net_object *pnob = netdev_priv(netdev); + + adapter->dev_pm_state = adapter->dev_state; + adapter->dev_state = BE_DEV_STATE_SUSPEND; + + netif_device_detach(netdev); + if (netif_running(netdev)) + be_pm_cleanup(adapter, pnob, netdev); + + pci_enable_wake(pdev, 3, 1); + pci_enable_wake(pdev, 4, 1); /* D3 Cold = 4 */ + pci_save_state(pdev); + pci_disable_device(pdev); + pci_set_power_state(pdev, pci_choose_state(pdev, state)); + return 0; +} + +static void be_up(struct be_adapter *adapter) +{ + struct be_net_object *pnob = adapter->net_obj; + + if (pnob->num_vlans != 0) + be_rxf_vlan_config(&pnob->fn_obj, false, pnob->num_vlans, + pnob->vlan_tag, NULL, NULL, NULL); + +} + +static int be_resume(struct pci_dev *pdev) +{ + int status = 0; + struct be_adapter *adapter = pci_get_drvdata(pdev); + struct net_device *netdev = adapter->netdevp; + struct be_net_object *pnob = netdev_priv(netdev); + + netif_device_detach(netdev); + + status = pci_enable_device(pdev); + if (status) + return status; + + pci_set_power_state(pdev, 0); + pci_restore_state(pdev); + pci_enable_wake(pdev, 3, 0); + pci_enable_wake(pdev, 4, 0); /* 4 is D3 cold */ + + netif_carrier_on(netdev); + netif_start_queue(netdev); + + if (netif_running(netdev)) { + be_rxf_mac_address_read_write(&pnob->fn_obj, false, false, + false, true, false, netdev->dev_addr, NULL, NULL); + + status = be_nob_ring_init(adapter, pnob); + if (status < 0) + return status; + + tasklet_init(&(adapter->sts_handler), be_process_intr, + (unsigned long)adapter); + adapter->tasklet_started = 1; + + if (be_register_isr(adapter, pnob) != 0) { + printk(KERN_ERR "be_register_isr failed\n"); + return status; + } + + + status = be_mcc_init(adapter); + if (status < 0) { + printk(KERN_ERR "be_mcc_init failed\n"); + return status; + } + be_update_link_status(adapter); + /* + * Register async call back function to handle link + * status updates + */ + status = be_mcc_add_async_event_callback( + &adapter->net_obj->mcc_q_obj, + be_link_status_async_callback, (void *)adapter); + if (status != BE_SUCCESS) { + printk(KERN_WARNING "add_async_event_callback failed"); + printk(KERN_WARNING + "Link status changes may not be reflected\n"); + } + be_enable_intr(pnob); + be_enable_eq_intr(pnob); + be_up(adapter); + } + netif_device_attach(netdev); + adapter->dev_state = adapter->dev_pm_state; + return 0; + +} + +#endif + +/* Wait until no more pending transmits */ +void be_wait_nic_tx_cmplx_cmpl(struct be_net_object *pnob) +{ + int i; + + /* Wait for 20us * 50000 (= 1s) and no more */ + i = 0; + while ((pnob->tx_q_tl != pnob->tx_q_hd) && (i < 50000)) { + ++i; + udelay(20); + } + + /* Check for no more pending transmits */ + if (i >= 50000) { + printk(KERN_WARNING + "Did not receive completions for all TX requests\n"); + } +} + +static struct pci_driver be_driver = { + .name = be_driver_name, + .id_table = be_device_id_table, + .probe = be_probe, +#ifdef CONFIG_PM + .suspend = be_suspend, + .resume = be_resume, +#endif + .remove = be_remove +}; + +/* + * Module init entry point. Registers our our device and return. + * Our probe will be called if the device is found. + */ +static int __init be_init_module(void) +{ + int ret; + + if (rxbuf_size != 8192 && rxbuf_size != 4096 && rxbuf_size != 2048) { + printk(KERN_WARNING + "Unsupported receive buffer size (%d) requested\n", + rxbuf_size); + printk(KERN_WARNING + "Must be 2048, 4096 or 8192. Defaulting to 2048\n"); + rxbuf_size = 2048; + } + + ret = pci_register_driver(&be_driver); + + return ret; +} + +module_init(be_init_module); + +/* + * be_exit_module - Driver Exit Cleanup Routine + */ +static void __exit be_exit_module(void) +{ + pci_unregister_driver(&be_driver); +} + +module_exit(be_exit_module); diff --git a/trunk/drivers/staging/benet/be_int.c b/trunk/drivers/staging/benet/be_int.c new file mode 100644 index 000000000000..cba95d09a8b6 --- /dev/null +++ b/trunk/drivers/staging/benet/be_int.c @@ -0,0 +1,863 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#include +#include + +#include "benet.h" + +/* number of bytes of RX frame that are copied to skb->data */ +#define BE_HDR_LEN 64 + +#define NETIF_RX(skb) netif_receive_skb(skb) +#define VLAN_ACCEL_RX(skb, pnob, vt) \ + vlan_hwaccel_rx(skb, pnob->vlan_grp, vt) + +/* + This function notifies BladeEngine of the number of completion + entries processed from the specified completion queue by writing + the number of popped entries to the door bell. + + pnob - Pointer to the NetObject structure + n - Number of completion entries processed + cq_id - Queue ID of the completion queue for which notification + is being done. + re_arm - 1 - rearm the completion ring to generate an event. + - 0 - dont rearm the completion ring to generate an event +*/ +void be_notify_cmpl(struct be_net_object *pnob, int n, int cq_id, int re_arm) +{ + struct CQ_DB_AMAP cqdb; + + cqdb.dw[0] = 0; + AMAP_SET_BITS_PTR(CQ_DB, qid, &cqdb, cq_id); + AMAP_SET_BITS_PTR(CQ_DB, rearm, &cqdb, re_arm); + AMAP_SET_BITS_PTR(CQ_DB, num_popped, &cqdb, n); + PD_WRITE(&pnob->fn_obj, cq_db, cqdb.dw[0]); +} + +/* + * adds additional receive frags indicated by BE starting from given + * frag index (fi) to specified skb's frag list + */ +static void +add_skb_frags(struct be_net_object *pnob, struct sk_buff *skb, + u32 nresid, u32 fi) +{ + struct be_adapter *adapter = pnob->adapter; + u32 sk_frag_idx, n; + struct be_rx_page_info *rx_page_info; + u32 frag_sz = pnob->rx_buf_size; + + sk_frag_idx = skb_shinfo(skb)->nr_frags; + while (nresid) { + index_inc(&fi, pnob->rx_q_len); + + rx_page_info = (struct be_rx_page_info *)pnob->rx_ctxt[fi]; + pnob->rx_ctxt[fi] = NULL; + if ((rx_page_info->page_offset) || + (pnob->rx_pg_shared == false)) { + pci_unmap_page(adapter->pdev, + pci_unmap_addr(rx_page_info, bus), + frag_sz, PCI_DMA_FROMDEVICE); + } + + n = min(nresid, frag_sz); + skb_shinfo(skb)->frags[sk_frag_idx].page = rx_page_info->page; + skb_shinfo(skb)->frags[sk_frag_idx].page_offset + = rx_page_info->page_offset; + skb_shinfo(skb)->frags[sk_frag_idx].size = n; + + sk_frag_idx++; + skb->len += n; + skb->data_len += n; + skb_shinfo(skb)->nr_frags++; + nresid -= n; + + memset(rx_page_info, 0, sizeof(struct be_rx_page_info)); + atomic_dec(&pnob->rx_q_posted); + } +} + +/* + * This function processes incoming nic packets over various Rx queues. + * This function takes the adapter, the current Rx status descriptor + * entry and the Rx completion queue ID as argument. + */ +static inline int process_nic_rx_completion(struct be_net_object *pnob, + struct ETH_RX_COMPL_AMAP *rxcp) +{ + struct be_adapter *adapter = pnob->adapter; + struct sk_buff *skb; + int udpcksm, tcpcksm; + int n; + u32 nresid, fi; + u32 frag_sz = pnob->rx_buf_size; + u8 *va; + struct be_rx_page_info *rx_page_info; + u32 numfrags, vtp, vtm, vlan_tag, pktsize; + + fi = AMAP_GET_BITS_PTR(ETH_RX_COMPL, fragndx, rxcp); + BUG_ON(fi >= (int)pnob->rx_q_len); + BUG_ON(fi < 0); + + rx_page_info = (struct be_rx_page_info *)pnob->rx_ctxt[fi]; + BUG_ON(!rx_page_info->page); + pnob->rx_ctxt[fi] = NULL; + + /* + * If one page is used per fragment or if this is the second half of + * of the page, unmap the page here + */ + if ((rx_page_info->page_offset) || (pnob->rx_pg_shared == false)) { + pci_unmap_page(adapter->pdev, + pci_unmap_addr(rx_page_info, bus), frag_sz, + PCI_DMA_FROMDEVICE); + } + + atomic_dec(&pnob->rx_q_posted); + udpcksm = AMAP_GET_BITS_PTR(ETH_RX_COMPL, udpcksm, rxcp); + tcpcksm = AMAP_GET_BITS_PTR(ETH_RX_COMPL, tcpcksm, rxcp); + pktsize = AMAP_GET_BITS_PTR(ETH_RX_COMPL, pktsize, rxcp); + /* + * get rid of RX flush completions first. + */ + if ((tcpcksm) && (udpcksm) && (pktsize == 32)) { + put_page(rx_page_info->page); + memset(rx_page_info, 0, sizeof(struct be_rx_page_info)); + return 0; + } + skb = netdev_alloc_skb(pnob->netdev, BE_HDR_LEN + NET_IP_ALIGN); + if (skb == NULL) { + dev_info(&pnob->netdev->dev, "alloc_skb() failed\n"); + put_page(rx_page_info->page); + memset(rx_page_info, 0, sizeof(struct be_rx_page_info)); + goto free_frags; + } + skb_reserve(skb, NET_IP_ALIGN); + + skb->dev = pnob->netdev; + + n = min(pktsize, frag_sz); + + va = page_address(rx_page_info->page) + rx_page_info->page_offset; + prefetch(va); + + skb->len = n; + skb->data_len = n; + if (n <= BE_HDR_LEN) { + memcpy(skb->data, va, n); + put_page(rx_page_info->page); + skb->data_len -= n; + skb->tail += n; + } else { + + /* Setup the SKB with page buffer information */ + skb_shinfo(skb)->frags[0].page = rx_page_info->page; + skb_shinfo(skb)->nr_frags++; + + /* Copy the header into the skb_data */ + memcpy(skb->data, va, BE_HDR_LEN); + skb_shinfo(skb)->frags[0].page_offset = + rx_page_info->page_offset + BE_HDR_LEN; + skb_shinfo(skb)->frags[0].size = n - BE_HDR_LEN; + skb->data_len -= BE_HDR_LEN; + skb->tail += BE_HDR_LEN; + } + memset(rx_page_info, 0, sizeof(struct be_rx_page_info)); + nresid = pktsize - n; + + skb->protocol = eth_type_trans(skb, pnob->netdev); + + if ((tcpcksm || udpcksm) && adapter->rx_csum) + skb->ip_summed = CHECKSUM_UNNECESSARY; + else + skb->ip_summed = CHECKSUM_NONE; + /* + * if we have more bytes left, the frame has been + * given to us in multiple fragments. This happens + * with Jumbo frames. Add the remaining fragments to + * skb->frags[] array. + */ + if (nresid) + add_skb_frags(pnob, skb, nresid, fi); + + /* update the the true size of the skb. */ + skb->truesize = skb->len + sizeof(struct sk_buff); + + /* + * If a 802.3 frame or 802.2 LLC frame + * (i.e) contains length field in MAC Hdr + * and frame len is greater than 64 bytes + */ + if (((skb->protocol == ntohs(ETH_P_802_2)) || + (skb->protocol == ntohs(ETH_P_802_3))) + && (pktsize > BE_HDR_LEN)) { + /* + * If the length given in Mac Hdr is less than frame size + * Erraneous frame, Drop it + */ + if ((ntohs(*(u16 *) (va + 12)) + ETH_HLEN) < pktsize) { + /* Increment Non Ether type II frames dropped */ + adapter->be_stat.bes_802_3_dropped_frames++; + + kfree_skb(skb); + return 0; + } + /* + * else if the length given in Mac Hdr is greater than + * frame size, should not be seeing this sort of frames + * dump the pkt and pass to stack + */ + else if ((ntohs(*(u16 *) (va + 12)) + ETH_HLEN) > pktsize) { + /* Increment Non Ether type II frames malformed */ + adapter->be_stat.bes_802_3_malformed_frames++; + } + } + + vtp = AMAP_GET_BITS_PTR(ETH_RX_COMPL, vtp, rxcp); + vtm = AMAP_GET_BITS_PTR(ETH_RX_COMPL, vtm, rxcp); + if (vtp && vtm) { + /* Vlan tag present in pkt and BE found + * that the tag matched an entry in VLAN table + */ + if (!pnob->vlan_grp || pnob->num_vlans == 0) { + /* But we have no VLANs configured. + * This should never happen. Drop the packet. + */ + dev_info(&pnob->netdev->dev, + "BladeEngine: Unexpected vlan tagged packet\n"); + kfree_skb(skb); + return 0; + } + /* pass the VLAN packet to stack */ + vlan_tag = AMAP_GET_BITS_PTR(ETH_RX_COMPL, vlan_tag, rxcp); + VLAN_ACCEL_RX(skb, pnob, be16_to_cpu(vlan_tag)); + + } else { + NETIF_RX(skb); + } + return 0; + +free_frags: + /* free all frags associated with the current rxcp */ + numfrags = AMAP_GET_BITS_PTR(ETH_RX_COMPL, numfrags, rxcp); + while (numfrags-- > 1) { + index_inc(&fi, pnob->rx_q_len); + + rx_page_info = (struct be_rx_page_info *) + pnob->rx_ctxt[fi]; + pnob->rx_ctxt[fi] = (void *)NULL; + if (rx_page_info->page_offset || !pnob->rx_pg_shared) { + pci_unmap_page(adapter->pdev, + pci_unmap_addr(rx_page_info, bus), + frag_sz, PCI_DMA_FROMDEVICE); + } + + put_page(rx_page_info->page); + memset(rx_page_info, 0, sizeof(struct be_rx_page_info)); + atomic_dec(&pnob->rx_q_posted); + } + return -ENOMEM; +} + +static void process_nic_rx_completion_lro(struct be_net_object *pnob, + struct ETH_RX_COMPL_AMAP *rxcp) +{ + struct be_adapter *adapter = pnob->adapter; + struct skb_frag_struct rx_frags[BE_MAX_FRAGS_PER_FRAME]; + unsigned int udpcksm, tcpcksm; + u32 numfrags, vlanf, vtm, vlan_tag, nresid; + u16 vlant; + unsigned int fi, idx, n; + struct be_rx_page_info *rx_page_info; + u32 frag_sz = pnob->rx_buf_size, pktsize; + bool rx_coal = (adapter->max_rx_coal <= 1) ? 0 : 1; + u8 err, *va; + __wsum csum = 0; + + if (AMAP_GET_BITS_PTR(ETH_RX_COMPL, ipsec, rxcp)) { + /* Drop the pkt and move to the next completion. */ + adapter->be_stat.bes_rx_misc_pkts++; + return; + } + err = AMAP_GET_BITS_PTR(ETH_RX_COMPL, err, rxcp); + if (err || !rx_coal) { + /* We won't coalesce Rx pkts if the err bit set. + * take the path of normal completion processing */ + process_nic_rx_completion(pnob, rxcp); + return; + } + + fi = AMAP_GET_BITS_PTR(ETH_RX_COMPL, fragndx, rxcp); + BUG_ON(fi >= (int)pnob->rx_q_len); + BUG_ON(fi < 0); + rx_page_info = (struct be_rx_page_info *)pnob->rx_ctxt[fi]; + BUG_ON(!rx_page_info->page); + pnob->rx_ctxt[fi] = (void *)NULL; + /* If one page is used per fragment or if this is the + * second half of the page, unmap the page here + */ + if (rx_page_info->page_offset || !pnob->rx_pg_shared) { + pci_unmap_page(adapter->pdev, + pci_unmap_addr(rx_page_info, bus), + frag_sz, PCI_DMA_FROMDEVICE); + } + + numfrags = AMAP_GET_BITS_PTR(ETH_RX_COMPL, numfrags, rxcp); + udpcksm = AMAP_GET_BITS_PTR(ETH_RX_COMPL, udpcksm, rxcp); + tcpcksm = AMAP_GET_BITS_PTR(ETH_RX_COMPL, tcpcksm, rxcp); + vlan_tag = AMAP_GET_BITS_PTR(ETH_RX_COMPL, vlan_tag, rxcp); + vlant = be16_to_cpu(vlan_tag); + vlanf = AMAP_GET_BITS_PTR(ETH_RX_COMPL, vtp, rxcp); + vtm = AMAP_GET_BITS_PTR(ETH_RX_COMPL, vtm, rxcp); + pktsize = AMAP_GET_BITS_PTR(ETH_RX_COMPL, pktsize, rxcp); + + atomic_dec(&pnob->rx_q_posted); + + if (tcpcksm && udpcksm && pktsize == 32) { + /* flush completion entries */ + put_page(rx_page_info->page); + memset(rx_page_info, 0, sizeof(struct be_rx_page_info)); + return; + } + /* Only one of udpcksum and tcpcksum can be set */ + BUG_ON(udpcksm && tcpcksm); + + /* jumbo frames could come in multiple fragments */ + BUG_ON(numfrags != ((pktsize + (frag_sz - 1)) / frag_sz)); + n = min(pktsize, frag_sz); + nresid = pktsize - n; /* will be useful for jumbo pkts */ + idx = 0; + + va = page_address(rx_page_info->page) + rx_page_info->page_offset; + prefetch(va); + rx_frags[idx].page = rx_page_info->page; + rx_frags[idx].page_offset = (rx_page_info->page_offset); + rx_frags[idx].size = n; + memset(rx_page_info, 0, sizeof(struct be_rx_page_info)); + + /* If we got multiple fragments, we have more data. */ + while (nresid) { + idx++; + index_inc(&fi, pnob->rx_q_len); + + rx_page_info = (struct be_rx_page_info *)pnob->rx_ctxt[fi]; + pnob->rx_ctxt[fi] = (void *)NULL; + if (rx_page_info->page_offset || !pnob->rx_pg_shared) { + pci_unmap_page(adapter->pdev, + pci_unmap_addr(rx_page_info, bus), + frag_sz, PCI_DMA_FROMDEVICE); + } + + n = min(nresid, frag_sz); + rx_frags[idx].page = rx_page_info->page; + rx_frags[idx].page_offset = (rx_page_info->page_offset); + rx_frags[idx].size = n; + + nresid -= n; + memset(rx_page_info, 0, sizeof(struct be_rx_page_info)); + atomic_dec(&pnob->rx_q_posted); + } + + if (likely(!(vlanf && vtm))) { + lro_receive_frags(&pnob->lro_mgr, rx_frags, + pktsize, pktsize, + (void *)(unsigned long)csum, csum); + } else { + /* Vlan tag present in pkt and BE found + * that the tag matched an entry in VLAN table + */ + if (unlikely(!pnob->vlan_grp || pnob->num_vlans == 0)) { + /* But we have no VLANs configured. + * This should never happen. Drop the packet. + */ + dev_info(&pnob->netdev->dev, + "BladeEngine: Unexpected vlan tagged packet\n"); + return; + } + /* pass the VLAN packet to stack */ + lro_vlan_hwaccel_receive_frags(&pnob->lro_mgr, + rx_frags, pktsize, pktsize, + pnob->vlan_grp, vlant, + (void *)(unsigned long)csum, + csum); + } + + adapter->be_stat.bes_rx_coal++; +} + +struct ETH_RX_COMPL_AMAP *be_get_rx_cmpl(struct be_net_object *pnob) +{ + struct ETH_RX_COMPL_AMAP *rxcp = &pnob->rx_cq[pnob->rx_cq_tl]; + u32 valid, ct; + + valid = AMAP_GET_BITS_PTR(ETH_RX_COMPL, valid, rxcp); + if (valid == 0) + return NULL; + + ct = AMAP_GET_BITS_PTR(ETH_RX_COMPL, ct, rxcp); + if (ct != 0) { + /* Invalid chute #. treat as error */ + AMAP_SET_BITS_PTR(ETH_RX_COMPL, err, rxcp, 1); + } + + be_adv_rxcq_tl(pnob); + AMAP_SET_BITS_PTR(ETH_RX_COMPL, valid, rxcp, 0); + return rxcp; +} + +static void update_rx_rate(struct be_adapter *adapter) +{ + /* update the rate once in two seconds */ + if ((jiffies - adapter->eth_rx_jiffies) > 2 * (HZ)) { + u32 r; + r = adapter->eth_rx_bytes / + ((jiffies - adapter->eth_rx_jiffies) / (HZ)); + r = (r / 1000000); /* MB/Sec */ + + /* Mega Bits/Sec */ + adapter->be_stat.bes_eth_rx_rate = (r * 8); + adapter->eth_rx_jiffies = jiffies; + adapter->eth_rx_bytes = 0; + } +} + +static int process_rx_completions(struct be_net_object *pnob, int max_work) +{ + struct be_adapter *adapter = pnob->adapter; + struct ETH_RX_COMPL_AMAP *rxcp; + u32 nc = 0; + unsigned int pktsize; + + while (max_work && (rxcp = be_get_rx_cmpl(pnob))) { + prefetch(rxcp); + pktsize = AMAP_GET_BITS_PTR(ETH_RX_COMPL, pktsize, rxcp); + process_nic_rx_completion_lro(pnob, rxcp); + adapter->eth_rx_bytes += pktsize; + update_rx_rate(adapter); + nc++; + max_work--; + adapter->be_stat.bes_rx_compl++; + } + if (likely(adapter->max_rx_coal > 1)) { + adapter->be_stat.bes_rx_flush++; + lro_flush_all(&pnob->lro_mgr); + } + + /* Refill the queue */ + if (atomic_read(&pnob->rx_q_posted) < 900) + be_post_eth_rx_buffs(pnob); + + return nc; +} + +static struct ETH_TX_COMPL_AMAP *be_get_tx_cmpl(struct be_net_object *pnob) +{ + struct ETH_TX_COMPL_AMAP *txcp = &pnob->tx_cq[pnob->tx_cq_tl]; + u32 valid; + + valid = AMAP_GET_BITS_PTR(ETH_TX_COMPL, valid, txcp); + if (valid == 0) + return NULL; + + AMAP_SET_BITS_PTR(ETH_TX_COMPL, valid, txcp, 0); + be_adv_txcq_tl(pnob); + return txcp; + +} + +void process_one_tx_compl(struct be_net_object *pnob, u32 end_idx) +{ + struct be_adapter *adapter = pnob->adapter; + int cur_index, tx_wrbs_completed = 0; + struct sk_buff *skb; + u64 busaddr, pa, pa_lo, pa_hi; + struct ETH_WRB_AMAP *wrb; + u32 frag_len, last_index, j; + + last_index = tx_compl_lastwrb_idx_get(pnob); + BUG_ON(last_index != end_idx); + pnob->tx_ctxt[pnob->tx_q_tl] = NULL; + do { + cur_index = pnob->tx_q_tl; + wrb = &pnob->tx_q[cur_index]; + pa_hi = AMAP_GET_BITS_PTR(ETH_WRB, frag_pa_hi, wrb); + pa_lo = AMAP_GET_BITS_PTR(ETH_WRB, frag_pa_lo, wrb); + frag_len = AMAP_GET_BITS_PTR(ETH_WRB, frag_len, wrb); + busaddr = (pa_hi << 32) | pa_lo; + if (busaddr != 0) { + pa = le64_to_cpu(busaddr); + pci_unmap_single(adapter->pdev, pa, + frag_len, PCI_DMA_TODEVICE); + } + if (cur_index == last_index) { + skb = (struct sk_buff *)pnob->tx_ctxt[cur_index]; + BUG_ON(!skb); + for (j = 0; j < skb_shinfo(skb)->nr_frags; j++) { + struct skb_frag_struct *frag; + frag = &skb_shinfo(skb)->frags[j]; + pci_unmap_page(adapter->pdev, + (ulong) frag->page, frag->size, + PCI_DMA_TODEVICE); + } + kfree_skb(skb); + pnob->tx_ctxt[cur_index] = NULL; + } else { + BUG_ON(pnob->tx_ctxt[cur_index]); + } + tx_wrbs_completed++; + be_adv_txq_tl(pnob); + } while (cur_index != last_index); + atomic_sub(tx_wrbs_completed, &pnob->tx_q_used); +} + +/* there is no need to take an SMP lock here since currently + * we have only one instance of the tasklet that does completion + * processing. + */ +static void process_nic_tx_completions(struct be_net_object *pnob) +{ + struct be_adapter *adapter = pnob->adapter; + struct ETH_TX_COMPL_AMAP *txcp; + struct net_device *netdev = pnob->netdev; + u32 end_idx, num_processed = 0; + + adapter->be_stat.bes_tx_events++; + + while ((txcp = be_get_tx_cmpl(pnob))) { + end_idx = AMAP_GET_BITS_PTR(ETH_TX_COMPL, wrb_index, txcp); + process_one_tx_compl(pnob, end_idx); + num_processed++; + adapter->be_stat.bes_tx_compl++; + } + be_notify_cmpl(pnob, num_processed, pnob->tx_cq_id, 1); + /* + * We got Tx completions and have usable WRBs. + * If the netdev's queue has been stopped + * because we had run out of WRBs, wake it now. + */ + spin_lock(&adapter->txq_lock); + if (netif_queue_stopped(netdev) + && atomic_read(&pnob->tx_q_used) < pnob->tx_q_len / 2) { + netif_wake_queue(netdev); + } + spin_unlock(&adapter->txq_lock); +} + +static u32 post_rx_buffs(struct be_net_object *pnob, struct list_head *rxbl) +{ + u32 nposted = 0; + struct ETH_RX_D_AMAP *rxd = NULL; + struct be_recv_buffer *rxbp; + void **rx_ctxp; + struct RQ_DB_AMAP rqdb; + + rx_ctxp = pnob->rx_ctxt; + + while (!list_empty(rxbl) && + (rx_ctxp[pnob->rx_q_hd] == NULL) && nposted < 255) { + + rxbp = list_first_entry(rxbl, struct be_recv_buffer, rxb_list); + list_del(&rxbp->rxb_list); + rxd = pnob->rx_q + pnob->rx_q_hd; + AMAP_SET_BITS_PTR(ETH_RX_D, fragpa_lo, rxd, rxbp->rxb_pa_lo); + AMAP_SET_BITS_PTR(ETH_RX_D, fragpa_hi, rxd, rxbp->rxb_pa_hi); + + rx_ctxp[pnob->rx_q_hd] = rxbp->rxb_ctxt; + be_adv_rxq_hd(pnob); + nposted++; + } + + if (nposted) { + /* Now press the door bell to notify BladeEngine. */ + rqdb.dw[0] = 0; + AMAP_SET_BITS_PTR(RQ_DB, numPosted, &rqdb, nposted); + AMAP_SET_BITS_PTR(RQ_DB, rq, &rqdb, pnob->rx_q_id); + PD_WRITE(&pnob->fn_obj, erx_rq_db, rqdb.dw[0]); + } + atomic_add(nposted, &pnob->rx_q_posted); + return nposted; +} + +void be_post_eth_rx_buffs(struct be_net_object *pnob) +{ + struct be_adapter *adapter = pnob->adapter; + u32 num_bufs, r; + u64 busaddr = 0, tmp_pa; + u32 max_bufs, pg_hd; + u32 frag_size; + struct be_recv_buffer *rxbp; + struct list_head rxbl; + struct be_rx_page_info *rx_page_info; + struct page *page = NULL; + u32 page_order = 0; + gfp_t alloc_flags = GFP_ATOMIC; + + BUG_ON(!adapter); + + max_bufs = 64; /* should be even # <= 255. */ + + frag_size = pnob->rx_buf_size; + page_order = get_order(frag_size); + + if (frag_size == 8192) + alloc_flags |= (gfp_t) __GFP_COMP; + /* + * Form a linked list of RECV_BUFFFER structure to be be posted. + * We will post even number of buffer so that pages can be + * shared. + */ + INIT_LIST_HEAD(&rxbl); + + for (num_bufs = 0; num_bufs < max_bufs && + !pnob->rx_page_info[pnob->rx_pg_info_hd].page; ++num_bufs) { + + rxbp = &pnob->eth_rx_bufs[num_bufs]; + pg_hd = pnob->rx_pg_info_hd; + rx_page_info = &pnob->rx_page_info[pg_hd]; + + if (!page) { + page = alloc_pages(alloc_flags, page_order); + if (unlikely(page == NULL)) { + adapter->be_stat.bes_ethrx_post_fail++; + pnob->rxbuf_post_fail++; + break; + } + pnob->rxbuf_post_fail = 0; + busaddr = pci_map_page(adapter->pdev, page, 0, + frag_size, PCI_DMA_FROMDEVICE); + rx_page_info->page_offset = 0; + rx_page_info->page = page; + /* + * If we are sharing a page among two skbs, + * alloc a new one on the next iteration + */ + if (pnob->rx_pg_shared == false) + page = NULL; + } else { + get_page(page); + rx_page_info->page_offset += frag_size; + rx_page_info->page = page; + /* + * We are finished with the alloced page, + * Alloc a new one on the next iteration + */ + page = NULL; + } + rxbp->rxb_ctxt = (void *)rx_page_info; + index_inc(&pnob->rx_pg_info_hd, pnob->rx_q_len); + + pci_unmap_addr_set(rx_page_info, bus, busaddr); + tmp_pa = busaddr + rx_page_info->page_offset; + rxbp->rxb_pa_lo = (tmp_pa & 0xFFFFFFFF); + rxbp->rxb_pa_hi = (tmp_pa >> 32); + rxbp->rxb_len = frag_size; + list_add_tail(&rxbp->rxb_list, &rxbl); + } /* End of for */ + + r = post_rx_buffs(pnob, &rxbl); + BUG_ON(r != num_bufs); + return; +} + +/* + * Interrupt service for network function. We just schedule the + * tasklet which does all completion processing. + */ +irqreturn_t be_int(int irq, void *dev) +{ + struct net_device *netdev = dev; + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + u32 isr; + + isr = CSR_READ(&pnob->fn_obj, cev.isr1); + if (unlikely(!isr)) + return IRQ_NONE; + + spin_lock(&adapter->int_lock); + adapter->isr |= isr; + spin_unlock(&adapter->int_lock); + + adapter->be_stat.bes_ints++; + + tasklet_schedule(&adapter->sts_handler); + return IRQ_HANDLED; +} + +/* + * Poll function called by NAPI with a work budget. + * We process as many UC. BC and MC receive completions + * as the budget allows and return the actual number of + * RX ststutses processed. + */ +int be_poll(struct napi_struct *napi, int budget) +{ + struct be_net_object *pnob = + container_of(napi, struct be_net_object, napi); + u32 work_done; + + pnob->adapter->be_stat.bes_polls++; + work_done = process_rx_completions(pnob, budget); + BUG_ON(work_done > budget); + + /* All consumed */ + if (work_done < budget) { + netif_rx_complete(napi); + /* enable intr */ + be_notify_cmpl(pnob, work_done, pnob->rx_cq_id, 1); + } else { + /* More to be consumed; continue with interrupts disabled */ + be_notify_cmpl(pnob, work_done, pnob->rx_cq_id, 0); + } + return work_done; +} + +static struct EQ_ENTRY_AMAP *get_event(struct be_net_object *pnob) +{ + struct EQ_ENTRY_AMAP *eqp = &(pnob->event_q[pnob->event_q_tl]); + if (!AMAP_GET_BITS_PTR(EQ_ENTRY, Valid, eqp)) + return NULL; + be_adv_eq_tl(pnob); + return eqp; +} + +/* + * Processes all valid events in the event ring associated with given + * NetObject. Also, notifies BE the number of events processed. + */ +static inline u32 process_events(struct be_net_object *pnob) +{ + struct be_adapter *adapter = pnob->adapter; + struct EQ_ENTRY_AMAP *eqp; + u32 rid, num_events = 0; + struct net_device *netdev = pnob->netdev; + + while ((eqp = get_event(pnob)) != NULL) { + adapter->be_stat.bes_events++; + rid = AMAP_GET_BITS_PTR(EQ_ENTRY, ResourceID, eqp); + if (rid == pnob->rx_cq_id) { + adapter->be_stat.bes_rx_events++; + netif_rx_schedule(&pnob->napi); + } else if (rid == pnob->tx_cq_id) { + process_nic_tx_completions(pnob); + } else if (rid == pnob->mcc_cq_id) { + be_mcc_process_cq(&pnob->mcc_q_obj, 1); + } else { + dev_info(&netdev->dev, + "Invalid EQ ResourceID %d\n", rid); + } + AMAP_SET_BITS_PTR(EQ_ENTRY, Valid, eqp, 0); + AMAP_SET_BITS_PTR(EQ_ENTRY, ResourceID, eqp, 0); + num_events++; + } + return num_events; +} + +static void update_eqd(struct be_adapter *adapter, struct be_net_object *pnob) +{ + int status; + struct be_eq_object *eq_objectp; + + /* update once a second */ + if ((jiffies - adapter->ips_jiffies) > 1 * (HZ)) { + /* One second elapsed since last update */ + u32 r, new_eqd = -1; + r = adapter->be_stat.bes_ints - adapter->be_stat.bes_prev_ints; + r = r / ((jiffies - adapter->ips_jiffies) / (HZ)); + adapter->be_stat.bes_ips = r; + adapter->ips_jiffies = jiffies; + adapter->be_stat.bes_prev_ints = adapter->be_stat.bes_ints; + if (r > IPS_HI_WM && adapter->cur_eqd < adapter->max_eqd) + new_eqd = (adapter->cur_eqd + 8); + if (r < IPS_LO_WM && adapter->cur_eqd > adapter->min_eqd) + new_eqd = (adapter->cur_eqd - 8); + if (adapter->enable_aic && new_eqd != -1) { + eq_objectp = &pnob->event_q_obj; + status = be_eq_modify_delay(&pnob->fn_obj, 1, + &eq_objectp, &new_eqd, NULL, + NULL, NULL); + if (status == BE_SUCCESS) + adapter->cur_eqd = new_eqd; + } + } +} + +/* + This function notifies BladeEngine of how many events were processed + from the event queue by ringing the corresponding door bell and + optionally re-arms the event queue. + n - number of events processed + re_arm - 1 - re-arm the EQ, 0 - do not re-arm the EQ + +*/ +static void be_notify_event(struct be_net_object *pnob, int n, int re_arm) +{ + struct CQ_DB_AMAP eqdb; + eqdb.dw[0] = 0; + + AMAP_SET_BITS_PTR(CQ_DB, qid, &eqdb, pnob->event_q_id); + AMAP_SET_BITS_PTR(CQ_DB, rearm, &eqdb, re_arm); + AMAP_SET_BITS_PTR(CQ_DB, event, &eqdb, 1); + AMAP_SET_BITS_PTR(CQ_DB, num_popped, &eqdb, n); + /* + * Under some situations we see an interrupt and no valid + * EQ entry. To keep going, we need to ring the DB even if + * numPOsted is 0. + */ + PD_WRITE(&pnob->fn_obj, cq_db, eqdb.dw[0]); + return; +} + +/* + * Called from the tasklet scheduled by ISR. All real interrupt processing + * is done here. + */ +void be_process_intr(unsigned long context) +{ + struct be_adapter *adapter = (struct be_adapter *)context; + struct be_net_object *pnob = adapter->net_obj; + u32 isr, n; + ulong flags = 0; + + isr = adapter->isr; + + /* + * we create only one NIC event queue in Linux. Event is + * expected only in the first event queue + */ + BUG_ON(isr & 0xfffffffe); + if ((isr & 1) == 0) + return; /* not our interrupt */ + n = process_events(pnob); + /* + * Clear the event bit. adapter->isr is set by + * hard interrupt. Prevent race with lock. + */ + spin_lock_irqsave(&adapter->int_lock, flags); + adapter->isr &= ~1; + spin_unlock_irqrestore(&adapter->int_lock, flags); + be_notify_event(pnob, n, 1); + /* + * If previous allocation attempts had failed and + * BE has used up all posted buffers, post RX buffers here + */ + if (pnob->rxbuf_post_fail && atomic_read(&pnob->rx_q_posted) == 0) + be_post_eth_rx_buffs(pnob); + update_eqd(adapter, pnob); + return; +} diff --git a/trunk/drivers/staging/benet/be_netif.c b/trunk/drivers/staging/benet/be_netif.c new file mode 100644 index 000000000000..2b8daf63dc7d --- /dev/null +++ b/trunk/drivers/staging/benet/be_netif.c @@ -0,0 +1,705 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * be_netif.c + * + * This file contains various entry points of drivers seen by tcp/ip stack. + */ + +#include +#include +#include "benet.h" +#include +#include + +/* Strings to print Link properties */ +static const char *link_speed[] = { + "Invalid link Speed Value", + "10 Mbps", + "100 Mbps", + "1 Gbps", + "10 Gbps" +}; + +static const char *link_duplex[] = { + "Invalid Duplex Value", + "Half Duplex", + "Full Duplex" +}; + +static const char *link_state[] = { + "", + "(active)" +}; + +void be_print_link_info(struct BE_LINK_STATUS *lnk_status) +{ + u16 si, di, ai; + + /* Port 0 */ + if (lnk_status->mac0_speed && lnk_status->mac0_duplex) { + /* Port is up and running */ + si = (lnk_status->mac0_speed < 5) ? lnk_status->mac0_speed : 0; + di = (lnk_status->mac0_duplex < 3) ? + lnk_status->mac0_duplex : 0; + ai = (lnk_status->active_port == 0) ? 1 : 0; + printk(KERN_INFO "PortNo. 0: Speed - %s %s %s\n", + link_speed[si], link_duplex[di], link_state[ai]); + } else + printk(KERN_INFO "PortNo. 0: Down\n"); + + /* Port 1 */ + if (lnk_status->mac1_speed && lnk_status->mac1_duplex) { + /* Port is up and running */ + si = (lnk_status->mac1_speed < 5) ? lnk_status->mac1_speed : 0; + di = (lnk_status->mac1_duplex < 3) ? + lnk_status->mac1_duplex : 0; + ai = (lnk_status->active_port == 0) ? 1 : 0; + printk(KERN_INFO "PortNo. 1: Speed - %s %s %s\n", + link_speed[si], link_duplex[di], link_state[ai]); + } else + printk(KERN_INFO "PortNo. 1: Down\n"); + + return; +} + +static int +be_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr, + void **ip_hdr, void **tcpudp_hdr, + u64 *hdr_flags, void *priv) +{ + struct ethhdr *eh; + struct vlan_ethhdr *veh; + struct iphdr *iph; + u8 *va = page_address(frag->page) + frag->page_offset; + unsigned long ll_hlen; + + /* find the mac header, abort if not IPv4 */ + + prefetch(va); + eh = (struct ethhdr *)va; + *mac_hdr = eh; + ll_hlen = ETH_HLEN; + if (eh->h_proto != htons(ETH_P_IP)) { + if (eh->h_proto == htons(ETH_P_8021Q)) { + veh = (struct vlan_ethhdr *)va; + if (veh->h_vlan_encapsulated_proto != htons(ETH_P_IP)) + return -1; + + ll_hlen += VLAN_HLEN; + + } else { + return -1; + } + } + *hdr_flags = LRO_IPV4; + + iph = (struct iphdr *)(va + ll_hlen); + *ip_hdr = iph; + if (iph->protocol != IPPROTO_TCP) + return -1; + *hdr_flags |= LRO_TCP; + *tcpudp_hdr = (u8 *) (*ip_hdr) + (iph->ihl << 2); + + return 0; +} + +static int benet_open(struct net_device *netdev) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + struct net_lro_mgr *lro_mgr; + + if (adapter->dev_state < BE_DEV_STATE_INIT) + return -EAGAIN; + + lro_mgr = &pnob->lro_mgr; + lro_mgr->dev = netdev; + + lro_mgr->features = LRO_F_NAPI; + lro_mgr->ip_summed = CHECKSUM_UNNECESSARY; + lro_mgr->ip_summed_aggr = CHECKSUM_UNNECESSARY; + lro_mgr->max_desc = BE_MAX_LRO_DESCRIPTORS; + lro_mgr->lro_arr = pnob->lro_desc; + lro_mgr->get_frag_header = be_get_frag_header; + lro_mgr->max_aggr = adapter->max_rx_coal; + lro_mgr->frag_align_pad = 2; + if (lro_mgr->max_aggr > MAX_SKB_FRAGS) + lro_mgr->max_aggr = MAX_SKB_FRAGS; + + adapter->max_rx_coal = BE_LRO_MAX_PKTS; + + be_update_link_status(adapter); + + /* + * Set carrier on only if Physical Link up + * Either of the port link status up signifies this + */ + if ((adapter->port0_link_sts == BE_PORT_LINK_UP) || + (adapter->port1_link_sts == BE_PORT_LINK_UP)) { + netif_start_queue(netdev); + netif_carrier_on(netdev); + } + + adapter->dev_state = BE_DEV_STATE_OPEN; + napi_enable(&pnob->napi); + be_enable_intr(pnob); + be_enable_eq_intr(pnob); + /* + * RX completion queue may be in dis-armed state. Arm it. + */ + be_notify_cmpl(pnob, 0, pnob->rx_cq_id, 1); + + return 0; +} + +static int benet_close(struct net_device *netdev) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + + netif_stop_queue(netdev); + synchronize_irq(netdev->irq); + + be_wait_nic_tx_cmplx_cmpl(pnob); + adapter->dev_state = BE_DEV_STATE_INIT; + netif_carrier_off(netdev); + + adapter->port0_link_sts = BE_PORT_LINK_DOWN; + adapter->port1_link_sts = BE_PORT_LINK_DOWN; + be_disable_intr(pnob); + be_disable_eq_intr(pnob); + napi_disable(&pnob->napi); + + return 0; +} + +/* + * Setting a Mac Address for BE + * Takes netdev and a void pointer as arguments. + * The pointer holds the new addres to be used. + */ +static int benet_set_mac_addr(struct net_device *netdev, void *p) +{ + struct sockaddr *addr = p; + struct be_net_object *pnob = netdev_priv(netdev); + + memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); + be_rxf_mac_address_read_write(&pnob->fn_obj, 0, 0, false, true, false, + netdev->dev_addr, NULL, NULL); + /* + * Since we are doing Active-Passive failover, both + * ports should have matching MAC addresses everytime. + */ + be_rxf_mac_address_read_write(&pnob->fn_obj, 1, 0, false, true, false, + netdev->dev_addr, NULL, NULL); + + return 0; +} + +void be_get_stats_timer_handler(unsigned long context) +{ + struct be_timer_ctxt *ctxt = (struct be_timer_ctxt *)context; + + if (atomic_read(&ctxt->get_stat_flag)) { + atomic_dec(&ctxt->get_stat_flag); + up((void *)ctxt->get_stat_sem_addr); + } + del_timer(&ctxt->get_stats_timer); + return; +} + +void be_get_stat_cb(void *context, int status, + struct MCC_WRB_AMAP *optional_wrb) +{ + struct be_timer_ctxt *ctxt = (struct be_timer_ctxt *)context; + /* + * just up the semaphore if the get_stat_flag + * reads 1. so that the waiter can continue. + * If it is 0, then it was handled by the timer handler. + */ + del_timer(&ctxt->get_stats_timer); + if (atomic_read(&ctxt->get_stat_flag)) { + atomic_dec(&ctxt->get_stat_flag); + up((void *)ctxt->get_stat_sem_addr); + } +} + +struct net_device_stats *benet_get_stats(struct net_device *dev) +{ + struct be_net_object *pnob = netdev_priv(dev); + struct be_adapter *adapter = pnob->adapter; + u64 pa; + struct be_timer_ctxt *ctxt = &adapter->timer_ctxt; + + if (adapter->dev_state != BE_DEV_STATE_OPEN) { + /* Return previously read stats */ + return &(adapter->benet_stats); + } + /* Get Physical Addr */ + pa = pci_map_single(adapter->pdev, adapter->eth_statsp, + sizeof(struct FWCMD_ETH_GET_STATISTICS), + PCI_DMA_FROMDEVICE); + ctxt->get_stat_sem_addr = (unsigned long)&adapter->get_eth_stat_sem; + atomic_inc(&ctxt->get_stat_flag); + + be_rxf_query_eth_statistics(&pnob->fn_obj, adapter->eth_statsp, + cpu_to_le64(pa), be_get_stat_cb, ctxt, + NULL); + + ctxt->get_stats_timer.data = (unsigned long)ctxt; + mod_timer(&ctxt->get_stats_timer, (jiffies + (HZ * 2))); + down((void *)ctxt->get_stat_sem_addr); /* callback will unblock us */ + + /* Adding port0 and port1 stats. */ + adapter->benet_stats.rx_packets = + adapter->eth_statsp->params.response.p0recvdtotalframes + + adapter->eth_statsp->params.response.p1recvdtotalframes; + adapter->benet_stats.tx_packets = + adapter->eth_statsp->params.response.p0xmitunicastframes + + adapter->eth_statsp->params.response.p1xmitunicastframes; + adapter->benet_stats.tx_bytes = + adapter->eth_statsp->params.response.p0xmitbyteslsd + + adapter->eth_statsp->params.response.p1xmitbyteslsd; + adapter->benet_stats.rx_errors = + adapter->eth_statsp->params.response.p0crcerrors + + adapter->eth_statsp->params.response.p1crcerrors; + adapter->benet_stats.rx_errors += + adapter->eth_statsp->params.response.p0alignmentsymerrs + + adapter->eth_statsp->params.response.p1alignmentsymerrs; + adapter->benet_stats.rx_errors += + adapter->eth_statsp->params.response.p0inrangelenerrors + + adapter->eth_statsp->params.response.p1inrangelenerrors; + adapter->benet_stats.rx_bytes = + adapter->eth_statsp->params.response.p0recvdtotalbytesLSD + + adapter->eth_statsp->params.response.p1recvdtotalbytesLSD; + adapter->benet_stats.rx_crc_errors = + adapter->eth_statsp->params.response.p0crcerrors + + adapter->eth_statsp->params.response.p1crcerrors; + + adapter->benet_stats.tx_packets += + adapter->eth_statsp->params.response.p0xmitmulticastframes + + adapter->eth_statsp->params.response.p1xmitmulticastframes; + adapter->benet_stats.tx_packets += + adapter->eth_statsp->params.response.p0xmitbroadcastframes + + adapter->eth_statsp->params.response.p1xmitbroadcastframes; + adapter->benet_stats.tx_errors = 0; + + adapter->benet_stats.multicast = + adapter->eth_statsp->params.response.p0xmitmulticastframes + + adapter->eth_statsp->params.response.p1xmitmulticastframes; + + adapter->benet_stats.rx_fifo_errors = + adapter->eth_statsp->params.response.p0rxfifooverflowdropped + + adapter->eth_statsp->params.response.p1rxfifooverflowdropped; + adapter->benet_stats.rx_frame_errors = + adapter->eth_statsp->params.response.p0alignmentsymerrs + + adapter->eth_statsp->params.response.p1alignmentsymerrs; + adapter->benet_stats.rx_length_errors = + adapter->eth_statsp->params.response.p0inrangelenerrors + + adapter->eth_statsp->params.response.p1inrangelenerrors; + adapter->benet_stats.rx_length_errors += + adapter->eth_statsp->params.response.p0outrangeerrors + + adapter->eth_statsp->params.response.p1outrangeerrors; + adapter->benet_stats.rx_length_errors += + adapter->eth_statsp->params.response.p0frametoolongerrors + + adapter->eth_statsp->params.response.p1frametoolongerrors; + + pci_unmap_single(adapter->pdev, (ulong) adapter->eth_statsp, + sizeof(struct FWCMD_ETH_GET_STATISTICS), + PCI_DMA_FROMDEVICE); + return &(adapter->benet_stats); + +} + +static void be_start_tx(struct be_net_object *pnob, u32 nposted) +{ +#define CSR_ETH_MAX_SQPOSTS 255 + struct SQ_DB_AMAP sqdb; + + sqdb.dw[0] = 0; + + AMAP_SET_BITS_PTR(SQ_DB, cid, &sqdb, pnob->tx_q_id); + while (nposted) { + if (nposted > CSR_ETH_MAX_SQPOSTS) { + AMAP_SET_BITS_PTR(SQ_DB, numPosted, &sqdb, + CSR_ETH_MAX_SQPOSTS); + nposted -= CSR_ETH_MAX_SQPOSTS; + } else { + AMAP_SET_BITS_PTR(SQ_DB, numPosted, &sqdb, nposted); + nposted = 0; + } + PD_WRITE(&pnob->fn_obj, etx_sq_db, sqdb.dw[0]); + } + + return; +} + +static void update_tx_rate(struct be_adapter *adapter) +{ + /* update the rate once in two seconds */ + if ((jiffies - adapter->eth_tx_jiffies) > 2 * (HZ)) { + u32 r; + r = adapter->eth_tx_bytes / + ((jiffies - adapter->eth_tx_jiffies) / (HZ)); + r = (r / 1000000); /* M bytes/s */ + adapter->be_stat.bes_eth_tx_rate = (r * 8); /* M bits/s */ + adapter->eth_tx_jiffies = jiffies; + adapter->eth_tx_bytes = 0; + } +} + +static int wrb_cnt_in_skb(struct sk_buff *skb) +{ + int cnt = 0; + while (skb) { + if (skb->len > skb->data_len) + cnt++; + cnt += skb_shinfo(skb)->nr_frags; + skb = skb_shinfo(skb)->frag_list; + } + BUG_ON(cnt > BE_MAX_TX_FRAG_COUNT); + return cnt; +} + +static void wrb_fill(struct ETH_WRB_AMAP *wrb, u64 addr, int len) +{ + AMAP_SET_BITS_PTR(ETH_WRB, frag_pa_hi, wrb, addr >> 32); + AMAP_SET_BITS_PTR(ETH_WRB, frag_pa_lo, wrb, addr & 0xFFFFFFFF); + AMAP_SET_BITS_PTR(ETH_WRB, frag_len, wrb, len); +} + +static void wrb_fill_extra(struct ETH_WRB_AMAP *wrb, struct sk_buff *skb, + struct be_net_object *pnob) +{ + wrb->dw[2] = 0; + wrb->dw[3] = 0; + AMAP_SET_BITS_PTR(ETH_WRB, crc, wrb, 1); + if (skb_shinfo(skb)->gso_segs > 1 && skb_shinfo(skb)->gso_size) { + AMAP_SET_BITS_PTR(ETH_WRB, lso, wrb, 1); + AMAP_SET_BITS_PTR(ETH_WRB, lso_mss, wrb, + skb_shinfo(skb)->gso_size); + } else if (skb->ip_summed == CHECKSUM_PARTIAL) { + u8 proto = ((struct iphdr *)ip_hdr(skb))->protocol; + if (proto == IPPROTO_TCP) + AMAP_SET_BITS_PTR(ETH_WRB, tcpcs, wrb, 1); + else if (proto == IPPROTO_UDP) + AMAP_SET_BITS_PTR(ETH_WRB, udpcs, wrb, 1); + } + if (pnob->vlan_grp && vlan_tx_tag_present(skb)) { + AMAP_SET_BITS_PTR(ETH_WRB, vlan, wrb, 1); + AMAP_SET_BITS_PTR(ETH_WRB, vlan_tag, wrb, vlan_tx_tag_get(skb)); + } +} + +static inline void wrb_copy_extra(struct ETH_WRB_AMAP *to, + struct ETH_WRB_AMAP *from) +{ + + to->dw[2] = from->dw[2]; + to->dw[3] = from->dw[3]; +} + +/* Returns the actual count of wrbs used including a possible dummy */ +static int copy_skb_to_txq(struct be_net_object *pnob, struct sk_buff *skb, + u32 wrb_cnt, u32 *copied) +{ + u64 busaddr; + struct ETH_WRB_AMAP *wrb = NULL, *first = NULL; + u32 i; + bool dummy = true; + struct pci_dev *pdev = pnob->adapter->pdev; + + if (wrb_cnt & 1) + wrb_cnt++; + else + dummy = false; + + atomic_add(wrb_cnt, &pnob->tx_q_used); + + while (skb) { + if (skb->len > skb->data_len) { + int len = skb->len - skb->data_len; + busaddr = pci_map_single(pdev, skb->data, len, + PCI_DMA_TODEVICE); + busaddr = cpu_to_le64(busaddr); + wrb = &pnob->tx_q[pnob->tx_q_hd]; + if (first == NULL) { + wrb_fill_extra(wrb, skb, pnob); + first = wrb; + } else { + wrb_copy_extra(wrb, first); + } + wrb_fill(wrb, busaddr, len); + be_adv_txq_hd(pnob); + *copied += len; + } + + for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { + struct skb_frag_struct *frag = + &skb_shinfo(skb)->frags[i]; + busaddr = pci_map_page(pdev, frag->page, + frag->page_offset, frag->size, + PCI_DMA_TODEVICE); + busaddr = cpu_to_le64(busaddr); + wrb = &pnob->tx_q[pnob->tx_q_hd]; + if (first == NULL) { + wrb_fill_extra(wrb, skb, pnob); + first = wrb; + } else { + wrb_copy_extra(wrb, first); + } + wrb_fill(wrb, busaddr, frag->size); + be_adv_txq_hd(pnob); + *copied += frag->size; + } + skb = skb_shinfo(skb)->frag_list; + } + + if (dummy) { + wrb = &pnob->tx_q[pnob->tx_q_hd]; + BUG_ON(first == NULL); + wrb_copy_extra(wrb, first); + wrb_fill(wrb, 0, 0); + be_adv_txq_hd(pnob); + } + AMAP_SET_BITS_PTR(ETH_WRB, complete, wrb, 1); + AMAP_SET_BITS_PTR(ETH_WRB, last, wrb, 1); + return wrb_cnt; +} + +/* For each skb transmitted, tx_ctxt stores the num of wrbs in the + * start index and skb pointer in the end index + */ +static inline void be_tx_wrb_info_remember(struct be_net_object *pnob, + struct sk_buff *skb, int wrb_cnt, + u32 start) +{ + *(u32 *) (&pnob->tx_ctxt[start]) = wrb_cnt; + index_adv(&start, wrb_cnt - 1, pnob->tx_q_len); + pnob->tx_ctxt[start] = skb; +} + +static int benet_xmit(struct sk_buff *skb, struct net_device *netdev) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + u32 wrb_cnt, copied = 0; + u32 start = pnob->tx_q_hd; + + adapter->be_stat.bes_tx_reqs++; + + wrb_cnt = wrb_cnt_in_skb(skb); + spin_lock_bh(&adapter->txq_lock); + if ((pnob->tx_q_len - 2 - atomic_read(&pnob->tx_q_used)) <= wrb_cnt) { + netif_stop_queue(pnob->netdev); + spin_unlock_bh(&adapter->txq_lock); + adapter->be_stat.bes_tx_fails++; + return NETDEV_TX_BUSY; + } + spin_unlock_bh(&adapter->txq_lock); + + wrb_cnt = copy_skb_to_txq(pnob, skb, wrb_cnt, &copied); + be_tx_wrb_info_remember(pnob, skb, wrb_cnt, start); + + be_start_tx(pnob, wrb_cnt); + + adapter->eth_tx_bytes += copied; + adapter->be_stat.bes_tx_wrbs += wrb_cnt; + update_tx_rate(adapter); + netdev->trans_start = jiffies; + + return NETDEV_TX_OK; +} + +/* + * This is the driver entry point to change the mtu of the device + * Returns 0 for success and errno for failure. + */ +static int benet_change_mtu(struct net_device *netdev, int new_mtu) +{ + /* + * BE supports jumbo frame size upto 9000 bytes including the link layer + * header. Considering the different variants of frame formats possible + * like VLAN, SNAP/LLC, the maximum possible value for MTU is 8974 bytes + */ + + if (new_mtu < (ETH_ZLEN + ETH_FCS_LEN) || (new_mtu > BE_MAX_MTU)) { + dev_info(&netdev->dev, "Invalid MTU requested. " + "Must be between %d and %d bytes\n", + (ETH_ZLEN + ETH_FCS_LEN), BE_MAX_MTU); + return -EINVAL; + } + dev_info(&netdev->dev, "MTU changed from %d to %d\n", + netdev->mtu, new_mtu); + netdev->mtu = new_mtu; + return 0; +} + +/* + * This is the driver entry point to register a vlan with the device + */ +static void benet_vlan_register(struct net_device *netdev, + struct vlan_group *grp) +{ + struct be_net_object *pnob = netdev_priv(netdev); + + be_disable_eq_intr(pnob); + pnob->vlan_grp = grp; + pnob->num_vlans = 0; + be_enable_eq_intr(pnob); +} + +/* + * This is the driver entry point to add a vlan vlan_id + * with the device netdev + */ +static void benet_vlan_add_vid(struct net_device *netdev, u16 vlan_id) +{ + struct be_net_object *pnob = netdev_priv(netdev); + + if (pnob->num_vlans == (BE_NUM_VLAN_SUPPORTED - 1)) { + /* no way to return an error */ + dev_info(&netdev->dev, + "BladeEngine: Cannot configure more than %d Vlans\n", + BE_NUM_VLAN_SUPPORTED); + return; + } + /* The new vlan tag will be in the slot indicated by num_vlans. */ + pnob->vlan_tag[pnob->num_vlans++] = vlan_id; + be_rxf_vlan_config(&pnob->fn_obj, false, pnob->num_vlans, + pnob->vlan_tag, NULL, NULL, NULL); +} + +/* + * This is the driver entry point to remove a vlan vlan_id + * with the device netdev + */ +static void benet_vlan_rem_vid(struct net_device *netdev, u16 vlan_id) +{ + struct be_net_object *pnob = netdev_priv(netdev); + + u32 i, value; + + /* + * In Blade Engine, we support 32 vlan tag filters across both ports. + * To program a vlan tag, the RXF_RTPR_CSR register is used. + * Each 32-bit value of RXF_RTDR_CSR can address 2 vlan tag entries. + * The Vlan table is of depth 16. thus we support 32 tags. + */ + + value = vlan_id | VLAN_VALID_BIT; + for (i = 0; i < BE_NUM_VLAN_SUPPORTED; i++) { + if (pnob->vlan_tag[i] == vlan_id) + break; + } + + if (i == BE_NUM_VLAN_SUPPORTED) + return; + /* Now compact the vlan tag array by removing hole created. */ + while ((i + 1) < BE_NUM_VLAN_SUPPORTED) { + pnob->vlan_tag[i] = pnob->vlan_tag[i + 1]; + i++; + } + if ((i + 1) == BE_NUM_VLAN_SUPPORTED) + pnob->vlan_tag[i] = (u16) 0x0; + pnob->num_vlans--; + be_rxf_vlan_config(&pnob->fn_obj, false, pnob->num_vlans, + pnob->vlan_tag, NULL, NULL, NULL); +} + +/* + * This function is called to program multicast + * address in the multicast filter of the ASIC. + */ +static void be_set_multicast_filter(struct net_device *netdev) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct dev_mc_list *mc_ptr; + u8 mac_addr[32][ETH_ALEN]; + int i; + + if (netdev->flags & IFF_ALLMULTI) { + /* set BE in Multicast promiscuous */ + be_rxf_multicast_config(&pnob->fn_obj, true, 0, NULL, NULL, + NULL, NULL); + return; + } + + for (mc_ptr = netdev->mc_list, i = 0; mc_ptr; + mc_ptr = mc_ptr->next, i++) { + memcpy(&mac_addr[i][0], mc_ptr->dmi_addr, ETH_ALEN); + } + + /* reset the promiscuous mode also. */ + be_rxf_multicast_config(&pnob->fn_obj, false, i, + &mac_addr[0][0], NULL, NULL, NULL); +} + +/* + * This is the driver entry point to set multicast list + * with the device netdev. This function will be used to + * set promiscuous mode or multicast promiscuous mode + * or multicast mode.... + */ +static void benet_set_multicast_list(struct net_device *netdev) +{ + struct be_net_object *pnob = netdev_priv(netdev); + + if (netdev->flags & IFF_PROMISC) { + be_rxf_promiscuous(&pnob->fn_obj, 1, 1, NULL, NULL, NULL); + } else { + be_rxf_promiscuous(&pnob->fn_obj, 0, 0, NULL, NULL, NULL); + be_set_multicast_filter(netdev); + } +} + +int benet_init(struct net_device *netdev) +{ + struct be_net_object *pnob = netdev_priv(netdev); + struct be_adapter *adapter = pnob->adapter; + + ether_setup(netdev); + + netdev->open = &benet_open; + netdev->stop = &benet_close; + netdev->hard_start_xmit = &benet_xmit; + + netdev->get_stats = &benet_get_stats; + + netdev->set_multicast_list = &benet_set_multicast_list; + + netdev->change_mtu = &benet_change_mtu; + netdev->set_mac_address = &benet_set_mac_addr; + + netdev->vlan_rx_register = benet_vlan_register; + netdev->vlan_rx_add_vid = benet_vlan_add_vid; + netdev->vlan_rx_kill_vid = benet_vlan_rem_vid; + + netdev->features = + NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_HW_VLAN_RX | NETIF_F_TSO | + NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | NETIF_F_IP_CSUM; + + netdev->flags |= IFF_MULTICAST; + + /* If device is DAC Capable, set the HIGHDMA flag for netdevice. */ + if (adapter->dma_64bit_cap) + netdev->features |= NETIF_F_HIGHDMA; + + SET_ETHTOOL_OPS(netdev, &be_ethtool_ops); + return 0; +} diff --git a/trunk/drivers/staging/benet/benet.h b/trunk/drivers/staging/benet/benet.h new file mode 100644 index 000000000000..09a1f0817722 --- /dev/null +++ b/trunk/drivers/staging/benet/benet.h @@ -0,0 +1,429 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#ifndef _BENET_H_ +#define _BENET_H_ + +#include +#include +#include +#include "hwlib.h" + +#define _SA_MODULE_NAME "net-driver" + +#define VLAN_VALID_BIT 0x8000 +#define BE_NUM_VLAN_SUPPORTED 32 +#define BE_PORT_LINK_DOWN 0000 +#define BE_PORT_LINK_UP 0001 +#define BE_MAX_TX_FRAG_COUNT (30) + +/* Flag bits for send operation */ +#define IPCS (1 << 0) /* Enable IP checksum offload */ +#define UDPCS (1 << 1) /* Enable UDP checksum offload */ +#define TCPCS (1 << 2) /* Enable TCP checksum offload */ +#define LSO (1 << 3) /* Enable Large Segment offload */ +#define ETHVLAN (1 << 4) /* Enable VLAN insert */ +#define ETHEVENT (1 << 5) /* Generate event on completion */ +#define ETHCOMPLETE (1 << 6) /* Generate completion when done */ +#define IPSEC (1 << 7) /* Enable IPSEC */ +#define FORWARD (1 << 8) /* Send the packet in forwarding path */ +#define FIN (1 << 9) /* Issue FIN segment */ + +#define BE_MAX_MTU 8974 + +#define BE_MAX_LRO_DESCRIPTORS 8 +#define BE_LRO_MAX_PKTS 64 +#define BE_MAX_FRAGS_PER_FRAME 6 + +extern const char be_drvr_ver[]; +extern char be_fw_ver[]; +extern char be_driver_name[]; + +extern struct ethtool_ops be_ethtool_ops; + +#define BE_DEV_STATE_NONE 0 +#define BE_DEV_STATE_INIT 1 +#define BE_DEV_STATE_OPEN 2 +#define BE_DEV_STATE_SUSPEND 3 + +/* This structure is used to describe physical fragments to use + * for DMAing data from NIC. + */ +struct be_recv_buffer { + struct list_head rxb_list; /* for maintaining a linked list */ + void *rxb_va; /* buffer virtual address */ + u32 rxb_pa_lo; /* low part of physical address */ + u32 rxb_pa_hi; /* high part of physical address */ + u32 rxb_len; /* length of recv buffer */ + void *rxb_ctxt; /* context for OSM driver to use */ +}; + +/* + * fragment list to describe scattered data. + */ +struct be_tx_frag_list { + u32 txb_len; /* Size of this fragment */ + u32 txb_pa_lo; /* Lower 32 bits of 64 bit physical addr */ + u32 txb_pa_hi; /* Higher 32 bits of 64 bit physical addr */ +}; + +struct be_rx_page_info { + struct page *page; + dma_addr_t bus; + u16 page_offset; +}; + +/* + * This structure is the main tracking structure for a NIC interface. + */ +struct be_net_object { + /* MCC Ring - used to send fwcmds to embedded ARM processor */ + struct MCC_WRB_AMAP *mcc_q; /* VA of the start of the ring */ + u32 mcc_q_len; /* # of WRB entries in this ring */ + u32 mcc_q_size; + u32 mcc_q_hd; /* MCC ring head */ + u8 mcc_q_created; /* flag to help cleanup */ + struct be_mcc_object mcc_q_obj; /* BECLIB's MCC ring Object */ + dma_addr_t mcc_q_bus; /* DMA'ble bus address */ + + /* MCC Completion Ring - FW responses to fwcmds sent from MCC ring */ + struct MCC_CQ_ENTRY_AMAP *mcc_cq; /* VA of the start of the ring */ + u32 mcc_cq_len; /* # of compl. entries in this ring */ + u32 mcc_cq_size; + u32 mcc_cq_tl; /* compl. ring tail */ + u8 mcc_cq_created; /* flag to help cleanup */ + struct be_cq_object mcc_cq_obj; /* BECLIB's MCC compl. ring object */ + u32 mcc_cq_id; /* MCC ring ID */ + dma_addr_t mcc_cq_bus; /* DMA'ble bus address */ + + struct ring_desc mb_rd; /* RD for MCC_MAIL_BOX */ + void *mb_ptr; /* mailbox ptr to be freed */ + dma_addr_t mb_bus; /* DMA'ble bus address */ + u32 mb_size; + + /* BEClib uses an array of context objects to track outstanding + * requests to the MCC. We need allocate the same number of + * conext entries as the number of entries in the MCC WRB ring + */ + u32 mcc_wrb_ctxt_size; + void *mcc_wrb_ctxt; /* pointer to the context area */ + u32 mcc_wrb_ctxtLen; /* Number of entries in the context */ + /* + * NIC send request ring - used for xmitting raw ether frames. + */ + struct ETH_WRB_AMAP *tx_q; /* VA of the start of the ring */ + u32 tx_q_len; /* # if entries in the send ring */ + u32 tx_q_size; + u32 tx_q_hd; /* Head index. Next req. goes here */ + u32 tx_q_tl; /* Tail indx. oldest outstanding req. */ + u8 tx_q_created; /* flag to help cleanup */ + struct be_ethsq_object tx_q_obj;/* BECLIB's send Q handle */ + dma_addr_t tx_q_bus; /* DMA'ble bus address */ + u32 tx_q_id; /* send queue ring ID */ + u32 tx_q_port; /* 0 no binding, 1 port A, 2 port B */ + atomic_t tx_q_used; /* # of WRBs used */ + /* ptr to an array in which we store context info for each send req. */ + void **tx_ctxt; + /* + * NIC Send compl. ring - completion status for all NIC frames xmitted. + */ + struct ETH_TX_COMPL_AMAP *tx_cq;/* VA of start of the ring */ + u32 txcq_len; /* # of entries in the ring */ + u32 tx_cq_size; + /* + * index into compl ring where the host expects next completion entry + */ + u32 tx_cq_tl; + u32 tx_cq_id; /* completion queue id */ + u8 tx_cq_created; /* flag to help cleanup */ + struct be_cq_object tx_cq_obj; + dma_addr_t tx_cq_bus; /* DMA'ble bus address */ + /* + * Event Queue - all completion entries post events here. + */ + struct EQ_ENTRY_AMAP *event_q; /* VA of start of event queue */ + u32 event_q_len; /* # of entries */ + u32 event_q_size; + u32 event_q_tl; /* Tail of the event queue */ + u32 event_q_id; /* Event queue ID */ + u8 event_q_created; /* flag to help cleanup */ + struct be_eq_object event_q_obj; /* Queue handle */ + dma_addr_t event_q_bus; /* DMA'ble bus address */ + /* + * NIC receive queue - Data buffers to be used for receiving unicast, + * broadcast and multi-cast frames are posted here. + */ + struct ETH_RX_D_AMAP *rx_q; /* VA of start of the queue */ + u32 rx_q_len; /* # of entries */ + u32 rx_q_size; + u32 rx_q_hd; /* Head of the queue */ + atomic_t rx_q_posted; /* number of posted buffers */ + u32 rx_q_id; /* queue ID */ + u8 rx_q_created; /* flag to help cleanup */ + struct be_ethrq_object rx_q_obj; /* NIC RX queue handle */ + dma_addr_t rx_q_bus; /* DMA'ble bus address */ + /* + * Pointer to an array of opaque context object for use by OSM driver + */ + void **rx_ctxt; + /* + * NIC unicast RX completion queue - all unicast ether frame completion + * statuses from BE come here. + */ + struct ETH_RX_COMPL_AMAP *rx_cq; /* VA of start of the queue */ + u32 rx_cq_len; /* # of entries */ + u32 rx_cq_size; + u32 rx_cq_tl; /* Tail of the queue */ + u32 rx_cq_id; /* queue ID */ + u8 rx_cq_created; /* flag to help cleanup */ + struct be_cq_object rx_cq_obj; /* queue handle */ + dma_addr_t rx_cq_bus; /* DMA'ble bus address */ + struct be_function_object fn_obj; /* function object */ + bool fn_obj_created; + u32 rx_buf_size; /* Size of the RX buffers */ + + struct net_device *netdev; + struct be_recv_buffer eth_rx_bufs[256]; /* to pass Rx buffer + addresses */ + struct be_adapter *adapter; /* Pointer to OSM adapter */ + u32 devno; /* OSM, network dev no. */ + u32 use_port; /* Current active port */ + struct be_rx_page_info *rx_page_info; /* Array of Rx buf pages */ + u32 rx_pg_info_hd; /* Head of queue */ + int rxbuf_post_fail; /* RxBuff posting fail count */ + bool rx_pg_shared; /* Is an allocsted page shared as two frags ? */ + struct vlan_group *vlan_grp; + u32 num_vlans; /* Number of vlans in BE's filter */ + u16 vlan_tag[BE_NUM_VLAN_SUPPORTED]; /* vlans currently configured */ + struct napi_struct napi; + struct net_lro_mgr lro_mgr; + struct net_lro_desc lro_desc[BE_MAX_LRO_DESCRIPTORS]; +}; + +#define NET_FH(np) (&(np)->fn_obj) + +/* + * BE driver statistics. + */ +struct be_drvr_stat { + u32 bes_tx_reqs; /* number of TX requests initiated */ + u32 bes_tx_fails; /* number of TX requests that failed */ + u32 bes_fwd_reqs; /* number of send reqs through forwarding i/f */ + u32 bes_tx_wrbs; /* number of tx WRBs used */ + + u32 bes_ints; /* number of interrupts */ + u32 bes_polls; /* number of times NAPI called poll function */ + u32 bes_events; /* total evet entries processed */ + u32 bes_tx_events; /* number of tx completion events */ + u32 bes_rx_events; /* number of ucast rx completion events */ + u32 bes_tx_compl; /* number of tx completion entries processed */ + u32 bes_rx_compl; /* number of rx completion entries + processed */ + u32 bes_ethrx_post_fail; /* number of ethrx buffer alloc + failures */ + /* + * number of non ether type II frames dropped where + * frame len > length field of Mac Hdr + */ + u32 bes_802_3_dropped_frames; + /* + * number of non ether type II frames malformed where + * in frame len < length field of Mac Hdr + */ + u32 bes_802_3_malformed_frames; + u32 bes_ips; /* interrupts / sec */ + u32 bes_prev_ints; /* bes_ints at last IPS calculation */ + u16 bes_eth_tx_rate; /* ETH TX rate - Mb/sec */ + u16 bes_eth_rx_rate; /* ETH RX rate - Mb/sec */ + u32 bes_rx_coal; /* Num pkts coalasced */ + u32 bes_rx_flush; /* Num times coalasced */ + u32 bes_link_change_physical; /*Num of times physical link changed */ + u32 bes_link_change_virtual; /*Num of times virtual link changed */ + u32 bes_rx_misc_pkts; /* Misc pkts received */ +}; + +/* Maximum interrupt delay (in microseconds) allowed */ +#define MAX_EQD 120 + +/* + * timer to prevent system shutdown hang for ever if h/w stops responding + */ +struct be_timer_ctxt { + atomic_t get_stat_flag; + struct timer_list get_stats_timer; + unsigned long get_stat_sem_addr; +} ; + +/* This structure is the main BladeEngine driver context. */ +struct be_adapter { + struct net_device *netdevp; + struct be_drvr_stat be_stat; + struct net_device_stats benet_stats; + + /* PCI BAR mapped addresses */ + u8 __iomem *csr_va; /* CSR */ + u8 __iomem *db_va; /* Door Bell */ + u8 __iomem *pci_va; /* PCI Config */ + + struct tasklet_struct sts_handler; + struct timer_list cq_timer; + spinlock_t int_lock; /* to protect the isr field in adapter */ + + struct FWCMD_ETH_GET_STATISTICS *eth_statsp; + /* + * This will enable the use of ethtool to enable or disable + * Checksum on Rx pkts to be obeyed or disobeyed. + * If this is true = 1, then whatever is the checksum on the + * Received pkt as per BE, it will be given to the stack. + * Else the stack will re calculate it. + */ + bool rx_csum; + /* + * This will enable the use of ethtool to enable or disable + * Coalese on Rx pkts to be obeyed or disobeyed. + * If this is grater than 0 and less than 16 then coalascing + * is enabled else it is disabled + */ + u32 max_rx_coal; + struct pci_dev *pdev; /* Pointer to OS's PCI dvice */ + + spinlock_t txq_lock; /* to stop/wake queue based on tx_q_used */ + + u32 isr; /* copy of Intr status reg. */ + + u32 port0_link_sts; /* Port 0 link status */ + u32 port1_link_sts; /* port 1 list status */ + struct BE_LINK_STATUS *be_link_sts; + + /* pointer to the first netobject of this adapter */ + struct be_net_object *net_obj; + + /* Flags to indicate what to clean up */ + bool tasklet_started; + bool isr_registered; + /* + * adaptive interrupt coalescing (AIC) related + */ + bool enable_aic; /* 1 if AIC is enabled */ + u16 min_eqd; /* minimum EQ delay in usec */ + u16 max_eqd; /* minimum EQ delay in usec */ + u16 cur_eqd; /* current EQ delay in usec */ + /* + * book keeping for interrupt / sec and TX/RX rate calculation + */ + ulong ips_jiffies; /* jiffies at last IPS calc */ + u32 eth_tx_bytes; + ulong eth_tx_jiffies; + u32 eth_rx_bytes; + ulong eth_rx_jiffies; + + struct semaphore get_eth_stat_sem; + + /* timer ctxt to prevent shutdown hanging due to un-responsive BE */ + struct be_timer_ctxt timer_ctxt; + +#define BE_MAX_MSIX_VECTORS 32 +#define BE_MAX_REQ_MSIX_VECTORS 1 /* only one EQ in Linux driver */ + struct msix_entry msix_entries[BE_MAX_MSIX_VECTORS]; + bool msix_enabled; + bool dma_64bit_cap; /* the Device DAC capable or not */ + u8 dev_state; /* The current state of the device */ + u8 dev_pm_state; /* The State of device before going to suspend */ +}; + +/* + * Every second we look at the ints/sec and adjust eq_delay + * between adapter->min_eqd and adapter->max_eqd to keep the ints/sec between + * IPS_HI_WM and IPS_LO_WM. + */ +#define IPS_HI_WM 18000 +#define IPS_LO_WM 8000 + + +static inline void index_adv(u32 *index, u32 val, u32 limit) +{ + BUG_ON(limit & (limit-1)); + *index = (*index + val) & (limit - 1); +} + +static inline void index_inc(u32 *index, u32 limit) +{ + BUG_ON(limit & (limit-1)); + *index = (*index + 1) & (limit - 1); +} + +static inline void be_adv_eq_tl(struct be_net_object *pnob) +{ + index_inc(&pnob->event_q_tl, pnob->event_q_len); +} + +static inline void be_adv_txq_hd(struct be_net_object *pnob) +{ + index_inc(&pnob->tx_q_hd, pnob->tx_q_len); +} + +static inline void be_adv_txq_tl(struct be_net_object *pnob) +{ + index_inc(&pnob->tx_q_tl, pnob->tx_q_len); +} + +static inline void be_adv_txcq_tl(struct be_net_object *pnob) +{ + index_inc(&pnob->tx_cq_tl, pnob->txcq_len); +} + +static inline void be_adv_rxq_hd(struct be_net_object *pnob) +{ + index_inc(&pnob->rx_q_hd, pnob->rx_q_len); +} + +static inline void be_adv_rxcq_tl(struct be_net_object *pnob) +{ + index_inc(&pnob->rx_cq_tl, pnob->rx_cq_len); +} + +static inline u32 tx_compl_lastwrb_idx_get(struct be_net_object *pnob) +{ + return (pnob->tx_q_tl + *(u32 *)&pnob->tx_ctxt[pnob->tx_q_tl] - 1) + & (pnob->tx_q_len - 1); +} + +int benet_init(struct net_device *); +int be_ethtool_ioctl(struct net_device *, struct ifreq *); +struct net_device_stats *benet_get_stats(struct net_device *); +void be_process_intr(unsigned long context); +irqreturn_t be_int(int irq, void *dev); +void be_post_eth_rx_buffs(struct be_net_object *); +void be_get_stat_cb(void *, int, struct MCC_WRB_AMAP *); +void be_get_stats_timer_handler(unsigned long); +void be_wait_nic_tx_cmplx_cmpl(struct be_net_object *); +void be_print_link_info(struct BE_LINK_STATUS *); +void be_update_link_status(struct be_adapter *); +void be_init_procfs(struct be_adapter *); +void be_cleanup_procfs(struct be_adapter *); +int be_poll(struct napi_struct *, int); +struct ETH_RX_COMPL_AMAP *be_get_rx_cmpl(struct be_net_object *); +void be_notify_cmpl(struct be_net_object *, int, int, int); +void be_enable_intr(struct be_net_object *); +void be_enable_eq_intr(struct be_net_object *); +void be_disable_intr(struct be_net_object *); +void be_disable_eq_intr(struct be_net_object *); +int be_set_uc_mac_adr(struct be_net_object *, u8, u8, u8, + u8 *, mcc_wrb_cqe_callback, void *); +int be_get_flow_ctl(struct be_function_object *pFnObj, bool *, bool *); +void process_one_tx_compl(struct be_net_object *pnob, u32 end_idx); + +#endif /* _BENET_H_ */ diff --git a/trunk/drivers/staging/benet/bestatus.h b/trunk/drivers/staging/benet/bestatus.h new file mode 100644 index 000000000000..59c7a4b62223 --- /dev/null +++ b/trunk/drivers/staging/benet/bestatus.h @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#ifndef _BESTATUS_H_ +#define _BESTATUS_H_ + +#define BE_SUCCESS (0x00000000L) +/* + * MessageId: BE_PENDING + * The BladeEngine Driver call succeeded, and pended operation. + */ +#define BE_PENDING (0x20070001L) +#define BE_STATUS_PENDING (BE_PENDING) +/* + * MessageId: BE_NOT_OK + * An error occurred. + */ +#define BE_NOT_OK (0xE0070002L) +/* + * MessageId: BE_STATUS_SYSTEM_RESOURCES + * Insufficient host system resources exist to complete the API. + */ +#define BE_STATUS_SYSTEM_RESOURCES (0xE0070003L) +/* + * MessageId: BE_STATUS_CHIP_RESOURCES + * Insufficient chip resources exist to complete the API. + */ +#define BE_STATUS_CHIP_RESOURCES (0xE0070004L) +/* + * MessageId: BE_STATUS_NO_RESOURCE + * Insufficient resources to complete request. + */ +#define BE_STATUS_NO_RESOURCE (0xE0070005L) +/* + * MessageId: BE_STATUS_BUSY + * Resource is currently busy. + */ +#define BE_STATUS_BUSY (0xE0070006L) +/* + * MessageId: BE_STATUS_INVALID_PARAMETER + * Invalid Parameter in request. + */ +#define BE_STATUS_INVALID_PARAMETER (0xE0000007L) +/* + * MessageId: BE_STATUS_NOT_SUPPORTED + * Requested operation is not supported. + */ +#define BE_STATUS_NOT_SUPPORTED (0xE000000DL) + +/* + * *************************************************************************** + * E T H E R N E T S T A T U S + * *************************************************************************** + */ + +/* + * MessageId: BE_ETH_TX_ERROR + * The Ethernet device driver failed to transmit a packet. + */ +#define BE_ETH_TX_ERROR (0xE0070101L) + +/* + * *************************************************************************** + * S H A R E D S T A T U S + * *************************************************************************** + */ + +/* + * MessageId: BE_STATUS_VBD_INVALID_VERSION + * The device driver is not compatible with this version of the VBD. + */ +#define BE_STATUS_INVALID_VERSION (0xE0070402L) +/* + * MessageId: BE_STATUS_DOMAIN_DENIED + * The operation failed to complete due to insufficient access + * rights for the requesting domain. + */ +#define BE_STATUS_DOMAIN_DENIED (0xE0070403L) +/* + * MessageId: BE_STATUS_TCP_NOT_STARTED + * The embedded TCP/IP stack has not been started. + */ +#define BE_STATUS_TCP_NOT_STARTED (0xE0070409L) +/* + * MessageId: BE_STATUS_NO_MCC_WRB + * No free MCC WRB are available for posting the request. + */ +#define BE_STATUS_NO_MCC_WRB (0xE0070414L) + +#endif /* _BESTATUS_ */ diff --git a/trunk/drivers/staging/benet/cev.h b/trunk/drivers/staging/benet/cev.h new file mode 100644 index 000000000000..30996920a544 --- /dev/null +++ b/trunk/drivers/staging/benet/cev.h @@ -0,0 +1,243 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __cev_amap_h__ +#define __cev_amap_h__ +#include "ep.h" + +/* + * Host Interrupt Status Register 0. The first of four application + * interrupt status registers. This register contains the interrupts + * for Event Queues EQ0 through EQ31. + */ +struct BE_CEV_ISR0_CSR_AMAP { + u8 interrupt0; /* DWORD 0 */ + u8 interrupt1; /* DWORD 0 */ + u8 interrupt2; /* DWORD 0 */ + u8 interrupt3; /* DWORD 0 */ + u8 interrupt4; /* DWORD 0 */ + u8 interrupt5; /* DWORD 0 */ + u8 interrupt6; /* DWORD 0 */ + u8 interrupt7; /* DWORD 0 */ + u8 interrupt8; /* DWORD 0 */ + u8 interrupt9; /* DWORD 0 */ + u8 interrupt10; /* DWORD 0 */ + u8 interrupt11; /* DWORD 0 */ + u8 interrupt12; /* DWORD 0 */ + u8 interrupt13; /* DWORD 0 */ + u8 interrupt14; /* DWORD 0 */ + u8 interrupt15; /* DWORD 0 */ + u8 interrupt16; /* DWORD 0 */ + u8 interrupt17; /* DWORD 0 */ + u8 interrupt18; /* DWORD 0 */ + u8 interrupt19; /* DWORD 0 */ + u8 interrupt20; /* DWORD 0 */ + u8 interrupt21; /* DWORD 0 */ + u8 interrupt22; /* DWORD 0 */ + u8 interrupt23; /* DWORD 0 */ + u8 interrupt24; /* DWORD 0 */ + u8 interrupt25; /* DWORD 0 */ + u8 interrupt26; /* DWORD 0 */ + u8 interrupt27; /* DWORD 0 */ + u8 interrupt28; /* DWORD 0 */ + u8 interrupt29; /* DWORD 0 */ + u8 interrupt30; /* DWORD 0 */ + u8 interrupt31; /* DWORD 0 */ +} __packed; +struct CEV_ISR0_CSR_AMAP { + u32 dw[1]; +}; + +/* + * Host Interrupt Status Register 1. The second of four application + * interrupt status registers. This register contains the interrupts + * for Event Queues EQ32 through EQ63. + */ +struct BE_CEV_ISR1_CSR_AMAP { + u8 interrupt32; /* DWORD 0 */ + u8 interrupt33; /* DWORD 0 */ + u8 interrupt34; /* DWORD 0 */ + u8 interrupt35; /* DWORD 0 */ + u8 interrupt36; /* DWORD 0 */ + u8 interrupt37; /* DWORD 0 */ + u8 interrupt38; /* DWORD 0 */ + u8 interrupt39; /* DWORD 0 */ + u8 interrupt40; /* DWORD 0 */ + u8 interrupt41; /* DWORD 0 */ + u8 interrupt42; /* DWORD 0 */ + u8 interrupt43; /* DWORD 0 */ + u8 interrupt44; /* DWORD 0 */ + u8 interrupt45; /* DWORD 0 */ + u8 interrupt46; /* DWORD 0 */ + u8 interrupt47; /* DWORD 0 */ + u8 interrupt48; /* DWORD 0 */ + u8 interrupt49; /* DWORD 0 */ + u8 interrupt50; /* DWORD 0 */ + u8 interrupt51; /* DWORD 0 */ + u8 interrupt52; /* DWORD 0 */ + u8 interrupt53; /* DWORD 0 */ + u8 interrupt54; /* DWORD 0 */ + u8 interrupt55; /* DWORD 0 */ + u8 interrupt56; /* DWORD 0 */ + u8 interrupt57; /* DWORD 0 */ + u8 interrupt58; /* DWORD 0 */ + u8 interrupt59; /* DWORD 0 */ + u8 interrupt60; /* DWORD 0 */ + u8 interrupt61; /* DWORD 0 */ + u8 interrupt62; /* DWORD 0 */ + u8 interrupt63; /* DWORD 0 */ +} __packed; +struct CEV_ISR1_CSR_AMAP { + u32 dw[1]; +}; +/* + * Host Interrupt Status Register 2. The third of four application + * interrupt status registers. This register contains the interrupts + * for Event Queues EQ64 through EQ95. + */ +struct BE_CEV_ISR2_CSR_AMAP { + u8 interrupt64; /* DWORD 0 */ + u8 interrupt65; /* DWORD 0 */ + u8 interrupt66; /* DWORD 0 */ + u8 interrupt67; /* DWORD 0 */ + u8 interrupt68; /* DWORD 0 */ + u8 interrupt69; /* DWORD 0 */ + u8 interrupt70; /* DWORD 0 */ + u8 interrupt71; /* DWORD 0 */ + u8 interrupt72; /* DWORD 0 */ + u8 interrupt73; /* DWORD 0 */ + u8 interrupt74; /* DWORD 0 */ + u8 interrupt75; /* DWORD 0 */ + u8 interrupt76; /* DWORD 0 */ + u8 interrupt77; /* DWORD 0 */ + u8 interrupt78; /* DWORD 0 */ + u8 interrupt79; /* DWORD 0 */ + u8 interrupt80; /* DWORD 0 */ + u8 interrupt81; /* DWORD 0 */ + u8 interrupt82; /* DWORD 0 */ + u8 interrupt83; /* DWORD 0 */ + u8 interrupt84; /* DWORD 0 */ + u8 interrupt85; /* DWORD 0 */ + u8 interrupt86; /* DWORD 0 */ + u8 interrupt87; /* DWORD 0 */ + u8 interrupt88; /* DWORD 0 */ + u8 interrupt89; /* DWORD 0 */ + u8 interrupt90; /* DWORD 0 */ + u8 interrupt91; /* DWORD 0 */ + u8 interrupt92; /* DWORD 0 */ + u8 interrupt93; /* DWORD 0 */ + u8 interrupt94; /* DWORD 0 */ + u8 interrupt95; /* DWORD 0 */ +} __packed; +struct CEV_ISR2_CSR_AMAP { + u32 dw[1]; +}; + +/* + * Host Interrupt Status Register 3. The fourth of four application + * interrupt status registers. This register contains the interrupts + * for Event Queues EQ96 through EQ127. + */ +struct BE_CEV_ISR3_CSR_AMAP { + u8 interrupt96; /* DWORD 0 */ + u8 interrupt97; /* DWORD 0 */ + u8 interrupt98; /* DWORD 0 */ + u8 interrupt99; /* DWORD 0 */ + u8 interrupt100; /* DWORD 0 */ + u8 interrupt101; /* DWORD 0 */ + u8 interrupt102; /* DWORD 0 */ + u8 interrupt103; /* DWORD 0 */ + u8 interrupt104; /* DWORD 0 */ + u8 interrupt105; /* DWORD 0 */ + u8 interrupt106; /* DWORD 0 */ + u8 interrupt107; /* DWORD 0 */ + u8 interrupt108; /* DWORD 0 */ + u8 interrupt109; /* DWORD 0 */ + u8 interrupt110; /* DWORD 0 */ + u8 interrupt111; /* DWORD 0 */ + u8 interrupt112; /* DWORD 0 */ + u8 interrupt113; /* DWORD 0 */ + u8 interrupt114; /* DWORD 0 */ + u8 interrupt115; /* DWORD 0 */ + u8 interrupt116; /* DWORD 0 */ + u8 interrupt117; /* DWORD 0 */ + u8 interrupt118; /* DWORD 0 */ + u8 interrupt119; /* DWORD 0 */ + u8 interrupt120; /* DWORD 0 */ + u8 interrupt121; /* DWORD 0 */ + u8 interrupt122; /* DWORD 0 */ + u8 interrupt123; /* DWORD 0 */ + u8 interrupt124; /* DWORD 0 */ + u8 interrupt125; /* DWORD 0 */ + u8 interrupt126; /* DWORD 0 */ + u8 interrupt127; /* DWORD 0 */ +} __packed; +struct CEV_ISR3_CSR_AMAP { + u32 dw[1]; +}; + +/* Completions and Events block Registers. */ +struct BE_CEV_CSRMAP_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ + u8 rsvd1[32]; /* DWORD 1 */ + u8 rsvd2[32]; /* DWORD 2 */ + u8 rsvd3[32]; /* DWORD 3 */ + struct BE_CEV_ISR0_CSR_AMAP isr0; + struct BE_CEV_ISR1_CSR_AMAP isr1; + struct BE_CEV_ISR2_CSR_AMAP isr2; + struct BE_CEV_ISR3_CSR_AMAP isr3; + u8 rsvd4[32]; /* DWORD 8 */ + u8 rsvd5[32]; /* DWORD 9 */ + u8 rsvd6[32]; /* DWORD 10 */ + u8 rsvd7[32]; /* DWORD 11 */ + u8 rsvd8[32]; /* DWORD 12 */ + u8 rsvd9[32]; /* DWORD 13 */ + u8 rsvd10[32]; /* DWORD 14 */ + u8 rsvd11[32]; /* DWORD 15 */ + u8 rsvd12[32]; /* DWORD 16 */ + u8 rsvd13[32]; /* DWORD 17 */ + u8 rsvd14[32]; /* DWORD 18 */ + u8 rsvd15[32]; /* DWORD 19 */ + u8 rsvd16[32]; /* DWORD 20 */ + u8 rsvd17[32]; /* DWORD 21 */ + u8 rsvd18[32]; /* DWORD 22 */ + u8 rsvd19[32]; /* DWORD 23 */ + u8 rsvd20[32]; /* DWORD 24 */ + u8 rsvd21[32]; /* DWORD 25 */ + u8 rsvd22[32]; /* DWORD 26 */ + u8 rsvd23[32]; /* DWORD 27 */ + u8 rsvd24[32]; /* DWORD 28 */ + u8 rsvd25[32]; /* DWORD 29 */ + u8 rsvd26[32]; /* DWORD 30 */ + u8 rsvd27[32]; /* DWORD 31 */ + u8 rsvd28[32]; /* DWORD 32 */ + u8 rsvd29[32]; /* DWORD 33 */ + u8 rsvd30[192]; /* DWORD 34 */ + u8 rsvd31[192]; /* DWORD 40 */ + u8 rsvd32[160]; /* DWORD 46 */ + u8 rsvd33[160]; /* DWORD 51 */ + u8 rsvd34[160]; /* DWORD 56 */ + u8 rsvd35[96]; /* DWORD 61 */ + u8 rsvd36[192][32]; /* DWORD 64 */ +} __packed; +struct CEV_CSRMAP_AMAP { + u32 dw[256]; +}; + +#endif /* __cev_amap_h__ */ diff --git a/trunk/drivers/staging/benet/cq.c b/trunk/drivers/staging/benet/cq.c new file mode 100644 index 000000000000..650458645433 --- /dev/null +++ b/trunk/drivers/staging/benet/cq.c @@ -0,0 +1,211 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#include "hwlib.h" +#include "bestatus.h" + +/* + * Completion Queue Objects + */ +/* + *============================================================================ + * P U B L I C R O U T I N E S + *============================================================================ + */ + +/* + This routine creates a completion queue based on the client completion + queue configuration information. + + + FunctionObject - Handle to a function object + CqBaseVa - Base VA for a the CQ ring + NumEntries - CEV_CQ_CNT_* values + solEventEnable - 0 = All CQEs can generate Events if CQ is eventable + 1 = only CQEs with solicited bit set are eventable + eventable - Eventable CQ, generates interrupts. + nodelay - 1 = Force interrupt, relevent if CQ eventable. + Interrupt is asserted immediately after EQE + write is confirmed, regardless of EQ Timer + or watermark settings. + wme - Enable watermark based coalescing + wmThresh - High watermark(CQ fullness at which event + or interrupt should be asserted). These are the + CEV_WATERMARK encoded values. + EqObject - EQ Handle to assign to this CQ + ppCqObject - Internal CQ Handle returned. + + Returns BE_SUCCESS if successfull, otherwise a useful error code is + returned. + + IRQL < DISPATCH_LEVEL + +*/ +int be_cq_create(struct be_function_object *pfob, + struct ring_desc *rd, u32 length, bool solicited_eventable, + bool no_delay, u32 wm_thresh, + struct be_eq_object *eq_object, struct be_cq_object *cq_object) +{ + int status = BE_SUCCESS; + u32 num_entries_encoding; + u32 num_entries = length / sizeof(struct MCC_CQ_ENTRY_AMAP); + struct FWCMD_COMMON_CQ_CREATE *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + u32 n; + unsigned long irql; + + ASSERT(rd); + ASSERT(cq_object); + ASSERT(length % sizeof(struct MCC_CQ_ENTRY_AMAP) == 0); + + switch (num_entries) { + case 256: + num_entries_encoding = CEV_CQ_CNT_256; + break; + case 512: + num_entries_encoding = CEV_CQ_CNT_512; + break; + case 1024: + num_entries_encoding = CEV_CQ_CNT_1024; + break; + default: + ASSERT(0); + return BE_STATUS_INVALID_PARAMETER; + } + + /* + * All cq entries all the same size. Use iSCSI version + * as a test for the proper rd length. + */ + memset(cq_object, 0, sizeof(*cq_object)); + + atomic_set(&cq_object->ref_count, 0); + cq_object->parent_function = pfob; + cq_object->eq_object = eq_object; + cq_object->num_entries = num_entries; + /* save for MCC cq processing */ + cq_object->va = rd->va; + + /* map into UT. */ + length = num_entries * sizeof(struct MCC_CQ_ENTRY_AMAP); + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + ASSERT(wrb); + TRACE(DL_ERR, "No free MCC WRBs in create EQ."); + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_CQ_CREATE); + + fwcmd->params.request.num_pages = PAGES_SPANNED(OFFSET_IN_PAGE(rd->va), + length); + + AMAP_SET_BITS_PTR(CQ_CONTEXT, valid, &fwcmd->params.request.context, 1); + n = pfob->pci_function_number; + AMAP_SET_BITS_PTR(CQ_CONTEXT, Func, &fwcmd->params.request.context, n); + + n = (eq_object != NULL); + AMAP_SET_BITS_PTR(CQ_CONTEXT, Eventable, + &fwcmd->params.request.context, n); + AMAP_SET_BITS_PTR(CQ_CONTEXT, Armed, &fwcmd->params.request.context, 1); + + n = eq_object ? eq_object->eq_id : 0; + AMAP_SET_BITS_PTR(CQ_CONTEXT, EQID, &fwcmd->params.request.context, n); + AMAP_SET_BITS_PTR(CQ_CONTEXT, Count, + &fwcmd->params.request.context, num_entries_encoding); + + n = 0; /* Protection Domain is always 0 in Linux driver */ + AMAP_SET_BITS_PTR(CQ_CONTEXT, PD, &fwcmd->params.request.context, n); + AMAP_SET_BITS_PTR(CQ_CONTEXT, NoDelay, + &fwcmd->params.request.context, no_delay); + AMAP_SET_BITS_PTR(CQ_CONTEXT, SolEvent, + &fwcmd->params.request.context, solicited_eventable); + + n = (wm_thresh != 0xFFFFFFFF); + AMAP_SET_BITS_PTR(CQ_CONTEXT, WME, &fwcmd->params.request.context, n); + + n = (n ? wm_thresh : 0); + AMAP_SET_BITS_PTR(CQ_CONTEXT, Watermark, + &fwcmd->params.request.context, n); + /* Create a page list for the FWCMD. */ + be_rd_to_pa_list(rd, fwcmd->params.request.pages, + ARRAY_SIZE(fwcmd->params.request.pages)); + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + if (status != BE_SUCCESS) { + TRACE(DL_ERR, "MCC to create CQ failed."); + goto Error; + } + /* Remember the CQ id. */ + cq_object->cq_id = fwcmd->params.response.cq_id; + + /* insert this cq into eq_object reference */ + if (eq_object) { + atomic_inc(&eq_object->ref_count); + list_add_tail(&cq_object->cqlist_for_eq, + &eq_object->cq_list_head); + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + + Deferences the given object. Once the object's reference count drops to + zero, the object is destroyed and all resources that are held by this object + are released. The on-chip context is also destroyed along with the queue + ID, and any mappings made into the UT. + + cq_object - CQ handle returned from cq_object_create. + + returns the current reference count on the object + + IRQL: IRQL < DISPATCH_LEVEL +*/ +int be_cq_destroy(struct be_cq_object *cq_object) +{ + int status = 0; + + /* Nothing should reference this CQ at this point. */ + ASSERT(atomic_read(&cq_object->ref_count) == 0); + + /* Send fwcmd to destroy the CQ. */ + status = be_function_ring_destroy(cq_object->parent_function, + cq_object->cq_id, FWCMD_RING_TYPE_CQ, + NULL, NULL, NULL, NULL); + ASSERT(status == 0); + + /* Remove reference if this is an eventable CQ. */ + if (cq_object->eq_object) { + atomic_dec(&cq_object->eq_object->ref_count); + list_del(&cq_object->cqlist_for_eq); + } + return BE_SUCCESS; +} + diff --git a/trunk/drivers/staging/benet/descriptors.h b/trunk/drivers/staging/benet/descriptors.h new file mode 100644 index 000000000000..8da438c407d2 --- /dev/null +++ b/trunk/drivers/staging/benet/descriptors.h @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __descriptors_amap_h__ +#define __descriptors_amap_h__ + +/* + * --- IPC_NODE_ID_ENUM --- + * IPC processor id values + */ +#define TPOST_NODE_ID (0) /* TPOST ID */ +#define TPRE_NODE_ID (1) /* TPRE ID */ +#define TXULP0_NODE_ID (2) /* TXULP0 ID */ +#define TXULP1_NODE_ID (3) /* TXULP1 ID */ +#define TXULP2_NODE_ID (4) /* TXULP2 ID */ +#define RXULP0_NODE_ID (5) /* RXULP0 ID */ +#define RXULP1_NODE_ID (6) /* RXULP1 ID */ +#define RXULP2_NODE_ID (7) /* RXULP2 ID */ +#define MPU_NODE_ID (15) /* MPU ID */ + +/* + * --- MAC_ID_ENUM --- + * Meaning of the mac_id field in rxpp_eth_d + */ +#define PORT0_HOST_MAC0 (0) /* PD 0, Port 0, host networking, MAC 0. */ +#define PORT0_HOST_MAC1 (1) /* PD 0, Port 0, host networking, MAC 1. */ +#define PORT0_STORAGE_MAC0 (2) /* PD 0, Port 0, host storage, MAC 0. */ +#define PORT0_STORAGE_MAC1 (3) /* PD 0, Port 0, host storage, MAC 1. */ +#define PORT1_HOST_MAC0 (4) /* PD 0, Port 1 host networking, MAC 0. */ +#define PORT1_HOST_MAC1 (5) /* PD 0, Port 1 host networking, MAC 1. */ +#define PORT1_STORAGE_MAC0 (6) /* PD 0, Port 1 host storage, MAC 0. */ +#define PORT1_STORAGE_MAC1 (7) /* PD 0, Port 1 host storage, MAC 1. */ +#define FIRST_VM_MAC (8) /* PD 1 MAC. Protection domains have IDs */ + /* from 0x8-0x26, one per PD. */ +#define LAST_VM_MAC (38) /* PD 31 MAC. */ +#define MGMT_MAC (39) /* Management port MAC. */ +#define MARBLE_MAC0 (59) /* Used for flushing function 0 receive */ + /* + * queues before re-using a torn-down + * receive ring. the DA = + * 00-00-00-00-00-00, and the MSB of the + * SA = 00 + */ +#define MARBLE_MAC1 (60) /* Used for flushing function 1 receive */ + /* + * queues before re-using a torn-down + * receive ring. the DA = + * 00-00-00-00-00-00, and the MSB of the + * SA != 00 + */ +#define NULL_MAC (61) /* Promiscuous mode, indicates no match */ +#define MCAST_MAC (62) /* Multicast match. */ +#define BCAST_MATCH (63) /* Broadcast match. */ + +#endif /* __descriptors_amap_h__ */ diff --git a/trunk/drivers/staging/benet/doorbells.h b/trunk/drivers/staging/benet/doorbells.h new file mode 100644 index 000000000000..550cc4d5d6f7 --- /dev/null +++ b/trunk/drivers/staging/benet/doorbells.h @@ -0,0 +1,179 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __doorbells_amap_h__ +#define __doorbells_amap_h__ + +/* The TX/RDMA send queue doorbell. */ +struct BE_SQ_DB_AMAP { + u8 cid[11]; /* DWORD 0 */ + u8 rsvd0[5]; /* DWORD 0 */ + u8 numPosted[14]; /* DWORD 0 */ + u8 rsvd1[2]; /* DWORD 0 */ +} __packed; +struct SQ_DB_AMAP { + u32 dw[1]; +}; + +/* The receive queue doorbell. */ +struct BE_RQ_DB_AMAP { + u8 rq[10]; /* DWORD 0 */ + u8 rsvd0[13]; /* DWORD 0 */ + u8 Invalidate; /* DWORD 0 */ + u8 numPosted[8]; /* DWORD 0 */ +} __packed; +struct RQ_DB_AMAP { + u32 dw[1]; +}; + +/* + * The CQ/EQ doorbell. Software MUST set reserved fields in this + * descriptor to zero, otherwise (CEV) hardware will not execute the + * doorbell (flagging a bad_db_qid error instead). + */ +struct BE_CQ_DB_AMAP { + u8 qid[10]; /* DWORD 0 */ + u8 rsvd0[4]; /* DWORD 0 */ + u8 rearm; /* DWORD 0 */ + u8 event; /* DWORD 0 */ + u8 num_popped[13]; /* DWORD 0 */ + u8 rsvd1[3]; /* DWORD 0 */ +} __packed; +struct CQ_DB_AMAP { + u32 dw[1]; +}; + +struct BE_TPM_RQ_DB_AMAP { + u8 qid[10]; /* DWORD 0 */ + u8 rsvd0[6]; /* DWORD 0 */ + u8 numPosted[11]; /* DWORD 0 */ + u8 mss_cnt[5]; /* DWORD 0 */ +} __packed; +struct TPM_RQ_DB_AMAP { + u32 dw[1]; +}; + +/* + * Post WRB Queue Doorbell Register used by the host Storage stack + * to notify the controller of a posted Work Request Block + */ +struct BE_WRB_POST_DB_AMAP { + u8 wrb_cid[10]; /* DWORD 0 */ + u8 rsvd0[6]; /* DWORD 0 */ + u8 wrb_index[8]; /* DWORD 0 */ + u8 numberPosted[8]; /* DWORD 0 */ +} __packed; +struct WRB_POST_DB_AMAP { + u32 dw[1]; +}; + +/* + * Update Default PDU Queue Doorbell Register used to communicate + * to the controller that the driver has stopped processing the queue + * and where in the queue it stopped, this is + * a CQ Entry Type. Used by storage driver. + */ +struct BE_DEFAULT_PDU_DB_AMAP { + u8 qid[10]; /* DWORD 0 */ + u8 rsvd0[4]; /* DWORD 0 */ + u8 rearm; /* DWORD 0 */ + u8 event; /* DWORD 0 */ + u8 cqproc[14]; /* DWORD 0 */ + u8 rsvd1[2]; /* DWORD 0 */ +} __packed; +struct DEFAULT_PDU_DB_AMAP { + u32 dw[1]; +}; + +/* Management Command and Controller default fragment ring */ +struct BE_MCC_DB_AMAP { + u8 rid[11]; /* DWORD 0 */ + u8 rsvd0[5]; /* DWORD 0 */ + u8 numPosted[14]; /* DWORD 0 */ + u8 rsvd1[2]; /* DWORD 0 */ +} __packed; +struct MCC_DB_AMAP { + u32 dw[1]; +}; + +/* + * Used for bootstrapping the Host interface. This register is + * used for driver communication with the MPU when no MCC Rings exist. + * The software must write this register twice to post any MCC + * command. First, it writes the register with hi=1 and the upper bits of + * the physical address for the MCC_MAILBOX structure. Software must poll + * the ready bit until this is acknowledged. Then, sotware writes the + * register with hi=0 with the lower bits in the address. It must + * poll the ready bit until the MCC command is complete. Upon completion, + * the MCC_MAILBOX will contain a valid completion queue entry. + */ +struct BE_MPU_MAILBOX_DB_AMAP { + u8 ready; /* DWORD 0 */ + u8 hi; /* DWORD 0 */ + u8 address[30]; /* DWORD 0 */ +} __packed; +struct MPU_MAILBOX_DB_AMAP { + u32 dw[1]; +}; + +/* + * This is the protection domain doorbell register map. Note that + * while this map shows doorbells for all Blade Engine supported + * protocols, not all of these may be valid in a given function or + * protection domain. It is the responsibility of the application + * accessing the doorbells to know which are valid. Each doorbell + * occupies 32 bytes of space, but unless otherwise specified, + * only the first 4 bytes should be written. There are 32 instances + * of these doorbells for the host and 31 virtual machines respectively. + * The host and VMs will only map the doorbell pages belonging to its + * protection domain. It will not be able to touch the doorbells for + * another VM. The doorbells are the only registers directly accessible + * by a virtual machine. Similarly, there are 511 additional + * doorbells for RDMA protection domains. PD 0 for RDMA shares + * the same physical protection domain doorbell page as ETH/iSCSI. + * + */ +struct BE_PROTECTION_DOMAIN_DBMAP_AMAP { + u8 rsvd0[512]; /* DWORD 0 */ + struct BE_SQ_DB_AMAP rdma_sq_db; + u8 rsvd1[7][32]; /* DWORD 17 */ + struct BE_WRB_POST_DB_AMAP iscsi_wrb_post_db; + u8 rsvd2[7][32]; /* DWORD 25 */ + struct BE_SQ_DB_AMAP etx_sq_db; + u8 rsvd3[7][32]; /* DWORD 33 */ + struct BE_RQ_DB_AMAP rdma_rq_db; + u8 rsvd4[7][32]; /* DWORD 41 */ + struct BE_DEFAULT_PDU_DB_AMAP iscsi_default_pdu_db; + u8 rsvd5[7][32]; /* DWORD 49 */ + struct BE_TPM_RQ_DB_AMAP tpm_rq_db; + u8 rsvd6[7][32]; /* DWORD 57 */ + struct BE_RQ_DB_AMAP erx_rq_db; + u8 rsvd7[7][32]; /* DWORD 65 */ + struct BE_CQ_DB_AMAP cq_db; + u8 rsvd8[7][32]; /* DWORD 73 */ + struct BE_MCC_DB_AMAP mpu_mcc_db; + u8 rsvd9[7][32]; /* DWORD 81 */ + struct BE_MPU_MAILBOX_DB_AMAP mcc_bootstrap_db; + u8 rsvd10[935][32]; /* DWORD 89 */ +} __packed; +struct PROTECTION_DOMAIN_DBMAP_AMAP { + u32 dw[1024]; +}; + +#endif /* __doorbells_amap_h__ */ diff --git a/trunk/drivers/staging/benet/ep.h b/trunk/drivers/staging/benet/ep.h new file mode 100644 index 000000000000..72fcf64a9ffb --- /dev/null +++ b/trunk/drivers/staging/benet/ep.h @@ -0,0 +1,66 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __ep_amap_h__ +#define __ep_amap_h__ + +/* General Control and Status Register. */ +struct BE_EP_CONTROL_CSR_AMAP { + u8 m0_RxPbuf; /* DWORD 0 */ + u8 m1_RxPbuf; /* DWORD 0 */ + u8 m2_RxPbuf; /* DWORD 0 */ + u8 ff_en; /* DWORD 0 */ + u8 rsvd0[27]; /* DWORD 0 */ + u8 CPU_reset; /* DWORD 0 */ +} __packed; +struct EP_CONTROL_CSR_AMAP { + u32 dw[1]; +}; + +/* Semaphore Register. */ +struct BE_EP_SEMAPHORE_CSR_AMAP { + u8 value[32]; /* DWORD 0 */ +} __packed; +struct EP_SEMAPHORE_CSR_AMAP { + u32 dw[1]; +}; + +/* Embedded Processor Specific Registers. */ +struct BE_EP_CSRMAP_AMAP { + struct BE_EP_CONTROL_CSR_AMAP ep_control; + u8 rsvd0[32]; /* DWORD 1 */ + u8 rsvd1[32]; /* DWORD 2 */ + u8 rsvd2[32]; /* DWORD 3 */ + u8 rsvd3[32]; /* DWORD 4 */ + u8 rsvd4[32]; /* DWORD 5 */ + u8 rsvd5[8][128]; /* DWORD 6 */ + u8 rsvd6[32]; /* DWORD 38 */ + u8 rsvd7[32]; /* DWORD 39 */ + u8 rsvd8[32]; /* DWORD 40 */ + u8 rsvd9[32]; /* DWORD 41 */ + u8 rsvd10[32]; /* DWORD 42 */ + struct BE_EP_SEMAPHORE_CSR_AMAP ep_semaphore; + u8 rsvd11[32]; /* DWORD 44 */ + u8 rsvd12[19][32]; /* DWORD 45 */ +} __packed; +struct EP_CSRMAP_AMAP { + u32 dw[64]; +}; + +#endif /* __ep_amap_h__ */ diff --git a/trunk/drivers/staging/benet/eq.c b/trunk/drivers/staging/benet/eq.c new file mode 100644 index 000000000000..db92ccd8fed8 --- /dev/null +++ b/trunk/drivers/staging/benet/eq.c @@ -0,0 +1,299 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#include "hwlib.h" +#include "bestatus.h" +/* + This routine creates an event queue based on the client completion + queue configuration information. + + FunctionObject - Handle to a function object + EqBaseVa - Base VA for a the EQ ring + SizeEncoding - The encoded size for the EQ entries. This value is + either CEV_EQ_SIZE_4 or CEV_EQ_SIZE_16 + NumEntries - CEV_CQ_CNT_* values. + Watermark - Enables watermark based coalescing. This parameter + must be of the type CEV_WMARK_* if watermarks + are enabled. If watermarks to to be disabled + this value should be-1. + TimerDelay - If a timer delay is enabled this value should be the + time of the delay in 8 microsecond units. If + delays are not used this parameter should be + set to -1. + ppEqObject - Internal EQ Handle returned. + + Returns BE_SUCCESS if successfull,, otherwise a useful error code + is returned. + + IRQL < DISPATCH_LEVEL +*/ +int +be_eq_create(struct be_function_object *pfob, + struct ring_desc *rd, u32 eqe_size, u32 num_entries, + u32 watermark, /* CEV_WMARK_* or -1 */ + u32 timer_delay, /* in 8us units, or -1 */ + struct be_eq_object *eq_object) +{ + int status = BE_SUCCESS; + u32 num_entries_encoding, eqe_size_encoding, length; + struct FWCMD_COMMON_EQ_CREATE *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + u32 n; + unsigned long irql; + + ASSERT(rd); + ASSERT(eq_object); + + switch (num_entries) { + case 256: + num_entries_encoding = CEV_EQ_CNT_256; + break; + case 512: + num_entries_encoding = CEV_EQ_CNT_512; + break; + case 1024: + num_entries_encoding = CEV_EQ_CNT_1024; + break; + case 2048: + num_entries_encoding = CEV_EQ_CNT_2048; + break; + case 4096: + num_entries_encoding = CEV_EQ_CNT_4096; + break; + default: + ASSERT(0); + return BE_STATUS_INVALID_PARAMETER; + } + + switch (eqe_size) { + case 4: + eqe_size_encoding = CEV_EQ_SIZE_4; + break; + case 16: + eqe_size_encoding = CEV_EQ_SIZE_16; + break; + default: + ASSERT(0); + return BE_STATUS_INVALID_PARAMETER; + } + + if ((eqe_size == 4 && num_entries < 1024) || + (eqe_size == 16 && num_entries == 4096)) { + TRACE(DL_ERR, "Bad EQ size. eqe_size:%d num_entries:%d", + eqe_size, num_entries); + ASSERT(0); + return BE_STATUS_INVALID_PARAMETER; + } + + memset(eq_object, 0, sizeof(*eq_object)); + + atomic_set(&eq_object->ref_count, 0); + eq_object->parent_function = pfob; + eq_object->eq_id = 0xFFFFFFFF; + + INIT_LIST_HEAD(&eq_object->cq_list_head); + + length = num_entries * eqe_size; + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + ASSERT(wrb); + TRACE(DL_ERR, "No free MCC WRBs in create EQ."); + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_EQ_CREATE); + + fwcmd->params.request.num_pages = PAGES_SPANNED(OFFSET_IN_PAGE(rd->va), + length); + n = pfob->pci_function_number; + AMAP_SET_BITS_PTR(EQ_CONTEXT, Func, &fwcmd->params.request.context, n); + + AMAP_SET_BITS_PTR(EQ_CONTEXT, valid, &fwcmd->params.request.context, 1); + + AMAP_SET_BITS_PTR(EQ_CONTEXT, Size, + &fwcmd->params.request.context, eqe_size_encoding); + + n = 0; /* Protection Domain is always 0 in Linux driver */ + AMAP_SET_BITS_PTR(EQ_CONTEXT, PD, &fwcmd->params.request.context, n); + + /* Let the caller ARM the EQ with the doorbell. */ + AMAP_SET_BITS_PTR(EQ_CONTEXT, Armed, &fwcmd->params.request.context, 0); + + AMAP_SET_BITS_PTR(EQ_CONTEXT, Count, &fwcmd->params.request.context, + num_entries_encoding); + + n = pfob->pci_function_number * 32; + AMAP_SET_BITS_PTR(EQ_CONTEXT, EventVect, + &fwcmd->params.request.context, n); + if (watermark != -1) { + AMAP_SET_BITS_PTR(EQ_CONTEXT, WME, + &fwcmd->params.request.context, 1); + AMAP_SET_BITS_PTR(EQ_CONTEXT, Watermark, + &fwcmd->params.request.context, watermark); + ASSERT(watermark <= CEV_WMARK_240); + } else + AMAP_SET_BITS_PTR(EQ_CONTEXT, WME, + &fwcmd->params.request.context, 0); + if (timer_delay != -1) { + AMAP_SET_BITS_PTR(EQ_CONTEXT, TMR, + &fwcmd->params.request.context, 1); + + ASSERT(timer_delay <= 250); /* max value according to EAS */ + timer_delay = min(timer_delay, (u32)250); + + AMAP_SET_BITS_PTR(EQ_CONTEXT, Delay, + &fwcmd->params.request.context, timer_delay); + } else { + AMAP_SET_BITS_PTR(EQ_CONTEXT, TMR, + &fwcmd->params.request.context, 0); + } + /* Create a page list for the FWCMD. */ + be_rd_to_pa_list(rd, fwcmd->params.request.pages, + ARRAY_SIZE(fwcmd->params.request.pages)); + + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + if (status != BE_SUCCESS) { + TRACE(DL_ERR, "MCC to create EQ failed."); + goto Error; + } + /* Get the EQ id. The MPU allocates the IDs. */ + eq_object->eq_id = fwcmd->params.response.eq_id; + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + Deferences the given object. Once the object's reference count drops to + zero, the object is destroyed and all resources that are held by this + object are released. The on-chip context is also destroyed along with + the queue ID, and any mappings made into the UT. + + eq_object - EQ handle returned from eq_object_create. + + Returns BE_SUCCESS if successfull, otherwise a useful error code + is returned. + + IRQL: IRQL < DISPATCH_LEVEL +*/ +int be_eq_destroy(struct be_eq_object *eq_object) +{ + int status = 0; + + ASSERT(atomic_read(&eq_object->ref_count) == 0); + /* no CQs should reference this EQ now */ + ASSERT(list_empty(&eq_object->cq_list_head)); + + /* Send fwcmd to destroy the EQ. */ + status = be_function_ring_destroy(eq_object->parent_function, + eq_object->eq_id, FWCMD_RING_TYPE_EQ, + NULL, NULL, NULL, NULL); + ASSERT(status == 0); + + return BE_SUCCESS; +} +/* + *--------------------------------------------------------------------------- + * Function: be_eq_modify_delay + * Changes the EQ delay for a group of EQs. + * num_eq - The number of EQs in the eq_array to adjust. + * This also is the number of delay values in + * the eq_delay_array. + * eq_array - Array of struct be_eq_object pointers to adjust. + * eq_delay_array - Array of "num_eq" timer delays in units + * of microseconds. The be_eq_query_delay_range + * fwcmd returns the resolution and range of + * legal EQ delays. + * cb - + * cb_context - + * q_ctxt - Optional. Pointer to a previously allocated + * struct. If the MCC WRB ring is full, this + * structure is used to queue the operation. It + * will be posted to the MCC ring when space + * becomes available. All queued commands will + * be posted to the ring in the order they are + * received. It is always valid to pass a pointer to + * a generic be_generic_q_cntxt. However, + * the specific context structs + * are generally smaller than the generic struct. + * return pend_status - BE_SUCCESS (0) on success. + * BE_PENDING (postive value) if the FWCMD + * completion is pending. Negative error code on failure. + *------------------------------------------------------------------------- + */ +int +be_eq_modify_delay(struct be_function_object *pfob, + u32 num_eq, struct be_eq_object **eq_array, + u32 *eq_delay_array, mcc_wrb_cqe_callback cb, + void *cb_context, struct be_eq_modify_delay_q_ctxt *q_ctxt) +{ + struct FWCMD_COMMON_MODIFY_EQ_DELAY *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + struct be_generic_q_ctxt *gen_ctxt = NULL; + u32 i; + unsigned long irql; + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + if (q_ctxt && cb) { + wrb = (struct MCC_WRB_AMAP *) &q_ctxt->wrb_header; + gen_ctxt = (struct be_generic_q_ctxt *) q_ctxt; + gen_ctxt->context.bytes = sizeof(*q_ctxt); + } else { + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_MODIFY_EQ_DELAY); + + ASSERT(num_eq > 0); + ASSERT(num_eq <= ARRAY_SIZE(fwcmd->params.request.delay)); + fwcmd->params.request.num_eq = num_eq; + for (i = 0; i < num_eq; i++) { + fwcmd->params.request.delay[i].eq_id = eq_array[i]->eq_id; + fwcmd->params.request.delay[i].delay_in_microseconds = + eq_delay_array[i]; + } + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, gen_ctxt, + cb, cb_context, NULL, NULL, fwcmd, NULL); + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + diff --git a/trunk/drivers/staging/benet/eth.c b/trunk/drivers/staging/benet/eth.c new file mode 100644 index 000000000000..f641b6260d07 --- /dev/null +++ b/trunk/drivers/staging/benet/eth.c @@ -0,0 +1,1273 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#include +#include "hwlib.h" +#include "bestatus.h" + +/* + *--------------------------------------------------------- + * Function: be_eth_sq_create_ex + * Creates an ethernet send ring - extended version with + * additional parameters. + * pfob - + * rd - ring address + * length_in_bytes - + * type - The type of ring to create. + * ulp - The requested ULP number for the ring. + * This should be zero based, i.e. 0,1,2. This must + * be valid NIC ULP based on the firmware config. + * All doorbells for this ring must be sent to + * this ULP. The first network ring allocated for + * each ULP are higher performance than subsequent rings. + * cq_object - cq object for completions + * ex_parameters - Additional parameters (that may increase in + * future revisions). These parameters are only used + * for certain ring types -- see + * struct be_eth_sq_parameters for details. + * eth_sq - + * return status - BE_SUCCESS (0) on success. Negative error code on failure. + *--------------------------------------------------------- + */ +int +be_eth_sq_create_ex(struct be_function_object *pfob, struct ring_desc *rd, + u32 length, u32 type, u32 ulp, struct be_cq_object *cq_object, + struct be_eth_sq_parameters *ex_parameters, + struct be_ethsq_object *eth_sq) +{ + struct FWCMD_COMMON_ETH_TX_CREATE *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + u32 n; + unsigned long irql; + + ASSERT(rd); + ASSERT(eth_sq); + ASSERT(ex_parameters); + + spin_lock_irqsave(&pfob->post_lock, irql); + + memset(eth_sq, 0, sizeof(*eth_sq)); + + eth_sq->parent_function = pfob; + eth_sq->bid = 0xFFFFFFFF; + eth_sq->cq_object = cq_object; + + /* Translate hwlib interface to arm interface. */ + switch (type) { + case BE_ETH_TX_RING_TYPE_FORWARDING: + type = ETH_TX_RING_TYPE_FORWARDING; + break; + case BE_ETH_TX_RING_TYPE_STANDARD: + type = ETH_TX_RING_TYPE_STANDARD; + break; + case BE_ETH_TX_RING_TYPE_BOUND: + ASSERT(ex_parameters->port < 2); + type = ETH_TX_RING_TYPE_BOUND; + break; + default: + TRACE(DL_ERR, "Invalid eth tx ring type:%d", type); + return BE_NOT_OK; + break; + } + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + ASSERT(wrb); + TRACE(DL_ERR, "No free MCC WRBs in create EQ."); + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + /* NIC must be supported by the current config. */ + ASSERT(pfob->fw_config.nic_ulp_mask); + + /* + * The ulp parameter must select a valid NIC ULP + * for the current config. + */ + ASSERT((1 << ulp) & pfob->fw_config.nic_ulp_mask); + + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_ETH_TX_CREATE); + fwcmd->header.request.port_number = ex_parameters->port; + + AMAP_SET_BITS_PTR(ETX_CONTEXT, pd_id, + &fwcmd->params.request.context, 0); + + n = be_ring_length_to_encoding(length, sizeof(struct ETH_WRB_AMAP)); + AMAP_SET_BITS_PTR(ETX_CONTEXT, tx_ring_size, + &fwcmd->params.request.context, n); + + AMAP_SET_BITS_PTR(ETX_CONTEXT, cq_id_send, + &fwcmd->params.request.context, cq_object->cq_id); + + n = pfob->pci_function_number; + AMAP_SET_BITS_PTR(ETX_CONTEXT, func, &fwcmd->params.request.context, n); + + fwcmd->params.request.type = type; + fwcmd->params.request.ulp_num = (1 << ulp); + fwcmd->params.request.num_pages = DIV_ROUND_UP(length, PAGE_SIZE); + ASSERT(PAGES_SPANNED(rd->va, rd->length) >= + fwcmd->params.request.num_pages); + + /* Create a page list for the FWCMD. */ + be_rd_to_pa_list(rd, fwcmd->params.request.pages, + ARRAY_SIZE(fwcmd->params.request.pages)); + + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + if (status != BE_SUCCESS) { + TRACE(DL_ERR, "MCC to create etx queue failed."); + goto Error; + } + /* save the butler ID */ + eth_sq->bid = fwcmd->params.response.cid; + + /* add a reference to the corresponding CQ */ + atomic_inc(&cq_object->ref_count); + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + + +/* + This routine destroys an ethernet send queue + + EthSq - EthSq Handle returned from EthSqCreate + + This function always return BE_SUCCESS. + + This function frees memory allocated by EthSqCreate for the EthSq Object. + +*/ +int be_eth_sq_destroy(struct be_ethsq_object *eth_sq) +{ + int status = 0; + + /* Send fwcmd to destroy the queue. */ + status = be_function_ring_destroy(eth_sq->parent_function, eth_sq->bid, + FWCMD_RING_TYPE_ETH_TX, NULL, NULL, NULL, NULL); + ASSERT(status == 0); + + /* Derefence any associated CQs. */ + atomic_dec(ð_sq->cq_object->ref_count); + return status; +} +/* + This routine attempts to set the transmit flow control parameters. + + FunctionObject - Handle to a function object + + txfc_enable - transmit flow control enable - true for + enable, false for disable + + rxfc_enable - receive flow control enable - true for + enable, false for disable + + Returns BE_SUCCESS if successfull, otherwise a useful int error + code is returned. + + IRQL: < DISPATCH_LEVEL + + This function always fails in non-privileged machine context. +*/ +int +be_eth_set_flow_control(struct be_function_object *pfob, + bool txfc_enable, bool rxfc_enable) +{ + struct FWCMD_COMMON_SET_FLOW_CONTROL *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + unsigned long irql; + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_SET_FLOW_CONTROL); + + fwcmd->params.request.rx_flow_control = rxfc_enable; + fwcmd->params.request.tx_flow_control = txfc_enable; + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + + if (status != 0) { + TRACE(DL_ERR, "set flow control fwcmd failed."); + goto error; + } + +error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + This routine attempts to get the transmit flow control parameters. + + pfob - Handle to a function object + + txfc_enable - transmit flow control enable - true for + enable, false for disable + + rxfc_enable - receive flow control enable - true for enable, + false for disable + + Returns BE_SUCCESS if successfull, otherwise a useful int error code + is returned. + + IRQL: < DISPATCH_LEVEL + + This function always fails in non-privileged machine context. +*/ +int +be_eth_get_flow_control(struct be_function_object *pfob, + bool *txfc_enable, bool *rxfc_enable) +{ + struct FWCMD_COMMON_GET_FLOW_CONTROL *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + unsigned long irql; + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_GET_FLOW_CONTROL); + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + + if (status != 0) { + TRACE(DL_ERR, "get flow control fwcmd failed."); + goto error; + } + + *txfc_enable = fwcmd->params.response.tx_flow_control; + *rxfc_enable = fwcmd->params.response.rx_flow_control; + +error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + *--------------------------------------------------------- + * Function: be_eth_set_qos + * This function sets the ethernet transmit Quality of Service (QoS) + * characteristics of BladeEngine for the domain. All ethernet + * transmit rings of the domain will evenly share the bandwidth. + * The exeception to sharing is the host primary (super) ethernet + * transmit ring as well as the host ethernet forwarding ring + * for missed offload data. + * pfob - + * max_bps - the maximum bits per second in units of + * 10 Mbps (valid 0-100) + * max_pps - the maximum packets per second in units + * of 1 Kpps (0 indicates no limit) + * return status - BE_SUCCESS (0) on success. Negative error code on failure. + *--------------------------------------------------------- + */ +int +be_eth_set_qos(struct be_function_object *pfob, u32 max_bps, u32 max_pps) +{ + struct FWCMD_COMMON_SET_QOS *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + unsigned long irql; + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_SET_QOS); + + /* Set fields in fwcmd */ + fwcmd->params.request.max_bits_per_second_NIC = max_bps; + fwcmd->params.request.max_packets_per_second_NIC = max_pps; + fwcmd->params.request.valid_flags = QOS_BITS_NIC | QOS_PKTS_NIC; + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + + if (status != 0) + TRACE(DL_ERR, "network set qos fwcmd failed."); + +error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + *--------------------------------------------------------- + * Function: be_eth_get_qos + * This function retrieves the ethernet transmit Quality of Service (QoS) + * characteristics for the domain. + * max_bps - the maximum bits per second in units of + * 10 Mbps (valid 0-100) + * max_pps - the maximum packets per second in units of + * 1 Kpps (0 indicates no limit) + * return status - BE_SUCCESS (0) on success. Negative error code on failure. + *--------------------------------------------------------- + */ +int +be_eth_get_qos(struct be_function_object *pfob, u32 *max_bps, u32 *max_pps) +{ + struct FWCMD_COMMON_GET_QOS *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + unsigned long irql; + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_GET_QOS); + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + + if (status != 0) { + TRACE(DL_ERR, "network get qos fwcmd failed."); + goto error; + } + + *max_bps = fwcmd->params.response.max_bits_per_second_NIC; + *max_pps = fwcmd->params.response.max_packets_per_second_NIC; + +error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + *--------------------------------------------------------- + * Function: be_eth_set_frame_size + * This function sets the ethernet maximum frame size. The previous + * values are returned. + * pfob - + * tx_frame_size - maximum transmit frame size in bytes + * rx_frame_size - maximum receive frame size in bytes + * return status - BE_SUCCESS (0) on success. Negative error code on failure. + *--------------------------------------------------------- + */ +int +be_eth_set_frame_size(struct be_function_object *pfob, + u32 *tx_frame_size, u32 *rx_frame_size) +{ + struct FWCMD_COMMON_SET_FRAME_SIZE *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + unsigned long irql; + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_SET_FRAME_SIZE); + fwcmd->params.request.max_tx_frame_size = *tx_frame_size; + fwcmd->params.request.max_rx_frame_size = *rx_frame_size; + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + + if (status != 0) { + TRACE(DL_ERR, "network set frame size fwcmd failed."); + goto error; + } + + *tx_frame_size = fwcmd->params.response.chip_max_tx_frame_size; + *rx_frame_size = fwcmd->params.response.chip_max_rx_frame_size; + +error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + + +/* + This routine creates a Ethernet receive ring. + + pfob - handle to a function object + rq_base_va - base VA for the default receive ring. this must be + exactly 8K in length and continguous physical memory. + cq_object - handle to a previously created CQ to be associated + with the RQ. + pp_eth_rq - pointer to an opqaue handle where an eth + receive object is returned. + Returns BE_SUCCESS if successfull, , otherwise a useful + int error code is returned. + + IRQL: < DISPATCH_LEVEL + this function allocates a struct be_ethrq_object *object. + there must be no more than 1 of these per function object, unless the + function object supports RSS (is networking and on the host). + the rq_base_va must point to a buffer of exactly 8K. + the erx::host_cqid (or host_stor_cqid) register and erx::ring_page registers + will be updated as appropriate on return +*/ +int +be_eth_rq_create(struct be_function_object *pfob, + struct ring_desc *rd, struct be_cq_object *cq_object, + struct be_cq_object *bcmc_cq_object, + struct be_ethrq_object *eth_rq) +{ + int status = 0; + struct MCC_WRB_AMAP *wrb = NULL; + struct FWCMD_COMMON_ETH_RX_CREATE *fwcmd = NULL; + unsigned long irql; + + /* MPU will set the */ + ASSERT(rd); + ASSERT(eth_rq); + + spin_lock_irqsave(&pfob->post_lock, irql); + + eth_rq->parent_function = pfob; + eth_rq->cq_object = cq_object; + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_ETH_RX_CREATE); + + fwcmd->params.request.num_pages = 2; /* required length */ + fwcmd->params.request.cq_id = cq_object->cq_id; + + if (bcmc_cq_object) + fwcmd->params.request.bcmc_cq_id = bcmc_cq_object->cq_id; + else + fwcmd->params.request.bcmc_cq_id = 0xFFFF; + + /* Create a page list for the FWCMD. */ + be_rd_to_pa_list(rd, fwcmd->params.request.pages, + ARRAY_SIZE(fwcmd->params.request.pages)); + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + if (status != BE_SUCCESS) { + TRACE(DL_ERR, "fwcmd to map eth rxq frags failed."); + goto Error; + } + /* Save the ring ID for cleanup. */ + eth_rq->rid = fwcmd->params.response.id; + + atomic_inc(&cq_object->ref_count); + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + This routine destroys an Ethernet receive queue + + eth_rq - ethernet receive queue handle returned from eth_rq_create + + Returns BE_SUCCESS on success and an appropriate int on failure. + + This function frees resourcs allocated by EthRqCreate. + The erx::host_cqid (or host_stor_cqid) register and erx::ring_page + registers will be updated as appropriate on return + IRQL: < DISPATCH_LEVEL +*/ + +static void be_eth_rq_destroy_internal_cb(void *context, int status, + struct MCC_WRB_AMAP *wrb) +{ + struct be_ethrq_object *eth_rq = (struct be_ethrq_object *) context; + + if (status != BE_SUCCESS) { + TRACE(DL_ERR, "Destroy eth rq failed in internal callback.\n"); + } else { + /* Dereference any CQs associated with this queue. */ + atomic_dec(ð_rq->cq_object->ref_count); + } + + return; +} + +int be_eth_rq_destroy(struct be_ethrq_object *eth_rq) +{ + int status = BE_SUCCESS; + + /* Send fwcmd to destroy the RQ. */ + status = be_function_ring_destroy(eth_rq->parent_function, + eth_rq->rid, FWCMD_RING_TYPE_ETH_RX, NULL, NULL, + be_eth_rq_destroy_internal_cb, eth_rq); + + return status; +} + +/* + *--------------------------------------------------------------------------- + * Function: be_eth_rq_destroy_options + * Destroys an ethernet receive ring with finer granularity options + * than the standard be_eth_rq_destroy() API function. + * eth_rq - + * flush - Set to 1 to flush the ring, set to 0 to bypass the flush + * cb - Callback function on completion + * cb_context - Callback context + * return status - BE_SUCCESS (0) on success. Negative error code on failure. + *---------------------------------------------------------------------------- + */ +int +be_eth_rq_destroy_options(struct be_ethrq_object *eth_rq, bool flush, + mcc_wrb_cqe_callback cb, void *cb_context) +{ + struct FWCMD_COMMON_RING_DESTROY *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = BE_SUCCESS; + struct be_function_object *pfob = NULL; + unsigned long irql; + + pfob = eth_rq->parent_function; + + spin_lock_irqsave(&pfob->post_lock, irql); + + TRACE(DL_INFO, "Destroy eth_rq ring id:%d, flush:%d", eth_rq->rid, + flush); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + ASSERT(wrb); + TRACE(DL_ERR, "No free MCC WRBs in destroy eth_rq ring."); + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_RING_DESTROY); + + fwcmd->params.request.id = eth_rq->rid; + fwcmd->params.request.ring_type = FWCMD_RING_TYPE_ETH_RX; + fwcmd->params.request.bypass_flush = ((0 == flush) ? 1 : 0); + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, cb, cb_context, + be_eth_rq_destroy_internal_cb, eth_rq, fwcmd, NULL); + + if (status != BE_SUCCESS && status != BE_PENDING) { + TRACE(DL_ERR, "eth_rq ring destroy failed. id:%d, flush:%d", + eth_rq->rid, flush); + goto Error; + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + This routine queries the frag size for erx. + + pfob - handle to a function object + + frag_size_bytes - erx frag size in bytes that is/was set. + + Returns BE_SUCCESS if successfull, otherwise a useful int error + code is returned. + + IRQL: < DISPATCH_LEVEL + +*/ +int +be_eth_rq_get_frag_size(struct be_function_object *pfob, u32 *frag_size_bytes) +{ + struct FWCMD_ETH_GET_RX_FRAG_SIZE *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + unsigned long irql; + + ASSERT(frag_size_bytes); + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + return BE_STATUS_NO_MCC_WRB; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, ETH_GET_RX_FRAG_SIZE); + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + + if (status != 0) { + TRACE(DL_ERR, "get frag size fwcmd failed."); + goto error; + } + + *frag_size_bytes = 1 << fwcmd->params.response.actual_fragsize_log2; + +error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + This routine attempts to set the frag size for erx. If the frag size is + already set, the attempt fails and the current frag size is returned. + + pfob - Handle to a function object + + frag_size - Erx frag size in bytes that is/was set. + + current_frag_size_bytes - Pointer to location where currrent frag + is to be rturned + + Returns BE_SUCCESS if successfull, otherwise a useful int error + code is returned. + + IRQL: < DISPATCH_LEVEL + + This function always fails in non-privileged machine context. +*/ +int +be_eth_rq_set_frag_size(struct be_function_object *pfob, + u32 frag_size, u32 *frag_size_bytes) +{ + struct FWCMD_ETH_SET_RX_FRAG_SIZE *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + unsigned long irql; + + ASSERT(frag_size_bytes); + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, ETH_SET_RX_FRAG_SIZE); + + ASSERT(frag_size >= 128 && frag_size <= 16 * 1024); + + /* This is the log2 of the fragsize. This is not the exact + * ERX encoding. */ + fwcmd->params.request.new_fragsize_log2 = __ilog2_u32(frag_size); + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + + if (status != 0) { + TRACE(DL_ERR, "set frag size fwcmd failed."); + goto error; + } + + *frag_size_bytes = 1 << fwcmd->params.response.actual_fragsize_log2; +error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + + +/* + This routine gets or sets a mac address for a domain + given the port and mac. + + FunctionObject - Function object handle. + port1 - Set to TRUE if this function will set/get the Port 1 + address. Only the host may set this to TRUE. + mac1 - Set to TRUE if this function will set/get the + MAC 1 address. Only the host may set this to TRUE. + write - Set to TRUE if this function should write the mac address. + mac_address - Buffer of the mac address to read or write. + + Returns BE_SUCCESS if successfull, otherwise a useful int is returned. + + IRQL: < DISPATCH_LEVEL +*/ +int be_rxf_mac_address_read_write(struct be_function_object *pfob, + bool port1, /* VM must always set to false */ + bool mac1, /* VM must always set to false */ + bool mgmt, bool write, + bool permanent, u8 *mac_address, + mcc_wrb_cqe_callback cb, /* optional */ + void *cb_context) /* optional */ +{ + int status = BE_SUCCESS; + union { + struct FWCMD_COMMON_NTWK_MAC_QUERY *query; + struct FWCMD_COMMON_NTWK_MAC_SET *set; + } fwcmd = {NULL}; + struct MCC_WRB_AMAP *wrb = NULL; + u32 type = 0; + unsigned long irql; + struct be_mcc_wrb_response_copy rc; + + spin_lock_irqsave(&pfob->post_lock, irql); + + ASSERT(mac_address); + + ASSERT(port1 == false); + ASSERT(mac1 == false); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + + if (mgmt) { + type = MAC_ADDRESS_TYPE_MANAGEMENT; + } else { + if (pfob->type == BE_FUNCTION_TYPE_NETWORK) + type = MAC_ADDRESS_TYPE_NETWORK; + else + type = MAC_ADDRESS_TYPE_STORAGE; + } + + if (write) { + /* Prepares an embedded fwcmd, including + * request/response sizes. + */ + fwcmd.set = BE_PREPARE_EMBEDDED_FWCMD(pfob, + wrb, COMMON_NTWK_MAC_SET); + + fwcmd.set->params.request.invalidate = 0; + fwcmd.set->params.request.mac1 = (mac1 ? 1 : 0); + fwcmd.set->params.request.port = (port1 ? 1 : 0); + fwcmd.set->params.request.type = type; + + /* Copy the mac address to set. */ + fwcmd.set->params.request.mac.SizeOfStructure = + sizeof(fwcmd.set->params.request.mac); + memcpy(fwcmd.set->params.request.mac.MACAddress, + mac_address, ETH_ALEN); + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, + cb, cb_context, NULL, NULL, fwcmd.set, NULL); + + } else { + + /* + * Prepares an embedded fwcmd, including + * request/response sizes. + */ + fwcmd.query = BE_PREPARE_EMBEDDED_FWCMD(pfob, + wrb, COMMON_NTWK_MAC_QUERY); + + fwcmd.query->params.request.mac1 = (mac1 ? 1 : 0); + fwcmd.query->params.request.port = (port1 ? 1 : 0); + fwcmd.query->params.request.type = type; + fwcmd.query->params.request.permanent = permanent; + + rc.length = FIELD_SIZEOF(struct FWCMD_COMMON_NTWK_MAC_QUERY, + params.response.mac.MACAddress); + rc.fwcmd_offset = offsetof(struct FWCMD_COMMON_NTWK_MAC_QUERY, + params.response.mac.MACAddress); + rc.va = mac_address; + /* Post the f/w command (with a copy for the response) */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, cb, + cb_context, NULL, NULL, fwcmd.query, &rc); + } + + if (status < 0) { + TRACE(DL_ERR, "mac set/query failed."); + goto Error; + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + This routine writes data to context memory. + + pfob - Function object handle. + mac_table - Set to the 128-bit multicast address hash table. + + Returns BE_SUCCESS if successfull, otherwise a useful int is returned. + + IRQL: < DISPATCH_LEVEL +*/ + +int be_rxf_multicast_config(struct be_function_object *pfob, + bool promiscuous, u32 num, u8 *mac_table, + mcc_wrb_cqe_callback cb, /* optional */ + void *cb_context, + struct be_multicast_q_ctxt *q_ctxt) +{ + int status = BE_SUCCESS; + struct FWCMD_COMMON_NTWK_MULTICAST_SET *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + struct be_generic_q_ctxt *generic_ctxt = NULL; + unsigned long irql; + + ASSERT(num <= ARRAY_SIZE(fwcmd->params.request.mac)); + + if (num > ARRAY_SIZE(fwcmd->params.request.mac)) { + TRACE(DL_ERR, "Too many multicast addresses. BE supports %d.", + (int) ARRAY_SIZE(fwcmd->params.request.mac)); + return BE_NOT_OK; + } + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + if (q_ctxt && cb) { + wrb = (struct MCC_WRB_AMAP *) &q_ctxt->wrb_header; + generic_ctxt = (struct be_generic_q_ctxt *) q_ctxt; + generic_ctxt->context.bytes = sizeof(*q_ctxt); + } else { + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_NTWK_MULTICAST_SET); + + fwcmd->params.request.promiscuous = promiscuous; + if (!promiscuous) { + fwcmd->params.request.num_mac = num; + if (num > 0) { + ASSERT(mac_table); + memcpy(fwcmd->params.request.mac, + mac_table, ETH_ALEN * num); + } + } + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, generic_ctxt, + cb, cb_context, NULL, NULL, fwcmd, NULL); + if (status < 0) { + TRACE(DL_ERR, "multicast fwcmd failed."); + goto Error; + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + This routine adds or removes a vlan tag from the rxf table. + + FunctionObject - Function object handle. + VLanTag - VLan tag to add or remove. + Add - Set to TRUE if this will add a vlan tag + + Returns BE_SUCCESS if successfull, otherwise a useful int is returned. + + IRQL: < DISPATCH_LEVEL +*/ +int be_rxf_vlan_config(struct be_function_object *pfob, + bool promiscuous, u32 num, u16 *vlan_tag_array, + mcc_wrb_cqe_callback cb, /* optional */ + void *cb_context, + struct be_vlan_q_ctxt *q_ctxt) /* optional */ +{ + int status = BE_SUCCESS; + struct FWCMD_COMMON_NTWK_VLAN_CONFIG *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + struct be_generic_q_ctxt *generic_ctxt = NULL; + unsigned long irql; + + if (num > ARRAY_SIZE(fwcmd->params.request.vlan_tag)) { + TRACE(DL_ERR, "Too many VLAN tags."); + return BE_NOT_OK; + } + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + if (q_ctxt && cb) { + wrb = (struct MCC_WRB_AMAP *) &q_ctxt->wrb_header; + generic_ctxt = (struct be_generic_q_ctxt *) q_ctxt; + generic_ctxt->context.bytes = sizeof(*q_ctxt); + } else { + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_NTWK_VLAN_CONFIG); + + fwcmd->params.request.promiscuous = promiscuous; + if (!promiscuous) { + fwcmd->params.request.num_vlan = num; + + if (num > 0) { + ASSERT(vlan_tag_array); + memcpy(fwcmd->params.request.vlan_tag, vlan_tag_array, + num * sizeof(vlan_tag_array[0])); + } + } + + /* Post the commadn */ + status = be_function_post_mcc_wrb(pfob, wrb, generic_ctxt, + cb, cb_context, NULL, NULL, fwcmd, NULL); + if (status < 0) { + TRACE(DL_ERR, "vlan fwcmd failed."); + goto Error; + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + + +int be_rxf_link_status(struct be_function_object *pfob, + struct BE_LINK_STATUS *link_status, + mcc_wrb_cqe_callback cb, + void *cb_context, + struct be_link_status_q_ctxt *q_ctxt) +{ + struct FWCMD_COMMON_NTWK_LINK_STATUS_QUERY *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + struct be_generic_q_ctxt *generic_ctxt = NULL; + unsigned long irql; + struct be_mcc_wrb_response_copy rc; + + ASSERT(link_status); + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + + if (!wrb) { + if (q_ctxt && cb) { + wrb = (struct MCC_WRB_AMAP *) &q_ctxt->wrb_header; + generic_ctxt = (struct be_generic_q_ctxt *) q_ctxt; + generic_ctxt->context.bytes = sizeof(*q_ctxt); + } else { + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, + COMMON_NTWK_LINK_STATUS_QUERY); + + rc.length = FIELD_SIZEOF(struct FWCMD_COMMON_NTWK_LINK_STATUS_QUERY, + params.response); + rc.fwcmd_offset = offsetof(struct FWCMD_COMMON_NTWK_LINK_STATUS_QUERY, + params.response); + rc.va = link_status; + /* Post or queue the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, generic_ctxt, + cb, cb_context, NULL, NULL, fwcmd, &rc); + + if (status < 0) { + TRACE(DL_ERR, "link status fwcmd failed."); + goto Error; + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +int +be_rxf_query_eth_statistics(struct be_function_object *pfob, + struct FWCMD_ETH_GET_STATISTICS *va_for_fwcmd, + u64 pa_for_fwcmd, mcc_wrb_cqe_callback cb, + void *cb_context, + struct be_nonembedded_q_ctxt *q_ctxt) +{ + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + struct be_generic_q_ctxt *generic_ctxt = NULL; + unsigned long irql; + + ASSERT(va_for_fwcmd); + ASSERT(pa_for_fwcmd); + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + + if (!wrb) { + if (q_ctxt && cb) { + wrb = (struct MCC_WRB_AMAP *) &q_ctxt->wrb_header; + generic_ctxt = (struct be_generic_q_ctxt *) q_ctxt; + generic_ctxt->context.bytes = sizeof(*q_ctxt); + } else { + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + } + + TRACE(DL_INFO, "Query eth stats. fwcmd va:%p pa:0x%08x_%08x", + va_for_fwcmd, upper_32_bits(pa_for_fwcmd), (u32)pa_for_fwcmd); + + /* Prepares an embedded fwcmd, including request/response sizes. */ + va_for_fwcmd = BE_PREPARE_NONEMBEDDED_FWCMD(pfob, wrb, + va_for_fwcmd, pa_for_fwcmd, ETH_GET_STATISTICS); + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, generic_ctxt, + cb, cb_context, NULL, NULL, va_for_fwcmd, NULL); + if (status < 0) { + TRACE(DL_ERR, "eth stats fwcmd failed."); + goto Error; + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +int +be_rxf_promiscuous(struct be_function_object *pfob, + bool enable_port0, bool enable_port1, + mcc_wrb_cqe_callback cb, void *cb_context, + struct be_promiscuous_q_ctxt *q_ctxt) +{ + struct FWCMD_ETH_PROMISCUOUS *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + struct be_generic_q_ctxt *generic_ctxt = NULL; + unsigned long irql; + + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + + if (!wrb) { + if (q_ctxt && cb) { + wrb = (struct MCC_WRB_AMAP *) &q_ctxt->wrb_header; + generic_ctxt = (struct be_generic_q_ctxt *) q_ctxt; + generic_ctxt->context.bytes = sizeof(*q_ctxt); + } else { + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, ETH_PROMISCUOUS); + + fwcmd->params.request.port0_promiscuous = enable_port0; + fwcmd->params.request.port1_promiscuous = enable_port1; + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, generic_ctxt, + cb, cb_context, NULL, NULL, fwcmd, NULL); + + if (status < 0) { + TRACE(DL_ERR, "promiscuous fwcmd failed."); + goto Error; + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + + +/* + *------------------------------------------------------------------------- + * Function: be_rxf_filter_config + * Configures BladeEngine ethernet receive filter settings. + * pfob - + * settings - Pointer to the requested filter settings. + * The response from BladeEngine will be placed back + * in this structure. + * cb - optional + * cb_context - optional + * q_ctxt - Optional. Pointer to a previously allocated struct. + * If the MCC WRB ring is full, this structure is + * used to queue the operation. It will be posted + * to the MCC ring when space becomes available. All + * queued commands will be posted to the ring in + * the order they are received. It is always valid + * to pass a pointer to a generic + * be_generic_q_ctxt. However, the specific + * context structs are generally smaller than + * the generic struct. + * return pend_status - BE_SUCCESS (0) on success. + * BE_PENDING (postive value) if the FWCMD + * completion is pending. Negative error code on failure. + *--------------------------------------------------------------------------- + */ +int +be_rxf_filter_config(struct be_function_object *pfob, + struct NTWK_RX_FILTER_SETTINGS *settings, + mcc_wrb_cqe_callback cb, void *cb_context, + struct be_rxf_filter_q_ctxt *q_ctxt) +{ + struct FWCMD_COMMON_NTWK_RX_FILTER *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + struct be_generic_q_ctxt *generic_ctxt = NULL; + unsigned long irql; + struct be_mcc_wrb_response_copy rc; + + ASSERT(settings); + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + + if (!wrb) { + if (q_ctxt && cb) { + wrb = (struct MCC_WRB_AMAP *) &q_ctxt->wrb_header; + generic_ctxt = (struct be_generic_q_ctxt *) q_ctxt; + generic_ctxt->context.bytes = sizeof(*q_ctxt); + } else { + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_NTWK_RX_FILTER); + memcpy(&fwcmd->params.request, settings, sizeof(*settings)); + + rc.length = FIELD_SIZEOF(struct FWCMD_COMMON_NTWK_RX_FILTER, + params.response); + rc.fwcmd_offset = offsetof(struct FWCMD_COMMON_NTWK_RX_FILTER, + params.response); + rc.va = settings; + /* Post or queue the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, generic_ctxt, + cb, cb_context, NULL, NULL, fwcmd, &rc); + + if (status < 0) { + TRACE(DL_ERR, "RXF/ERX filter config fwcmd failed."); + goto Error; + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} diff --git a/trunk/drivers/staging/benet/etx_context.h b/trunk/drivers/staging/benet/etx_context.h new file mode 100644 index 000000000000..554fbe5d127b --- /dev/null +++ b/trunk/drivers/staging/benet/etx_context.h @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __etx_context_amap_h__ +#define __etx_context_amap_h__ + +/* ETX ring context structure. */ +struct BE_ETX_CONTEXT_AMAP { + u8 tx_cidx[11]; /* DWORD 0 */ + u8 rsvd0[5]; /* DWORD 0 */ + u8 rsvd1[16]; /* DWORD 0 */ + u8 tx_pidx[11]; /* DWORD 1 */ + u8 rsvd2; /* DWORD 1 */ + u8 tx_ring_size[4]; /* DWORD 1 */ + u8 pd_id[5]; /* DWORD 1 */ + u8 pd_id_not_valid; /* DWORD 1 */ + u8 cq_id_send[10]; /* DWORD 1 */ + u8 rsvd3[32]; /* DWORD 2 */ + u8 rsvd4[32]; /* DWORD 3 */ + u8 cur_bytes[32]; /* DWORD 4 */ + u8 max_bytes[32]; /* DWORD 5 */ + u8 time_stamp[32]; /* DWORD 6 */ + u8 rsvd5[11]; /* DWORD 7 */ + u8 func; /* DWORD 7 */ + u8 rsvd6[20]; /* DWORD 7 */ + u8 cur_txd_count[32]; /* DWORD 8 */ + u8 max_txd_count[32]; /* DWORD 9 */ + u8 rsvd7[32]; /* DWORD 10 */ + u8 rsvd8[32]; /* DWORD 11 */ + u8 rsvd9[32]; /* DWORD 12 */ + u8 rsvd10[32]; /* DWORD 13 */ + u8 rsvd11[32]; /* DWORD 14 */ + u8 rsvd12[32]; /* DWORD 15 */ +} __packed; +struct ETX_CONTEXT_AMAP { + u32 dw[16]; +}; + +#endif /* __etx_context_amap_h__ */ diff --git a/trunk/drivers/staging/benet/funcobj.c b/trunk/drivers/staging/benet/funcobj.c new file mode 100644 index 000000000000..0f57eb58daef --- /dev/null +++ b/trunk/drivers/staging/benet/funcobj.c @@ -0,0 +1,565 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#include "hwlib.h" +#include "bestatus.h" + + +int +be_function_internal_query_firmware_config(struct be_function_object *pfob, + struct BE_FIRMWARE_CONFIG *config) +{ + struct FWCMD_COMMON_FIRMWARE_CONFIG *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + unsigned long irql; + struct be_mcc_wrb_response_copy rc; + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_FIRMWARE_CONFIG); + + rc.length = FIELD_SIZEOF(struct FWCMD_COMMON_FIRMWARE_CONFIG, + params.response); + rc.fwcmd_offset = offsetof(struct FWCMD_COMMON_FIRMWARE_CONFIG, + params.response); + rc.va = config; + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, + NULL, NULL, NULL, fwcmd, &rc); +error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + This allocates and initializes a function object based on the information + provided by upper layer drivers. + + Returns BE_SUCCESS on success and an appropriate int on failure. + + A function object represents a single BladeEngine (logical) PCI function. + That is a function object either represents + the networking side of BladeEngine or the iSCSI side of BladeEngine. + + This routine will also detect and create an appropriate PD object for the + PCI function as needed. +*/ +int +be_function_object_create(u8 __iomem *csr_va, u8 __iomem *db_va, + u8 __iomem *pci_va, u32 function_type, + struct ring_desc *mailbox, struct be_function_object *pfob) +{ + int status; + + ASSERT(pfob); /* not a magic assert */ + ASSERT(function_type <= 2); + + TRACE(DL_INFO, "Create function object. type:%s object:0x%p", + (function_type == BE_FUNCTION_TYPE_ISCSI ? "iSCSI" : + (function_type == BE_FUNCTION_TYPE_NETWORK ? "Network" : + "Arm")), pfob); + + memset(pfob, 0, sizeof(*pfob)); + + pfob->type = function_type; + pfob->csr_va = csr_va; + pfob->db_va = db_va; + pfob->pci_va = pci_va; + + spin_lock_init(&pfob->cq_lock); + spin_lock_init(&pfob->post_lock); + spin_lock_init(&pfob->mcc_context_lock); + + + pfob->pci_function_number = 1; + + + pfob->emulate = false; + TRACE(DL_NOTE, "Non-emulation mode"); + status = be_drive_POST(pfob); + if (status != BE_SUCCESS) { + TRACE(DL_ERR, "BladeEngine POST failed."); + goto error; + } + + /* Initialize the mailbox */ + status = be_mpu_init_mailbox(pfob, mailbox); + if (status != BE_SUCCESS) { + TRACE(DL_ERR, "Failed to initialize mailbox."); + goto error; + } + /* + * Cache the firmware config for ASSERTs in hwclib and later + * driver queries. + */ + status = be_function_internal_query_firmware_config(pfob, + &pfob->fw_config); + if (status != BE_SUCCESS) { + TRACE(DL_ERR, "Failed to query firmware config."); + goto error; + } + +error: + if (status != BE_SUCCESS) { + /* No cleanup necessary */ + TRACE(DL_ERR, "Failed to create function."); + memset(pfob, 0, sizeof(*pfob)); + } + return status; +} + +/* + This routine drops the reference count on a given function object. Once + the reference count falls to zero, the function object is destroyed and all + resources held are freed. + + FunctionObject - The function object to drop the reference to. +*/ +int be_function_object_destroy(struct be_function_object *pfob) +{ + TRACE(DL_INFO, "Destroy pfob. Object:0x%p", + pfob); + + + ASSERT(pfob->mcc == NULL); + + return BE_SUCCESS; +} + +int be_function_cleanup(struct be_function_object *pfob) +{ + int status = 0; + u32 isr; + u32 host_intr; + struct PCICFG_HOST_TIMER_INT_CTRL_CSR_AMAP ctrl; + + + if (pfob->type == BE_FUNCTION_TYPE_NETWORK) { + status = be_rxf_multicast_config(pfob, false, 0, + NULL, NULL, NULL, NULL); + ASSERT(status == BE_SUCCESS); + } + /* VLAN */ + status = be_rxf_vlan_config(pfob, false, 0, NULL, NULL, NULL, NULL); + ASSERT(status == BE_SUCCESS); + /* + * MCC Queue -- Switches to mailbox mode. May want to destroy + * all but the MCC CQ before this call if polling CQ is much better + * performance than polling mailbox register. + */ + if (pfob->mcc) + status = be_mcc_ring_destroy(pfob->mcc); + /* + * If interrupts are disabled, clear any CEV interrupt assertions that + * fired after we stopped processing EQs. + */ + ctrl.dw[0] = PCICFG1_READ(pfob, host_timer_int_ctrl); + host_intr = AMAP_GET_BITS_PTR(PCICFG_HOST_TIMER_INT_CTRL_CSR, + hostintr, ctrl.dw); + if (!host_intr) + if (pfob->type == BE_FUNCTION_TYPE_NETWORK) + isr = CSR_READ(pfob, cev.isr1); + else + isr = CSR_READ(pfob, cev.isr0); + else + /* This should never happen... */ + TRACE(DL_ERR, "function_cleanup called with interrupt enabled"); + /* Function object destroy */ + status = be_function_object_destroy(pfob); + ASSERT(status == BE_SUCCESS); + + return status; +} + + +void * +be_function_prepare_embedded_fwcmd(struct be_function_object *pfob, + struct MCC_WRB_AMAP *wrb, u32 payld_len, u32 request_length, + u32 response_length, u32 opcode, u32 subsystem) +{ + struct FWCMD_REQUEST_HEADER *header = NULL; + u32 n; + + ASSERT(wrb); + + n = offsetof(struct BE_MCC_WRB_AMAP, payload)/8; + AMAP_SET_BITS_PTR(MCC_WRB, embedded, wrb, 1); + AMAP_SET_BITS_PTR(MCC_WRB, payload_length, wrb, min(payld_len, n)); + header = (struct FWCMD_REQUEST_HEADER *)((u8 *)wrb + n); + + header->timeout = 0; + header->domain = 0; + header->request_length = max(request_length, response_length); + header->opcode = opcode; + header->subsystem = subsystem; + + return header; +} + +void * +be_function_prepare_nonembedded_fwcmd(struct be_function_object *pfob, + struct MCC_WRB_AMAP *wrb, + void *fwcmd_va, u64 fwcmd_pa, + u32 payld_len, + u32 request_length, + u32 response_length, + u32 opcode, u32 subsystem) +{ + struct FWCMD_REQUEST_HEADER *header = NULL; + u32 n; + struct MCC_WRB_PAYLOAD_AMAP *plp; + + ASSERT(wrb); + ASSERT(fwcmd_va); + + header = (struct FWCMD_REQUEST_HEADER *) fwcmd_va; + + AMAP_SET_BITS_PTR(MCC_WRB, embedded, wrb, 0); + AMAP_SET_BITS_PTR(MCC_WRB, payload_length, wrb, payld_len); + + /* + * Assume one fragment. The caller may override the SGL by + * rewriting the 0th length and adding more entries. They + * will also need to update the sge_count. + */ + AMAP_SET_BITS_PTR(MCC_WRB, sge_count, wrb, 1); + + n = offsetof(struct BE_MCC_WRB_AMAP, payload)/8; + plp = (struct MCC_WRB_PAYLOAD_AMAP *)((u8 *)wrb + n); + AMAP_SET_BITS_PTR(MCC_WRB_PAYLOAD, sgl[0].length, plp, payld_len); + AMAP_SET_BITS_PTR(MCC_WRB_PAYLOAD, sgl[0].pa_lo, plp, (u32)fwcmd_pa); + AMAP_SET_BITS_PTR(MCC_WRB_PAYLOAD, sgl[0].pa_hi, plp, + upper_32_bits(fwcmd_pa)); + + header->timeout = 0; + header->domain = 0; + header->request_length = max(request_length, response_length); + header->opcode = opcode; + header->subsystem = subsystem; + + return header; +} + +struct MCC_WRB_AMAP * +be_function_peek_mcc_wrb(struct be_function_object *pfob) +{ + struct MCC_WRB_AMAP *wrb = NULL; + u32 offset; + + if (pfob->mcc) + wrb = _be_mpu_peek_ring_wrb(pfob->mcc, false); + else { + offset = offsetof(struct BE_MCC_MAILBOX_AMAP, wrb)/8; + wrb = (struct MCC_WRB_AMAP *) ((u8 *) pfob->mailbox.va + + offset); + } + + if (wrb) + memset(wrb, 0, sizeof(struct MCC_WRB_AMAP)); + + return wrb; +} + +#if defined(BE_DEBUG) +void be_function_debug_print_wrb(struct be_function_object *pfob, + struct MCC_WRB_AMAP *wrb, void *optional_fwcmd_va, + struct be_mcc_wrb_context *wrb_context) +{ + + struct FWCMD_REQUEST_HEADER *header = NULL; + u8 embedded; + u32 n; + + embedded = AMAP_GET_BITS_PTR(MCC_WRB, embedded, wrb); + + if (embedded) { + n = offsetof(struct BE_MCC_WRB_AMAP, payload)/8; + header = (struct FWCMD_REQUEST_HEADER *)((u8 *)wrb + n); + } else { + header = (struct FWCMD_REQUEST_HEADER *) optional_fwcmd_va; + } + + /* Save the completed count before posting for a debug assert. */ + + if (header) { + wrb_context->opcode = header->opcode; + wrb_context->subsystem = header->subsystem; + + } else { + wrb_context->opcode = 0; + wrb_context->subsystem = 0; + } +} +#else +#define be_function_debug_print_wrb(a_, b_, c_, d_) +#endif + +int +be_function_post_mcc_wrb(struct be_function_object *pfob, + struct MCC_WRB_AMAP *wrb, + struct be_generic_q_ctxt *q_ctxt, + mcc_wrb_cqe_callback cb, void *cb_context, + mcc_wrb_cqe_callback internal_cb, + void *internal_cb_context, void *optional_fwcmd_va, + struct be_mcc_wrb_response_copy *rc) +{ + int status; + struct be_mcc_wrb_context *wrb_context = NULL; + u64 *p; + + if (q_ctxt) { + /* Initialize context. */ + q_ctxt->context.internal_cb = internal_cb; + q_ctxt->context.internal_cb_context = internal_cb_context; + q_ctxt->context.cb = cb; + q_ctxt->context.cb_context = cb_context; + if (rc) { + q_ctxt->context.copy.length = rc->length; + q_ctxt->context.copy.fwcmd_offset = rc->fwcmd_offset; + q_ctxt->context.copy.va = rc->va; + } else + q_ctxt->context.copy.length = 0; + + q_ctxt->context.optional_fwcmd_va = optional_fwcmd_va; + + /* Queue this request */ + status = be_function_queue_mcc_wrb(pfob, q_ctxt); + + goto Error; + } + /* + * Allocate a WRB context struct to hold the callback pointers, + * status, etc. This is required if commands complete out of order. + */ + wrb_context = _be_mcc_allocate_wrb_context(pfob); + if (!wrb_context) { + TRACE(DL_WARN, "Failed to allocate MCC WRB context."); + status = BE_STATUS_SYSTEM_RESOURCES; + goto Error; + } + /* Initialize context. */ + memset(wrb_context, 0, sizeof(*wrb_context)); + wrb_context->internal_cb = internal_cb; + wrb_context->internal_cb_context = internal_cb_context; + wrb_context->cb = cb; + wrb_context->cb_context = cb_context; + if (rc) { + wrb_context->copy.length = rc->length; + wrb_context->copy.fwcmd_offset = rc->fwcmd_offset; + wrb_context->copy.va = rc->va; + } else + wrb_context->copy.length = 0; + wrb_context->wrb = wrb; + + /* + * Copy the context pointer into the WRB opaque tag field. + * Verify assumption of 64-bit tag with a compile time assert. + */ + p = (u64 *) ((u8 *)wrb + offsetof(struct BE_MCC_WRB_AMAP, tag)/8); + *p = (u64)(size_t)wrb_context; + + /* Print info about this FWCMD for debug builds. */ + be_function_debug_print_wrb(pfob, wrb, optional_fwcmd_va, wrb_context); + + /* + * issue the WRB to the MPU as appropriate + */ + if (pfob->mcc) { + /* + * we're in WRB mode, pass to the mcc layer + */ + status = _be_mpu_post_wrb_ring(pfob->mcc, wrb, wrb_context); + } else { + /* + * we're in mailbox mode + */ + status = _be_mpu_post_wrb_mailbox(pfob, wrb, wrb_context); + + /* mailbox mode always completes synchronously */ + ASSERT(status != BE_STATUS_PENDING); + } + +Error: + + return status; +} + +int +be_function_ring_destroy(struct be_function_object *pfob, + u32 id, u32 ring_type, mcc_wrb_cqe_callback cb, + void *cb_context, mcc_wrb_cqe_callback internal_cb, + void *internal_cb_context) +{ + + struct FWCMD_COMMON_RING_DESTROY *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + int status = 0; + unsigned long irql; + + spin_lock_irqsave(&pfob->post_lock, irql); + + TRACE(DL_INFO, "Destroy ring id:%d type:%d", id, ring_type); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + ASSERT(wrb); + TRACE(DL_ERR, "No free MCC WRBs in destroy ring."); + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_RING_DESTROY); + + fwcmd->params.request.id = id; + fwcmd->params.request.ring_type = ring_type; + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, cb, cb_context, + internal_cb, internal_cb_context, fwcmd, NULL); + if (status != BE_SUCCESS && status != BE_PENDING) { + TRACE(DL_ERR, "Ring destroy fwcmd failed. id:%d ring_type:%d", + id, ring_type); + goto Error; + } + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +void +be_rd_to_pa_list(struct ring_desc *rd, struct PHYS_ADDR *pa_list, u32 max_num) +{ + u32 num_pages = PAGES_SPANNED(rd->va, rd->length); + u32 i = 0; + u64 pa = rd->pa; + __le64 lepa; + + ASSERT(pa_list); + ASSERT(pa); + + for (i = 0; i < min(num_pages, max_num); i++) { + lepa = cpu_to_le64(pa); + pa_list[i].lo = (u32)lepa; + pa_list[i].hi = upper_32_bits(lepa); + pa += PAGE_SIZE; + } +} + + + +/*----------------------------------------------------------------------------- + * Function: be_function_get_fw_version + * Retrieves the firmware version on the adpater. If the callback is + * NULL this call executes synchronously. If the callback is not NULL, + * the returned status will be BE_PENDING if the command was issued + * successfully. + * pfob - + * fwv - Pointer to response buffer if callback is NULL. + * cb - Callback function invoked when the FWCMD completes. + * cb_context - Passed to the callback function. + * return pend_status - BE_SUCCESS (0) on success. + * BE_PENDING (postive value) if the FWCMD + * completion is pending. Negative error code on failure. + *--------------------------------------------------------------------------- + */ +int +be_function_get_fw_version(struct be_function_object *pfob, + struct FWCMD_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD *fwv, + mcc_wrb_cqe_callback cb, void *cb_context) +{ + int status = BE_SUCCESS; + struct MCC_WRB_AMAP *wrb = NULL; + struct FWCMD_COMMON_GET_FW_VERSION *fwcmd = NULL; + unsigned long irql; + struct be_mcc_wrb_response_copy rc; + + spin_lock_irqsave(&pfob->post_lock, irql); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + TRACE(DL_ERR, "MCC wrb peek failed."); + status = BE_STATUS_NO_MCC_WRB; + goto Error; + } + + if (!cb && !fwv) { + TRACE(DL_ERR, "callback and response buffer NULL!"); + status = BE_NOT_OK; + goto Error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_GET_FW_VERSION); + + rc.length = FIELD_SIZEOF(struct FWCMD_COMMON_GET_FW_VERSION, + params.response); + rc.fwcmd_offset = offsetof(struct FWCMD_COMMON_GET_FW_VERSION, + params.response); + rc.va = fwv; + + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, cb, + cb_context, NULL, NULL, fwcmd, &rc); + +Error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +int +be_function_queue_mcc_wrb(struct be_function_object *pfob, + struct be_generic_q_ctxt *q_ctxt) +{ + int status; + + ASSERT(q_ctxt); + + /* + * issue the WRB to the MPU as appropriate + */ + if (pfob->mcc) { + + /* We're in ring mode. Queue this item. */ + pfob->mcc->backlog_length++; + list_add_tail(&q_ctxt->context.list, &pfob->mcc->backlog); + status = BE_PENDING; + } else { + status = BE_NOT_OK; + } + return status; +} + diff --git a/trunk/drivers/staging/benet/fwcmd_common.h b/trunk/drivers/staging/benet/fwcmd_common.h new file mode 100644 index 000000000000..406e0d6fa985 --- /dev/null +++ b/trunk/drivers/staging/benet/fwcmd_common.h @@ -0,0 +1,222 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __fwcmd_common_amap_h__ +#define __fwcmd_common_amap_h__ +#include "host_struct.h" + +/* --- PHY_LINK_DUPLEX_ENUM --- */ +#define PHY_LINK_DUPLEX_NONE (0) +#define PHY_LINK_DUPLEX_HALF (1) +#define PHY_LINK_DUPLEX_FULL (2) + +/* --- PHY_LINK_SPEED_ENUM --- */ +#define PHY_LINK_SPEED_ZERO (0) /* No link. */ +#define PHY_LINK_SPEED_10MBPS (1) /* 10 Mbps */ +#define PHY_LINK_SPEED_100MBPS (2) /* 100 Mbps */ +#define PHY_LINK_SPEED_1GBPS (3) /* 1 Gbps */ +#define PHY_LINK_SPEED_10GBPS (4) /* 10 Gbps */ + +/* --- PHY_LINK_FAULT_ENUM --- */ +#define PHY_LINK_FAULT_NONE (0) /* No fault status + available or detected */ +#define PHY_LINK_FAULT_LOCAL (1) /* Local fault detected */ +#define PHY_LINK_FAULT_REMOTE (2) /* Remote fault detected */ + +/* --- BE_ULP_MASK --- */ +#define BE_ULP0_MASK (1) +#define BE_ULP1_MASK (2) +#define BE_ULP2_MASK (4) + +/* --- NTWK_ACTIVE_PORT --- */ +#define NTWK_PORT_A (0) /* Port A is currently active */ +#define NTWK_PORT_B (1) /* Port B is currently active */ +#define NTWK_NO_ACTIVE_PORT (15) /* Both ports have lost link */ + +/* --- NTWK_LINK_TYPE --- */ +#define NTWK_LINK_TYPE_PHYSICAL (0) /* link up/down event + applies to BladeEngine's + Physical Ports + */ +#define NTWK_LINK_TYPE_VIRTUAL (1) /* Virtual link up/down event + reported by BladeExchange. + This applies only when the + VLD feature is enabled + */ + +/* + * --- FWCMD_MAC_TYPE_ENUM --- + * This enum defines the types of MAC addresses in the RXF MAC Address Table. + */ +#define MAC_ADDRESS_TYPE_STORAGE (0) /* Storage MAC Address */ +#define MAC_ADDRESS_TYPE_NETWORK (1) /* Network MAC Address */ +#define MAC_ADDRESS_TYPE_PD (2) /* Protection Domain MAC Addr */ +#define MAC_ADDRESS_TYPE_MANAGEMENT (3) /* Managment MAC Address */ + + +/* --- FWCMD_RING_TYPE_ENUM --- */ +#define FWCMD_RING_TYPE_ETH_RX (1) /* Ring created with */ + /* FWCMD_COMMON_ETH_RX_CREATE. */ +#define FWCMD_RING_TYPE_ETH_TX (2) /* Ring created with */ + /* FWCMD_COMMON_ETH_TX_CREATE. */ +#define FWCMD_RING_TYPE_ISCSI_WRBQ (3) /* Ring created with */ + /* FWCMD_COMMON_ISCSI_WRBQ_CREATE. */ +#define FWCMD_RING_TYPE_ISCSI_DEFQ (4) /* Ring created with */ + /* FWCMD_COMMON_ISCSI_DEFQ_CREATE. */ +#define FWCMD_RING_TYPE_TPM_WRBQ (5) /* Ring created with */ + /* FWCMD_COMMON_TPM_WRBQ_CREATE. */ +#define FWCMD_RING_TYPE_TPM_DEFQ (6) /* Ring created with */ + /* FWCMD_COMMONTPM_TDEFQ_CREATE. */ +#define FWCMD_RING_TYPE_TPM_RQ (7) /* Ring created with */ + /* FWCMD_COMMON_TPM_RQ_CREATE. */ +#define FWCMD_RING_TYPE_MCC (8) /* Ring created with */ + /* FWCMD_COMMON_MCC_CREATE. */ +#define FWCMD_RING_TYPE_CQ (9) /* Ring created with */ + /* FWCMD_COMMON_CQ_CREATE. */ +#define FWCMD_RING_TYPE_EQ (10) /* Ring created with */ + /* FWCMD_COMMON_EQ_CREATE. */ +#define FWCMD_RING_TYPE_QP (11) /* Ring created with */ + /* FWCMD_RDMA_QP_CREATE. */ + + +/* --- ETH_TX_RING_TYPE_ENUM --- */ +#define ETH_TX_RING_TYPE_FORWARDING (1) /* Ethernet ring for + forwarding packets */ +#define ETH_TX_RING_TYPE_STANDARD (2) /* Ethernet ring for sending + network packets. */ +#define ETH_TX_RING_TYPE_BOUND (3) /* Ethernet ring bound to the + port specified in the command + header.port_number field. + Rings of this type are + NOT subject to the + failover logic implemented + in the BladeEngine. + */ + +/* --- FWCMD_COMMON_QOS_TYPE_ENUM --- */ +#define QOS_BITS_NIC (1) /* max_bits_per_second_NIC */ + /* field is valid. */ +#define QOS_PKTS_NIC (2) /* max_packets_per_second_NIC */ + /* field is valid. */ +#define QOS_IOPS_ISCSI (4) /* max_ios_per_second_iSCSI */ + /*field is valid. */ +#define QOS_VLAN_TAG (8) /* domain_VLAN_tag field + is valid. */ +#define QOS_FABRIC_ID (16) /* fabric_domain_ID field + is valid. */ +#define QOS_OEM_PARAMS (32) /* qos_params_oem field + is valid. */ +#define QOS_TPUT_ISCSI (64) /* max_bytes_per_second_iSCSI + field is valid. */ + + +/* + * --- FAILOVER_CONFIG_ENUM --- + * Failover configuration setting used in FWCMD_COMMON_FORCE_FAILOVER + */ +#define FAILOVER_CONFIG_NO_CHANGE (0) /* No change to automatic */ + /* port failover setting. */ +#define FAILOVER_CONFIG_ON (1) /* Automatic port failover + on link down is enabled. */ +#define FAILOVER_CONFIG_OFF (2) /* Automatic port failover + on link down is disabled. */ + +/* + * --- FAILOVER_PORT_ENUM --- + * Failover port setting used in FWCMD_COMMON_FORCE_FAILOVER + */ +#define FAILOVER_PORT_A (0) /* Selects port A. */ +#define FAILOVER_PORT_B (1) /* Selects port B. */ +#define FAILOVER_PORT_NONE (15) /* No port change requested. */ + + +/* + * --- MGMT_FLASHROM_OPCODE --- + * Flash ROM operation code + */ +#define MGMT_FLASHROM_OPCODE_FLASH (1) /* Commit downloaded data + to Flash ROM */ +#define MGMT_FLASHROM_OPCODE_SAVE (2) /* Save downloaded data to + ARM's DDR - do not flash */ +#define MGMT_FLASHROM_OPCODE_CLEAR (3) /* Erase specified component + from FlashROM */ +#define MGMT_FLASHROM_OPCODE_REPORT (4) /* Read specified component + from Flash ROM */ +#define MGMT_FLASHROM_OPCODE_IMAGE_INFO (5) /* Returns size of a + component */ + +/* + * --- MGMT_FLASHROM_OPTYPE --- + * Flash ROM operation type + */ +#define MGMT_FLASHROM_OPTYPE_CODE_FIRMWARE (0) /* Includes ARM firmware, + IPSec (optional) and EP + firmware */ +#define MGMT_FLASHROM_OPTYPE_CODE_REDBOOT (1) +#define MGMT_FLASHROM_OPTYPE_CODE_BIOS (2) +#define MGMT_FLASHROM_OPTYPE_CODE_PXE_BIOS (3) +#define MGMT_FLASHROM_OPTYPE_CODE_CTRLS (4) +#define MGMT_FLASHROM_OPTYPE_CFG_IPSEC (5) +#define MGMT_FLASHROM_OPTYPE_CFG_INI (6) +#define MGMT_FLASHROM_OPTYPE_ROM_OFFSET_SPECIFIED (7) + +/* + * --- FLASHROM_TYPE --- + * Flash ROM manufacturers supported in the f/w + */ +#define INTEL (0) +#define SPANSION (1) +#define MICRON (2) + +/* --- DDR_CAS_TYPE --- */ +#define CAS_3 (0) +#define CAS_4 (1) +#define CAS_5 (2) + +/* --- DDR_SIZE_TYPE --- */ +#define SIZE_256MB (0) +#define SIZE_512MB (1) + +/* --- DDR_MODE_TYPE --- */ +#define DDR_NO_ECC (0) +#define DDR_ECC (1) + +/* --- INTERFACE_10GB_TYPE --- */ +#define CX4_TYPE (0) +#define XFP_TYPE (1) + +/* --- BE_CHIP_MAX_MTU --- */ +#define CHIP_MAX_MTU (9000) + +/* --- XAUI_STATE_ENUM --- */ +#define XAUI_STATE_ENABLE (0) /* This MUST be the default + value for all requests + which set/change + equalization parameter. */ +#define XAUI_STATE_DISABLE (255) /* The XAUI for both ports + may be disabled for EMI + tests. There is no + provision for turning off + individual ports. + */ +/* --- BE_ASIC_REVISION --- */ +#define BE_ASIC_REV_A0 (1) +#define BE_ASIC_REV_A1 (2) + +#endif /* __fwcmd_common_amap_h__ */ diff --git a/trunk/drivers/staging/benet/fwcmd_common_bmap.h b/trunk/drivers/staging/benet/fwcmd_common_bmap.h new file mode 100644 index 000000000000..a007cf276500 --- /dev/null +++ b/trunk/drivers/staging/benet/fwcmd_common_bmap.h @@ -0,0 +1,717 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __fwcmd_common_bmap_h__ +#define __fwcmd_common_bmap_h__ +#include "fwcmd_types_bmap.h" +#include "fwcmd_hdr_bmap.h" + +#if defined(__BIG_ENDIAN) + /* Physical Address. */ +struct PHYS_ADDR { + union { + struct { + u32 lo; /* DWORD 0 */ + u32 hi; /* DWORD 1 */ + } __packed; /* unnamed struct */ + u32 dw[2]; /* dword union */ + }; /* unnamed union */ +} __packed ; + + +#else + /* Physical Address. */ +struct PHYS_ADDR { + union { + struct { + u32 lo; /* DWORD 0 */ + u32 hi; /* DWORD 1 */ + } __packed; /* unnamed struct */ + u32 dw[2]; /* dword union */ + }; /* unnamed union */ +} __packed ; + +struct BE_LINK_STATUS { + u8 mac0_duplex; + u8 mac0_speed; + u8 mac1_duplex; + u8 mac1_speed; + u8 mgmt_mac_duplex; + u8 mgmt_mac_speed; + u8 active_port; + u8 rsvd0; + u8 mac0_fault; + u8 mac1_fault; + u16 rsvd1; +} __packed; +#endif + +struct FWCMD_COMMON_ANON_170_REQUEST { + u32 rsvd0; +} __packed; + +union LINK_STATUS_QUERY_PARAMS { + struct BE_LINK_STATUS response; + struct FWCMD_COMMON_ANON_170_REQUEST request; +} __packed; + +/* + * Queries the the link status for all ports. The valid values below + * DO NOT indicate that a particular duplex or speed is supported by + * BladeEngine. These enumerations simply list all possible duplexes + * and speeds for any port. Consult BladeEngine product documentation + * for the supported parameters. + */ +struct FWCMD_COMMON_NTWK_LINK_STATUS_QUERY { + union FWCMD_HEADER header; + union LINK_STATUS_QUERY_PARAMS params; +} __packed; + +struct FWCMD_COMMON_ANON_171_REQUEST { + u8 type; + u8 port; + u8 mac1; + u8 permanent; +} __packed; + +struct FWCMD_COMMON_ANON_172_RESPONSE { + struct MAC_ADDRESS_FORMAT mac; +} __packed; + +union NTWK_MAC_QUERY_PARAMS { + struct FWCMD_COMMON_ANON_171_REQUEST request; + struct FWCMD_COMMON_ANON_172_RESPONSE response; +} __packed; + +/* Queries one MAC address. */ +struct FWCMD_COMMON_NTWK_MAC_QUERY { + union FWCMD_HEADER header; + union NTWK_MAC_QUERY_PARAMS params; +} __packed; + +struct MAC_SET_PARAMS_IN { + u8 type; + u8 port; + u8 mac1; + u8 invalidate; + struct MAC_ADDRESS_FORMAT mac; +} __packed; + +struct MAC_SET_PARAMS_OUT { + u32 rsvd0; +} __packed; + +union MAC_SET_PARAMS { + struct MAC_SET_PARAMS_IN request; + struct MAC_SET_PARAMS_OUT response; +} __packed; + +/* Sets a MAC address. */ +struct FWCMD_COMMON_NTWK_MAC_SET { + union FWCMD_HEADER header; + union MAC_SET_PARAMS params; +} __packed; + +/* MAC address list. */ +struct NTWK_MULTICAST_MAC_LIST { + u8 byte[6]; +} __packed; + +struct FWCMD_COMMON_NTWK_MULTICAST_SET_REQUEST_PAYLOAD { + u16 num_mac; + u8 promiscuous; + u8 rsvd0; + struct NTWK_MULTICAST_MAC_LIST mac[32]; +} __packed; + +struct FWCMD_COMMON_ANON_174_RESPONSE { + u32 rsvd0; +} __packed; + +union FWCMD_COMMON_ANON_173_PARAMS { + struct FWCMD_COMMON_NTWK_MULTICAST_SET_REQUEST_PAYLOAD request; + struct FWCMD_COMMON_ANON_174_RESPONSE response; +} __packed; + +/* + * Sets multicast address hash. The MPU will merge the MAC address lists + * from all clients, including the networking and storage functions. + * This command may fail if the final merged list of MAC addresses exceeds + * 32 entries. + */ +struct FWCMD_COMMON_NTWK_MULTICAST_SET { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_173_PARAMS params; +} __packed; + +struct FWCMD_COMMON_NTWK_VLAN_CONFIG_REQUEST_PAYLOAD { + u16 num_vlan; + u8 promiscuous; + u8 rsvd0; + u16 vlan_tag[32]; +} __packed; + +struct FWCMD_COMMON_ANON_176_RESPONSE { + u32 rsvd0; +} __packed; + +union FWCMD_COMMON_ANON_175_PARAMS { + struct FWCMD_COMMON_NTWK_VLAN_CONFIG_REQUEST_PAYLOAD request; + struct FWCMD_COMMON_ANON_176_RESPONSE response; +} __packed; + +/* + * Sets VLAN tag filter. The MPU will merge the VLAN tag list from all + * clients, including the networking and storage functions. This command + * may fail if the final vlan_tag array (from all functions) is longer + * than 32 entries. + */ +struct FWCMD_COMMON_NTWK_VLAN_CONFIG { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_175_PARAMS params; +} __packed; + +struct RING_DESTROY_REQUEST { + u16 ring_type; + u16 id; + u8 bypass_flush; + u8 rsvd0; + u16 rsvd1; +} __packed; + +struct FWCMD_COMMON_ANON_190_RESPONSE { + u32 rsvd0; +} __packed; + +union FWCMD_COMMON_ANON_189_PARAMS { + struct RING_DESTROY_REQUEST request; + struct FWCMD_COMMON_ANON_190_RESPONSE response; +} __packed; +/* + * Command for destroying any ring. The connection(s) using the ring should + * be quiesced before destroying the ring. + */ +struct FWCMD_COMMON_RING_DESTROY { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_189_PARAMS params; +} __packed; + +struct FWCMD_COMMON_ANON_192_REQUEST { + u16 num_pages; + u16 rsvd0; + struct CQ_CONTEXT_AMAP context; + struct PHYS_ADDR pages[4]; +} __packed ; + +struct FWCMD_COMMON_ANON_193_RESPONSE { + u16 cq_id; +} __packed ; + +union FWCMD_COMMON_ANON_191_PARAMS { + struct FWCMD_COMMON_ANON_192_REQUEST request; + struct FWCMD_COMMON_ANON_193_RESPONSE response; +} __packed ; + +/* + * Command for creating a completion queue. A Completion Queue must span + * at least 1 page and at most 4 pages. Each completion queue entry + * is 16 bytes regardless of CQ entry format. Thus the ring must be + * at least 256 entries deep (corresponding to 1 page) and can be at + * most 1024 entries deep (corresponding to 4 pages). The number of + * pages posted must contain the CQ ring size as encoded in the context. + * + */ +struct FWCMD_COMMON_CQ_CREATE { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_191_PARAMS params; +} __packed ; + +struct FWCMD_COMMON_ANON_198_REQUEST { + u16 num_pages; + u16 rsvd0; + struct EQ_CONTEXT_AMAP context; + struct PHYS_ADDR pages[8]; +} __packed ; + +struct FWCMD_COMMON_ANON_199_RESPONSE { + u16 eq_id; +} __packed ; + +union FWCMD_COMMON_ANON_197_PARAMS { + struct FWCMD_COMMON_ANON_198_REQUEST request; + struct FWCMD_COMMON_ANON_199_RESPONSE response; +} __packed ; + +/* + * Command for creating a event queue. An Event Queue must span at least + * 1 page and at most 8 pages. The number of pages posted must contain + * the EQ ring. The ring is defined by the size of the EQ entries (encoded + * in the context) and the number of EQ entries (also encoded in the + * context). + */ +struct FWCMD_COMMON_EQ_CREATE { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_197_PARAMS params; +} __packed ; + +struct FWCMD_COMMON_ANON_201_REQUEST { + u16 cq_id; + u16 bcmc_cq_id; + u16 num_pages; + u16 rsvd0; + struct PHYS_ADDR pages[2]; +} __packed; + +struct FWCMD_COMMON_ANON_202_RESPONSE { + u16 id; +} __packed; + +union FWCMD_COMMON_ANON_200_PARAMS { + struct FWCMD_COMMON_ANON_201_REQUEST request; + struct FWCMD_COMMON_ANON_202_RESPONSE response; +} __packed; + +/* + * Command for creating Ethernet receive ring. An ERX ring contains ETH_RX_D + * entries (8 bytes each). An ERX ring must be 1024 entries deep + * (corresponding to 2 pages). + */ +struct FWCMD_COMMON_ETH_RX_CREATE { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_200_PARAMS params; +} __packed; + +struct FWCMD_COMMON_ANON_204_REQUEST { + u16 num_pages; + u8 ulp_num; + u8 type; + struct ETX_CONTEXT_AMAP context; + struct PHYS_ADDR pages[8]; +} __packed ; + +struct FWCMD_COMMON_ANON_205_RESPONSE { + u16 cid; + u8 ulp_num; + u8 rsvd0; +} __packed ; + +union FWCMD_COMMON_ANON_203_PARAMS { + struct FWCMD_COMMON_ANON_204_REQUEST request; + struct FWCMD_COMMON_ANON_205_RESPONSE response; +} __packed ; + +/* + * Command for creating an Ethernet transmit ring. An ETX ring contains + * ETH_WRB entries (16 bytes each). An ETX ring must be at least 256 + * entries deep (corresponding to 1 page) and at most 2k entries deep + * (corresponding to 8 pages). + */ +struct FWCMD_COMMON_ETH_TX_CREATE { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_203_PARAMS params; +} __packed ; + +struct FWCMD_COMMON_ANON_222_REQUEST { + u16 num_pages; + u16 rsvd0; + struct MCC_RING_CONTEXT_AMAP context; + struct PHYS_ADDR pages[8]; +} __packed ; + +struct FWCMD_COMMON_ANON_223_RESPONSE { + u16 id; +} __packed ; + +union FWCMD_COMMON_ANON_221_PARAMS { + struct FWCMD_COMMON_ANON_222_REQUEST request; + struct FWCMD_COMMON_ANON_223_RESPONSE response; +} __packed ; + +/* + * Command for creating the MCC ring. An MCC ring must be at least 16 + * entries deep (corresponding to 1 page) and at most 128 entries deep + * (corresponding to 8 pages). + */ +struct FWCMD_COMMON_MCC_CREATE { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_221_PARAMS params; +} __packed ; + +struct GET_QOS_IN { + u32 qos_params_rsvd; +} __packed; + +struct GET_QOS_OUT { + u32 max_bits_per_second_NIC; + u32 max_packets_per_second_NIC; + u32 max_ios_per_second_iSCSI; + u32 max_bytes_per_second_iSCSI; + u16 domain_VLAN_tag; + u16 fabric_domain_ID; + u32 qos_params_oem[4]; +} __packed; + +union GET_QOS_PARAMS { + struct GET_QOS_IN request; + struct GET_QOS_OUT response; +} __packed; + +/* QOS/Bandwidth settings per domain. Applicable only in VMs. */ +struct FWCMD_COMMON_GET_QOS { + union FWCMD_HEADER header; + union GET_QOS_PARAMS params; +} __packed; + +struct SET_QOS_IN { + u32 valid_flags; + u32 max_bits_per_second_NIC; + u32 max_packets_per_second_NIC; + u32 max_ios_per_second_iSCSI; + u32 max_bytes_per_second_iSCSI; + u16 domain_VLAN_tag; + u16 fabric_domain_ID; + u32 qos_params_oem[4]; +} __packed; + +struct SET_QOS_OUT { + u32 qos_params_rsvd; +} __packed; + +union SET_QOS_PARAMS { + struct SET_QOS_IN request; + struct SET_QOS_OUT response; +} __packed; + +/* QOS/Bandwidth settings per domain. Applicable only in VMs. */ +struct FWCMD_COMMON_SET_QOS { + union FWCMD_HEADER header; + union SET_QOS_PARAMS params; +} __packed; + +struct SET_FRAME_SIZE_IN { + u32 max_tx_frame_size; + u32 max_rx_frame_size; +} __packed; + +struct SET_FRAME_SIZE_OUT { + u32 chip_max_tx_frame_size; + u32 chip_max_rx_frame_size; +} __packed; + +union SET_FRAME_SIZE_PARAMS { + struct SET_FRAME_SIZE_IN request; + struct SET_FRAME_SIZE_OUT response; +} __packed; + +/* Set frame size command. Only host domain may issue this command. */ +struct FWCMD_COMMON_SET_FRAME_SIZE { + union FWCMD_HEADER header; + union SET_FRAME_SIZE_PARAMS params; +} __packed; + +struct FORCE_FAILOVER_IN { + u32 move_to_port; + u32 failover_config; +} __packed; + +struct FWCMD_COMMON_ANON_231_RESPONSE { + u32 rsvd0; +} __packed; + +union FWCMD_COMMON_ANON_230_PARAMS { + struct FORCE_FAILOVER_IN request; + struct FWCMD_COMMON_ANON_231_RESPONSE response; +} __packed; + +/* + * Use this command to control failover in BladeEngine. It may be used + * to failback to a restored port or to forcibly move traffic from + * one port to another. It may also be used to enable or disable the + * automatic failover feature. This command can only be issued by domain + * 0. + */ +struct FWCMD_COMMON_FORCE_FAILOVER { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_230_PARAMS params; +} __packed; + +struct FWCMD_COMMON_ANON_240_REQUEST { + u64 context; +} __packed; + +struct FWCMD_COMMON_ANON_241_RESPONSE { + u64 context; +} __packed; + +union FWCMD_COMMON_ANON_239_PARAMS { + struct FWCMD_COMMON_ANON_240_REQUEST request; + struct FWCMD_COMMON_ANON_241_RESPONSE response; +} __packed; + +/* + * This command can be used by clients as a no-operation request. Typical + * uses for drivers are as a heartbeat mechanism, or deferred processing + * catalyst. The ARM will always complete this command with a good completion. + * The 64-bit parameter is not touched by the ARM processor. + */ +struct FWCMD_COMMON_NOP { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_239_PARAMS params; +} __packed; + +struct NTWK_RX_FILTER_SETTINGS { + u8 promiscuous; + u8 ip_cksum; + u8 tcp_cksum; + u8 udp_cksum; + u8 pass_err; + u8 pass_ckerr; + u8 strip_crc; + u8 mcast_en; + u8 bcast_en; + u8 mcast_promiscuous_en; + u8 unicast_en; + u8 vlan_promiscuous; +} __packed; + +union FWCMD_COMMON_ANON_242_PARAMS { + struct NTWK_RX_FILTER_SETTINGS request; + struct NTWK_RX_FILTER_SETTINGS response; +} __packed; + +/* + * This command is used to modify the ethernet receive filter configuration. + * Only domain 0 network function drivers may issue this command. The + * applied configuration is returned in the response payload. Note: + * Some receive packet filter settings are global on BladeEngine and + * can affect both the storage and network function clients that the + * BladeEngine hardware and firmware serve. Additionaly, depending + * on the revision of BladeEngine, some ethernet receive filter settings + * are dependent on others. If a dependency exists between settings + * for the BladeEngine revision, and the command request settings do + * not meet the dependency requirement, the invalid settings will not + * be applied despite the comand succeeding. For example: a driver may + * request to enable broadcast packets, but not enable multicast packets. + * On early revisions of BladeEngine, there may be no distinction between + * broadcast and multicast filters, so broadcast could not be enabled + * without enabling multicast. In this scenario, the comand would still + * succeed, but the response payload would indicate the previously + * configured broadcast and multicast setting. + */ +struct FWCMD_COMMON_NTWK_RX_FILTER { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_242_PARAMS params; +} __packed; + + +struct FWCMD_COMMON_ANON_244_REQUEST { + u32 rsvd0; +} __packed; + +struct FWCMD_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD { + u8 firmware_version_string[32]; + u8 fw_on_flash_version_string[32]; +} __packed; + +union FWCMD_COMMON_ANON_243_PARAMS { + struct FWCMD_COMMON_ANON_244_REQUEST request; + struct FWCMD_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD response; +} __packed; + +/* This comand retrieves the firmware version. */ +struct FWCMD_COMMON_GET_FW_VERSION { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_243_PARAMS params; +} __packed; + +struct FWCMD_COMMON_ANON_246_REQUEST { + u16 tx_flow_control; + u16 rx_flow_control; +} __packed; + +struct FWCMD_COMMON_ANON_247_RESPONSE { + u32 rsvd0; +} __packed; + +union FWCMD_COMMON_ANON_245_PARAMS { + struct FWCMD_COMMON_ANON_246_REQUEST request; + struct FWCMD_COMMON_ANON_247_RESPONSE response; +} __packed; + +/* + * This comand is used to program BladeEngine flow control behavior. + * Only the host networking driver is allowed to use this comand. + */ +struct FWCMD_COMMON_SET_FLOW_CONTROL { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_245_PARAMS params; +} __packed; + +struct FWCMD_COMMON_ANON_249_REQUEST { + u32 rsvd0; +} __packed; + +struct FWCMD_COMMON_ANON_250_RESPONSE { + u16 tx_flow_control; + u16 rx_flow_control; +} __packed; + +union FWCMD_COMMON_ANON_248_PARAMS { + struct FWCMD_COMMON_ANON_249_REQUEST request; + struct FWCMD_COMMON_ANON_250_RESPONSE response; +} __packed; + +/* This comand is used to read BladeEngine flow control settings. */ +struct FWCMD_COMMON_GET_FLOW_CONTROL { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_248_PARAMS params; +} __packed; + +struct EQ_DELAY_PARAMS { + u32 eq_id; + u32 delay_in_microseconds; +} __packed; + +struct FWCMD_COMMON_ANON_257_REQUEST { + u32 num_eq; + u32 rsvd0; + struct EQ_DELAY_PARAMS delay[16]; +} __packed; + +struct FWCMD_COMMON_ANON_258_RESPONSE { + u32 delay_resolution_in_microseconds; + u32 delay_max_in_microseconds; +} __packed; + +union MODIFY_EQ_DELAY_PARAMS { + struct FWCMD_COMMON_ANON_257_REQUEST request; + struct FWCMD_COMMON_ANON_258_RESPONSE response; +} __packed; + +/* This comand changes the EQ delay for a given set of EQs. */ +struct FWCMD_COMMON_MODIFY_EQ_DELAY { + union FWCMD_HEADER header; + union MODIFY_EQ_DELAY_PARAMS params; +} __packed; + +struct FWCMD_COMMON_ANON_260_REQUEST { + u32 rsvd0; +} __packed; + +struct BE_FIRMWARE_CONFIG { + u16 be_config_number; + u16 asic_revision; + u32 nic_ulp_mask; + u32 tulp_mask; + u32 iscsi_ulp_mask; + u32 rdma_ulp_mask; + u32 rsvd0[4]; + u32 eth_tx_id_start; + u32 eth_tx_id_count; + u32 eth_rx_id_start; + u32 eth_rx_id_count; + u32 tpm_wrbq_id_start; + u32 tpm_wrbq_id_count; + u32 tpm_defq_id_start; + u32 tpm_defq_id_count; + u32 iscsi_wrbq_id_start; + u32 iscsi_wrbq_id_count; + u32 iscsi_defq_id_start; + u32 iscsi_defq_id_count; + u32 rdma_qp_id_start; + u32 rdma_qp_id_count; + u32 rsvd1[8]; +} __packed; + +union FWCMD_COMMON_ANON_259_PARAMS { + struct FWCMD_COMMON_ANON_260_REQUEST request; + struct BE_FIRMWARE_CONFIG response; +} __packed; + +/* + * This comand queries the current firmware configuration parameters. + * The static configuration type is defined by be_config_number. This + * differentiates different BladeEngine builds, such as iSCSI Initiator + * versus iSCSI Target. For a given static configuration, the Upper + * Layer Protocol (ULP) processors may be reconfigured to support different + * protocols. Each ULP processor supports one or more protocols. The + * masks indicate which processors are configured for each protocol. + * For a given static configuration, the number of TCP connections + * supported for each protocol may vary. The *_id_start and *_id_count + * variables define a linear range of IDs that are available for each + * supported protocol. The *_id_count may be used by the driver to allocate + * the appropriate number of connection resources. The *_id_start may + * be used to map the arbitrary range of IDs to a zero-based range + * of indices. + */ +struct FWCMD_COMMON_FIRMWARE_CONFIG { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_259_PARAMS params; +} __packed; + +struct FWCMD_COMMON_PORT_EQUALIZATION_PARAMS { + u32 emph_lev_sel_port0; + u32 emph_lev_sel_port1; + u8 xaui_vo_sel; + u8 xaui_state; + u16 rsvd0; + u32 xaui_eq_vector; +} __packed; + +struct FWCMD_COMMON_ANON_262_REQUEST { + u32 rsvd0; +} __packed; + +union FWCMD_COMMON_ANON_261_PARAMS { + struct FWCMD_COMMON_ANON_262_REQUEST request; + struct FWCMD_COMMON_PORT_EQUALIZATION_PARAMS response; +} __packed; + +/* + * This comand can be used to read XAUI equalization parameters. The + * ARM firmware applies default equalization parameters during initialization. + * These parameters may be customer-specific when derived from the + * SEEPROM. See SEEPROM_DATA for equalization specific fields. + */ +struct FWCMD_COMMON_GET_PORT_EQUALIZATION { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_261_PARAMS params; +} __packed; + +struct FWCMD_COMMON_ANON_264_RESPONSE { + u32 rsvd0; +} __packed; + +union FWCMD_COMMON_ANON_263_PARAMS { + struct FWCMD_COMMON_PORT_EQUALIZATION_PARAMS request; + struct FWCMD_COMMON_ANON_264_RESPONSE response; +} __packed; + +/* + * This comand can be used to set XAUI equalization parameters. The ARM + * firmware applies default equalization parameters during initialization. + * These parameters may be customer-specific when derived from the + * SEEPROM. See SEEPROM_DATA for equalization specific fields. + */ +struct FWCMD_COMMON_SET_PORT_EQUALIZATION { + union FWCMD_HEADER header; + union FWCMD_COMMON_ANON_263_PARAMS params; +} __packed; + +#endif /* __fwcmd_common_bmap_h__ */ diff --git a/trunk/drivers/staging/benet/fwcmd_eth_bmap.h b/trunk/drivers/staging/benet/fwcmd_eth_bmap.h new file mode 100644 index 000000000000..234b179eace6 --- /dev/null +++ b/trunk/drivers/staging/benet/fwcmd_eth_bmap.h @@ -0,0 +1,280 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __fwcmd_eth_bmap_h__ +#define __fwcmd_eth_bmap_h__ +#include "fwcmd_hdr_bmap.h" +#include "fwcmd_types_bmap.h" + +struct MIB_ETH_STATISTICS_PARAMS_IN { + u32 rsvd0; +} __packed; + +struct BE_RXF_STATS { + u32 p0recvdtotalbytesLSD; /* DWORD 0 */ + u32 p0recvdtotalbytesMSD; /* DWORD 1 */ + u32 p0recvdtotalframes; /* DWORD 2 */ + u32 p0recvdunicastframes; /* DWORD 3 */ + u32 p0recvdmulticastframes; /* DWORD 4 */ + u32 p0recvdbroadcastframes; /* DWORD 5 */ + u32 p0crcerrors; /* DWORD 6 */ + u32 p0alignmentsymerrs; /* DWORD 7 */ + u32 p0pauseframesrecvd; /* DWORD 8 */ + u32 p0controlframesrecvd; /* DWORD 9 */ + u32 p0inrangelenerrors; /* DWORD 10 */ + u32 p0outrangeerrors; /* DWORD 11 */ + u32 p0frametoolongerrors; /* DWORD 12 */ + u32 p0droppedaddressmatch; /* DWORD 13 */ + u32 p0droppedvlanmismatch; /* DWORD 14 */ + u32 p0ipdroppedtoosmall; /* DWORD 15 */ + u32 p0ipdroppedtooshort; /* DWORD 16 */ + u32 p0ipdroppedhdrtoosmall; /* DWORD 17 */ + u32 p0tcpdroppedlen; /* DWORD 18 */ + u32 p0droppedrunt; /* DWORD 19 */ + u32 p0recvd64; /* DWORD 20 */ + u32 p0recvd65_127; /* DWORD 21 */ + u32 p0recvd128_256; /* DWORD 22 */ + u32 p0recvd256_511; /* DWORD 23 */ + u32 p0recvd512_1023; /* DWORD 24 */ + u32 p0recvd1518_1522; /* DWORD 25 */ + u32 p0recvd1522_2047; /* DWORD 26 */ + u32 p0recvd2048_4095; /* DWORD 27 */ + u32 p0recvd4096_8191; /* DWORD 28 */ + u32 p0recvd8192_9216; /* DWORD 29 */ + u32 p0rcvdipcksmerrs; /* DWORD 30 */ + u32 p0recvdtcpcksmerrs; /* DWORD 31 */ + u32 p0recvdudpcksmerrs; /* DWORD 32 */ + u32 p0recvdnonrsspackets; /* DWORD 33 */ + u32 p0recvdippackets; /* DWORD 34 */ + u32 p0recvdchute1packets; /* DWORD 35 */ + u32 p0recvdchute2packets; /* DWORD 36 */ + u32 p0recvdchute3packets; /* DWORD 37 */ + u32 p0recvdipsecpackets; /* DWORD 38 */ + u32 p0recvdmanagementpackets; /* DWORD 39 */ + u32 p0xmitbyteslsd; /* DWORD 40 */ + u32 p0xmitbytesmsd; /* DWORD 41 */ + u32 p0xmitunicastframes; /* DWORD 42 */ + u32 p0xmitmulticastframes; /* DWORD 43 */ + u32 p0xmitbroadcastframes; /* DWORD 44 */ + u32 p0xmitpauseframes; /* DWORD 45 */ + u32 p0xmitcontrolframes; /* DWORD 46 */ + u32 p0xmit64; /* DWORD 47 */ + u32 p0xmit65_127; /* DWORD 48 */ + u32 p0xmit128_256; /* DWORD 49 */ + u32 p0xmit256_511; /* DWORD 50 */ + u32 p0xmit512_1023; /* DWORD 51 */ + u32 p0xmit1518_1522; /* DWORD 52 */ + u32 p0xmit1522_2047; /* DWORD 53 */ + u32 p0xmit2048_4095; /* DWORD 54 */ + u32 p0xmit4096_8191; /* DWORD 55 */ + u32 p0xmit8192_9216; /* DWORD 56 */ + u32 p0rxfifooverflowdropped; /* DWORD 57 */ + u32 p0ipseclookupfaileddropped; /* DWORD 58 */ + u32 p1recvdtotalbytesLSD; /* DWORD 59 */ + u32 p1recvdtotalbytesMSD; /* DWORD 60 */ + u32 p1recvdtotalframes; /* DWORD 61 */ + u32 p1recvdunicastframes; /* DWORD 62 */ + u32 p1recvdmulticastframes; /* DWORD 63 */ + u32 p1recvdbroadcastframes; /* DWORD 64 */ + u32 p1crcerrors; /* DWORD 65 */ + u32 p1alignmentsymerrs; /* DWORD 66 */ + u32 p1pauseframesrecvd; /* DWORD 67 */ + u32 p1controlframesrecvd; /* DWORD 68 */ + u32 p1inrangelenerrors; /* DWORD 69 */ + u32 p1outrangeerrors; /* DWORD 70 */ + u32 p1frametoolongerrors; /* DWORD 71 */ + u32 p1droppedaddressmatch; /* DWORD 72 */ + u32 p1droppedvlanmismatch; /* DWORD 73 */ + u32 p1ipdroppedtoosmall; /* DWORD 74 */ + u32 p1ipdroppedtooshort; /* DWORD 75 */ + u32 p1ipdroppedhdrtoosmall; /* DWORD 76 */ + u32 p1tcpdroppedlen; /* DWORD 77 */ + u32 p1droppedrunt; /* DWORD 78 */ + u32 p1recvd64; /* DWORD 79 */ + u32 p1recvd65_127; /* DWORD 80 */ + u32 p1recvd128_256; /* DWORD 81 */ + u32 p1recvd256_511; /* DWORD 82 */ + u32 p1recvd512_1023; /* DWORD 83 */ + u32 p1recvd1518_1522; /* DWORD 84 */ + u32 p1recvd1522_2047; /* DWORD 85 */ + u32 p1recvd2048_4095; /* DWORD 86 */ + u32 p1recvd4096_8191; /* DWORD 87 */ + u32 p1recvd8192_9216; /* DWORD 88 */ + u32 p1rcvdipcksmerrs; /* DWORD 89 */ + u32 p1recvdtcpcksmerrs; /* DWORD 90 */ + u32 p1recvdudpcksmerrs; /* DWORD 91 */ + u32 p1recvdnonrsspackets; /* DWORD 92 */ + u32 p1recvdippackets; /* DWORD 93 */ + u32 p1recvdchute1packets; /* DWORD 94 */ + u32 p1recvdchute2packets; /* DWORD 95 */ + u32 p1recvdchute3packets; /* DWORD 96 */ + u32 p1recvdipsecpackets; /* DWORD 97 */ + u32 p1recvdmanagementpackets; /* DWORD 98 */ + u32 p1xmitbyteslsd; /* DWORD 99 */ + u32 p1xmitbytesmsd; /* DWORD 100 */ + u32 p1xmitunicastframes; /* DWORD 101 */ + u32 p1xmitmulticastframes; /* DWORD 102 */ + u32 p1xmitbroadcastframes; /* DWORD 103 */ + u32 p1xmitpauseframes; /* DWORD 104 */ + u32 p1xmitcontrolframes; /* DWORD 105 */ + u32 p1xmit64; /* DWORD 106 */ + u32 p1xmit65_127; /* DWORD 107 */ + u32 p1xmit128_256; /* DWORD 108 */ + u32 p1xmit256_511; /* DWORD 109 */ + u32 p1xmit512_1023; /* DWORD 110 */ + u32 p1xmit1518_1522; /* DWORD 111 */ + u32 p1xmit1522_2047; /* DWORD 112 */ + u32 p1xmit2048_4095; /* DWORD 113 */ + u32 p1xmit4096_8191; /* DWORD 114 */ + u32 p1xmit8192_9216; /* DWORD 115 */ + u32 p1rxfifooverflowdropped; /* DWORD 116 */ + u32 p1ipseclookupfaileddropped; /* DWORD 117 */ + u32 pxdroppednopbuf; /* DWORD 118 */ + u32 pxdroppednotxpb; /* DWORD 119 */ + u32 pxdroppednoipsecbuf; /* DWORD 120 */ + u32 pxdroppednoerxdescr; /* DWORD 121 */ + u32 pxdroppednotpredescr; /* DWORD 122 */ + u32 pxrecvdmanagementportpackets; /* DWORD 123 */ + u32 pxrecvdmanagementportbytes; /* DWORD 124 */ + u32 pxrecvdmanagementportpauseframes; /* DWORD 125 */ + u32 pxrecvdmanagementporterrors; /* DWORD 126 */ + u32 pxxmitmanagementportpackets; /* DWORD 127 */ + u32 pxxmitmanagementportbytes; /* DWORD 128 */ + u32 pxxmitmanagementportpause; /* DWORD 129 */ + u32 pxxmitmanagementportrxfifooverflow; /* DWORD 130 */ + u32 pxrecvdipsecipcksmerrs; /* DWORD 131 */ + u32 pxrecvdtcpsecipcksmerrs; /* DWORD 132 */ + u32 pxrecvdudpsecipcksmerrs; /* DWORD 133 */ + u32 pxipsecrunt; /* DWORD 134 */ + u32 pxipsecaddressmismatchdropped; /* DWORD 135 */ + u32 pxipsecrxfifooverflowdropped; /* DWORD 136 */ + u32 pxipsecframestoolong; /* DWORD 137 */ + u32 pxipsectotalipframes; /* DWORD 138 */ + u32 pxipseciptoosmall; /* DWORD 139 */ + u32 pxipseciptooshort; /* DWORD 140 */ + u32 pxipseciphdrtoosmall; /* DWORD 141 */ + u32 pxipsectcphdrbad; /* DWORD 142 */ + u32 pxrecvdipsecchute1; /* DWORD 143 */ + u32 pxrecvdipsecchute2; /* DWORD 144 */ + u32 pxrecvdipsecchute3; /* DWORD 145 */ + u32 pxdropped7frags; /* DWORD 146 */ + u32 pxdroppedfrags; /* DWORD 147 */ + u32 pxdroppedinvalidfragring; /* DWORD 148 */ + u32 pxnumforwardedpackets; /* DWORD 149 */ +} __packed; + +union MIB_ETH_STATISTICS_PARAMS { + struct MIB_ETH_STATISTICS_PARAMS_IN request; + struct BE_RXF_STATS response; +} __packed; + +/* + * Query ethernet statistics. All domains may issue this command. The + * host domain drivers may optionally reset internal statistic counters + * with a query. + */ +struct FWCMD_ETH_GET_STATISTICS { + union FWCMD_HEADER header; + union MIB_ETH_STATISTICS_PARAMS params; +} __packed; + + +struct FWCMD_ETH_ANON_175_REQUEST { + u8 port0_promiscuous; + u8 port1_promiscuous; + u16 rsvd0; +} __packed; + +struct FWCMD_ETH_ANON_176_RESPONSE { + u32 rsvd0; +} __packed; + +union FWCMD_ETH_ANON_174_PARAMS { + struct FWCMD_ETH_ANON_175_REQUEST request; + struct FWCMD_ETH_ANON_176_RESPONSE response; +} __packed; + +/* Enables/Disables promiscuous ethernet receive mode. */ +struct FWCMD_ETH_PROMISCUOUS { + union FWCMD_HEADER header; + union FWCMD_ETH_ANON_174_PARAMS params; +} __packed; + +struct FWCMD_ETH_ANON_178_REQUEST { + u32 new_fragsize_log2; +} __packed; + +struct FWCMD_ETH_ANON_179_RESPONSE { + u32 actual_fragsize_log2; +} __packed; + +union FWCMD_ETH_ANON_177_PARAMS { + struct FWCMD_ETH_ANON_178_REQUEST request; + struct FWCMD_ETH_ANON_179_RESPONSE response; +} __packed; + +/* + * Sets the Ethernet RX fragment size. Only host (domain 0) networking + * drivers may issue this command. This call will fail for non-host + * protection domains. In this situation the MCC CQ status will indicate + * a failure due to insufficient priviledges. The response should be + * ignored, and the driver should use the FWCMD_ETH_GET_FRAG_SIZE to + * query the existing ethernet receive fragment size. It must use this + * fragment size for all fragments in the ethernet receive ring. If + * the command succeeds, the driver must use the frag size indicated + * in the command response since the requested frag size may not be applied + * until the next reboot. When the requested fragsize matches the response + * fragsize, this indicates the request was applied immediately. + */ +struct FWCMD_ETH_SET_RX_FRAG_SIZE { + union FWCMD_HEADER header; + union FWCMD_ETH_ANON_177_PARAMS params; +} __packed; + +struct FWCMD_ETH_ANON_181_REQUEST { + u32 rsvd0; +} __packed; + +struct FWCMD_ETH_ANON_182_RESPONSE { + u32 actual_fragsize_log2; +} __packed; + +union FWCMD_ETH_ANON_180_PARAMS { + struct FWCMD_ETH_ANON_181_REQUEST request; + struct FWCMD_ETH_ANON_182_RESPONSE response; +} __packed; + +/* + * Queries the Ethernet RX fragment size. All domains may issue this + * command. The driver should call this command to determine the minimum + * required fragment size for the ethernet RX ring buffers. Drivers + * may choose to use a larger size for each fragment buffer, but BladeEngine + * will use up to the configured minimum required fragsize in each ethernet + * receive fragment buffer. For example, if the ethernet receive fragment + * size is configured to 4kB, and a driver uses 8kB fragments, a 6kB + * ethernet packet received by BladeEngine will be split accross two + * of the driver's receive framgents (4kB in one fragment buffer, and + * 2kB in the subsequent fragment buffer). + */ +struct FWCMD_ETH_GET_RX_FRAG_SIZE { + union FWCMD_HEADER header; + union FWCMD_ETH_ANON_180_PARAMS params; +} __packed; + +#endif /* __fwcmd_eth_bmap_h__ */ diff --git a/trunk/drivers/staging/benet/fwcmd_hdr_bmap.h b/trunk/drivers/staging/benet/fwcmd_hdr_bmap.h new file mode 100644 index 000000000000..28b45328fe7b --- /dev/null +++ b/trunk/drivers/staging/benet/fwcmd_hdr_bmap.h @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __fwcmd_hdr_bmap_h__ +#define __fwcmd_hdr_bmap_h__ + +struct FWCMD_REQUEST_HEADER { + u8 opcode; + u8 subsystem; + u8 port_number; + u8 domain; + u32 timeout; + u32 request_length; + u32 rsvd0; +} __packed; + +struct FWCMD_RESPONSE_HEADER { + u8 opcode; + u8 subsystem; + u8 rsvd0; + u8 domain; + u8 status; + u8 additional_status; + u16 rsvd1; + u32 response_length; + u32 actual_response_length; +} __packed; + +/* + * The firmware/driver overwrites the input FWCMD_REQUEST_HEADER with + * the output FWCMD_RESPONSE_HEADER. + */ +union FWCMD_HEADER { + struct FWCMD_REQUEST_HEADER request; + struct FWCMD_RESPONSE_HEADER response; +} __packed; + +#endif /* __fwcmd_hdr_bmap_h__ */ diff --git a/trunk/drivers/staging/benet/fwcmd_mcc.h b/trunk/drivers/staging/benet/fwcmd_mcc.h new file mode 100644 index 000000000000..9eeca878c1fb --- /dev/null +++ b/trunk/drivers/staging/benet/fwcmd_mcc.h @@ -0,0 +1,94 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __fwcmd_mcc_amap_h__ +#define __fwcmd_mcc_amap_h__ +#include "fwcmd_opcodes.h" +/* + * Where applicable, a WRB, may contain a list of Scatter-gather elements. + * Each element supports a 64 bit address and a 32bit length field. + */ +struct BE_MCC_SGE_AMAP { + u8 pa_lo[32]; /* DWORD 0 */ + u8 pa_hi[32]; /* DWORD 1 */ + u8 length[32]; /* DWORD 2 */ +} __packed; +struct MCC_SGE_AMAP { + u32 dw[3]; +}; +/* + * The design of an MCC_SGE allows up to 19 elements to be embedded + * in a WRB, supporting 64KB data transfers (assuming a 4KB page size). + */ +struct BE_MCC_WRB_PAYLOAD_AMAP { + union { + struct BE_MCC_SGE_AMAP sgl[19]; + u8 embedded[59][32]; /* DWORD 0 */ + }; +} __packed; +struct MCC_WRB_PAYLOAD_AMAP { + u32 dw[59]; +}; + +/* + * This is the structure of the MCC Command WRB for commands + * sent to the Management Processing Unit (MPU). See section + * for usage in embedded and non-embedded modes. + */ +struct BE_MCC_WRB_AMAP { + u8 embedded; /* DWORD 0 */ + u8 rsvd0[2]; /* DWORD 0 */ + u8 sge_count[5]; /* DWORD 0 */ + u8 rsvd1[16]; /* DWORD 0 */ + u8 special[8]; /* DWORD 0 */ + u8 payload_length[32]; /* DWORD 1 */ + u8 tag[2][32]; /* DWORD 2 */ + u8 rsvd2[32]; /* DWORD 4 */ + struct BE_MCC_WRB_PAYLOAD_AMAP payload; +} __packed; +struct MCC_WRB_AMAP { + u32 dw[64]; +}; + +/* This is the structure of the MCC Completion queue entry */ +struct BE_MCC_CQ_ENTRY_AMAP { + u8 completion_status[16]; /* DWORD 0 */ + u8 extended_status[16]; /* DWORD 0 */ + u8 mcc_tag[2][32]; /* DWORD 1 */ + u8 rsvd0[27]; /* DWORD 3 */ + u8 consumed; /* DWORD 3 */ + u8 completed; /* DWORD 3 */ + u8 hpi_buffer_completion; /* DWORD 3 */ + u8 async_event; /* DWORD 3 */ + u8 valid; /* DWORD 3 */ +} __packed; +struct MCC_CQ_ENTRY_AMAP { + u32 dw[4]; +}; + +/* Mailbox structures used by the MPU during bootstrap */ +struct BE_MCC_MAILBOX_AMAP { + struct BE_MCC_WRB_AMAP wrb; + struct BE_MCC_CQ_ENTRY_AMAP cq; +} __packed; +struct MCC_MAILBOX_AMAP { + u32 dw[68]; +}; + +#endif /* __fwcmd_mcc_amap_h__ */ diff --git a/trunk/drivers/staging/benet/fwcmd_opcodes.h b/trunk/drivers/staging/benet/fwcmd_opcodes.h new file mode 100644 index 000000000000..23d569386b46 --- /dev/null +++ b/trunk/drivers/staging/benet/fwcmd_opcodes.h @@ -0,0 +1,244 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __fwcmd_opcodes_amap_h__ +#define __fwcmd_opcodes_amap_h__ + +/* + * --- FWCMD_SUBSYSTEMS --- + * The commands are grouped into the following subsystems. The subsystem + * code along with the opcode uniquely identify a particular fwcmd. + */ +#define FWCMD_SUBSYSTEM_RSVD (0) /* This subsystem is reserved. It is */ + /* never used. */ +#define FWCMD_SUBSYSTEM_COMMON (1) /* CMDs in this group are common to + * all subsystems. See + * COMMON_SUBSYSTEM_OPCODES for opcodes + * and Common Host Configuration CMDs + * for the FWCMD descriptions. + */ +#define FWCMD_SUBSYSTEM_COMMON_ISCSI (2) /* CMDs in this group are */ + /* + * common to Initiator and Target. See + * COMMON_ISCSI_SUBSYSTEM_OPCODES and + * Common iSCSI Initiator and Target + * CMDs for the command descriptions. + */ +#define FWCMD_SUBSYSTEM_ETH (3) /* This subsystem is used to + execute Ethernet commands. */ + +#define FWCMD_SUBSYSTEM_TPM (4) /* This subsystem is used + to execute TPM commands. */ +#define FWCMD_SUBSYSTEM_PXE_UNDI (5) /* This subsystem is used + * to execute PXE + * and UNDI specific commands. + */ + +#define FWCMD_SUBSYSTEM_ISCSI_INI (6) /* This subsystem is used to + execute ISCSI Initiator + specific commands. + */ +#define FWCMD_SUBSYSTEM_ISCSI_TGT (7) /* This subsystem is used + to execute iSCSI Target + specific commands.between + PTL and ARM firmware. + */ +#define FWCMD_SUBSYSTEM_MILI_PTL (8) /* This subsystem is used to + execute iSCSI Target specific + commands.between MILI + and PTL. */ +#define FWCMD_SUBSYSTEM_MILI_TMD (9) /* This subsystem is used to + execute iSCSI Target specific + commands between MILI + and TMD. */ +#define FWCMD_SUBSYSTEM_PROXY (11) /* This subsystem is used + to execute proxied commands + within the host at the + explicit request of a + non priviledged domain. + This 'subsystem' is entirely + virtual from the controller + and firmware perspective as + it is implemented in host + drivers. + */ + +/* + * --- COMMON_SUBSYSTEM_OPCODES --- + * These opcodes are common to both networking and storage PCI + * functions. They are used to reserve resources and configure + * BladeEngine. These opcodes all use the FWCMD_SUBSYSTEM_COMMON + * subsystem code. + */ +#define OPCODE_COMMON_NTWK_MAC_QUERY (1) +#define SUBSYSTEM_COMMON_NTWK_MAC_QUERY (1) +#define SUBSYSTEM_COMMON_NTWK_MAC_SET (1) +#define SUBSYSTEM_COMMON_NTWK_MULTICAST_SET (1) +#define SUBSYSTEM_COMMON_NTWK_VLAN_CONFIG (1) +#define SUBSYSTEM_COMMON_NTWK_LINK_STATUS_QUERY (1) +#define SUBSYSTEM_COMMON_READ_FLASHROM (1) +#define SUBSYSTEM_COMMON_WRITE_FLASHROM (1) +#define SUBSYSTEM_COMMON_QUERY_MAX_FWCMD_BUFFER_SIZE (1) +#define SUBSYSTEM_COMMON_ADD_PAGE_TABLES (1) +#define SUBSYSTEM_COMMON_REMOVE_PAGE_TABLES (1) +#define SUBSYSTEM_COMMON_RING_DESTROY (1) +#define SUBSYSTEM_COMMON_CQ_CREATE (1) +#define SUBSYSTEM_COMMON_EQ_CREATE (1) +#define SUBSYSTEM_COMMON_ETH_RX_CREATE (1) +#define SUBSYSTEM_COMMON_ETH_TX_CREATE (1) +#define SUBSYSTEM_COMMON_ISCSI_DEFQ_CREATE (1) +#define SUBSYSTEM_COMMON_ISCSI_WRBQ_CREATE (1) +#define SUBSYSTEM_COMMON_MCC_CREATE (1) +#define SUBSYSTEM_COMMON_JELL_CONFIG (1) +#define SUBSYSTEM_COMMON_FORCE_FAILOVER (1) +#define SUBSYSTEM_COMMON_ADD_TEMPLATE_HEADER_BUFFERS (1) +#define SUBSYSTEM_COMMON_REMOVE_TEMPLATE_HEADER_BUFFERS (1) +#define SUBSYSTEM_COMMON_POST_ZERO_BUFFER (1) +#define SUBSYSTEM_COMMON_GET_QOS (1) +#define SUBSYSTEM_COMMON_SET_QOS (1) +#define SUBSYSTEM_COMMON_TCP_GET_STATISTICS (1) +#define SUBSYSTEM_COMMON_SEEPROM_READ (1) +#define SUBSYSTEM_COMMON_TCP_STATE_QUERY (1) +#define SUBSYSTEM_COMMON_GET_CNTL_ATTRIBUTES (1) +#define SUBSYSTEM_COMMON_NOP (1) +#define SUBSYSTEM_COMMON_NTWK_RX_FILTER (1) +#define SUBSYSTEM_COMMON_GET_FW_VERSION (1) +#define SUBSYSTEM_COMMON_SET_FLOW_CONTROL (1) +#define SUBSYSTEM_COMMON_GET_FLOW_CONTROL (1) +#define SUBSYSTEM_COMMON_SET_TCP_PARAMETERS (1) +#define SUBSYSTEM_COMMON_SET_FRAME_SIZE (1) +#define SUBSYSTEM_COMMON_GET_FAT (1) +#define SUBSYSTEM_COMMON_MODIFY_EQ_DELAY (1) +#define SUBSYSTEM_COMMON_FIRMWARE_CONFIG (1) +#define SUBSYSTEM_COMMON_ENABLE_DISABLE_DOMAINS (1) +#define SUBSYSTEM_COMMON_GET_DOMAIN_CONFIG (1) +#define SUBSYSTEM_COMMON_SET_VLD_CONFIG (1) +#define SUBSYSTEM_COMMON_GET_VLD_CONFIG (1) +#define SUBSYSTEM_COMMON_GET_PORT_EQUALIZATION (1) +#define SUBSYSTEM_COMMON_SET_PORT_EQUALIZATION (1) +#define SUBSYSTEM_COMMON_RED_CONFIG (1) +#define OPCODE_COMMON_NTWK_MAC_SET (2) +#define OPCODE_COMMON_NTWK_MULTICAST_SET (3) +#define OPCODE_COMMON_NTWK_VLAN_CONFIG (4) +#define OPCODE_COMMON_NTWK_LINK_STATUS_QUERY (5) +#define OPCODE_COMMON_READ_FLASHROM (6) +#define OPCODE_COMMON_WRITE_FLASHROM (7) +#define OPCODE_COMMON_QUERY_MAX_FWCMD_BUFFER_SIZE (8) +#define OPCODE_COMMON_ADD_PAGE_TABLES (9) +#define OPCODE_COMMON_REMOVE_PAGE_TABLES (10) +#define OPCODE_COMMON_RING_DESTROY (11) +#define OPCODE_COMMON_CQ_CREATE (12) +#define OPCODE_COMMON_EQ_CREATE (13) +#define OPCODE_COMMON_ETH_RX_CREATE (14) +#define OPCODE_COMMON_ETH_TX_CREATE (15) +#define OPCODE_COMMON_NET_RESERVED0 (16) /* Reserved */ +#define OPCODE_COMMON_NET_RESERVED1 (17) /* Reserved */ +#define OPCODE_COMMON_NET_RESERVED2 (18) /* Reserved */ +#define OPCODE_COMMON_ISCSI_DEFQ_CREATE (19) +#define OPCODE_COMMON_ISCSI_WRBQ_CREATE (20) +#define OPCODE_COMMON_MCC_CREATE (21) +#define OPCODE_COMMON_JELL_CONFIG (22) +#define OPCODE_COMMON_FORCE_FAILOVER (23) +#define OPCODE_COMMON_ADD_TEMPLATE_HEADER_BUFFERS (24) +#define OPCODE_COMMON_REMOVE_TEMPLATE_HEADER_BUFFERS (25) +#define OPCODE_COMMON_POST_ZERO_BUFFER (26) +#define OPCODE_COMMON_GET_QOS (27) +#define OPCODE_COMMON_SET_QOS (28) +#define OPCODE_COMMON_TCP_GET_STATISTICS (29) +#define OPCODE_COMMON_SEEPROM_READ (30) +#define OPCODE_COMMON_TCP_STATE_QUERY (31) +#define OPCODE_COMMON_GET_CNTL_ATTRIBUTES (32) +#define OPCODE_COMMON_NOP (33) +#define OPCODE_COMMON_NTWK_RX_FILTER (34) +#define OPCODE_COMMON_GET_FW_VERSION (35) +#define OPCODE_COMMON_SET_FLOW_CONTROL (36) +#define OPCODE_COMMON_GET_FLOW_CONTROL (37) +#define OPCODE_COMMON_SET_TCP_PARAMETERS (38) +#define OPCODE_COMMON_SET_FRAME_SIZE (39) +#define OPCODE_COMMON_GET_FAT (40) +#define OPCODE_COMMON_MODIFY_EQ_DELAY (41) +#define OPCODE_COMMON_FIRMWARE_CONFIG (42) +#define OPCODE_COMMON_ENABLE_DISABLE_DOMAINS (43) +#define OPCODE_COMMON_GET_DOMAIN_CONFIG (44) +#define OPCODE_COMMON_SET_VLD_CONFIG (45) +#define OPCODE_COMMON_GET_VLD_CONFIG (46) +#define OPCODE_COMMON_GET_PORT_EQUALIZATION (47) +#define OPCODE_COMMON_SET_PORT_EQUALIZATION (48) +#define OPCODE_COMMON_RED_CONFIG (49) + + + +/* + * --- ETH_SUBSYSTEM_OPCODES --- + * These opcodes are used for configuring the Ethernet interfaces. These + * opcodes all use the FWCMD_SUBSYSTEM_ETH subsystem code. + */ +#define OPCODE_ETH_RSS_CONFIG (1) +#define OPCODE_ETH_ACPI_CONFIG (2) +#define SUBSYSTEM_ETH_RSS_CONFIG (3) +#define SUBSYSTEM_ETH_ACPI_CONFIG (3) +#define OPCODE_ETH_PROMISCUOUS (3) +#define SUBSYSTEM_ETH_PROMISCUOUS (3) +#define SUBSYSTEM_ETH_GET_STATISTICS (3) +#define SUBSYSTEM_ETH_GET_RX_FRAG_SIZE (3) +#define SUBSYSTEM_ETH_SET_RX_FRAG_SIZE (3) +#define OPCODE_ETH_GET_STATISTICS (4) +#define OPCODE_ETH_GET_RX_FRAG_SIZE (5) +#define OPCODE_ETH_SET_RX_FRAG_SIZE (6) + + + + + +/* + * --- MCC_STATUS_CODE --- + * These are the global status codes used by all subsystems + */ +#define MCC_STATUS_SUCCESS (0) /* Indicates a successful + completion of the command */ +#define MCC_STATUS_INSUFFICIENT_PRIVILEGES (1) /* The client does not have + sufficient privileges to + execute the command */ +#define MCC_STATUS_INVALID_PARAMETER (2) /* A parameter in the command + was invalid. The extended + status contains the index + of the parameter */ +#define MCC_STATUS_INSUFFICIENT_RESOURCES (3) /* There are insufficient + chip resources to execute + the command */ +#define MCC_STATUS_QUEUE_FLUSHING (4) /* The command is completing + because the queue was + getting flushed */ +#define MCC_STATUS_DMA_FAILED (5) /* The command is completing + with a DMA error */ + +/* + * --- MGMT_ERROR_CODES --- + * Error Codes returned in the status field of the FWCMD response header + */ +#define MGMT_STATUS_SUCCESS (0) /* The FWCMD completed + without errors */ +#define MGMT_STATUS_FAILED (1) /* Error status in the Status + field of the + struct FWCMD_RESPONSE_HEADER */ +#define MGMT_STATUS_ILLEGAL_REQUEST (2) /* Invalid FWCMD opcode */ +#define MGMT_STATUS_ILLEGAL_FIELD (3) /* Invalid parameter in + the FWCMD payload */ + +#endif /* __fwcmd_opcodes_amap_h__ */ diff --git a/trunk/drivers/staging/benet/fwcmd_types_bmap.h b/trunk/drivers/staging/benet/fwcmd_types_bmap.h new file mode 100644 index 000000000000..92217aff3a16 --- /dev/null +++ b/trunk/drivers/staging/benet/fwcmd_types_bmap.h @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __fwcmd_types_bmap_h__ +#define __fwcmd_types_bmap_h__ + +/* MAC address format */ +struct MAC_ADDRESS_FORMAT { + u16 SizeOfStructure; + u8 MACAddress[6]; +} __packed; + +#endif /* __fwcmd_types_bmap_h__ */ diff --git a/trunk/drivers/staging/benet/host_struct.h b/trunk/drivers/staging/benet/host_struct.h new file mode 100644 index 000000000000..3de6722b980f --- /dev/null +++ b/trunk/drivers/staging/benet/host_struct.h @@ -0,0 +1,182 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __host_struct_amap_h__ +#define __host_struct_amap_h__ +#include "be_cm.h" +#include "be_common.h" +#include "descriptors.h" + +/* --- EQ_COMPLETION_MAJOR_CODE_ENUM --- */ +#define EQ_MAJOR_CODE_COMPLETION (0) /* Completion event on a */ + /* qcompletion ueue. */ +#define EQ_MAJOR_CODE_ETH (1) /* Affiliated Ethernet Event. */ +#define EQ_MAJOR_CODE_RESERVED (2) /* Reserved */ +#define EQ_MAJOR_CODE_RDMA (3) /* Affiliated RDMA Event. */ +#define EQ_MAJOR_CODE_ISCSI (4) /* Affiliated ISCSI Event */ +#define EQ_MAJOR_CODE_UNAFFILIATED (5) /* Unaffiliated Event */ + +/* --- EQ_COMPLETION_MINOR_CODE_ENUM --- */ +#define EQ_MINOR_CODE_COMPLETION (0) /* Completion event on a */ + /* completion queue. */ +#define EQ_MINOR_CODE_OTHER (1) /* Other Event (TBD). */ + +/* Queue Entry Definition for all 4 byte event queue types. */ +struct BE_EQ_ENTRY_AMAP { + u8 Valid; /* DWORD 0 */ + u8 MajorCode[3]; /* DWORD 0 */ + u8 MinorCode[12]; /* DWORD 0 */ + u8 ResourceID[16]; /* DWORD 0 */ +} __packed; +struct EQ_ENTRY_AMAP { + u32 dw[1]; +}; + +/* + * --- ETH_EVENT_CODE --- + * These codes are returned by the MPU when one of these events has occurred, + * and the event is configured to report to an Event Queue when an event + * is detected. + */ +#define ETH_EQ_LINK_STATUS (0) /* Link status change event */ + /* detected. */ +#define ETH_EQ_WATERMARK (1) /* watermark event detected. */ +#define ETH_EQ_MAGIC_PKT (2) /* magic pkt event detected. */ +#define ETH_EQ_ACPI_PKT0 (3) /* ACPI interesting packet */ + /* detected. */ +#define ETH_EQ_ACPI_PKT1 (3) /* ACPI interesting packet */ + /* detected. */ +#define ETH_EQ_ACPI_PKT2 (3) /* ACPI interesting packet */ + /* detected. */ +#define ETH_EQ_ACPI_PKT3 (3) /* ACPI interesting packet */ + /* detected. */ + +/* + * --- ETH_TX_COMPL_STATUS_ENUM --- + * Status codes contained in Ethernet TX completion descriptors. + */ +#define ETH_COMP_VALID (0) +#define ETH_COMP_ERROR (1) +#define ETH_COMP_INVALID (15) + +/* + * --- ETH_TX_COMPL_PORT_ENUM --- + * Port indicator contained in Ethernet TX completion descriptors. + */ +#define ETH_COMP_PORT0 (0) +#define ETH_COMP_PORT1 (1) +#define ETH_COMP_MGMT (2) + +/* + * --- ETH_TX_COMPL_CT_ENUM --- + * Completion type indicator contained in Ethernet TX completion descriptors. + */ +#define ETH_COMP_ETH (0) + +/* + * Work request block that the driver issues to the chip for + * Ethernet transmissions. All control fields must be valid in each WRB for + * a message. The controller, as specified by the flags, optionally writes + * an entry to the Completion Ring and generate an event. + */ +struct BE_ETH_WRB_AMAP { + u8 frag_pa_hi[32]; /* DWORD 0 */ + u8 frag_pa_lo[32]; /* DWORD 1 */ + u8 complete; /* DWORD 2 */ + u8 event; /* DWORD 2 */ + u8 crc; /* DWORD 2 */ + u8 forward; /* DWORD 2 */ + u8 ipsec; /* DWORD 2 */ + u8 mgmt; /* DWORD 2 */ + u8 ipcs; /* DWORD 2 */ + u8 udpcs; /* DWORD 2 */ + u8 tcpcs; /* DWORD 2 */ + u8 lso; /* DWORD 2 */ + u8 last; /* DWORD 2 */ + u8 vlan; /* DWORD 2 */ + u8 dbg[3]; /* DWORD 2 */ + u8 hash_val[3]; /* DWORD 2 */ + u8 lso_mss[14]; /* DWORD 2 */ + u8 frag_len[16]; /* DWORD 3 */ + u8 vlan_tag[16]; /* DWORD 3 */ +} __packed; +struct ETH_WRB_AMAP { + u32 dw[4]; +}; + +/* This is an Ethernet transmit completion descriptor */ +struct BE_ETH_TX_COMPL_AMAP { + u8 user_bytes[16]; /* DWORD 0 */ + u8 nwh_bytes[8]; /* DWORD 0 */ + u8 lso; /* DWORD 0 */ + u8 rsvd0[7]; /* DWORD 0 */ + u8 wrb_index[16]; /* DWORD 1 */ + u8 ct[2]; /* DWORD 1 */ + u8 port[2]; /* DWORD 1 */ + u8 rsvd1[8]; /* DWORD 1 */ + u8 status[4]; /* DWORD 1 */ + u8 rsvd2[16]; /* DWORD 2 */ + u8 ringid[11]; /* DWORD 2 */ + u8 hash_val[4]; /* DWORD 2 */ + u8 valid; /* DWORD 2 */ + u8 rsvd3[32]; /* DWORD 3 */ +} __packed; +struct ETH_TX_COMPL_AMAP { + u32 dw[4]; +}; + +/* Ethernet Receive Buffer descriptor */ +struct BE_ETH_RX_D_AMAP { + u8 fragpa_hi[32]; /* DWORD 0 */ + u8 fragpa_lo[32]; /* DWORD 1 */ +} __packed; +struct ETH_RX_D_AMAP { + u32 dw[2]; +}; + +/* This is an Ethernet Receive Completion Descriptor */ +struct BE_ETH_RX_COMPL_AMAP { + u8 vlan_tag[16]; /* DWORD 0 */ + u8 pktsize[14]; /* DWORD 0 */ + u8 port; /* DWORD 0 */ + u8 rsvd0; /* DWORD 0 */ + u8 err; /* DWORD 1 */ + u8 rsshp; /* DWORD 1 */ + u8 ipf; /* DWORD 1 */ + u8 tcpf; /* DWORD 1 */ + u8 udpf; /* DWORD 1 */ + u8 ipcksm; /* DWORD 1 */ + u8 tcpcksm; /* DWORD 1 */ + u8 udpcksm; /* DWORD 1 */ + u8 macdst[6]; /* DWORD 1 */ + u8 vtp; /* DWORD 1 */ + u8 vtm; /* DWORD 1 */ + u8 fragndx[10]; /* DWORD 1 */ + u8 ct[2]; /* DWORD 1 */ + u8 ipsec; /* DWORD 1 */ + u8 numfrags[3]; /* DWORD 1 */ + u8 rsvd1[31]; /* DWORD 2 */ + u8 valid; /* DWORD 2 */ + u8 rsshash[32]; /* DWORD 3 */ +} __packed; +struct ETH_RX_COMPL_AMAP { + u32 dw[4]; +}; + +#endif /* __host_struct_amap_h__ */ diff --git a/trunk/drivers/staging/benet/hwlib.h b/trunk/drivers/staging/benet/hwlib.h new file mode 100644 index 000000000000..afedf4dc5903 --- /dev/null +++ b/trunk/drivers/staging/benet/hwlib.h @@ -0,0 +1,830 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#ifndef __hwlib_h__ +#define __hwlib_h__ + +#include +#include +#include +#include + +#include "regmap.h" /* srcgen array map output */ + +#include "asyncmesg.h" +#include "fwcmd_opcodes.h" +#include "post_codes.h" +#include "fwcmd_mcc.h" + +#include "fwcmd_types_bmap.h" +#include "fwcmd_common_bmap.h" +#include "fwcmd_eth_bmap.h" +#include "bestatus.h" +/* + * + * Macros for reading/writing a protection domain or CSR registers + * in BladeEngine. + */ +#define PD_READ(fo, field) ioread32((fo)->db_va + \ + offsetof(struct BE_PROTECTION_DOMAIN_DBMAP_AMAP, field)/8) + +#define PD_WRITE(fo, field, val) iowrite32(val, (fo)->db_va + \ + offsetof(struct BE_PROTECTION_DOMAIN_DBMAP_AMAP, field)/8) + +#define CSR_READ(fo, field) ioread32((fo)->csr_va + \ + offsetof(struct BE_BLADE_ENGINE_CSRMAP_AMAP, field)/8) + +#define CSR_WRITE(fo, field, val) iowrite32(val, (fo)->csr_va + \ + offsetof(struct BE_BLADE_ENGINE_CSRMAP_AMAP, field)/8) + +#define PCICFG0_READ(fo, field) ioread32((fo)->pci_va + \ + offsetof(struct BE_PCICFG0_CSRMAP_AMAP, field)/8) + +#define PCICFG0_WRITE(fo, field, val) iowrite32(val, (fo)->pci_va + \ + offsetof(struct BE_PCICFG0_CSRMAP_AMAP, field)/8) + +#define PCICFG1_READ(fo, field) ioread32((fo)->pci_va + \ + offsetof(struct BE_PCICFG1_CSRMAP_AMAP, field)/8) + +#define PCICFG1_WRITE(fo, field, val) iowrite32(val, (fo)->pci_va + \ + offsetof(struct BE_PCICFG1_CSRMAP_AMAP, field)/8) + +#ifdef BE_DEBUG +#define ASSERT(c) BUG_ON(!(c)); +#else +#define ASSERT(c) +#endif + +/* debug levels */ +enum BE_DEBUG_LEVELS { + DL_ALWAYS = 0, /* cannot be masked */ + DL_ERR = 0x1, /* errors that should never happen */ + DL_WARN = 0x2, /* something questionable. + recoverable errors */ + DL_NOTE = 0x4, /* infrequent, important debug info */ + DL_INFO = 0x8, /* debug information */ + DL_VERBOSE = 0x10, /* detailed info, such as buffer traces */ + BE_DL_MIN_VALUE = 0x1, /* this is the min value used */ + BE_DL_MAX_VALUE = 0x80 /* this is the higheset value used */ +} ; + +extern unsigned int trace_level; + +#define TRACE(lm, fmt, args...) { \ + if (trace_level & lm) { \ + printk(KERN_NOTICE "BE: %s:%d \n" fmt, \ + __FILE__ , __LINE__ , ## args); \ + } \ + } + +static inline unsigned int be_trace_set_level(unsigned int level) +{ + unsigned int old_level = trace_level; + trace_level = level; + return old_level; +} + +#define be_trace_get_level() trace_level +/* + * Returns number of pages spanned by the size of data + * starting at the given address. + */ +#define PAGES_SPANNED(_address, _size) \ + ((u32)((((size_t)(_address) & (PAGE_SIZE - 1)) + \ + (_size) + (PAGE_SIZE - 1)) >> PAGE_SHIFT)) +/* Byte offset into the page corresponding to given address */ +#define OFFSET_IN_PAGE(_addr_) ((size_t)(_addr_) & (PAGE_SIZE-1)) + +/* + * circular subtract. + * Returns a - b assuming a circular number system, where a and b are + * in range (0, maxValue-1). If a==b, zero is returned so the + * highest value possible with this subtraction is maxValue-1. + */ +static inline u32 be_subc(u32 a, u32 b, u32 max) +{ + ASSERT(a <= max && b <= max); + ASSERT(max > 0); + return a >= b ? (a - b) : (max - b + a); +} + +static inline u32 be_addc(u32 a, u32 b, u32 max) +{ + ASSERT(a < max); + ASSERT(max > 0); + return (max - a > b) ? (a + b) : (b + a - max); +} + +/* descriptor for a physically contiguous memory used for ring */ +struct ring_desc { + u32 length; /* length in bytes */ + void *va; /* virtual address */ + u64 pa; /* bus address */ +} ; + +/* + * This structure stores information about a ring shared between hardware + * and software. Each ring is allocated by the driver in the uncached + * extension and mapped into BladeEngine's unified table. + */ +struct mp_ring { + u32 pages; /* queue size in pages */ + u32 id; /* queue id assigned by beklib */ + u32 num; /* number of elements in queue */ + u32 cidx; /* consumer index */ + u32 pidx; /* producer index -- not used by most rings */ + u32 itemSize; /* size in bytes of one object */ + + void *va; /* The virtual address of the ring. + This should be last to allow 32 & 64 + bit debugger extensions to work. */ +} ; + +/*----------- amap bit filed get / set macros and functions -----*/ +/* + * Structures defined in the map header files (under fw/amap/) with names + * in the format BE__AMAP are pseudo structures with members + * of type u8. These structures are templates that are used in + * conjuntion with the structures with names in the format + * _AMAP to calculate the bit masks and bit offsets to get or set + * bit fields in structures. The structures _AMAP are arrays + * of 32 bits words and have the correct size. The following macros + * provide convenient ways to get and set the various members + * in the structures without using strucctures with bit fields. + * Always use the macros AMAP_GET_BITS_PTR and AMAP_SET_BITS_PTR + * macros to extract and set various members. + */ + +/* + * Returns the a bit mask for the register that is NOT shifted into location. + * That means return values always look like: 0x1, 0xFF, 0x7FF, etc... + */ +static inline u32 amap_mask(u32 bit_size) +{ + return bit_size == 32 ? 0xFFFFFFFF : (1 << bit_size) - 1; +} + +#define AMAP_BIT_MASK(_struct_, field) \ + amap_mask(AMAP_BIT_SIZE(_struct_, field)) + +/* + * non-optimized set bits function. First clears the bits and then assigns them. + * This does not require knowledge of the particular DWORD you are setting. + * e.g. AMAP_SET_BITS_PTR (struct, field1, &contextMemory, 123); + */ +static inline void +amap_set(void *ptr, u32 dw_offset, u32 mask, u32 offset, u32 value) +{ + u32 *dw = (u32 *)ptr; + *(dw + dw_offset) &= ~(mask << offset); + *(dw + dw_offset) |= (mask & value) << offset; +} + +#define AMAP_SET_BITS_PTR(_struct_, field, _structPtr_, val) \ + amap_set(_structPtr_, AMAP_WORD_OFFSET(_struct_, field),\ + AMAP_BIT_MASK(_struct_, field), \ + AMAP_BIT_OFFSET(_struct_, field), val) +/* + * Non-optimized routine that gets the bits without knowing the correct DWORD. + * e.g. fieldValue = AMAP_GET_BITS_PTR (struct, field1, &contextMemory); + */ +static inline u32 +amap_get(void *ptr, u32 dw_offset, u32 mask, u32 offset) +{ + u32 *dw = (u32 *)ptr; + return mask & (*(dw + dw_offset) >> offset); +} +#define AMAP_GET_BITS_PTR(_struct_, field, _structPtr_) \ + amap_get(_structPtr_, AMAP_WORD_OFFSET(_struct_, field), \ + AMAP_BIT_MASK(_struct_, field), \ + AMAP_BIT_OFFSET(_struct_, field)) + +/* Returns 0-31 representing bit offset within a DWORD of a bitfield. */ +#define AMAP_BIT_OFFSET(_struct_, field) \ + (offsetof(struct BE_ ## _struct_ ## _AMAP, field) % 32) + +/* Returns 0-n representing DWORD offset of bitfield within the structure. */ +#define AMAP_WORD_OFFSET(_struct_, field) \ + (offsetof(struct BE_ ## _struct_ ## _AMAP, field)/32) + +/* Returns size of bitfield in bits. */ +#define AMAP_BIT_SIZE(_struct_, field) \ + sizeof(((struct BE_ ## _struct_ ## _AMAP*)0)->field) + +struct be_mcc_wrb_response_copy { + u16 length; /* bytes in response */ + u16 fwcmd_offset; /* offset within the wrb of the response */ + void *va; /* user's va to copy response into */ + +} ; +typedef void (*mcc_wrb_cqe_callback) (void *context, int status, + struct MCC_WRB_AMAP *optional_wrb); +struct be_mcc_wrb_context { + + mcc_wrb_cqe_callback internal_cb; /* Function to call on + completion */ + void *internal_cb_context; /* Parameter to pass + to completion function */ + + mcc_wrb_cqe_callback cb; /* Function to call on completion */ + void *cb_context; /* Parameter to pass to completion function */ + + int *users_final_status; /* pointer to a local + variable for synchronous + commands */ + struct MCC_WRB_AMAP *wrb; /* pointer to original wrb for embedded + commands only */ + struct list_head next; /* links context structs together in + free list */ + + struct be_mcc_wrb_response_copy copy; /* Optional parameters to copy + embedded response to user's va */ + +#if defined(BE_DEBUG) + u16 subsystem, opcode; /* Track this FWCMD for debug builds. */ + struct MCC_WRB_AMAP *ring_wrb; + u32 consumed_count; +#endif +} ; + +/* + Represents a function object for network or storage. This + is used to manage per-function resources like MCC CQs, etc. +*/ +struct be_function_object { + + u32 magic; /*!< magic for detecting memory corruption. */ + + /* PCI BAR mapped addresses */ + u8 __iomem *csr_va; /* CSR */ + u8 __iomem *db_va; /* Door Bell */ + u8 __iomem *pci_va; /* PCI config space */ + u32 emulate; /* if set, MPU is not available. + Emulate everything. */ + u32 pend_queue_driving; /* if set, drive the queued WRBs + after releasing the WRB lock */ + + spinlock_t post_lock; /* lock for verifying one thread posting wrbs */ + spinlock_t cq_lock; /* lock for verifying one thread + processing cq */ + spinlock_t mcc_context_lock; /* lock for protecting mcc + context free list */ + unsigned long post_irq; + unsigned long cq_irq; + + u32 type; + u32 pci_function_number; + + struct be_mcc_object *mcc; /* mcc rings. */ + + struct { + struct MCC_MAILBOX_AMAP *va; /* VA to the mailbox */ + u64 pa; /* PA to the mailbox */ + u32 length; /* byte length of mailbox */ + + /* One default context struct used for posting at + * least one MCC_WRB + */ + struct be_mcc_wrb_context default_context; + bool default_context_allocated; + } mailbox; + + struct { + + /* Wake on lans configured. */ + u32 wol_bitmask; /* bits 0,1,2,3 are set if + corresponding index is enabled */ + } config; + + + struct BE_FIRMWARE_CONFIG fw_config; +} ; + +/* + Represents an Event Queue +*/ +struct be_eq_object { + u32 magic; + atomic_t ref_count; + + struct be_function_object *parent_function; + + struct list_head eq_list; + struct list_head cq_list_head; + + u32 eq_id; + void *cb_context; + +} ; + +/* + Manages a completion queue +*/ +struct be_cq_object { + u32 magic; + atomic_t ref_count; + + struct be_function_object *parent_function; + struct be_eq_object *eq_object; + + struct list_head cq_list; + struct list_head cqlist_for_eq; + + void *va; + u32 num_entries; + + void *cb_context; + + u32 cq_id; + +} ; + +/* + Manages an ethernet send queue +*/ +struct be_ethsq_object { + u32 magic; + + struct list_head list; + + struct be_function_object *parent_function; + struct be_cq_object *cq_object; + u32 bid; + +} ; + +/* +@brief + Manages an ethernet receive queue +*/ +struct be_ethrq_object { + u32 magic; + struct list_head list; + struct be_function_object *parent_function; + u32 rid; + struct be_cq_object *cq_object; + struct be_cq_object *rss_cq_object[4]; + +} ; + +/* + Manages an MCC +*/ +typedef void (*mcc_async_event_callback) (void *context, u32 event_code, + void *event); +struct be_mcc_object { + u32 magic; + + struct be_function_object *parent_function; + struct list_head mcc_list; + + struct be_cq_object *cq_object; + + /* Async event callback for MCC CQ. */ + mcc_async_event_callback async_cb; + void *async_context; + + struct { + struct be_mcc_wrb_context *base; + u32 num; + struct list_head list_head; + } wrb_context; + + struct { + struct ring_desc *rd; + struct mp_ring ring; + } sq; + + struct { + struct mp_ring ring; + } cq; + + u32 processing; /* flag indicating that one thread + is processing CQ */ + u32 rearm; /* doorbell rearm setting to make + sure the active processing thread */ + /* rearms the CQ if any of the threads requested it. */ + + struct list_head backlog; + u32 backlog_length; + u32 driving_backlog; + u32 consumed_index; + +} ; + + +/* Queue context header -- the required software information for + * queueing a WRB. + */ +struct be_queue_driver_context { + mcc_wrb_cqe_callback internal_cb; /* Function to call on + completion */ + void *internal_cb_context; /* Parameter to pass + to completion function */ + + mcc_wrb_cqe_callback cb; /* Function to call on completion */ + void *cb_context; /* Parameter to pass to completion function */ + + struct be_mcc_wrb_response_copy copy; /* Optional parameters to copy + embedded response to user's va */ + void *optional_fwcmd_va; + struct list_head list; + u32 bytes; +} ; + +/* + * Common MCC WRB header that all commands require. + */ +struct be_mcc_wrb_header { + u8 rsvd[offsetof(struct BE_MCC_WRB_AMAP, payload)/8]; +} ; + +/* + * All non embedded commands supported by hwlib functions only allow + * 1 SGE. This queue context handles them all. + */ +struct be_nonembedded_q_ctxt { + struct be_queue_driver_context context; + struct be_mcc_wrb_header wrb_header; + struct MCC_SGE_AMAP sge[1]; +} ; + +/* + * ------------------------------------------------------------------------ + * This section contains the specific queue struct for each command. + * The user could always provide a be_generic_q_ctxt but this is a + * rather large struct. By using the specific struct, memory consumption + * can be reduced. + * ------------------------------------------------------------------------ + */ + +struct be_link_status_q_ctxt { + struct be_queue_driver_context context; + struct be_mcc_wrb_header wrb_header; + struct FWCMD_COMMON_NTWK_LINK_STATUS_QUERY fwcmd; +} ; + +struct be_multicast_q_ctxt { + struct be_queue_driver_context context; + struct be_mcc_wrb_header wrb_header; + struct FWCMD_COMMON_NTWK_MULTICAST_SET fwcmd; +} ; + + +struct be_vlan_q_ctxt { + struct be_queue_driver_context context; + struct be_mcc_wrb_header wrb_header; + struct FWCMD_COMMON_NTWK_VLAN_CONFIG fwcmd; +} ; + +struct be_promiscuous_q_ctxt { + struct be_queue_driver_context context; + struct be_mcc_wrb_header wrb_header; + struct FWCMD_ETH_PROMISCUOUS fwcmd; +} ; + +struct be_force_failover_q_ctxt { + struct be_queue_driver_context context; + struct be_mcc_wrb_header wrb_header; + struct FWCMD_COMMON_FORCE_FAILOVER fwcmd; +} ; + + +struct be_rxf_filter_q_ctxt { + struct be_queue_driver_context context; + struct be_mcc_wrb_header wrb_header; + struct FWCMD_COMMON_NTWK_RX_FILTER fwcmd; +} ; + +struct be_eq_modify_delay_q_ctxt { + struct be_queue_driver_context context; + struct be_mcc_wrb_header wrb_header; + struct FWCMD_COMMON_MODIFY_EQ_DELAY fwcmd; +} ; + +/* + * The generic context is the largest size that would be required. + * It is the software context plus an entire WRB. + */ +struct be_generic_q_ctxt { + struct be_queue_driver_context context; + struct be_mcc_wrb_header wrb_header; + struct MCC_WRB_PAYLOAD_AMAP payload; +} ; + +/* + * Types for the BE_QUEUE_CONTEXT object. + */ +#define BE_QUEUE_INVALID (0) +#define BE_QUEUE_LINK_STATUS (0xA006) +#define BE_QUEUE_ETH_STATS (0xA007) +#define BE_QUEUE_TPM_STATS (0xA008) +#define BE_QUEUE_TCP_STATS (0xA009) +#define BE_QUEUE_MULTICAST (0xA00A) +#define BE_QUEUE_VLAN (0xA00B) +#define BE_QUEUE_RSS (0xA00C) +#define BE_QUEUE_FORCE_FAILOVER (0xA00D) +#define BE_QUEUE_PROMISCUOUS (0xA00E) +#define BE_QUEUE_WAKE_ON_LAN (0xA00F) +#define BE_QUEUE_NOP (0xA010) + +/* --- BE_FUNCTION_ENUM --- */ +#define BE_FUNCTION_TYPE_ISCSI (0) +#define BE_FUNCTION_TYPE_NETWORK (1) +#define BE_FUNCTION_TYPE_ARM (2) + +/* --- BE_ETH_TX_RING_TYPE_ENUM --- */ +#define BE_ETH_TX_RING_TYPE_FORWARDING (1) /* Ether ring for forwarding */ +#define BE_ETH_TX_RING_TYPE_STANDARD (2) /* Ether ring for sending */ + /* network packets. */ +#define BE_ETH_TX_RING_TYPE_BOUND (3) /* Ethernet ring for sending */ + /* network packets, bound */ + /* to a physical port. */ +/* + * ---------------------------------------------------------------------- + * API MACROS + * ---------------------------------------------------------------------- + */ +#define BE_FWCMD_NAME(_short_name_) struct FWCMD_##_short_name_ +#define BE_OPCODE_NAME(_short_name_) OPCODE_##_short_name_ +#define BE_SUBSYSTEM_NAME(_short_name_) SUBSYSTEM_##_short_name_ + + +#define BE_PREPARE_EMBEDDED_FWCMD(_pfob_, _wrb_, _short_name_) \ + ((BE_FWCMD_NAME(_short_name_) *) \ + be_function_prepare_embedded_fwcmd(_pfob_, _wrb_, \ + sizeof(BE_FWCMD_NAME(_short_name_)), \ + FIELD_SIZEOF(BE_FWCMD_NAME(_short_name_), params.request), \ + FIELD_SIZEOF(BE_FWCMD_NAME(_short_name_), params.response), \ + BE_OPCODE_NAME(_short_name_), \ + BE_SUBSYSTEM_NAME(_short_name_))); + +#define BE_PREPARE_NONEMBEDDED_FWCMD(_pfob_, _wrb_, _iva_, _ipa_, _short_name_)\ + ((BE_FWCMD_NAME(_short_name_) *) \ + be_function_prepare_nonembedded_fwcmd(_pfob_, _wrb_, (_iva_), (_ipa_), \ + sizeof(BE_FWCMD_NAME(_short_name_)), \ + FIELD_SIZEOF(BE_FWCMD_NAME(_short_name_), params.request), \ + FIELD_SIZEOF(BE_FWCMD_NAME(_short_name_), params.response), \ + BE_OPCODE_NAME(_short_name_), \ + BE_SUBSYSTEM_NAME(_short_name_))); + +int be_function_object_create(u8 __iomem *csr_va, u8 __iomem *db_va, + u8 __iomem *pci_va, u32 function_type, struct ring_desc *mailbox_rd, + struct be_function_object *pfob); + +int be_function_object_destroy(struct be_function_object *pfob); +int be_function_cleanup(struct be_function_object *pfob); + + +int be_function_get_fw_version(struct be_function_object *pfob, + struct FWCMD_COMMON_GET_FW_VERSION_RESPONSE_PAYLOAD *fw_version, + mcc_wrb_cqe_callback cb, void *cb_context); + + +int be_eq_modify_delay(struct be_function_object *pfob, + u32 num_eq, struct be_eq_object **eq_array, + u32 *eq_delay_array, mcc_wrb_cqe_callback cb, + void *cb_context, + struct be_eq_modify_delay_q_ctxt *q_ctxt); + + + +int be_eq_create(struct be_function_object *pfob, + struct ring_desc *rd, u32 eqe_size, u32 num_entries, + u32 watermark, u32 timer_delay, struct be_eq_object *eq_object); + +int be_eq_destroy(struct be_eq_object *eq); + +int be_cq_create(struct be_function_object *pfob, + struct ring_desc *rd, u32 length, + bool solicited_eventable, bool no_delay, + u32 wm_thresh, struct be_eq_object *eq_object, + struct be_cq_object *cq_object); + +int be_cq_destroy(struct be_cq_object *cq); + +int be_mcc_ring_create(struct be_function_object *pfob, + struct ring_desc *rd, u32 length, + struct be_mcc_wrb_context *context_array, + u32 num_context_entries, + struct be_cq_object *cq, struct be_mcc_object *mcc); +int be_mcc_ring_destroy(struct be_mcc_object *mcc_object); + +int be_mcc_process_cq(struct be_mcc_object *mcc_object, bool rearm); + +int be_mcc_add_async_event_callback(struct be_mcc_object *mcc_object, + mcc_async_event_callback cb, void *cb_context); + +int be_pci_soft_reset(struct be_function_object *pfob); + + +int be_drive_POST(struct be_function_object *pfob); + + +int be_eth_sq_create(struct be_function_object *pfob, + struct ring_desc *rd, u32 length_in_bytes, + u32 type, u32 ulp, struct be_cq_object *cq_object, + struct be_ethsq_object *eth_sq); + +struct be_eth_sq_parameters { + u32 port; + u32 rsvd0[2]; +} ; + +int be_eth_sq_create_ex(struct be_function_object *pfob, + struct ring_desc *rd, u32 length_in_bytes, + u32 type, u32 ulp, struct be_cq_object *cq_object, + struct be_eth_sq_parameters *ex_parameters, + struct be_ethsq_object *eth_sq); +int be_eth_sq_destroy(struct be_ethsq_object *eth_sq); + +int be_eth_set_flow_control(struct be_function_object *pfob, + bool txfc_enable, bool rxfc_enable); + +int be_eth_get_flow_control(struct be_function_object *pfob, + bool *txfc_enable, bool *rxfc_enable); +int be_eth_set_qos(struct be_function_object *pfob, u32 max_bps, u32 max_pps); + +int be_eth_get_qos(struct be_function_object *pfob, u32 *max_bps, u32 *max_pps); + +int be_eth_set_frame_size(struct be_function_object *pfob, + u32 *tx_frame_size, u32 *rx_frame_size); + +int be_eth_rq_create(struct be_function_object *pfob, + struct ring_desc *rd, struct be_cq_object *cq_object, + struct be_cq_object *bcmc_cq_object, + struct be_ethrq_object *eth_rq); + +int be_eth_rq_destroy(struct be_ethrq_object *eth_rq); + +int be_eth_rq_destroy_options(struct be_ethrq_object *eth_rq, bool flush, + mcc_wrb_cqe_callback cb, void *cb_context); +int be_eth_rq_set_frag_size(struct be_function_object *pfob, + u32 new_frag_size_bytes, u32 *actual_frag_size_bytes); +int be_eth_rq_get_frag_size(struct be_function_object *pfob, + u32 *frag_size_bytes); + +void *be_function_prepare_embedded_fwcmd(struct be_function_object *pfob, + struct MCC_WRB_AMAP *wrb, + u32 payload_length, u32 request_length, + u32 response_length, u32 opcode, u32 subsystem); +void *be_function_prepare_nonembedded_fwcmd(struct be_function_object *pfob, + struct MCC_WRB_AMAP *wrb, void *fwcmd_header_va, u64 fwcmd_header_pa, + u32 payload_length, u32 request_length, u32 response_length, + u32 opcode, u32 subsystem); + + +struct MCC_WRB_AMAP * +be_function_peek_mcc_wrb(struct be_function_object *pfob); + +int be_rxf_mac_address_read_write(struct be_function_object *pfob, + bool port1, bool mac1, bool mgmt, + bool write, bool permanent, u8 *mac_address, + mcc_wrb_cqe_callback cb, + void *cb_context); + +int be_rxf_multicast_config(struct be_function_object *pfob, + bool promiscuous, u32 num, u8 *mac_table, + mcc_wrb_cqe_callback cb, + void *cb_context, + struct be_multicast_q_ctxt *q_ctxt); + +int be_rxf_vlan_config(struct be_function_object *pfob, + bool promiscuous, u32 num, u16 *vlan_tag_array, + mcc_wrb_cqe_callback cb, void *cb_context, + struct be_vlan_q_ctxt *q_ctxt); + + +int be_rxf_link_status(struct be_function_object *pfob, + struct BE_LINK_STATUS *link_status, + mcc_wrb_cqe_callback cb, + void *cb_context, + struct be_link_status_q_ctxt *q_ctxt); + + +int be_rxf_query_eth_statistics(struct be_function_object *pfob, + struct FWCMD_ETH_GET_STATISTICS *va_for_fwcmd, + u64 pa_for_fwcmd, mcc_wrb_cqe_callback cb, + void *cb_context, + struct be_nonembedded_q_ctxt *q_ctxt); + +int be_rxf_promiscuous(struct be_function_object *pfob, + bool enable_port0, bool enable_port1, + mcc_wrb_cqe_callback cb, void *cb_context, + struct be_promiscuous_q_ctxt *q_ctxt); + + +int be_rxf_filter_config(struct be_function_object *pfob, + struct NTWK_RX_FILTER_SETTINGS *settings, + mcc_wrb_cqe_callback cb, + void *cb_context, + struct be_rxf_filter_q_ctxt *q_ctxt); + +/* + * ------------------------------------------------------ + * internal functions used by hwlib + * ------------------------------------------------------ + */ + + +int be_function_ring_destroy(struct be_function_object *pfob, + u32 id, u32 ring_type, mcc_wrb_cqe_callback cb, + void *cb_context, + mcc_wrb_cqe_callback internal_cb, + void *internal_callback_context); + +int be_function_post_mcc_wrb(struct be_function_object *pfob, + struct MCC_WRB_AMAP *wrb, + struct be_generic_q_ctxt *q_ctxt, + mcc_wrb_cqe_callback cb, void *cb_context, + mcc_wrb_cqe_callback internal_cb, + void *internal_cb_context, void *optional_fwcmd_va, + struct be_mcc_wrb_response_copy *response_copy); + +int be_function_queue_mcc_wrb(struct be_function_object *pfob, + struct be_generic_q_ctxt *q_ctxt); + +/* + * ------------------------------------------------------ + * MCC QUEUE + * ------------------------------------------------------ + */ + +int be_mpu_init_mailbox(struct be_function_object *pfob, struct ring_desc *rd); + + +struct MCC_WRB_AMAP * +_be_mpu_peek_ring_wrb(struct be_mcc_object *mcc, bool driving_queue); + +struct be_mcc_wrb_context * +_be_mcc_allocate_wrb_context(struct be_function_object *pfob); + +void _be_mcc_free_wrb_context(struct be_function_object *pfob, + struct be_mcc_wrb_context *context); + +int _be_mpu_post_wrb_mailbox(struct be_function_object *pfob, + struct MCC_WRB_AMAP *wrb, struct be_mcc_wrb_context *wrb_context); + +int _be_mpu_post_wrb_ring(struct be_mcc_object *mcc, + struct MCC_WRB_AMAP *wrb, struct be_mcc_wrb_context *wrb_context); + +void be_drive_mcc_wrb_queue(struct be_mcc_object *mcc); + + +/* + * ------------------------------------------------------ + * Ring Sizes + * ------------------------------------------------------ + */ +static inline u32 be_ring_encoding_to_length(u32 encoding, u32 object_size) +{ + + ASSERT(encoding != 1); /* 1 is rsvd */ + ASSERT(encoding < 16); + ASSERT(object_size > 0); + + if (encoding == 0) /* 32k deep */ + encoding = 16; + + return (1 << (encoding - 1)) * object_size; +} + +static inline +u32 be_ring_length_to_encoding(u32 length_in_bytes, u32 object_size) +{ + + u32 count, encoding; + + ASSERT(object_size > 0); + ASSERT(length_in_bytes % object_size == 0); + + count = length_in_bytes / object_size; + + ASSERT(count > 1); + ASSERT(count <= 32 * 1024); + ASSERT(length_in_bytes <= 8 * PAGE_SIZE); /* max ring size in UT */ + + encoding = __ilog2_u32(count) + 1; + + if (encoding == 16) + encoding = 0; /* 32k deep */ + + return encoding; +} + +void be_rd_to_pa_list(struct ring_desc *rd, struct PHYS_ADDR *pa_list, + u32 max_num); +#endif /* __hwlib_h__ */ diff --git a/trunk/drivers/staging/benet/mpu.c b/trunk/drivers/staging/benet/mpu.c new file mode 100644 index 000000000000..269cc11d3055 --- /dev/null +++ b/trunk/drivers/staging/benet/mpu.c @@ -0,0 +1,1364 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +#include +#include "hwlib.h" +#include "bestatus.h" + +static +inline void mp_ring_create(struct mp_ring *ring, u32 num, u32 size, void *va) +{ + ASSERT(ring); + memset(ring, 0, sizeof(struct mp_ring)); + ring->num = num; + ring->pages = DIV_ROUND_UP(num * size, PAGE_SIZE); + ring->itemSize = size; + ring->va = va; +} + +/* + * ----------------------------------------------------------------------- + * Interface for 2 index rings. i.e. consumer/producer rings + * -------------------------------------------------------------------------- + */ + +/* Returns number items pending on ring. */ +static inline u32 mp_ring_num_pending(struct mp_ring *ring) +{ + ASSERT(ring); + if (ring->num == 0) + return 0; + return be_subc(ring->pidx, ring->cidx, ring->num); +} + +/* Returns number items free on ring. */ +static inline u32 mp_ring_num_empty(struct mp_ring *ring) +{ + ASSERT(ring); + return ring->num - 1 - mp_ring_num_pending(ring); +} + +/* Consume 1 item */ +static inline void mp_ring_consume(struct mp_ring *ring) +{ + ASSERT(ring); + ASSERT(ring->pidx != ring->cidx); + + ring->cidx = be_addc(ring->cidx, 1, ring->num); +} + +/* Produce 1 item */ +static inline void mp_ring_produce(struct mp_ring *ring) +{ + ASSERT(ring); + ring->pidx = be_addc(ring->pidx, 1, ring->num); +} + +/* Consume count items */ +static inline void mp_ring_consume_multiple(struct mp_ring *ring, u32 count) +{ + ASSERT(ring); + ASSERT(mp_ring_num_pending(ring) >= count); + ring->cidx = be_addc(ring->cidx, count, ring->num); +} + +static inline void *mp_ring_item(struct mp_ring *ring, u32 index) +{ + ASSERT(ring); + ASSERT(index < ring->num); + ASSERT(ring->itemSize > 0); + return (u8 *) ring->va + index * ring->itemSize; +} + +/* Ptr to produce item */ +static inline void *mp_ring_producer_ptr(struct mp_ring *ring) +{ + ASSERT(ring); + return mp_ring_item(ring, ring->pidx); +} + +/* + * Returns a pointer to the current location in the ring. + * This is used for rings with 1 index. + */ +static inline void *mp_ring_current(struct mp_ring *ring) +{ + ASSERT(ring); + ASSERT(ring->pidx == 0); /* not used */ + + return mp_ring_item(ring, ring->cidx); +} + +/* + * Increment index for rings with only 1 index. + * This is used for rings with 1 index. + */ +static inline void *mp_ring_next(struct mp_ring *ring) +{ + ASSERT(ring); + ASSERT(ring->num > 0); + ASSERT(ring->pidx == 0); /* not used */ + + ring->cidx = be_addc(ring->cidx, 1, ring->num); + return mp_ring_current(ring); +} + +/* + This routine waits for a previously posted mailbox WRB to be completed. + Specifically it waits for the mailbox to say that it's ready to accept + more data by setting the LSB of the mailbox pd register to 1. + + pcontroller - The function object to post this data to + + IRQL < DISPATCH_LEVEL +*/ +static void be_mcc_mailbox_wait(struct be_function_object *pfob) +{ + struct MPU_MAILBOX_DB_AMAP mailbox_db; + u32 i = 0; + u32 ready; + + if (pfob->emulate) { + /* No waiting for mailbox in emulated mode. */ + return; + } + + mailbox_db.dw[0] = PD_READ(pfob, mcc_bootstrap_db); + ready = AMAP_GET_BITS_PTR(MPU_MAILBOX_DB, ready, &mailbox_db); + + while (ready == false) { + if ((++i & 0x3FFFF) == 0) { + TRACE(DL_WARN, "Waiting for mailbox ready - %dk polls", + i / 1000); + } + udelay(1); + mailbox_db.dw[0] = PD_READ(pfob, mcc_bootstrap_db); + ready = AMAP_GET_BITS_PTR(MPU_MAILBOX_DB, ready, &mailbox_db); + } +} + +/* + This routine tells the MCC mailbox that there is data to processed + in the mailbox. It does this by setting the physical address for the + mailbox location and clearing the LSB. This routine returns immediately + and does not wait for the WRB to be processed. + + pcontroller - The function object to post this data to + + IRQL < DISPATCH_LEVEL + +*/ +static void be_mcc_mailbox_notify(struct be_function_object *pfob) +{ + struct MPU_MAILBOX_DB_AMAP mailbox_db; + u32 pa; + + ASSERT(pfob->mailbox.pa); + ASSERT(pfob->mailbox.va); + + /* If emulated, do not ring the mailbox */ + if (pfob->emulate) { + TRACE(DL_WARN, "MPU disabled. Skipping mailbox notify."); + return; + } + + /* form the higher bits in the address */ + mailbox_db.dw[0] = 0; /* init */ + AMAP_SET_BITS_PTR(MPU_MAILBOX_DB, hi, &mailbox_db, 1); + AMAP_SET_BITS_PTR(MPU_MAILBOX_DB, ready, &mailbox_db, 0); + + /* bits 34 to 63 */ + pa = (u32) (pfob->mailbox.pa >> 34); + AMAP_SET_BITS_PTR(MPU_MAILBOX_DB, address, &mailbox_db, pa); + + /* Wait for the MPU to be ready */ + be_mcc_mailbox_wait(pfob); + + /* Ring doorbell 1st time */ + PD_WRITE(pfob, mcc_bootstrap_db, mailbox_db.dw[0]); + + /* Wait for 1st write to be acknowledged. */ + be_mcc_mailbox_wait(pfob); + + /* lower bits 30 bits from 4th bit (bits 4 to 33)*/ + pa = (u32) (pfob->mailbox.pa >> 4) & 0x3FFFFFFF; + + AMAP_SET_BITS_PTR(MPU_MAILBOX_DB, hi, &mailbox_db, 0); + AMAP_SET_BITS_PTR(MPU_MAILBOX_DB, ready, &mailbox_db, 0); + AMAP_SET_BITS_PTR(MPU_MAILBOX_DB, address, &mailbox_db, pa); + + /* Ring doorbell 2nd time */ + PD_WRITE(pfob, mcc_bootstrap_db, mailbox_db.dw[0]); +} + +/* + This routine tells the MCC mailbox that there is data to processed + in the mailbox. It does this by setting the physical address for the + mailbox location and clearing the LSB. This routine spins until the + MPU writes a 1 into the LSB indicating that the data has been received + and is ready to be processed. + + pcontroller - The function object to post this data to + + IRQL < DISPATCH_LEVEL +*/ +static void +be_mcc_mailbox_notify_and_wait(struct be_function_object *pfob) +{ + /* + * Notify it + */ + be_mcc_mailbox_notify(pfob); + /* + * Now wait for completion of WRB + */ + be_mcc_mailbox_wait(pfob); +} + +void +be_mcc_process_cqe(struct be_function_object *pfob, + struct MCC_CQ_ENTRY_AMAP *cqe) +{ + struct be_mcc_wrb_context *wrb_context = NULL; + u32 offset, status; + u8 *p; + + ASSERT(cqe); + /* + * A command completed. Commands complete out-of-order. + * Determine which command completed from the TAG. + */ + offset = offsetof(struct BE_MCC_CQ_ENTRY_AMAP, mcc_tag)/8; + p = (u8 *) cqe + offset; + wrb_context = (struct be_mcc_wrb_context *)(void *)(size_t)(*(u64 *)p); + ASSERT(wrb_context); + + /* + * Perform a response copy if requested. + * Only copy data if the FWCMD is successful. + */ + status = AMAP_GET_BITS_PTR(MCC_CQ_ENTRY, completion_status, cqe); + if (status == MGMT_STATUS_SUCCESS && wrb_context->copy.length > 0) { + ASSERT(wrb_context->wrb); + ASSERT(wrb_context->copy.va); + p = (u8 *)wrb_context->wrb + + offsetof(struct BE_MCC_WRB_AMAP, payload)/8; + memcpy(wrb_context->copy.va, + (u8 *)p + wrb_context->copy.fwcmd_offset, + wrb_context->copy.length); + } + + if (status) + status = BE_NOT_OK; + /* internal callback */ + if (wrb_context->internal_cb) { + wrb_context->internal_cb(wrb_context->internal_cb_context, + status, wrb_context->wrb); + } + + /* callback */ + if (wrb_context->cb) { + wrb_context->cb(wrb_context->cb_context, + status, wrb_context->wrb); + } + /* Free the context structure */ + _be_mcc_free_wrb_context(pfob, wrb_context); +} + +void be_drive_mcc_wrb_queue(struct be_mcc_object *mcc) +{ + struct be_function_object *pfob = NULL; + int status = BE_PENDING; + struct be_generic_q_ctxt *q_ctxt; + struct MCC_WRB_AMAP *wrb; + struct MCC_WRB_AMAP *queue_wrb; + u32 length, payload_length, sge_count, embedded; + unsigned long irql; + + BUILD_BUG_ON((sizeof(struct be_generic_q_ctxt) < + sizeof(struct be_queue_driver_context) + + sizeof(struct MCC_WRB_AMAP))); + pfob = mcc->parent_function; + + spin_lock_irqsave(&pfob->post_lock, irql); + + if (mcc->driving_backlog) { + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return; + } + /* Acquire the flag to limit 1 thread to redrive posts. */ + mcc->driving_backlog = 1; + + while (!list_empty(&mcc->backlog)) { + wrb = _be_mpu_peek_ring_wrb(mcc, true); /* Driving the queue */ + if (!wrb) + break; /* No space in the ring yet. */ + /* Get the next queued entry to process. */ + q_ctxt = list_first_entry(&mcc->backlog, + struct be_generic_q_ctxt, context.list); + list_del(&q_ctxt->context.list); + pfob->mcc->backlog_length--; + /* + * Compute the required length of the WRB. + * Since the queue element may be smaller than + * the complete WRB, copy only the required number of bytes. + */ + queue_wrb = (struct MCC_WRB_AMAP *) &q_ctxt->wrb_header; + embedded = AMAP_GET_BITS_PTR(MCC_WRB, embedded, queue_wrb); + if (embedded) { + payload_length = AMAP_GET_BITS_PTR(MCC_WRB, + payload_length, queue_wrb); + length = sizeof(struct be_mcc_wrb_header) + + payload_length; + } else { + sge_count = AMAP_GET_BITS_PTR(MCC_WRB, sge_count, + queue_wrb); + ASSERT(sge_count == 1); /* only 1 frag. */ + length = sizeof(struct be_mcc_wrb_header) + + sge_count * sizeof(struct MCC_SGE_AMAP); + } + + /* + * Truncate the length based on the size of the + * queue element. Some elements that have output parameters + * can be smaller than the payload_length field would + * indicate. We really only need to copy the request + * parameters, not the response. + */ + length = min(length, (u32) (q_ctxt->context.bytes - + offsetof(struct be_generic_q_ctxt, wrb_header))); + + /* Copy the queue element WRB into the ring. */ + memcpy(wrb, &q_ctxt->wrb_header, length); + + /* Post the wrb. This should not fail assuming we have + * enough context structs. */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, + q_ctxt->context.cb, q_ctxt->context.cb_context, + q_ctxt->context.internal_cb, + q_ctxt->context.internal_cb_context, + q_ctxt->context.optional_fwcmd_va, + &q_ctxt->context.copy); + + if (status == BE_SUCCESS) { + /* + * Synchronous completion. Since it was queued, + * we will invoke the callback. + * To the user, this is an asynchronous request. + */ + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + + ASSERT(q_ctxt->context.cb); + + q_ctxt->context.cb( + q_ctxt->context.cb_context, + BE_SUCCESS, NULL); + + spin_lock_irqsave(&pfob->post_lock, irql); + + } else if (status != BE_PENDING) { + /* + * Another resource failed. Should never happen + * if we have sufficient MCC_WRB_CONTEXT structs. + * Return to head of the queue. + */ + TRACE(DL_WARN, "Failed to post a queued WRB. 0x%x", + status); + list_add(&q_ctxt->context.list, &mcc->backlog); + pfob->mcc->backlog_length++; + break; + } + } + + /* Free the flag to limit 1 thread to redrive posts. */ + mcc->driving_backlog = 0; + spin_unlock_irqrestore(&pfob->post_lock, irql); +} + +/* This function asserts that the WRB was consumed in order. */ +#ifdef BE_DEBUG +u32 be_mcc_wrb_consumed_in_order(struct be_mcc_object *mcc, + struct MCC_CQ_ENTRY_AMAP *cqe) +{ + struct be_mcc_wrb_context *wrb_context = NULL; + u32 wrb_index; + u32 wrb_consumed_in_order; + u32 offset; + u8 *p; + + ASSERT(cqe); + /* + * A command completed. Commands complete out-of-order. + * Determine which command completed from the TAG. + */ + offset = offsetof(struct BE_MCC_CQ_ENTRY_AMAP, mcc_tag)/8; + p = (u8 *) cqe + offset; + wrb_context = (struct be_mcc_wrb_context *)(void *)(size_t)(*(u64 *)p); + + ASSERT(wrb_context); + + wrb_index = (u32) (((u64)(size_t)wrb_context->ring_wrb - + (u64)(size_t)mcc->sq.ring.va) / sizeof(struct MCC_WRB_AMAP)); + + ASSERT(wrb_index < mcc->sq.ring.num); + + wrb_consumed_in_order = (u32) (wrb_index == mcc->consumed_index); + mcc->consumed_index = be_addc(mcc->consumed_index, 1, mcc->sq.ring.num); + return wrb_consumed_in_order; +} +#endif + +int be_mcc_process_cq(struct be_mcc_object *mcc, bool rearm) +{ + struct be_function_object *pfob = NULL; + struct MCC_CQ_ENTRY_AMAP *cqe; + struct CQ_DB_AMAP db; + struct mp_ring *cq_ring = &mcc->cq.ring; + struct mp_ring *mp_ring = &mcc->sq.ring; + u32 num_processed = 0; + u32 consumed = 0, valid, completed, cqe_consumed, async_event; + + pfob = mcc->parent_function; + + spin_lock_irqsave(&pfob->cq_lock, pfob->cq_irq); + + /* + * Verify that only one thread is processing the CQ at once. + * We cannot hold the lock while processing the CQ due to + * the callbacks into the OS. Therefore, this flag is used + * to control it. If any of the threads want to + * rearm the CQ, we need to honor that. + */ + if (mcc->processing != 0) { + mcc->rearm = mcc->rearm || rearm; + goto Error; + } else { + mcc->processing = 1; /* lock processing for this thread. */ + mcc->rearm = rearm; /* set our rearm setting */ + } + + spin_unlock_irqrestore(&pfob->cq_lock, pfob->cq_irq); + + cqe = mp_ring_current(cq_ring); + valid = AMAP_GET_BITS_PTR(MCC_CQ_ENTRY, valid, cqe); + while (valid) { + + if (num_processed >= 8) { + /* coalesce doorbells, but free space in cq + * ring while processing. */ + db.dw[0] = 0; /* clear */ + AMAP_SET_BITS_PTR(CQ_DB, qid, &db, cq_ring->id); + AMAP_SET_BITS_PTR(CQ_DB, rearm, &db, false); + AMAP_SET_BITS_PTR(CQ_DB, event, &db, false); + AMAP_SET_BITS_PTR(CQ_DB, num_popped, &db, + num_processed); + num_processed = 0; + + PD_WRITE(pfob, cq_db, db.dw[0]); + } + + async_event = AMAP_GET_BITS_PTR(MCC_CQ_ENTRY, async_event, cqe); + if (async_event) { + /* This is an asynchronous event. */ + struct ASYNC_EVENT_TRAILER_AMAP *async_trailer = + (struct ASYNC_EVENT_TRAILER_AMAP *) + ((u8 *) cqe + sizeof(struct MCC_CQ_ENTRY_AMAP) - + sizeof(struct ASYNC_EVENT_TRAILER_AMAP)); + u32 event_code; + async_event = AMAP_GET_BITS_PTR(ASYNC_EVENT_TRAILER, + async_event, async_trailer); + ASSERT(async_event == 1); + + + valid = AMAP_GET_BITS_PTR(ASYNC_EVENT_TRAILER, + valid, async_trailer); + ASSERT(valid == 1); + + /* Call the async event handler if it is installed. */ + if (mcc->async_cb) { + event_code = + AMAP_GET_BITS_PTR(ASYNC_EVENT_TRAILER, + event_code, async_trailer); + mcc->async_cb(mcc->async_context, + (u32) event_code, (void *) cqe); + } + + } else { + /* This is a completion entry. */ + + /* No vm forwarding in this driver. */ + + cqe_consumed = AMAP_GET_BITS_PTR(MCC_CQ_ENTRY, + consumed, cqe); + if (cqe_consumed) { + /* + * A command on the MCC ring was consumed. + * Update the consumer index. + * These occur in order. + */ + ASSERT(be_mcc_wrb_consumed_in_order(mcc, cqe)); + consumed++; + } + + completed = AMAP_GET_BITS_PTR(MCC_CQ_ENTRY, + completed, cqe); + if (completed) { + /* A command completed. Use tag to + * determine which command. */ + be_mcc_process_cqe(pfob, cqe); + } + } + + /* Reset the CQE */ + AMAP_SET_BITS_PTR(MCC_CQ_ENTRY, valid, cqe, false); + num_processed++; + + /* Update our tracking for the CQ ring. */ + cqe = mp_ring_next(cq_ring); + valid = AMAP_GET_BITS_PTR(MCC_CQ_ENTRY, valid, cqe); + } + + TRACE(DL_INFO, "num_processed:0x%x, and consumed:0x%x", + num_processed, consumed); + /* + * Grab the CQ lock to synchronize the "rearm" setting for + * the doorbell, and for clearing the "processing" flag. + */ + spin_lock_irqsave(&pfob->cq_lock, pfob->cq_irq); + + /* + * Rearm the cq. This is done based on the global mcc->rearm + * flag which combines the rearm parameter from the current + * call to process_cq and any other threads + * that tried to process the CQ while this one was active. + * This handles the situation where a sync. fwcmd was processing + * the CQ while the interrupt/dpc tries to process it. + * The sync process gets to continue -- but it is now + * responsible for the rearming. + */ + if (num_processed > 0 || mcc->rearm == true) { + db.dw[0] = 0; /* clear */ + AMAP_SET_BITS_PTR(CQ_DB, qid, &db, cq_ring->id); + AMAP_SET_BITS_PTR(CQ_DB, rearm, &db, mcc->rearm); + AMAP_SET_BITS_PTR(CQ_DB, event, &db, false); + AMAP_SET_BITS_PTR(CQ_DB, num_popped, &db, num_processed); + + PD_WRITE(pfob, cq_db, db.dw[0]); + } + /* + * Update the consumer index after ringing the CQ doorbell. + * We don't want another thread to post more WRBs before we + * have CQ space available. + */ + mp_ring_consume_multiple(mp_ring, consumed); + + /* Clear the processing flag. */ + mcc->processing = 0; + +Error: + spin_unlock_irqrestore(&pfob->cq_lock, pfob->cq_irq); + /* + * Use the local variable to detect if the current thread + * holds the WRB post lock. If rearm is false, this is + * either a synchronous command, or the upper layer driver is polling + * from a thread. We do not drive the queue from that + * context since the driver may hold the + * wrb post lock already. + */ + if (rearm) + be_drive_mcc_wrb_queue(mcc); + else + pfob->pend_queue_driving = 1; + + return BE_SUCCESS; +} + +/* + *============================================================================ + * P U B L I C R O U T I N E S + *============================================================================ + */ + +/* + This routine creates an MCC object. This object contains an MCC send queue + and a CQ private to the MCC. + + pcontroller - Handle to a function object + + EqObject - EQ object that will be used to dispatch this MCC + + ppMccObject - Pointer to an internal Mcc Object returned. + + Returns BE_SUCCESS if successfull,, otherwise a useful error code + is returned. + + IRQL < DISPATCH_LEVEL + +*/ +int +be_mcc_ring_create(struct be_function_object *pfob, + struct ring_desc *rd, u32 length, + struct be_mcc_wrb_context *context_array, + u32 num_context_entries, + struct be_cq_object *cq, struct be_mcc_object *mcc) +{ + int status = 0; + + struct FWCMD_COMMON_MCC_CREATE *fwcmd = NULL; + struct MCC_WRB_AMAP *wrb = NULL; + u32 num_entries_encoded, n, i; + void *va = NULL; + unsigned long irql; + + if (length < sizeof(struct MCC_WRB_AMAP) * 2) { + TRACE(DL_ERR, "Invalid MCC ring length:%d", length); + return BE_NOT_OK; + } + /* + * Reduce the actual ring size to be less than the number + * of context entries. This ensures that we run out of + * ring WRBs first so the queuing works correctly. We never + * queue based on context structs. + */ + if (num_context_entries + 1 < + length / sizeof(struct MCC_WRB_AMAP) - 1) { + + u32 max_length = + (num_context_entries + 2) * sizeof(struct MCC_WRB_AMAP); + + if (is_power_of_2(max_length)) + length = __roundup_pow_of_two(max_length+1) / 2; + else + length = __roundup_pow_of_two(max_length) / 2; + + ASSERT(length <= max_length); + + TRACE(DL_WARN, + "MCC ring length reduced based on context entries." + " length:%d wrbs:%d context_entries:%d", length, + (int) (length / sizeof(struct MCC_WRB_AMAP)), + num_context_entries); + } + + spin_lock_irqsave(&pfob->post_lock, irql); + + num_entries_encoded = + be_ring_length_to_encoding(length, sizeof(struct MCC_WRB_AMAP)); + + /* Init MCC object. */ + memset(mcc, 0, sizeof(*mcc)); + mcc->parent_function = pfob; + mcc->cq_object = cq; + + INIT_LIST_HEAD(&mcc->backlog); + + wrb = be_function_peek_mcc_wrb(pfob); + if (!wrb) { + ASSERT(wrb); + TRACE(DL_ERR, "No free MCC WRBs in create EQ."); + status = BE_STATUS_NO_MCC_WRB; + goto error; + } + /* Prepares an embedded fwcmd, including request/response sizes. */ + fwcmd = BE_PREPARE_EMBEDDED_FWCMD(pfob, wrb, COMMON_MCC_CREATE); + + fwcmd->params.request.num_pages = DIV_ROUND_UP(length, PAGE_SIZE); + /* + * Program MCC ring context + */ + AMAP_SET_BITS_PTR(MCC_RING_CONTEXT, pdid, + &fwcmd->params.request.context, 0); + AMAP_SET_BITS_PTR(MCC_RING_CONTEXT, invalid, + &fwcmd->params.request.context, false); + AMAP_SET_BITS_PTR(MCC_RING_CONTEXT, ring_size, + &fwcmd->params.request.context, num_entries_encoded); + + n = cq->cq_id; + AMAP_SET_BITS_PTR(MCC_RING_CONTEXT, + cq_id, &fwcmd->params.request.context, n); + be_rd_to_pa_list(rd, fwcmd->params.request.pages, + ARRAY_SIZE(fwcmd->params.request.pages)); + /* Post the f/w command */ + status = be_function_post_mcc_wrb(pfob, wrb, NULL, NULL, NULL, + NULL, NULL, fwcmd, NULL); + if (status != BE_SUCCESS) { + TRACE(DL_ERR, "MCC to create CQ failed."); + goto error; + } + /* + * Create a linked list of context structures + */ + mcc->wrb_context.base = context_array; + mcc->wrb_context.num = num_context_entries; + INIT_LIST_HEAD(&mcc->wrb_context.list_head); + memset(context_array, 0, + sizeof(struct be_mcc_wrb_context) * num_context_entries); + for (i = 0; i < mcc->wrb_context.num; i++) { + list_add_tail(&context_array[i].next, + &mcc->wrb_context.list_head); + } + + /* + * + * Create an mcc_ring for tracking WRB hw ring + */ + va = rd->va; + ASSERT(va); + mp_ring_create(&mcc->sq.ring, length / sizeof(struct MCC_WRB_AMAP), + sizeof(struct MCC_WRB_AMAP), va); + mcc->sq.ring.id = fwcmd->params.response.id; + /* + * Init a mcc_ring for tracking the MCC CQ. + */ + ASSERT(cq->va); + mp_ring_create(&mcc->cq.ring, cq->num_entries, + sizeof(struct MCC_CQ_ENTRY_AMAP), cq->va); + mcc->cq.ring.id = cq->cq_id; + + /* Force zeroing of CQ. */ + memset(cq->va, 0, cq->num_entries * sizeof(struct MCC_CQ_ENTRY_AMAP)); + + /* Initialize debug index. */ + mcc->consumed_index = 0; + + atomic_inc(&cq->ref_count); + pfob->mcc = mcc; + + TRACE(DL_INFO, "MCC ring created. id:%d bytes:%d cq_id:%d cq_entries:%d" + " num_context:%d", mcc->sq.ring.id, length, + cq->cq_id, cq->num_entries, num_context_entries); + +error: + spin_unlock_irqrestore(&pfob->post_lock, irql); + if (pfob->pend_queue_driving && pfob->mcc) { + pfob->pend_queue_driving = 0; + be_drive_mcc_wrb_queue(pfob->mcc); + } + return status; +} + +/* + This routine destroys an MCC send queue + + MccObject - Internal Mcc Object to be destroyed. + + Returns BE_SUCCESS if successfull, otherwise an error code is returned. + + IRQL < DISPATCH_LEVEL + + The caller of this routine must ensure that no other WRB may be posted + until this routine returns. + +*/ +int be_mcc_ring_destroy(struct be_mcc_object *mcc) +{ + int status = 0; + struct be_function_object *pfob = mcc->parent_function; + + + ASSERT(mcc->processing == 0); + + /* + * Remove the ring from the function object. + * This transitions back to mailbox mode. + */ + pfob->mcc = NULL; + + /* Send fwcmd to destroy the queue. (Using the mailbox.) */ + status = be_function_ring_destroy(mcc->parent_function, mcc->sq.ring.id, + FWCMD_RING_TYPE_MCC, NULL, NULL, NULL, NULL); + ASSERT(status == 0); + + /* Release the SQ reference to the CQ */ + atomic_dec(&mcc->cq_object->ref_count); + + return status; +} + +static void +mcc_wrb_sync_cb(void *context, int staus, struct MCC_WRB_AMAP *wrb) +{ + struct be_mcc_wrb_context *wrb_context = + (struct be_mcc_wrb_context *) context; + ASSERT(wrb_context); + *wrb_context->users_final_status = staus; +} + +/* + This routine posts a command to the MCC send queue + + mcc - Internal Mcc Object to be destroyed. + + wrb - wrb to post. + + Returns BE_SUCCESS if successfull, otherwise an error code is returned. + + IRQL < DISPATCH_LEVEL if CompletionCallback is not NULL + IRQL <=DISPATCH_LEVEL if CompletionCallback is NULL + + If this routine is called with CompletionCallback != NULL the + call is considered to be asynchronous and will return as soon + as the WRB is posted to the MCC with BE_PENDING. + + If CompletionCallback is NULL, then this routine will not return until + a completion for this MCC command has been processed. + If called at DISPATCH_LEVEL the CompletionCallback must be NULL. + + This routine should only be called if the MPU has been boostraped past + mailbox mode. + + +*/ +int +_be_mpu_post_wrb_ring(struct be_mcc_object *mcc, struct MCC_WRB_AMAP *wrb, + struct be_mcc_wrb_context *wrb_context) +{ + + struct MCC_WRB_AMAP *ring_wrb = NULL; + int status = BE_PENDING; + int final_status = BE_PENDING; + mcc_wrb_cqe_callback cb = NULL; + struct MCC_DB_AMAP mcc_db; + u32 embedded; + + ASSERT(mp_ring_num_empty(&mcc->sq.ring) > 0); + /* + * Input wrb is most likely the next wrb in the ring, since the client + * can peek at the address. + */ + ring_wrb = mp_ring_producer_ptr(&mcc->sq.ring); + if (wrb != ring_wrb) { + /* If not equal, copy it into the ring. */ + memcpy(ring_wrb, wrb, sizeof(struct MCC_WRB_AMAP)); + } +#ifdef BE_DEBUG + wrb_context->ring_wrb = ring_wrb; +#endif + embedded = AMAP_GET_BITS_PTR(MCC_WRB, embedded, ring_wrb); + if (embedded) { + /* embedded commands will have the response within the WRB. */ + wrb_context->wrb = ring_wrb; + } else { + /* + * non-embedded commands will not have the response + * within the WRB, and they may complete out-of-order. + * The WRB will not be valid to inspect + * during the completion. + */ + wrb_context->wrb = NULL; + } + cb = wrb_context->cb; + + if (cb == NULL) { + /* Assign our internal callback if this is a + * synchronous call. */ + wrb_context->cb = mcc_wrb_sync_cb; + wrb_context->cb_context = wrb_context; + wrb_context->users_final_status = &final_status; + } + /* Increment producer index */ + + mcc_db.dw[0] = 0; /* initialize */ + AMAP_SET_BITS_PTR(MCC_DB, rid, &mcc_db, mcc->sq.ring.id); + AMAP_SET_BITS_PTR(MCC_DB, numPosted, &mcc_db, 1); + + mp_ring_produce(&mcc->sq.ring); + PD_WRITE(mcc->parent_function, mpu_mcc_db, mcc_db.dw[0]); + TRACE(DL_INFO, "pidx: %x and cidx: %x.", mcc->sq.ring.pidx, + mcc->sq.ring.cidx); + + if (cb == NULL) { + int polls = 0; /* At >= 1 us per poll */ + /* Wait until this command completes, polling the CQ. */ + do { + TRACE(DL_INFO, "FWCMD submitted in the poll mode."); + /* Do not rearm CQ in this context. */ + be_mcc_process_cq(mcc, false); + + if (final_status == BE_PENDING) { + if ((++polls & 0x7FFFF) == 0) { + TRACE(DL_WARN, + "Warning : polling MCC CQ for %d" + "ms.", polls / 1000); + } + + udelay(1); + } + + /* final_status changed when the command completes */ + } while (final_status == BE_PENDING); + + status = final_status; + } + + return status; +} + +struct MCC_WRB_AMAP * +_be_mpu_peek_ring_wrb(struct be_mcc_object *mcc, bool driving_queue) +{ + /* If we have queued items, do not allow a post to bypass the queue. */ + if (!driving_queue && !list_empty(&mcc->backlog)) + return NULL; + + if (mp_ring_num_empty(&mcc->sq.ring) <= 0) + return NULL; + return (struct MCC_WRB_AMAP *) mp_ring_producer_ptr(&mcc->sq.ring); +} + +int +be_mpu_init_mailbox(struct be_function_object *pfob, struct ring_desc *mailbox) +{ + ASSERT(mailbox); + pfob->mailbox.va = mailbox->va; + pfob->mailbox.pa = cpu_to_le64(mailbox->pa); + pfob->mailbox.length = mailbox->length; + + ASSERT(((u32)(size_t)pfob->mailbox.va & 0xf) == 0); + ASSERT(((u32)(size_t)pfob->mailbox.pa & 0xf) == 0); + /* + * Issue the WRB to set MPU endianness + */ + { + u64 *endian_check = (u64 *) (pfob->mailbox.va + + offsetof(struct BE_MCC_MAILBOX_AMAP, wrb)/8); + *endian_check = 0xFF1234FFFF5678FFULL; + } + + be_mcc_mailbox_notify_and_wait(pfob); + + return BE_SUCCESS; +} + + +/* + This routine posts a command to the MCC mailbox. + + FuncObj - Function Object to post the WRB on behalf of. + wrb - wrb to post. + CompletionCallback - Address of a callback routine to invoke once the WRB + is completed. + CompletionCallbackContext - Opaque context to be passed during the call to + the CompletionCallback. + Returns BE_SUCCESS if successfull, otherwise an error code is returned. + + IRQL <=DISPATCH_LEVEL if CompletionCallback is NULL + + This routine will block until a completion for this MCC command has been + processed. If called at DISPATCH_LEVEL the CompletionCallback must be NULL. + + This routine should only be called if the MPU has not been boostraped past + mailbox mode. +*/ +int +_be_mpu_post_wrb_mailbox(struct be_function_object *pfob, + struct MCC_WRB_AMAP *wrb, struct be_mcc_wrb_context *wrb_context) +{ + struct MCC_MAILBOX_AMAP *mailbox = NULL; + struct MCC_WRB_AMAP *mb_wrb; + struct MCC_CQ_ENTRY_AMAP *mb_cq; + u32 offset, status; + + ASSERT(pfob->mcc == NULL); + mailbox = pfob->mailbox.va; + ASSERT(mailbox); + + offset = offsetof(struct BE_MCC_MAILBOX_AMAP, wrb)/8; + mb_wrb = (struct MCC_WRB_AMAP *) (u8 *)mailbox + offset; + if (mb_wrb != wrb) { + memset(mailbox, 0, sizeof(*mailbox)); + memcpy(mb_wrb, wrb, sizeof(struct MCC_WRB_AMAP)); + } + /* The callback can inspect the final WRB to get output parameters. */ + wrb_context->wrb = mb_wrb; + + be_mcc_mailbox_notify_and_wait(pfob); + + /* A command completed. Use tag to determine which command. */ + offset = offsetof(struct BE_MCC_MAILBOX_AMAP, cq)/8; + mb_cq = (struct MCC_CQ_ENTRY_AMAP *) ((u8 *)mailbox + offset); + be_mcc_process_cqe(pfob, mb_cq); + + status = AMAP_GET_BITS_PTR(MCC_CQ_ENTRY, completion_status, mb_cq); + if (status) + status = BE_NOT_OK; + return status; +} + +struct be_mcc_wrb_context * +_be_mcc_allocate_wrb_context(struct be_function_object *pfob) +{ + struct be_mcc_wrb_context *context = NULL; + unsigned long irq; + + spin_lock_irqsave(&pfob->mcc_context_lock, irq); + + if (!pfob->mailbox.default_context_allocated) { + /* Use the single default context that we + * always have allocated. */ + pfob->mailbox.default_context_allocated = true; + context = &pfob->mailbox.default_context; + } else if (pfob->mcc) { + /* Get a context from the free list. If any are available. */ + if (!list_empty(&pfob->mcc->wrb_context.list_head)) { + context = list_first_entry( + &pfob->mcc->wrb_context.list_head, + struct be_mcc_wrb_context, next); + } + } + + spin_unlock_irqrestore(&pfob->mcc_context_lock, irq); + + return context; +} + +void +_be_mcc_free_wrb_context(struct be_function_object *pfob, + struct be_mcc_wrb_context *context) +{ + unsigned long irq; + + ASSERT(context); + /* + * Zero during free to try and catch any bugs where the context + * is accessed after a free. + */ + memset(context, 0, sizeof(context)); + + spin_lock_irqsave(&pfob->mcc_context_lock, irq); + + if (context == &pfob->mailbox.default_context) { + /* Free the default context. */ + ASSERT(pfob->mailbox.default_context_allocated); + pfob->mailbox.default_context_allocated = false; + } else { + /* Add to free list. */ + ASSERT(pfob->mcc); + list_add_tail(&context->next, + &pfob->mcc->wrb_context.list_head); + } + + spin_unlock_irqrestore(&pfob->mcc_context_lock, irq); +} + +int +be_mcc_add_async_event_callback(struct be_mcc_object *mcc_object, + mcc_async_event_callback cb, void *cb_context) +{ + /* Lock against anyone trying to change the callback/context pointers + * while being used. */ + spin_lock_irqsave(&mcc_object->parent_function->cq_lock, + mcc_object->parent_function->cq_irq); + + /* Assign the async callback. */ + mcc_object->async_context = cb_context; + mcc_object->async_cb = cb; + + spin_unlock_irqrestore(&mcc_object->parent_function->cq_lock, + mcc_object->parent_function->cq_irq); + + return BE_SUCCESS; +} + +#define MPU_EP_CONTROL 0 +#define MPU_EP_SEMAPHORE 0xac + +/* + *------------------------------------------------------------------- + * Function: be_wait_for_POST_complete + * Waits until the BladeEngine POST completes (either in error or success). + * pfob - + * return status - BE_SUCCESS (0) on success. Negative error code on failure. + *------------------------------------------------------------------- + */ +static int be_wait_for_POST_complete(struct be_function_object *pfob) +{ + struct MGMT_HBA_POST_STATUS_STRUCT_AMAP status; + int s; + u32 post_error, post_stage; + + const u32 us_per_loop = 1000; /* 1000us */ + const u32 print_frequency_loops = 1000000 / us_per_loop; + const u32 max_loops = 60 * print_frequency_loops; + u32 loops = 0; + + /* + * Wait for arm fw indicating it is done or a fatal error happened. + * Note: POST can take some time to complete depending on configuration + * settings (consider ARM attempts to acquire an IP address + * over DHCP!!!). + * + */ + do { + status.dw[0] = ioread32(pfob->csr_va + MPU_EP_SEMAPHORE); + post_error = AMAP_GET_BITS_PTR(MGMT_HBA_POST_STATUS_STRUCT, + error, &status); + post_stage = AMAP_GET_BITS_PTR(MGMT_HBA_POST_STATUS_STRUCT, + stage, &status); + if (0 == (loops % print_frequency_loops)) { + /* Print current status */ + TRACE(DL_INFO, "POST status = 0x%x (stage = 0x%x)", + status.dw[0], post_stage); + } + udelay(us_per_loop); + } while ((post_error != 1) && + (post_stage != POST_STAGE_ARMFW_READY) && + (++loops < max_loops)); + + if (post_error == 1) { + TRACE(DL_ERR, "POST error! Status = 0x%x (stage = 0x%x)", + status.dw[0], post_stage); + s = BE_NOT_OK; + } else if (post_stage != POST_STAGE_ARMFW_READY) { + TRACE(DL_ERR, "POST time-out! Status = 0x%x (stage = 0x%x)", + status.dw[0], post_stage); + s = BE_NOT_OK; + } else { + s = BE_SUCCESS; + } + return s; +} + +/* + *------------------------------------------------------------------- + * Function: be_kickoff_and_wait_for_POST + * Interacts with the BladeEngine management processor to initiate POST, and + * subsequently waits until POST completes (either in error or success). + * The caller must acquire the reset semaphore before initiating POST + * to prevent multiple drivers interacting with the management processor. + * Once POST is complete the caller must release the reset semaphore. + * Callers who only want to wait for POST complete may call + * be_wait_for_POST_complete. + * pfob - + * return status - BE_SUCCESS (0) on success. Negative error code on failure. + *------------------------------------------------------------------- + */ +static int +be_kickoff_and_wait_for_POST(struct be_function_object *pfob) +{ + struct MGMT_HBA_POST_STATUS_STRUCT_AMAP status; + int s; + + const u32 us_per_loop = 1000; /* 1000us */ + const u32 print_frequency_loops = 1000000 / us_per_loop; + const u32 max_loops = 5 * print_frequency_loops; + u32 loops = 0; + u32 post_error, post_stage; + + /* Wait for arm fw awaiting host ready or a fatal error happened. */ + TRACE(DL_INFO, "Wait for BladeEngine ready to POST"); + do { + status.dw[0] = ioread32(pfob->csr_va + MPU_EP_SEMAPHORE); + post_error = AMAP_GET_BITS_PTR(MGMT_HBA_POST_STATUS_STRUCT, + error, &status); + post_stage = AMAP_GET_BITS_PTR(MGMT_HBA_POST_STATUS_STRUCT, + stage, &status); + if (0 == (loops % print_frequency_loops)) { + /* Print current status */ + TRACE(DL_INFO, "POST status = 0x%x (stage = 0x%x)", + status.dw[0], post_stage); + } + udelay(us_per_loop); + } while ((post_error != 1) && + (post_stage < POST_STAGE_AWAITING_HOST_RDY) && + (++loops < max_loops)); + + if (post_error == 1) { + TRACE(DL_ERR, "Pre-POST error! Status = 0x%x (stage = 0x%x)", + status.dw[0], post_stage); + s = BE_NOT_OK; + } else if (post_stage == POST_STAGE_AWAITING_HOST_RDY) { + iowrite32(POST_STAGE_HOST_RDY, pfob->csr_va + MPU_EP_SEMAPHORE); + + /* Wait for POST to complete */ + s = be_wait_for_POST_complete(pfob); + } else { + /* + * Either a timeout waiting for host ready signal or POST has + * moved ahead without requiring a host ready signal. + * Might as well give POST a chance to complete + * (or timeout again). + */ + s = be_wait_for_POST_complete(pfob); + } + return s; +} + +/* + *------------------------------------------------------------------- + * Function: be_pci_soft_reset + * This function is called to issue a BladeEngine soft reset. + * Callers should acquire the soft reset semaphore before calling this + * function. Additionaly, callers should ensure they cannot be pre-empted + * while the routine executes. Upon completion of this routine, callers + * should release the reset semaphore. This routine implicitly waits + * for BladeEngine POST to complete. + * pfob - + * return status - BE_SUCCESS (0) on success. Negative error code on failure. + *------------------------------------------------------------------- + */ +int be_pci_soft_reset(struct be_function_object *pfob) +{ + struct PCICFG_SOFT_RESET_CSR_AMAP soft_reset; + struct PCICFG_ONLINE0_CSR_AMAP pciOnline0; + struct PCICFG_ONLINE1_CSR_AMAP pciOnline1; + struct EP_CONTROL_CSR_AMAP epControlCsr; + int status = BE_SUCCESS; + u32 i, soft_reset_bit; + + TRACE(DL_NOTE, "PCI reset..."); + + /* Issue soft reset #1 to get BladeEngine into a known state. */ + soft_reset.dw[0] = PCICFG0_READ(pfob, soft_reset); + AMAP_SET_BITS_PTR(PCICFG_SOFT_RESET_CSR, softreset, soft_reset.dw, 1); + PCICFG0_WRITE(pfob, host_timer_int_ctrl, soft_reset.dw[0]); + /* + * wait til soft reset is deasserted - hardware + * deasserts after some time. + */ + i = 0; + do { + udelay(50); + soft_reset.dw[0] = PCICFG0_READ(pfob, soft_reset); + soft_reset_bit = AMAP_GET_BITS_PTR(PCICFG_SOFT_RESET_CSR, + softreset, soft_reset.dw); + } while (soft_reset_bit && (i++ < 1024)); + if (soft_reset_bit != 0) { + TRACE(DL_ERR, "Soft-reset #1 did not deassert as expected."); + status = BE_NOT_OK; + goto Error_label; + } + /* Mask everything */ + PCICFG0_WRITE(pfob, ue_status_low_mask, 0xFFFFFFFF); + PCICFG0_WRITE(pfob, ue_status_hi_mask, 0xFFFFFFFF); + /* + * Set everything offline except MPU IRAM (it is offline with + * the soft-reset, but soft-reset does not reset the PCICFG registers!) + */ + pciOnline0.dw[0] = 0; + pciOnline1.dw[0] = 0; + AMAP_SET_BITS_PTR(PCICFG_ONLINE1_CSR, mpu_iram_online, + pciOnline1.dw, 1); + PCICFG0_WRITE(pfob, online0, pciOnline0.dw[0]); + PCICFG0_WRITE(pfob, online1, pciOnline1.dw[0]); + + udelay(20000); + + /* Issue soft reset #2. */ + AMAP_SET_BITS_PTR(PCICFG_SOFT_RESET_CSR, softreset, soft_reset.dw, 1); + PCICFG0_WRITE(pfob, host_timer_int_ctrl, soft_reset.dw[0]); + /* + * wait til soft reset is deasserted - hardware + * deasserts after some time. + */ + i = 0; + do { + udelay(50); + soft_reset.dw[0] = PCICFG0_READ(pfob, soft_reset); + soft_reset_bit = AMAP_GET_BITS_PTR(PCICFG_SOFT_RESET_CSR, + softreset, soft_reset.dw); + } while (soft_reset_bit && (i++ < 1024)); + if (soft_reset_bit != 0) { + TRACE(DL_ERR, "Soft-reset #1 did not deassert as expected."); + status = BE_NOT_OK; + goto Error_label; + } + + + udelay(20000); + + /* Take MPU out of reset. */ + + epControlCsr.dw[0] = ioread32(pfob->csr_va + MPU_EP_CONTROL); + AMAP_SET_BITS_PTR(EP_CONTROL_CSR, CPU_reset, &epControlCsr, 0); + iowrite32((u32)epControlCsr.dw[0], pfob->csr_va + MPU_EP_CONTROL); + + /* Kickoff BE POST and wait for completion */ + status = be_kickoff_and_wait_for_POST(pfob); + +Error_label: + return status; +} + + +/* + *------------------------------------------------------------------- + * Function: be_pci_reset_required + * This private function is called to detect if a host entity is + * required to issue a PCI soft reset and subsequently drive + * BladeEngine POST. Scenarios where this is required: + * 1) BIOS-less configuration + * 2) Hot-swap/plug/power-on + * pfob - + * return true if a reset is required, false otherwise + *------------------------------------------------------------------- + */ +static bool be_pci_reset_required(struct be_function_object *pfob) +{ + struct MGMT_HBA_POST_STATUS_STRUCT_AMAP status; + bool do_reset = false; + u32 post_error, post_stage; + + /* + * Read the POST status register + */ + status.dw[0] = ioread32(pfob->csr_va + MPU_EP_SEMAPHORE); + post_error = AMAP_GET_BITS_PTR(MGMT_HBA_POST_STATUS_STRUCT, error, + &status); + post_stage = AMAP_GET_BITS_PTR(MGMT_HBA_POST_STATUS_STRUCT, stage, + &status); + if (post_stage <= POST_STAGE_AWAITING_HOST_RDY) { + /* + * If BladeEngine is waiting for host ready indication, + * we want to do a PCI reset. + */ + do_reset = true; + } + + return do_reset; +} + +/* + *------------------------------------------------------------------- + * Function: be_drive_POST + * This function is called to drive BladeEngine POST. The + * caller should ensure they cannot be pre-empted while this routine executes. + * pfob - + * return status - BE_SUCCESS (0) on success. Negative error code on failure. + *------------------------------------------------------------------- + */ +int be_drive_POST(struct be_function_object *pfob) +{ + int status; + + if (false != be_pci_reset_required(pfob)) { + /* PCI reset is needed (implicitly starts and waits for POST) */ + status = be_pci_soft_reset(pfob); + } else { + /* No PCI reset is needed, start POST */ + status = be_kickoff_and_wait_for_POST(pfob); + } + + return status; +} diff --git a/trunk/drivers/staging/benet/mpu.h b/trunk/drivers/staging/benet/mpu.h new file mode 100644 index 000000000000..41f3f87516e5 --- /dev/null +++ b/trunk/drivers/staging/benet/mpu.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __mpu_amap_h__ +#define __mpu_amap_h__ +#include "ep.h" + +/* Provide control parameters for the Managment Processor Unit. */ +struct BE_MPU_CSRMAP_AMAP { + struct BE_EP_CSRMAP_AMAP ep; + u8 rsvd0[128]; /* DWORD 64 */ + u8 rsvd1[32]; /* DWORD 68 */ + u8 rsvd2[192]; /* DWORD 69 */ + u8 rsvd3[192]; /* DWORD 75 */ + u8 rsvd4[32]; /* DWORD 81 */ + u8 rsvd5[32]; /* DWORD 82 */ + u8 rsvd6[32]; /* DWORD 83 */ + u8 rsvd7[32]; /* DWORD 84 */ + u8 rsvd8[32]; /* DWORD 85 */ + u8 rsvd9[32]; /* DWORD 86 */ + u8 rsvd10[32]; /* DWORD 87 */ + u8 rsvd11[32]; /* DWORD 88 */ + u8 rsvd12[32]; /* DWORD 89 */ + u8 rsvd13[32]; /* DWORD 90 */ + u8 rsvd14[32]; /* DWORD 91 */ + u8 rsvd15[32]; /* DWORD 92 */ + u8 rsvd16[32]; /* DWORD 93 */ + u8 rsvd17[32]; /* DWORD 94 */ + u8 rsvd18[32]; /* DWORD 95 */ + u8 rsvd19[32]; /* DWORD 96 */ + u8 rsvd20[32]; /* DWORD 97 */ + u8 rsvd21[32]; /* DWORD 98 */ + u8 rsvd22[32]; /* DWORD 99 */ + u8 rsvd23[32]; /* DWORD 100 */ + u8 rsvd24[32]; /* DWORD 101 */ + u8 rsvd25[32]; /* DWORD 102 */ + u8 rsvd26[32]; /* DWORD 103 */ + u8 rsvd27[32]; /* DWORD 104 */ + u8 rsvd28[96]; /* DWORD 105 */ + u8 rsvd29[32]; /* DWORD 108 */ + u8 rsvd30[32]; /* DWORD 109 */ + u8 rsvd31[32]; /* DWORD 110 */ + u8 rsvd32[32]; /* DWORD 111 */ + u8 rsvd33[32]; /* DWORD 112 */ + u8 rsvd34[96]; /* DWORD 113 */ + u8 rsvd35[32]; /* DWORD 116 */ + u8 rsvd36[32]; /* DWORD 117 */ + u8 rsvd37[32]; /* DWORD 118 */ + u8 rsvd38[32]; /* DWORD 119 */ + u8 rsvd39[32]; /* DWORD 120 */ + u8 rsvd40[32]; /* DWORD 121 */ + u8 rsvd41[134][32]; /* DWORD 122 */ +} __packed; +struct MPU_CSRMAP_AMAP { + u32 dw[256]; +}; + +#endif /* __mpu_amap_h__ */ diff --git a/trunk/drivers/staging/benet/mpu_context.h b/trunk/drivers/staging/benet/mpu_context.h new file mode 100644 index 000000000000..8ce90f9c46c2 --- /dev/null +++ b/trunk/drivers/staging/benet/mpu_context.h @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __mpu_context_amap_h__ +#define __mpu_context_amap_h__ + +/* + * Management command and control ring context. The MPUs BTLR_CTRL1 CSR + * controls the writeback behavior of the producer and consumer index values. + */ +struct BE_MCC_RING_CONTEXT_AMAP { + u8 con_index[16]; /* DWORD 0 */ + u8 ring_size[4]; /* DWORD 0 */ + u8 cq_id[11]; /* DWORD 0 */ + u8 rsvd0; /* DWORD 0 */ + u8 prod_index[16]; /* DWORD 1 */ + u8 pdid[15]; /* DWORD 1 */ + u8 invalid; /* DWORD 1 */ + u8 cmd_pending_current[7]; /* DWORD 2 */ + u8 rsvd1[25]; /* DWORD 2 */ + u8 hpi_port_cq_id[11]; /* DWORD 3 */ + u8 rsvd2[5]; /* DWORD 3 */ + u8 cmd_pending_max[7]; /* DWORD 3 */ + u8 rsvd3[9]; /* DWORD 3 */ +} __packed; +struct MCC_RING_CONTEXT_AMAP { + u32 dw[4]; +}; + +#endif /* __mpu_context_amap_h__ */ diff --git a/trunk/drivers/staging/benet/pcicfg.h b/trunk/drivers/staging/benet/pcicfg.h new file mode 100644 index 000000000000..7c15684adf4a --- /dev/null +++ b/trunk/drivers/staging/benet/pcicfg.h @@ -0,0 +1,825 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __pcicfg_amap_h__ +#define __pcicfg_amap_h__ + +/* Vendor and Device ID Register. */ +struct BE_PCICFG_ID_CSR_AMAP { + u8 vendorid[16]; /* DWORD 0 */ + u8 deviceid[16]; /* DWORD 0 */ +} __packed; +struct PCICFG_ID_CSR_AMAP { + u32 dw[1]; +}; + +/* IO Bar Register. */ +struct BE_PCICFG_IOBAR_CSR_AMAP { + u8 iospace; /* DWORD 0 */ + u8 rsvd0[7]; /* DWORD 0 */ + u8 iobar[24]; /* DWORD 0 */ +} __packed; +struct PCICFG_IOBAR_CSR_AMAP { + u32 dw[1]; +}; + +/* Memory BAR 0 Register. */ +struct BE_PCICFG_MEMBAR0_CSR_AMAP { + u8 memspace; /* DWORD 0 */ + u8 type[2]; /* DWORD 0 */ + u8 pf; /* DWORD 0 */ + u8 rsvd0[10]; /* DWORD 0 */ + u8 membar0[18]; /* DWORD 0 */ +} __packed; +struct PCICFG_MEMBAR0_CSR_AMAP { + u32 dw[1]; +}; + +/* Memory BAR 1 - Low Address Register. */ +struct BE_PCICFG_MEMBAR1_LO_CSR_AMAP { + u8 memspace; /* DWORD 0 */ + u8 type[2]; /* DWORD 0 */ + u8 pf; /* DWORD 0 */ + u8 rsvd0[13]; /* DWORD 0 */ + u8 membar1lo[15]; /* DWORD 0 */ +} __packed; +struct PCICFG_MEMBAR1_LO_CSR_AMAP { + u32 dw[1]; +}; + +/* Memory BAR 1 - High Address Register. */ +struct BE_PCICFG_MEMBAR1_HI_CSR_AMAP { + u8 membar1hi[32]; /* DWORD 0 */ +} __packed; +struct PCICFG_MEMBAR1_HI_CSR_AMAP { + u32 dw[1]; +}; + +/* Memory BAR 2 - Low Address Register. */ +struct BE_PCICFG_MEMBAR2_LO_CSR_AMAP { + u8 memspace; /* DWORD 0 */ + u8 type[2]; /* DWORD 0 */ + u8 pf; /* DWORD 0 */ + u8 rsvd0[17]; /* DWORD 0 */ + u8 membar2lo[11]; /* DWORD 0 */ +} __packed; +struct PCICFG_MEMBAR2_LO_CSR_AMAP { + u32 dw[1]; +}; + +/* Memory BAR 2 - High Address Register. */ +struct BE_PCICFG_MEMBAR2_HI_CSR_AMAP { + u8 membar2hi[32]; /* DWORD 0 */ +} __packed; +struct PCICFG_MEMBAR2_HI_CSR_AMAP { + u32 dw[1]; +}; + +/* Subsystem Vendor and ID (Function 0) Register. */ +struct BE_PCICFG_SUBSYSTEM_ID_F0_CSR_AMAP { + u8 subsys_vendor_id[16]; /* DWORD 0 */ + u8 subsys_id[16]; /* DWORD 0 */ +} __packed; +struct PCICFG_SUBSYSTEM_ID_F0_CSR_AMAP { + u32 dw[1]; +}; + +/* Subsystem Vendor and ID (Function 1) Register. */ +struct BE_PCICFG_SUBSYSTEM_ID_F1_CSR_AMAP { + u8 subsys_vendor_id[16]; /* DWORD 0 */ + u8 subsys_id[16]; /* DWORD 0 */ +} __packed; +struct PCICFG_SUBSYSTEM_ID_F1_CSR_AMAP { + u32 dw[1]; +}; + +/* Semaphore Register. */ +struct BE_PCICFG_SEMAPHORE_CSR_AMAP { + u8 locked; /* DWORD 0 */ + u8 rsvd0[31]; /* DWORD 0 */ +} __packed; +struct PCICFG_SEMAPHORE_CSR_AMAP { + u32 dw[1]; +}; + +/* Soft Reset Register. */ +struct BE_PCICFG_SOFT_RESET_CSR_AMAP { + u8 rsvd0[7]; /* DWORD 0 */ + u8 softreset; /* DWORD 0 */ + u8 rsvd1[16]; /* DWORD 0 */ + u8 nec_ll_rcvdetect_i[8]; /* DWORD 0 */ +} __packed; +struct PCICFG_SOFT_RESET_CSR_AMAP { + u32 dw[1]; +}; + +/* Unrecoverable Error Status (Low) Register. Each bit corresponds to + * an internal Unrecoverable Error. These are set by hardware and may be + * cleared by writing a one to the respective bit(s) to be cleared. Any + * bit being set that is also unmasked will result in Unrecoverable Error + * interrupt notification to the host CPU and/or Server Management chip + * and the transitioning of BladeEngine to an Offline state. + */ +struct BE_PCICFG_UE_STATUS_LOW_CSR_AMAP { + u8 cev_ue_status; /* DWORD 0 */ + u8 ctx_ue_status; /* DWORD 0 */ + u8 dbuf_ue_status; /* DWORD 0 */ + u8 erx_ue_status; /* DWORD 0 */ + u8 host_ue_status; /* DWORD 0 */ + u8 mpu_ue_status; /* DWORD 0 */ + u8 ndma_ue_status; /* DWORD 0 */ + u8 ptc_ue_status; /* DWORD 0 */ + u8 rdma_ue_status; /* DWORD 0 */ + u8 rxf_ue_status; /* DWORD 0 */ + u8 rxips_ue_status; /* DWORD 0 */ + u8 rxulp0_ue_status; /* DWORD 0 */ + u8 rxulp1_ue_status; /* DWORD 0 */ + u8 rxulp2_ue_status; /* DWORD 0 */ + u8 tim_ue_status; /* DWORD 0 */ + u8 tpost_ue_status; /* DWORD 0 */ + u8 tpre_ue_status; /* DWORD 0 */ + u8 txips_ue_status; /* DWORD 0 */ + u8 txulp0_ue_status; /* DWORD 0 */ + u8 txulp1_ue_status; /* DWORD 0 */ + u8 uc_ue_status; /* DWORD 0 */ + u8 wdma_ue_status; /* DWORD 0 */ + u8 txulp2_ue_status; /* DWORD 0 */ + u8 host1_ue_status; /* DWORD 0 */ + u8 p0_ob_link_ue_status; /* DWORD 0 */ + u8 p1_ob_link_ue_status; /* DWORD 0 */ + u8 host_gpio_ue_status; /* DWORD 0 */ + u8 mbox_netw_ue_status; /* DWORD 0 */ + u8 mbox_stor_ue_status; /* DWORD 0 */ + u8 axgmac0_ue_status; /* DWORD 0 */ + u8 axgmac1_ue_status; /* DWORD 0 */ + u8 mpu_intpend_ue_status; /* DWORD 0 */ +} __packed; +struct PCICFG_UE_STATUS_LOW_CSR_AMAP { + u32 dw[1]; +}; + +/* Unrecoverable Error Status (High) Register. Each bit corresponds to + * an internal Unrecoverable Error. These are set by hardware and may be + * cleared by writing a one to the respective bit(s) to be cleared. Any + * bit being set that is also unmasked will result in Unrecoverable Error + * interrupt notification to the host CPU and/or Server Management chip; + * and the transitioning of BladeEngine to an Offline state. + */ +struct BE_PCICFG_UE_STATUS_HI_CSR_AMAP { + u8 jtag_ue_status; /* DWORD 0 */ + u8 lpcmemhost_ue_status; /* DWORD 0 */ + u8 mgmt_mac_ue_status; /* DWORD 0 */ + u8 mpu_iram_ue_status; /* DWORD 0 */ + u8 pcs0online_ue_status; /* DWORD 0 */ + u8 pcs1online_ue_status; /* DWORD 0 */ + u8 pctl0_ue_status; /* DWORD 0 */ + u8 pctl1_ue_status; /* DWORD 0 */ + u8 pmem_ue_status; /* DWORD 0 */ + u8 rr_ue_status; /* DWORD 0 */ + u8 rxpp_ue_status; /* DWORD 0 */ + u8 txpb_ue_status; /* DWORD 0 */ + u8 txp_ue_status; /* DWORD 0 */ + u8 xaui_ue_status; /* DWORD 0 */ + u8 arm_ue_status; /* DWORD 0 */ + u8 ipc_ue_status; /* DWORD 0 */ + u8 rsvd0[16]; /* DWORD 0 */ +} __packed; +struct PCICFG_UE_STATUS_HI_CSR_AMAP { + u32 dw[1]; +}; + +/* Unrecoverable Error Mask (Low) Register. Each bit, when set to one, + * will mask the associated Unrecoverable Error status bit from notification + * of Unrecoverable Error to the host CPU and/or Server Managment chip and the + * transitioning of all BladeEngine units to an Offline state. + */ +struct BE_PCICFG_UE_STATUS_LOW_MASK_CSR_AMAP { + u8 cev_ue_mask; /* DWORD 0 */ + u8 ctx_ue_mask; /* DWORD 0 */ + u8 dbuf_ue_mask; /* DWORD 0 */ + u8 erx_ue_mask; /* DWORD 0 */ + u8 host_ue_mask; /* DWORD 0 */ + u8 mpu_ue_mask; /* DWORD 0 */ + u8 ndma_ue_mask; /* DWORD 0 */ + u8 ptc_ue_mask; /* DWORD 0 */ + u8 rdma_ue_mask; /* DWORD 0 */ + u8 rxf_ue_mask; /* DWORD 0 */ + u8 rxips_ue_mask; /* DWORD 0 */ + u8 rxulp0_ue_mask; /* DWORD 0 */ + u8 rxulp1_ue_mask; /* DWORD 0 */ + u8 rxulp2_ue_mask; /* DWORD 0 */ + u8 tim_ue_mask; /* DWORD 0 */ + u8 tpost_ue_mask; /* DWORD 0 */ + u8 tpre_ue_mask; /* DWORD 0 */ + u8 txips_ue_mask; /* DWORD 0 */ + u8 txulp0_ue_mask; /* DWORD 0 */ + u8 txulp1_ue_mask; /* DWORD 0 */ + u8 uc_ue_mask; /* DWORD 0 */ + u8 wdma_ue_mask; /* DWORD 0 */ + u8 txulp2_ue_mask; /* DWORD 0 */ + u8 host1_ue_mask; /* DWORD 0 */ + u8 p0_ob_link_ue_mask; /* DWORD 0 */ + u8 p1_ob_link_ue_mask; /* DWORD 0 */ + u8 host_gpio_ue_mask; /* DWORD 0 */ + u8 mbox_netw_ue_mask; /* DWORD 0 */ + u8 mbox_stor_ue_mask; /* DWORD 0 */ + u8 axgmac0_ue_mask; /* DWORD 0 */ + u8 axgmac1_ue_mask; /* DWORD 0 */ + u8 mpu_intpend_ue_mask; /* DWORD 0 */ +} __packed; +struct PCICFG_UE_STATUS_LOW_MASK_CSR_AMAP { + u32 dw[1]; +}; + +/* Unrecoverable Error Mask (High) Register. Each bit, when set to one, + * will mask the associated Unrecoverable Error status bit from notification + * of Unrecoverable Error to the host CPU and/or Server Managment chip and the + * transitioning of all BladeEngine units to an Offline state. + */ +struct BE_PCICFG_UE_STATUS_HI_MASK_CSR_AMAP { + u8 jtag_ue_mask; /* DWORD 0 */ + u8 lpcmemhost_ue_mask; /* DWORD 0 */ + u8 mgmt_mac_ue_mask; /* DWORD 0 */ + u8 mpu_iram_ue_mask; /* DWORD 0 */ + u8 pcs0online_ue_mask; /* DWORD 0 */ + u8 pcs1online_ue_mask; /* DWORD 0 */ + u8 pctl0_ue_mask; /* DWORD 0 */ + u8 pctl1_ue_mask; /* DWORD 0 */ + u8 pmem_ue_mask; /* DWORD 0 */ + u8 rr_ue_mask; /* DWORD 0 */ + u8 rxpp_ue_mask; /* DWORD 0 */ + u8 txpb_ue_mask; /* DWORD 0 */ + u8 txp_ue_mask; /* DWORD 0 */ + u8 xaui_ue_mask; /* DWORD 0 */ + u8 arm_ue_mask; /* DWORD 0 */ + u8 ipc_ue_mask; /* DWORD 0 */ + u8 rsvd0[16]; /* DWORD 0 */ +} __packed; +struct PCICFG_UE_STATUS_HI_MASK_CSR_AMAP { + u32 dw[1]; +}; + +/* Online Control Register 0. This register controls various units within + * BladeEngine being in an Online or Offline state. + */ +struct BE_PCICFG_ONLINE0_CSR_AMAP { + u8 cev_online; /* DWORD 0 */ + u8 ctx_online; /* DWORD 0 */ + u8 dbuf_online; /* DWORD 0 */ + u8 erx_online; /* DWORD 0 */ + u8 host_online; /* DWORD 0 */ + u8 mpu_online; /* DWORD 0 */ + u8 ndma_online; /* DWORD 0 */ + u8 ptc_online; /* DWORD 0 */ + u8 rdma_online; /* DWORD 0 */ + u8 rxf_online; /* DWORD 0 */ + u8 rxips_online; /* DWORD 0 */ + u8 rxulp0_online; /* DWORD 0 */ + u8 rxulp1_online; /* DWORD 0 */ + u8 rxulp2_online; /* DWORD 0 */ + u8 tim_online; /* DWORD 0 */ + u8 tpost_online; /* DWORD 0 */ + u8 tpre_online; /* DWORD 0 */ + u8 txips_online; /* DWORD 0 */ + u8 txulp0_online; /* DWORD 0 */ + u8 txulp1_online; /* DWORD 0 */ + u8 uc_online; /* DWORD 0 */ + u8 wdma_online; /* DWORD 0 */ + u8 txulp2_online; /* DWORD 0 */ + u8 host1_online; /* DWORD 0 */ + u8 p0_ob_link_online; /* DWORD 0 */ + u8 p1_ob_link_online; /* DWORD 0 */ + u8 host_gpio_online; /* DWORD 0 */ + u8 mbox_netw_online; /* DWORD 0 */ + u8 mbox_stor_online; /* DWORD 0 */ + u8 axgmac0_online; /* DWORD 0 */ + u8 axgmac1_online; /* DWORD 0 */ + u8 mpu_intpend_online; /* DWORD 0 */ +} __packed; +struct PCICFG_ONLINE0_CSR_AMAP { + u32 dw[1]; +}; + +/* Online Control Register 1. This register controls various units within + * BladeEngine being in an Online or Offline state. + */ +struct BE_PCICFG_ONLINE1_CSR_AMAP { + u8 jtag_online; /* DWORD 0 */ + u8 lpcmemhost_online; /* DWORD 0 */ + u8 mgmt_mac_online; /* DWORD 0 */ + u8 mpu_iram_online; /* DWORD 0 */ + u8 pcs0online_online; /* DWORD 0 */ + u8 pcs1online_online; /* DWORD 0 */ + u8 pctl0_online; /* DWORD 0 */ + u8 pctl1_online; /* DWORD 0 */ + u8 pmem_online; /* DWORD 0 */ + u8 rr_online; /* DWORD 0 */ + u8 rxpp_online; /* DWORD 0 */ + u8 txpb_online; /* DWORD 0 */ + u8 txp_online; /* DWORD 0 */ + u8 xaui_online; /* DWORD 0 */ + u8 arm_online; /* DWORD 0 */ + u8 ipc_online; /* DWORD 0 */ + u8 rsvd0[16]; /* DWORD 0 */ +} __packed; +struct PCICFG_ONLINE1_CSR_AMAP { + u32 dw[1]; +}; + +/* Host Timer Register. */ +struct BE_PCICFG_HOST_TIMER_INT_CTRL_CSR_AMAP { + u8 hosttimer[24]; /* DWORD 0 */ + u8 hostintr; /* DWORD 0 */ + u8 rsvd0[7]; /* DWORD 0 */ +} __packed; +struct PCICFG_HOST_TIMER_INT_CTRL_CSR_AMAP { + u32 dw[1]; +}; + +/* Scratchpad Register (for software use). */ +struct BE_PCICFG_SCRATCHPAD_CSR_AMAP { + u8 scratchpad[32]; /* DWORD 0 */ +} __packed; +struct PCICFG_SCRATCHPAD_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express Capabilities Register. */ +struct BE_PCICFG_PCIE_CAP_CSR_AMAP { + u8 capid[8]; /* DWORD 0 */ + u8 nextcap[8]; /* DWORD 0 */ + u8 capver[4]; /* DWORD 0 */ + u8 devport[4]; /* DWORD 0 */ + u8 rsvd0[6]; /* DWORD 0 */ + u8 rsvd1[2]; /* DWORD 0 */ +} __packed; +struct PCICFG_PCIE_CAP_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express Device Capabilities Register. */ +struct BE_PCICFG_PCIE_DEVCAP_CSR_AMAP { + u8 payload[3]; /* DWORD 0 */ + u8 rsvd0[3]; /* DWORD 0 */ + u8 lo_lat[3]; /* DWORD 0 */ + u8 l1_lat[3]; /* DWORD 0 */ + u8 rsvd1[3]; /* DWORD 0 */ + u8 rsvd2[3]; /* DWORD 0 */ + u8 pwr_value[8]; /* DWORD 0 */ + u8 pwr_scale[2]; /* DWORD 0 */ + u8 rsvd3[4]; /* DWORD 0 */ +} __packed; +struct PCICFG_PCIE_DEVCAP_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express Device Control/Status Registers. */ +struct BE_PCICFG_PCIE_CONTROL_STATUS_CSR_AMAP { + u8 CorrErrReportEn; /* DWORD 0 */ + u8 NonFatalErrReportEn; /* DWORD 0 */ + u8 FatalErrReportEn; /* DWORD 0 */ + u8 UnsuppReqReportEn; /* DWORD 0 */ + u8 EnableRelaxOrder; /* DWORD 0 */ + u8 Max_Payload_Size[3]; /* DWORD 0 */ + u8 ExtendTagFieldEnable; /* DWORD 0 */ + u8 PhantomFnEnable; /* DWORD 0 */ + u8 AuxPwrPMEnable; /* DWORD 0 */ + u8 EnableNoSnoop; /* DWORD 0 */ + u8 Max_Read_Req_Size[3]; /* DWORD 0 */ + u8 rsvd0; /* DWORD 0 */ + u8 CorrErrDetect; /* DWORD 0 */ + u8 NonFatalErrDetect; /* DWORD 0 */ + u8 FatalErrDetect; /* DWORD 0 */ + u8 UnsuppReqDetect; /* DWORD 0 */ + u8 AuxPwrDetect; /* DWORD 0 */ + u8 TransPending; /* DWORD 0 */ + u8 rsvd1[10]; /* DWORD 0 */ +} __packed; +struct PCICFG_PCIE_CONTROL_STATUS_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express Link Capabilities Register. */ +struct BE_PCICFG_PCIE_LINK_CAP_CSR_AMAP { + u8 MaxLinkSpeed[4]; /* DWORD 0 */ + u8 MaxLinkWidth[6]; /* DWORD 0 */ + u8 ASPMSupport[2]; /* DWORD 0 */ + u8 L0sExitLat[3]; /* DWORD 0 */ + u8 L1ExitLat[3]; /* DWORD 0 */ + u8 rsvd0[6]; /* DWORD 0 */ + u8 PortNum[8]; /* DWORD 0 */ +} __packed; +struct PCICFG_PCIE_LINK_CAP_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express Link Status Register. */ +struct BE_PCICFG_PCIE_LINK_STATUS_CSR_AMAP { + u8 ASPMCtl[2]; /* DWORD 0 */ + u8 rsvd0; /* DWORD 0 */ + u8 ReadCmplBndry; /* DWORD 0 */ + u8 LinkDisable; /* DWORD 0 */ + u8 RetrainLink; /* DWORD 0 */ + u8 CommonClkConfig; /* DWORD 0 */ + u8 ExtendSync; /* DWORD 0 */ + u8 rsvd1[8]; /* DWORD 0 */ + u8 LinkSpeed[4]; /* DWORD 0 */ + u8 NegLinkWidth[6]; /* DWORD 0 */ + u8 LinkTrainErr; /* DWORD 0 */ + u8 LinkTrain; /* DWORD 0 */ + u8 SlotClkConfig; /* DWORD 0 */ + u8 rsvd2[3]; /* DWORD 0 */ +} __packed; +struct PCICFG_PCIE_LINK_STATUS_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express MSI Configuration Register. */ +struct BE_PCICFG_MSI_CSR_AMAP { + u8 capid[8]; /* DWORD 0 */ + u8 nextptr[8]; /* DWORD 0 */ + u8 tablesize[11]; /* DWORD 0 */ + u8 rsvd0[3]; /* DWORD 0 */ + u8 funcmask; /* DWORD 0 */ + u8 en; /* DWORD 0 */ +} __packed; +struct PCICFG_MSI_CSR_AMAP { + u32 dw[1]; +}; + +/* MSI-X Table Offset Register. */ +struct BE_PCICFG_MSIX_TABLE_CSR_AMAP { + u8 tablebir[3]; /* DWORD 0 */ + u8 offset[29]; /* DWORD 0 */ +} __packed; +struct PCICFG_MSIX_TABLE_CSR_AMAP { + u32 dw[1]; +}; + +/* MSI-X PBA Offset Register. */ +struct BE_PCICFG_MSIX_PBA_CSR_AMAP { + u8 pbabir[3]; /* DWORD 0 */ + u8 offset[29]; /* DWORD 0 */ +} __packed; +struct PCICFG_MSIX_PBA_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express MSI-X Message Vector Control Register. */ +struct BE_PCICFG_MSIX_VECTOR_CONTROL_CSR_AMAP { + u8 vector_control; /* DWORD 0 */ + u8 rsvd0[31]; /* DWORD 0 */ +} __packed; +struct PCICFG_MSIX_VECTOR_CONTROL_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express MSI-X Message Data Register. */ +struct BE_PCICFG_MSIX_MSG_DATA_CSR_AMAP { + u8 data[16]; /* DWORD 0 */ + u8 rsvd0[16]; /* DWORD 0 */ +} __packed; +struct PCICFG_MSIX_MSG_DATA_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express MSI-X Message Address Register - High Part. */ +struct BE_PCICFG_MSIX_MSG_ADDR_HI_CSR_AMAP { + u8 addr[32]; /* DWORD 0 */ +} __packed; +struct PCICFG_MSIX_MSG_ADDR_HI_CSR_AMAP { + u32 dw[1]; +}; + +/* PCI Express MSI-X Message Address Register - Low Part. */ +struct BE_PCICFG_MSIX_MSG_ADDR_LO_CSR_AMAP { + u8 rsvd0[2]; /* DWORD 0 */ + u8 addr[30]; /* DWORD 0 */ +} __packed; +struct PCICFG_MSIX_MSG_ADDR_LO_CSR_AMAP { + u32 dw[1]; +}; + +struct BE_PCICFG_ANON_18_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ +} __packed; +struct PCICFG_ANON_18_RSVD_AMAP { + u32 dw[1]; +}; + +struct BE_PCICFG_ANON_19_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ +} __packed; +struct PCICFG_ANON_19_RSVD_AMAP { + u32 dw[1]; +}; + +struct BE_PCICFG_ANON_20_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ + u8 rsvd1[25][32]; /* DWORD 1 */ +} __packed; +struct PCICFG_ANON_20_RSVD_AMAP { + u32 dw[26]; +}; + +struct BE_PCICFG_ANON_21_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ + u8 rsvd1[1919][32]; /* DWORD 1 */ +} __packed; +struct PCICFG_ANON_21_RSVD_AMAP { + u32 dw[1920]; +}; + +struct BE_PCICFG_ANON_22_MESSAGE_AMAP { + struct BE_PCICFG_MSIX_VECTOR_CONTROL_CSR_AMAP vec_ctrl; + struct BE_PCICFG_MSIX_MSG_DATA_CSR_AMAP msg_data; + struct BE_PCICFG_MSIX_MSG_ADDR_HI_CSR_AMAP addr_hi; + struct BE_PCICFG_MSIX_MSG_ADDR_LO_CSR_AMAP addr_low; +} __packed; +struct PCICFG_ANON_22_MESSAGE_AMAP { + u32 dw[4]; +}; + +struct BE_PCICFG_ANON_23_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ + u8 rsvd1[895][32]; /* DWORD 1 */ +} __packed; +struct PCICFG_ANON_23_RSVD_AMAP { + u32 dw[896]; +}; + +/* These PCI Configuration Space registers are for the Storage Function of + * BladeEngine (Function 0). In the memory map of the registers below their + * table, + */ +struct BE_PCICFG0_CSRMAP_AMAP { + struct BE_PCICFG_ID_CSR_AMAP id; + u8 rsvd0[32]; /* DWORD 1 */ + u8 rsvd1[32]; /* DWORD 2 */ + u8 rsvd2[32]; /* DWORD 3 */ + struct BE_PCICFG_IOBAR_CSR_AMAP iobar; + struct BE_PCICFG_MEMBAR0_CSR_AMAP membar0; + struct BE_PCICFG_MEMBAR1_LO_CSR_AMAP membar1_lo; + struct BE_PCICFG_MEMBAR1_HI_CSR_AMAP membar1_hi; + struct BE_PCICFG_MEMBAR2_LO_CSR_AMAP membar2_lo; + struct BE_PCICFG_MEMBAR2_HI_CSR_AMAP membar2_hi; + u8 rsvd3[32]; /* DWORD 10 */ + struct BE_PCICFG_SUBSYSTEM_ID_F0_CSR_AMAP subsystem_id; + u8 rsvd4[32]; /* DWORD 12 */ + u8 rsvd5[32]; /* DWORD 13 */ + u8 rsvd6[32]; /* DWORD 14 */ + u8 rsvd7[32]; /* DWORD 15 */ + struct BE_PCICFG_SEMAPHORE_CSR_AMAP semaphore[4]; + struct BE_PCICFG_SOFT_RESET_CSR_AMAP soft_reset; + u8 rsvd8[32]; /* DWORD 21 */ + struct BE_PCICFG_SCRATCHPAD_CSR_AMAP scratchpad; + u8 rsvd9[32]; /* DWORD 23 */ + u8 rsvd10[32]; /* DWORD 24 */ + u8 rsvd11[32]; /* DWORD 25 */ + u8 rsvd12[32]; /* DWORD 26 */ + u8 rsvd13[32]; /* DWORD 27 */ + u8 rsvd14[2][32]; /* DWORD 28 */ + u8 rsvd15[32]; /* DWORD 30 */ + u8 rsvd16[32]; /* DWORD 31 */ + u8 rsvd17[8][32]; /* DWORD 32 */ + struct BE_PCICFG_UE_STATUS_LOW_CSR_AMAP ue_status_low; + struct BE_PCICFG_UE_STATUS_HI_CSR_AMAP ue_status_hi; + struct BE_PCICFG_UE_STATUS_LOW_MASK_CSR_AMAP ue_status_low_mask; + struct BE_PCICFG_UE_STATUS_HI_MASK_CSR_AMAP ue_status_hi_mask; + struct BE_PCICFG_ONLINE0_CSR_AMAP online0; + struct BE_PCICFG_ONLINE1_CSR_AMAP online1; + u8 rsvd18[32]; /* DWORD 46 */ + u8 rsvd19[32]; /* DWORD 47 */ + u8 rsvd20[32]; /* DWORD 48 */ + u8 rsvd21[32]; /* DWORD 49 */ + struct BE_PCICFG_HOST_TIMER_INT_CTRL_CSR_AMAP host_timer_int_ctrl; + u8 rsvd22[32]; /* DWORD 51 */ + struct BE_PCICFG_PCIE_CAP_CSR_AMAP pcie_cap; + struct BE_PCICFG_PCIE_DEVCAP_CSR_AMAP pcie_devcap; + struct BE_PCICFG_PCIE_CONTROL_STATUS_CSR_AMAP pcie_control_status; + struct BE_PCICFG_PCIE_LINK_CAP_CSR_AMAP pcie_link_cap; + struct BE_PCICFG_PCIE_LINK_STATUS_CSR_AMAP pcie_link_status; + struct BE_PCICFG_MSI_CSR_AMAP msi; + struct BE_PCICFG_MSIX_TABLE_CSR_AMAP msix_table_offset; + struct BE_PCICFG_MSIX_PBA_CSR_AMAP msix_pba_offset; + u8 rsvd23[32]; /* DWORD 60 */ + u8 rsvd24[32]; /* DWORD 61 */ + u8 rsvd25[32]; /* DWORD 62 */ + u8 rsvd26[32]; /* DWORD 63 */ + u8 rsvd27[32]; /* DWORD 64 */ + u8 rsvd28[32]; /* DWORD 65 */ + u8 rsvd29[32]; /* DWORD 66 */ + u8 rsvd30[32]; /* DWORD 67 */ + u8 rsvd31[32]; /* DWORD 68 */ + u8 rsvd32[32]; /* DWORD 69 */ + u8 rsvd33[32]; /* DWORD 70 */ + u8 rsvd34[32]; /* DWORD 71 */ + u8 rsvd35[32]; /* DWORD 72 */ + u8 rsvd36[32]; /* DWORD 73 */ + u8 rsvd37[32]; /* DWORD 74 */ + u8 rsvd38[32]; /* DWORD 75 */ + u8 rsvd39[32]; /* DWORD 76 */ + u8 rsvd40[32]; /* DWORD 77 */ + u8 rsvd41[32]; /* DWORD 78 */ + u8 rsvd42[32]; /* DWORD 79 */ + u8 rsvd43[32]; /* DWORD 80 */ + u8 rsvd44[32]; /* DWORD 81 */ + u8 rsvd45[32]; /* DWORD 82 */ + u8 rsvd46[32]; /* DWORD 83 */ + u8 rsvd47[32]; /* DWORD 84 */ + u8 rsvd48[32]; /* DWORD 85 */ + u8 rsvd49[32]; /* DWORD 86 */ + u8 rsvd50[32]; /* DWORD 87 */ + u8 rsvd51[32]; /* DWORD 88 */ + u8 rsvd52[32]; /* DWORD 89 */ + u8 rsvd53[32]; /* DWORD 90 */ + u8 rsvd54[32]; /* DWORD 91 */ + u8 rsvd55[32]; /* DWORD 92 */ + u8 rsvd56[832]; /* DWORD 93 */ + u8 rsvd57[32]; /* DWORD 119 */ + u8 rsvd58[32]; /* DWORD 120 */ + u8 rsvd59[32]; /* DWORD 121 */ + u8 rsvd60[32]; /* DWORD 122 */ + u8 rsvd61[32]; /* DWORD 123 */ + u8 rsvd62[32]; /* DWORD 124 */ + u8 rsvd63[32]; /* DWORD 125 */ + u8 rsvd64[32]; /* DWORD 126 */ + u8 rsvd65[32]; /* DWORD 127 */ + u8 rsvd66[61440]; /* DWORD 128 */ + struct BE_PCICFG_ANON_22_MESSAGE_AMAP message[32]; + u8 rsvd67[28672]; /* DWORD 2176 */ + u8 rsvd68[32]; /* DWORD 3072 */ + u8 rsvd69[1023][32]; /* DWORD 3073 */ +} __packed; +struct PCICFG0_CSRMAP_AMAP { + u32 dw[4096]; +}; + +struct BE_PCICFG_ANON_24_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ +} __packed; +struct PCICFG_ANON_24_RSVD_AMAP { + u32 dw[1]; +}; + +struct BE_PCICFG_ANON_25_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ +} __packed; +struct PCICFG_ANON_25_RSVD_AMAP { + u32 dw[1]; +}; + +struct BE_PCICFG_ANON_26_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ +} __packed; +struct PCICFG_ANON_26_RSVD_AMAP { + u32 dw[1]; +}; + +struct BE_PCICFG_ANON_27_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ + u8 rsvd1[32]; /* DWORD 1 */ +} __packed; +struct PCICFG_ANON_27_RSVD_AMAP { + u32 dw[2]; +}; + +struct BE_PCICFG_ANON_28_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ + u8 rsvd1[3][32]; /* DWORD 1 */ +} __packed; +struct PCICFG_ANON_28_RSVD_AMAP { + u32 dw[4]; +}; + +struct BE_PCICFG_ANON_29_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ + u8 rsvd1[36][32]; /* DWORD 1 */ +} __packed; +struct PCICFG_ANON_29_RSVD_AMAP { + u32 dw[37]; +}; + +struct BE_PCICFG_ANON_30_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ + u8 rsvd1[1930][32]; /* DWORD 1 */ +} __packed; +struct PCICFG_ANON_30_RSVD_AMAP { + u32 dw[1931]; +}; + +struct BE_PCICFG_ANON_31_MESSAGE_AMAP { + struct BE_PCICFG_MSIX_VECTOR_CONTROL_CSR_AMAP vec_ctrl; + struct BE_PCICFG_MSIX_MSG_DATA_CSR_AMAP msg_data; + struct BE_PCICFG_MSIX_MSG_ADDR_HI_CSR_AMAP addr_hi; + struct BE_PCICFG_MSIX_MSG_ADDR_LO_CSR_AMAP addr_low; +} __packed; +struct PCICFG_ANON_31_MESSAGE_AMAP { + u32 dw[4]; +}; + +struct BE_PCICFG_ANON_32_RSVD_AMAP { + u8 rsvd0[32]; /* DWORD 0 */ + u8 rsvd1[895][32]; /* DWORD 1 */ +} __packed; +struct PCICFG_ANON_32_RSVD_AMAP { + u32 dw[896]; +}; + +/* This PCI configuration space register map is for the Networking Function of + * BladeEngine (Function 1). + */ +struct BE_PCICFG1_CSRMAP_AMAP { + struct BE_PCICFG_ID_CSR_AMAP id; + u8 rsvd0[32]; /* DWORD 1 */ + u8 rsvd1[32]; /* DWORD 2 */ + u8 rsvd2[32]; /* DWORD 3 */ + struct BE_PCICFG_IOBAR_CSR_AMAP iobar; + struct BE_PCICFG_MEMBAR0_CSR_AMAP membar0; + struct BE_PCICFG_MEMBAR1_LO_CSR_AMAP membar1_lo; + struct BE_PCICFG_MEMBAR1_HI_CSR_AMAP membar1_hi; + struct BE_PCICFG_MEMBAR2_LO_CSR_AMAP membar2_lo; + struct BE_PCICFG_MEMBAR2_HI_CSR_AMAP membar2_hi; + u8 rsvd3[32]; /* DWORD 10 */ + struct BE_PCICFG_SUBSYSTEM_ID_F1_CSR_AMAP subsystem_id; + u8 rsvd4[32]; /* DWORD 12 */ + u8 rsvd5[32]; /* DWORD 13 */ + u8 rsvd6[32]; /* DWORD 14 */ + u8 rsvd7[32]; /* DWORD 15 */ + struct BE_PCICFG_SEMAPHORE_CSR_AMAP semaphore[4]; + struct BE_PCICFG_SOFT_RESET_CSR_AMAP soft_reset; + u8 rsvd8[32]; /* DWORD 21 */ + struct BE_PCICFG_SCRATCHPAD_CSR_AMAP scratchpad; + u8 rsvd9[32]; /* DWORD 23 */ + u8 rsvd10[32]; /* DWORD 24 */ + u8 rsvd11[32]; /* DWORD 25 */ + u8 rsvd12[32]; /* DWORD 26 */ + u8 rsvd13[32]; /* DWORD 27 */ + u8 rsvd14[2][32]; /* DWORD 28 */ + u8 rsvd15[32]; /* DWORD 30 */ + u8 rsvd16[32]; /* DWORD 31 */ + u8 rsvd17[8][32]; /* DWORD 32 */ + struct BE_PCICFG_UE_STATUS_LOW_CSR_AMAP ue_status_low; + struct BE_PCICFG_UE_STATUS_HI_CSR_AMAP ue_status_hi; + struct BE_PCICFG_UE_STATUS_LOW_MASK_CSR_AMAP ue_status_low_mask; + struct BE_PCICFG_UE_STATUS_HI_MASK_CSR_AMAP ue_status_hi_mask; + struct BE_PCICFG_ONLINE0_CSR_AMAP online0; + struct BE_PCICFG_ONLINE1_CSR_AMAP online1; + u8 rsvd18[32]; /* DWORD 46 */ + u8 rsvd19[32]; /* DWORD 47 */ + u8 rsvd20[32]; /* DWORD 48 */ + u8 rsvd21[32]; /* DWORD 49 */ + struct BE_PCICFG_HOST_TIMER_INT_CTRL_CSR_AMAP host_timer_int_ctrl; + u8 rsvd22[32]; /* DWORD 51 */ + struct BE_PCICFG_PCIE_CAP_CSR_AMAP pcie_cap; + struct BE_PCICFG_PCIE_DEVCAP_CSR_AMAP pcie_devcap; + struct BE_PCICFG_PCIE_CONTROL_STATUS_CSR_AMAP pcie_control_status; + struct BE_PCICFG_PCIE_LINK_CAP_CSR_AMAP pcie_link_cap; + struct BE_PCICFG_PCIE_LINK_STATUS_CSR_AMAP pcie_link_status; + struct BE_PCICFG_MSI_CSR_AMAP msi; + struct BE_PCICFG_MSIX_TABLE_CSR_AMAP msix_table_offset; + struct BE_PCICFG_MSIX_PBA_CSR_AMAP msix_pba_offset; + u8 rsvd23[64]; /* DWORD 60 */ + u8 rsvd24[32]; /* DWORD 62 */ + u8 rsvd25[32]; /* DWORD 63 */ + u8 rsvd26[32]; /* DWORD 64 */ + u8 rsvd27[32]; /* DWORD 65 */ + u8 rsvd28[32]; /* DWORD 66 */ + u8 rsvd29[32]; /* DWORD 67 */ + u8 rsvd30[32]; /* DWORD 68 */ + u8 rsvd31[32]; /* DWORD 69 */ + u8 rsvd32[32]; /* DWORD 70 */ + u8 rsvd33[32]; /* DWORD 71 */ + u8 rsvd34[32]; /* DWORD 72 */ + u8 rsvd35[32]; /* DWORD 73 */ + u8 rsvd36[32]; /* DWORD 74 */ + u8 rsvd37[128]; /* DWORD 75 */ + u8 rsvd38[32]; /* DWORD 79 */ + u8 rsvd39[1184]; /* DWORD 80 */ + u8 rsvd40[61792]; /* DWORD 117 */ + struct BE_PCICFG_ANON_31_MESSAGE_AMAP message[32]; + u8 rsvd41[28672]; /* DWORD 2176 */ + u8 rsvd42[32]; /* DWORD 3072 */ + u8 rsvd43[1023][32]; /* DWORD 3073 */ +} __packed; +struct PCICFG1_CSRMAP_AMAP { + u32 dw[4096]; +}; + +#endif /* __pcicfg_amap_h__ */ diff --git a/trunk/drivers/staging/benet/post_codes.h b/trunk/drivers/staging/benet/post_codes.h new file mode 100644 index 000000000000..6d1621f5f5fb --- /dev/null +++ b/trunk/drivers/staging/benet/post_codes.h @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __post_codes_amap_h__ +#define __post_codes_amap_h__ + +/* --- MGMT_HBA_POST_STAGE_ENUM --- */ +#define POST_STAGE_POWER_ON_RESET (0) /* State after a cold or warm boot. */ +#define POST_STAGE_AWAITING_HOST_RDY (1) /* ARM boot code awaiting a + go-ahed from the host. */ +#define POST_STAGE_HOST_RDY (2) /* Host has given go-ahed to ARM. */ +#define POST_STAGE_BE_RESET (3) /* Host wants to reset chip, this is a chip + workaround */ +#define POST_STAGE_SEEPROM_CS_START (256) /* SEEPROM checksum + test start. */ +#define POST_STAGE_SEEPROM_CS_DONE (257) /* SEEPROM checksum test + done. */ +#define POST_STAGE_DDR_CONFIG_START (512) /* DDR configuration start. */ +#define POST_STAGE_DDR_CONFIG_DONE (513) /* DDR configuration done. */ +#define POST_STAGE_DDR_CALIBRATE_START (768) /* DDR calibration start. */ +#define POST_STAGE_DDR_CALIBRATE_DONE (769) /* DDR calibration done. */ +#define POST_STAGE_DDR_TEST_START (1024) /* DDR memory test start. */ +#define POST_STAGE_DDR_TEST_DONE (1025) /* DDR memory test done. */ +#define POST_STAGE_REDBOOT_INIT_START (1536) /* Redboot starts execution. */ +#define POST_STAGE_REDBOOT_INIT_DONE (1537) /* Redboot done execution. */ +#define POST_STAGE_FW_IMAGE_LOAD_START (1792) /* Firmware image load to + DDR start. */ +#define POST_STAGE_FW_IMAGE_LOAD_DONE (1793) /* Firmware image load + to DDR done. */ +#define POST_STAGE_ARMFW_START (2048) /* ARMfw runtime code + starts execution. */ +#define POST_STAGE_DHCP_QUERY_START (2304) /* DHCP server query start. */ +#define POST_STAGE_DHCP_QUERY_DONE (2305) /* DHCP server query done. */ +#define POST_STAGE_BOOT_TARGET_DISCOVERY_START (2560) /* Boot Target + Discovery Start. */ +#define POST_STAGE_BOOT_TARGET_DISCOVERY_DONE (2561) /* Boot Target + Discovery Done. */ +#define POST_STAGE_RC_OPTION_SET (2816) /* Remote configuration + option is set in SEEPROM */ +#define POST_STAGE_SWITCH_LINK (2817) /* Wait for link up on switch */ +#define POST_STAGE_SEND_ICDS_MESSAGE (2818) /* Send the ICDS message + to switch */ +#define POST_STAGE_PERFROM_TFTP (2819) /* Download xml using TFTP */ +#define POST_STAGE_PARSE_XML (2820) /* Parse XML file */ +#define POST_STAGE_DOWNLOAD_IMAGE (2821) /* Download IMAGE from + TFTP server */ +#define POST_STAGE_FLASH_IMAGE (2822) /* Flash the IMAGE */ +#define POST_STAGE_RC_DONE (2823) /* Remote configuration + complete */ +#define POST_STAGE_REBOOT_SYSTEM (2824) /* Upgrade IMAGE done, + reboot required */ +#define POST_STAGE_MAC_ADDRESS (3072) /* MAC Address Check */ +#define POST_STAGE_ARMFW_READY (49152) /* ARMfw is done with POST + and ready. */ +#define POST_STAGE_ARMFW_UE (61440) /* ARMfw has asserted an + unrecoverable error. The + lower 3 hex digits of the + stage code identify the + unique error code. + */ + +/* This structure defines the format of the MPU semaphore + * register when used for POST. + */ +struct BE_MGMT_HBA_POST_STATUS_STRUCT_AMAP { + u8 stage[16]; /* DWORD 0 */ + u8 rsvd0[10]; /* DWORD 0 */ + u8 iscsi_driver_loaded; /* DWORD 0 */ + u8 option_rom_installed; /* DWORD 0 */ + u8 iscsi_ip_conflict; /* DWORD 0 */ + u8 iscsi_no_ip; /* DWORD 0 */ + u8 backup_fw; /* DWORD 0 */ + u8 error; /* DWORD 0 */ +} __packed; +struct MGMT_HBA_POST_STATUS_STRUCT_AMAP { + u32 dw[1]; +}; + +/* --- MGMT_HBA_POST_DUMMY_BITS_ENUM --- */ +#define POST_BIT_ISCSI_LOADED (26) +#define POST_BIT_OPTROM_INST (27) +#define POST_BIT_BAD_IP_ADDR (28) +#define POST_BIT_NO_IP_ADDR (29) +#define POST_BIT_BACKUP_FW (30) +#define POST_BIT_ERROR (31) + +/* --- MGMT_HBA_POST_DUMMY_VALUES_ENUM --- */ +#define POST_ISCSI_DRIVER_LOADED (67108864) +#define POST_OPTROM_INSTALLED (134217728) +#define POST_ISCSI_IP_ADDRESS_CONFLICT (268435456) +#define POST_ISCSI_NO_IP_ADDRESS (536870912) +#define POST_BACKUP_FW_LOADED (1073741824) +#define POST_FATAL_ERROR (2147483648) + +#endif /* __post_codes_amap_h__ */ diff --git a/trunk/drivers/staging/benet/regmap.h b/trunk/drivers/staging/benet/regmap.h new file mode 100644 index 000000000000..e816ba210e83 --- /dev/null +++ b/trunk/drivers/staging/benet/regmap.h @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2005 - 2008 ServerEngines + * 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 version 2 + * as published by the Free Software Foundation. The full GNU General + * Public License is included in this distribution in the file called COPYING. + * + * Contact Information: + * linux-drivers@serverengines.com + * + * ServerEngines + * 209 N. Fair Oaks Ave + * Sunnyvale, CA 94085 + */ +/* + * Autogenerated by srcgen version: 0127 + */ +#ifndef __regmap_amap_h__ +#define __regmap_amap_h__ +#include "pcicfg.h" +#include "ep.h" +#include "cev.h" +#include "mpu.h" +#include "doorbells.h" + +/* + * This is the control and status register map for BladeEngine, showing + * the relative size and offset of each sub-module. The CSR registers + * are identical for the network and storage PCI functions. The + * CSR map is shown below, followed by details of each block, + * in sub-sections. The sub-sections begin with a description + * of CSRs that are instantiated in multiple blocks. + */ +struct BE_BLADE_ENGINE_CSRMAP_AMAP { + struct BE_MPU_CSRMAP_AMAP mpu; + u8 rsvd0[8192]; /* DWORD 256 */ + u8 rsvd1[8192]; /* DWORD 512 */ + struct BE_CEV_CSRMAP_AMAP cev; + u8 rsvd2[8192]; /* DWORD 1024 */ + u8 rsvd3[8192]; /* DWORD 1280 */ + u8 rsvd4[8192]; /* DWORD 1536 */ + u8 rsvd5[8192]; /* DWORD 1792 */ + u8 rsvd6[8192]; /* DWORD 2048 */ + u8 rsvd7[8192]; /* DWORD 2304 */ + u8 rsvd8[8192]; /* DWORD 2560 */ + u8 rsvd9[8192]; /* DWORD 2816 */ + u8 rsvd10[8192]; /* DWORD 3072 */ + u8 rsvd11[8192]; /* DWORD 3328 */ + u8 rsvd12[8192]; /* DWORD 3584 */ + u8 rsvd13[8192]; /* DWORD 3840 */ + u8 rsvd14[8192]; /* DWORD 4096 */ + u8 rsvd15[8192]; /* DWORD 4352 */ + u8 rsvd16[8192]; /* DWORD 4608 */ + u8 rsvd17[8192]; /* DWORD 4864 */ + u8 rsvd18[8192]; /* DWORD 5120 */ + u8 rsvd19[8192]; /* DWORD 5376 */ + u8 rsvd20[8192]; /* DWORD 5632 */ + u8 rsvd21[8192]; /* DWORD 5888 */ + u8 rsvd22[8192]; /* DWORD 6144 */ + u8 rsvd23[17152][32]; /* DWORD 6400 */ +} __packed; +struct BLADE_ENGINE_CSRMAP_AMAP { + u32 dw[23552]; +}; + +#endif /* __regmap_amap_h__ */ diff --git a/trunk/drivers/thermal/thermal_sys.c b/trunk/drivers/thermal/thermal_sys.c index d0b093b66adc..8171ca17b936 100644 --- a/trunk/drivers/thermal/thermal_sys.c +++ b/trunk/drivers/thermal/thermal_sys.c @@ -30,7 +30,6 @@ #include #include #include -#include MODULE_AUTHOR("Zhang Rui"); MODULE_DESCRIPTION("Generic thermal management sysfs support"); @@ -105,36 +104,22 @@ static ssize_t temp_show(struct device *dev, struct device_attribute *attr, char *buf) { struct thermal_zone_device *tz = to_thermal_zone(dev); - long temperature; - int ret; if (!tz->ops->get_temp) return -EPERM; - ret = tz->ops->get_temp(tz, &temperature); - - if (ret) - return ret; - - return sprintf(buf, "%ld\n", temperature); + return tz->ops->get_temp(tz, buf); } static ssize_t mode_show(struct device *dev, struct device_attribute *attr, char *buf) { struct thermal_zone_device *tz = to_thermal_zone(dev); - enum thermal_device_mode mode; - int result; if (!tz->ops->get_mode) return -EPERM; - result = tz->ops->get_mode(tz, &mode); - if (result) - return result; - - return sprintf(buf, "%s\n", mode == THERMAL_DEVICE_ENABLED ? "enabled" - : "disabled"); + return tz->ops->get_mode(tz, buf); } static ssize_t @@ -147,13 +132,7 @@ mode_store(struct device *dev, struct device_attribute *attr, if (!tz->ops->set_mode) return -EPERM; - if (!strncmp(buf, "enabled", sizeof("enabled"))) - result = tz->ops->set_mode(tz, THERMAL_DEVICE_ENABLED); - else if (!strncmp(buf, "disabled", sizeof("disabled"))) - result = tz->ops->set_mode(tz, THERMAL_DEVICE_DISABLED); - else - result = -EINVAL; - + result = tz->ops->set_mode(tz, buf); if (result) return result; @@ -165,8 +144,7 @@ trip_point_type_show(struct device *dev, struct device_attribute *attr, char *buf) { struct thermal_zone_device *tz = to_thermal_zone(dev); - enum thermal_trip_type type; - int trip, result; + int trip; if (!tz->ops->get_trip_type) return -EPERM; @@ -174,22 +152,7 @@ trip_point_type_show(struct device *dev, struct device_attribute *attr, if (!sscanf(attr->attr.name, "trip_point_%d_type", &trip)) return -EINVAL; - result = tz->ops->get_trip_type(tz, trip, &type); - if (result) - return result; - - switch (type) { - case THERMAL_TRIP_CRITICAL: - return sprintf(buf, "critical"); - case THERMAL_TRIP_HOT: - return sprintf(buf, "hot"); - case THERMAL_TRIP_PASSIVE: - return sprintf(buf, "passive"); - case THERMAL_TRIP_ACTIVE: - return sprintf(buf, "active"); - default: - return sprintf(buf, "unknown"); - } + return tz->ops->get_trip_type(tz, trip, buf); } static ssize_t @@ -197,8 +160,7 @@ trip_point_temp_show(struct device *dev, struct device_attribute *attr, char *buf) { struct thermal_zone_device *tz = to_thermal_zone(dev); - int trip, ret; - long temperature; + int trip; if (!tz->ops->get_trip_temp) return -EPERM; @@ -206,77 +168,12 @@ trip_point_temp_show(struct device *dev, struct device_attribute *attr, if (!sscanf(attr->attr.name, "trip_point_%d_temp", &trip)) return -EINVAL; - ret = tz->ops->get_trip_temp(tz, trip, &temperature); - - if (ret) - return ret; - - return sprintf(buf, "%ld\n", temperature); -} - -static ssize_t -passive_store(struct device *dev, struct device_attribute *attr, - const char *buf, size_t count) -{ - struct thermal_zone_device *tz = to_thermal_zone(dev); - struct thermal_cooling_device *cdev = NULL; - int state; - - if (!sscanf(buf, "%d\n", &state)) - return -EINVAL; - - if (state && !tz->forced_passive) { - mutex_lock(&thermal_list_lock); - list_for_each_entry(cdev, &thermal_cdev_list, node) { - if (!strncmp("Processor", cdev->type, - sizeof("Processor"))) - thermal_zone_bind_cooling_device(tz, - THERMAL_TRIPS_NONE, - cdev); - } - mutex_unlock(&thermal_list_lock); - } else if (!state && tz->forced_passive) { - mutex_lock(&thermal_list_lock); - list_for_each_entry(cdev, &thermal_cdev_list, node) { - if (!strncmp("Processor", cdev->type, - sizeof("Processor"))) - thermal_zone_unbind_cooling_device(tz, - THERMAL_TRIPS_NONE, - cdev); - } - mutex_unlock(&thermal_list_lock); - } - - tz->tc1 = 1; - tz->tc2 = 1; - - if (!tz->passive_delay) - tz->passive_delay = 1000; - - if (!tz->polling_delay) - tz->polling_delay = 10000; - - tz->forced_passive = state; - - thermal_zone_device_update(tz); - - return count; -} - -static ssize_t -passive_show(struct device *dev, struct device_attribute *attr, - char *buf) -{ - struct thermal_zone_device *tz = to_thermal_zone(dev); - - return sprintf(buf, "%d\n", tz->forced_passive); + return tz->ops->get_trip_temp(tz, trip, buf); } static DEVICE_ATTR(type, 0444, type_show, NULL); static DEVICE_ATTR(temp, 0444, temp_show, NULL); static DEVICE_ATTR(mode, 0644, mode_show, mode_store); -static DEVICE_ATTR(passive, S_IRUGO | S_IWUSR, passive_show, \ - passive_store); static struct device_attribute trip_point_attrs[] = { __ATTR(trip_point_0_type, 0444, trip_point_type_show, NULL), @@ -339,13 +236,8 @@ thermal_cooling_device_max_state_show(struct device *dev, struct device_attribute *attr, char *buf) { struct thermal_cooling_device *cdev = to_cooling_device(dev); - unsigned long state; - int ret; - ret = cdev->ops->get_max_state(cdev, &state); - if (ret) - return ret; - return sprintf(buf, "%ld\n", state); + return cdev->ops->get_max_state(cdev, buf); } static ssize_t @@ -353,13 +245,8 @@ thermal_cooling_device_cur_state_show(struct device *dev, struct device_attribute *attr, char *buf) { struct thermal_cooling_device *cdev = to_cooling_device(dev); - unsigned long state; - int ret; - ret = cdev->ops->get_cur_state(cdev, &state); - if (ret) - return ret; - return sprintf(buf, "%ld\n", state); + return cdev->ops->get_cur_state(cdev, buf); } static ssize_t @@ -368,10 +255,10 @@ thermal_cooling_device_cur_state_store(struct device *dev, const char *buf, size_t count) { struct thermal_cooling_device *cdev = to_cooling_device(dev); - unsigned long state; + int state; int result; - if (!sscanf(buf, "%ld\n", &state)) + if (!sscanf(buf, "%d\n", &state)) return -EINVAL; if (state < 0) @@ -425,20 +312,13 @@ static DEVICE_ATTR(name, 0444, name_show, NULL); static ssize_t temp_input_show(struct device *dev, struct device_attribute *attr, char *buf) { - long temperature; - int ret; struct thermal_hwmon_attr *hwmon_attr = container_of(attr, struct thermal_hwmon_attr, attr); struct thermal_zone_device *tz = container_of(hwmon_attr, struct thermal_zone_device, temp_input); - ret = tz->ops->get_temp(tz, &temperature); - - if (ret) - return ret; - - return sprintf(buf, "%ld\n", temperature); + return tz->ops->get_temp(tz, buf); } static ssize_t @@ -450,14 +330,8 @@ temp_crit_show(struct device *dev, struct device_attribute *attr, struct thermal_zone_device *tz = container_of(hwmon_attr, struct thermal_zone_device, temp_crit); - long temperature; - int ret; - - ret = tz->ops->get_trip_temp(tz, 0, &temperature); - if (ret) - return ret; - return sprintf(buf, "%ld\n", temperature); + return tz->ops->get_trip_temp(tz, 0, buf); } @@ -578,97 +452,6 @@ thermal_remove_hwmon_sysfs(struct thermal_zone_device *tz) } #endif -static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, - int delay) -{ - cancel_delayed_work(&(tz->poll_queue)); - - if (!delay) - return; - - if (delay > 1000) - schedule_delayed_work(&(tz->poll_queue), - round_jiffies(msecs_to_jiffies(delay))); - else - schedule_delayed_work(&(tz->poll_queue), - msecs_to_jiffies(delay)); -} - -static void thermal_zone_device_passive(struct thermal_zone_device *tz, - int temp, int trip_temp, int trip) -{ - int trend = 0; - struct thermal_cooling_device_instance *instance; - struct thermal_cooling_device *cdev; - long state, max_state; - - /* - * Above Trip? - * ----------- - * Calculate the thermal trend (using the passive cooling equation) - * and modify the performance limit for all passive cooling devices - * accordingly. Note that we assume symmetry. - */ - if (temp >= trip_temp) { - tz->passive = true; - - trend = (tz->tc1 * (temp - tz->last_temperature)) + - (tz->tc2 * (temp - trip_temp)); - - /* Heating up? */ - if (trend > 0) { - list_for_each_entry(instance, &tz->cooling_devices, - node) { - if (instance->trip != trip) - continue; - cdev = instance->cdev; - cdev->ops->get_cur_state(cdev, &state); - cdev->ops->get_max_state(cdev, &max_state); - if (state++ < max_state) - cdev->ops->set_cur_state(cdev, state); - } - } else if (trend < 0) { /* Cooling off? */ - list_for_each_entry(instance, &tz->cooling_devices, - node) { - if (instance->trip != trip) - continue; - cdev = instance->cdev; - cdev->ops->get_cur_state(cdev, &state); - cdev->ops->get_max_state(cdev, &max_state); - if (state > 0) - cdev->ops->set_cur_state(cdev, --state); - } - } - return; - } - - /* - * Below Trip? - * ----------- - * Implement passive cooling hysteresis to slowly increase performance - * and avoid thrashing around the passive trip point. Note that we - * assume symmetry. - */ - list_for_each_entry(instance, &tz->cooling_devices, node) { - if (instance->trip != trip) - continue; - cdev = instance->cdev; - cdev->ops->get_cur_state(cdev, &state); - cdev->ops->get_max_state(cdev, &max_state); - if (state > 0) - cdev->ops->set_cur_state(cdev, --state); - if (state == 0) - tz->passive = false; - } -} - -static void thermal_zone_device_check(struct work_struct *work) -{ - struct thermal_zone_device *tz = container_of(work, struct - thermal_zone_device, - poll_queue.work); - thermal_zone_device_update(tz); -} /** * thermal_zone_bind_cooling_device - bind a cooling device to a thermal zone @@ -938,114 +721,26 @@ void thermal_cooling_device_unregister(struct EXPORT_SYMBOL(thermal_cooling_device_unregister); -/** - * thermal_zone_device_update - force an update of a thermal zone's state - * @ttz: the thermal zone to update - */ - -void thermal_zone_device_update(struct thermal_zone_device *tz) -{ - int count, ret = 0; - long temp, trip_temp; - enum thermal_trip_type trip_type; - struct thermal_cooling_device_instance *instance; - struct thermal_cooling_device *cdev; - - mutex_lock(&tz->lock); - - tz->ops->get_temp(tz, &temp); - - for (count = 0; count < tz->trips; count++) { - tz->ops->get_trip_type(tz, count, &trip_type); - tz->ops->get_trip_temp(tz, count, &trip_temp); - - switch (trip_type) { - case THERMAL_TRIP_CRITICAL: - if (temp > trip_temp) { - if (tz->ops->notify) - ret = tz->ops->notify(tz, count, - trip_type); - if (!ret) { - printk(KERN_EMERG - "Critical temperature reached (%ld C), shutting down.\n", - temp/1000); - orderly_poweroff(true); - } - } - break; - case THERMAL_TRIP_HOT: - if (temp > trip_temp) - if (tz->ops->notify) - tz->ops->notify(tz, count, trip_type); - break; - case THERMAL_TRIP_ACTIVE: - list_for_each_entry(instance, &tz->cooling_devices, - node) { - if (instance->trip != count) - continue; - - cdev = instance->cdev; - - if (temp > trip_temp) - cdev->ops->set_cur_state(cdev, 1); - else - cdev->ops->set_cur_state(cdev, 0); - } - break; - case THERMAL_TRIP_PASSIVE: - if (temp > trip_temp || tz->passive) - thermal_zone_device_passive(tz, temp, - trip_temp, count); - break; - } - } - - if (tz->forced_passive) - thermal_zone_device_passive(tz, temp, tz->forced_passive, - THERMAL_TRIPS_NONE); - - tz->last_temperature = temp; - if (tz->passive) - thermal_zone_device_set_polling(tz, tz->passive_delay); - else if (tz->polling_delay) - thermal_zone_device_set_polling(tz, tz->polling_delay); - mutex_unlock(&tz->lock); -} -EXPORT_SYMBOL(thermal_zone_device_update); - /** * thermal_zone_device_register - register a new thermal zone device * @type: the thermal zone device type * @trips: the number of trip points the thermal zone support * @devdata: private device data * @ops: standard thermal zone device callbacks - * @tc1: thermal coefficient 1 for passive calculations - * @tc2: thermal coefficient 2 for passive calculations - * @passive_delay: number of milliseconds to wait between polls when - * performing passive cooling - * @polling_delay: number of milliseconds to wait between polls when checking - * whether trip points have been crossed (0 for interrupt - * driven systems) * * thermal_zone_device_unregister() must be called when the device is no - * longer needed. The passive cooling formula uses tc1 and tc2 as described in - * section 11.1.5.1 of the ACPI specification 3.0. + * longer needed. */ struct thermal_zone_device *thermal_zone_device_register(char *type, int trips, void *devdata, struct thermal_zone_device_ops - *ops, int tc1, int - tc2, - int passive_delay, - int polling_delay) + *ops) { struct thermal_zone_device *tz; struct thermal_cooling_device *pos; - enum thermal_trip_type trip_type; int result; int count; - int passive = 0; if (strlen(type) >= THERMAL_NAME_LENGTH) return ERR_PTR(-EINVAL); @@ -1074,11 +769,6 @@ struct thermal_zone_device *thermal_zone_device_register(char *type, tz->device.class = &thermal_class; tz->devdata = devdata; tz->trips = trips; - tz->tc1 = tc1; - tz->tc2 = tc2; - tz->passive_delay = passive_delay; - tz->polling_delay = polling_delay; - dev_set_name(&tz->device, "thermal_zone%d", tz->id); result = device_register(&tz->device); if (result) { @@ -1108,18 +798,8 @@ struct thermal_zone_device *thermal_zone_device_register(char *type, TRIP_POINT_ATTR_ADD(&tz->device, count, result); if (result) goto unregister; - tz->ops->get_trip_type(tz, count, &trip_type); - if (trip_type == THERMAL_TRIP_PASSIVE) - passive = 1; } - if (!passive) - result = device_create_file(&tz->device, - &dev_attr_passive); - - if (result) - goto unregister; - result = thermal_add_hwmon_sysfs(tz); if (result) goto unregister; @@ -1134,10 +814,6 @@ struct thermal_zone_device *thermal_zone_device_register(char *type, } mutex_unlock(&thermal_list_lock); - INIT_DELAYED_WORK(&(tz->poll_queue), thermal_zone_device_check); - - thermal_zone_device_update(tz); - if (!result) return tz; @@ -1177,8 +853,6 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz) tz->ops->unbind(tz, cdev); mutex_unlock(&thermal_list_lock); - thermal_zone_device_set_polling(tz, 0); - if (tz->type[0]) device_remove_file(&tz->device, &dev_attr_type); device_remove_file(&tz->device, &dev_attr_temp); diff --git a/trunk/drivers/usb/atm/cxacru.c b/trunk/drivers/usb/atm/cxacru.c index 6789089e2461..5ed4ae07bac1 100644 --- a/trunk/drivers/usb/atm/cxacru.c +++ b/trunk/drivers/usb/atm/cxacru.c @@ -485,7 +485,7 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, usb_err(instance->usbatm, "requested transfer size too large (%d, %d)\n", wbuflen, rbuflen); ret = -ENOMEM; - goto err; + goto fail; } mutex_lock(&instance->cm_serialize); @@ -565,7 +565,6 @@ static int cxacru_cm(struct cxacru_data *instance, enum cxacru_cm_request cm, dbg("cm %#x", cm); fail: mutex_unlock(&instance->cm_serialize); -err: return ret; } diff --git a/trunk/drivers/usb/class/usbtmc.c b/trunk/drivers/usb/class/usbtmc.c index c40a9b284cc9..0f5c05f6f9df 100644 --- a/trunk/drivers/usb/class/usbtmc.c +++ b/trunk/drivers/usb/class/usbtmc.c @@ -50,7 +50,6 @@ static struct usb_device_id usbtmc_devices[] = { { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 0), }, - { USB_INTERFACE_INFO(USB_CLASS_APP_SPEC, 3, 1), }, { 0, } /* terminating entry */ }; MODULE_DEVICE_TABLE(usb, usbtmc_devices); @@ -107,13 +106,12 @@ static int usbtmc_open(struct inode *inode, struct file *filp) { struct usb_interface *intf; struct usbtmc_device_data *data; - int retval = 0; + int retval = -ENODEV; intf = usb_find_interface(&usbtmc_driver, iminor(inode)); if (!intf) { printk(KERN_ERR KBUILD_MODNAME ": can not find device for minor %d", iminor(inode)); - retval = -ENODEV; goto exit; } diff --git a/trunk/drivers/usb/core/devio.c b/trunk/drivers/usb/core/devio.c index 6585f527e381..7513bb083c15 100644 --- a/trunk/drivers/usb/core/devio.c +++ b/trunk/drivers/usb/core/devio.c @@ -359,6 +359,11 @@ static void destroy_async(struct dev_state *ps, struct list_head *list) spin_lock_irqsave(&ps->lock, flags); } spin_unlock_irqrestore(&ps->lock, flags); + as = async_getcompleted(ps); + while (as) { + free_async(as); + as = async_getcompleted(ps); + } } static void destroy_async_on_interface(struct dev_state *ps, @@ -638,7 +643,6 @@ static int usbdev_release(struct inode *inode, struct file *file) struct dev_state *ps = file->private_data; struct usb_device *dev = ps->dev; unsigned int ifnum; - struct async *as; usb_lock_device(dev); @@ -657,12 +661,6 @@ static int usbdev_release(struct inode *inode, struct file *file) usb_unlock_device(dev); usb_put_dev(dev); put_pid(ps->disc_pid); - - as = async_getcompleted(ps); - while (as) { - free_async(as); - as = async_getcompleted(ps); - } kfree(ps); return 0; } diff --git a/trunk/drivers/usb/host/ehci-q.c b/trunk/drivers/usb/host/ehci-q.c index ecc9b66c03cd..3712b925b315 100644 --- a/trunk/drivers/usb/host/ehci-q.c +++ b/trunk/drivers/usb/host/ehci-q.c @@ -1095,8 +1095,7 @@ static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) prev->qh_next = qh->qh_next; wmb (); - /* If the controller isn't running, we don't have to wait for it */ - if (unlikely(!HC_IS_RUNNING(ehci_to_hcd(ehci)->state))) { + if (unlikely (ehci_to_hcd(ehci)->state == HC_STATE_HALT)) { /* if (unlikely (qh->reclaim != 0)) * this will recurse, probably not much */ diff --git a/trunk/drivers/usb/host/ehci-sched.c b/trunk/drivers/usb/host/ehci-sched.c index 1d0b49e3f192..07bcb931021b 100644 --- a/trunk/drivers/usb/host/ehci-sched.c +++ b/trunk/drivers/usb/host/ehci-sched.c @@ -1536,7 +1536,7 @@ itd_link_urb ( struct ehci_itd, itd_list); list_move_tail (&itd->itd_list, &stream->td_list); itd->stream = iso_stream_get (stream); - itd->urb = urb; + itd->urb = usb_get_urb (urb); itd_init (ehci, stream, itd); } @@ -1645,7 +1645,7 @@ itd_complete ( (void) disable_periodic(ehci); ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; - if (unlikely(list_is_singular(&stream->td_list))) { + if (unlikely (list_empty (&stream->td_list))) { ehci_to_hcd(ehci)->self.bandwidth_allocated -= stream->bandwidth; ehci_vdbg (ehci, @@ -1656,6 +1656,7 @@ itd_complete ( iso_stream_put (ehci, stream); done: + usb_put_urb(urb); itd->urb = NULL; if (ehci->clock_frame != itd->frame || itd->index[7] != -1) { /* OK to recycle this ITD now. */ @@ -1948,7 +1949,7 @@ sitd_link_urb ( struct ehci_sitd, sitd_list); list_move_tail (&sitd->sitd_list, &stream->td_list); sitd->stream = iso_stream_get (stream); - sitd->urb = urb; + sitd->urb = usb_get_urb (urb); sitd_patch(ehci, stream, sitd, sched, packet); sitd_link (ehci, (next_uframe >> 3) % ehci->periodic_size, @@ -2033,7 +2034,7 @@ sitd_complete ( (void) disable_periodic(ehci); ehci_to_hcd(ehci)->self.bandwidth_isoc_reqs--; - if (list_is_singular(&stream->td_list)) { + if (list_empty (&stream->td_list)) { ehci_to_hcd(ehci)->self.bandwidth_allocated -= stream->bandwidth; ehci_vdbg (ehci, @@ -2044,6 +2045,7 @@ sitd_complete ( iso_stream_put (ehci, stream); /* OK to recycle this SITD now that its completion callback ran. */ done: + usb_put_urb(urb); sitd->urb = NULL; sitd->stream = NULL; list_move(&sitd->sitd_list, &stream->free_list); diff --git a/trunk/drivers/usb/image/mdc800.c b/trunk/drivers/usb/image/mdc800.c index 972f20b3406c..878c77ca086e 100644 --- a/trunk/drivers/usb/image/mdc800.c +++ b/trunk/drivers/usb/image/mdc800.c @@ -499,7 +499,6 @@ static int mdc800_usb_probe (struct usb_interface *intf, retval = usb_register_dev(intf, &mdc800_class); if (retval) { dev_err(&intf->dev, "Not able to get a minor for this device.\n"); - mutex_unlock(&mdc800->io_lock); return -ENODEV; } diff --git a/trunk/drivers/usb/misc/adutux.c b/trunk/drivers/usb/misc/adutux.c index 203526542013..7b6922e08ed1 100644 --- a/trunk/drivers/usb/misc/adutux.c +++ b/trunk/drivers/usb/misc/adutux.c @@ -376,7 +376,7 @@ static int adu_release(struct inode *inode, struct file *file) if (dev->open_count <= 0) { dbg(1," %s : device not opened", __func__); retval = -ENODEV; - goto unlock; + goto exit; } adu_release_internal(dev); @@ -385,9 +385,9 @@ static int adu_release(struct inode *inode, struct file *file) if (!dev->open_count) /* ... and we're the last user */ adu_delete(dev); } -unlock: - mutex_unlock(&adutux_mutex); + exit: + mutex_unlock(&adutux_mutex); dbg(2," %s : leave, return value %d", __func__, retval); return retval; } diff --git a/trunk/drivers/usb/misc/vstusb.c b/trunk/drivers/usb/misc/vstusb.c index f26ea8dc1577..63dff9ba73c5 100644 --- a/trunk/drivers/usb/misc/vstusb.c +++ b/trunk/drivers/usb/misc/vstusb.c @@ -401,7 +401,6 @@ static ssize_t vstusb_write(struct file *file, const char __user *buffer, } if (copy_from_user(buf, buffer, count)) { - mutex_unlock(&vstdev->lock); dev_err(&dev->dev, "%s: can't copy_from_user\n", __func__); retval = -EFAULT; goto exit; diff --git a/trunk/drivers/usb/serial/cp2101.c b/trunk/drivers/usb/serial/cp2101.c index 9b4082b58c5b..027f4b7dde86 100644 --- a/trunk/drivers/usb/serial/cp2101.c +++ b/trunk/drivers/usb/serial/cp2101.c @@ -79,7 +79,6 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(0x10C4, 0x814A) }, /* West Mountain Radio RIGblaster P&P */ { USB_DEVICE(0x10C4, 0x814B) }, /* West Mountain Radio RIGtalk */ { USB_DEVICE(0x10C4, 0x815E) }, /* Helicomm IP-Link 1220-DVM */ - { USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */ { USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */ { USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */ { USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */ diff --git a/trunk/drivers/usb/serial/ftdi_sio.c b/trunk/drivers/usb/serial/ftdi_sio.c index ae84c326a540..f92f4d773374 100644 --- a/trunk/drivers/usb/serial/ftdi_sio.c +++ b/trunk/drivers/usb/serial/ftdi_sio.c @@ -663,11 +663,6 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(ALTI2_VID, ALTI2_N3_PID) }, { USB_DEVICE(FTDI_VID, DIEBOLD_BCS_SE923_PID) }, { USB_DEVICE(FTDI_VID, FTDI_NDI_HUC_PID) }, - { USB_DEVICE(ATMEL_VID, STK541_PID) }, - { USB_DEVICE(DE_VID, STB_PID) }, - { USB_DEVICE(DE_VID, WHT_PID) }, - { USB_DEVICE(ADI_VID, ADI_GNICE_PID), - .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { }, /* Optional parameter entry */ { } /* Terminating entry */ }; diff --git a/trunk/drivers/usb/serial/ftdi_sio.h b/trunk/drivers/usb/serial/ftdi_sio.h index daaf63db0b50..e300c840f8ca 100644 --- a/trunk/drivers/usb/serial/ftdi_sio.h +++ b/trunk/drivers/usb/serial/ftdi_sio.h @@ -892,26 +892,6 @@ */ #define DIEBOLD_BCS_SE923_PID 0xfb99 -/* - * Atmel STK541 - */ -#define ATMEL_VID 0x03eb /* Vendor ID */ -#define STK541_PID 0x2109 /* Zigbee Controller */ - -/* - * Dresden Elektronic Sensor Terminal Board - */ -#define DE_VID 0x1cf1 /* Vendor ID */ -#define STB_PID 0x0001 /* Sensor Terminal Board */ -#define WHT_PID 0x0004 /* Wireless Handheld Terminal */ - -/* - * Blackfin gnICE JTAG - * http://docs.blackfin.uclinux.org/doku.php?id=hw:jtag:gnice - */ -#define ADI_VID 0x0456 -#define ADI_GNICE_PID 0xF000 - /* * BmRequestType: 1100 0000b * bRequest: FTDI_E2_READ diff --git a/trunk/drivers/usb/serial/option.c b/trunk/drivers/usb/serial/option.c index 61ebddc48497..b7c132bded7f 100644 --- a/trunk/drivers/usb/serial/option.c +++ b/trunk/drivers/usb/serial/option.c @@ -89,7 +89,6 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po #define OPTION_PRODUCT_ETNA_MODEM_GT 0x7041 #define OPTION_PRODUCT_ETNA_MODEM_EX 0x7061 #define OPTION_PRODUCT_ETNA_KOI_MODEM 0x7100 -#define OPTION_PRODUCT_GTM380_MODEM 0x7201 #define HUAWEI_VENDOR_ID 0x12D1 #define HUAWEI_PRODUCT_E600 0x1001 @@ -198,7 +197,6 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po /* OVATION PRODUCTS */ #define NOVATELWIRELESS_PRODUCT_MC727 0x4100 #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 -#define NOVATELWIRELESS_PRODUCT_U727 0x5010 /* FUTURE NOVATEL PRODUCTS */ #define NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED 0X6000 @@ -290,11 +288,15 @@ static int option_send_setup(struct tty_struct *tty, struct usb_serial_port *po /* ZTE PRODUCTS */ #define ZTE_VENDOR_ID 0x19d2 -#define ZTE_PRODUCT_MF622 0x0001 #define ZTE_PRODUCT_MF628 0x0015 #define ZTE_PRODUCT_MF626 0x0031 #define ZTE_PRODUCT_CDMA_TECH 0xfffe +/* Ericsson products */ +#define ERICSSON_VENDOR_ID 0x0bdb +#define ERICSSON_PRODUCT_F3507G_1 0x1900 +#define ERICSSON_PRODUCT_F3507G_2 0x1902 + #define BENQ_VENDOR_ID 0x04a5 #define BENQ_PRODUCT_H10 0x4068 @@ -323,7 +325,6 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_GT) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_MODEM_EX) }, { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_ETNA_KOI_MODEM) }, - { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_GTM380_MODEM) }, { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_Q101) }, { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_Q111) }, { USB_DEVICE(QUANTA_VENDOR_ID, QUANTA_PRODUCT_GLX) }, @@ -414,7 +415,6 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ - { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U727) }, /* Novatel MC727/U727/USB727 */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_FULLSPEED) }, /* Novatel EVDO product */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_FULLSPEED) }, /* Novatel HSPA product */ { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_EMBEDDED_FULLSPEED) }, /* Novatel EVDO Embedded product */ @@ -442,6 +442,7 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_CINGULAR) }, /* Dell Wireless HSDPA 5520 == Novatel Expedite EU860D */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_L) }, /* Dell Wireless HSDPA 5520 */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5520_MINICARD_GENERIC_I) }, /* Dell Wireless 5520 Voda I Mobile Broadband (3G HSDPA) Minicard */ + { USB_DEVICE(DELL_VENDOR_ID, 0x8147) }, /* Dell Wireless 5530 Mobile Broadband (3G HSPA) Mini-Card */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_SPRINT) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_TELUS) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ { USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5730_MINICARD_VZW) }, /* Dell Wireless 5730 Mobile Broadband EVDO/HSPA Mini-Card */ @@ -509,10 +510,11 @@ static struct usb_device_id option_ids[] = { { USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */ { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */ { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) }, - { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622) }, { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF626) }, { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_MF628) }, { USB_DEVICE(ZTE_VENDOR_ID, ZTE_PRODUCT_CDMA_TECH) }, + { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G_1) }, + { USB_DEVICE(ERICSSON_VENDOR_ID, ERICSSON_PRODUCT_F3507G_2) }, { USB_DEVICE(BENQ_VENDOR_ID, BENQ_PRODUCT_H10) }, { USB_DEVICE(0x1da5, 0x4515) }, /* BenQ H20 */ { } /* Terminating entry */ diff --git a/trunk/drivers/usb/storage/unusual_devs.h b/trunk/drivers/usb/storage/unusual_devs.h index cfde74a6faa3..6f59c8e510ea 100644 --- a/trunk/drivers/usb/storage/unusual_devs.h +++ b/trunk/drivers/usb/storage/unusual_devs.h @@ -226,7 +226,7 @@ UNUSUAL_DEV( 0x0421, 0x047c, 0x0370, 0x0610, US_FL_MAX_SECTORS_64 ), /* Reported by Manuel Osdoba */ -UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x9999, +UNUSUAL_DEV( 0x0421, 0x0492, 0x0452, 0x0452, "Nokia", "Nokia 6233", US_SC_DEVICE, US_PR_DEVICE, NULL, @@ -951,9 +951,7 @@ UNUSUAL_DEV( 0x066f, 0x8000, 0x0001, 0x0001, US_FL_FIX_CAPACITY ), /* Reported by Richard -=[]=- */ -/* Change to bcdDeviceMin (0x0100 to 0x0001) reported by - * Thomas Bartosik */ -UNUSUAL_DEV( 0x067b, 0x2507, 0x0001, 0x0100, +UNUSUAL_DEV( 0x067b, 0x2507, 0x0100, 0x0100, "Prolific Technology Inc.", "Mass Storage Device", US_SC_DEVICE, US_PR_DEVICE, NULL, @@ -1392,16 +1390,6 @@ UNUSUAL_DEV( 0x0af0, 0x7401, 0x0000, 0x0000, US_SC_DEVICE, US_PR_DEVICE, NULL, 0 ), -/* Reported by Jan Dumon - * This device (wrongly) has a vendor-specific device descriptor. - * The entry is needed so usb-storage can bind to it's mass-storage - * interface as an interface driver */ -UNUSUAL_DEV( 0x0af0, 0x7501, 0x0000, 0x0000, - "Option", - "GI 0431 SD-Card", - US_SC_DEVICE, US_PR_DEVICE, NULL, - 0 ), - /* Reported by Ben Efros */ UNUSUAL_DEV( 0x0bc2, 0x3010, 0x0000, 0x0000, "Seagate", diff --git a/trunk/drivers/usb/wusbcore/wa-xfer.c b/trunk/drivers/usb/wusbcore/wa-xfer.c index 613a5fc490d3..238a96aee3a1 100644 --- a/trunk/drivers/usb/wusbcore/wa-xfer.c +++ b/trunk/drivers/usb/wusbcore/wa-xfer.c @@ -921,10 +921,8 @@ static void wa_urb_enqueue_b(struct wa_xfer *xfer) result = -ENODEV; /* FIXME: segmentation broken -- kills DWA */ mutex_lock(&wusbhc->mutex); /* get a WUSB dev */ - if (urb->dev == NULL) { - mutex_unlock(&wusbhc->mutex); + if (urb->dev == NULL) goto error_dev_gone; - } wusb_dev = __wusb_dev_get_by_usb_dev(wusbhc, urb->dev); if (wusb_dev == NULL) { mutex_unlock(&wusbhc->mutex); diff --git a/trunk/drivers/video/aty/radeon_pm.c b/trunk/drivers/video/aty/radeon_pm.c index c6d7cc76516f..81603f85e17e 100644 --- a/trunk/drivers/video/aty/radeon_pm.c +++ b/trunk/drivers/video/aty/radeon_pm.c @@ -2507,25 +2507,6 @@ static void radeon_reinitialize_QW(struct radeonfb_info *rinfo) #endif /* CONFIG_PPC_OF */ -static void radeonfb_whack_power_state(struct radeonfb_info *rinfo, pci_power_t state) -{ - u16 pwr_cmd; - - for (;;) { - pci_read_config_word(rinfo->pdev, - rinfo->pm_reg+PCI_PM_CTRL, - &pwr_cmd); - if (pwr_cmd & 2) - break; - pwr_cmd = (pwr_cmd & ~PCI_PM_CTRL_STATE_MASK) | 2; - pci_write_config_word(rinfo->pdev, - rinfo->pm_reg+PCI_PM_CTRL, - pwr_cmd); - msleep(500); - } - rinfo->pdev->current_state = state; -} - static void radeon_set_suspend(struct radeonfb_info *rinfo, int suspend) { u32 tmp; @@ -2577,11 +2558,6 @@ static void radeon_set_suspend(struct radeonfb_info *rinfo, int suspend) /* Switch PCI power management to D2. */ pci_disable_device(rinfo->pdev); pci_save_state(rinfo->pdev); - /* The chip seems to need us to whack the PM register - * repeatedly until it sticks. We do that -prior- to - * calling pci_set_power_state() - */ - radeonfb_whack_power_state(rinfo, PCI_D2); pci_set_power_state(rinfo->pdev, PCI_D2); } else { printk(KERN_DEBUG "radeonfb (%s): switching to D0 state...\n", diff --git a/trunk/drivers/video/logo/logo_linux_clut224.ppm b/trunk/drivers/video/logo/logo_linux_clut224.ppm index de93ff3fc1ad..3c14e43b82fe 100644 --- a/trunk/drivers/video/logo/logo_linux_clut224.ppm +++ b/trunk/drivers/video/logo/logo_linux_clut224.ppm @@ -1,2828 +1,1604 @@ P3 -145 113 +# Standard 224-color Linux logo +80 80 255 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 3 4 4 6 7 7 -8 10 10 8 10 10 6 8 8 6 7 7 3 4 4 2 2 2 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 4 5 5 17 18 17 -27 29 28 35 37 36 40 43 41 43 45 43 40 43 41 37 39 37 -32 34 33 27 30 29 23 25 24 17 21 21 15 18 18 12 15 15 -11 13 13 8 10 10 6 7 7 3 4 4 1 1 1 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 13 13 13 32 34 33 49 51 48 60 60 56 58 59 55 -55 57 54 55 56 53 49 51 48 43 45 43 39 40 39 33 37 35 -28 31 30 23 27 26 20 23 23 17 20 20 14 17 17 13 16 16 -11 14 14 10 13 13 10 12 12 9 11 11 8 10 10 6 7 7 -2 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 6 7 7 12 15 15 -12 15 15 8 9 9 2 3 3 0 0 0 1 1 1 25 27 26 -55 56 53 68 70 65 65 66 61 65 66 61 63 64 60 63 64 60 -58 59 55 51 52 50 47 48 46 41 42 42 35 37 36 30 32 31 -26 28 27 20 24 24 18 22 22 16 19 19 14 17 17 13 16 16 -12 15 15 11 14 14 10 13 13 10 12 12 9 11 11 8 10 10 -8 9 9 6 8 8 3 3 3 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 6 7 7 20 24 24 23 27 26 -23 27 26 18 22 22 11 13 13 23 24 24 61 63 57 72 73 67 -72 73 67 68 70 65 68 70 65 68 70 65 63 64 60 58 59 55 -55 56 53 47 48 46 41 42 42 35 37 36 30 32 31 26 28 27 -20 24 24 18 22 22 16 20 20 15 19 19 14 17 17 13 16 16 -12 15 15 12 15 15 11 14 14 10 13 13 10 12 12 9 11 11 -8 10 10 8 9 9 7 9 9 6 7 7 1 2 2 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 1 1 1 4 5 5 5 6 5 4 5 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 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 15 19 19 40 41 39 53 55 47 -33 36 34 27 30 29 51 52 50 72 73 67 72 73 67 72 73 67 -72 73 67 68 70 65 68 70 65 63 64 60 58 59 55 51 52 50 -47 48 46 40 43 41 33 37 35 30 32 31 26 28 27 20 24 24 -18 22 22 17 21 21 16 19 19 14 18 18 14 17 17 13 17 17 -13 16 16 12 15 15 12 15 15 11 14 14 10 13 13 10 12 12 -9 11 11 8 10 10 8 9 9 7 9 9 6 8 8 3 4 4 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 2 2 6 8 8 10 12 12 10 12 12 10 12 12 10 12 12 -6 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 20 23 23 71 71 57 131 127 93 -115 113 82 63 64 60 72 73 67 72 73 67 72 73 67 72 73 67 -68 70 65 65 66 61 61 63 57 55 57 54 49 51 48 43 45 43 -39 40 39 33 36 34 28 31 30 23 27 26 20 24 24 20 23 23 -17 21 21 16 20 20 15 19 19 15 18 18 14 18 18 14 17 17 -13 17 17 13 16 16 12 15 15 12 15 15 11 14 14 10 13 13 -10 12 12 9 11 11 8 10 10 7 9 9 7 9 9 6 8 8 -4 5 5 0 0 0 0 0 0 0 0 0 1 1 1 6 7 7 -10 12 12 10 12 12 10 12 12 10 12 12 10 12 12 10 12 12 -10 12 12 3 4 4 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 18 22 22 71 71 57 144 139 99 -84 83 72 68 70 65 72 73 67 72 73 67 68 70 65 65 66 61 -63 64 60 55 57 54 51 52 50 47 48 46 40 43 41 35 37 36 -30 32 31 27 29 28 23 27 26 20 24 24 18 22 22 17 21 21 -16 20 20 15 19 19 15 19 19 15 19 19 15 18 18 14 18 18 -14 17 17 13 17 17 13 16 16 12 15 15 12 15 15 11 14 14 -10 13 13 9 12 12 9 11 11 8 10 10 7 9 9 6 8 8 -6 8 8 3 4 4 0 0 0 2 2 2 8 10 10 10 12 12 -10 12 12 10 12 12 11 13 13 36 38 35 61 61 53 48 49 45 -10 12 12 7 9 9 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 15 19 19 61 61 53 84 83 72 -68 70 65 72 73 67 68 70 65 68 70 65 63 64 60 58 59 55 -51 52 50 47 48 46 41 42 42 37 39 37 32 35 33 28 31 30 -23 27 26 20 24 24 20 23 23 18 22 22 17 21 21 17 21 21 -17 21 21 17 21 21 17 20 20 16 20 20 16 20 20 16 19 19 -15 18 18 14 18 18 13 17 17 13 16 16 12 15 15 12 15 15 -11 14 14 10 13 13 9 12 12 9 11 11 8 10 10 7 9 9 -6 8 8 6 8 8 5 6 5 9 11 11 10 12 12 10 12 12 -19 20 18 82 81 62 149 145 103 160 154 106 142 137 94 96 95 69 -10 12 12 10 12 12 1 1 1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 10 12 12 44 46 43 68 70 65 -72 73 67 68 70 65 68 70 65 63 64 60 55 57 54 49 51 48 -43 45 43 39 40 39 33 37 35 30 32 31 26 28 27 23 27 26 -20 24 24 18 22 22 18 22 22 18 22 22 18 22 22 20 23 23 -20 24 24 23 25 24 23 25 24 22 24 23 20 23 23 18 22 22 -17 20 20 15 19 19 15 18 18 14 17 17 13 16 16 12 15 15 -11 14 14 11 13 13 10 12 12 9 11 11 8 10 10 8 9 9 -7 9 9 7 9 9 10 12 12 10 12 12 10 12 12 71 71 57 -164 159 111 186 182 128 186 182 128 171 165 117 151 147 98 96 95 69 -10 12 12 10 12 12 3 3 3 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 8 10 10 63 64 60 68 70 65 -72 73 67 68 70 65 63 64 60 55 57 54 47 48 46 40 43 41 -33 37 35 30 32 31 27 29 28 23 27 26 20 24 24 20 23 23 -18 22 22 18 22 22 20 23 22 21 25 23 23 27 26 27 29 28 -28 31 30 31 33 31 31 33 31 31 33 31 28 31 30 26 28 27 -23 25 24 20 23 22 16 20 20 15 18 18 14 17 17 13 16 16 -12 15 15 11 14 14 10 13 13 10 12 12 9 11 11 8 10 10 -10 12 12 10 13 13 10 12 12 12 14 14 96 95 69 165 161 109 -186 182 128 192 187 134 192 187 134 176 171 126 160 154 106 103 101 77 -10 12 12 10 12 12 5 6 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 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 35 37 36 68 70 65 72 73 67 -68 70 65 65 66 61 58 59 55 49 51 48 40 43 41 33 37 35 -28 31 30 23 27 26 20 24 24 20 23 23 18 22 22 18 22 22 -18 22 22 20 23 23 23 27 26 27 30 29 32 35 33 37 39 37 -40 43 41 44 46 43 46 47 43 44 46 43 40 43 41 36 38 35 -31 33 31 27 29 28 22 24 23 17 21 21 15 18 18 14 17 17 -13 16 16 12 15 15 11 14 14 11 14 14 11 13 13 13 16 16 -13 16 16 11 14 14 10 12 12 79 78 62 142 137 94 164 159 111 -178 174 128 192 187 134 192 187 134 176 171 126 160 154 106 96 95 69 -10 12 12 10 12 12 6 7 7 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 55 57 54 68 70 65 72 73 67 -68 70 65 63 64 60 55 56 53 43 45 43 35 37 36 28 31 30 -23 27 26 20 24 24 18 22 22 17 21 21 17 21 21 17 21 21 -20 24 24 25 27 26 31 33 31 38 39 37 46 47 43 53 55 47 -61 61 53 66 65 55 66 65 55 66 65 55 61 61 53 53 55 47 -46 47 43 37 39 37 30 33 30 24 26 24 17 21 21 15 18 18 -13 17 17 12 15 15 12 15 15 13 16 16 14 18 18 14 18 18 -14 17 17 12 15 15 30 31 28 118 116 76 134 131 96 160 154 106 -174 170 121 178 174 128 178 174 128 171 165 117 151 147 98 96 95 69 -10 12 12 10 12 12 6 8 8 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 63 64 60 68 70 65 68 70 65 -65 66 61 58 59 55 49 51 48 39 40 39 30 32 31 23 27 26 -20 24 24 18 22 22 17 21 21 16 20 20 17 21 21 20 23 23 -25 27 26 32 35 33 43 44 41 53 55 47 66 65 55 75 75 61 -82 81 62 84 83 72 87 86 72 87 86 72 82 81 62 75 75 61 -66 65 55 53 55 47 40 41 39 31 33 31 23 25 24 17 20 20 -14 18 18 13 16 16 12 15 15 12 15 15 13 17 17 14 18 18 -14 18 18 13 16 16 46 47 43 96 95 69 125 122 87 142 137 94 -160 154 106 165 161 109 164 159 111 155 149 109 142 137 94 75 75 61 -10 12 12 10 12 12 6 8 8 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 60 60 56 68 70 65 68 70 65 -63 64 60 55 57 54 46 47 45 35 37 36 27 30 29 23 25 24 -18 22 22 17 21 21 16 20 20 17 21 21 18 22 22 23 27 26 -31 33 31 43 44 41 55 56 53 71 71 57 84 83 72 92 91 72 -103 101 77 92 91 72 82 81 62 82 81 62 87 86 72 92 91 72 -84 83 72 71 71 57 55 56 53 43 44 41 30 33 30 22 24 23 -16 19 19 14 17 17 12 15 15 12 15 15 13 16 16 14 18 18 -14 18 18 14 17 17 43 44 41 82 81 62 118 116 76 125 122 87 -142 137 94 144 139 99 144 139 99 134 131 96 118 116 76 53 55 47 -10 12 12 10 12 12 6 8 8 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 47 48 46 63 64 60 63 64 60 -55 57 54 49 51 48 40 43 41 32 34 33 26 28 27 20 24 24 -18 22 22 16 20 20 16 20 20 17 21 21 20 24 24 28 31 30 -40 41 39 53 55 47 75 75 61 90 89 73 87 86 72 48 49 45 -14 14 13 2 2 2 1 2 2 1 1 1 1 1 1 2 2 2 -19 20 18 43 44 41 66 65 55 53 55 47 38 39 37 26 28 27 -18 22 22 14 18 18 13 16 16 12 15 15 12 15 15 13 17 17 -14 18 18 14 18 18 30 31 28 66 65 55 96 95 69 103 101 77 -118 116 76 118 116 76 118 116 76 118 116 76 103 101 77 36 38 35 -10 12 12 10 12 12 6 7 7 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 28 31 30 55 57 54 51 52 50 -49 51 48 41 42 42 35 37 36 28 31 30 23 27 26 20 23 23 -17 21 21 16 20 20 16 20 20 18 22 22 23 27 26 33 36 34 -48 49 45 71 71 57 82 81 62 43 44 41 8 9 9 6 7 7 -6 7 7 6 7 7 6 7 7 5 6 5 4 5 5 3 4 4 -2 3 3 1 2 2 4 5 4 36 38 35 48 49 45 32 35 33 -21 25 23 16 19 19 13 17 17 12 15 15 12 15 15 13 16 16 -14 18 18 14 18 18 16 18 16 36 38 35 61 61 53 82 81 62 -96 95 69 96 95 69 96 95 69 96 95 69 79 78 62 19 20 18 -10 12 12 10 12 12 4 5 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 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 13 13 13 46 47 45 43 45 43 -40 43 41 35 37 36 30 32 31 23 27 26 20 24 24 18 22 22 -17 21 21 16 20 20 17 21 21 20 23 23 27 30 29 40 41 39 -61 61 53 53 55 47 16 17 16 9 11 11 10 12 12 10 12 12 -10 12 12 10 12 12 10 12 12 9 11 11 8 10 10 8 9 9 -6 8 8 5 6 5 4 5 5 2 3 3 19 20 18 38 39 37 -26 28 27 17 21 21 14 17 17 13 16 16 12 15 15 12 15 15 -13 17 17 14 18 18 12 15 15 13 12 7 30 31 28 46 47 43 -53 55 47 66 65 55 66 65 55 53 55 47 36 38 35 10 12 12 -10 12 12 10 12 12 2 3 3 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 1 1 1 33 37 35 35 37 36 -32 35 33 28 31 30 23 27 26 20 24 24 18 22 22 17 21 21 -16 20 20 16 20 20 17 21 21 21 25 23 31 33 31 44 46 43 -31 33 31 11 13 13 12 14 14 12 15 15 13 16 16 14 17 17 -14 17 17 14 17 17 14 17 17 13 16 16 12 15 15 12 14 14 -11 13 13 9 11 11 8 10 10 6 8 8 4 5 5 17 18 17 -30 33 30 20 23 22 15 18 18 13 16 16 12 15 15 12 14 14 -13 16 16 14 17 17 14 18 18 11 12 11 7 7 5 16 17 12 -21 22 20 30 31 28 25 27 25 21 22 20 14 14 13 10 12 12 -10 12 12 9 11 11 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 18 22 22 27 30 29 -27 29 28 40 41 39 53 55 47 53 55 47 53 55 47 46 47 43 -25 27 25 16 20 20 17 21 21 23 25 24 31 33 31 20 20 20 -12 15 15 14 17 17 15 19 19 16 20 20 17 21 21 18 22 22 -18 22 22 18 22 22 18 22 22 17 21 21 17 21 21 16 19 19 -15 18 18 13 16 16 12 15 15 10 12 12 8 10 10 6 8 8 -21 22 21 22 24 23 15 19 19 13 17 17 13 16 16 12 15 15 -12 15 15 13 17 17 14 18 18 14 18 18 13 15 14 10 9 6 -7 7 5 7 7 5 7 7 5 9 11 11 10 12 12 10 12 12 -10 12 12 6 7 7 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 16 17 12 82 81 62 -118 116 76 118 116 76 161 156 96 161 156 96 161 156 96 118 116 76 -118 116 76 96 95 69 53 55 47 22 24 23 14 17 17 13 16 16 -15 19 19 17 21 21 18 22 22 20 24 24 20 24 24 23 27 26 -23 27 26 23 27 26 23 27 26 23 27 26 23 27 26 20 24 24 -20 23 23 17 21 21 16 19 19 14 17 17 12 15 15 10 12 12 -9 11 11 20 23 22 16 19 19 14 17 17 13 16 16 12 15 15 -11 14 14 13 16 16 14 17 17 14 18 18 14 17 17 12 15 15 -10 12 12 10 12 12 10 12 12 10 12 12 10 12 12 10 12 12 -9 11 11 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 53 55 47 161 156 96 -161 156 96 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 161 156 96 118 116 76 96 95 69 21 22 20 16 19 19 -18 22 22 20 24 24 23 27 26 23 27 26 26 28 27 27 30 29 -27 30 29 18 22 22 12 14 14 8 10 10 9 11 11 17 21 21 -23 27 26 23 27 26 20 24 24 18 22 22 16 20 20 14 17 17 -12 14 14 14 17 17 16 20 20 14 17 17 13 17 17 13 16 16 -12 15 15 12 15 15 13 17 17 14 18 18 14 17 17 13 16 16 -11 13 13 10 12 12 10 12 12 10 12 12 10 12 12 10 12 12 -4 5 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 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 13 12 7 118 116 76 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 161 156 96 118 116 76 30 31 28 -20 24 24 23 27 26 27 30 29 28 31 30 30 32 31 23 27 26 -16 19 19 17 21 21 12 15 15 9 11 11 10 12 12 9 11 11 -20 24 24 28 31 30 26 28 27 23 27 26 20 24 24 17 21 21 -15 19 19 13 16 16 16 19 19 14 18 18 14 17 17 13 16 16 -12 15 15 11 14 14 13 16 16 14 17 17 14 18 18 14 17 17 -12 15 15 10 12 12 10 12 12 10 12 12 10 12 12 8 9 9 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 82 81 62 161 156 96 230 229 82 -230 229 82 233 233 100 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 161 156 96 118 116 76 -27 29 28 27 30 29 30 32 31 30 32 31 23 27 26 20 24 24 -26 28 27 17 21 21 6 7 7 72 73 67 145 141 105 15 15 15 -14 17 17 33 37 35 30 32 31 28 31 30 26 28 27 23 27 26 -20 23 23 16 20 20 15 19 19 14 18 18 14 17 17 13 16 16 -12 15 15 11 14 14 12 15 15 13 17 17 14 18 18 14 17 17 -13 16 16 11 13 13 10 12 12 10 12 12 9 11 11 1 1 1 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 16 17 12 161 156 96 230 229 82 230 229 82 -243 242 120 235 234 117 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 161 156 96 -82 81 62 28 31 30 28 31 30 27 30 29 28 31 30 30 32 31 -33 37 35 13 16 16 3 3 3 105 104 92 210 208 158 12 14 14 -17 21 21 33 37 35 33 37 35 32 35 33 30 32 31 27 30 29 -23 27 26 20 23 23 17 20 20 15 18 18 14 18 18 13 17 17 -13 16 16 12 15 15 11 14 14 13 16 16 14 17 17 14 18 18 -13 17 17 12 15 15 10 12 12 10 12 12 3 4 4 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 96 95 69 230 229 82 230 229 82 244 244 132 -241 241 143 243 242 120 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -161 156 96 46 47 43 32 35 33 33 37 35 33 37 35 33 37 35 -40 43 41 23 27 26 1 1 1 2 2 2 24 26 24 14 17 17 -23 27 26 33 37 35 33 37 35 33 37 35 33 37 35 30 32 31 -27 30 29 23 27 26 20 23 23 15 18 18 14 18 18 14 17 17 -13 16 16 12 15 15 11 14 14 12 15 15 13 17 17 14 17 17 -14 17 17 13 16 16 11 13 13 6 8 8 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 16 17 12 161 156 96 230 229 82 235 234 117 239 239 170 -239 239 170 236 236 101 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 118 116 76 33 37 35 33 37 35 37 39 37 37 39 37 -43 45 43 49 51 48 20 24 24 8 10 10 17 20 20 35 37 36 -33 37 35 40 43 41 37 39 37 35 37 36 33 37 35 33 37 35 -30 32 31 27 30 29 23 27 26 15 19 19 14 18 18 14 17 17 -13 17 17 13 16 16 12 15 15 11 14 14 13 16 16 14 17 17 -14 17 17 13 17 17 11 14 14 4 5 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 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 96 95 69 230 229 82 230 229 82 239 239 170 251 251 187 -241 241 143 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 161 156 96 36 38 35 33 37 35 33 37 35 33 37 35 -37 39 37 47 48 46 55 57 54 55 57 54 49 51 48 43 45 43 -43 45 43 43 45 43 40 43 41 40 43 41 37 39 37 33 37 35 -33 37 35 28 31 30 26 28 27 16 20 20 15 18 18 14 18 18 -14 17 17 13 16 16 12 15 15 11 14 14 12 15 15 13 17 17 -14 17 17 14 17 17 8 10 10 5 7 7 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -16 17 12 230 229 82 230 229 82 243 242 120 251 251 187 251 251 187 -246 246 123 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 66 65 55 30 32 31 32 35 33 33 37 35 -33 37 35 37 39 37 40 43 41 47 48 46 49 51 48 51 52 50 -55 57 54 55 57 54 51 52 50 47 48 46 43 45 43 39 40 39 -33 37 35 30 32 31 26 28 27 17 21 21 15 19 19 14 18 18 -14 17 17 13 16 16 12 15 15 12 14 14 11 14 14 13 16 16 -14 17 17 12 15 15 7 9 9 6 8 8 1 1 1 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -96 95 69 230 229 82 230 229 82 239 239 170 251 251 187 239 239 170 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 96 95 69 27 30 29 28 31 30 30 32 31 -33 37 35 40 43 41 46 47 45 55 57 54 63 64 60 72 73 67 -72 73 67 72 73 67 72 73 67 65 66 61 55 57 54 47 48 46 -39 40 39 32 35 33 27 30 29 17 21 21 15 19 19 15 18 18 -14 18 18 13 17 17 13 16 16 12 15 15 11 14 14 12 14 14 -13 16 16 9 11 11 7 9 9 9 11 11 66 65 55 115 113 82 -21 22 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13 12 7 -230 229 82 230 229 82 236 236 101 251 251 187 251 251 187 246 246 123 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 118 116 76 23 27 26 26 28 27 32 35 33 -51 52 50 90 89 73 110 109 94 145 141 105 168 163 120 177 172 135 -177 172 135 188 184 146 188 184 146 181 176 137 194 191 148 188 184 146 -184 179 149 188 184 146 188 184 146 156 151 111 177 172 135 181 176 137 -177 172 135 168 163 120 168 163 120 158 153 112 156 151 111 158 153 112 -156 151 111 158 153 112 177 172 135 188 184 146 188 184 146 194 189 146 -36 38 35 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 82 81 62 -230 229 82 230 229 82 244 244 132 251 251 187 244 244 132 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 161 156 96 82 81 62 -96 95 69 230 229 82 181 178 103 110 109 94 156 151 111 188 184 146 -188 184 146 197 193 154 188 184 146 184 181 136 188 184 146 168 163 120 -168 163 120 178 174 128 156 151 111 158 153 112 174 170 121 156 151 111 -156 151 111 158 153 112 156 151 111 168 163 120 178 174 128 181 176 137 -176 171 126 178 174 128 184 181 136 176 171 126 178 174 128 184 181 136 -176 171 126 178 174 128 184 181 136 164 159 111 155 149 109 96 95 69 -1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 2 2 1 161 156 96 -230 229 82 230 229 82 244 244 132 244 244 132 236 236 101 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 46 47 43 82 81 62 -158 153 112 197 193 154 194 189 146 184 181 136 188 184 146 168 163 120 -156 151 111 137 133 100 131 127 93 137 133 100 137 133 100 158 153 112 -121 119 87 137 133 100 156 151 111 145 141 105 99 98 80 84 83 72 -63 64 60 52 53 49 40 43 41 33 36 34 36 38 35 36 38 35 -38 39 37 43 44 41 43 44 41 46 47 43 48 49 45 48 49 45 -46 47 43 36 38 35 30 31 28 19 20 18 6 7 7 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 36 38 35 230 229 82 -230 229 82 230 229 82 246 246 123 236 236 101 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 53 55 47 121 119 87 -176 171 126 171 165 117 161 156 96 82 81 62 53 55 47 33 37 35 -39 40 39 63 64 60 99 98 80 121 119 87 137 133 100 177 172 135 -176 171 126 184 181 136 131 127 93 131 127 93 110 109 94 84 83 72 -51 52 50 39 40 39 27 29 28 18 22 22 16 19 19 15 19 19 -15 19 19 14 18 18 14 17 17 13 16 16 12 15 15 11 14 14 -10 13 13 9 12 12 9 11 11 8 9 9 7 9 9 1 1 1 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 118 116 76 230 229 82 -230 229 82 230 229 82 236 236 101 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 96 95 69 71 71 57 -36 38 35 118 116 76 118 116 76 12 15 15 15 18 18 20 24 24 -33 37 35 55 56 53 84 83 72 110 109 94 145 141 105 110 109 94 -168 163 120 121 119 87 156 151 111 131 127 93 87 86 72 61 63 57 -47 48 46 28 31 30 18 22 22 15 19 19 15 18 18 15 19 19 -15 19 19 14 18 18 14 17 17 13 17 17 13 16 16 12 15 15 -11 13 13 10 12 12 9 11 11 8 10 10 7 9 9 3 3 3 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 1 1 0 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 161 156 96 -161 156 96 230 229 82 118 116 76 11 14 14 14 17 17 18 22 22 -27 30 29 40 43 41 60 60 56 84 83 72 105 104 92 110 109 94 -110 109 94 110 109 94 99 98 80 90 89 73 68 70 65 47 48 46 -32 34 33 23 25 24 20 23 23 17 21 21 15 19 19 14 17 17 -15 19 19 15 18 18 14 18 18 13 17 17 13 16 16 12 15 15 -11 14 14 10 12 12 9 11 11 8 10 10 7 9 9 4 5 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 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 16 17 12 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 161 156 96 118 116 76 11 13 13 13 16 16 15 19 19 -20 24 24 30 32 31 40 43 41 51 52 50 63 64 60 72 73 67 -65 66 61 65 66 61 65 66 61 55 57 54 46 47 45 33 37 35 -27 29 28 20 24 24 17 21 21 16 20 20 16 20 20 15 19 19 -15 19 19 15 19 19 14 18 18 14 17 17 13 16 16 12 15 15 -11 14 14 10 13 13 9 12 12 8 10 10 7 9 9 6 7 7 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 53 55 47 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -161 156 96 118 116 76 53 55 47 10 13 13 12 15 15 14 17 17 -17 20 20 20 24 24 27 29 28 32 34 33 37 39 37 40 43 41 -43 45 43 41 42 42 35 37 36 30 32 31 28 31 30 23 27 26 -20 23 23 17 21 21 16 20 20 16 20 20 16 20 20 16 19 19 -15 19 19 15 19 19 14 18 18 14 17 17 13 16 16 12 15 15 -11 14 14 10 13 13 9 12 12 9 11 11 8 10 10 10 12 12 -1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 82 81 62 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 161 156 96 161 156 96 -118 116 76 82 81 62 13 14 12 10 13 13 12 15 15 13 17 17 -15 19 19 16 20 20 20 23 23 20 24 24 23 27 26 26 28 27 -26 28 27 26 28 27 23 27 26 18 22 22 20 23 23 17 21 21 -17 21 21 16 20 20 16 20 20 16 20 20 16 20 20 16 19 19 -15 19 19 15 19 19 15 18 18 14 17 17 13 17 17 13 16 16 -12 15 15 12 14 14 12 14 14 12 14 14 12 14 14 23 24 24 -6 8 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 118 116 76 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 161 156 96 161 156 96 118 116 76 -71 71 57 13 14 12 9 12 12 10 13 13 12 15 15 13 17 17 -15 18 18 15 19 19 16 20 20 17 21 21 17 21 21 18 22 22 -18 22 22 18 22 22 17 21 21 16 19 19 15 18 18 14 18 18 -16 19 19 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -15 19 19 15 19 19 15 18 18 14 18 18 16 20 20 23 25 24 -17 21 21 25 27 26 47 48 46 47 48 46 51 52 50 72 73 67 -33 36 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 118 116 76 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 161 156 96 118 116 76 118 116 76 46 47 43 -9 11 11 9 11 11 10 12 12 11 13 13 12 15 15 14 17 17 -15 18 18 15 19 19 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -15 19 19 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -15 19 19 16 20 20 20 24 24 55 56 53 32 34 33 84 83 72 -90 89 73 110 109 94 110 109 94 105 104 92 110 109 94 110 109 94 -72 73 67 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 96 95 69 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 161 156 96 118 116 76 82 81 62 16 17 12 9 11 11 -9 11 11 9 12 12 10 13 13 12 14 14 13 16 16 14 18 18 -15 19 19 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 19 19 33 36 34 99 98 80 156 151 111 145 141 105 184 179 149 -168 163 120 184 179 149 177 172 135 156 151 111 145 141 105 110 109 94 -90 89 73 2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 71 71 57 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 -230 229 82 161 156 96 230 229 82 230 229 82 230 229 82 161 156 96 -118 116 76 82 81 62 30 31 28 9 11 11 9 11 11 9 11 11 -10 12 12 10 13 13 11 14 14 13 16 16 14 17 17 15 18 18 -15 19 19 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -18 22 22 58 59 55 137 133 100 197 193 154 214 212 158 210 208 158 -197 193 154 184 179 149 184 179 149 137 133 100 110 109 94 99 98 80 -84 83 72 10 10 9 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 16 17 12 230 229 82 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 230 229 82 161 156 96 -161 156 96 161 156 96 161 156 96 161 156 96 118 116 76 71 71 57 -21 22 20 12 14 14 11 13 13 10 12 12 10 12 12 10 13 13 -11 13 13 12 15 15 13 16 16 14 17 17 14 18 18 15 19 19 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 17 21 21 -23 27 26 84 83 72 184 179 149 251 251 187 210 208 158 184 179 149 -184 179 149 156 151 111 110 109 94 84 83 72 63 64 60 51 52 50 -18 22 22 6 8 8 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 118 116 76 230 229 82 -230 229 82 230 229 82 230 229 82 230 229 82 161 156 96 161 156 96 -161 156 96 161 156 96 118 116 76 53 55 47 20 23 22 16 19 19 -13 16 16 12 15 15 12 14 14 11 14 14 11 14 14 11 14 14 -12 15 15 13 16 16 14 17 17 15 19 19 16 20 20 17 21 21 -23 27 26 18 22 22 20 24 24 23 27 26 30 32 31 17 21 21 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -23 27 26 33 37 35 137 133 100 156 151 111 158 153 112 105 104 92 -105 104 92 68 70 65 39 40 39 18 22 22 12 14 14 12 15 15 -9 11 11 4 5 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 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 16 17 12 230 229 82 -230 229 82 230 229 82 230 229 82 161 156 96 118 116 76 118 116 76 -118 116 76 66 65 55 43 45 43 32 34 33 25 27 26 20 23 22 -17 20 20 15 18 18 14 17 17 15 18 18 13 16 16 14 17 17 -14 18 18 16 20 20 32 34 33 55 57 54 58 59 55 72 73 67 -105 104 92 55 57 54 65 66 61 63 64 60 40 43 41 33 37 35 -41 42 42 20 24 24 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -17 21 21 26 28 27 30 32 31 35 37 36 68 70 65 39 40 39 -23 27 26 15 18 18 13 16 16 11 14 14 9 12 12 8 10 10 -7 9 9 6 7 7 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 36 38 35 -230 229 82 230 229 82 230 229 82 96 95 69 30 31 28 49 51 48 -90 89 73 68 70 65 55 57 54 47 48 46 47 48 46 43 45 43 -32 34 33 43 45 43 43 45 43 23 27 26 25 27 26 40 43 41 -40 43 41 90 89 73 110 109 94 145 141 105 156 151 111 156 151 111 -184 179 149 184 179 149 177 172 135 184 179 149 137 133 100 84 83 72 -105 104 92 63 64 60 49 51 48 47 48 46 28 31 30 18 22 22 -16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 15 19 19 15 19 19 15 19 19 18 22 22 15 19 19 -13 16 16 12 15 15 11 14 14 10 13 13 9 12 12 9 11 11 -8 10 10 6 8 8 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -30 31 28 230 229 82 71 71 57 2 2 1 0 0 0 58 59 55 -105 104 92 84 83 72 65 66 61 84 83 72 110 109 94 110 109 94 -145 141 105 105 104 92 110 109 94 110 109 94 84 83 72 110 109 94 -158 153 112 197 193 154 197 193 154 239 239 170 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 210 208 158 197 193 154 -197 193 154 184 179 149 145 141 105 137 133 100 105 104 92 47 48 46 -20 23 23 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 19 19 15 19 19 15 19 19 14 18 18 14 17 17 -13 17 17 13 16 16 12 14 14 12 14 14 13 13 13 13 13 13 -13 13 13 12 12 12 10 10 9 6 7 7 2 2 2 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 65 66 61 -105 104 92 84 83 72 84 83 72 110 109 94 184 179 149 210 208 158 -210 208 158 210 208 158 214 212 158 197 193 154 214 212 158 210 208 158 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 251 251 187 239 239 170 251 251 187 184 179 149 84 83 72 -26 28 27 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 15 19 19 15 19 19 15 18 18 14 18 18 -13 17 17 13 16 16 15 15 15 14 14 13 14 14 13 14 14 13 -13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 3 4 4 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 72 73 67 -105 104 92 99 98 80 84 83 72 99 98 80 177 172 135 197 193 154 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 214 212 158 197 193 154 99 98 80 -23 27 26 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 15 19 19 15 19 19 15 18 18 14 18 18 -14 17 17 16 16 16 16 16 16 16 16 16 15 15 15 14 14 13 -14 14 13 13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 -3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 84 83 72 -110 109 94 99 98 80 72 73 67 63 64 60 99 98 80 177 172 135 -184 179 149 210 208 158 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 210 208 158 184 179 149 177 172 135 110 109 94 33 37 35 -17 21 21 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -16 20 20 16 20 20 15 19 19 15 19 19 15 19 19 14 18 18 -15 18 18 18 19 18 18 19 18 17 17 17 16 16 16 15 15 15 -14 14 13 13 13 13 13 13 13 12 12 12 12 12 12 12 12 12 -10 10 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 105 104 92 -108 107 93 99 98 80 72 73 67 63 64 60 51 52 50 87 86 72 -105 104 92 110 109 94 108 107 93 156 151 111 184 179 149 184 179 149 -197 193 154 197 193 154 197 193 154 184 179 149 184 179 149 177 172 135 -197 193 154 156 151 111 177 172 135 184 179 149 168 163 120 137 133 100 -145 141 105 110 109 94 99 98 80 47 48 46 55 57 54 15 19 19 -16 19 19 16 20 20 16 20 20 16 20 20 16 20 20 16 20 20 -17 20 20 17 21 21 16 20 20 16 19 19 15 19 19 16 19 19 -20 20 20 21 22 21 20 20 20 19 20 19 18 19 18 16 16 16 -15 15 15 14 14 13 13 13 13 13 13 13 12 12 12 12 12 12 -12 12 12 4 5 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 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 58 59 55 110 109 94 -105 104 92 90 89 73 72 73 67 55 57 54 43 45 43 39 40 39 -43 45 43 46 47 45 43 45 43 68 70 65 65 66 61 63 64 60 -108 107 93 72 73 67 105 104 92 90 89 73 72 73 67 40 43 41 -72 73 67 68 70 65 68 70 65 58 59 55 63 64 60 49 51 48 -43 45 43 33 36 34 27 30 29 20 24 24 16 20 20 15 19 19 -15 19 19 15 19 19 15 19 19 16 19 19 16 20 20 16 20 20 -17 21 21 20 24 24 20 23 22 17 21 21 17 20 20 20 20 20 -21 22 21 21 22 21 21 22 21 21 22 21 20 20 20 18 19 18 -16 16 16 15 15 15 13 13 13 13 13 13 12 12 12 12 12 12 -12 12 12 10 10 9 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 21 22 21 110 109 94 110 109 94 -105 104 92 84 83 72 68 70 65 51 52 50 41 42 42 33 37 35 -28 31 30 23 27 26 20 23 23 18 22 22 17 20 20 25 27 26 -26 28 27 27 30 29 25 27 26 20 23 23 23 27 26 30 32 31 -20 24 24 17 21 21 18 22 22 15 19 19 26 28 27 20 23 23 -14 18 18 15 19 19 15 18 18 15 19 19 15 19 19 15 19 19 -15 19 19 15 19 19 15 19 19 15 19 19 15 19 19 16 19 19 -16 20 20 22 24 23 24 26 24 22 24 23 20 23 22 22 24 23 -24 26 24 24 26 24 23 24 24 22 24 23 21 22 21 19 20 19 -17 17 17 15 15 15 14 14 13 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 2 2 2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 2 2 2 99 98 80 110 109 94 108 107 93 -105 104 92 84 83 72 63 64 60 49 51 48 39 40 39 32 34 33 -27 30 29 23 25 24 20 23 23 17 20 20 15 19 19 14 18 18 -14 17 17 13 17 17 13 17 17 13 17 17 13 17 17 13 17 17 -14 17 17 14 17 17 14 17 17 14 17 17 14 17 17 14 17 17 -14 18 18 14 18 18 14 18 18 14 18 18 15 18 18 15 19 19 -15 19 19 15 19 19 15 19 19 15 19 19 15 19 19 15 19 19 -15 19 19 17 21 21 27 29 28 26 28 27 25 27 26 25 27 26 -27 29 28 27 29 28 26 28 27 24 26 24 21 22 21 20 20 20 -18 19 18 16 16 16 14 14 13 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 4 5 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 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 51 52 50 110 109 94 110 109 94 105 104 92 -90 89 73 72 73 67 55 57 54 43 45 43 35 37 36 30 32 31 -26 28 27 20 24 24 17 21 21 16 19 19 15 18 18 14 17 17 -13 16 16 13 16 16 13 16 16 13 16 16 13 16 16 13 16 16 -13 16 16 13 16 16 13 16 16 13 17 17 13 17 17 14 17 17 -14 17 17 14 17 17 14 17 17 14 18 18 14 18 18 14 18 18 -15 18 18 15 18 18 15 19 19 15 19 19 15 19 19 15 19 19 -15 19 19 15 19 19 27 29 28 32 34 33 28 31 30 27 29 28 -30 32 31 30 32 31 30 31 28 26 28 27 23 24 24 21 22 21 -19 20 19 16 16 16 14 14 13 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 6 7 7 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 3 3 3 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 10 10 9 108 107 93 110 109 94 108 107 93 99 98 80 -84 83 72 63 64 60 49 51 48 40 43 41 33 36 34 27 30 29 -23 27 26 18 22 22 17 20 20 15 18 18 14 17 17 13 16 16 -13 16 16 13 16 16 12 15 15 12 15 15 12 15 15 12 15 15 -13 16 16 13 16 16 13 16 16 13 16 16 13 16 16 13 16 16 -13 17 17 13 17 17 14 17 17 14 17 17 14 17 17 14 18 18 -14 18 18 14 18 18 15 18 18 15 18 18 15 19 19 15 19 19 -15 19 19 15 19 19 17 21 21 33 36 34 32 34 33 31 33 31 -33 36 34 33 36 34 31 33 31 27 29 28 25 27 26 21 22 21 -19 20 19 17 17 17 15 15 15 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 8 8 7 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 63 64 60 137 133 100 43 45 43 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 68 70 65 110 109 94 110 109 94 105 104 92 84 83 72 -68 70 65 55 57 54 43 45 43 35 37 36 30 32 31 26 28 27 -20 24 24 17 21 21 16 19 19 14 17 17 13 16 16 12 15 15 -12 15 15 12 15 15 12 15 15 12 15 15 12 15 15 12 15 15 -12 15 15 12 15 15 12 15 15 12 15 15 12 15 15 13 16 16 -13 16 16 13 16 16 13 16 16 13 17 17 13 17 17 14 17 17 -14 17 17 14 17 17 14 18 18 14 18 18 14 18 18 15 18 18 -15 19 19 15 19 19 15 19 19 20 24 24 32 34 33 35 37 36 -37 39 37 35 37 36 33 36 34 30 32 31 26 28 27 22 24 23 -20 20 20 17 17 17 15 15 15 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 8 8 7 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 1 1 99 98 80 184 179 149 184 179 149 68 70 65 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -15 15 15 110 109 94 110 109 94 108 107 93 99 98 80 72 73 67 -61 63 57 49 51 48 39 40 39 33 36 34 27 30 29 23 25 24 -18 22 22 16 19 19 14 17 17 13 16 16 12 15 15 12 15 15 -11 14 14 11 14 14 11 14 14 11 14 14 11 14 14 11 14 14 -11 14 14 11 14 14 12 14 14 12 15 15 12 15 15 12 15 15 -12 15 15 13 16 16 13 16 16 13 16 16 13 16 16 13 16 16 -13 17 17 14 17 17 14 17 17 14 17 17 14 18 18 14 18 18 -14 18 18 15 18 18 15 19 19 15 19 19 30 32 31 38 39 37 -39 40 39 39 40 39 35 37 36 31 33 31 27 29 28 22 24 23 -20 20 20 17 17 17 15 15 15 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 8 8 7 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 -110 109 94 197 193 154 210 208 158 184 179 149 68 70 65 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -68 70 65 110 109 94 110 109 94 105 104 92 84 83 72 65 66 61 -51 52 50 43 45 43 35 37 36 30 32 31 25 27 26 20 23 23 -17 20 20 15 18 18 13 16 16 12 15 15 12 15 15 11 14 14 -11 14 14 11 14 14 11 13 13 11 13 13 11 13 13 11 13 13 -11 14 14 11 14 14 11 14 14 11 14 14 11 14 14 11 14 14 -12 15 15 12 15 15 12 15 15 12 15 15 13 16 16 13 16 16 -13 16 16 13 16 16 13 17 17 13 17 17 14 17 17 14 17 17 -14 18 18 14 18 18 14 18 18 16 19 19 37 39 37 41 42 42 -41 42 42 41 42 42 38 39 37 32 34 33 27 29 28 23 24 24 -21 22 21 17 17 17 15 15 15 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 8 8 7 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 11 11 11 137 133 100 -197 193 154 251 251 187 239 239 170 184 179 149 31 33 31 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 12 12 12 -110 109 94 110 109 94 105 104 92 90 89 73 72 73 67 58 59 55 -46 47 45 37 39 37 31 33 31 26 28 27 20 24 24 17 21 21 -15 18 18 13 16 16 12 15 15 12 14 14 11 13 13 11 13 13 -10 13 13 10 13 13 10 13 13 10 13 13 10 13 13 10 13 13 -10 13 13 10 13 13 11 13 13 11 13 13 11 14 14 11 14 14 -11 14 14 11 14 14 12 14 14 12 15 15 12 15 15 12 15 15 -13 16 16 13 16 16 13 16 16 13 16 16 13 17 17 13 17 17 -14 17 17 14 17 17 14 18 18 23 27 26 41 42 42 41 42 42 -43 45 43 41 42 42 39 40 39 33 36 34 27 29 28 23 24 24 -21 22 21 17 17 17 15 15 15 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 6 7 7 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 27 29 28 168 163 120 210 208 158 -251 251 187 251 251 187 210 208 158 137 133 100 1 1 1 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 60 60 56 -110 109 94 105 104 92 105 104 92 84 83 72 65 66 61 51 52 50 -40 43 41 33 36 34 27 30 29 23 25 24 18 22 22 16 19 19 -14 17 17 12 15 15 11 14 14 11 14 14 10 13 13 10 13 13 -10 13 13 10 12 12 10 12 12 10 12 12 10 12 12 10 12 12 -10 12 12 10 12 12 10 13 13 10 13 13 10 13 13 11 13 13 -11 13 13 11 14 14 11 14 14 11 14 14 11 14 14 12 15 15 -12 15 15 12 15 15 12 15 15 13 16 16 13 16 16 13 16 16 -13 17 17 13 17 17 14 17 17 32 34 33 43 45 43 43 45 43 -43 45 43 43 45 43 39 40 39 33 36 34 27 29 28 23 24 24 -21 22 21 17 17 17 15 15 15 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 6 7 7 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 1 1 1 68 70 65 184 179 149 210 208 158 251 251 187 -251 251 187 214 212 158 184 179 149 37 39 37 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 6 7 7 105 104 92 -105 104 92 105 104 92 99 98 80 72 73 67 58 59 55 46 47 45 -35 37 36 30 32 31 25 27 26 20 23 23 16 19 19 14 17 17 -12 15 15 12 14 14 11 13 13 10 13 13 10 12 12 10 12 12 -10 12 12 10 12 12 9 12 12 9 12 12 9 12 12 9 12 12 -10 12 12 10 12 12 10 12 12 10 12 12 10 12 12 10 13 13 -10 13 13 10 13 13 11 13 13 11 13 13 11 14 14 11 14 14 -11 14 14 12 15 15 12 15 15 12 15 15 12 15 15 13 16 16 -13 16 16 13 16 16 17 20 20 41 42 42 46 47 45 46 47 45 -46 47 45 43 45 43 40 41 39 33 36 34 27 29 28 23 24 24 -20 20 20 17 17 17 15 15 15 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 4 5 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 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -15 15 15 110 109 94 197 193 154 214 212 158 251 251 187 251 251 187 -239 239 170 184 179 149 84 83 72 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 47 48 46 105 104 92 -105 104 92 99 98 80 84 83 72 68 70 65 51 52 50 40 43 41 -32 34 33 27 29 28 22 24 23 17 21 21 15 18 18 13 16 16 -12 15 15 11 13 13 10 13 13 10 12 12 9 12 12 9 12 12 -9 12 12 9 12 12 9 11 11 9 11 11 9 11 11 9 11 11 -9 12 12 9 12 12 9 12 12 9 12 12 10 12 12 10 12 12 -10 12 12 10 12 12 10 13 13 10 13 13 10 13 13 11 13 13 -11 14 14 11 14 14 11 14 14 12 14 14 12 15 15 12 15 15 -12 15 15 13 16 16 28 31 30 43 45 43 47 48 46 47 48 46 -47 48 46 43 45 43 40 41 39 33 36 34 27 29 28 22 24 23 -20 20 20 17 17 17 15 15 15 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 3 4 4 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 60 60 56 -177 172 135 197 193 154 251 251 187 251 251 187 251 251 187 251 251 187 -184 179 149 110 109 94 3 4 4 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 1 1 1 99 98 80 105 104 92 -99 98 80 87 86 72 84 83 72 63 64 60 46 47 45 35 37 36 -30 32 31 25 27 26 18 22 22 16 19 19 14 17 17 12 15 15 -11 14 14 10 13 13 9 12 12 9 12 12 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 11 11 9 12 12 9 12 12 -9 12 12 10 12 12 10 12 12 10 12 12 10 13 13 10 13 13 -10 13 13 11 13 13 11 14 14 11 14 14 11 14 14 12 15 15 -12 15 15 14 17 17 41 42 42 47 48 46 49 51 48 51 52 50 -47 48 46 43 45 43 40 41 39 33 36 34 27 29 28 22 24 23 -19 20 19 16 16 16 14 14 13 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 2 2 2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 23 24 24 137 133 100 184 179 149 -210 208 158 251 251 187 251 251 187 251 251 187 251 251 187 184 179 149 -110 109 94 13 13 13 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 30 32 31 105 104 92 99 98 80 -84 83 72 84 83 72 72 73 67 55 57 54 41 42 42 32 34 33 -27 29 28 20 24 24 17 20 20 14 17 17 13 16 16 12 14 14 -10 13 13 10 12 12 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 12 12 9 12 12 10 12 12 10 12 12 10 12 12 -10 13 13 10 13 13 10 13 13 11 13 13 11 14 14 11 14 14 -11 14 14 27 29 28 55 56 53 72 73 67 51 52 50 51 52 50 -49 51 48 43 45 43 39 40 39 32 34 33 26 28 27 21 22 21 -19 20 19 16 16 16 18 19 17 13 13 13 12 12 12 12 12 12 -12 12 12 12 12 12 1 1 1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 8 8 7 84 83 72 184 179 149 197 193 154 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 184 179 149 145 141 105 -19 20 19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 14 14 13 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 72 73 67 105 104 92 84 83 72 -72 73 67 84 83 72 68 70 65 49 51 48 39 40 39 30 32 31 -25 27 26 18 22 22 15 18 18 13 16 16 12 15 15 11 13 13 -10 12 12 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 12 12 9 12 12 9 12 12 -10 12 12 10 12 12 10 12 12 10 13 13 10 13 13 11 13 13 -13 16 16 41 42 42 99 98 80 158 153 112 65 66 61 51 52 50 -49 51 48 43 45 43 39 40 39 31 33 31 25 27 26 21 22 21 -21 22 21 68 70 65 55 56 53 13 13 13 12 12 12 12 12 12 -12 12 12 11 11 11 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 3 3 -63 64 60 158 153 112 184 179 149 210 208 158 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 184 179 149 137 133 100 27 29 28 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -21 22 21 110 109 94 5 6 5 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 13 13 13 105 104 92 90 89 73 72 73 67 -68 70 65 84 83 72 63 64 60 46 47 45 35 37 36 27 29 28 -22 24 23 17 20 20 14 17 17 12 15 15 11 14 14 10 12 12 -10 12 12 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 12 12 9 12 12 10 12 12 10 12 12 10 13 13 10 13 13 -30 32 31 47 48 46 177 172 135 210 208 158 137 133 100 55 56 53 -49 51 48 43 45 43 38 39 37 31 33 31 25 27 26 22 24 23 -110 109 94 184 179 149 63 64 60 13 13 13 12 12 12 12 12 12 -12 12 12 8 9 9 0 0 0 1 1 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 21 22 21 105 104 92 -184 179 149 210 208 158 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 251 251 187 184 179 149 145 141 105 23 24 24 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -68 70 65 184 179 149 105 104 92 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 51 52 50 99 98 80 84 83 72 63 64 60 -68 70 65 72 73 67 55 57 54 41 42 42 32 34 33 25 27 26 -20 23 23 16 19 19 13 16 16 12 14 14 10 13 13 10 12 12 -9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 11 11 9 12 12 9 12 12 10 12 12 17 20 20 -46 47 45 72 73 67 210 208 158 251 251 187 210 208 158 63 64 60 -49 51 48 43 45 43 37 39 37 30 32 31 24 26 24 105 104 92 -210 208 158 197 193 154 47 48 46 13 13 13 12 12 12 12 12 12 -12 12 12 6 7 7 33 36 34 48 49 45 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 8 8 7 23 24 24 55 56 53 110 109 94 -210 208 158 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 184 179 149 110 109 94 20 20 20 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -110 109 94 251 251 187 210 208 158 47 48 46 0 0 0 0 0 0 -0 0 0 1 1 1 90 89 73 90 89 73 72 73 67 55 56 53 -72 73 67 68 70 65 51 52 50 37 39 37 28 31 30 23 25 24 -17 21 21 15 18 18 12 15 15 11 14 14 10 13 13 9 12 12 -9 11 11 9 11 11 9 11 11 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 9 11 11 9 11 11 9 11 11 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 9 12 12 13 16 16 41 42 42 -49 51 48 110 109 94 251 251 187 251 251 187 251 251 187 105 104 92 -49 51 48 43 45 43 35 37 36 30 31 28 47 48 46 197 193 154 -251 251 187 197 193 154 31 33 31 12 12 12 12 12 12 12 12 12 -12 12 12 51 52 50 184 179 149 72 73 67 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 -11 11 11 21 22 21 30 32 31 40 41 39 60 60 56 145 141 105 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 214 212 158 -184 179 149 110 109 94 13 13 13 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 4 5 4 61 61 53 48 49 45 3 4 3 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -156 151 111 251 251 187 251 251 187 184 179 149 11 11 11 0 0 0 -0 0 0 26 28 27 99 98 80 84 83 72 60 60 56 43 45 43 -72 73 67 65 66 61 49 51 48 35 37 36 27 29 28 20 24 24 -17 20 20 14 17 17 12 15 15 11 13 13 10 12 12 9 11 11 -9 11 11 9 11 11 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 9 11 11 9 11 11 -9 11 11 9 11 11 9 11 11 11 13 13 37 39 37 47 48 46 -51 52 50 184 179 149 251 251 187 251 251 187 251 251 187 145 141 105 -47 48 46 41 42 42 35 37 36 27 29 28 137 133 100 251 251 187 -251 251 187 197 193 154 19 20 19 12 12 12 12 12 12 12 12 12 -27 29 28 184 179 149 214 212 158 63 64 60 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 1 1 1 6 7 7 16 16 16 24 26 24 -30 32 31 38 39 37 47 48 46 55 57 54 68 70 65 110 109 94 -197 193 154 251 251 187 251 251 187 251 251 187 210 208 158 184 179 149 -105 104 92 8 8 7 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 65 66 61 184 179 149 156 151 111 -30 32 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -168 163 120 251 251 187 251 251 187 251 251 187 110 109 94 0 0 0 -0 0 0 60 60 56 84 83 72 68 70 65 51 52 50 38 39 37 -84 83 72 63 64 60 43 45 43 33 36 34 25 27 26 20 23 22 -15 18 18 13 16 16 12 14 14 10 13 13 9 12 12 9 11 11 -9 11 11 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -9 11 11 9 11 11 10 12 12 33 36 34 46 47 45 51 52 50 -72 73 67 210 208 158 251 251 187 251 251 187 251 251 187 177 172 135 -47 48 46 41 42 42 35 37 36 37 39 37 184 179 149 251 251 187 -251 251 187 197 193 154 13 13 13 12 12 12 12 12 12 12 12 12 -110 109 94 251 251 187 251 251 187 37 39 37 0 0 0 0 0 0 -0 0 0 21 22 20 2 2 1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 5 5 12 12 12 21 22 21 25 27 26 30 32 31 38 39 37 -46 47 45 55 56 53 60 60 56 65 66 61 68 70 65 105 104 92 -110 109 94 197 193 154 210 208 158 197 193 154 184 179 149 84 83 72 -2 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 13 13 13 184 179 149 251 251 187 -197 193 154 43 44 41 0 0 0 0 0 0 0 0 0 0 0 0 -145 141 105 251 251 187 251 251 187 251 251 187 214 212 158 43 45 43 -2 2 2 84 83 72 72 73 67 58 59 55 41 42 42 38 39 37 -72 73 67 58 59 55 41 42 42 31 33 31 25 27 26 18 22 22 -14 17 17 12 15 15 12 14 14 10 12 12 9 12 12 9 11 11 -9 11 11 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 9 12 12 31 33 31 43 45 43 49 51 48 55 56 53 -110 109 94 251 251 187 251 251 187 251 251 187 251 251 187 168 163 120 -47 48 46 41 42 42 33 36 34 63 64 60 197 193 154 251 251 187 -251 251 187 184 179 149 13 13 13 12 12 12 12 12 12 16 16 16 -197 193 154 251 251 187 239 239 170 20 20 20 0 0 0 2 2 1 -108 107 93 110 109 94 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 1 1 1 4 5 5 11 11 11 18 19 18 -22 24 23 26 28 27 32 34 33 39 40 39 46 47 45 51 52 50 -55 57 54 60 60 56 63 64 60 63 64 60 63 64 60 58 59 55 -63 64 60 99 98 80 145 141 105 137 133 100 43 45 43 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 3 4 3 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 110 109 94 251 251 187 -251 251 187 184 179 149 25 27 26 0 0 0 0 0 0 0 0 0 -99 98 80 251 251 187 251 251 187 251 251 187 251 251 187 156 151 111 -25 27 26 84 83 72 65 66 61 47 48 46 32 34 33 39 40 39 -72 73 67 55 57 54 40 41 39 30 32 31 23 25 24 18 22 22 -14 17 17 12 15 15 11 13 13 10 12 12 9 11 11 9 11 11 -9 11 11 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -9 11 11 28 31 30 41 42 42 47 48 46 55 56 53 58 59 55 -137 133 100 251 251 187 251 251 187 251 251 187 210 208 158 137 133 100 -47 48 46 40 41 39 32 34 33 75 75 61 184 179 149 239 239 170 -251 251 187 177 172 135 13 13 13 12 12 12 12 12 12 43 44 41 -197 193 154 251 251 187 210 208 158 10 10 9 0 0 0 84 83 72 -251 251 187 84 83 72 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 -6 7 7 11 11 11 17 17 17 20 20 20 23 24 24 27 29 28 -32 34 33 38 39 37 43 45 43 47 48 46 51 52 50 55 56 53 -58 59 55 58 59 55 55 57 54 55 56 53 47 48 46 41 42 42 -35 37 36 31 33 31 47 48 46 14 14 13 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 66 65 55 99 98 80 20 20 20 -0 0 0 0 0 0 0 0 0 0 0 0 43 45 43 214 212 158 -251 251 187 251 251 187 145 141 105 3 3 3 0 0 0 0 0 0 -48 49 45 184 179 149 239 239 170 251 251 187 239 239 170 177 172 135 -84 83 72 72 73 67 55 56 53 39 40 39 26 28 27 39 40 39 -68 70 65 51 52 50 39 40 39 28 31 30 22 24 23 17 20 20 -14 17 17 12 14 14 10 13 13 9 11 11 9 11 11 9 11 11 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -27 29 28 40 41 39 46 47 45 51 52 50 55 57 54 63 64 60 -131 127 93 197 193 154 210 208 158 197 193 154 168 163 120 96 95 69 -47 48 46 40 41 39 32 34 33 71 71 57 145 141 105 184 179 149 -184 179 149 131 127 93 13 13 13 12 12 12 12 12 12 48 49 45 -168 163 120 184 179 149 156 151 111 6 7 7 14 14 13 177 172 135 -239 239 170 40 41 39 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 3 3 3 6 7 7 11 11 11 16 16 16 -18 19 18 21 22 21 23 24 24 27 29 28 32 34 33 37 39 37 -41 42 42 43 45 43 47 48 46 51 52 50 51 52 50 51 52 50 -51 52 50 49 51 48 46 47 45 40 41 39 32 34 33 25 27 26 -20 20 20 14 14 13 2 2 2 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 33 36 34 197 193 154 184 179 149 -41 42 42 0 0 0 0 0 0 0 0 0 3 3 3 184 179 149 -251 251 187 251 251 187 184 179 149 48 49 45 0 0 0 0 0 0 -16 17 12 121 119 87 177 172 135 194 189 146 188 184 146 145 141 105 -82 81 62 63 64 60 46 47 45 31 33 31 21 22 21 35 37 36 -68 70 65 51 52 50 37 39 37 27 30 29 22 24 23 17 20 20 -13 16 16 12 14 14 10 13 13 9 11 11 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 25 27 26 -38 39 37 43 45 43 51 52 50 55 56 53 60 60 56 63 64 60 -92 91 72 158 153 112 176 171 126 171 165 117 149 143 98 82 81 62 -44 46 43 38 39 37 30 32 31 71 71 57 131 127 93 160 154 106 -149 143 98 82 81 62 13 13 13 12 12 12 12 12 12 46 47 43 -121 119 87 134 131 96 96 95 69 7 7 6 38 39 37 131 127 93 -145 141 105 12 13 12 0 0 0 1 1 1 3 3 3 6 7 7 -10 10 9 12 12 12 14 14 13 16 16 16 18 19 18 21 22 21 -22 24 23 26 28 27 30 31 28 33 36 34 37 39 37 40 41 39 -41 42 42 43 45 43 46 47 45 46 47 45 46 47 45 43 45 43 -41 42 42 37 39 37 31 33 31 26 28 27 21 22 21 16 16 16 -6 7 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 177 172 135 251 251 187 -197 193 154 27 29 28 0 0 0 0 0 0 0 0 0 110 109 94 -239 239 170 239 239 170 184 179 149 87 86 72 2 2 1 0 0 0 -1 1 1 82 81 62 142 137 94 165 161 109 165 161 109 131 127 93 -75 75 61 55 56 53 37 39 37 25 27 26 19 20 19 32 34 33 -65 66 61 49 51 48 35 37 36 27 29 28 20 23 23 16 19 19 -13 16 16 13 13 13 10 12 12 9 11 11 8 10 10 8 10 10 -8 9 9 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 22 24 23 35 37 36 -41 42 42 47 48 46 55 56 53 58 59 55 63 64 60 65 66 61 -71 71 57 131 127 93 160 154 106 160 154 106 142 137 94 82 81 62 -46 47 43 40 41 39 33 36 34 66 65 55 125 122 87 149 143 98 -142 137 94 82 81 62 17 17 17 18 19 17 14 14 13 46 47 43 -118 116 76 125 122 87 96 95 69 16 17 12 71 71 57 103 101 77 -82 81 62 11 11 11 11 11 11 13 13 13 14 14 13 14 14 13 -15 15 15 16 16 16 17 17 17 19 20 19 21 22 21 23 24 24 -26 28 27 27 29 28 31 33 31 33 36 34 35 37 36 38 39 37 -39 40 39 39 40 39 38 39 37 37 39 37 35 37 36 31 33 31 -27 29 28 24 26 24 21 22 21 17 17 17 12 12 12 2 2 2 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 68 70 65 251 251 187 -251 251 187 156 151 111 2 2 1 0 0 0 0 0 0 43 44 41 -177 172 135 184 179 149 158 153 112 103 101 77 19 20 18 0 0 0 -0 0 0 46 47 43 131 127 93 160 154 106 160 154 106 131 127 93 -71 71 57 43 45 43 30 32 31 21 22 21 16 16 16 26 28 27 -63 64 60 47 48 46 35 37 36 26 28 27 20 23 23 16 19 19 -13 16 16 13 13 13 10 12 12 9 11 11 8 10 10 8 10 10 -7 9 9 7 9 9 8 9 9 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 20 20 20 33 36 34 40 41 39 -46 47 45 51 52 50 55 57 54 60 60 56 63 64 60 65 66 61 -66 65 55 118 116 76 151 147 98 165 161 109 151 147 98 121 119 87 -96 95 69 96 95 69 96 95 69 103 101 77 142 137 94 151 147 98 -142 137 94 103 101 77 82 81 62 82 81 62 82 81 62 96 95 69 -131 127 93 142 137 94 103 101 77 46 47 43 96 95 69 118 116 76 -71 71 57 14 14 13 14 14 13 15 15 15 15 15 15 16 16 16 -16 16 16 17 17 17 18 19 18 20 20 20 21 22 21 23 24 24 -25 27 26 27 29 28 30 31 28 30 32 31 31 33 31 31 33 31 -31 33 31 31 33 31 30 31 28 27 29 28 25 27 26 22 24 23 -20 20 20 16 16 16 13 13 13 6 7 7 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -58 59 55 68 70 65 8 8 7 0 0 0 10 10 9 210 208 158 -251 251 187 184 179 149 38 39 37 0 0 0 0 0 0 8 8 7 -103 101 77 149 143 98 149 143 98 118 116 76 40 41 39 25 27 25 -53 55 47 82 81 62 144 139 99 165 161 109 165 161 109 142 137 94 -71 71 57 35 37 36 24 26 24 18 19 18 15 15 15 22 24 23 -63 64 60 46 47 45 33 36 34 26 28 27 20 23 22 17 18 17 -12 15 15 11 13 13 10 12 12 9 11 11 8 10 10 8 10 10 -7 9 9 7 9 9 7 9 9 7 9 9 8 9 9 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 16 16 16 30 31 28 35 37 36 41 42 42 -47 48 46 55 56 53 58 59 55 63 64 60 65 66 61 65 66 61 -61 61 53 103 101 77 151 147 98 171 165 117 171 165 117 168 163 120 -158 153 112 158 153 112 155 149 109 151 147 98 151 147 98 160 154 106 -151 147 98 149 143 98 142 137 94 149 143 98 149 143 98 149 143 98 -155 149 109 151 147 98 131 127 93 103 101 77 125 122 87 118 116 76 -71 71 57 16 16 16 16 16 16 16 16 16 17 17 17 17 17 17 -17 17 17 17 17 17 18 19 18 19 20 19 20 20 20 21 22 21 -23 24 24 24 26 24 25 27 26 26 28 27 26 28 27 26 28 27 -25 27 26 24 26 24 22 24 23 21 22 21 19 20 19 16 16 16 -14 14 13 8 8 7 1 1 1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -20 20 20 184 179 149 168 163 120 21 22 21 0 0 0 105 104 92 -177 172 135 145 141 105 71 71 57 0 0 0 0 0 0 0 0 0 -66 65 55 131 127 93 151 147 98 142 137 94 118 116 76 121 119 87 -145 141 105 158 153 112 176 171 126 178 174 128 176 171 126 149 145 103 -96 95 69 31 33 31 21 22 21 16 16 16 14 14 13 18 19 18 -60 60 56 46 47 45 33 36 34 25 27 26 21 22 21 15 18 18 -12 15 15 11 13 13 9 11 11 8 10 10 8 10 10 8 9 9 -7 9 9 7 9 9 7 9 9 7 9 9 7 9 9 8 9 9 -8 9 9 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 10 12 12 26 28 27 31 33 31 38 39 37 43 45 43 -51 52 50 55 56 53 60 60 56 63 64 60 65 66 61 68 70 65 -63 64 60 96 95 69 158 153 112 178 174 128 188 184 146 194 189 146 -194 189 146 188 184 146 184 181 136 176 171 126 171 165 117 173 167 111 -173 167 111 165 161 109 171 165 117 174 170 121 176 171 126 178 174 128 -178 174 128 174 170 121 160 154 106 149 143 98 149 143 98 125 122 87 -71 71 57 16 16 16 16 16 16 17 17 17 17 17 17 17 17 17 -17 17 17 17 17 17 17 17 17 18 19 18 19 20 19 20 20 20 -21 22 21 21 22 21 21 22 21 22 24 23 21 22 21 21 22 21 -21 22 21 19 20 19 18 19 18 16 16 16 14 14 13 11 11 11 -3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 105 104 92 197 193 154 110 109 94 9 9 8 36 38 35 -121 119 87 131 127 93 96 95 69 18 19 17 30 31 28 66 65 55 -96 95 69 142 137 94 160 154 106 160 154 106 160 154 106 168 163 120 -184 181 136 194 191 148 197 193 154 197 193 154 194 189 146 168 163 120 -125 122 87 46 47 43 18 19 18 15 15 15 13 13 13 14 14 13 -55 57 54 43 45 43 32 34 33 25 27 26 18 22 22 17 17 17 -12 14 14 10 12 12 9 11 11 8 10 10 8 9 9 7 9 9 -6 8 8 7 9 9 7 9 9 7 9 9 7 9 9 7 9 9 -7 9 9 8 9 9 8 9 9 8 10 10 8 10 10 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 32 34 33 41 42 42 35 37 36 39 40 39 37 39 37 -35 37 36 55 57 54 60 60 56 63 64 60 65 66 61 65 66 61 -61 63 57 115 113 82 168 163 120 194 191 148 204 201 155 210 208 158 -210 208 158 210 208 158 197 193 154 194 189 146 186 182 128 176 171 126 -174 170 121 176 171 126 186 182 128 190 186 136 194 191 148 197 193 154 -197 193 154 188 184 146 181 176 137 174 170 121 165 161 109 142 137 94 -82 81 62 24 26 24 16 16 16 16 16 16 16 16 16 16 16 16 -17 17 17 17 17 17 17 17 17 17 17 17 18 19 18 19 20 19 -19 20 19 19 20 19 20 20 20 19 20 19 19 20 19 18 19 18 -17 17 17 15 15 15 13 13 13 12 12 12 6 7 7 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 17 18 17 137 133 100 115 113 82 53 55 47 19 20 18 -103 101 77 144 139 99 137 133 100 115 113 82 137 133 100 156 151 111 -158 153 112 164 159 111 171 165 117 174 170 121 178 174 128 194 189 146 -204 201 155 214 212 158 214 212 158 214 212 158 210 208 158 188 184 146 -158 153 112 87 86 72 17 17 17 13 13 13 13 13 13 15 15 15 -55 56 53 43 45 43 32 34 33 24 26 24 17 20 20 16 16 16 -12 14 14 10 12 12 8 10 10 8 10 10 7 9 9 6 8 8 -6 8 8 6 8 8 6 8 8 7 9 9 7 9 9 7 9 9 -7 9 9 7 9 9 7 9 9 7 9 9 8 9 9 8 10 10 -8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 8 10 10 -8 10 10 110 109 94 84 83 72 49 51 48 26 28 27 8 10 10 -8 9 9 51 52 50 58 59 55 63 64 60 63 64 60 63 64 60 -66 65 55 134 131 96 181 176 137 210 208 158 214 212 158 239 239 170 -239 239 170 224 223 159 210 208 158 204 201 155 194 189 146 186 182 128 -186 182 128 184 181 136 194 189 146 204 201 155 210 208 158 210 208 158 -210 208 158 210 208 158 197 193 154 190 186 136 176 171 126 155 149 109 -118 116 76 36 38 35 15 15 15 16 16 16 16 16 16 16 16 16 -16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 17 17 17 -17 17 17 17 17 17 17 17 17 16 16 16 16 16 16 15 15 15 -13 13 13 12 12 12 8 8 7 2 2 2 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 53 55 47 103 101 77 96 95 69 53 55 47 -103 101 77 158 153 112 177 172 135 184 179 149 188 184 146 197 193 154 -194 189 146 190 186 136 184 181 136 184 181 136 194 189 146 210 208 158 -214 212 158 239 239 170 251 251 187 251 251 187 224 223 159 204 201 155 -177 172 135 121 119 87 30 31 28 13 13 13 12 12 12 39 40 39 -60 60 56 43 45 43 32 34 33 23 25 24 18 19 18 13 16 16 -13 13 13 9 11 11 8 10 10 8 9 9 6 8 8 6 8 8 -6 8 8 6 8 8 6 8 8 6 8 8 6 8 8 7 9 9 -7 9 9 7 9 9 7 9 9 7 9 9 7 9 9 7 9 9 -7 9 9 8 9 9 8 9 9 8 10 10 8 10 10 8 10 10 -14 17 17 197 193 154 158 153 112 55 57 54 7 9 9 7 9 9 -8 10 10 51 52 50 58 59 55 60 60 56 63 64 60 63 64 60 -71 71 57 155 149 109 194 191 148 214 212 158 251 251 187 251 251 187 -251 251 187 251 251 187 239 239 170 210 208 158 197 193 154 190 186 136 -190 186 136 194 189 146 204 201 155 210 208 158 224 223 159 239 239 170 -239 239 170 224 223 159 210 208 158 204 201 155 190 186 136 164 159 111 -125 122 87 40 41 39 15 15 15 15 15 15 15 15 15 15 15 15 -16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 -16 16 16 16 16 16 15 15 15 14 14 13 13 13 13 12 12 12 -8 9 9 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 21 22 20 96 95 69 125 122 87 121 119 87 -144 139 99 177 172 135 197 193 154 210 208 158 214 212 158 214 212 158 -210 208 158 204 201 155 194 191 148 194 189 146 204 201 155 214 212 158 -239 239 170 251 251 187 251 251 187 251 251 187 251 251 187 214 212 158 -188 184 146 145 141 105 53 55 47 12 12 12 15 15 15 63 64 60 -63 64 60 41 42 42 31 33 31 23 24 24 17 18 17 12 15 15 -11 13 13 9 11 11 8 9 9 7 9 9 6 8 8 6 8 8 -6 7 7 6 7 7 6 8 8 6 8 8 6 8 8 6 8 8 -6 8 8 7 9 9 7 9 9 7 9 9 7 9 9 7 9 9 -7 9 9 7 9 9 7 9 9 7 9 9 7 9 9 8 8 7 -43 45 43 251 251 187 156 151 111 8 10 10 7 9 9 7 9 9 -21 22 21 51 52 50 55 56 53 55 57 54 58 59 55 58 59 55 -75 75 61 158 153 112 197 193 154 224 223 159 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 214 212 158 204 201 155 194 189 146 -190 186 136 197 193 154 210 208 158 224 223 159 251 251 187 251 251 187 -251 251 187 251 251 187 239 239 170 210 208 158 197 193 154 176 171 126 -125 122 87 36 38 35 14 14 13 14 14 13 15 15 15 15 15 15 -15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 15 -15 15 15 14 14 13 13 13 13 12 12 12 10 10 9 3 4 4 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 7 7 5 71 71 57 131 127 93 158 153 112 -177 172 135 197 193 154 214 212 158 239 239 170 251 251 187 251 251 187 -238 237 168 210 208 158 204 201 155 197 193 154 204 201 155 214 212 158 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 214 212 158 -197 193 154 156 151 111 66 65 55 12 12 12 37 39 37 58 59 55 -58 59 55 41 42 42 31 33 31 22 24 23 17 17 17 12 14 14 -10 12 12 8 10 10 6 8 8 6 8 8 6 7 7 6 7 7 -6 7 7 5 7 7 6 7 7 6 7 7 6 8 8 6 8 8 -6 8 8 6 8 8 6 8 8 7 9 9 7 9 9 7 9 9 -7 9 9 6 8 8 6 8 8 6 8 8 6 8 8 6 8 8 -61 63 57 197 193 154 16 19 19 6 8 8 6 8 8 8 9 9 -41 42 42 47 48 46 51 52 50 51 52 50 55 56 53 55 56 53 -71 71 57 158 153 112 197 193 154 224 223 159 251 251 187 251 251 187 -251 251 187 251 251 187 239 239 170 214 212 158 204 201 155 194 189 146 -190 186 136 197 193 154 210 208 158 239 239 170 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 224 223 159 204 201 155 177 172 135 -121 119 87 30 31 28 13 13 13 14 14 13 14 14 13 14 14 13 -14 14 13 14 14 13 15 15 15 15 15 15 14 14 13 13 13 13 -12 12 12 12 12 12 10 10 9 4 5 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 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 48 49 45 131 127 93 174 170 121 -194 189 146 210 208 158 239 239 170 251 251 187 251 251 187 251 251 187 -251 251 187 214 212 158 204 201 155 197 193 154 204 201 155 210 208 158 -239 239 170 251 251 187 251 251 187 251 251 187 239 239 170 214 212 158 -194 191 148 156 151 111 71 71 57 19 20 19 51 52 50 51 52 50 -51 52 50 41 42 42 30 32 31 21 22 21 17 17 17 13 13 13 -9 11 11 8 9 9 6 8 8 6 7 7 6 7 7 5 7 7 -5 6 5 5 6 5 5 7 7 5 7 7 6 7 7 6 7 7 -6 8 8 6 8 8 6 8 8 6 7 7 6 7 7 6 7 7 -6 7 7 6 8 8 6 8 8 6 8 8 6 8 8 6 8 8 -55 56 53 43 45 43 6 8 8 6 8 8 6 8 8 47 48 46 -60 60 56 47 48 46 46 47 45 47 48 46 38 39 37 10 12 12 -66 65 55 145 141 105 197 193 154 214 212 158 251 251 187 251 251 187 -251 251 187 251 251 187 224 223 159 210 208 158 194 191 148 184 181 136 -184 181 136 194 189 146 204 201 155 224 223 159 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 239 239 170 210 208 158 181 176 137 -115 113 82 21 22 20 13 13 13 13 13 13 13 13 13 13 13 13 -14 14 13 13 13 13 13 13 13 13 13 13 12 12 12 11 11 11 -10 10 9 6 7 7 1 1 1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 2 2 1 66 65 55 144 139 99 178 174 128 -204 201 155 214 212 158 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 214 212 158 204 201 155 194 191 148 197 193 154 204 201 155 -214 212 158 239 239 170 239 239 170 239 239 170 214 212 158 210 208 158 -184 181 136 149 145 103 66 65 55 41 42 42 47 48 46 46 47 45 -43 45 43 39 40 39 28 31 30 21 22 21 16 16 16 10 12 12 -8 10 10 6 8 8 6 7 7 6 7 7 5 6 5 5 6 5 -5 6 5 5 6 5 5 6 5 5 6 5 5 7 7 5 7 7 -6 7 7 6 7 7 6 7 7 5 7 7 5 7 7 5 7 7 -5 7 7 6 7 7 6 7 7 6 7 7 6 7 7 6 8 8 -6 8 8 6 8 8 6 7 7 6 7 7 46 47 45 156 151 111 -105 104 92 58 59 55 43 45 43 32 34 33 6 8 8 6 8 8 -49 51 48 125 122 87 181 176 137 204 201 155 214 212 158 239 239 170 -239 239 170 214 212 158 210 208 158 197 193 154 181 176 137 176 171 126 -176 171 126 184 181 136 197 193 154 210 208 158 239 239 170 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 210 208 158 177 172 135 -99 98 80 13 13 13 12 12 12 12 12 12 13 13 13 12 12 12 -12 12 12 12 12 12 11 11 11 11 11 11 8 9 9 4 5 5 -1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 1 1 0 61 61 53 142 137 94 181 176 137 -204 201 155 224 223 159 251 251 187 251 251 187 251 251 187 251 251 187 -251 251 187 214 212 158 197 193 154 190 186 136 184 181 136 188 184 146 -197 193 154 204 201 155 210 208 158 210 208 158 204 201 155 194 189 146 -176 171 126 134 131 96 66 65 55 43 45 43 41 42 42 39 40 39 -35 37 36 33 36 34 27 29 28 20 20 20 15 15 15 9 11 11 -8 9 9 6 7 7 5 6 5 5 6 5 4 5 5 4 5 5 -4 5 5 4 5 5 4 5 5 4 5 5 5 6 5 4 5 5 -4 5 5 5 6 5 4 5 5 5 6 5 5 6 5 5 6 5 -5 7 7 5 7 7 5 7 7 5 7 7 5 7 7 5 7 7 -6 7 7 6 7 7 6 7 7 28 31 30 184 179 149 184 179 149 -145 141 105 84 83 72 27 29 28 5 7 7 5 6 5 16 16 16 -43 44 41 96 95 69 158 153 112 188 184 146 204 201 155 210 208 158 -204 201 155 197 193 154 184 179 149 177 172 135 168 163 120 164 159 111 -164 159 111 174 170 121 184 181 136 197 193 154 214 212 158 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 210 208 158 177 172 135 -71 71 57 11 11 11 12 12 12 11 11 11 11 11 11 11 11 11 -10 10 9 10 10 9 8 8 7 3 4 4 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 31 33 31 121 119 87 176 171 126 -197 193 154 214 212 158 251 251 187 251 251 187 251 251 187 251 251 187 -239 239 170 210 208 158 194 189 146 178 174 128 174 170 121 176 171 126 -177 172 135 181 176 137 184 179 149 184 179 149 181 176 137 178 174 128 -158 153 112 121 119 87 53 55 47 37 39 37 33 36 34 30 32 31 -27 29 28 25 27 26 24 26 24 19 20 19 13 13 13 8 10 10 -6 8 8 6 7 7 5 6 5 4 5 5 4 5 5 4 5 5 -4 5 5 4 5 5 4 5 5 3 4 4 3 4 4 4 5 5 -4 5 5 4 5 5 4 5 5 4 5 5 4 5 5 4 5 5 -5 6 5 5 6 5 5 6 5 5 6 5 5 6 5 5 6 5 -5 6 5 5 6 5 12 14 14 145 141 105 184 179 149 177 172 135 -90 89 73 21 22 21 5 6 5 5 6 5 4 5 5 37 39 37 -38 39 37 61 61 53 134 131 96 168 163 120 184 181 136 188 184 146 -184 179 149 177 172 135 168 163 120 164 159 111 155 149 109 151 147 98 -151 147 98 164 159 111 176 171 126 184 179 149 210 208 158 239 239 170 -251 251 187 251 251 187 251 251 187 239 239 170 210 208 158 158 153 112 -46 47 43 10 10 9 10 10 9 10 10 9 8 9 9 8 9 9 -6 7 7 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 13 12 7 82 81 62 158 153 112 -188 184 146 210 208 158 239 239 170 251 251 187 251 251 187 251 251 187 -224 223 159 204 201 155 184 181 136 171 165 117 164 159 111 160 154 106 -158 153 112 164 159 111 168 163 120 168 163 120 168 163 120 164 159 111 -142 137 94 96 95 69 43 44 41 27 29 28 26 28 27 23 24 24 -21 22 21 18 19 18 17 17 17 18 19 18 13 13 13 8 8 7 -6 7 7 5 6 5 4 5 5 3 4 4 3 4 4 3 4 4 -3 4 4 3 4 4 3 3 3 3 3 3 3 4 4 3 4 4 -3 4 4 3 4 4 4 5 5 4 5 5 4 5 5 4 5 5 -4 5 5 4 5 5 4 5 5 4 5 5 4 5 5 4 5 5 -4 5 5 4 5 5 4 5 5 4 5 5 4 5 5 4 5 5 -4 5 5 4 5 5 4 5 5 4 5 5 31 33 31 65 66 61 -37 39 37 38 39 37 96 95 69 144 139 99 168 163 120 174 170 121 -168 163 120 164 159 111 155 149 109 149 145 103 149 143 98 142 137 94 -149 143 98 151 147 98 164 159 111 177 172 135 197 193 154 210 208 158 -251 251 187 251 251 187 251 251 187 239 239 170 197 193 154 137 133 100 -24 26 24 8 9 9 8 9 9 8 8 7 6 7 7 2 2 2 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 46 47 43 125 122 87 -176 171 126 197 193 154 210 208 158 239 239 170 251 251 187 239 239 170 -214 212 158 197 193 154 181 176 137 164 159 111 151 147 98 149 143 98 -149 143 98 149 143 98 149 145 103 155 149 109 160 154 106 149 143 98 -118 116 76 82 81 62 30 31 28 21 22 21 19 20 19 17 17 17 -14 14 13 12 12 12 10 10 9 12 12 12 10 12 12 6 8 8 -4 5 5 3 4 4 3 4 4 3 4 4 3 3 3 3 3 3 -3 3 3 3 3 3 3 3 3 3 3 3 2 3 3 2 3 3 -3 4 4 3 4 4 3 4 4 3 4 4 3 4 4 4 5 5 -4 5 5 3 4 4 3 4 4 3 4 4 3 4 4 3 4 4 -4 5 5 4 5 5 4 5 5 4 5 5 4 5 5 4 5 5 -4 5 5 3 4 4 3 4 4 23 24 24 110 109 94 72 73 67 -39 40 39 22 24 23 46 47 43 103 101 77 142 137 94 155 149 109 -160 154 106 155 149 109 149 143 98 142 137 94 142 137 94 142 137 94 -142 137 94 149 143 98 155 149 109 176 171 126 184 179 149 210 208 158 -239 239 170 251 251 187 251 251 187 214 212 158 184 179 149 105 104 92 -10 10 9 6 7 7 3 4 4 1 1 1 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 12 12 9 82 81 62 -149 145 103 181 176 137 197 193 154 210 208 158 214 212 158 214 212 158 -210 208 158 197 193 154 177 172 135 158 153 112 149 143 98 142 137 94 -142 137 94 142 137 94 149 143 98 151 147 98 151 147 98 131 127 93 -103 101 77 71 71 57 22 24 23 15 15 15 13 13 13 11 11 11 -8 9 9 6 7 7 6 7 7 4 5 5 8 9 9 6 7 7 -4 5 5 3 3 3 3 3 3 3 3 3 3 3 3 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 -2 3 3 2 3 3 2 3 3 3 4 4 3 4 4 3 4 4 -3 4 4 3 4 4 3 3 3 3 4 4 3 4 4 3 4 4 -3 4 4 3 4 4 3 4 4 3 4 4 3 4 4 3 4 4 -3 4 4 3 4 4 21 22 21 145 141 105 145 141 105 72 73 67 -17 18 17 3 4 4 21 22 20 66 65 55 118 116 76 142 137 94 -149 143 98 151 147 98 149 143 98 142 137 94 142 137 94 142 137 94 -142 137 94 149 143 98 155 149 109 168 163 120 184 179 149 210 208 158 -239 239 170 251 251 187 251 251 187 210 208 158 177 172 135 71 71 57 -3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 36 38 35 -115 113 82 158 153 112 181 176 137 197 193 154 204 201 155 210 208 158 -204 201 155 188 184 146 177 172 135 164 159 111 149 145 103 142 137 94 -142 137 94 142 137 94 149 143 98 151 147 98 149 143 98 125 122 87 -96 95 69 61 61 53 16 17 12 8 9 9 8 8 7 6 7 7 -4 5 5 3 4 4 3 3 3 3 3 3 3 3 3 5 6 5 -3 4 4 2 3 3 2 2 2 2 2 2 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 2 -2 2 2 2 2 2 2 3 3 2 3 3 2 3 3 2 3 3 -3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 -3 3 3 2 3 3 2 3 3 3 4 4 3 4 4 3 4 4 -3 4 4 3 4 4 3 4 4 8 9 9 8 8 7 3 3 3 -3 3 3 3 3 3 9 9 8 36 38 35 82 81 62 118 116 76 -142 137 94 151 147 98 151 147 98 151 147 98 149 143 98 149 143 98 -149 143 98 151 147 98 160 154 106 176 171 126 188 184 146 210 208 158 -239 239 170 251 251 187 239 239 170 210 208 158 156 151 111 31 33 31 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 7 5 -66 65 55 125 122 87 158 153 112 181 176 137 194 189 146 197 193 154 -197 193 154 184 179 149 177 172 135 168 163 120 156 151 111 151 147 98 -151 147 98 151 147 98 151 147 98 161 156 96 149 143 98 118 116 76 -82 81 62 53 55 47 12 12 9 4 5 5 3 4 4 3 3 3 -3 3 3 3 3 3 2 2 2 2 2 2 1 1 1 1 2 2 -3 3 3 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 2 2 -1 2 2 1 2 2 1 2 2 2 2 2 2 2 2 2 3 3 -2 3 3 2 3 3 2 3 3 2 3 3 2 2 2 2 2 2 -2 3 3 2 3 3 2 3 3 2 3 3 2 3 3 2 3 3 -2 3 3 2 3 3 2 3 3 2 3 3 2 3 3 3 3 3 -3 3 3 3 3 3 72 73 67 61 61 53 53 55 47 96 95 69 -131 127 93 151 147 98 161 156 96 161 156 96 151 147 98 151 147 98 -161 156 96 160 154 106 164 159 111 177 172 135 197 193 154 210 208 158 -239 239 170 251 251 187 224 223 159 197 193 154 131 127 93 9 9 8 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -24 26 24 82 81 62 131 127 93 164 159 111 178 174 128 188 184 146 -188 184 146 188 184 146 181 176 137 176 171 126 168 163 120 164 159 111 -160 154 106 160 154 106 160 154 106 160 154 106 151 147 98 125 122 87 -82 81 62 61 61 53 12 12 9 3 3 3 3 3 3 2 2 2 -2 2 2 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 -0 0 0 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 2 2 1 2 2 1 2 2 1 2 2 -1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -2 3 3 2 3 3 2 3 3 2 3 3 2 3 3 2 3 3 -2 3 3 30 32 31 72 73 67 31 33 31 36 38 35 82 81 62 -118 116 76 149 143 98 161 156 96 161 156 96 161 156 96 160 154 106 -165 161 109 165 161 109 176 171 126 188 184 146 204 201 155 214 212 158 -239 239 170 239 239 170 214 212 158 184 179 149 82 81 62 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2 2 2 43 44 41 96 95 69 131 127 93 160 154 106 176 171 126 -184 181 136 184 181 136 184 181 136 181 176 137 178 174 128 174 170 121 -171 165 117 173 167 111 173 167 111 173 167 111 160 154 106 131 127 93 -96 95 69 66 65 55 16 17 12 2 2 2 1 1 1 1 1 1 -1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 10 9 6 30 31 28 71 71 57 -118 116 76 149 143 98 165 161 109 165 161 109 165 161 109 173 167 111 -173 167 111 176 171 126 184 181 136 197 193 154 210 208 158 224 223 159 -251 251 187 239 239 170 210 208 158 168 163 120 40 41 39 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 13 12 7 61 61 53 96 95 69 131 127 93 160 154 106 -176 171 126 184 181 136 184 181 136 188 184 146 184 181 136 184 181 136 -184 181 136 186 182 128 186 182 128 178 174 128 174 170 121 149 145 103 -118 116 76 82 81 62 21 22 20 1 1 1 1 1 1 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 -1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 -2 2 2 2 2 2 2 2 2 3 3 3 30 31 28 66 65 55 -118 116 76 149 143 98 165 161 109 173 167 111 173 167 111 174 170 121 -186 182 128 190 186 136 197 193 154 210 208 158 224 223 159 251 251 187 -251 251 187 239 239 170 197 193 154 137 133 100 12 12 9 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 30 31 28 71 71 57 103 101 77 134 131 96 -164 159 111 176 171 126 184 181 136 188 184 146 194 189 146 197 193 154 -197 193 154 197 193 154 194 191 148 194 189 146 190 186 136 176 171 126 -145 141 105 103 101 77 40 41 39 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 1 2 2 -1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 1 2 2 -1 2 2 1 2 2 1 2 2 1 2 2 30 31 28 71 71 57 -118 116 76 160 154 106 173 167 111 178 174 128 186 182 128 190 186 136 -194 191 148 204 201 155 210 208 158 224 223 159 251 251 187 251 251 187 -251 251 187 214 212 158 184 179 149 84 83 72 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 5 5 3 43 44 41 82 81 62 103 101 77 -142 137 94 165 161 109 178 174 128 190 186 136 197 193 154 204 201 155 -210 208 158 210 208 158 210 208 158 210 208 158 210 208 158 197 193 154 -177 172 135 145 141 105 79 78 62 5 4 3 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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 2 2 1 2 2 30 31 28 82 81 62 -142 137 94 165 161 109 178 174 128 190 186 136 194 191 148 204 201 155 -210 208 158 214 212 158 239 239 170 251 251 187 251 251 187 251 251 187 -251 251 187 210 208 158 168 163 120 36 38 35 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 16 17 12 53 55 47 82 81 62 -118 116 76 151 147 98 171 165 117 184 181 136 194 191 148 210 208 158 -214 212 158 224 223 159 239 239 170 239 239 170 224 223 159 214 212 158 -197 193 154 176 171 126 115 113 82 24 26 24 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 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 40 41 39 103 101 77 -151 147 98 176 171 126 190 186 136 197 193 154 210 208 158 214 212 158 -239 239 170 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -239 239 170 197 193 154 110 109 94 3 4 3 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 30 31 28 66 65 55 -96 95 69 125 122 87 160 154 106 178 174 128 194 189 146 204 201 155 -214 212 158 239 239 170 251 251 187 251 251 187 251 251 187 239 239 170 -210 208 158 188 184 146 149 145 103 61 61 53 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 61 61 53 131 127 93 -164 159 111 184 181 136 197 193 154 210 208 158 224 223 159 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 -210 208 158 168 163 120 43 44 41 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 4 3 2 36 38 35 -71 71 57 96 95 69 142 137 94 165 161 109 184 181 136 197 193 154 -210 208 158 239 239 170 251 251 187 251 251 187 251 251 187 251 251 187 -214 212 158 197 193 154 168 163 120 103 101 77 7 7 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -1 1 1 0 0 0 0 0 0 0 0 0 82 81 62 142 137 94 -174 170 121 194 189 146 210 208 158 224 223 159 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 251 251 187 224 223 159 -184 179 149 99 98 80 3 3 3 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7 7 5 -43 44 41 82 81 62 118 116 76 142 137 94 171 165 117 190 186 136 -204 201 155 224 223 159 251 251 187 251 251 187 251 251 187 251 251 187 -214 212 158 197 193 154 174 170 121 125 122 87 30 31 28 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 -1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 3 4 3 82 81 62 149 143 98 -176 171 126 194 191 148 210 208 158 239 239 170 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 251 251 187 239 239 170 204 201 155 -145 141 105 30 31 28 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -10 9 6 46 47 43 82 81 62 118 116 76 149 143 98 174 170 121 -194 189 146 210 208 158 224 223 159 251 251 187 251 251 187 224 223 159 -210 208 158 194 191 148 174 170 121 134 131 96 53 55 47 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 7 7 5 96 95 69 149 143 98 -176 171 126 194 191 148 210 208 158 239 239 170 251 251 187 251 251 187 -251 251 187 251 251 187 251 251 187 239 239 170 210 208 158 177 172 135 -75 75 61 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 10 9 6 46 47 43 82 81 62 118 116 76 149 143 98 -176 171 126 194 191 148 210 208 158 214 212 158 214 212 158 210 208 158 -197 193 154 184 181 136 164 159 111 131 127 93 53 55 47 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 7 7 5 96 95 69 149 143 98 -174 170 121 194 189 146 204 201 155 214 212 158 239 239 170 251 251 187 -251 251 187 251 251 187 239 239 170 210 208 158 184 179 149 110 109 94 -12 12 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 10 9 6 43 44 41 82 81 62 115 113 82 -144 139 99 168 163 120 188 184 146 197 193 154 197 193 154 194 189 146 -184 181 136 174 170 121 151 147 98 118 116 76 36 38 35 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 4 3 2 82 81 62 142 137 94 -171 165 117 186 182 128 194 191 148 210 208 158 214 212 158 224 223 159 -239 239 170 224 223 159 210 208 158 184 179 149 137 133 100 36 38 35 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 7 7 5 36 38 35 71 71 57 -103 101 77 131 127 93 155 149 109 168 163 120 168 163 120 168 163 120 -164 159 111 149 143 98 125 122 87 82 81 62 13 12 7 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 61 61 53 125 122 87 -160 154 106 174 170 121 184 181 136 194 189 146 204 201 155 210 208 158 -210 208 158 204 201 155 184 179 149 145 141 105 61 61 53 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 3 3 2 30 31 28 -61 61 53 82 81 62 103 101 77 121 119 87 125 122 87 125 122 87 -118 116 76 103 101 77 79 78 62 24 26 24 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 25 27 25 96 95 69 -142 137 94 160 154 106 171 165 117 178 174 128 184 181 136 184 181 136 -181 176 137 177 172 135 145 141 105 75 75 61 5 5 3 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -16 17 12 40 41 39 61 61 53 71 71 57 71 71 57 71 71 57 -66 65 55 43 44 41 12 12 9 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 46 47 43 -96 95 69 125 122 87 142 137 94 149 145 103 155 149 109 155 149 109 -145 141 105 121 119 87 66 65 55 7 7 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 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 1 1 1 16 17 12 24 26 24 25 27 25 19 20 18 -7 7 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 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 1 -25 27 25 61 61 53 82 81 62 96 95 69 96 95 69 82 81 62 -61 61 53 25 27 25 2 2 1 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 5 6 5 13 12 7 10 9 6 3 4 3 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 6 6 6 10 10 10 10 10 10 + 10 10 10 6 6 6 6 6 6 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 6 6 6 10 10 10 14 14 14 + 22 22 22 26 26 26 30 30 30 34 34 34 + 30 30 30 30 30 30 26 26 26 18 18 18 + 14 14 14 10 10 10 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 14 14 14 26 26 26 42 42 42 + 54 54 54 66 66 66 78 78 78 78 78 78 + 78 78 78 74 74 74 66 66 66 54 54 54 + 42 42 42 26 26 26 18 18 18 10 10 10 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 22 22 22 42 42 42 66 66 66 86 86 86 + 66 66 66 38 38 38 38 38 38 22 22 22 + 26 26 26 34 34 34 54 54 54 66 66 66 + 86 86 86 70 70 70 46 46 46 26 26 26 + 14 14 14 6 6 6 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 1 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 10 10 10 26 26 26 + 50 50 50 82 82 82 58 58 58 6 6 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 6 6 6 54 54 54 86 86 86 66 66 66 + 38 38 38 18 18 18 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 6 6 6 22 22 22 50 50 50 + 78 78 78 34 34 34 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 6 6 6 70 70 70 + 78 78 78 46 46 46 22 22 22 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 1 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 18 18 18 42 42 42 82 82 82 + 26 26 26 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 14 14 14 + 46 46 46 34 34 34 6 6 6 2 2 6 + 42 42 42 78 78 78 42 42 42 18 18 18 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 10 10 10 30 30 30 66 66 66 58 58 58 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 26 26 26 + 86 86 86 101 101 101 46 46 46 10 10 10 + 2 2 6 58 58 58 70 70 70 34 34 34 + 10 10 10 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 1 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 14 14 14 42 42 42 86 86 86 10 10 10 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 30 30 30 + 94 94 94 94 94 94 58 58 58 26 26 26 + 2 2 6 6 6 6 78 78 78 54 54 54 + 22 22 22 6 6 6 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 22 22 22 62 62 62 62 62 62 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 26 26 26 + 54 54 54 38 38 38 18 18 18 10 10 10 + 2 2 6 2 2 6 34 34 34 82 82 82 + 38 38 38 14 14 14 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 30 30 30 78 78 78 30 30 30 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 10 10 10 + 10 10 10 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 78 78 78 + 50 50 50 18 18 18 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 38 38 38 86 86 86 14 14 14 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 54 54 54 + 66 66 66 26 26 26 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 1 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 42 42 42 82 82 82 2 2 6 2 2 6 + 2 2 6 6 6 6 10 10 10 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 6 6 6 + 14 14 14 10 10 10 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 18 18 18 + 82 82 82 34 34 34 10 10 10 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 46 46 46 86 86 86 2 2 6 2 2 6 + 6 6 6 6 6 6 22 22 22 34 34 34 + 6 6 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 18 18 18 34 34 34 + 10 10 10 50 50 50 22 22 22 2 2 6 + 2 2 6 2 2 6 2 2 6 10 10 10 + 86 86 86 42 42 42 14 14 14 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 1 0 0 1 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 46 46 46 86 86 86 2 2 6 2 2 6 + 38 38 38 116 116 116 94 94 94 22 22 22 + 22 22 22 2 2 6 2 2 6 2 2 6 + 14 14 14 86 86 86 138 138 138 162 162 162 +154 154 154 38 38 38 26 26 26 6 6 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 86 86 86 46 46 46 14 14 14 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 46 46 46 86 86 86 2 2 6 14 14 14 +134 134 134 198 198 198 195 195 195 116 116 116 + 10 10 10 2 2 6 2 2 6 6 6 6 +101 98 89 187 187 187 210 210 210 218 218 218 +214 214 214 134 134 134 14 14 14 6 6 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 86 86 86 50 50 50 18 18 18 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 0 + 0 0 1 0 0 1 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 46 46 46 86 86 86 2 2 6 54 54 54 +218 218 218 195 195 195 226 226 226 246 246 246 + 58 58 58 2 2 6 2 2 6 30 30 30 +210 210 210 253 253 253 174 174 174 123 123 123 +221 221 221 234 234 234 74 74 74 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 70 70 70 58 58 58 22 22 22 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 46 46 46 82 82 82 2 2 6 106 106 106 +170 170 170 26 26 26 86 86 86 226 226 226 +123 123 123 10 10 10 14 14 14 46 46 46 +231 231 231 190 190 190 6 6 6 70 70 70 + 90 90 90 238 238 238 158 158 158 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 70 70 70 58 58 58 22 22 22 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 0 + 0 0 1 0 0 1 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 42 42 42 86 86 86 6 6 6 116 116 116 +106 106 106 6 6 6 70 70 70 149 149 149 +128 128 128 18 18 18 38 38 38 54 54 54 +221 221 221 106 106 106 2 2 6 14 14 14 + 46 46 46 190 190 190 198 198 198 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 74 74 74 62 62 62 22 22 22 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 0 + 0 0 1 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 42 42 42 94 94 94 14 14 14 101 101 101 +128 128 128 2 2 6 18 18 18 116 116 116 +118 98 46 121 92 8 121 92 8 98 78 10 +162 162 162 106 106 106 2 2 6 2 2 6 + 2 2 6 195 195 195 195 195 195 6 6 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 74 74 74 62 62 62 22 22 22 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 1 0 0 1 + 0 0 1 0 0 0 0 0 1 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 38 38 38 90 90 90 14 14 14 58 58 58 +210 210 210 26 26 26 54 38 6 154 114 10 +226 170 11 236 186 11 225 175 15 184 144 12 +215 174 15 175 146 61 37 26 9 2 2 6 + 70 70 70 246 246 246 138 138 138 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 70 70 70 66 66 66 26 26 26 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 38 38 38 86 86 86 14 14 14 10 10 10 +195 195 195 188 164 115 192 133 9 225 175 15 +239 182 13 234 190 10 232 195 16 232 200 30 +245 207 45 241 208 19 232 195 16 184 144 12 +218 194 134 211 206 186 42 42 42 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 50 50 50 74 74 74 30 30 30 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 34 34 34 86 86 86 14 14 14 2 2 6 +121 87 25 192 133 9 219 162 10 239 182 13 +236 186 11 232 195 16 241 208 19 244 214 54 +246 218 60 246 218 38 246 215 20 241 208 19 +241 208 19 226 184 13 121 87 25 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 50 50 50 82 82 82 34 34 34 10 10 10 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 34 34 34 82 82 82 30 30 30 61 42 6 +180 123 7 206 145 10 230 174 11 239 182 13 +234 190 10 238 202 15 241 208 19 246 218 74 +246 218 38 246 215 20 246 215 20 246 215 20 +226 184 13 215 174 15 184 144 12 6 6 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 26 26 26 94 94 94 42 42 42 14 14 14 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 30 30 30 78 78 78 50 50 50 104 69 6 +192 133 9 216 158 10 236 178 12 236 186 11 +232 195 16 241 208 19 244 214 54 245 215 43 +246 215 20 246 215 20 241 208 19 198 155 10 +200 144 11 216 158 10 156 118 10 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 6 6 6 90 90 90 54 54 54 18 18 18 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 30 30 30 78 78 78 46 46 46 22 22 22 +137 92 6 210 162 10 239 182 13 238 190 10 +238 202 15 241 208 19 246 215 20 246 215 20 +241 208 19 203 166 17 185 133 11 210 150 10 +216 158 10 210 150 10 102 78 10 2 2 6 + 6 6 6 54 54 54 14 14 14 2 2 6 + 2 2 6 62 62 62 74 74 74 30 30 30 + 10 10 10 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 34 34 34 78 78 78 50 50 50 6 6 6 + 94 70 30 139 102 15 190 146 13 226 184 13 +232 200 30 232 195 16 215 174 15 190 146 13 +168 122 10 192 133 9 210 150 10 213 154 11 +202 150 34 182 157 106 101 98 89 2 2 6 + 2 2 6 78 78 78 116 116 116 58 58 58 + 2 2 6 22 22 22 90 90 90 46 46 46 + 18 18 18 6 6 6 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 38 38 38 86 86 86 50 50 50 6 6 6 +128 128 128 174 154 114 156 107 11 168 122 10 +198 155 10 184 144 12 197 138 11 200 144 11 +206 145 10 206 145 10 197 138 11 188 164 115 +195 195 195 198 198 198 174 174 174 14 14 14 + 2 2 6 22 22 22 116 116 116 116 116 116 + 22 22 22 2 2 6 74 74 74 70 70 70 + 30 30 30 10 10 10 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 18 18 18 + 50 50 50 101 101 101 26 26 26 10 10 10 +138 138 138 190 190 190 174 154 114 156 107 11 +197 138 11 200 144 11 197 138 11 192 133 9 +180 123 7 190 142 34 190 178 144 187 187 187 +202 202 202 221 221 221 214 214 214 66 66 66 + 2 2 6 2 2 6 50 50 50 62 62 62 + 6 6 6 2 2 6 10 10 10 90 90 90 + 50 50 50 18 18 18 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 10 10 10 34 34 34 + 74 74 74 74 74 74 2 2 6 6 6 6 +144 144 144 198 198 198 190 190 190 178 166 146 +154 121 60 156 107 11 156 107 11 168 124 44 +174 154 114 187 187 187 190 190 190 210 210 210 +246 246 246 253 253 253 253 253 253 182 182 182 + 6 6 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 62 62 62 + 74 74 74 34 34 34 14 14 14 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 10 10 10 22 22 22 54 54 54 + 94 94 94 18 18 18 2 2 6 46 46 46 +234 234 234 221 221 221 190 190 190 190 190 190 +190 190 190 187 187 187 187 187 187 190 190 190 +190 190 190 195 195 195 214 214 214 242 242 242 +253 253 253 253 253 253 253 253 253 253 253 253 + 82 82 82 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 14 14 14 + 86 86 86 54 54 54 22 22 22 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 18 18 18 46 46 46 90 90 90 + 46 46 46 18 18 18 6 6 6 182 182 182 +253 253 253 246 246 246 206 206 206 190 190 190 +190 190 190 190 190 190 190 190 190 190 190 190 +206 206 206 231 231 231 250 250 250 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +202 202 202 14 14 14 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 42 42 42 86 86 86 42 42 42 18 18 18 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 14 14 14 38 38 38 74 74 74 66 66 66 + 2 2 6 6 6 6 90 90 90 250 250 250 +253 253 253 253 253 253 238 238 238 198 198 198 +190 190 190 190 190 190 195 195 195 221 221 221 +246 246 246 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 82 82 82 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 78 78 78 70 70 70 34 34 34 + 14 14 14 6 6 6 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 34 34 34 66 66 66 78 78 78 6 6 6 + 2 2 6 18 18 18 218 218 218 253 253 253 +253 253 253 253 253 253 253 253 253 246 246 246 +226 226 226 231 231 231 246 246 246 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 178 178 178 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 18 18 18 90 90 90 62 62 62 + 30 30 30 10 10 10 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 10 10 10 26 26 26 + 58 58 58 90 90 90 18 18 18 2 2 6 + 2 2 6 110 110 110 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +250 250 250 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 231 231 231 18 18 18 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 18 18 18 94 94 94 + 54 54 54 26 26 26 10 10 10 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 6 6 6 22 22 22 50 50 50 + 90 90 90 26 26 26 2 2 6 2 2 6 + 14 14 14 195 195 195 250 250 250 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +250 250 250 242 242 242 54 54 54 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 38 38 38 + 86 86 86 50 50 50 22 22 22 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 14 14 14 38 38 38 82 82 82 + 34 34 34 2 2 6 2 2 6 2 2 6 + 42 42 42 195 195 195 246 246 246 253 253 253 +253 253 253 253 253 253 253 253 253 250 250 250 +242 242 242 242 242 242 250 250 250 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 250 250 250 246 246 246 238 238 238 +226 226 226 231 231 231 101 101 101 6 6 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 38 38 38 82 82 82 42 42 42 14 14 14 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 10 10 10 26 26 26 62 62 62 66 66 66 + 2 2 6 2 2 6 2 2 6 6 6 6 + 70 70 70 170 170 170 206 206 206 234 234 234 +246 246 246 250 250 250 250 250 250 238 238 238 +226 226 226 231 231 231 238 238 238 250 250 250 +250 250 250 250 250 250 246 246 246 231 231 231 +214 214 214 206 206 206 202 202 202 202 202 202 +198 198 198 202 202 202 182 182 182 18 18 18 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 62 62 62 66 66 66 30 30 30 + 10 10 10 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 14 14 14 42 42 42 82 82 82 18 18 18 + 2 2 6 2 2 6 2 2 6 10 10 10 + 94 94 94 182 182 182 218 218 218 242 242 242 +250 250 250 253 253 253 253 253 253 250 250 250 +234 234 234 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 246 246 246 +238 238 238 226 226 226 210 210 210 202 202 202 +195 195 195 195 195 195 210 210 210 158 158 158 + 6 6 6 14 14 14 50 50 50 14 14 14 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 6 6 6 86 86 86 46 46 46 + 18 18 18 6 6 6 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 22 22 22 54 54 54 70 70 70 2 2 6 + 2 2 6 10 10 10 2 2 6 22 22 22 +166 166 166 231 231 231 250 250 250 253 253 253 +253 253 253 253 253 253 253 253 253 250 250 250 +242 242 242 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 246 246 246 +231 231 231 206 206 206 198 198 198 226 226 226 + 94 94 94 2 2 6 6 6 6 38 38 38 + 30 30 30 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 62 62 62 66 66 66 + 26 26 26 10 10 10 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 30 30 30 74 74 74 50 50 50 2 2 6 + 26 26 26 26 26 26 2 2 6 106 106 106 +238 238 238 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 246 246 246 218 218 218 202 202 202 +210 210 210 14 14 14 2 2 6 2 2 6 + 30 30 30 22 22 22 2 2 6 2 2 6 + 2 2 6 2 2 6 18 18 18 86 86 86 + 42 42 42 14 14 14 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 42 42 42 90 90 90 22 22 22 2 2 6 + 42 42 42 2 2 6 18 18 18 218 218 218 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 250 250 250 221 221 221 +218 218 218 101 101 101 2 2 6 14 14 14 + 18 18 18 38 38 38 10 10 10 2 2 6 + 2 2 6 2 2 6 2 2 6 78 78 78 + 58 58 58 22 22 22 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 18 18 18 + 54 54 54 82 82 82 2 2 6 26 26 26 + 22 22 22 2 2 6 123 123 123 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 250 250 250 +238 238 238 198 198 198 6 6 6 38 38 38 + 58 58 58 26 26 26 38 38 38 2 2 6 + 2 2 6 2 2 6 2 2 6 46 46 46 + 78 78 78 30 30 30 10 10 10 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 10 10 10 30 30 30 + 74 74 74 58 58 58 2 2 6 42 42 42 + 2 2 6 22 22 22 231 231 231 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 250 250 250 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 246 246 246 46 46 46 38 38 38 + 42 42 42 14 14 14 38 38 38 14 14 14 + 2 2 6 2 2 6 2 2 6 6 6 6 + 86 86 86 46 46 46 14 14 14 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 6 6 6 14 14 14 42 42 42 + 90 90 90 18 18 18 18 18 18 26 26 26 + 2 2 6 116 116 116 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 250 250 250 238 238 238 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 94 94 94 6 6 6 + 2 2 6 2 2 6 10 10 10 34 34 34 + 2 2 6 2 2 6 2 2 6 2 2 6 + 74 74 74 58 58 58 22 22 22 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 10 10 10 26 26 26 66 66 66 + 82 82 82 2 2 6 38 38 38 6 6 6 + 14 14 14 210 210 210 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 246 246 246 242 242 242 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 144 144 144 2 2 6 + 2 2 6 2 2 6 2 2 6 46 46 46 + 2 2 6 2 2 6 2 2 6 2 2 6 + 42 42 42 74 74 74 30 30 30 10 10 10 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 14 14 14 42 42 42 90 90 90 + 26 26 26 6 6 6 42 42 42 2 2 6 + 74 74 74 250 250 250 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 242 242 242 242 242 242 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 182 182 182 2 2 6 + 2 2 6 2 2 6 2 2 6 46 46 46 + 2 2 6 2 2 6 2 2 6 2 2 6 + 10 10 10 86 86 86 38 38 38 10 10 10 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 10 10 10 26 26 26 66 66 66 82 82 82 + 2 2 6 22 22 22 18 18 18 2 2 6 +149 149 149 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 234 234 234 242 242 242 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 206 206 206 2 2 6 + 2 2 6 2 2 6 2 2 6 38 38 38 + 2 2 6 2 2 6 2 2 6 2 2 6 + 6 6 6 86 86 86 46 46 46 14 14 14 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 18 18 18 46 46 46 86 86 86 18 18 18 + 2 2 6 34 34 34 10 10 10 6 6 6 +210 210 210 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 234 234 234 242 242 242 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 221 221 221 6 6 6 + 2 2 6 2 2 6 6 6 6 30 30 30 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 82 82 82 54 54 54 18 18 18 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 26 26 26 66 66 66 62 62 62 2 2 6 + 2 2 6 38 38 38 10 10 10 26 26 26 +238 238 238 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 231 231 231 238 238 238 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 231 231 231 6 6 6 + 2 2 6 2 2 6 10 10 10 30 30 30 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 66 66 66 58 58 58 22 22 22 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 38 38 38 78 78 78 6 6 6 2 2 6 + 2 2 6 46 46 46 14 14 14 42 42 42 +246 246 246 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 231 231 231 242 242 242 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 234 234 234 10 10 10 + 2 2 6 2 2 6 22 22 22 14 14 14 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 66 66 66 62 62 62 22 22 22 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 18 18 18 + 50 50 50 74 74 74 2 2 6 2 2 6 + 14 14 14 70 70 70 34 34 34 62 62 62 +250 250 250 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 231 231 231 246 246 246 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 234 234 234 14 14 14 + 2 2 6 2 2 6 30 30 30 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 66 66 66 62 62 62 22 22 22 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 18 18 18 + 54 54 54 62 62 62 2 2 6 2 2 6 + 2 2 6 30 30 30 46 46 46 70 70 70 +250 250 250 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 231 231 231 246 246 246 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 226 226 226 10 10 10 + 2 2 6 6 6 6 30 30 30 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 66 66 66 58 58 58 22 22 22 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 22 22 22 + 58 58 58 62 62 62 2 2 6 2 2 6 + 2 2 6 2 2 6 30 30 30 78 78 78 +250 250 250 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 231 231 231 246 246 246 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 206 206 206 2 2 6 + 22 22 22 34 34 34 18 14 6 22 22 22 + 26 26 26 18 18 18 6 6 6 2 2 6 + 2 2 6 82 82 82 54 54 54 18 18 18 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 26 26 26 + 62 62 62 106 106 106 74 54 14 185 133 11 +210 162 10 121 92 8 6 6 6 62 62 62 +238 238 238 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 231 231 231 246 246 246 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 158 158 158 18 18 18 + 14 14 14 2 2 6 2 2 6 2 2 6 + 6 6 6 18 18 18 66 66 66 38 38 38 + 6 6 6 94 94 94 50 50 50 18 18 18 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 10 10 10 10 10 10 18 18 18 38 38 38 + 78 78 78 142 134 106 216 158 10 242 186 14 +246 190 14 246 190 14 156 118 10 10 10 10 + 90 90 90 238 238 238 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 231 231 231 250 250 250 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 246 230 190 +238 204 91 238 204 91 181 142 44 37 26 9 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 38 38 38 46 46 46 + 26 26 26 106 106 106 54 54 54 18 18 18 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 6 6 6 14 14 14 22 22 22 + 30 30 30 38 38 38 50 50 50 70 70 70 +106 106 106 190 142 34 226 170 11 242 186 14 +246 190 14 246 190 14 246 190 14 154 114 10 + 6 6 6 74 74 74 226 226 226 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 231 231 231 250 250 250 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 228 184 62 +241 196 14 241 208 19 232 195 16 38 30 10 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 6 6 6 30 30 30 26 26 26 +203 166 17 154 142 90 66 66 66 26 26 26 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 18 18 18 38 38 38 58 58 58 + 78 78 78 86 86 86 101 101 101 123 123 123 +175 146 61 210 150 10 234 174 13 246 186 14 +246 190 14 246 190 14 246 190 14 238 190 10 +102 78 10 2 2 6 46 46 46 198 198 198 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 234 234 234 242 242 242 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 224 178 62 +242 186 14 241 196 14 210 166 10 22 18 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 6 6 6 121 92 8 +238 202 15 232 195 16 82 82 82 34 34 34 + 10 10 10 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 14 14 14 38 38 38 70 70 70 154 122 46 +190 142 34 200 144 11 197 138 11 197 138 11 +213 154 11 226 170 11 242 186 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +225 175 15 46 32 6 2 2 6 22 22 22 +158 158 158 250 250 250 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 250 250 250 242 242 242 224 178 62 +239 182 13 236 186 11 213 154 11 46 32 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 61 42 6 225 175 15 +238 190 10 236 186 11 112 100 78 42 42 42 + 14 14 14 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 22 22 22 54 54 54 154 122 46 213 154 11 +226 170 11 230 174 11 226 170 11 226 170 11 +236 178 12 242 186 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +241 196 14 184 144 12 10 10 10 2 2 6 + 6 6 6 116 116 116 242 242 242 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 231 231 231 198 198 198 214 170 54 +236 178 12 236 178 12 210 150 10 137 92 6 + 18 14 6 2 2 6 2 2 6 2 2 6 + 6 6 6 70 47 6 200 144 11 236 178 12 +239 182 13 239 182 13 124 112 88 58 58 58 + 22 22 22 6 6 6 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 30 30 30 70 70 70 180 133 36 226 170 11 +239 182 13 242 186 14 242 186 14 246 186 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 232 195 16 98 70 6 2 2 6 + 2 2 6 2 2 6 66 66 66 221 221 221 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 206 206 206 198 198 198 214 166 58 +230 174 11 230 174 11 216 158 10 192 133 9 +163 110 8 116 81 8 102 78 10 116 81 8 +167 114 7 197 138 11 226 170 11 239 182 13 +242 186 14 242 186 14 162 146 94 78 78 78 + 34 34 34 14 14 14 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 30 30 30 78 78 78 190 142 34 226 170 11 +239 182 13 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 241 196 14 203 166 17 22 18 6 + 2 2 6 2 2 6 2 2 6 38 38 38 +218 218 218 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +250 250 250 206 206 206 198 198 198 202 162 69 +226 170 11 236 178 12 224 166 10 210 150 10 +200 144 11 197 138 11 192 133 9 197 138 11 +210 150 10 226 170 11 242 186 14 246 190 14 +246 190 14 246 186 14 225 175 15 124 112 88 + 62 62 62 30 30 30 14 14 14 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 30 30 30 78 78 78 174 135 50 224 166 10 +239 182 13 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 241 196 14 139 102 15 + 2 2 6 2 2 6 2 2 6 2 2 6 + 78 78 78 250 250 250 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +250 250 250 214 214 214 198 198 198 190 150 46 +219 162 10 236 178 12 234 174 13 224 166 10 +216 158 10 213 154 11 213 154 11 216 158 10 +226 170 11 239 182 13 246 190 14 246 190 14 +246 190 14 246 190 14 242 186 14 206 162 42 +101 101 101 58 58 58 30 30 30 14 14 14 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 30 30 30 74 74 74 174 135 50 216 158 10 +236 178 12 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 241 196 14 226 184 13 + 61 42 6 2 2 6 2 2 6 2 2 6 + 22 22 22 238 238 238 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 226 226 226 187 187 187 180 133 36 +216 158 10 236 178 12 239 182 13 236 178 12 +230 174 11 226 170 11 226 170 11 230 174 11 +236 178 12 242 186 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 186 14 239 182 13 +206 162 42 106 106 106 66 66 66 34 34 34 + 14 14 14 6 6 6 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 26 26 26 70 70 70 163 133 67 213 154 11 +236 178 12 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 241 196 14 +190 146 13 18 14 6 2 2 6 2 2 6 + 46 46 46 246 246 246 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 221 221 221 86 86 86 156 107 11 +216 158 10 236 178 12 242 186 14 246 186 14 +242 186 14 239 182 13 239 182 13 242 186 14 +242 186 14 246 186 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +242 186 14 225 175 15 142 122 72 66 66 66 + 30 30 30 10 10 10 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 26 26 26 70 70 70 163 133 67 210 150 10 +236 178 12 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +232 195 16 121 92 8 34 34 34 106 106 106 +221 221 221 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +242 242 242 82 82 82 18 14 6 163 110 8 +216 158 10 236 178 12 242 186 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 242 186 14 163 133 67 + 46 46 46 18 18 18 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 10 10 10 + 30 30 30 78 78 78 163 133 67 210 150 10 +236 178 12 246 186 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +241 196 14 215 174 15 190 178 144 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 218 218 218 + 58 58 58 2 2 6 22 18 6 167 114 7 +216 158 10 236 178 12 246 186 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 186 14 242 186 14 190 150 46 + 54 54 54 22 22 22 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 38 38 38 86 86 86 180 133 36 213 154 11 +236 178 12 246 186 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 232 195 16 190 146 13 214 214 214 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 250 250 250 170 170 170 26 26 26 + 2 2 6 2 2 6 37 26 9 163 110 8 +219 162 10 239 182 13 246 186 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 186 14 236 178 12 224 166 10 142 122 72 + 46 46 46 18 18 18 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 18 18 18 + 50 50 50 109 106 95 192 133 9 224 166 10 +242 186 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +242 186 14 226 184 13 210 162 10 142 110 46 +226 226 226 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +253 253 253 253 253 253 253 253 253 253 253 253 +198 198 198 66 66 66 2 2 6 2 2 6 + 2 2 6 2 2 6 50 34 6 156 107 11 +219 162 10 239 182 13 246 186 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 242 186 14 +234 174 13 213 154 11 154 122 46 66 66 66 + 30 30 30 10 10 10 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 22 22 22 + 58 58 58 154 121 60 206 145 10 234 174 13 +242 186 14 246 186 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 186 14 236 178 12 210 162 10 163 110 8 + 61 42 6 138 138 138 218 218 218 250 250 250 +253 253 253 253 253 253 253 253 253 250 250 250 +242 242 242 210 210 210 144 144 144 66 66 66 + 6 6 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 61 42 6 163 110 8 +216 158 10 236 178 12 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 239 182 13 230 174 11 216 158 10 +190 142 34 124 112 88 70 70 70 38 38 38 + 18 18 18 6 6 6 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 22 22 22 + 62 62 62 168 124 44 206 145 10 224 166 10 +236 178 12 239 182 13 242 186 14 242 186 14 +246 186 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 236 178 12 216 158 10 175 118 6 + 80 54 7 2 2 6 6 6 6 30 30 30 + 54 54 54 62 62 62 50 50 50 38 38 38 + 14 14 14 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 6 6 6 80 54 7 167 114 7 +213 154 11 236 178 12 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 190 14 242 186 14 239 182 13 239 182 13 +230 174 11 210 150 10 174 135 50 124 112 88 + 82 82 82 54 54 54 34 34 34 18 18 18 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 18 18 18 + 50 50 50 158 118 36 192 133 9 200 144 11 +216 158 10 219 162 10 224 166 10 226 170 11 +230 174 11 236 178 12 239 182 13 239 182 13 +242 186 14 246 186 14 246 190 14 246 190 14 +246 190 14 246 190 14 246 190 14 246 190 14 +246 186 14 230 174 11 210 150 10 163 110 8 +104 69 6 10 10 10 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 6 6 6 91 60 6 167 114 7 +206 145 10 230 174 11 242 186 14 246 190 14 +246 190 14 246 190 14 246 186 14 242 186 14 +239 182 13 230 174 11 224 166 10 213 154 11 +180 133 36 124 112 88 86 86 86 58 58 58 + 38 38 38 22 22 22 10 10 10 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 14 14 14 + 34 34 34 70 70 70 138 110 50 158 118 36 +167 114 7 180 123 7 192 133 9 197 138 11 +200 144 11 206 145 10 213 154 11 219 162 10 +224 166 10 230 174 11 239 182 13 242 186 14 +246 186 14 246 186 14 246 186 14 246 186 14 +239 182 13 216 158 10 185 133 11 152 99 6 +104 69 6 18 14 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 2 2 6 2 2 6 2 2 6 + 2 2 6 6 6 6 80 54 7 152 99 6 +192 133 9 219 162 10 236 178 12 239 182 13 +246 186 14 242 186 14 239 182 13 236 178 12 +224 166 10 206 145 10 192 133 9 154 121 60 + 94 94 94 62 62 62 42 42 42 22 22 22 + 14 14 14 6 6 6 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 18 18 18 34 34 34 58 58 58 78 78 78 +101 98 89 124 112 88 142 110 46 156 107 11 +163 110 8 167 114 7 175 118 6 180 123 7 +185 133 11 197 138 11 210 150 10 219 162 10 +226 170 11 236 178 12 236 178 12 234 174 13 +219 162 10 197 138 11 163 110 8 130 83 6 + 91 60 6 10 10 10 2 2 6 2 2 6 + 18 18 18 38 38 38 38 38 38 38 38 38 + 38 38 38 38 38 38 38 38 38 38 38 38 + 38 38 38 38 38 38 26 26 26 2 2 6 + 2 2 6 6 6 6 70 47 6 137 92 6 +175 118 6 200 144 11 219 162 10 230 174 11 +234 174 13 230 174 11 219 162 10 210 150 10 +192 133 9 163 110 8 124 112 88 82 82 82 + 50 50 50 30 30 30 14 14 14 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 14 14 14 22 22 22 34 34 34 + 42 42 42 58 58 58 74 74 74 86 86 86 +101 98 89 122 102 70 130 98 46 121 87 25 +137 92 6 152 99 6 163 110 8 180 123 7 +185 133 11 197 138 11 206 145 10 200 144 11 +180 123 7 156 107 11 130 83 6 104 69 6 + 50 34 6 54 54 54 110 110 110 101 98 89 + 86 86 86 82 82 82 78 78 78 78 78 78 + 78 78 78 78 78 78 78 78 78 78 78 78 + 78 78 78 82 82 82 86 86 86 94 94 94 +106 106 106 101 101 101 86 66 34 124 80 6 +156 107 11 180 123 7 192 133 9 200 144 11 +206 145 10 200 144 11 192 133 9 175 118 6 +139 102 15 109 106 95 70 70 70 42 42 42 + 22 22 22 10 10 10 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 6 6 6 10 10 10 + 14 14 14 22 22 22 30 30 30 38 38 38 + 50 50 50 62 62 62 74 74 74 90 90 90 +101 98 89 112 100 78 121 87 25 124 80 6 +137 92 6 152 99 6 152 99 6 152 99 6 +138 86 6 124 80 6 98 70 6 86 66 30 +101 98 89 82 82 82 58 58 58 46 46 46 + 38 38 38 34 34 34 34 34 34 34 34 34 + 34 34 34 34 34 34 34 34 34 34 34 34 + 34 34 34 34 34 34 38 38 38 42 42 42 + 54 54 54 82 82 82 94 86 76 91 60 6 +134 86 6 156 107 11 167 114 7 175 118 6 +175 118 6 167 114 7 152 99 6 121 87 25 +101 98 89 62 62 62 34 34 34 18 18 18 + 6 6 6 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 6 6 6 6 6 6 10 10 10 + 18 18 18 22 22 22 30 30 30 42 42 42 + 50 50 50 66 66 66 86 86 86 101 98 89 +106 86 58 98 70 6 104 69 6 104 69 6 +104 69 6 91 60 6 82 62 34 90 90 90 + 62 62 62 38 38 38 22 22 22 14 14 14 + 10 10 10 10 10 10 10 10 10 10 10 10 + 10 10 10 10 10 10 6 6 6 10 10 10 + 10 10 10 10 10 10 10 10 10 14 14 14 + 22 22 22 42 42 42 70 70 70 89 81 66 + 80 54 7 104 69 6 124 80 6 137 92 6 +134 86 6 116 81 8 100 82 52 86 86 86 + 58 58 58 30 30 30 14 14 14 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 6 6 6 10 10 10 14 14 14 + 18 18 18 26 26 26 38 38 38 54 54 54 + 70 70 70 86 86 86 94 86 76 89 81 66 + 89 81 66 86 86 86 74 74 74 50 50 50 + 30 30 30 14 14 14 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 18 18 18 34 34 34 58 58 58 + 82 82 82 89 81 66 89 81 66 89 81 66 + 94 86 66 94 86 76 74 74 74 50 50 50 + 26 26 26 14 14 14 6 6 6 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 6 6 6 6 6 6 14 14 14 18 18 18 + 30 30 30 38 38 38 46 46 46 54 54 54 + 50 50 50 42 42 42 30 30 30 18 18 18 + 10 10 10 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 6 6 6 14 14 14 26 26 26 + 38 38 38 50 50 50 58 58 58 58 58 58 + 54 54 54 42 42 42 30 30 30 18 18 18 + 10 10 10 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 6 6 6 10 10 10 14 14 14 18 18 18 + 18 18 18 14 14 14 10 10 10 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 6 6 6 + 14 14 14 18 18 18 22 22 22 22 22 22 + 18 18 18 14 14 14 10 10 10 6 6 6 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/trunk/drivers/video/logo/logo_linux_vga16.ppm b/trunk/drivers/video/logo/logo_linux_vga16.ppm index 12ac3a5454c0..1850c15e6feb 100644 --- a/trunk/drivers/video/logo/logo_linux_vga16.ppm +++ b/trunk/drivers/video/logo/logo_linux_vga16.ppm @@ -1,2739 +1,1604 @@ P3 -142 114 +# Standard 16-color Linux logo +80 80 255 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 -0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 170 170 170 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -85 85 85 0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 170 170 170 170 85 0 170 170 170 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -170 170 170 255 255 85 170 170 170 170 170 170 170 170 170 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 170 170 170 -255 255 85 170 170 170 170 170 170 170 85 0 85 255 85 170 85 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 170 170 170 170 85 0 -170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 170 85 0 170 170 170 -170 170 170 170 85 0 170 170 170 170 170 170 170 85 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 85 255 85 -255 85 85 85 255 85 170 170 170 170 85 0 170 170 170 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 170 85 0 85 85 85 85 85 85 -170 170 170 170 85 0 170 170 170 85 85 85 170 85 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 85 85 85 170 85 0 -85 85 85 85 85 85 170 85 0 85 255 85 85 85 85 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 170 85 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 170 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -170 85 0 85 255 85 170 85 0 170 85 0 170 85 0 85 255 85 -170 85 0 170 85 0 0 170 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 170 0 170 85 0 -255 255 85 170 85 0 255 255 85 255 255 85 255 255 85 170 85 0 -255 255 85 85 255 85 170 85 0 170 85 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 85 0 255 255 85 -85 255 85 255 255 85 255 255 85 170 85 0 255 255 85 255 255 85 -255 255 85 170 85 0 255 255 85 85 255 85 170 85 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 255 255 85 170 85 0 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 170 85 0 -255 255 85 255 255 85 255 255 85 255 255 85 170 85 0 85 255 85 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 170 170 170 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 170 85 0 255 255 85 255 255 85 -255 255 85 255 255 85 170 85 0 255 255 85 85 255 85 255 255 85 -255 255 85 170 85 0 255 255 85 170 85 0 255 255 85 170 85 0 -170 85 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 170 170 170 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 170 85 0 255 255 85 85 255 85 255 255 85 -170 170 170 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 85 255 85 255 255 85 255 255 85 255 255 85 -85 255 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 170 85 0 255 255 85 255 255 85 255 255 85 -255 255 255 255 255 85 255 255 85 170 85 0 255 255 85 170 85 0 -255 255 85 255 255 85 255 255 85 255 255 85 170 85 0 255 255 85 -170 85 0 170 85 0 0 170 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 170 85 0 85 255 85 255 255 85 170 170 170 255 255 255 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 170 85 0 255 255 85 85 255 85 255 255 85 -255 255 85 85 255 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 255 255 85 255 255 85 255 255 85 255 255 255 255 255 85 -255 255 85 255 255 85 85 255 85 255 255 85 255 255 85 85 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 170 85 0 -255 255 85 170 85 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -85 85 85 0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -170 85 0 170 85 0 255 255 85 255 255 85 255 255 255 170 170 170 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -170 85 0 255 255 85 255 255 85 170 85 0 255 255 85 255 255 85 -255 255 85 85 255 85 170 85 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -255 255 85 85 255 85 255 255 85 170 170 170 255 255 255 255 255 85 -255 255 85 255 255 85 170 85 0 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 85 255 85 170 85 0 -255 255 85 170 85 0 170 85 0 0 0 0 85 85 85 0 0 0 -85 85 85 85 85 85 85 85 85 170 170 170 170 170 170 170 170 170 -85 255 85 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 170 170 170 255 255 85 170 170 170 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 170 0 -170 85 0 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 85 255 85 255 255 85 170 85 0 170 85 0 -170 85 0 85 255 85 255 255 85 85 85 85 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 85 255 85 170 170 170 170 170 170 -85 85 85 170 170 170 170 170 170 170 85 0 170 170 170 170 170 170 -85 255 85 170 170 170 170 85 0 170 170 170 85 255 85 255 85 85 -85 255 85 170 170 170 255 255 85 85 85 85 255 255 85 170 170 170 -85 255 85 170 170 170 255 255 85 170 170 170 170 170 170 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 255 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 170 85 0 -255 255 85 255 255 85 255 255 85 170 85 0 0 170 0 85 85 85 -170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 85 255 85 -255 85 85 85 255 85 85 85 85 255 85 85 85 85 85 170 170 170 -170 85 0 170 170 170 85 85 85 85 255 85 85 85 85 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -170 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 85 -170 85 0 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 170 85 0 255 255 85 85 85 85 85 85 85 -255 255 85 170 170 170 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 85 85 85 170 170 170 170 85 0 170 170 170 -170 170 170 255 255 85 170 170 170 85 85 85 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 85 0 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 170 85 0 170 85 0 0 170 0 -0 0 0 170 85 0 170 85 0 0 170 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 85 85 85 170 170 170 85 85 85 -170 170 170 85 85 85 85 85 85 170 170 170 170 85 0 85 85 85 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 255 255 85 170 85 0 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 170 85 0 -255 255 85 255 255 85 255 255 85 170 85 0 255 255 85 255 255 85 -170 85 0 255 255 85 85 255 85 255 255 85 255 255 85 170 85 0 -170 85 0 255 255 85 170 85 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 255 255 85 255 255 85 -255 255 85 255 255 85 170 85 0 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 170 85 0 255 255 85 255 255 85 -85 255 85 170 85 0 0 170 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 170 0 170 85 0 255 255 85 -85 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -170 85 0 255 255 85 85 255 85 255 255 85 255 255 85 170 85 0 -85 255 85 170 85 0 170 85 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 170 85 0 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 170 85 0 255 255 85 85 255 85 255 255 85 170 85 0 -255 255 85 255 255 85 170 85 0 255 255 85 170 85 0 85 255 85 -170 85 0 170 85 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 255 255 85 170 85 0 -255 255 85 170 85 0 255 255 85 170 85 0 255 255 85 85 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 170 85 0 255 255 85 85 255 85 170 85 0 170 85 0 -0 170 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 170 85 0 255 255 85 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 255 255 85 170 85 0 255 255 85 170 85 0 85 255 85 -255 255 85 85 255 85 170 85 0 170 85 0 85 255 85 170 85 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 255 255 85 85 255 85 -255 255 85 255 255 85 85 255 85 255 255 85 255 255 85 255 255 85 -255 255 85 170 85 0 255 255 85 85 255 85 255 255 85 255 255 85 -170 85 0 170 85 0 85 255 85 170 85 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 85 85 85 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 85 85 85 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 255 255 85 255 255 85 -170 85 0 255 255 85 255 255 85 170 85 0 255 255 85 170 85 0 -255 255 85 85 255 85 170 85 0 255 255 85 170 85 0 85 255 85 -170 85 0 170 85 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 170 170 170 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 85 85 85 85 85 85 85 85 85 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 85 0 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 255 255 85 85 255 85 -170 85 0 255 255 85 170 85 0 85 255 85 170 85 0 170 85 0 -0 170 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 170 170 170 170 170 170 255 255 255 170 170 170 -170 170 170 170 170 170 85 85 85 85 85 85 85 85 85 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 255 85 255 255 85 -170 85 0 255 255 85 255 255 85 170 85 0 85 255 85 170 85 0 -255 255 85 170 85 0 0 170 0 170 85 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 170 170 170 170 170 170 170 170 170 85 85 85 -85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 85 -255 255 85 255 255 85 255 255 85 255 255 85 170 85 0 170 85 0 -0 170 0 85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -255 255 85 255 255 85 170 85 0 0 170 0 85 85 85 85 85 85 -85 85 85 85 85 85 0 0 0 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 85 85 85 85 85 85 170 170 170 170 170 170 85 85 85 -170 170 170 170 170 170 170 170 170 170 170 170 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 170 85 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 85 85 85 85 85 85 170 170 170 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -170 170 170 170 170 170 170 170 170 170 170 170 255 255 255 255 255 255 -255 255 255 255 255 255 255 255 255 170 170 170 255 255 255 170 170 170 -170 170 170 170 170 170 170 170 170 85 85 85 85 85 85 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 170 170 170 170 170 170 -255 255 255 255 255 255 255 255 255 170 170 170 255 255 255 170 170 170 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -255 255 255 255 255 255 170 170 170 255 255 255 170 170 170 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 170 170 170 170 170 170 -255 255 255 170 170 170 255 255 255 255 255 255 255 255 255 255 255 255 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 170 170 170 -255 255 255 255 255 255 170 170 170 255 255 255 255 255 255 255 255 255 -255 255 255 255 255 255 255 255 255 255 255 255 170 170 170 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 170 170 170 -170 170 170 170 170 170 255 255 255 170 170 170 255 255 255 170 170 170 -255 255 255 170 170 170 255 255 255 170 170 170 255 255 255 255 255 255 -255 255 255 170 170 170 255 255 255 170 170 170 255 255 255 170 170 170 -170 170 170 170 170 170 170 170 170 170 170 170 85 85 85 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 170 170 170 85 85 85 170 170 170 -170 170 170 170 170 170 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -170 170 170 85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 170 170 85 85 85 -85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 170 170 170 85 85 85 -85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 85 85 85 170 170 170 85 85 85 85 85 85 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 170 170 170 170 170 170 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 170 170 170 85 85 85 85 85 85 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 255 255 255 170 170 170 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 170 170 170 -170 170 170 255 255 255 170 170 170 170 170 170 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 170 170 170 170 170 -255 255 255 255 255 255 170 170 170 170 170 170 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 170 170 170 170 170 170 255 255 255 -255 255 255 170 170 170 170 170 170 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -170 170 170 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 170 170 170 255 255 255 255 255 255 255 255 255 -170 170 170 170 170 170 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -170 170 170 170 170 170 255 255 255 255 255 255 255 255 255 170 170 170 -170 170 170 170 170 170 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 170 170 170 170 170 -170 170 170 255 255 255 255 255 255 255 255 255 170 170 170 170 170 170 -170 170 170 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 170 170 170 170 170 170 170 170 170 -255 255 255 255 255 255 255 255 255 255 255 255 170 170 170 170 170 170 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 170 170 170 255 255 255 255 255 255 255 255 255 -255 255 255 255 255 255 170 170 170 170 170 170 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 170 170 170 255 255 255 85 85 85 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -170 170 170 170 170 170 255 255 255 170 170 170 255 255 255 255 255 255 -255 255 255 255 255 255 170 170 170 170 170 170 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 170 170 170 255 255 255 170 170 170 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -255 255 255 170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 255 255 255 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 255 255 255 255 255 255 255 255 255 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 170 170 170 -255 255 255 170 170 170 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 170 170 170 -170 170 170 255 255 255 255 255 255 255 255 255 255 255 255 170 170 170 -170 170 170 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -170 170 170 255 255 255 255 255 255 170 170 170 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -85 85 85 170 170 170 255 255 255 255 255 255 255 255 255 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 255 255 255 -255 255 255 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 -170 170 170 255 255 255 255 255 255 255 255 255 170 170 170 170 170 170 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 170 170 170 170 170 170 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -170 170 170 255 255 255 255 255 255 255 255 255 85 85 85 0 0 0 -0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 170 170 170 255 255 255 255 255 255 255 255 255 170 170 170 -0 0 0 85 85 85 0 0 0 85 85 85 170 170 170 255 255 255 -255 255 255 170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 255 255 255 255 255 255 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 85 85 85 -170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 170 170 255 255 255 -170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 255 255 255 255 255 255 255 255 255 255 255 255 0 0 0 -0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 255 255 255 255 255 255 255 255 255 170 170 170 170 170 170 -85 85 85 0 0 0 0 0 0 85 85 85 170 170 170 255 255 255 -255 255 255 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 -170 170 170 255 255 255 170 170 170 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 85 85 85 0 0 0 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 170 170 170 85 85 85 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 170 170 170 -255 255 255 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 255 255 255 255 255 255 255 255 255 170 170 170 -0 0 0 85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -170 170 170 170 170 170 255 255 255 170 170 170 255 255 255 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 170 170 170 255 255 255 -170 170 170 170 170 170 0 0 0 0 0 0 0 0 0 85 85 85 -170 170 170 255 255 255 255 255 255 0 0 0 0 0 0 85 85 85 -255 255 255 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 -85 85 85 0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 255 255 255 -255 255 255 255 255 255 170 170 170 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 255 255 255 170 170 170 170 170 170 170 170 170 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 -85 85 85 170 170 170 255 255 255 170 170 170 170 170 170 85 85 85 -85 85 85 0 0 0 85 85 85 85 85 85 85 85 85 170 170 170 -170 170 170 85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 -170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 170 170 170 -170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 170 170 170 170 170 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 170 170 170 -255 255 255 170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 170 170 170 170 170 170 255 255 85 85 85 85 -85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 -85 85 85 170 170 170 170 170 170 170 170 170 170 85 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 170 170 170 170 85 0 -170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -170 85 0 170 170 170 85 85 85 0 0 0 85 85 85 85 85 85 -170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 170 170 255 255 255 -170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -255 255 255 170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 170 85 0 170 170 170 170 170 170 85 85 85 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 -85 85 85 170 85 0 85 255 85 170 85 0 170 170 170 85 85 85 -85 85 85 0 0 0 0 0 0 85 85 85 170 85 0 85 255 85 -170 85 0 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -85 85 85 85 85 85 170 85 0 0 0 0 85 85 85 85 85 85 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 255 255 255 -255 255 255 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 -170 170 170 170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 170 170 170 170 85 0 170 170 170 170 85 0 -85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 255 85 85 170 170 170 85 255 85 170 85 0 -85 85 85 85 85 85 170 85 0 85 85 85 170 170 170 85 85 85 -170 170 170 170 85 0 85 85 85 85 85 85 85 85 85 85 85 85 -170 85 0 85 255 85 85 85 85 85 85 85 85 85 85 170 85 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 170 170 170 -255 255 255 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 85 0 170 170 170 170 85 0 85 85 85 0 0 0 -85 85 85 85 85 85 85 255 85 170 170 170 170 170 170 170 85 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 85 255 85 255 85 85 170 170 170 170 170 170 -170 170 170 85 255 85 170 170 170 170 85 0 170 170 170 170 85 0 -170 170 170 85 85 85 85 255 85 170 85 0 170 170 170 170 85 0 -170 170 170 170 170 170 170 85 0 85 85 85 85 85 85 85 255 85 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 170 170 170 170 170 170 0 0 0 0 0 0 85 85 85 -170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 255 255 85 85 85 85 85 85 85 85 85 85 -85 255 85 255 85 85 170 170 170 170 85 0 170 170 170 85 255 85 -85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 170 85 0 170 170 170 170 170 170 255 255 85 -170 170 170 255 85 85 170 170 170 170 170 170 255 255 85 170 170 170 -85 255 85 170 170 170 255 85 85 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 170 85 0 170 170 170 170 85 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 170 170 170 85 85 85 0 0 0 85 85 85 -85 85 85 170 85 0 85 85 85 0 0 0 85 85 85 85 85 85 -85 85 85 170 85 0 170 170 170 170 170 170 255 255 85 170 170 170 -170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 255 85 85 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 85 85 85 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 170 170 170 255 255 85 170 170 170 170 170 170 -170 170 170 255 255 85 170 170 170 170 170 170 170 170 170 170 85 0 -170 170 170 255 255 85 170 170 170 255 255 85 170 170 170 255 255 85 -170 170 170 255 255 85 170 170 170 170 170 170 85 255 85 170 85 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 170 170 170 85 85 85 85 85 85 0 0 0 -85 85 85 85 85 85 170 170 170 85 85 85 170 170 170 170 85 0 -170 170 170 85 255 85 170 170 170 170 85 0 170 170 170 170 170 170 -255 255 85 170 170 170 170 170 170 255 255 255 255 255 85 170 170 170 -255 255 85 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 170 85 0 170 170 170 170 170 170 170 170 170 255 255 255 -170 170 170 255 255 255 255 255 85 170 170 170 255 255 85 170 170 170 -255 255 85 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 255 85 85 170 170 170 170 170 170 -85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 170 85 0 85 85 85 -85 85 85 255 255 85 170 170 170 170 170 170 170 170 170 170 170 170 -255 255 85 170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 -170 170 170 255 255 255 255 255 255 170 170 170 255 255 255 170 170 170 -170 170 170 85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 85 255 85 170 170 170 255 255 85 255 255 255 255 255 255 -255 255 255 170 170 170 255 255 255 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 255 255 85 170 170 170 255 255 85 255 255 255 -255 255 85 255 255 255 255 255 85 170 170 170 170 170 170 170 85 0 -170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 170 170 170 255 255 85 170 170 170 255 255 85 170 170 170 -170 170 170 255 255 85 170 170 170 170 170 170 170 170 170 255 255 85 -255 255 255 255 255 255 255 255 85 255 255 255 255 255 255 170 170 170 -255 255 85 85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 -85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 170 170 170 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 170 170 170 170 170 170 170 170 170 255 255 255 170 170 170 -255 255 255 255 255 255 255 255 255 170 170 170 170 170 170 255 255 85 -170 170 170 255 255 85 170 170 170 255 255 255 170 170 170 255 255 255 -255 255 255 255 255 255 170 170 170 255 255 85 170 170 170 255 255 85 -85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 170 85 0 170 170 170 -255 255 85 170 170 170 170 170 170 255 255 255 255 255 255 255 255 255 -170 170 170 170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 -255 255 255 170 170 170 255 255 255 255 255 255 170 170 170 255 255 255 -170 170 170 170 170 170 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 85 85 85 85 85 85 0 0 0 -85 85 85 170 85 0 255 255 255 170 170 170 255 255 255 255 255 255 -255 255 85 255 255 255 170 170 170 255 255 85 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 255 255 85 255 255 255 255 255 255 -170 170 170 255 255 255 255 255 255 170 170 170 170 170 170 170 170 170 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 255 85 170 170 170 -170 170 170 255 255 85 170 170 170 255 255 255 170 170 170 255 255 255 -255 255 255 255 255 255 255 255 85 170 170 170 170 170 170 255 255 255 -170 170 170 255 255 255 255 255 255 170 170 170 255 255 255 255 255 85 -170 170 170 170 85 0 85 85 85 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 170 170 170 170 170 170 255 255 85 170 170 170 255 255 255 -255 255 255 170 170 170 255 255 255 170 170 170 170 170 170 255 255 85 -170 170 170 255 255 85 170 170 170 255 255 255 170 170 170 255 255 255 -255 255 255 255 255 255 255 255 255 255 255 255 170 170 170 255 255 85 -85 85 85 85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 170 85 0 170 170 170 -170 170 170 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -170 170 170 170 170 170 170 170 170 170 170 170 255 255 85 170 170 170 -255 255 85 255 255 255 170 170 170 255 255 255 170 170 170 170 170 170 -170 170 170 170 170 170 85 85 85 0 0 0 85 85 85 85 85 85 -0 0 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -85 85 85 85 85 85 170 170 170 170 170 170 255 255 255 170 170 170 -255 255 255 170 170 170 255 255 85 170 170 170 170 170 170 170 170 170 -255 85 85 170 170 170 170 170 170 170 170 170 255 255 255 255 255 255 -170 170 170 255 255 255 255 255 255 170 170 170 255 255 255 170 170 170 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 170 170 170 -255 255 85 170 170 170 255 255 255 170 170 170 255 255 255 255 255 255 -255 255 85 255 255 255 170 170 170 255 255 85 170 170 170 170 170 170 -170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 255 255 85 -170 170 170 170 85 0 85 85 85 0 0 0 85 85 85 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 170 170 170 170 170 170 -170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 170 170 170 255 255 85 170 170 170 170 170 170 -255 255 85 170 170 170 170 170 170 170 170 170 170 170 170 255 85 85 -85 255 85 170 170 170 170 170 170 170 170 170 255 255 85 170 170 170 -255 255 255 255 255 255 255 255 255 255 255 85 170 170 170 170 170 170 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 255 255 85 -170 170 170 170 170 170 255 255 255 255 255 255 255 255 255 170 170 170 -255 255 255 170 170 170 170 170 170 170 170 170 170 170 170 255 85 85 -170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 -170 170 170 85 85 85 85 85 85 0 0 0 85 85 85 0 0 0 -85 85 85 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 170 170 170 170 170 170 170 170 170 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 170 85 0 170 170 170 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 170 85 0 170 170 170 85 255 85 -255 85 85 170 170 170 255 255 85 170 170 170 170 170 170 255 255 255 -255 255 255 170 170 170 255 255 255 255 255 255 170 170 170 170 170 170 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 170 170 170 -170 170 170 255 255 85 170 170 170 255 255 85 255 255 255 255 255 255 -170 170 170 170 170 170 255 255 85 170 170 170 255 85 85 85 255 85 -170 170 170 170 85 0 170 170 170 170 170 170 255 255 85 170 170 170 -170 85 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 85 85 85 85 85 85 85 85 85 170 170 170 255 255 85 -170 170 170 170 85 0 170 170 170 170 170 170 170 85 0 85 85 85 -170 170 170 170 85 0 85 85 85 170 170 170 170 170 170 170 170 170 -170 170 170 255 255 255 255 255 255 255 255 85 170 170 170 170 170 170 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 170 85 0 -170 170 170 170 170 170 255 255 255 170 170 170 255 255 255 170 170 170 -255 255 255 170 170 170 170 170 170 170 85 0 170 170 170 85 85 85 -170 170 170 170 170 170 170 85 0 170 170 170 170 85 0 85 85 85 -85 255 85 85 85 85 0 0 0 0 0 0 0 0 0 85 85 85 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -85 85 85 0 0 0 85 85 85 170 85 0 85 85 85 170 170 170 -170 85 0 170 170 170 85 255 85 170 85 0 170 170 170 85 85 85 -170 85 0 170 170 170 170 170 170 255 255 85 170 170 170 255 255 255 -255 255 85 255 255 255 170 170 170 170 170 170 170 170 170 170 85 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 255 255 85 -170 170 170 255 255 85 170 170 170 170 170 170 85 255 85 170 170 170 -170 85 0 170 85 0 170 170 170 85 255 85 85 85 85 170 170 170 -170 85 0 85 85 85 0 0 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 170 170 170 85 85 85 -0 0 0 0 0 0 0 0 0 85 85 85 170 85 0 85 85 85 -170 170 170 170 85 0 170 170 170 85 85 85 170 170 170 170 85 0 -170 170 170 85 255 85 170 85 0 170 170 170 170 170 170 170 170 170 -255 255 255 170 170 170 255 255 255 255 255 255 170 170 170 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -170 85 0 170 170 170 255 255 85 170 170 170 255 255 255 170 170 170 -170 170 170 170 170 170 170 170 170 170 85 0 170 170 170 170 85 0 -170 170 170 85 255 85 170 85 0 170 170 170 170 85 0 85 85 85 -85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -85 255 85 170 170 170 170 85 0 170 170 170 170 85 0 85 255 85 -170 170 170 170 85 0 170 170 170 170 170 170 170 170 170 255 255 85 -170 170 170 255 255 255 170 170 170 170 170 170 170 170 170 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 85 0 85 85 85 170 170 170 255 255 85 170 170 170 -170 170 170 255 255 85 170 170 170 170 170 170 170 170 170 170 85 0 -170 170 170 85 85 85 170 170 170 170 85 0 170 170 170 85 85 85 -170 85 0 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 0 0 0 85 85 85 170 85 0 -85 85 85 255 85 85 85 255 85 170 85 0 170 170 170 170 170 170 -170 85 0 170 170 170 85 85 85 255 255 85 170 170 170 170 170 170 -255 255 255 170 170 170 255 255 255 255 255 85 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 170 170 170 170 85 0 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 255 255 85 85 85 85 170 170 170 -85 255 85 255 85 85 170 170 170 85 255 85 255 85 85 85 255 85 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 85 85 85 0 0 0 85 85 85 -85 85 85 85 255 85 255 85 85 170 170 170 85 255 85 170 85 0 -170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 255 255 255 -170 170 170 255 255 255 170 170 170 170 170 170 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 170 170 170 85 85 85 255 255 85 -170 170 170 255 255 85 170 170 170 170 170 170 170 170 170 255 255 85 -85 85 85 255 255 85 170 170 170 170 85 0 170 170 170 85 85 85 -170 85 0 85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -170 170 170 170 85 0 170 170 170 170 85 0 170 170 170 170 170 170 -170 85 0 170 170 170 170 170 170 170 170 170 255 255 85 170 170 170 -255 255 85 255 255 255 170 170 170 170 170 170 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 170 85 0 85 85 85 170 170 170 -170 85 0 170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 255 255 85 170 170 170 170 85 0 -85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -170 85 0 85 255 85 170 170 170 170 170 170 255 255 85 170 170 170 -255 255 85 170 170 170 170 170 170 170 170 170 255 255 255 255 255 255 -255 255 255 170 170 170 255 255 85 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 170 85 0 -170 170 170 170 170 170 170 170 170 170 170 170 170 170 170 255 255 85 -170 170 170 255 255 85 170 170 170 170 170 170 170 170 170 170 170 170 -170 170 170 85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 170 85 0 170 170 170 170 85 0 170 170 170 170 170 170 -170 170 170 255 255 85 170 170 170 255 255 85 170 170 170 255 255 255 -170 170 170 255 255 255 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 85 85 85 -170 85 0 170 170 170 170 85 0 255 255 85 170 170 170 170 170 170 -170 170 170 170 170 170 255 255 85 170 170 170 255 255 85 170 170 170 -255 255 85 85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -85 85 85 170 170 170 255 255 85 170 170 170 255 255 85 170 170 170 -170 170 170 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -170 170 170 170 170 170 170 170 170 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 170 0 85 85 85 -170 85 0 85 255 85 170 170 170 170 170 170 170 170 170 255 255 85 -255 255 255 170 170 170 255 255 255 170 170 170 255 255 255 170 170 170 -170 170 170 255 255 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -170 85 0 170 170 170 170 170 170 170 170 170 170 170 170 255 255 85 -170 170 170 255 255 255 170 170 170 255 255 255 170 170 170 255 255 255 -255 255 255 255 255 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 170 85 0 170 170 170 170 170 170 255 255 85 170 170 170 -170 170 170 255 255 255 255 255 255 255 255 255 170 170 170 255 255 255 -170 170 170 170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 255 85 -170 170 170 255 255 85 170 170 170 255 255 85 255 255 255 255 255 255 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 170 170 170 -170 170 170 170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 85 85 85 170 85 0 170 170 170 170 170 170 -255 255 85 170 170 170 255 255 255 255 255 85 255 255 255 255 255 255 -170 170 170 255 255 85 170 170 170 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 170 85 0 -170 170 170 170 170 170 170 170 170 255 255 255 170 170 170 255 255 255 -170 170 170 255 255 255 170 170 170 255 255 255 255 255 85 255 255 255 -170 170 170 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 170 85 0 85 85 85 170 170 170 170 170 170 170 170 170 -170 170 170 255 255 255 170 170 170 255 255 255 255 255 255 170 170 170 -255 255 85 170 170 170 170 170 170 170 85 0 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 170 170 170 -255 255 85 170 170 170 255 255 85 170 170 170 255 255 255 255 255 255 -255 255 255 255 255 255 255 255 255 255 255 255 170 170 170 170 170 170 -170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 85 85 85 85 85 85 170 85 0 170 170 170 -255 255 85 170 170 170 255 255 85 255 255 255 170 170 170 255 255 255 -170 170 170 170 170 170 170 170 170 170 170 170 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 170 170 170 -170 85 0 170 170 170 255 255 255 170 170 170 255 255 255 170 170 170 -255 255 255 255 255 255 170 170 170 255 255 255 255 255 85 170 170 170 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 85 85 85 170 85 0 85 85 85 170 170 170 -170 170 170 170 170 170 170 170 170 170 170 170 255 255 85 170 170 170 -255 255 85 170 170 170 170 85 0 85 255 85 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 170 85 0 -170 170 170 170 170 170 255 255 85 170 170 170 255 255 255 255 255 255 -255 255 85 255 255 255 170 170 170 255 255 255 170 170 170 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -170 85 0 170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 -170 170 170 170 170 170 170 170 170 170 85 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -255 255 85 170 170 170 170 170 170 170 170 170 255 255 85 170 170 170 -255 255 255 170 170 170 255 255 85 170 170 170 85 85 85 85 85 85 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -85 85 85 170 85 0 170 170 170 170 170 170 170 170 170 170 170 170 -170 85 0 170 170 170 170 85 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 85 85 85 -170 170 170 170 170 170 255 255 85 170 170 170 170 170 170 170 170 170 -170 170 170 255 255 255 170 170 170 170 170 170 85 85 85 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -85 85 85 85 85 85 85 85 85 170 85 0 85 85 85 170 85 0 -85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 170 85 0 -85 85 85 170 85 0 170 170 170 170 170 170 170 170 170 255 255 85 -170 170 170 170 170 170 170 85 0 85 85 85 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 85 85 85 -85 85 85 85 255 85 170 85 0 170 170 170 170 85 0 170 170 170 -85 85 85 85 85 85 85 85 85 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 -85 85 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 85 85 85 85 85 85 85 85 85 + 85 85 85 85 85 85 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 85 85 85 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 85 85 85 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 170 170 170 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 +170 170 170 170 170 170 85 85 85 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 85 85 85 170 170 170 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 170 170 170 170 170 170 +170 170 170 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 85 85 85 170 170 170 170 170 170 170 170 170 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 170 170 170 255 255 255 255 255 255 +255 255 255 170 170 170 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 85 85 85 +170 170 170 170 170 170 255 255 255 255 255 255 + 0 0 0 0 0 0 0 0 0 0 0 0 +170 170 170 255 255 255 170 170 170 170 170 170 +255 255 255 170 170 170 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 85 85 85 +170 170 170 0 0 0 0 0 0 255 255 255 + 85 85 85 0 0 0 0 0 0 0 0 0 +255 255 255 170 170 170 0 0 0 85 85 85 +170 170 170 255 255 255 170 170 170 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 85 85 85 + 85 85 85 0 0 0 0 0 0 170 170 170 + 85 85 85 0 0 0 0 0 0 0 0 0 +255 255 255 85 85 85 0 0 0 0 0 0 + 85 85 85 255 255 255 170 170 170 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 85 85 85 +170 170 170 0 0 0 0 0 0 170 170 170 + 85 85 85 85 85 85 85 85 85 85 85 85 +255 255 255 85 85 85 0 0 0 0 0 0 + 85 85 85 255 255 255 170 170 170 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 +255 255 255 0 0 0 0 0 0 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 0 0 0 0 0 0 + 85 85 85 255 255 255 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 +170 170 170 170 170 170 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 170 170 170 170 170 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 85 85 85 0 0 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 170 85 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 85 85 85 0 0 0 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 170 85 0 +170 85 0 170 85 0 85 85 85 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 85 85 85 0 0 0 + 85 85 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 85 0 170 85 0 85 85 85 0 0 0 + 0 0 0 85 85 85 170 170 170 85 85 85 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 85 85 85 0 0 0 + 85 85 85 170 85 0 170 85 0 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 170 170 170 170 170 170 170 170 0 0 0 + 0 0 0 0 0 0 170 170 170 170 170 170 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 85 85 85 170 170 170 170 85 0 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 85 0 170 85 0 170 170 170 170 170 170 +170 170 170 170 170 170 170 170 170 85 85 85 + 0 0 0 0 0 0 85 85 85 85 85 85 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 85 85 85 170 170 170 170 170 170 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 170 170 170 170 170 170 170 170 170 170 170 +255 255 255 255 255 255 255 255 255 170 170 170 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 85 85 85 +255 255 255 255 255 255 170 170 170 170 170 170 +170 170 170 170 170 170 170 170 170 170 170 170 +170 170 170 170 170 170 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 170 170 170 +255 255 255 255 255 255 170 170 170 170 170 170 +170 170 170 170 170 170 170 170 170 170 170 170 +170 170 170 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +170 170 170 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 85 85 85 255 255 255 +255 255 255 255 255 255 255 255 255 170 170 170 +170 170 170 170 170 170 170 170 170 170 170 170 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 85 85 85 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 85 85 85 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 170 170 170 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 85 85 85 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 85 85 85 170 170 170 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 170 170 170 170 170 170 170 170 170 +255 255 255 255 255 255 255 255 255 170 170 170 +170 170 170 170 170 170 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +170 170 170 170 170 170 170 170 170 170 170 170 +170 170 170 170 170 170 170 170 170 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 +170 170 170 170 170 170 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +170 170 170 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 170 170 170 +170 170 170 170 170 170 170 170 170 85 85 85 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 +170 170 170 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 170 170 170 170 170 170 170 170 170 + 0 0 0 0 0 0 0 0 0 85 85 85 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 85 85 85 0 0 0 0 0 0 85 85 85 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 170 170 170 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 170 170 170 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +170 170 170 85 85 85 0 0 0 0 0 0 + 0 0 0 85 85 85 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 85 85 85 + 0 0 0 0 0 0 85 85 85 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 170 170 170 0 0 0 85 85 85 + 85 85 85 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 85 85 85 + 0 0 0 85 85 85 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 170 170 170 0 0 0 85 85 85 + 85 85 85 0 0 0 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 85 85 85 + 0 0 0 170 170 170 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 85 85 85 0 0 0 + 0 0 0 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 85 85 85 0 0 0 + 85 85 85 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 85 85 85 0 0 0 0 0 0 +170 170 170 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 85 85 85 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 85 85 85 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 85 85 85 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 0 0 0 + 85 85 85 85 85 85 85 85 85 85 85 85 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 0 0 0 170 85 0 +255 255 85 170 85 0 0 0 0 0 0 0 + 85 85 85 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 85 85 85 85 85 85 0 0 0 + 0 0 0 85 85 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 0 0 0 + 0 0 0 85 85 85 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 85 170 85 0 255 255 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 85 85 85 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 + 0 0 0 0 0 0 85 85 85 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 85 +170 85 0 255 255 85 170 85 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 +170 85 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 0 0 0 0 0 0 85 85 85 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 170 85 0 +255 255 85 170 85 0 255 255 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 170 85 0 +255 255 85 170 85 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 0 0 0 0 0 0 0 0 0 + 85 85 85 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 85 +170 85 0 255 255 85 170 85 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 255 255 85 +170 85 0 255 255 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 0 0 0 0 0 0 + 0 0 0 85 85 85 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 255 255 85 170 85 0 +255 255 85 170 85 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 0 0 0 + 0 0 0 0 0 0 85 85 85 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 170 170 170 170 170 170 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 170 170 170 170 170 170 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 170 170 170 170 170 170 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 0 0 0 0 0 0 0 0 0 + 0 0 0 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 170 170 170 170 170 170 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 0 0 0 0 0 0 0 0 0 + 85 85 85 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 170 170 170 85 85 85 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 85 85 85 85 85 85 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +170 170 170 85 85 85 85 85 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 170 170 170 + 85 85 85 0 0 0 0 0 0 170 85 0 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 85 85 85 + 0 0 0 0 0 0 0 0 0 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +170 170 170 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +170 170 170 85 85 85 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 170 85 0 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 170 85 0 +170 85 0 170 170 170 255 255 255 255 255 255 +255 255 255 255 255 255 255 255 255 255 255 255 +255 255 255 255 255 255 170 170 170 85 85 85 + 85 85 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +170 85 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 170 85 0 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 170 85 0 170 85 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 170 85 0 +170 85 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +170 85 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +170 85 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 85 85 85 170 85 0 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 170 85 0 170 85 0 170 85 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 170 85 0 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 170 85 0 +170 85 0 0 0 0 0 0 0 0 0 0 + 85 85 85 85 85 85 85 85 85 85 85 85 + 85 85 85 85 85 85 85 85 85 85 85 85 + 85 85 85 85 85 85 85 85 85 0 0 0 + 0 0 0 0 0 0 0 0 0 170 85 0 +170 85 0 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 255 255 85 170 85 0 +170 85 0 170 85 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 170 85 0 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 85 0 170 85 0 255 255 85 170 85 0 +255 255 85 170 85 0 170 85 0 170 85 0 + 85 85 85 85 85 85 85 85 85 85 85 85 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 85 85 85 + 85 85 85 85 85 85 85 85 85 170 85 0 +170 85 0 170 85 0 170 85 0 255 255 85 +170 85 0 255 255 85 170 85 0 170 85 0 +170 85 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 85 0 170 85 0 170 85 0 170 85 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 170 85 0 170 85 0 170 85 0 +170 85 0 170 85 0 170 85 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 +170 85 0 170 85 0 170 85 0 170 85 0 +170 85 0 170 85 0 170 85 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 + 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/trunk/fs/aio.c b/trunk/fs/aio.c index 76da12537956..8fa77e233944 100644 --- a/trunk/fs/aio.c +++ b/trunk/fs/aio.c @@ -443,7 +443,7 @@ static struct kiocb *__aio_get_req(struct kioctx *ctx) req->private = NULL; req->ki_iovec = NULL; INIT_LIST_HEAD(&req->ki_run_list); - req->ki_eventfd = NULL; + req->ki_eventfd = ERR_PTR(-EINVAL); /* Check if the completion queue has enough free space to * accept an event from this io. @@ -485,6 +485,8 @@ static inline void really_put_req(struct kioctx *ctx, struct kiocb *req) { assert_spin_locked(&ctx->ctx_lock); + if (!IS_ERR(req->ki_eventfd)) + fput(req->ki_eventfd); if (req->ki_dtor) req->ki_dtor(req); if (req->ki_iovec != &req->ki_inline_vec) @@ -506,11 +508,8 @@ static void aio_fput_routine(struct work_struct *data) list_del(&req->ki_list); spin_unlock_irq(&fput_lock); - /* Complete the fput(s) */ - if (req->ki_filp != NULL) - __fput(req->ki_filp); - if (req->ki_eventfd != NULL) - __fput(req->ki_eventfd); + /* Complete the fput */ + __fput(req->ki_filp); /* Link the iocb into the context's free list */ spin_lock_irq(&ctx->ctx_lock); @@ -528,14 +527,12 @@ static void aio_fput_routine(struct work_struct *data) */ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) { - int schedule_putreq = 0; - dprintk(KERN_DEBUG "aio_put(%p): f_count=%ld\n", req, atomic_long_read(&req->ki_filp->f_count)); assert_spin_locked(&ctx->ctx_lock); - req->ki_users--; + req->ki_users --; BUG_ON(req->ki_users < 0); if (likely(req->ki_users)) return 0; @@ -543,23 +540,10 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) req->ki_cancel = NULL; req->ki_retry = NULL; - /* - * Try to optimize the aio and eventfd file* puts, by avoiding to - * schedule work in case it is not __fput() time. In normal cases, - * we would not be holding the last reference to the file*, so - * this function will be executed w/out any aio kthread wakeup. + /* Must be done under the lock to serialise against cancellation. + * Call this aio_fput as it duplicates fput via the fput_work. */ - if (unlikely(atomic_long_dec_and_test(&req->ki_filp->f_count))) - schedule_putreq++; - else - req->ki_filp = NULL; - if (req->ki_eventfd != NULL) { - if (unlikely(atomic_long_dec_and_test(&req->ki_eventfd->f_count))) - schedule_putreq++; - else - req->ki_eventfd = NULL; - } - if (unlikely(schedule_putreq)) { + if (unlikely(atomic_long_dec_and_test(&req->ki_filp->f_count))) { get_ioctx(ctx); spin_lock(&fput_lock); list_add(&req->ki_list, &fput_head); @@ -587,7 +571,7 @@ int aio_put_req(struct kiocb *req) static struct kioctx *lookup_ioctx(unsigned long ctx_id) { struct mm_struct *mm = current->mm; - struct kioctx *ctx, *ret = NULL; + struct kioctx *ctx = NULL; struct hlist_node *n; rcu_read_lock(); @@ -595,13 +579,12 @@ static struct kioctx *lookup_ioctx(unsigned long ctx_id) hlist_for_each_entry_rcu(ctx, n, &mm->ioctx_list, list) { if (ctx->user_id == ctx_id && !ctx->dead) { get_ioctx(ctx); - ret = ctx; break; } } rcu_read_unlock(); - return ret; + return ctx; } /* @@ -1026,7 +1009,7 @@ int aio_complete(struct kiocb *iocb, long res, long res2) * eventfd. The eventfd_signal() function is safe to be called * from IRQ context. */ - if (iocb->ki_eventfd != NULL) + if (!IS_ERR(iocb->ki_eventfd)) eventfd_signal(iocb->ki_eventfd, 1); put_rq: @@ -1625,7 +1608,6 @@ static int io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb, req->ki_eventfd = eventfd_fget((int) iocb->aio_resfd); if (IS_ERR(req->ki_eventfd)) { ret = PTR_ERR(req->ki_eventfd); - req->ki_eventfd = NULL; goto out_put_req; } } diff --git a/trunk/fs/bio-integrity.c b/trunk/fs/bio-integrity.c index fe2b1aa2464e..549b0144da11 100644 --- a/trunk/fs/bio-integrity.c +++ b/trunk/fs/bio-integrity.c @@ -685,20 +685,19 @@ EXPORT_SYMBOL(bio_integrity_split); * bio_integrity_clone - Callback for cloning bios with integrity metadata * @bio: New bio * @bio_src: Original bio - * @gfp_mask: Memory allocation mask * @bs: bio_set to allocate bip from * * Description: Called to allocate a bip when cloning a bio */ int bio_integrity_clone(struct bio *bio, struct bio *bio_src, - gfp_t gfp_mask, struct bio_set *bs) + struct bio_set *bs) { struct bio_integrity_payload *bip_src = bio_src->bi_integrity; struct bio_integrity_payload *bip; BUG_ON(bip_src == NULL); - bip = bio_integrity_alloc_bioset(bio, gfp_mask, bip_src->bip_vcnt, bs); + bip = bio_integrity_alloc_bioset(bio, GFP_NOIO, bip_src->bip_vcnt, bs); if (bip == NULL) return -EIO; diff --git a/trunk/fs/bio.c b/trunk/fs/bio.c index d4f06327c810..124b95c4d582 100644 --- a/trunk/fs/bio.c +++ b/trunk/fs/bio.c @@ -463,12 +463,10 @@ struct bio *bio_clone(struct bio *bio, gfp_t gfp_mask) if (bio_integrity(bio)) { int ret; - ret = bio_integrity_clone(b, bio, gfp_mask, fs_bio_set); + ret = bio_integrity_clone(b, bio, fs_bio_set); - if (ret < 0) { - bio_put(b); + if (ret < 0) return NULL; - } } return b; diff --git a/trunk/fs/btrfs/ctree.h b/trunk/fs/btrfs/ctree.h index 5e1d4e30e9d8..82491ba8fa40 100644 --- a/trunk/fs/btrfs/ctree.h +++ b/trunk/fs/btrfs/ctree.h @@ -784,14 +784,7 @@ struct btrfs_fs_info { struct list_head dirty_cowonly_roots; struct btrfs_fs_devices *fs_devices; - - /* - * the space_info list is almost entirely read only. It only changes - * when we add a new raid type to the FS, and that happens - * very rarely. RCU is used to protect it. - */ struct list_head space_info; - spinlock_t delalloc_lock; spinlock_t new_trans_lock; u64 delalloc_bytes; @@ -1804,8 +1797,6 @@ int btrfs_cleanup_reloc_trees(struct btrfs_root *root); int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len); u64 btrfs_reduce_alloc_profile(struct btrfs_root *root, u64 flags); void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde); -void btrfs_clear_space_info_full(struct btrfs_fs_info *info); - int btrfs_check_metadata_free_space(struct btrfs_root *root); int btrfs_check_data_free_space(struct btrfs_root *root, struct inode *inode, u64 bytes); diff --git a/trunk/fs/btrfs/extent-tree.c b/trunk/fs/btrfs/extent-tree.c index fefe83ad2059..9abf81f71c46 100644 --- a/trunk/fs/btrfs/extent-tree.c +++ b/trunk/fs/btrfs/extent-tree.c @@ -20,7 +20,6 @@ #include #include #include -#include #include "compat.h" #include "hash.h" #include "crc32c.h" @@ -331,33 +330,13 @@ static struct btrfs_space_info *__find_space_info(struct btrfs_fs_info *info, { struct list_head *head = &info->space_info; struct btrfs_space_info *found; - - rcu_read_lock(); - list_for_each_entry_rcu(found, head, list) { - if (found->flags == flags) { - rcu_read_unlock(); + list_for_each_entry(found, head, list) { + if (found->flags == flags) return found; - } } - rcu_read_unlock(); return NULL; } -/* - * after adding space to the filesystem, we need to clear the full flags - * on all the space infos. - */ -void btrfs_clear_space_info_full(struct btrfs_fs_info *info) -{ - struct list_head *head = &info->space_info; - struct btrfs_space_info *found; - - rcu_read_lock(); - list_for_each_entry_rcu(found, head, list) - found->full = 0; - rcu_read_unlock(); -} - static u64 div_factor(u64 num, int factor) { if (factor == 10) @@ -1924,6 +1903,7 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags, if (!found) return -ENOMEM; + list_add(&found->list, &info->space_info); INIT_LIST_HEAD(&found->block_groups); init_rwsem(&found->groups_sem); spin_lock_init(&found->lock); @@ -1937,7 +1917,6 @@ static int update_space_info(struct btrfs_fs_info *info, u64 flags, found->full = 0; found->force_alloc = 0; *space_info = found; - list_add_rcu(&found->list, &info->space_info); return 0; } @@ -6341,7 +6320,6 @@ static int find_first_block_group(struct btrfs_root *root, int btrfs_free_block_groups(struct btrfs_fs_info *info) { struct btrfs_block_group_cache *block_group; - struct btrfs_space_info *space_info; struct rb_node *n; spin_lock(&info->block_group_cache_lock); @@ -6363,23 +6341,6 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info) spin_lock(&info->block_group_cache_lock); } spin_unlock(&info->block_group_cache_lock); - - /* now that all the block groups are freed, go through and - * free all the space_info structs. This is only called during - * the final stages of unmount, and so we know nobody is - * using them. We call synchronize_rcu() once before we start, - * just to be on the safe side. - */ - synchronize_rcu(); - - while(!list_empty(&info->space_info)) { - space_info = list_entry(info->space_info.next, - struct btrfs_space_info, - list); - - list_del(&space_info->list); - kfree(space_info); - } return 0; } diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index dd06e18e5aac..1316139bf9e8 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -1374,12 +1374,6 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) ret = btrfs_add_device(trans, root, device); } - /* - * we've got more storage, clear any full flags on the space - * infos - */ - btrfs_clear_space_info_full(root->fs_info); - unlock_chunks(root); btrfs_commit_transaction(trans, root); @@ -1465,8 +1459,6 @@ static int __btrfs_grow_device(struct btrfs_trans_handle *trans, device->fs_devices->total_rw_bytes += diff; device->total_bytes = new_size; - btrfs_clear_space_info_full(device->dev_root->fs_info); - return btrfs_update_device(trans, device); } diff --git a/trunk/fs/buffer.c b/trunk/fs/buffer.c index 891e1c78e4f1..9f697419ed8e 100644 --- a/trunk/fs/buffer.c +++ b/trunk/fs/buffer.c @@ -760,9 +760,15 @@ EXPORT_SYMBOL(mark_buffer_dirty_inode); * If warn is true, then emit a warning if the page is not uptodate and has * not been truncated. */ -static void __set_page_dirty(struct page *page, +static int __set_page_dirty(struct page *page, struct address_space *mapping, int warn) { + if (unlikely(!mapping)) + return !TestSetPageDirty(page); + + if (TestSetPageDirty(page)) + return 0; + spin_lock_irq(&mapping->tree_lock); if (page->mapping) { /* Race with truncate? */ WARN_ON_ONCE(warn && !PageUptodate(page)); @@ -779,6 +785,8 @@ static void __set_page_dirty(struct page *page, } spin_unlock_irq(&mapping->tree_lock); __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); + + return 1; } /* @@ -808,7 +816,6 @@ static void __set_page_dirty(struct page *page, */ int __set_page_dirty_buffers(struct page *page) { - int newly_dirty; struct address_space *mapping = page_mapping(page); if (unlikely(!mapping)) @@ -824,12 +831,9 @@ int __set_page_dirty_buffers(struct page *page) bh = bh->b_this_page; } while (bh != head); } - newly_dirty = !TestSetPageDirty(page); spin_unlock(&mapping->private_lock); - if (newly_dirty) - __set_page_dirty(page, mapping, 1); - return newly_dirty; + return __set_page_dirty(page, mapping, 1); } EXPORT_SYMBOL(__set_page_dirty_buffers); @@ -1258,11 +1262,8 @@ void mark_buffer_dirty(struct buffer_head *bh) return; } - if (!test_set_buffer_dirty(bh)) { - struct page *page = bh->b_page; - if (!TestSetPageDirty(page)) - __set_page_dirty(page, page_mapping(page), 0); - } + if (!test_set_buffer_dirty(bh)) + __set_page_dirty(bh->b_page, page_mapping(bh->b_page), 0); } /* diff --git a/trunk/fs/ecryptfs/crypto.c b/trunk/fs/ecryptfs/crypto.c index 8b65f289ee00..bdca1f4b3a3e 100644 --- a/trunk/fs/ecryptfs/crypto.c +++ b/trunk/fs/ecryptfs/crypto.c @@ -1324,13 +1324,14 @@ static int ecryptfs_write_headers_virt(char *page_virt, size_t max, } static int -ecryptfs_write_metadata_to_contents(struct dentry *ecryptfs_dentry, - char *virt, size_t virt_len) +ecryptfs_write_metadata_to_contents(struct ecryptfs_crypt_stat *crypt_stat, + struct dentry *ecryptfs_dentry, + char *virt) { int rc; rc = ecryptfs_write_lower(ecryptfs_dentry->d_inode, virt, - 0, virt_len); + 0, crypt_stat->num_header_bytes_at_front); if (rc) printk(KERN_ERR "%s: Error attempting to write header " "information to lower file; rc = [%d]\n", __func__, @@ -1340,6 +1341,7 @@ ecryptfs_write_metadata_to_contents(struct dentry *ecryptfs_dentry, static int ecryptfs_write_metadata_to_xattr(struct dentry *ecryptfs_dentry, + struct ecryptfs_crypt_stat *crypt_stat, char *page_virt, size_t size) { int rc; @@ -1349,17 +1351,6 @@ ecryptfs_write_metadata_to_xattr(struct dentry *ecryptfs_dentry, return rc; } -static unsigned long ecryptfs_get_zeroed_pages(gfp_t gfp_mask, - unsigned int order) -{ - struct page *page; - - page = alloc_pages(gfp_mask | __GFP_ZERO, order); - if (page) - return (unsigned long) page_address(page); - return 0; -} - /** * ecryptfs_write_metadata * @ecryptfs_dentry: The eCryptfs dentry @@ -1376,9 +1367,7 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry) { struct ecryptfs_crypt_stat *crypt_stat = &ecryptfs_inode_to_private(ecryptfs_dentry->d_inode)->crypt_stat; - unsigned int order; char *virt; - size_t virt_len; size_t size = 0; int rc = 0; @@ -1394,35 +1383,33 @@ int ecryptfs_write_metadata(struct dentry *ecryptfs_dentry) rc = -EINVAL; goto out; } - virt_len = crypt_stat->num_header_bytes_at_front; - order = get_order(virt_len); /* Released in this function */ - virt = (char *)ecryptfs_get_zeroed_pages(GFP_KERNEL, order); + virt = (char *)get_zeroed_page(GFP_KERNEL); if (!virt) { printk(KERN_ERR "%s: Out of memory\n", __func__); rc = -ENOMEM; goto out; } - rc = ecryptfs_write_headers_virt(virt, virt_len, &size, crypt_stat, - ecryptfs_dentry); + rc = ecryptfs_write_headers_virt(virt, PAGE_CACHE_SIZE, &size, + crypt_stat, ecryptfs_dentry); if (unlikely(rc)) { printk(KERN_ERR "%s: Error whilst writing headers; rc = [%d]\n", __func__, rc); goto out_free; } if (crypt_stat->flags & ECRYPTFS_METADATA_IN_XATTR) - rc = ecryptfs_write_metadata_to_xattr(ecryptfs_dentry, virt, - size); + rc = ecryptfs_write_metadata_to_xattr(ecryptfs_dentry, + crypt_stat, virt, size); else - rc = ecryptfs_write_metadata_to_contents(ecryptfs_dentry, virt, - virt_len); + rc = ecryptfs_write_metadata_to_contents(crypt_stat, + ecryptfs_dentry, virt); if (rc) { printk(KERN_ERR "%s: Error writing metadata out to lower file; " "rc = [%d]\n", __func__, rc); goto out_free; } out_free: - free_pages((unsigned long)virt, order); + free_page((unsigned long)virt); out: return rc; } @@ -2221,19 +2208,17 @@ int ecryptfs_decode_and_decrypt_filename(char **plaintext_name, struct dentry *ecryptfs_dir_dentry, const char *name, size_t name_size) { - struct ecryptfs_mount_crypt_stat *mount_crypt_stat = - &ecryptfs_superblock_to_private( - ecryptfs_dir_dentry->d_sb)->mount_crypt_stat; char *decoded_name; size_t decoded_name_size; size_t packet_size; int rc = 0; - if ((mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES) - && !(mount_crypt_stat->flags & ECRYPTFS_ENCRYPTED_VIEW_ENABLED) - && (name_size > ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE) + if ((name_size > ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE) && (strncmp(name, ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX, ECRYPTFS_FNEK_ENCRYPTED_FILENAME_PREFIX_SIZE) == 0)) { + struct ecryptfs_mount_crypt_stat *mount_crypt_stat = + &ecryptfs_superblock_to_private( + ecryptfs_dir_dentry->d_sb)->mount_crypt_stat; const char *orig_name = name; size_t orig_name_size = name_size; diff --git a/trunk/fs/ecryptfs/ecryptfs_kernel.h b/trunk/fs/ecryptfs/ecryptfs_kernel.h index ac749d4d644f..eb2267eca1fe 100644 --- a/trunk/fs/ecryptfs/ecryptfs_kernel.h +++ b/trunk/fs/ecryptfs/ecryptfs_kernel.h @@ -620,6 +620,7 @@ int ecryptfs_interpose(struct dentry *hidden_dentry, u32 flags); int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry, struct dentry *lower_dentry, + struct ecryptfs_crypt_stat *crypt_stat, struct inode *ecryptfs_dir_inode, struct nameidata *ecryptfs_nd); int ecryptfs_decode_and_decrypt_filename(char **decrypted_name, diff --git a/trunk/fs/ecryptfs/inode.c b/trunk/fs/ecryptfs/inode.c index 55b3145b8072..5697899a168d 100644 --- a/trunk/fs/ecryptfs/inode.c +++ b/trunk/fs/ecryptfs/inode.c @@ -246,6 +246,7 @@ ecryptfs_create(struct inode *directory_inode, struct dentry *ecryptfs_dentry, */ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry, struct dentry *lower_dentry, + struct ecryptfs_crypt_stat *crypt_stat, struct inode *ecryptfs_dir_inode, struct nameidata *ecryptfs_nd) { @@ -253,7 +254,6 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry, struct vfsmount *lower_mnt; struct inode *lower_inode; struct ecryptfs_mount_crypt_stat *mount_crypt_stat; - struct ecryptfs_crypt_stat *crypt_stat; char *page_virt = NULL; u64 file_size; int rc = 0; @@ -314,11 +314,6 @@ int ecryptfs_lookup_and_interpose_lower(struct dentry *ecryptfs_dentry, goto out_free_kmem; } } - crypt_stat = &ecryptfs_inode_to_private( - ecryptfs_dentry->d_inode)->crypt_stat; - /* TODO: lock for crypt_stat comparison */ - if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)) - ecryptfs_set_default_sizes(crypt_stat); rc = ecryptfs_read_and_validate_header_region(page_virt, ecryptfs_dentry->d_inode); if (rc) { @@ -367,7 +362,9 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, { char *encrypted_and_encoded_name = NULL; size_t encrypted_and_encoded_name_size; + struct ecryptfs_crypt_stat *crypt_stat = NULL; struct ecryptfs_mount_crypt_stat *mount_crypt_stat = NULL; + struct ecryptfs_inode_info *inode_info; struct dentry *lower_dir_dentry, *lower_dentry; int rc = 0; @@ -391,15 +388,26 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, } if (lower_dentry->d_inode) goto lookup_and_interpose; - mount_crypt_stat = &ecryptfs_superblock_to_private( - ecryptfs_dentry->d_sb)->mount_crypt_stat; - if (!(mount_crypt_stat - && (mount_crypt_stat->flags & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES))) + inode_info = ecryptfs_inode_to_private(ecryptfs_dentry->d_inode); + if (inode_info) { + crypt_stat = &inode_info->crypt_stat; + /* TODO: lock for crypt_stat comparison */ + if (!(crypt_stat->flags & ECRYPTFS_POLICY_APPLIED)) + ecryptfs_set_default_sizes(crypt_stat); + } + if (crypt_stat) + mount_crypt_stat = crypt_stat->mount_crypt_stat; + else + mount_crypt_stat = &ecryptfs_superblock_to_private( + ecryptfs_dentry->d_sb)->mount_crypt_stat; + if (!(crypt_stat && (crypt_stat->flags & ECRYPTFS_ENCRYPT_FILENAMES)) + && !(mount_crypt_stat && (mount_crypt_stat->flags + & ECRYPTFS_GLOBAL_ENCRYPT_FILENAMES))) goto lookup_and_interpose; dput(lower_dentry); rc = ecryptfs_encrypt_and_encode_filename( &encrypted_and_encoded_name, &encrypted_and_encoded_name_size, - NULL, mount_crypt_stat, ecryptfs_dentry->d_name.name, + crypt_stat, mount_crypt_stat, ecryptfs_dentry->d_name.name, ecryptfs_dentry->d_name.len); if (rc) { printk(KERN_ERR "%s: Error attempting to encrypt and encode " @@ -418,7 +426,7 @@ static struct dentry *ecryptfs_lookup(struct inode *ecryptfs_dir_inode, } lookup_and_interpose: rc = ecryptfs_lookup_and_interpose_lower(ecryptfs_dentry, lower_dentry, - ecryptfs_dir_inode, + crypt_stat, ecryptfs_dir_inode, ecryptfs_nd); goto out; out_d_drop: diff --git a/trunk/fs/ext4/extents.c b/trunk/fs/ext4/extents.c index e0aa4fe4f596..e2eab196875f 100644 --- a/trunk/fs/ext4/extents.c +++ b/trunk/fs/ext4/extents.c @@ -1122,8 +1122,7 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path, struct ext4_extent_idx *ix; struct ext4_extent *ex; ext4_fsblk_t block; - int depth; /* Note, NOT eh_depth; depth from top of tree */ - int ee_len; + int depth, ee_len; BUG_ON(path == NULL); depth = path->p_depth; @@ -1180,8 +1179,7 @@ ext4_ext_search_right(struct inode *inode, struct ext4_ext_path *path, if (bh == NULL) return -EIO; eh = ext_block_hdr(bh); - /* subtract from p_depth to get proper eh_depth */ - if (ext4_ext_check_header(inode, eh, path->p_depth - depth)) { + if (ext4_ext_check_header(inode, eh, depth)) { put_bh(bh); return -EIO; } diff --git a/trunk/fs/ext4/ialloc.c b/trunk/fs/ext4/ialloc.c index 2d2b3585ee91..627f8c3337a3 100644 --- a/trunk/fs/ext4/ialloc.c +++ b/trunk/fs/ext4/ialloc.c @@ -698,7 +698,6 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode) struct inode *ret; ext4_group_t i; int free = 0; - static int once = 1; ext4_group_t flex_group; /* Cannot create files in a deleted directory */ @@ -720,8 +719,7 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode *dir, int mode) ret2 = find_group_flex(sb, dir, &group); if (ret2 == -1) { ret2 = find_group_other(sb, dir, &group); - if (ret2 == 0 && once) - once = 0; + if (ret2 == 0 && printk_ratelimit()) printk(KERN_NOTICE "ext4: find_group_flex " "failed, fallback succeeded dir %lu\n", dir->i_ino); diff --git a/trunk/fs/ext4/mballoc.c b/trunk/fs/ext4/mballoc.c index 9f61e62f435f..4415beeb0b62 100644 --- a/trunk/fs/ext4/mballoc.c +++ b/trunk/fs/ext4/mballoc.c @@ -1447,7 +1447,7 @@ static void ext4_mb_measure_extent(struct ext4_allocation_context *ac, struct ext4_free_extent *gex = &ac->ac_g_ex; BUG_ON(ex->fe_len <= 0); - BUG_ON(ex->fe_len > EXT4_BLOCKS_PER_GROUP(ac->ac_sb)); + BUG_ON(ex->fe_len >= EXT4_BLOCKS_PER_GROUP(ac->ac_sb)); BUG_ON(ex->fe_start >= EXT4_BLOCKS_PER_GROUP(ac->ac_sb)); BUG_ON(ac->ac_status != AC_STATUS_CONTINUE); @@ -3292,7 +3292,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac, } BUG_ON(start + size <= ac->ac_o_ex.fe_logical && start > ac->ac_o_ex.fe_logical); - BUG_ON(size <= 0 || size > EXT4_BLOCKS_PER_GROUP(ac->ac_sb)); + BUG_ON(size <= 0 || size >= EXT4_BLOCKS_PER_GROUP(ac->ac_sb)); /* now prepare goal request */ @@ -3589,7 +3589,6 @@ static void ext4_mb_put_pa(struct ext4_allocation_context *ac, struct super_block *sb, struct ext4_prealloc_space *pa) { ext4_group_t grp; - ext4_fsblk_t grp_blk; if (!atomic_dec_and_test(&pa->pa_count) || pa->pa_free != 0) return; @@ -3604,12 +3603,8 @@ static void ext4_mb_put_pa(struct ext4_allocation_context *ac, pa->pa_deleted = 1; spin_unlock(&pa->pa_lock); - grp_blk = pa->pa_pstart; - /* If linear, pa_pstart may be in the next group when pa is used up */ - if (pa->pa_linear) - grp_blk--; - - ext4_get_group_no_and_offset(sb, grp_blk, &grp, NULL); + /* -1 is to protect from crossing allocation group */ + ext4_get_group_no_and_offset(sb, pa->pa_pstart - 1, &grp, NULL); /* * possible race: diff --git a/trunk/fs/minix/inode.c b/trunk/fs/minix/inode.c index 618865b3128b..d1d1eb84679d 100644 --- a/trunk/fs/minix/inode.c +++ b/trunk/fs/minix/inode.c @@ -3,7 +3,7 @@ * * Copyright (C) 1991, 1992 Linus Torvalds * - * Copyright (C) 1996 Gertjan van Wingerde + * Copyright (C) 1996 Gertjan van Wingerde (gertjan@cs.vu.nl) * Minix V2 fs support. * * Modified for 680x0 by Andreas Schwab diff --git a/trunk/fs/nfsd/nfs4xdr.c b/trunk/fs/nfsd/nfs4xdr.c index 9250067943d8..f65953be39c0 100644 --- a/trunk/fs/nfsd/nfs4xdr.c +++ b/trunk/fs/nfsd/nfs4xdr.c @@ -2596,7 +2596,6 @@ static nfsd4_enc nfsd4_enc_ops[] = { [OP_LOOKUPP] = (nfsd4_enc)nfsd4_encode_noop, [OP_NVERIFY] = (nfsd4_enc)nfsd4_encode_noop, [OP_OPEN] = (nfsd4_enc)nfsd4_encode_open, - [OP_OPENATTR] = (nfsd4_enc)nfsd4_encode_noop, [OP_OPEN_CONFIRM] = (nfsd4_enc)nfsd4_encode_open_confirm, [OP_OPEN_DOWNGRADE] = (nfsd4_enc)nfsd4_encode_open_downgrade, [OP_PUTFH] = (nfsd4_enc)nfsd4_encode_noop, diff --git a/trunk/fs/proc/base.c b/trunk/fs/proc/base.c index beaa0ce3b82e..0c9de19a1633 100644 --- a/trunk/fs/proc/base.c +++ b/trunk/fs/proc/base.c @@ -3066,6 +3066,7 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi int retval = -ENOENT; ino_t ino; int tid; + unsigned long pos = filp->f_pos; /* avoiding "long long" filp->f_pos */ struct pid_namespace *ns; task = get_proc_task(inode); @@ -3082,18 +3083,18 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi goto out_no_task; retval = 0; - switch ((unsigned long)filp->f_pos) { + switch (pos) { case 0: ino = inode->i_ino; - if (filldir(dirent, ".", 1, filp->f_pos, ino, DT_DIR) < 0) + if (filldir(dirent, ".", 1, pos, ino, DT_DIR) < 0) goto out; - filp->f_pos++; + pos++; /* fall through */ case 1: ino = parent_ino(dentry); - if (filldir(dirent, "..", 2, filp->f_pos, ino, DT_DIR) < 0) + if (filldir(dirent, "..", 2, pos, ino, DT_DIR) < 0) goto out; - filp->f_pos++; + pos++; /* fall through */ } @@ -3103,9 +3104,9 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi ns = filp->f_dentry->d_sb->s_fs_info; tid = (int)filp->f_version; filp->f_version = 0; - for (task = first_tid(leader, tid, filp->f_pos - 2, ns); + for (task = first_tid(leader, tid, pos - 2, ns); task; - task = next_tid(task), filp->f_pos++) { + task = next_tid(task), pos++) { tid = task_pid_nr_ns(task, ns); if (proc_task_fill_cache(filp, dirent, filldir, task, tid) < 0) { /* returning this tgid failed, save it as the first @@ -3116,6 +3117,7 @@ static int proc_task_readdir(struct file * filp, void * dirent, filldir_t filldi } } out: + filp->f_pos = pos; put_task_struct(leader); out_no_task: return retval; diff --git a/trunk/fs/ufs/super.c b/trunk/fs/ufs/super.c index 261a1c2f22dd..e65212dfb60e 100644 --- a/trunk/fs/ufs/super.c +++ b/trunk/fs/ufs/super.c @@ -41,7 +41,7 @@ * Stefan Reinauer * * Module usage counts added on 96/04/29 by - * Gertjan van Wingerde + * Gertjan van Wingerde * * Clean swab support on 19970406 by * Francois-Rene Rideau diff --git a/trunk/include/acpi/acexcep.h b/trunk/include/acpi/acexcep.h index 473d584b1d31..eda04546cdf6 100644 --- a/trunk/include/acpi/acexcep.h +++ b/trunk/include/acpi/acexcep.h @@ -103,9 +103,8 @@ #define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER) #define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER) #define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER) -#define AE_BAD_ADDRESS (acpi_status) (0x0009 | AE_CODE_PROGRAMMER) -#define AE_CODE_PGM_MAX 0x0009 +#define AE_CODE_PGM_MAX 0x0008 /* * Acpi table exceptions @@ -225,8 +224,7 @@ char const *acpi_gbl_exception_names_pgm[] = { "AE_BAD_HEX_CONSTANT", "AE_BAD_OCTAL_CONSTANT", "AE_BAD_DECIMAL_CONSTANT", - "AE_MISSING_ARGUMENTS", - "AE_BAD_ADDRESS" + "AE_MISSING_ARGUMENTS" }; char const *acpi_gbl_exception_names_tbl[] = { diff --git a/trunk/include/acpi/acpi_bus.h b/trunk/include/acpi/acpi_bus.h index 08ec60c8366a..e9f6574930ef 100644 --- a/trunk/include/acpi/acpi_bus.h +++ b/trunk/include/acpi/acpi_bus.h @@ -88,28 +88,44 @@ struct acpi_device; typedef int (*acpi_op_add) (struct acpi_device * device); typedef int (*acpi_op_remove) (struct acpi_device * device, int type); +typedef int (*acpi_op_lock) (struct acpi_device * device, int type); typedef int (*acpi_op_start) (struct acpi_device * device); typedef int (*acpi_op_stop) (struct acpi_device * device, int type); typedef int (*acpi_op_suspend) (struct acpi_device * device, pm_message_t state); typedef int (*acpi_op_resume) (struct acpi_device * device); +typedef int (*acpi_op_scan) (struct acpi_device * device); typedef int (*acpi_op_bind) (struct acpi_device * device); typedef int (*acpi_op_unbind) (struct acpi_device * device); +typedef int (*acpi_op_shutdown) (struct acpi_device * device); struct acpi_bus_ops { u32 acpi_op_add:1; + u32 acpi_op_remove:1; + u32 acpi_op_lock:1; u32 acpi_op_start:1; + u32 acpi_op_stop:1; + u32 acpi_op_suspend:1; + u32 acpi_op_resume:1; + u32 acpi_op_scan:1; + u32 acpi_op_bind:1; + u32 acpi_op_unbind:1; + u32 acpi_op_shutdown:1; + u32 reserved:21; }; struct acpi_device_ops { acpi_op_add add; acpi_op_remove remove; + acpi_op_lock lock; acpi_op_start start; acpi_op_stop stop; acpi_op_suspend suspend; acpi_op_resume resume; + acpi_op_scan scan; acpi_op_bind bind; acpi_op_unbind unbind; + acpi_op_shutdown shutdown; }; struct acpi_driver { diff --git a/trunk/include/acpi/acpi_drivers.h b/trunk/include/acpi/acpi_drivers.h index 241d227de6c0..5fc1bb0f4a90 100644 --- a/trunk/include/acpi/acpi_drivers.h +++ b/trunk/include/acpi/acpi_drivers.h @@ -98,6 +98,24 @@ int acpi_pci_bind_root(struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *pci_acpi_scan_root(struct acpi_device *device, int domain, int bus); +/* -------------------------------------------------------------------------- + Power Resource + -------------------------------------------------------------------------- */ + +int acpi_device_sleep_wake(struct acpi_device *dev, + int enable, int sleep_state, int dev_state); +int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state); +int acpi_disable_wakeup_device_power(struct acpi_device *dev); +int acpi_power_get_inferred_state(struct acpi_device *device); +int acpi_power_transition(struct acpi_device *device, int state); +extern int acpi_power_nocheck; + +/* -------------------------------------------------------------------------- + Embedded Controller + -------------------------------------------------------------------------- */ +int acpi_ec_ecdt_probe(void); +int acpi_boot_ec_enable(void); + /* -------------------------------------------------------------------------- Processor -------------------------------------------------------------------------- */ @@ -147,4 +165,9 @@ static inline void unregister_hotplug_dock_device(acpi_handle handle) } #endif +/*-------------------------------------------------------------------------- + Suspend/Resume + -------------------------------------------------------------------------- */ +extern int acpi_sleep_init(void); + #endif /*__ACPI_DRIVERS_H__*/ diff --git a/trunk/include/acpi/acpiosxf.h b/trunk/include/acpi/acpiosxf.h index 178adfb80237..a62720a7edc0 100644 --- a/trunk/include/acpi/acpiosxf.h +++ b/trunk/include/acpi/acpiosxf.h @@ -241,6 +241,10 @@ acpi_os_derive_pci_id(acpi_handle rhandle, acpi_status acpi_os_validate_interface(char *interface); acpi_status acpi_osi_invalidate(char* interface); +acpi_status +acpi_os_validate_address(u8 space_id, acpi_physical_address address, + acpi_size length, char *name); + u64 acpi_os_get_timer(void); acpi_status acpi_os_signal(u32 function, void *info); diff --git a/trunk/include/acpi/acpixf.h b/trunk/include/acpi/acpixf.h index 16826f15f01f..c8e8cf45830f 100644 --- a/trunk/include/acpi/acpixf.h +++ b/trunk/include/acpi/acpixf.h @@ -47,7 +47,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20090320 +#define ACPI_CA_VERSION 0x20081204 #include "actypes.h" #include "actbl.h" @@ -345,15 +345,17 @@ acpi_resource_to_address64(struct acpi_resource *resource, */ acpi_status acpi_reset(void); -acpi_status acpi_read_bit_register(u32 register_id, u32 *return_value); +acpi_status acpi_get_register(u32 register_id, u32 * return_value); -acpi_status acpi_write_bit_register(u32 register_id, u32 value); +acpi_status acpi_get_register_unlocked(u32 register_id, u32 *return_value); -acpi_status acpi_set_firmware_waking_vector(u32 physical_address); +acpi_status acpi_set_register(u32 register_id, u32 value); -#if ACPI_MACHINE_WIDTH == 64 -acpi_status acpi_set_firmware_waking_vector64(u64 physical_address); -#endif +acpi_status +acpi_set_firmware_waking_vector(u32 physical_address); + +acpi_status +acpi_set_firmware_waking_vector64(u64 physical_address); acpi_status acpi_read(u32 *value, struct acpi_generic_address *reg); diff --git a/trunk/include/acpi/actbl.h b/trunk/include/acpi/actbl.h index 222733d01f36..bf8d4cfd8cf5 100644 --- a/trunk/include/acpi/actbl.h +++ b/trunk/include/acpi/actbl.h @@ -214,11 +214,11 @@ struct acpi_table_fadt { 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 duty cycle index in processor's P_CNT reg */ - u8 duty_width; /* Processor duty cycle value bit width in P_CNT register */ + u8 duty_width; /* Processor duty cycle value bit width in P_CNT register. */ u8 day_alarm; /* Index to day-of-month alarm in RTC CMOS RAM */ u8 month_alarm; /* Index to month-of-year alarm in RTC CMOS RAM */ u8 century; /* Index to century in RTC CMOS RAM */ - u16 boot_flags; /* IA-PC Boot Architecture Flags (see below for individual flags) */ + u16 boot_flags; /* IA-PC Boot Architecture Flags. See Table 5-10 for description */ u8 reserved; /* Reserved, must be zero */ u32 flags; /* Miscellaneous flag bits (see below for individual flags) */ struct acpi_generic_address reset_register; /* 64-bit address of the Reset register */ @@ -236,41 +236,32 @@ struct acpi_table_fadt { struct acpi_generic_address xgpe1_block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */ }; -/* FADT Boot Architecture Flags (boot_flags) */ - -#define ACPI_FADT_LEGACY_DEVICES (1) /* 00: [V2] System has LPC or ISA bus devices */ -#define ACPI_FADT_8042 (1<<1) /* 01: [V3] System has an 8042 controller on port 60/64 */ -#define ACPI_FADT_NO_VGA (1<<2) /* 02: [V4] It is not safe to probe for VGA hardware */ -#define ACPI_FADT_NO_MSI (1<<3) /* 03: [V4] Message Signaled Interrupts (MSI) must not be enabled */ -#define ACPI_FADT_NO_ASPM (1<<4) /* 04: [V4] PCIe ASPM control must not be enabled */ - -#define FADT2_REVISION_ID 3 - /* FADT flags */ -#define ACPI_FADT_WBINVD (1) /* 00: [V1] The wbinvd instruction works properly */ -#define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: [V1] wbinvd flushes but does not invalidate caches */ -#define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: [V1] All processors support C1 state */ -#define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: [V1] C2 state works on MP system */ -#define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: [V1] Power button is handled as a control method device */ -#define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: [V1] Sleep button is handled as a control method device */ -#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: [V1] RTC wakeup status not in fixed register space */ -#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: [V1] RTC alarm can wake system from S4 */ -#define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: [V1] ACPI timer width is 32-bit (0=24-bit) */ -#define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: [V1] Docking supported */ -#define ACPI_FADT_RESET_REGISTER (1<<10) /* 10: [V2] System reset via the FADT RESET_REG supported */ -#define ACPI_FADT_SEALED_CASE (1<<11) /* 11: [V3] No internal expansion capabilities and case is sealed */ -#define ACPI_FADT_HEADLESS (1<<12) /* 12: [V3] No local video capabilities or local input devices */ -#define ACPI_FADT_SLEEP_TYPE (1<<13) /* 13: [V3] Must execute native instruction after writing SLP_TYPx register */ -#define ACPI_FADT_PCI_EXPRESS_WAKE (1<<14) /* 14: [V4] System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */ -#define ACPI_FADT_PLATFORM_CLOCK (1<<15) /* 15: [V4] OSPM should use platform-provided timer (ACPI 3.0) */ -#define ACPI_FADT_S4_RTC_VALID (1<<16) /* 16: [V4] Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ -#define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: [V4] System is compatible with remote power on (ACPI 3.0) */ -#define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: [V4] All local APICs must use cluster model (ACPI 3.0) */ -#define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: [V4] All local x_aPICs must use physical dest mode (ACPI 3.0) */ - -/* FADT Prefered Power Management Profiles */ +#define ACPI_FADT_WBINVD (1) /* 00: The wbinvd instruction works properly */ +#define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: The wbinvd flushes but does not invalidate */ +#define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: All processors support C1 state */ +#define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: C2 state works on MP system */ +#define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: Power button is handled as a generic feature */ +#define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: Sleep button is handled as a generic feature, or not present */ +#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: RTC wakeup stat not in fixed register space */ +#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: RTC wakeup possible from S4 */ +#define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: tmr_val is 32 bits 0=24-bits */ +#define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: Docking supported */ +#define ACPI_FADT_RESET_REGISTER (1<<10) /* 10: System reset via the FADT RESET_REG supported */ +#define ACPI_FADT_SEALED_CASE (1<<11) /* 11: No internal expansion capabilities and case is sealed */ +#define ACPI_FADT_HEADLESS (1<<12) /* 12: No local video capabilities or local input devices */ +#define ACPI_FADT_SLEEP_TYPE (1<<13) /* 13: Must execute native instruction after writing SLP_TYPx register */ +#define ACPI_FADT_PCI_EXPRESS_WAKE (1<<14) /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */ +#define ACPI_FADT_PLATFORM_CLOCK (1<<15) /* 15: OSPM should use platform-provided timer (ACPI 3.0) */ +#define ACPI_FADT_S4_RTC_VALID (1<<16) /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */ +#define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: System is compatible with remote power on (ACPI 3.0) */ +#define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: All local APICs must use cluster model (ACPI 3.0) */ +#define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: All local x_aPICs must use physical dest mode (ACPI 3.0) */ +/* + * FADT Prefered Power Management Profiles + */ enum acpi_prefered_pm_profiles { PM_UNSPECIFIED = 0, PM_DESKTOP = 1, @@ -281,6 +272,16 @@ enum acpi_prefered_pm_profiles { PM_APPLIANCE_PC = 6 }; +/* FADT Boot Arch Flags */ + +#define BAF_LEGACY_DEVICES 0x0001 +#define BAF_8042_KEYBOARD_CONTROLLER 0x0002 +#define BAF_MSI_NOT_SUPPORTED 0x0008 +#define BAF_PCIE_ASPM_CONTROL 0x0010 + +#define FADT2_REVISION_ID 3 +#define FADT2_MINUS_REVISION_ID 2 + /* Reset to default packing */ #pragma pack() @@ -309,9 +310,8 @@ struct acpi_table_desc { #define ACPI_TABLE_ORIGIN_UNKNOWN (0) #define ACPI_TABLE_ORIGIN_MAPPED (1) #define ACPI_TABLE_ORIGIN_ALLOCATED (2) -#define ACPI_TABLE_ORIGIN_OVERRIDE (4) -#define ACPI_TABLE_ORIGIN_MASK (7) -#define ACPI_TABLE_IS_LOADED (8) +#define ACPI_TABLE_ORIGIN_MASK (3) +#define ACPI_TABLE_IS_LOADED (4) /* * Get the remaining ACPI tables diff --git a/trunk/include/acpi/actypes.h b/trunk/include/acpi/actypes.h index f555d927f7c0..a20aab510173 100644 --- a/trunk/include/acpi/actypes.h +++ b/trunk/include/acpi/actypes.h @@ -777,25 +777,17 @@ typedef u8 acpi_adr_space_type; #define ACPI_BITREG_SCI_ENABLE 0x0E #define ACPI_BITREG_BUS_MASTER_RLD 0x0F #define ACPI_BITREG_GLOBAL_LOCK_RELEASE 0x10 -#define ACPI_BITREG_SLEEP_TYPE 0x11 -#define ACPI_BITREG_SLEEP_ENABLE 0x12 +#define ACPI_BITREG_SLEEP_TYPE_A 0x11 +#define ACPI_BITREG_SLEEP_TYPE_B 0x12 +#define ACPI_BITREG_SLEEP_ENABLE 0x13 /* PM2 Control register */ -#define ACPI_BITREG_ARB_DISABLE 0x13 +#define ACPI_BITREG_ARB_DISABLE 0x14 -#define ACPI_BITREG_MAX 0x13 +#define ACPI_BITREG_MAX 0x14 #define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1 -/* Status register values. A 1 clears a status bit. 0 = no effect */ - -#define ACPI_CLEAR_STATUS 1 - -/* Enable and Control register values */ - -#define ACPI_ENABLE_EVENT 1 -#define ACPI_DISABLE_EVENT 0 - /* * External ACPI object definition */ diff --git a/trunk/include/linux/bio.h b/trunk/include/linux/bio.h index d8bd43bfdcf5..1b16108a5417 100644 --- a/trunk/include/linux/bio.h +++ b/trunk/include/linux/bio.h @@ -531,7 +531,7 @@ extern void bio_integrity_endio(struct bio *, int); extern void bio_integrity_advance(struct bio *, unsigned int); extern void bio_integrity_trim(struct bio *, unsigned int, unsigned int); extern void bio_integrity_split(struct bio *, struct bio_pair *, int); -extern int bio_integrity_clone(struct bio *, struct bio *, gfp_t, struct bio_set *); +extern int bio_integrity_clone(struct bio *, struct bio *, struct bio_set *); extern int bioset_integrity_create(struct bio_set *, int); extern void bioset_integrity_free(struct bio_set *); extern void bio_integrity_init_slab(void); @@ -542,7 +542,7 @@ extern void bio_integrity_init_slab(void); #define bioset_integrity_create(a, b) (0) #define bio_integrity_prep(a) (0) #define bio_integrity_enabled(a) (0) -#define bio_integrity_clone(a, b, c,d ) (0) +#define bio_integrity_clone(a, b, c) (0) #define bioset_integrity_free(a) do { } while (0) #define bio_integrity_free(a, b) do { } while (0) #define bio_integrity_endio(a, b) do { } while (0) diff --git a/trunk/include/linux/capability.h b/trunk/include/linux/capability.h index 4864a43b2b45..1b9872556131 100644 --- a/trunk/include/linux/capability.h +++ b/trunk/include/linux/capability.h @@ -393,10 +393,8 @@ struct cpu_vfs_cap_data { # define CAP_FULL_SET ((kernel_cap_t){{ ~0, ~0 }}) # define CAP_INIT_EFF_SET ((kernel_cap_t){{ ~CAP_TO_MASK(CAP_SETPCAP), ~0 }}) # define CAP_FS_SET ((kernel_cap_t){{ CAP_FS_MASK_B0, CAP_FS_MASK_B1 } }) -# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0 \ - | CAP_TO_MASK(CAP_SYS_RESOURCE) \ - | CAP_TO_MASK(CAP_MKNOD), \ - CAP_FS_MASK_B1 } }) +# define CAP_NFSD_SET ((kernel_cap_t){{ CAP_FS_MASK_B0|CAP_TO_MASK(CAP_SYS_RESOURCE), \ + CAP_FS_MASK_B1 } }) #endif /* _KERNEL_CAPABILITY_U32S != 2 */ diff --git a/trunk/include/linux/compiler-gcc.h b/trunk/include/linux/compiler-gcc.h index a3ed7cb8ca34..1514d534deeb 100644 --- a/trunk/include/linux/compiler-gcc.h +++ b/trunk/include/linux/compiler-gcc.h @@ -52,15 +52,7 @@ #define __deprecated __attribute__((deprecated)) #define __packed __attribute__((packed)) #define __weak __attribute__((weak)) - -/* - * it doesn't make sense on ARM (currently the only user of __naked) to trace - * naked functions because then mcount is called without stack and frame pointer - * being set up and there is no chance to restore the lr register to the value - * before mcount was called. - */ -#define __naked __attribute__((naked)) notrace - +#define __naked __attribute__((naked)) #define __noreturn __attribute__((noreturn)) /* diff --git a/trunk/include/linux/dca.h b/trunk/include/linux/dca.h index 9c20c7e87d0a..b00a753eda53 100644 --- a/trunk/include/linux/dca.h +++ b/trunk/include/linux/dca.h @@ -1,23 +1,3 @@ -/* - * Copyright(c) 2007 - 2009 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 DCA_H #define DCA_H /* DCA Provider API */ diff --git a/trunk/include/linux/thermal.h b/trunk/include/linux/thermal.h index 1de8b9eb841b..917707e6151d 100644 --- a/trunk/include/linux/thermal.h +++ b/trunk/include/linux/thermal.h @@ -27,46 +27,27 @@ #include #include -#include struct thermal_zone_device; struct thermal_cooling_device; -enum thermal_device_mode { - THERMAL_DEVICE_DISABLED = 0, - THERMAL_DEVICE_ENABLED, -}; - -enum thermal_trip_type { - THERMAL_TRIP_ACTIVE = 0, - THERMAL_TRIP_PASSIVE, - THERMAL_TRIP_HOT, - THERMAL_TRIP_CRITICAL, -}; - struct thermal_zone_device_ops { int (*bind) (struct thermal_zone_device *, struct thermal_cooling_device *); int (*unbind) (struct thermal_zone_device *, struct thermal_cooling_device *); - int (*get_temp) (struct thermal_zone_device *, unsigned long *); - int (*get_mode) (struct thermal_zone_device *, - enum thermal_device_mode *); - int (*set_mode) (struct thermal_zone_device *, - enum thermal_device_mode); - int (*get_trip_type) (struct thermal_zone_device *, int, - enum thermal_trip_type *); - int (*get_trip_temp) (struct thermal_zone_device *, int, - unsigned long *); + int (*get_temp) (struct thermal_zone_device *, char *); + int (*get_mode) (struct thermal_zone_device *, char *); + int (*set_mode) (struct thermal_zone_device *, const char *); + int (*get_trip_type) (struct thermal_zone_device *, int, char *); + int (*get_trip_temp) (struct thermal_zone_device *, int, char *); int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); - int (*notify) (struct thermal_zone_device *, int, - enum thermal_trip_type); }; struct thermal_cooling_device_ops { - int (*get_max_state) (struct thermal_cooling_device *, unsigned long *); - int (*get_cur_state) (struct thermal_cooling_device *, unsigned long *); - int (*set_cur_state) (struct thermal_cooling_device *, unsigned long); + int (*get_max_state) (struct thermal_cooling_device *, char *); + int (*get_cur_state) (struct thermal_cooling_device *, char *); + int (*set_cur_state) (struct thermal_cooling_device *, unsigned int); }; #define THERMAL_TRIPS_NONE -1 @@ -107,19 +88,11 @@ struct thermal_zone_device { struct device device; void *devdata; int trips; - int tc1; - int tc2; - int passive_delay; - int polling_delay; - int last_temperature; - bool passive; - unsigned int forced_passive; struct thermal_zone_device_ops *ops; struct list_head cooling_devices; struct idr idr; struct mutex lock; /* protect cooling devices list */ struct list_head node; - struct delayed_work poll_queue; #if defined(CONFIG_THERMAL_HWMON) struct list_head hwmon_node; struct thermal_hwmon_device *hwmon; @@ -131,16 +104,13 @@ struct thermal_zone_device { struct thermal_zone_device *thermal_zone_device_register(char *, int, void *, struct thermal_zone_device_ops - *, int tc1, int tc2, - int passive_freq, - int polling_freq); + *); void thermal_zone_device_unregister(struct thermal_zone_device *); int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, struct thermal_cooling_device *); int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, struct thermal_cooling_device *); -void thermal_zone_device_update(struct thermal_zone_device *); struct thermal_cooling_device *thermal_cooling_device_register(char *, void *, struct thermal_cooling_device_ops diff --git a/trunk/include/net/netfilter/nf_conntrack_core.h b/trunk/include/net/netfilter/nf_conntrack_core.h index 5a449b44ba33..c25068e38516 100644 --- a/trunk/include/net/netfilter/nf_conntrack_core.h +++ b/trunk/include/net/netfilter/nf_conntrack_core.h @@ -62,8 +62,7 @@ static inline int nf_conntrack_confirm(struct sk_buff *skb) if (ct && ct != &nf_conntrack_untracked) { if (!nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) ret = __nf_conntrack_confirm(skb); - if (likely(ret == NF_ACCEPT)) - nf_ct_deliver_cached_events(ct); + nf_ct_deliver_cached_events(ct); } return ret; } diff --git a/trunk/kernel/module.c b/trunk/kernel/module.c index 1196f5d11700..ba22484a987e 100644 --- a/trunk/kernel/module.c +++ b/trunk/kernel/module.c @@ -2015,6 +2015,14 @@ static noinline struct module *load_module(void __user *umod, if (err < 0) goto free_mod; +#if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) + mod->refptr = percpu_modalloc(sizeof(local_t), __alignof__(local_t), + mod->name); + if (!mod->refptr) { + err = -ENOMEM; + goto free_mod; + } +#endif if (pcpuindex) { /* We have a special allocation for this section. */ percpu = percpu_modalloc(sechdrs[pcpuindex].sh_size, @@ -2022,7 +2030,7 @@ static noinline struct module *load_module(void __user *umod, mod->name); if (!percpu) { err = -ENOMEM; - goto free_mod; + goto free_percpu; } sechdrs[pcpuindex].sh_flags &= ~(unsigned long)SHF_ALLOC; mod->percpu = percpu; @@ -2074,14 +2082,6 @@ static noinline struct module *load_module(void __user *umod, /* Module has been moved. */ mod = (void *)sechdrs[modindex].sh_addr; -#if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) - mod->refptr = percpu_modalloc(sizeof(local_t), __alignof__(local_t), - mod->name); - if (!mod->refptr) { - err = -ENOMEM; - goto free_init; - } -#endif /* Now we've moved module, initialize linked lists, etc. */ module_unload_init(mod); @@ -2288,17 +2288,15 @@ static noinline struct module *load_module(void __user *umod, ftrace_release(mod->module_core, mod->core_size); free_unload: module_unload_free(mod); - free_init: -#if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) - percpu_modfree(mod->refptr); -#endif module_free(mod, mod->module_init); free_core: module_free(mod, mod->module_core); - /* mod will be freed with core. Don't access it beyond this line! */ free_percpu: if (percpu) percpu_modfree(percpu); +#if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) + percpu_modfree(mod->refptr); +#endif free_mod: kfree(args); free_hdr: diff --git a/trunk/kernel/signal.c b/trunk/kernel/signal.c index 1c8814481a11..2a74fe87c0dd 100644 --- a/trunk/kernel/signal.c +++ b/trunk/kernel/signal.c @@ -1575,15 +1575,7 @@ static void ptrace_stop(int exit_code, int clear_code, siginfo_t *info) read_lock(&tasklist_lock); if (may_ptrace_stop()) { do_notify_parent_cldstop(current, CLD_TRAPPED); - /* - * Don't want to allow preemption here, because - * sys_ptrace() needs this task to be inactive. - * - * XXX: implement read_unlock_no_resched(). - */ - preempt_disable(); read_unlock(&tasklist_lock); - preempt_enable_no_resched(); schedule(); } else { /* diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index e3fe5c705606..f1129706ce7b 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -2588,9 +2588,9 @@ static int process_backlog(struct napi_struct *napi, int quota) local_irq_disable(); skb = __skb_dequeue(&queue->input_pkt_queue); if (!skb) { + __napi_complete(napi); local_irq_enable(); - napi_complete(napi); - goto out; + break; } local_irq_enable(); @@ -2599,7 +2599,6 @@ static int process_backlog(struct napi_struct *napi, int quota) napi_gro_flush(napi); -out: return work; } @@ -2672,7 +2671,7 @@ void netif_napi_del(struct napi_struct *napi) struct sk_buff *skb, *next; list_del_init(&napi->dev_list); - kfree_skb(napi->skb); + kfree(napi->skb); for (skb = napi->gro_list; skb; skb = next) { next = skb->next; diff --git a/trunk/net/ipv4/ip_fragment.c b/trunk/net/ipv4/ip_fragment.c index 7985346653bd..6659ac000eeb 100644 --- a/trunk/net/ipv4/ip_fragment.c +++ b/trunk/net/ipv4/ip_fragment.c @@ -463,7 +463,6 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, struct net_device *dev) { - struct net *net = container_of(qp->q.net, struct net, ipv4.frags); struct iphdr *iph; struct sk_buff *fp, *head = qp->q.fragments; int len; @@ -549,7 +548,7 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, iph = ip_hdr(head); iph->frag_off = 0; iph->tot_len = htons(len); - IP_INC_STATS_BH(net, IPSTATS_MIB_REASMOKS); + IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_REASMOKS); qp->q.fragments = NULL; return 0; diff --git a/trunk/net/ipv6/af_inet6.c b/trunk/net/ipv6/af_inet6.c index 9c8309ed35cf..da944eca2ca6 100644 --- a/trunk/net/ipv6/af_inet6.c +++ b/trunk/net/ipv6/af_inet6.c @@ -1192,9 +1192,6 @@ module_init(inet6_init); static void __exit inet6_exit(void) { - if (disable_ipv6) - return; - /* First of all disallow new sockets creation. */ sock_unregister(PF_INET6); /* Disallow any further netlink messages */ diff --git a/trunk/net/ipv6/netfilter/nf_conntrack_reasm.c b/trunk/net/ipv6/netfilter/nf_conntrack_reasm.c index 058a5e4a60c3..ed4d79a9e4a6 100644 --- a/trunk/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/trunk/net/ipv6/netfilter/nf_conntrack_reasm.c @@ -528,14 +528,14 @@ find_prev_fhdr(struct sk_buff *skb, u8 *prevhdrp, int *prevhoff, int *fhoff) if (!ipv6_ext_hdr(nexthdr)) { return -1; } - if (nexthdr == NEXTHDR_NONE) { - pr_debug("next header is none\n"); - return -1; - } if (len < (int)sizeof(struct ipv6_opt_hdr)) { pr_debug("too short\n"); return -1; } + if (nexthdr == NEXTHDR_NONE) { + pr_debug("next header is none\n"); + return -1; + } if (skb_copy_bits(skb, start, &hdr, sizeof(hdr))) BUG(); if (nexthdr == NEXTHDR_AUTH) diff --git a/trunk/net/ipv6/reassembly.c b/trunk/net/ipv6/reassembly.c index e9ac7a12f595..3c575118fca5 100644 --- a/trunk/net/ipv6/reassembly.c +++ b/trunk/net/ipv6/reassembly.c @@ -452,7 +452,6 @@ static int ip6_frag_queue(struct frag_queue *fq, struct sk_buff *skb, static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, struct net_device *dev) { - struct net *net = container_of(fq->q.net, struct net, ipv6.frags); struct sk_buff *fp, *head = fq->q.fragments; int payload_len; unsigned int nhoff; @@ -552,7 +551,8 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, head->csum); rcu_read_lock(); - IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMOKS); + IP6_INC_STATS_BH(dev_net(dev), + __in6_dev_get(dev), IPSTATS_MIB_REASMOKS); rcu_read_unlock(); fq->q.fragments = NULL; return 1; @@ -566,7 +566,8 @@ static int ip6_frag_reasm(struct frag_queue *fq, struct sk_buff *prev, printk(KERN_DEBUG "ip6_frag_reasm: no memory for reassembly\n"); out_fail: rcu_read_lock(); - IP6_INC_STATS_BH(net, __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); + IP6_INC_STATS_BH(dev_net(dev), + __in6_dev_get(dev), IPSTATS_MIB_REASMFAILS); rcu_read_unlock(); return -1; } diff --git a/trunk/net/ipv6/sit.c b/trunk/net/ipv6/sit.c index 5cee2bcbcece..d3467e563f02 100644 --- a/trunk/net/ipv6/sit.c +++ b/trunk/net/ipv6/sit.c @@ -188,9 +188,9 @@ static struct ip_tunnel * ipip6_tunnel_locate(struct net *net, } nt = netdev_priv(dev); + ipip6_tunnel_init(dev); nt->parms = *parms; - ipip6_tunnel_init(dev); if (parms->i_flags & SIT_ISATAP) dev->priv_flags |= IFF_ISATAP; diff --git a/trunk/net/mac80211/tx.c b/trunk/net/mac80211/tx.c index 37e3d5ef7e3f..94de5033f0b6 100644 --- a/trunk/net/mac80211/tx.c +++ b/trunk/net/mac80211/tx.c @@ -752,8 +752,6 @@ ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx) skb_copy_queue_mapping(frag, first); frag->do_not_encrypt = first->do_not_encrypt; - frag->dev = first->dev; - frag->iif = first->iif; pos += copylen; left -= copylen; diff --git a/trunk/net/netfilter/nf_conntrack_core.c b/trunk/net/netfilter/nf_conntrack_core.c index f4935e344b61..90ce9ddb9451 100644 --- a/trunk/net/netfilter/nf_conntrack_core.c +++ b/trunk/net/netfilter/nf_conntrack_core.c @@ -726,7 +726,7 @@ nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum, NF_CT_ASSERT(skb->nfct); ret = l4proto->packet(ct, skb, dataoff, ctinfo, pf, hooknum); - if (ret <= 0) { + if (ret < 0) { /* Invalid: inverse of the return code tells * the netfilter core what to do */ pr_debug("nf_conntrack_in: Can't track with proto module\n"); diff --git a/trunk/net/netfilter/nf_conntrack_netlink.c b/trunk/net/netfilter/nf_conntrack_netlink.c index ed6d873ad384..cb78aa00399e 100644 --- a/trunk/net/netfilter/nf_conntrack_netlink.c +++ b/trunk/net/netfilter/nf_conntrack_netlink.c @@ -1780,7 +1780,6 @@ ctnetlink_create_expect(struct nlattr *cda[], u_int8_t u3, u32 pid, int report) goto out; } - exp->class = 0; exp->expectfn = NULL; exp->flags = 0; exp->master = ct; diff --git a/trunk/net/netfilter/nf_conntrack_proto_tcp.c b/trunk/net/netfilter/nf_conntrack_proto_tcp.c index f3fd154d1ddd..a1edb9c1adee 100644 --- a/trunk/net/netfilter/nf_conntrack_proto_tcp.c +++ b/trunk/net/netfilter/nf_conntrack_proto_tcp.c @@ -859,7 +859,7 @@ static int tcp_packet(struct nf_conn *ct, */ if (nf_ct_kill(ct)) return -NF_REPEAT; - return NF_DROP; + return -NF_DROP; } /* Fall through */ case TCP_CONNTRACK_IGNORE: @@ -892,7 +892,7 @@ static int tcp_packet(struct nf_conn *ct, nf_log_packet(pf, 0, skb, NULL, NULL, NULL, "nf_ct_tcp: killing out of sync session "); nf_ct_kill(ct); - return NF_DROP; + return -NF_DROP; } ct->proto.tcp.last_index = index; ct->proto.tcp.last_dir = dir; diff --git a/trunk/net/sctp/endpointola.c b/trunk/net/sctp/endpointola.c index 905fda582b92..4c8d9f45ce09 100644 --- a/trunk/net/sctp/endpointola.c +++ b/trunk/net/sctp/endpointola.c @@ -111,8 +111,7 @@ static struct sctp_endpoint *sctp_endpoint_init(struct sctp_endpoint *ep, if (sctp_addip_enable) { auth_chunks->chunks[0] = SCTP_CID_ASCONF; auth_chunks->chunks[1] = SCTP_CID_ASCONF_ACK; - auth_chunks->param_hdr.length = - htons(sizeof(sctp_paramhdr_t) + 2); + auth_chunks->param_hdr.length += htons(2); } } diff --git a/trunk/net/wireless/Kconfig b/trunk/net/wireless/Kconfig index 092ae6faccca..e28e2b8fa436 100644 --- a/trunk/net/wireless/Kconfig +++ b/trunk/net/wireless/Kconfig @@ -102,13 +102,3 @@ config LIB80211_CRYPT_CCMP config LIB80211_CRYPT_TKIP tristate - -config LIB80211_DEBUG - bool "lib80211 debugging messages" - depends on LIB80211 - default n - ---help--- - You can enable this if you want verbose debugging messages - from lib80211. - - If unsure, say N. diff --git a/trunk/net/wireless/lib80211_crypt_ccmp.c b/trunk/net/wireless/lib80211_crypt_ccmp.c index 2301dc1edc4c..db428194c16a 100644 --- a/trunk/net/wireless/lib80211_crypt_ccmp.c +++ b/trunk/net/wireless/lib80211_crypt_ccmp.c @@ -337,7 +337,6 @@ static int lib80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) pos += 8; if (ccmp_replay_check(pn, key->rx_pn)) { -#ifdef CONFIG_LIB80211_DEBUG if (net_ratelimit()) { printk(KERN_DEBUG "CCMP: replay detected: STA=%pM " "previous PN %02x%02x%02x%02x%02x%02x " @@ -347,7 +346,6 @@ static int lib80211_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) key->rx_pn[3], key->rx_pn[4], key->rx_pn[5], pn[0], pn[1], pn[2], pn[3], pn[4], pn[5]); } -#endif key->dot11RSNAStatsCCMPReplays++; return -4; } diff --git a/trunk/net/wireless/lib80211_crypt_tkip.c b/trunk/net/wireless/lib80211_crypt_tkip.c index c36287399d7e..7e8e22bfed90 100644 --- a/trunk/net/wireless/lib80211_crypt_tkip.c +++ b/trunk/net/wireless/lib80211_crypt_tkip.c @@ -465,14 +465,12 @@ static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) pos += 8; if (tkip_replay_check(iv32, iv16, tkey->rx_iv32, tkey->rx_iv16)) { -#ifdef CONFIG_LIB80211_DEBUG if (net_ratelimit()) { printk(KERN_DEBUG "TKIP: replay detected: STA=%pM" " previous TSC %08x%04x received TSC " "%08x%04x\n", hdr->addr2, tkey->rx_iv32, tkey->rx_iv16, iv32, iv16); } -#endif tkey->dot11RSNAStatsTKIPReplays++; return -4; } @@ -507,12 +505,10 @@ static int lib80211_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) * it needs to be recalculated for the next packet. */ tkey->rx_phase1_done = 0; } -#ifdef CONFIG_LIB80211_DEBUG if (net_ratelimit()) { printk(KERN_DEBUG "TKIP: ICV error detected: STA=" "%pM\n", hdr->addr2); } -#endif tkey->dot11RSNAStatsTKIPICVErrors++; return -5; } diff --git a/trunk/net/wireless/nl80211.c b/trunk/net/wireless/nl80211.c index 31b807af3235..1e728fff474e 100644 --- a/trunk/net/wireless/nl80211.c +++ b/trunk/net/wireless/nl80211.c @@ -1908,11 +1908,6 @@ static int nl80211_get_mesh_params(struct sk_buff *skb, if (err) return err; - if (!drv->ops->get_mesh_params) { - err = -EOPNOTSUPP; - goto out; - } - /* Get the mesh params */ rtnl_lock(); err = drv->ops->get_mesh_params(&drv->wiphy, dev, &cur_params); @@ -2022,11 +2017,6 @@ static int nl80211_set_mesh_params(struct sk_buff *skb, struct genl_info *info) if (err) return err; - if (!drv->ops->set_mesh_params) { - err = -EOPNOTSUPP; - goto out; - } - /* This makes sure that there aren't more than 32 mesh config * parameters (otherwise our bitfield scheme would not work.) */ BUILD_BUG_ON(NL80211_MESHCONF_ATTR_MAX > 32); @@ -2071,7 +2061,6 @@ static int nl80211_set_mesh_params(struct sk_buff *skb, struct genl_info *info) err = drv->ops->set_mesh_params(&drv->wiphy, dev, &cfg, mask); rtnl_unlock(); - out: /* cleanup */ cfg80211_put_dev(drv); dev_put(dev); diff --git a/trunk/net/xfrm/xfrm_state.c b/trunk/net/xfrm/xfrm_state.c index 62a5425cc6aa..e25ff62ab2a6 100644 --- a/trunk/net/xfrm/xfrm_state.c +++ b/trunk/net/xfrm/xfrm_state.c @@ -748,51 +748,12 @@ static void xfrm_hash_grow_check(struct net *net, int have_hash_collision) schedule_work(&net->xfrm.state_hash_work); } -static void xfrm_state_look_at(struct xfrm_policy *pol, struct xfrm_state *x, - struct flowi *fl, unsigned short family, - xfrm_address_t *daddr, xfrm_address_t *saddr, - struct xfrm_state **best, int *acq_in_progress, - int *error) -{ - /* Resolution logic: - * 1. There is a valid state with matching selector. Done. - * 2. Valid state with inappropriate selector. Skip. - * - * Entering area of "sysdeps". - * - * 3. If state is not valid, selector is temporary, it selects - * only session which triggered previous resolution. Key - * manager will do something to install a state with proper - * selector. - */ - if (x->km.state == XFRM_STATE_VALID) { - if ((x->sel.family && - !xfrm_selector_match(&x->sel, fl, x->sel.family)) || - !security_xfrm_state_pol_flow_match(x, pol, fl)) - return; - - if (!*best || - (*best)->km.dying > x->km.dying || - ((*best)->km.dying == x->km.dying && - (*best)->curlft.add_time < x->curlft.add_time)) - *best = x; - } else if (x->km.state == XFRM_STATE_ACQ) { - *acq_in_progress = 1; - } else if (x->km.state == XFRM_STATE_ERROR || - x->km.state == XFRM_STATE_EXPIRED) { - if (xfrm_selector_match(&x->sel, fl, x->sel.family) && - security_xfrm_state_pol_flow_match(x, pol, fl)) - *error = -ESRCH; - } -} - struct xfrm_state * xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr, struct flowi *fl, struct xfrm_tmpl *tmpl, struct xfrm_policy *pol, int *err, unsigned short family) { - static xfrm_address_t saddr_wildcard = { }; struct net *net = xp_net(pol); unsigned int h; struct hlist_node *entry; @@ -812,27 +773,40 @@ xfrm_state_find(xfrm_address_t *daddr, xfrm_address_t *saddr, xfrm_state_addr_check(x, daddr, saddr, family) && tmpl->mode == x->props.mode && tmpl->id.proto == x->id.proto && - (tmpl->id.spi == x->id.spi || !tmpl->id.spi)) - xfrm_state_look_at(pol, x, fl, family, daddr, saddr, - &best, &acquire_in_progress, &error); - } - if (best) - goto found; - - h = xfrm_dst_hash(net, daddr, &saddr_wildcard, tmpl->reqid, family); - hlist_for_each_entry(x, entry, net->xfrm.state_bydst+h, bydst) { - if (x->props.family == family && - x->props.reqid == tmpl->reqid && - !(x->props.flags & XFRM_STATE_WILDRECV) && - xfrm_state_addr_check(x, daddr, saddr, family) && - tmpl->mode == x->props.mode && - tmpl->id.proto == x->id.proto && - (tmpl->id.spi == x->id.spi || !tmpl->id.spi)) - xfrm_state_look_at(pol, x, fl, family, daddr, saddr, - &best, &acquire_in_progress, &error); + (tmpl->id.spi == x->id.spi || !tmpl->id.spi)) { + /* Resolution logic: + 1. There is a valid state with matching selector. + Done. + 2. Valid state with inappropriate selector. Skip. + + Entering area of "sysdeps". + + 3. If state is not valid, selector is temporary, + it selects only session which triggered + previous resolution. Key manager will do + something to install a state with proper + selector. + */ + if (x->km.state == XFRM_STATE_VALID) { + if ((x->sel.family && !xfrm_selector_match(&x->sel, fl, x->sel.family)) || + !security_xfrm_state_pol_flow_match(x, pol, fl)) + continue; + if (!best || + best->km.dying > x->km.dying || + (best->km.dying == x->km.dying && + best->curlft.add_time < x->curlft.add_time)) + best = x; + } else if (x->km.state == XFRM_STATE_ACQ) { + acquire_in_progress = 1; + } else if (x->km.state == XFRM_STATE_ERROR || + x->km.state == XFRM_STATE_EXPIRED) { + if (xfrm_selector_match(&x->sel, fl, x->sel.family) && + security_xfrm_state_pol_flow_match(x, pol, fl)) + error = -ESRCH; + } + } } -found: x = best; if (!x && !error && !acquire_in_progress) { if (tmpl->id.spi && diff --git a/trunk/scripts/kconfig/conf.c b/trunk/scripts/kconfig/conf.c index d190092c3b6e..3e1057f885c6 100644 --- a/trunk/scripts/kconfig/conf.c +++ b/trunk/scripts/kconfig/conf.c @@ -11,7 +11,6 @@ #include #include #include -#include #define LKC_DIRECT_LINK #include "lkc.h" @@ -465,22 +464,9 @@ int main(int ac, char **av) input_mode = set_yes; break; case 'r': - { - struct timeval now; - unsigned int seed; - - /* - * Use microseconds derived seed, - * compensate for systems where it may be zero - */ - gettimeofday(&now, NULL); - - seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); - srand(seed); - input_mode = set_random; + srand(time(NULL)); break; - } case 'h': printf(_("See README for usage info\n")); exit(0); diff --git a/trunk/scripts/kconfig/confdata.c b/trunk/scripts/kconfig/confdata.c index 273d73888f9d..830d9eae11f9 100644 --- a/trunk/scripts/kconfig/confdata.c +++ b/trunk/scripts/kconfig/confdata.c @@ -843,7 +843,7 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) default: continue; } - if (!(sym_is_choice(sym) && mode == def_random)) + if (!sym_is_choice(sym) || mode != def_random) sym->flags |= SYMBOL_DEF_USER; break; default: @@ -856,49 +856,28 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) if (mode != def_random) return; - /* - * We have different type of choice blocks. - * If curr.tri equal to mod then we can select several - * choice symbols in one block. - * In this case we do nothing. - * If curr.tri equal yes then only one symbol can be - * selected in a choice block and we set it to yes, - * and the rest to no. - */ + for_all_symbols(i, csym) { if (sym_has_value(csym) || !sym_is_choice(csym)) continue; sym_calc_value(csym); - - if (csym->curr.tri != yes) - continue; - prop = sym_get_choice_prop(csym); - - /* count entries in choice block */ - cnt = 0; - expr_list_for_each_sym(prop->expr, e, sym) - cnt++; - - /* - * find a random value and set it to yes, - * set the rest to no so we have only one set - */ - def = (rand() % cnt); - - cnt = 0; - expr_list_for_each_sym(prop->expr, e, sym) { - if (def == cnt++) { - sym->def[S_DEF_USER].tri = yes; - csym->def[S_DEF_USER].val = sym; - } - else { - sym->def[S_DEF_USER].tri = no; + def = -1; + while (1) { + cnt = 0; + expr_list_for_each_sym(prop->expr, e, sym) { + if (sym->visible == no) + continue; + if (def == cnt++) { + csym->def[S_DEF_USER].val = sym; + break; + } } + if (def >= 0 || cnt < 2) + break; + def = (rand() % cnt) + 1; } csym->flags |= SYMBOL_DEF_USER; - /* clear VALID to get value calculated */ - csym->flags &= ~(SYMBOL_VALID); } } diff --git a/trunk/sound/core/oss/mixer_oss.c b/trunk/sound/core/oss/mixer_oss.c index e570649184e2..4690b8b5681f 100644 --- a/trunk/sound/core/oss/mixer_oss.c +++ b/trunk/sound/core/oss/mixer_oss.c @@ -692,9 +692,6 @@ static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer, snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right); if (slot->present & SNDRV_MIXER_OSS_PRESENT_CVOLUME) snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CVOLUME], left, right); - } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_CVOLUME) { - snd_mixer_oss_put_volume1_vol(fmixer, pslot, - slot->numid[SNDRV_MIXER_OSS_ITEM_CVOLUME], left, right); } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GVOLUME) { snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_GVOLUME], left, right); } else if (slot->present & SNDRV_MIXER_OSS_PRESENT_GLOBAL) { diff --git a/trunk/sound/core/oss/pcm_oss.c b/trunk/sound/core/oss/pcm_oss.c index 699d2890535c..0a1798eafb0b 100644 --- a/trunk/sound/core/oss/pcm_oss.c +++ b/trunk/sound/core/oss/pcm_oss.c @@ -2872,7 +2872,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, setup = kmalloc(sizeof(*setup), GFP_KERNEL); if (! setup) { buffer->error = -ENOMEM; - mutex_unlock(&pstr->oss.setup_mutex); + mutex_lock(&pstr->oss.setup_mutex); return; } if (pstr->oss.setup_list == NULL) @@ -2886,7 +2886,7 @@ static void snd_pcm_oss_proc_write(struct snd_info_entry *entry, if (! template.task_name) { kfree(setup); buffer->error = -ENOMEM; - mutex_unlock(&pstr->oss.setup_mutex); + mutex_lock(&pstr->oss.setup_mutex); return; } } diff --git a/trunk/sound/core/sgbuf.c b/trunk/sound/core/sgbuf.c index 4e7ec2b49873..d4564edd61d7 100644 --- a/trunk/sound/core/sgbuf.c +++ b/trunk/sound/core/sgbuf.c @@ -38,10 +38,6 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) if (! sgbuf) return -EINVAL; - if (dmab->area) - vunmap(dmab->area); - dmab->area = NULL; - tmpb.dev.type = SNDRV_DMA_TYPE_DEV; tmpb.dev.dev = sgbuf->dev; for (i = 0; i < sgbuf->pages; i++) { @@ -52,6 +48,9 @@ int snd_free_sgbuf_pages(struct snd_dma_buffer *dmab) tmpb.bytes = (sgbuf->table[i].addr & ~PAGE_MASK) << PAGE_SHIFT; snd_dma_free_pages(&tmpb); } + if (dmab->area) + vunmap(dmab->area); + dmab->area = NULL; kfree(sgbuf->table); kfree(sgbuf->page_table); diff --git a/trunk/sound/isa/opl3sa2.c b/trunk/sound/isa/opl3sa2.c index b848d1001864..58c972b2af03 100644 --- a/trunk/sound/isa/opl3sa2.c +++ b/trunk/sound/isa/opl3sa2.c @@ -550,27 +550,21 @@ static int __devinit snd_opl3sa2_mixer(struct snd_card *card) #ifdef CONFIG_PM static int snd_opl3sa2_suspend(struct snd_card *card, pm_message_t state) { - if (card) { - struct snd_opl3sa2 *chip = card->private_data; + struct snd_opl3sa2 *chip = card->private_data; - snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); - chip->wss->suspend(chip->wss); - /* power down */ - snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); - } + snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); + chip->wss->suspend(chip->wss); + /* power down */ + snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D3); return 0; } static int snd_opl3sa2_resume(struct snd_card *card) { - struct snd_opl3sa2 *chip; + struct snd_opl3sa2 *chip = card->private_data; int i; - if (!card) - return 0; - - chip = card->private_data; /* power up */ snd_opl3sa2_write(chip, OPL3SA2_PM_CTRL, OPL3SA2_PM_D0); diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c index f3b5723c2859..5e909e0da04b 100644 --- a/trunk/sound/pci/hda/hda_intel.c +++ b/trunk/sound/pci/hda/hda_intel.c @@ -2059,31 +2059,26 @@ static int __devinit check_position_fix(struct azx *chip, int fix) { const struct snd_pci_quirk *q; - switch (fix) { - case POS_FIX_LPIB: - case POS_FIX_POSBUF: - return fix; - } - - /* Check VIA/ATI HD Audio Controller exist */ - switch (chip->driver_type) { - case AZX_DRIVER_VIA: - case AZX_DRIVER_ATI: + /* Check VIA HD Audio Controller exist */ + if (chip->pci->vendor == PCI_VENDOR_ID_VIA && + chip->pci->device == VIA_HDAC_DEVICE_ID) { chip->via_dmapos_patch = 1; /* Use link position directly, avoid any transfer problem. */ return POS_FIX_LPIB; } chip->via_dmapos_patch = 0; - q = snd_pci_quirk_lookup(chip->pci, position_fix_list); - if (q) { - printk(KERN_INFO - "hda_intel: position_fix set to %d " - "for device %04x:%04x\n", - q->value, q->subvendor, q->subdevice); - return q->value; + if (fix == POS_FIX_AUTO) { + q = snd_pci_quirk_lookup(chip->pci, position_fix_list); + if (q) { + printk(KERN_INFO + "hda_intel: position_fix set to %d " + "for device %04x:%04x\n", + q->value, q->subvendor, q->subdevice); + return q->value; + } } - return POS_FIX_AUTO; + return fix; } /* @@ -2215,17 +2210,9 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, gcap = azx_readw(chip, GCAP); snd_printdd("chipset global capabilities = 0x%x\n", gcap); - /* ATI chips seems buggy about 64bit DMA addresses */ - if (chip->driver_type == AZX_DRIVER_ATI) - gcap &= ~0x01; - /* allow 64bit DMA address if supported by H/W */ if ((gcap & 0x01) && !pci_set_dma_mask(pci, DMA_64BIT_MASK)) pci_set_consistent_dma_mask(pci, DMA_64BIT_MASK); - else { - pci_set_dma_mask(pci, DMA_32BIT_MASK); - pci_set_consistent_dma_mask(pci, DMA_32BIT_MASK); - } /* read number of streams from GCAP register instead of using * hardcoded value diff --git a/trunk/sound/pci/mixart/mixart.c b/trunk/sound/pci/mixart/mixart.c index bb162507fe6c..f23a73577c22 100644 --- a/trunk/sound/pci/mixart/mixart.c +++ b/trunk/sound/pci/mixart/mixart.c @@ -607,7 +607,6 @@ static int snd_mixart_hw_params(struct snd_pcm_substream *subs, /* set the format to the board */ err = mixart_set_format(stream, format); if(err < 0) { - mutex_unlock(&mgr->setup_mutex); return err; }