aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/admin-guide/pm/cpufreq.rst8
-rw-r--r--Documentation/devicetree/bindings/ata/sata_rcar.txt14
-rw-r--r--Documentation/devicetree/bindings/gpio/gpio-exar.txt5
-rw-r--r--Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/cs43130.txt67
-rw-r--r--Documentation/devicetree/bindings/sound/dmic.txt16
-rw-r--r--Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt4
-rw-r--r--Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt18
-rw-r--r--Documentation/devicetree/bindings/sound/renesas,rsnd.txt68
-rw-r--r--Documentation/devicetree/bindings/sound/rockchip,pdm.txt7
-rw-r--r--Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt2
-rw-r--r--Documentation/devicetree/bindings/sound/rockchip-i2s.txt4
-rw-r--r--Documentation/devicetree/bindings/sound/rt274.txt33
-rw-r--r--Documentation/devicetree/bindings/sound/rt5663.txt8
-rw-r--r--Documentation/devicetree/bindings/sound/samsung,odroid.txt6
-rw-r--r--Documentation/fb/efifb.txt6
-rw-r--r--Documentation/gpio/gpio-legacy.txt2
-rw-r--r--Documentation/media/kapi/dtv-core.rst443
-rw-r--r--Documentation/media/typical_media_device.svg3054
-rw-r--r--Documentation/media/uapi/dvb/dvbstb.svg668
-rw-r--r--Documentation/media/uapi/v4l/bayer.svg1013
-rw-r--r--Documentation/media/uapi/v4l/constraints.svg356
-rw-r--r--Documentation/media/uapi/v4l/crop.svg253
-rw-r--r--Documentation/media/uapi/v4l/fieldseq_bt.svg170
-rw-r--r--Documentation/media/uapi/v4l/fieldseq_tb.svg175
-rw-r--r--Documentation/media/uapi/v4l/nv12mt.svg764
-rw-r--r--Documentation/media/uapi/v4l/nv12mt_example.svg2474
-rw-r--r--Documentation/media/uapi/v4l/selection.svg6957
-rw-r--r--Documentation/media/uapi/v4l/subdev-image-processing-crop.svg10
-rw-r--r--Documentation/media/uapi/v4l/subdev-image-processing-full.svg10
-rw-r--r--Documentation/media/uapi/v4l/subdev-image-processing-scaling-multi-source.svg10
-rw-r--r--Documentation/media/uapi/v4l/vbi_525.svg614
-rw-r--r--Documentation/media/uapi/v4l/vbi_625.svg388
-rw-r--r--Documentation/media/uapi/v4l/vbi_hsync.svg238
-rw-r--r--Documentation/media/uapi/v4l/vidioc-g-fmt.rst6
-rw-r--r--Documentation/media/v4l-drivers/imx.rst7
-rw-r--r--Documentation/media/v4l-drivers/index.rst1
-rw-r--r--Documentation/networking/switchdev.txt4
-rw-r--r--Documentation/power/runtime_pm.txt3
-rw-r--r--Documentation/printk-formats.txt19
-rw-r--r--Documentation/sysctl/net.txt47
-rw-r--r--MAINTAINERS28
-rw-r--r--Makefile15
-rw-r--r--arch/arc/Kconfig1
-rw-r--r--arch/arc/Makefile2
-rw-r--r--arch/arc/boot/dts/axc001.dtsi20
-rw-r--r--arch/arc/boot/dts/axc003.dtsi21
-rw-r--r--arch/arc/boot/dts/axc003_idu.dtsi21
-rw-r--r--arch/arc/boot/dts/axs10x_mb.dtsi2
-rw-r--r--arch/arc/configs/haps_hs_defconfig1
-rw-r--r--arch/arc/configs/haps_hs_smp_defconfig1
-rw-r--r--arch/arc/configs/nps_defconfig1
-rw-r--r--arch/arc/configs/nsim_700_defconfig1
-rw-r--r--arch/arc/configs/nsim_hs_defconfig1
-rw-r--r--arch/arc/configs/nsim_hs_smp_defconfig1
-rw-r--r--arch/arc/configs/nsimosci_defconfig1
-rw-r--r--arch/arc/configs/nsimosci_hs_defconfig1
-rw-r--r--arch/arc/configs/nsimosci_hs_smp_defconfig1
-rw-r--r--arch/arc/configs/tb10x_defconfig1
-rw-r--r--arch/arc/include/asm/cache.h2
-rw-r--r--arch/arc/include/asm/mmu.h2
-rw-r--r--arch/arc/kernel/intc-arcv2.c3
-rw-r--r--arch/arc/kernel/intc-compact.c14
-rw-r--r--arch/arc/mm/cache.c50
-rw-r--r--arch/arc/mm/dma.c45
-rw-r--r--arch/arc/mm/tlb.c12
-rw-r--r--arch/arc/plat-sim/Kconfig13
-rw-r--r--arch/arc/plat-sim/platform.c5
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/boot/dts/armada-388-gp.dts4
-rw-r--r--arch/arm/boot/dts/da850-evm.dts21
-rw-r--r--arch/arm/boot/dts/da850-lcdk.dts7
-rw-r--r--arch/arm/boot/dts/dm8168-evm.dts34
-rw-r--r--arch/arm/boot/dts/dm816x.dtsi2
-rw-r--r--arch/arm/boot/dts/dra71-evm.dts4
-rw-r--r--arch/arm/boot/dts/exynos4.dtsi3
-rw-r--r--arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi1
-rw-r--r--arch/arm/boot/dts/imx25.dtsi1
-rw-r--r--arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi4
-rw-r--r--arch/arm/boot/dts/imx7d-sdb.dts16
-rw-r--r--arch/arm/boot/dts/rk3288.dtsi4
-rw-r--r--arch/arm/boot/dts/sama5d2.dtsi12
-rw-r--r--arch/arm/boot/dts/sun8i-a83t.dtsi16
-rw-r--r--arch/arm/boot/dts/sunxi-h3-h5.dtsi2
-rw-r--r--arch/arm/boot/dts/tango4-vantage-1172.dts2
-rw-r--r--arch/arm/include/asm/tlb.h11
-rw-r--r--arch/arm/mach-at91/Kconfig2
-rw-r--r--arch/arm/mach-at91/pm.c12
-rw-r--r--arch/arm/mach-davinci/board-da850-evm.c4
-rw-r--r--arch/arm/mach-davinci/clock.c9
-rw-r--r--arch/arm/mach-ep93xx/clock.c20
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/io.h34
-rw-r--r--arch/arm/mach-mmp/devices.c2
-rw-r--r--arch/arm/mach-mvebu/platsmp.c2
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c12
-rw-r--r--arch/arm/mach-omap1/board-osk.c4
-rw-r--r--arch/arm/mach-omap2/board-generic.c2
-rw-r--r--arch/arm/mach-omap2/io.c2
-rw-r--r--arch/arm/mach-omap2/pm34xx.c1
-rw-r--r--arch/arm/mach-omap2/prm3xxx.c7
-rw-r--r--arch/arm/mach-omap2/prm44xx.c55
-rw-r--r--arch/arm/mach-prima2/common.c2
-rw-r--r--arch/arm/mach-pxa/Kconfig1
-rw-r--r--arch/arm/mach-pxa/include/mach/mtd-xip.h10
-rw-r--r--arch/arm/mach-rpc/include/mach/hardware.h4
-rw-r--r--arch/arm/mach-sa1100/clock.c25
-rw-r--r--arch/arm/mach-sa1100/include/mach/mtd-xip.h4
-rw-r--r--arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c6
-rw-r--r--arch/arm/mach-w90x900/clock.c29
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts1
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts1
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts1
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi2
-rw-r--r--arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi3
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gx.dtsi2
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts4
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts103
-rw-r--r--arch/arm64/boot/dts/marvell/armada-37xx.dtsi2
-rw-r--r--arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi1
-rw-r--r--arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi3
-rw-r--r--arch/arm64/boot/dts/renesas/salvator-common.dtsi4
-rw-r--r--arch/arm64/boot/dts/renesas/ulcb.dtsi2
-rw-r--r--arch/arm64/configs/defconfig1
-rw-r--r--arch/arm64/include/asm/arch_timer.h4
-rw-r--r--arch/arm64/include/asm/elf.h4
-rw-r--r--arch/arm64/include/asm/memory.h6
-rw-r--r--arch/arm64/kernel/fpsimd.c2
-rw-r--r--arch/arm64/kernel/head.S1
-rw-r--r--arch/arm64/kernel/kaslr.c20
-rw-r--r--arch/arm64/kernel/traps.c2
-rw-r--r--arch/arm64/kvm/sys_regs.c2
-rw-r--r--arch/arm64/mm/fault.c20
-rw-r--r--arch/ia64/include/asm/tlb.h8
-rw-r--r--arch/mips/Kconfig2
-rw-r--r--arch/mips/Makefile15
-rw-r--r--arch/mips/boot/compressed/.gitignore2
-rw-r--r--arch/mips/cavium-octeon/octeon-usb.c2
-rw-r--r--arch/mips/dec/int-handler.S34
-rw-r--r--arch/mips/include/asm/cache.h2
-rw-r--r--arch/mips/include/asm/cpu-features.h3
-rw-r--r--arch/mips/include/asm/mach-ralink/ralink_regs.h2
-rw-r--r--arch/mips/include/asm/octeon/cvmx-l2c-defs.h37
-rw-r--r--arch/mips/include/asm/octeon/cvmx-l2d-defs.h60
-rw-r--r--arch/mips/include/asm/octeon/cvmx.h1
-rw-r--r--arch/mips/kernel/smp.c6
-rw-r--r--arch/mips/mm/uasm-mips.c2
-rw-r--r--arch/mips/net/ebpf_jit.c1950
-rw-r--r--arch/mips/pci/pci.c7
-rw-r--r--arch/mips/ralink/mt7620.c1
-rw-r--r--arch/mips/vdso/gettimeofday.c6
-rw-r--r--arch/parisc/Kconfig3
-rw-r--r--arch/parisc/include/asm/thread_info.h2
-rw-r--r--arch/parisc/kernel/cache.c5
-rw-r--r--arch/parisc/kernel/irq.c2
-rw-r--r--arch/powerpc/Kconfig2
-rw-r--r--arch/powerpc/boot/Makefile14
-rw-r--r--arch/powerpc/configs/powernv_defconfig3
-rw-r--r--arch/powerpc/configs/ppc64_defconfig3
-rw-r--r--arch/powerpc/configs/pseries_defconfig3
-rw-r--r--arch/powerpc/include/asm/book3s/64/pgtable.h10
-rw-r--r--arch/powerpc/include/asm/mmu_context.h18
-rw-r--r--arch/powerpc/include/asm/pgtable-be-types.h1
-rw-r--r--arch/powerpc/include/asm/pgtable-types.h1
-rw-r--r--arch/powerpc/kernel/entry_64.S60
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S10
-rw-r--r--arch/powerpc/kernel/idle_book3s.S8
-rw-r--r--arch/powerpc/kernel/irq.c15
-rw-r--r--arch/powerpc/kernel/process.c9
-rw-r--r--arch/powerpc/kernel/ptrace.c13
-rw-r--r--arch/powerpc/kernel/smp.c18
-rw-r--r--arch/powerpc/kernel/watchdog.c49
-rw-r--r--arch/powerpc/kvm/book3s_64_vio.c56
-rw-r--r--arch/powerpc/kvm/book3s_hv_rmhandlers.S3
-rw-r--r--arch/powerpc/kvm/book3s_xive_template.c68
-rw-r--r--arch/powerpc/platforms/83xx/mpc832x_rdb.c2
-rw-r--r--arch/powerpc/platforms/powernv/idle.c41
-rw-r--r--arch/powerpc/platforms/powernv/pci-ioda.c8
-rw-r--r--arch/s390/include/asm/tlb.h17
-rw-r--r--arch/s390/kvm/sthyi.c7
-rw-r--r--arch/s390/net/bpf_jit_comp.c3
-rw-r--r--arch/sh/include/asm/tlb.h8
-rw-r--r--arch/sparc/configs/sparc32_defconfig4
-rw-r--r--arch/sparc/configs/sparc64_defconfig4
-rw-r--r--arch/sparc/include/asm/mmu_context_64.h14
-rw-r--r--arch/sparc/include/asm/page_32.h2
-rw-r--r--arch/sparc/include/asm/spitfire.h16
-rw-r--r--arch/sparc/kernel/cpu.c6
-rw-r--r--arch/sparc/kernel/cpumap.c1
-rw-r--r--arch/sparc/kernel/head_64.S22
-rw-r--r--arch/sparc/kernel/pci_sun4v.c2
-rw-r--r--arch/sparc/kernel/pcic.c2
-rw-r--r--arch/sparc/kernel/setup_64.c15
-rw-r--r--arch/sparc/kernel/tsb.S12
-rw-r--r--arch/sparc/lib/U3memcpy.S4
-rw-r--r--arch/sparc/lib/multi3.S24
-rw-r--r--arch/sparc/mm/init_64.c39
-rw-r--r--arch/sparc/power/hibernate.c3
-rw-r--r--arch/um/include/asm/tlb.h13
-rw-r--r--arch/x86/Kconfig3
-rw-r--r--arch/x86/crypto/sha1_avx2_x86_64_asm.S67
-rw-r--r--arch/x86/crypto/sha1_ssse3_glue.c2
-rw-r--r--arch/x86/entry/entry_64.S2
-rw-r--r--arch/x86/events/core.c16
-rw-r--r--arch/x86/events/intel/bts.c2
-rw-r--r--arch/x86/events/intel/p4.c2
-rw-r--r--arch/x86/events/intel/rapl.c2
-rw-r--r--arch/x86/events/intel/uncore.c2
-rw-r--r--arch/x86/events/intel/uncore_nhmex.c12
-rw-r--r--arch/x86/events/intel/uncore_snb.c6
-rw-r--r--arch/x86/events/intel/uncore_snbep.c42
-rw-r--r--arch/x86/include/asm/cpufeatures.h2
-rw-r--r--arch/x86/include/asm/elf.h4
-rw-r--r--arch/x86/include/asm/fpu/internal.h6
-rw-r--r--arch/x86/include/asm/hypervisor.h10
-rw-r--r--arch/x86/include/asm/kvm_host.h1
-rw-r--r--arch/x86/include/asm/mmu_context.h4
-rw-r--r--arch/x86/kernel/cpu/aperfmperf.c43
-rw-r--r--arch/x86/kernel/cpu/mcheck/therm_throt.c2
-rw-r--r--arch/x86/kernel/cpu/microcode/core.c4
-rw-r--r--arch/x86/kernel/cpu/mtrr/main.c18
-rw-r--r--arch/x86/kernel/head64.c7
-rw-r--r--arch/x86/kernel/hpet.c27
-rw-r--r--arch/x86/kernel/ksysfs.c4
-rw-r--r--arch/x86/kernel/kvm.c6
-rw-r--r--arch/x86/kernel/smpboot.c30
-rw-r--r--arch/x86/kvm/cpuid.c2
-rw-r--r--arch/x86/kvm/kvm_cache_regs.h5
-rw-r--r--arch/x86/kvm/mmu.h2
-rw-r--r--arch/x86/kvm/svm.c19
-rw-r--r--arch/x86/kvm/vmx.c262
-rw-r--r--arch/x86/kvm/x86.c37
-rw-r--r--arch/x86/mm/init.c3
-rw-r--r--arch/x86/mm/mmap.c7
-rw-r--r--arch/x86/platform/uv/tlb_uv.c4
-rw-r--r--arch/x86/xen/enlighten_hvm.c59
-rw-r--r--arch/xtensa/include/asm/Kbuild2
-rw-r--r--arch/xtensa/include/asm/device.h15
-rw-r--r--arch/xtensa/include/asm/param.h18
-rw-r--r--arch/xtensa/kernel/xtensa_ksyms.c2
-rw-r--r--arch/xtensa/mm/cache.c16
-rw-r--r--block/bfq-iosched.h22
-rw-r--r--block/bfq-wf2q.c146
-rw-r--r--block/bio-integrity.c6
-rw-r--r--block/blk-mq-debugfs.c3
-rw-r--r--block/blk-mq-pci.c8
-rw-r--r--block/blk-mq.c16
-rw-r--r--block/blk-throttle.c18
-rw-r--r--block/bsg-lib.c74
-rw-r--r--drivers/acpi/acpi_apd.c4
-rw-r--r--drivers/acpi/acpi_lpss.c14
-rw-r--r--drivers/acpi/acpi_watchdog.c7
-rw-r--r--drivers/acpi/acpica/nsxfeval.c10
-rw-r--r--drivers/acpi/ec.c17
-rw-r--r--drivers/acpi/internal.h1
-rw-r--r--drivers/acpi/property.c2
-rw-r--r--drivers/acpi/scan.c1
-rw-r--r--drivers/acpi/spcr.c36
-rw-r--r--drivers/android/binder.c2
-rw-r--r--drivers/ata/Kconfig4
-rw-r--r--drivers/ata/libata-core.c6
-rw-r--r--drivers/ata/libata-eh.c7
-rw-r--r--drivers/ata/libata-scsi.c6
-rw-r--r--drivers/ata/sata_rcar.c8
-rw-r--r--drivers/base/firmware_class.c49
-rw-r--r--drivers/block/loop.c42
-rw-r--r--drivers/block/loop.h1
-rw-r--r--drivers/block/sunvdc.c61
-rw-r--r--drivers/block/virtio_blk.c16
-rw-r--r--drivers/block/xen-blkfront.c6
-rw-r--r--drivers/block/zram/zram_drv.c4
-rw-r--r--drivers/bus/uniphier-system-bus.c14
-rw-r--r--drivers/char/random.c2
-rw-r--r--drivers/clk/clk-gemini.c14
-rw-r--r--drivers/clk/keystone/sci-clk.c66
-rw-r--r--drivers/clk/meson/clk-mpll.c7
-rw-r--r--drivers/clk/meson/clkc.h1
-rw-r--r--drivers/clk/meson/gxbb.c5
-rw-r--r--drivers/clk/meson/meson8b.c5
-rw-r--r--drivers/clk/samsung/clk-exynos5420.c16
-rw-r--r--drivers/clk/sunxi-ng/ccu-sun5i.c2
-rw-r--r--drivers/clk/x86/clk-pmc-atom.c7
-rw-r--r--drivers/clocksource/Kconfig2
-rw-r--r--drivers/clocksource/arm_arch_timer.c2
-rw-r--r--drivers/clocksource/em_sti.c11
-rw-r--r--drivers/clocksource/timer-of.c4
-rw-r--r--drivers/cpufreq/intel_pstate.c11
-rw-r--r--drivers/cpuidle/cpuidle-powernv.c10
-rw-r--r--drivers/crypto/inside-secure/safexcel_hash.c8
-rw-r--r--drivers/crypto/ixp4xx_crypto.c6
-rw-r--r--drivers/dma-buf/sync_file.c5
-rw-r--r--drivers/dma/tegra210-adma.c4
-rw-r--r--drivers/gpio/Kconfig1
-rw-r--r--drivers/gpio/gpio-exar.c2
-rw-r--r--drivers/gpio/gpio-lp87565.c46
-rw-r--r--drivers/gpio/gpio-mvebu.c2
-rw-r--r--drivers/gpio/gpio-mxc.c3
-rw-r--r--drivers/gpio/gpio-tegra.c6
-rw-r--r--drivers/gpio/gpiolib-sysfs.c10
-rw-r--r--drivers/gpio/gpiolib.c9
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c2
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c13
-rw-r--r--drivers/gpu/drm/amd/amdgpu/clearstate_gfx9.h41
-rw-r--r--drivers/gpu/drm/amd/amdgpu/si.c2
-rw-r--r--drivers/gpu/drm/bridge/tc358767.c2
-rw-r--r--drivers/gpu/drm/drm_atomic.c11
-rw-r--r--drivers/gpu/drm/drm_gem.c6
-rw-r--r--drivers/gpu/drm/drm_plane.c1
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c4
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_fb.c14
-rw-r--r--drivers/gpu/drm/i915/gvt/cmd_parser.c2
-rw-r--r--drivers/gpu/drm/i915/gvt/execlist.c27
-rw-r--r--drivers/gpu/drm/i915/gvt/firmware.c11
-rw-r--r--drivers/gpu/drm/i915/gvt/gvt.h14
-rw-r--r--drivers/gpu/drm/i915/gvt/handlers.c38
-rw-r--r--drivers/gpu/drm/i915/gvt/scheduler.c3
-rw-r--r--drivers/gpu/drm/i915/gvt/vgpu.c8
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c2
-rw-r--r--drivers/gpu/drm/i915/i915_gem_context.c15
-rw-r--r--drivers/gpu/drm/i915/i915_gem_render_state.c4
-rw-r--r--drivers/gpu/drm/i915/i915_gem_shrinker.c11
-rw-r--r--drivers/gpu/drm/i915/i915_perf.c4
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c15
-rw-r--r--drivers/gpu/drm/i915/intel_color.c1
-rw-r--r--drivers/gpu/drm/i915/intel_ddi.c2
-rw-r--r--drivers/gpu/drm/i915/intel_display.c7
-rw-r--r--drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c2
-rw-r--r--drivers/gpu/drm/i915/intel_dsi_vbt.c2
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c23
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.h1
-rw-r--r--drivers/gpu/drm/i915/intel_lspcon.c4
-rw-r--r--drivers/gpu/drm/i915/intel_panel.c2
-rw-r--r--drivers/gpu/drm/imx/ipuv3-plane.c6
-rw-r--r--drivers/gpu/drm/msm/Kconfig2
-rw-r--r--drivers/gpu/drm/msm/adreno/a5xx_gpu.c181
-rw-r--r--drivers/gpu/drm/msm/adreno/a5xx_gpu.h3
-rw-r--r--drivers/gpu/drm/msm/adreno/adreno_gpu.c11
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_host.c14
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c12
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c2
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c12
-rw-r--r--drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c4
-rw-r--r--drivers/gpu/drm/msm/msm_gem.c12
-rw-r--r--drivers/gpu/drm/msm/msm_gem_submit.c6
-rw-r--r--drivers/gpu/drm/msm/msm_gem_vma.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c2
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_drv.c12
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_vop.c41
-rw-r--r--drivers/gpu/drm/rockchip/rockchip_drm_vop.h3
-rw-r--r--drivers/gpu/drm/stm/Kconfig1
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_drv.c8
-rw-r--r--drivers/gpu/ipu-v3/Kconfig1
-rw-r--r--drivers/i2c/busses/Kconfig2
-rw-r--r--drivers/i2c/busses/i2c-aspeed.c5
-rw-r--r--drivers/i2c/busses/i2c-designware-platdrv.c23
-rw-r--r--drivers/i2c/busses/i2c-designware-slave.c6
-rw-r--r--drivers/i2c/busses/i2c-simtec.c6
-rw-r--r--drivers/i2c/i2c-core-acpi.c19
-rw-r--r--drivers/i2c/i2c-core-base.c5
-rw-r--r--drivers/i2c/i2c-core.h9
-rw-r--r--drivers/i2c/muxes/Kconfig2
-rw-r--r--drivers/iio/accel/bmc150-accel-core.c9
-rw-r--r--drivers/iio/accel/st_accel_core.c32
-rw-r--r--drivers/iio/adc/aspeed_adc.c26
-rw-r--r--drivers/iio/adc/axp288_adc.c42
-rw-r--r--drivers/iio/adc/ina2xx-adc.c2
-rw-r--r--drivers/iio/adc/stm32-adc-core.c10
-rw-r--r--drivers/iio/adc/sun4i-gpadc-iio.c3
-rw-r--r--drivers/iio/adc/vf610_adc.c2
-rw-r--r--drivers/iio/common/hid-sensors/hid-sensor-trigger.c8
-rw-r--r--drivers/iio/common/st_sensors/st_sensors_core.c29
-rw-r--r--drivers/iio/imu/adis16480.c2
-rw-r--r--drivers/iio/light/tsl2563.c2
-rw-r--r--drivers/iio/magnetometer/st_magn_core.c4
-rw-r--r--drivers/iio/pressure/bmp280-core.c27
-rw-r--r--drivers/iio/pressure/bmp280.h5
-rw-r--r--drivers/iio/pressure/st_pressure_core.c2
-rw-r--r--drivers/iio/trigger/stm32-timer-trigger.c82
-rw-r--r--drivers/infiniband/core/addr.c62
-rw-r--r--drivers/infiniband/core/device.c5
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c15
-rw-r--r--drivers/infiniband/core/uverbs_main.c5
-rw-r--r--drivers/infiniband/core/verbs.c8
-rw-r--r--drivers/infiniband/hw/cxgb4/mem.c2
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_ah.c4
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v1.c2
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_ctrl.c123
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_d.h4
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_puda.c2
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_status.h2
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw_uk.c8
-rw-r--r--drivers/infiniband/hw/mlx5/main.c6
-rw-r--r--drivers/infiniband/hw/mlx5/odp.c2
-rw-r--r--drivers/infiniband/hw/mlx5/qp.c1
-rw-r--r--drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c17
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib.h1
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_cm.c1
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ethtool.c3
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c25
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c19
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c33
-rw-r--r--drivers/input/misc/soc_button_array.c2
-rw-r--r--drivers/input/mouse/alps.c41
-rw-r--r--drivers/input/mouse/alps.h8
-rw-r--r--drivers/input/mouse/elan_i2c_core.c5
-rw-r--r--drivers/input/mouse/trackpoint.c7
-rw-r--r--drivers/input/mouse/trackpoint.h3
-rw-r--r--drivers/iommu/amd_iommu.c1
-rw-r--r--drivers/iommu/amd_iommu_init.c2
-rw-r--r--drivers/iommu/amd_iommu_types.h4
-rw-r--r--drivers/iommu/arm-smmu.c23
-rw-r--r--drivers/iommu/intel-iommu.c4
-rw-r--r--drivers/iommu/io-pgtable-arm-v7s.c6
-rw-r--r--drivers/iommu/io-pgtable-arm.c7
-rw-r--r--drivers/iommu/io-pgtable.h9
-rw-r--r--drivers/iommu/iommu-sysfs.c32
-rw-r--r--drivers/iommu/mtk_iommu.c6
-rw-r--r--drivers/iommu/mtk_iommu.h1
-rw-r--r--drivers/irqchip/irq-atmel-aic-common.c13
-rw-r--r--drivers/irqchip/irq-atmel-aic-common.h4
-rw-r--r--drivers/irqchip/irq-atmel-aic.c14
-rw-r--r--drivers/irqchip/irq-atmel-aic5.c4
-rw-r--r--drivers/irqchip/irq-brcmstb-l2.c1
-rw-r--r--drivers/irqchip/irq-gic-v3-its-platform-msi.c1
-rw-r--r--drivers/irqchip/irq-gic-v3-its.c40
-rw-r--r--drivers/irqchip/irq-gic-v3.c16
-rw-r--r--drivers/irqchip/irq-gic.c14
-rw-r--r--drivers/isdn/hysdn/hysdn_proclog.c28
-rw-r--r--drivers/isdn/i4l/isdn_common.c1
-rw-r--r--drivers/isdn/i4l/isdn_net.c5
-rw-r--r--drivers/isdn/mISDN/fsm.c5
-rw-r--r--drivers/isdn/mISDN/fsm.h2
-rw-r--r--drivers/isdn/mISDN/layer1.c3
-rw-r--r--drivers/isdn/mISDN/layer2.c15
-rw-r--r--drivers/isdn/mISDN/tei.c20
-rw-r--r--drivers/mailbox/pcc.c2
-rw-r--r--drivers/md/md.c5
-rw-r--r--drivers/md/raid5-cache.c61
-rw-r--r--drivers/media/cec/cec-adap.c2
-rw-r--r--drivers/media/cec/cec-notifier.c6
-rw-r--r--drivers/media/dvb-core/dvb_ca_en50221.c143
-rw-r--r--drivers/media/dvb-core/dvb_ca_en50221.h7
-rw-r--r--drivers/media/dvb-frontends/cxd2841er.c5
-rw-r--r--drivers/media/dvb-frontends/drx39xyj/drx_driver.h15
-rw-r--r--drivers/media/dvb-frontends/lnbh25.c6
-rw-r--r--drivers/media/dvb-frontends/stv0367.c210
-rw-r--r--drivers/media/i2c/et8ek8/et8ek8_driver.c1
-rw-r--r--drivers/media/i2c/tvp5150.c25
-rw-r--r--drivers/media/pci/ddbridge/ddbridge-core.c102
-rw-r--r--drivers/media/pci/ngene/ngene-core.c32
-rw-r--r--drivers/media/pci/ngene/ngene-i2c.c6
-rw-r--r--drivers/media/pci/ngene/ngene.h6
-rw-r--r--drivers/media/pci/tw5864/tw5864-video.c1
-rw-r--r--drivers/media/platform/Kconfig4
-rw-r--r--drivers/media/platform/coda/coda-bit.c8
-rw-r--r--drivers/media/platform/coda/coda-common.c4
-rw-r--r--drivers/media/platform/coda/coda.h2
-rw-r--r--drivers/media/platform/davinci/ccdc_hw_device.h10
-rw-r--r--drivers/media/platform/davinci/dm355_ccdc.c92
-rw-r--r--drivers/media/platform/davinci/dm644x_ccdc.c151
-rw-r--r--drivers/media/platform/davinci/vpfe_capture.c93
-rw-r--r--drivers/media/platform/davinci/vpif_capture.c2
-rw-r--r--drivers/media/platform/davinci/vpif_display.c2
-rw-r--r--drivers/media/platform/omap/omap_vout_vrfb.c133
-rw-r--r--drivers/media/platform/omap/omap_voutdef.h6
-rw-r--r--drivers/media/platform/qcom/venus/core.c18
-rw-r--r--drivers/media/platform/qcom/venus/core.h1
-rw-r--r--drivers/media/platform/qcom/venus/firmware.c76
-rw-r--r--drivers/media/platform/qcom/venus/firmware.h5
-rw-r--r--drivers/media/platform/qcom/venus/hfi_msgs.c11
-rw-r--r--drivers/media/platform/sti/bdisp/bdisp-debug.c14
-rw-r--r--drivers/media/platform/vimc/vimc-capture.c15
-rw-r--r--drivers/media/platform/vimc/vimc-debayer.c15
-rw-r--r--drivers/media/platform/vimc/vimc-scaler.c15
-rw-r--r--drivers/media/platform/vimc/vimc-sensor.c15
-rw-r--r--drivers/media/radio/radio-wl1273.c15
-rw-r--r--drivers/media/rc/ir-lirc-codec.c2
-rw-r--r--drivers/media/tuners/fc0011.c1
-rw-r--r--drivers/media/tuners/mxl5005s.c2
-rw-r--r--drivers/media/usb/au0828/au0828-input.c2
-rw-r--r--drivers/media/usb/dvb-usb-v2/lmedm04.c10
-rw-r--r--drivers/media/usb/dvb-usb/dib0700_core.c38
-rw-r--r--drivers/media/usb/em28xx/em28xx-cards.c18
-rw-r--r--drivers/media/usb/em28xx/em28xx-dvb.c1
-rw-r--r--drivers/media/usb/em28xx/em28xx-i2c.c2
-rw-r--r--drivers/media/usb/em28xx/em28xx-input.c2
-rw-r--r--drivers/media/usb/em28xx/em28xx.h1
-rw-r--r--drivers/media/usb/pulse8-cec/pulse8-cec.c2
-rw-r--r--drivers/media/usb/rainshadow-cec/rainshadow-cec.c18
-rw-r--r--drivers/media/usb/stkwebcam/stk-sensor.c32
-rw-r--r--drivers/media/usb/stkwebcam/stk-webcam.c70
-rw-r--r--drivers/media/usb/stkwebcam/stk-webcam.h6
-rw-r--r--drivers/media/v4l2-core/tuner-core.c2
-rw-r--r--drivers/memory/atmel-ebi.c10
-rw-r--r--drivers/mfd/atmel-smc.c2
-rw-r--r--drivers/mfd/da9062-core.c6
-rw-r--r--drivers/misc/mei/pci-me.c6
-rw-r--r--drivers/misc/mei/pci-txe.c6
-rw-r--r--drivers/mmc/core/block.c52
-rw-r--r--drivers/mmc/core/mmc.c2
-rw-r--r--drivers/mmc/host/omap_hsmmc.c2
-rw-r--r--drivers/mmc/host/sdhci-of-at91.c35
-rw-r--r--drivers/mtd/mtd_blkdevs.c1
-rw-r--r--drivers/mtd/nand/atmel/nand-controller.c15
-rw-r--r--drivers/mtd/nand/atmel/pmecc.c21
-rw-r--r--drivers/mtd/nand/nand_base.c13
-rw-r--r--drivers/mtd/nand/nand_timings.c6
-rw-r--r--drivers/mtd/nand/nandsim.c1
-rw-r--r--drivers/mtd/nand/sunxi_nand.c4
-rw-r--r--drivers/net/bonding/bond_main.c15
-rw-r--r--drivers/net/dsa/mt7530.c38
-rw-r--r--drivers/net/dsa/mt7530.h1
-rw-r--r--drivers/net/ethernet/apm/xgene/xgene_enet_main.c6
-rw-r--r--drivers/net/ethernet/aurora/nb8800.c9
-rw-r--r--drivers/net/ethernet/broadcom/b44.c1
-rw-r--r--drivers/net/ethernet/broadcom/bcmsysport.c4
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmgenet.c2
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmgenet.h2
-rw-r--r--drivers/net/ethernet/broadcom/genet/bcmmii.c7
-rw-r--r--drivers/net/ethernet/cavium/thunder/thunder_bgx.c27
-rw-r--r--drivers/net/ethernet/cavium/thunder/thunder_bgx.h2
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4.h1
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c23
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/sge.c5
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/adapter.h1
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c18
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4vf/sge.c3
-rw-r--r--drivers/net/ethernet/faraday/ftgmac100.c7
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c15
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_txrx.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c4
-rw-r--r--drivers/net/ethernet/marvell/mv643xx_eth.c2
-rw-r--r--drivers/net/ethernet/mediatek/mtk_eth_soc.c5
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_ethtool.c15
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/en_rx.c29
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/fw.c9
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/fw.h1
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/main.c6
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/cmd.c25
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en.h10
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_clock.c222
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c4
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c1
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eq.c2
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch.c3
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c16
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/lag.c25
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h5
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/sriov.c5
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c7
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c37
-rw-r--r--drivers/net/ethernet/netronome/nfp/flower/cmsg.c8
-rw-r--r--drivers/net/ethernet/netronome/nfp/nfp_net_common.c5
-rw-r--r--drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c2
-rw-r--r--drivers/net/ethernet/qlogic/qed/qed_mcp.c2
-rw-r--r--drivers/net/ethernet/sfc/mcdi_port.c8
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c2
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c2
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h3
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c5
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c9
-rw-r--r--drivers/net/ethernet/sun/sunhme.h6
-rw-r--r--drivers/net/ethernet/ti/cpts.c111
-rw-r--r--drivers/net/ethernet/ti/cpts.h2
-rw-r--r--drivers/net/ethernet/toshiba/tc35815.c2
-rw-r--r--drivers/net/geneve.c2
-rw-r--r--drivers/net/gtp.c2
-rw-r--r--drivers/net/hyperv/hyperv_net.h3
-rw-r--r--drivers/net/hyperv/netvsc.c3
-rw-r--r--drivers/net/hyperv/netvsc_drv.c43
-rw-r--r--drivers/net/hyperv/rndis_filter.c14
-rw-r--r--drivers/net/ipvlan/ipvlan_main.c2
-rw-r--r--drivers/net/irda/mcs7780.c16
-rw-r--r--drivers/net/phy/Kconfig13
-rw-r--r--drivers/net/phy/phy.c3
-rw-r--r--drivers/net/ppp/ppp_generic.c18
-rw-r--r--drivers/net/ppp/pptp.c2
-rw-r--r--drivers/net/team/team.c8
-rw-r--r--drivers/net/tun.c13
-rw-r--r--drivers/net/usb/asix.h1
-rw-r--r--drivers/net/usb/asix_common.c53
-rw-r--r--drivers/net/usb/asix_devices.c1
-rw-r--r--drivers/net/usb/lan78xx.c18
-rw-r--r--drivers/net/usb/qmi_wwan.c7
-rw-r--r--drivers/net/virtio_net.c5
-rw-r--r--drivers/net/vxlan.c1
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c2
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c6
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c8
-rw-r--r--drivers/net/wireless/intel/iwlwifi/cfg/9000.c14
-rw-r--r--drivers/net/wireless/intel/iwlwifi/dvm/tx.c2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/fw/file.h2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-config.h8
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h4
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-drv.c5
-rw-r--r--drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c19
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/fw.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c20
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/mvm.h2
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c6
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rs.c8
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c10
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/sta.c22
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/tx.c12
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/drv.c20
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/trans.c3
-rw-r--r--drivers/net/wireless/intel/iwlwifi/pcie/tx.c3
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c3
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/wifi.h1
-rw-r--r--drivers/ntb/ntb_transport.c6
-rw-r--r--drivers/ntb/test/ntb_tool.c2
-rw-r--r--drivers/nvme/host/core.c35
-rw-r--r--drivers/nvme/host/fabrics.c3
-rw-r--r--drivers/nvme/host/pci.c23
-rw-r--r--drivers/nvme/target/admin-cmd.c6
-rw-r--r--drivers/nvme/target/fc.c217
-rw-r--r--drivers/of/device.c8
-rw-r--r--drivers/parisc/dino.c2
-rw-r--r--drivers/parisc/pdc_stable.c6
-rw-r--r--drivers/pci/msi.c13
-rw-r--r--drivers/pci/pci.c37
-rw-r--r--drivers/pci/probe.c43
-rw-r--r--drivers/pci/quirks.c89
-rw-r--r--drivers/phy/broadcom/Kconfig2
-rw-r--r--drivers/pinctrl/intel/pinctrl-cherryview.c7
-rw-r--r--drivers/pinctrl/intel/pinctrl-merrifield.c6
-rw-r--r--drivers/pinctrl/mvebu/pinctrl-armada-37xx.c25
-rw-r--r--drivers/pinctrl/stm32/Kconfig9
-rw-r--r--drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c1
-rw-r--r--drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c2
-rw-r--r--drivers/pinctrl/zte/pinctrl-zx.c11
-rw-r--r--drivers/platform/x86/Kconfig1
-rw-r--r--drivers/platform/x86/dell-wmi.c12
-rw-r--r--drivers/platform/x86/intel-vbtn.c4
-rw-r--r--drivers/platform/x86/wmi.c6
-rw-r--r--drivers/ptp/ptp_clock.c42
-rw-r--r--drivers/ptp/ptp_private.h3
-rw-r--r--drivers/rtc/rtc-ds1307.c1
-rw-r--r--drivers/s390/net/qeth_l3_main.c4
-rw-r--r--drivers/sbus/char/display7seg.c4
-rw-r--r--drivers/sbus/char/flash.c4
-rw-r--r--drivers/sbus/char/uctrl.c4
-rw-r--r--drivers/scsi/Kconfig13
-rw-r--r--drivers/scsi/aacraid/aachba.c16
-rw-r--r--drivers/scsi/aacraid/aacraid.h2
-rw-r--r--drivers/scsi/aic7xxx/Makefile12
-rw-r--r--drivers/scsi/aic7xxx/aicasm/Makefile53
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c68
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_hwi.c45
-rw-r--r--drivers/scsi/bnx2i/bnx2i_init.c64
-rw-r--r--drivers/scsi/csiostor/csio_hw.c4
-rw-r--r--drivers/scsi/csiostor/csio_init.c12
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/cxgb4i.c3
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c7
-rw-r--r--drivers/scsi/ipr.c33
-rw-r--r--drivers/scsi/ipr.h2
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c4
-rw-r--r--drivers/scsi/lpfc/lpfc_debugfs.c5
-rw-r--r--drivers/scsi/lpfc/lpfc_nvmet.c30
-rw-r--r--drivers/scsi/lpfc/lpfc_nvmet.h1
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_base.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_sas_fusion.c6
-rw-r--r--drivers/scsi/qedf/qedf.h3
-rw-r--r--drivers/scsi/qedf/qedf_main.c20
-rw-r--r--drivers/scsi/qedi/Kconfig1
-rw-r--r--drivers/scsi/qedi/qedi_iscsi.c8
-rw-r--r--drivers/scsi/qla2xxx/qla_tmpl.c12
-rw-r--r--drivers/scsi/qla2xxx/tcm_qla2xxx.c30
-rw-r--r--drivers/scsi/scsi.c4
-rw-r--r--drivers/scsi/scsi_transport_fc.c6
-rw-r--r--drivers/scsi/sd.c3
-rw-r--r--drivers/scsi/sd_zbc.c9
-rw-r--r--drivers/scsi/ses.c2
-rw-r--r--drivers/scsi/sg.c31
-rw-r--r--drivers/scsi/st.c4
-rw-r--r--drivers/soc/imx/gpcv2.c15
-rw-r--r--drivers/soc/ti/knav_qmss_queue.c3
-rw-r--r--drivers/soc/ti/ti_sci_pm_domains.c2
-rw-r--r--drivers/soc/zte/Kconfig1
-rw-r--r--drivers/staging/comedi/comedi_fops.c3
-rw-r--r--drivers/staging/fsl-mc/bus/fsl-mc-allocator.c6
-rw-r--r--drivers/staging/iio/resolver/ad2s1210.c2
-rw-r--r--drivers/staging/media/atomisp/i2c/ap1302.h4
-rw-r--r--drivers/staging/media/atomisp/i2c/gc0310.h2
-rw-r--r--drivers/staging/media/atomisp/i2c/gc2235.h2
-rw-r--r--drivers/staging/media/atomisp/i2c/imx/imx.h2
-rw-r--r--drivers/staging/media/atomisp/i2c/ov2680.h3
-rw-r--r--drivers/staging/media/atomisp/i2c/ov2722.h2
-rw-r--r--drivers/staging/media/atomisp/i2c/ov5693/ov5693.h2
-rw-r--r--drivers/staging/media/atomisp/i2c/ov8858.h2
-rw-r--r--drivers/staging/media/atomisp/i2c/ov8858_btns.h2
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/Makefile10
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h2
-rw-r--r--drivers/staging/media/cxd2099/cxd2099.c165
-rw-r--r--drivers/staging/media/cxd2099/cxd2099.h6
-rw-r--r--drivers/staging/rtl8188eu/os_dep/usb_intf.c1
-rw-r--r--drivers/target/iscsi/cxgbit/cxgbit_cm.c16
-rw-r--r--drivers/target/iscsi/cxgbit/cxgbit_target.c12
-rw-r--r--drivers/target/iscsi/iscsi_target.c6
-rw-r--r--drivers/target/iscsi/iscsi_target_login.c7
-rw-r--r--drivers/target/target_core_tpg.c4
-rw-r--r--drivers/target/target_core_transport.c4
-rw-r--r--drivers/target/target_core_user.c13
-rw-r--r--drivers/thunderbolt/eeprom.c9
-rw-r--r--drivers/thunderbolt/icm.c9
-rw-r--r--drivers/tty/pty.c64
-rw-r--r--drivers/tty/serial/8250/8250_core.c23
-rw-r--r--drivers/tty/serial/8250/8250_exar.c4
-rw-r--r--drivers/tty/serial/amba-pl011.c37
-rw-r--r--drivers/tty/tty_io.c3
-rw-r--r--drivers/usb/core/hcd.c4
-rw-r--r--drivers/usb/core/hub.c10
-rw-r--r--drivers/usb/core/quirks.c4
-rw-r--r--drivers/usb/dwc3/gadget.c33
-rw-r--r--drivers/usb/gadget/udc/renesas_usb3.c21
-rw-r--r--drivers/usb/host/pci-quirks.c37
-rw-r--r--drivers/usb/host/pci-quirks.h1
-rw-r--r--drivers/usb/host/xhci-pci.c7
-rw-r--r--drivers/usb/musb/musb_host.c1
-rw-r--r--drivers/usb/phy/phy-msm-usb.c17
-rw-r--r--drivers/usb/renesas_usbhs/mod_gadget.c5
-rw-r--r--drivers/usb/renesas_usbhs/rcar3.c9
-rw-r--r--drivers/usb/serial/cp210x.c1
-rw-r--r--drivers/usb/serial/option.c2
-rw-r--r--drivers/usb/serial/pl2303.c2
-rw-r--r--drivers/usb/serial/pl2303.h1
-rw-r--r--drivers/usb/storage/unusual_uas.h4
-rw-r--r--drivers/usb/storage/usb.c18
-rw-r--r--drivers/vfio/pci/vfio_pci.c9
-rw-r--r--drivers/vfio/pci/vfio_pci_config.c13
-rw-r--r--drivers/vhost/vhost.c28
-rw-r--r--drivers/vhost/vhost.h3
-rw-r--r--drivers/video/fbdev/efifb.c8
-rw-r--r--drivers/video/fbdev/imxfb.c10
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/core.c1
-rw-r--r--drivers/virtio/virtio_pci_common.c10
-rw-r--r--drivers/xen/Makefile3
-rw-r--r--drivers/xen/biomerge.c3
-rw-r--r--drivers/xen/events/events_base.c2
-rw-r--r--drivers/xen/xenbus/xenbus_xs.c3
-rw-r--r--fs/binfmt_elf.c3
-rw-r--r--fs/btrfs/disk-io.c4
-rw-r--r--fs/btrfs/inode.c70
-rw-r--r--fs/btrfs/raid56.c34
-rw-r--r--fs/btrfs/volumes.c10
-rw-r--r--fs/btrfs/volumes.h6
-rw-r--r--fs/cifs/dir.c18
-rw-r--r--fs/cifs/smb2pdu.c4
-rw-r--r--fs/dax.c10
-rw-r--r--fs/devpts/inode.c65
-rw-r--r--fs/ext4/acl.c25
-rw-r--r--fs/ext4/ext4.h13
-rw-r--r--fs/ext4/ext4_jbd2.h3
-rw-r--r--fs/ext4/extents.c11
-rw-r--r--fs/ext4/file.c3
-rw-r--r--fs/ext4/inode.c198
-rw-r--r--fs/ext4/ioctl.c27
-rw-r--r--fs/ext4/mballoc.c12
-rw-r--r--fs/ext4/namei.c64
-rw-r--r--fs/ext4/resize.c3
-rw-r--r--fs/ext4/super.c2
-rw-r--r--fs/ext4/xattr.c93
-rw-r--r--fs/fuse/file.c9
-rw-r--r--fs/fuse/fuse_i.h1
-rw-r--r--fs/iomap.c4
-rw-r--r--fs/nfs/Kconfig1
-rw-r--r--fs/nfs/flexfilelayout/flexfilelayoutdev.c1
-rw-r--r--fs/nfs/nfs4client.c3
-rw-r--r--fs/nfs/nfs4proc.c30
-rw-r--r--fs/nfs/nfs4xdr.c2
-rw-r--r--fs/nfsd/nfs4xdr.c6
-rw-r--r--fs/ocfs2/acl.c24
-rw-r--r--fs/proc/meminfo.c8
-rw-r--r--fs/proc/task_mmu.c7
-rw-r--r--fs/quota/dquot.c21
-rw-r--r--fs/userfaultfd.c7
-rw-r--r--fs/xfs/libxfs/xfs_ialloc.c2
-rw-r--r--fs/xfs/xfs_inode.c12
-rw-r--r--fs/xfs/xfs_log.c11
-rw-r--r--fs/xfs/xfs_log_cil.c1
-rw-r--r--fs/xfs/xfs_mount.c12
-rw-r--r--include/asm-generic/tlb.h7
-rw-r--r--include/asm-generic/vmlinux.lds.h38
-rw-r--r--include/kvm/arm_pmu.h2
-rw-r--r--include/linux/acpi.h1
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/bsg-lib.h2
-rw-r--r--include/linux/ceph/osd_client.h1
-rw-r--r--include/linux/ceph/osdmap.h2
-rw-r--r--include/linux/ceph/rados.h4
-rw-r--r--include/linux/cpuhotplug.h2
-rw-r--r--include/linux/cpuset.h19
-rw-r--r--include/linux/crush/crush.h2
-rw-r--r--include/linux/device.h2
-rw-r--r--include/linux/devpts_fs.h10
-rw-r--r--include/linux/fs.h4
-rw-r--r--include/linux/i2c.h3
-rw-r--r--include/linux/iio/common/st_sensors.h7
-rw-r--r--include/linux/iio/iio.h2
-rw-r--r--include/linux/iio/trigger.h4
-rw-r--r--include/linux/iommu.h12
-rw-r--r--include/linux/ipv6.h6
-rw-r--r--include/linux/kthread.h2
-rw-r--r--include/linux/kvm_host.h6
-rw-r--r--include/linux/libata.h2
-rw-r--r--include/linux/memblock.h6
-rw-r--r--include/linux/memcontrol.h10
-rw-r--r--include/linux/mlx4/device.h1
-rw-r--r--include/linux/mlx5/mlx5_ifc.h10
-rw-r--r--include/linux/mlx5/qp.h1
-rw-r--r--include/linux/mm_types.h66
-rw-r--r--include/linux/mtd/nand.h6
-rw-r--r--include/linux/net.h2
-rw-r--r--include/linux/nfs_xdr.h2
-rw-r--r--include/linux/nmi.h8
-rw-r--r--include/linux/nvme-fc-driver.h7
-rw-r--r--include/linux/oom.h22
-rw-r--r--include/linux/pagemap.h2
-rw-r--r--include/linux/pci.h4
-rw-r--r--include/linux/perf_event.h4
-rw-r--r--include/linux/phy.h2
-rw-r--r--include/linux/pid.h4
-rw-r--r--include/linux/pinctrl/pinconf-generic.h4
-rw-r--r--include/linux/platform_data/st_sensors_pdata.h2
-rw-r--r--include/linux/ptp_clock_kernel.h20
-rw-r--r--include/linux/ptr_ring.h9
-rw-r--r--include/linux/sched.h51
-rw-r--r--include/linux/skb_array.h3
-rw-r--r--include/linux/sync_file.h3
-rw-r--r--include/linux/vfio.h4
-rw-r--r--include/linux/wait.h37
-rw-r--r--include/linux/workqueue.h4
-rw-r--r--include/media/cec-notifier.h15
-rw-r--r--include/media/davinci/dm644x_ccdc.h12
-rw-r--r--include/media/davinci/vpfe_capture.h10
-rw-r--r--include/net/addrconf.h10
-rw-r--r--include/net/bonding.h5
-rw-r--r--include/net/busy_poll.h12
-rw-r--r--include/net/ip.h4
-rw-r--r--include/net/mac80211.h15
-rw-r--r--include/net/sch_generic.h5
-rw-r--r--include/net/sctp/sctp.h4
-rw-r--r--include/net/sock.h4
-rw-r--r--include/net/tcp.h10
-rw-r--r--include/net/udp.h41
-rw-r--r--include/rdma/ib_verbs.h1
-rw-r--r--include/scsi/scsi_cmnd.h1
-rw-r--r--include/sound/rt5663.h22
-rw-r--r--include/sound/soc.h53
-rw-r--r--include/target/iscsi/iscsi_target_core.h1
-rw-r--r--include/trace/events/ext4.h35
-rw-r--r--include/uapi/drm/msm_drm.h6
-rw-r--r--include/uapi/linux/loop.h3
-rw-r--r--include/uapi/sound/snd_sst_tokens.h92
-rw-r--r--ipc/msg.c3
-rw-r--r--ipc/sem.c3
-rw-r--r--ipc/shm.c4
-rw-r--r--kernel/audit_watch.c14
-rw-r--r--kernel/bpf/syscall.c4
-rw-r--r--kernel/bpf/verifier.c21
-rw-r--r--kernel/cgroup/cgroup-internal.h3
-rw-r--r--kernel/cgroup/cgroup.c66
-rw-r--r--kernel/cgroup/cpuset.c1
-rw-r--r--kernel/events/core.c86
-rw-r--r--kernel/fork.c3
-rw-r--r--kernel/futex.c5
-rw-r--r--kernel/irq/chip.c10
-rw-r--r--kernel/irq/ipi.c4
-rw-r--r--kernel/kmod.c25
-rw-r--r--kernel/pid.c14
-rw-r--r--kernel/power/snapshot.c2
-rw-r--r--kernel/sched/wait.c7
-rw-r--r--kernel/signal.c17
-rw-r--r--kernel/time/timer.c52
-rw-r--r--kernel/trace/bpf_trace.c34
-rw-r--r--kernel/trace/ftrace.c4
-rw-r--r--kernel/trace/ring_buffer.c14
-rw-r--r--kernel/trace/ring_buffer_benchmark.c2
-rw-r--r--kernel/trace/trace.c19
-rw-r--r--kernel/trace/trace_events_filter.c4
-rw-r--r--kernel/trace/tracing_map.c11
-rw-r--r--kernel/watchdog.c1
-rw-r--r--kernel/watchdog_hld.c59
-rw-r--r--kernel/workqueue.c30
-rw-r--r--lib/Kconfig.debug7
-rw-r--r--lib/fault-inject.c8
-rw-r--r--lib/test_kmod.c16
-rw-r--r--lib/test_rhashtable.c57
-rw-r--r--mm/balloon_compaction.c2
-rw-r--r--mm/cma_debug.c2
-rw-r--r--mm/debug.c6
-rw-r--r--mm/filemap.c20
-rw-r--r--mm/huge_memory.c37
-rw-r--r--mm/hugetlb.c11
-rw-r--r--mm/internal.h5
-rw-r--r--mm/kasan/report.c1
-rw-r--r--mm/ksm.c3
-rw-r--r--mm/madvise.c3
-rw-r--r--mm/memblock.c38
-rw-r--r--mm/memcontrol.c43
-rw-r--r--mm/memory.c79
-rw-r--r--mm/mempolicy.c5
-rw-r--r--mm/migrate.c17
-rw-r--r--mm/mprotect.c5
-rw-r--r--mm/mremap.c8
-rw-r--r--mm/nobootmem.c16
-rw-r--r--mm/page-writeback.c15
-rw-r--r--mm/page_alloc.c37
-rw-r--r--mm/page_io.c7
-rw-r--r--mm/rmap.c88
-rw-r--r--mm/shmem.c16
-rw-r--r--mm/slub.c3
-rw-r--r--mm/util.c2
-rw-r--r--mm/vmalloc.c13
-rw-r--r--mm/zsmalloc.c1
-rw-r--r--net/batman-adv/translation-table.c60
-rw-r--r--net/batman-adv/types.h2
-rw-r--r--net/ceph/crush/mapper.c2
-rw-r--r--net/ceph/messenger.c6
-rw-r--r--net/ceph/osd_client.c14
-rw-r--r--net/ceph/osdmap.c60
-rw-r--r--net/core/datagram.c12
-rw-r--r--net/core/dev.c2
-rw-r--r--net/core/dev_ioctl.c2
-rw-r--r--net/core/filter.c2
-rw-r--r--net/core/netpoll.c2
-rw-r--r--net/dccp/feat.c7
-rw-r--r--net/dccp/ipv4.c1
-rw-r--r--net/dccp/ipv6.c1
-rw-r--r--net/dccp/proto.c19
-rw-r--r--net/dsa/dsa2.c13
-rw-r--r--net/dsa/tag_ksz.c13
-rw-r--r--net/ipv4/af_inet.c7
-rw-r--r--net/ipv4/cipso_ipv4.c12
-rw-r--r--net/ipv4/fib_semantics.c14
-rw-r--r--net/ipv4/fou.c1
-rw-r--r--net/ipv4/igmp.c16
-rw-r--r--net/ipv4/ip_output.c8
-rw-r--r--net/ipv4/route.c16
-rw-r--r--net/ipv4/tcp_input.c37
-rw-r--r--net/ipv4/tcp_ipv4.c4
-rw-r--r--net/ipv4/tcp_output.c32
-rw-r--r--net/ipv4/tcp_timer.c3
-rw-r--r--net/ipv4/tcp_ulp.c14
-rw-r--r--net/ipv4/udp.c46
-rw-r--r--net/ipv4/udp_offload.c2
-rw-r--r--net/ipv6/exthdrs.c1
-rw-r--r--net/ipv6/ip6_fib.c28
-rw-r--r--net/ipv6/ip6_output.c11
-rw-r--r--net/ipv6/route.c30
-rw-r--r--net/ipv6/tcp_ipv6.c4
-rw-r--r--net/ipv6/udp.c41
-rw-r--r--net/ipv6/udp_offload.c2
-rw-r--r--net/irda/af_irda.c2
-rw-r--r--net/key/af_key.c48
-rw-r--r--net/mac80211/agg-rx.c22
-rw-r--r--net/openvswitch/actions.c1
-rw-r--r--net/openvswitch/conntrack.c7
-rw-r--r--net/openvswitch/datapath.c7
-rw-r--r--net/openvswitch/datapath.h2
-rw-r--r--net/packet/af_packet.c15
-rw-r--r--net/rds/ib_recv.c5
-rw-r--r--net/rxrpc/call_accept.c1
-rw-r--r--net/sched/act_ipt.c24
-rw-r--r--net/sched/cls_api.c2
-rw-r--r--net/sched/sch_api.c3
-rw-r--r--net/sched/sch_atm.c4
-rw-r--r--net/sched/sch_cbq.c4
-rw-r--r--net/sched/sch_hfsc.c12
-rw-r--r--net/sched/sch_htb.c4
-rw-r--r--net/sched/sch_sfq.c5
-rw-r--r--net/sctp/ipv6.c2
-rw-r--r--net/socket.c5
-rw-r--r--net/sunrpc/svcsock.c22
-rw-r--r--net/tipc/bearer.c2
-rw-r--r--net/tipc/msg.c1
-rw-r--r--net/tipc/netlink_compat.c6
-rw-r--r--net/tipc/node.c4
-rw-r--r--net/unix/af_unix.c5
-rw-r--r--samples/bpf/tcbpf2_kern.c4
-rwxr-xr-xsamples/bpf/test_tunnel_bpf.sh1
-rw-r--r--scripts/Kbuild.include7
-rw-r--r--scripts/Makefile.asm-generic4
-rw-r--r--scripts/Makefile.build8
-rw-r--r--scripts/Makefile.dtbinst4
-rw-r--r--scripts/basic/Makefile2
-rw-r--r--scripts/basic/fixdep.c6
-rwxr-xr-xscripts/get_maintainer.pl91
-rw-r--r--scripts/parse-maintainers.pl97
-rw-r--r--sound/atmel/ac97c.c9
-rw-r--r--sound/soc/atmel/atmel-classd.c1
-rw-r--r--sound/soc/atmel/atmel-pdmic.c1
-rw-r--r--sound/soc/au1x/db1200.c2
-rw-r--r--sound/soc/au1x/dbdma2.c2
-rw-r--r--sound/soc/au1x/dma.c2
-rw-r--r--sound/soc/au1x/psc-ac97.c2
-rw-r--r--sound/soc/au1x/psc-i2s.c2
-rw-r--r--sound/soc/bcm/cygnus-ssp.c237
-rw-r--r--sound/soc/blackfin/bf5xx-ac97-pcm.c2
-rw-r--r--sound/soc/blackfin/bf5xx-i2s-pcm.c2
-rw-r--r--sound/soc/blackfin/bf6xx-i2s.c2
-rw-r--r--sound/soc/blackfin/bf6xx-sport.c38
-rw-r--r--sound/soc/cirrus/edb93xx.c2
-rw-r--r--sound/soc/cirrus/snappercl15.c2
-rw-r--r--sound/soc/codecs/88pm860x-codec.c2
-rw-r--r--sound/soc/codecs/Kconfig15
-rw-r--r--sound/soc/codecs/Makefile6
-rw-r--r--sound/soc/codecs/ab8500-codec.c2
-rw-r--r--sound/soc/codecs/ac97.c2
-rw-r--r--sound/soc/codecs/ad1836.c2
-rw-r--r--sound/soc/codecs/ad193x.c2
-rw-r--r--sound/soc/codecs/ad1980.c2
-rw-r--r--sound/soc/codecs/ad73311.c2
-rw-r--r--sound/soc/codecs/adau1373.c2
-rw-r--r--sound/soc/codecs/adau1701.c2
-rw-r--r--sound/soc/codecs/adau1977.c8
-rw-r--r--sound/soc/codecs/adav80x.c2
-rw-r--r--sound/soc/codecs/ads117x.c2
-rw-r--r--sound/soc/codecs/ak4104.c2
-rw-r--r--sound/soc/codecs/ak4535.c2
-rw-r--r--sound/soc/codecs/ak4554.c2
-rw-r--r--sound/soc/codecs/ak4613.c2
-rw-r--r--sound/soc/codecs/ak4641.c2
-rw-r--r--sound/soc/codecs/ak4642.c2
-rw-r--r--sound/soc/codecs/ak4671.c2
-rw-r--r--sound/soc/codecs/ak5386.c2
-rw-r--r--sound/soc/codecs/alc5623.c2
-rw-r--r--sound/soc/codecs/arizona.c4
-rw-r--r--sound/soc/codecs/bt-sco.c2
-rw-r--r--sound/soc/codecs/cq93vc.c2
-rw-r--r--sound/soc/codecs/cs35l33.c14
-rw-r--r--sound/soc/codecs/cs35l34.c5
-rw-r--r--sound/soc/codecs/cs35l35.c2
-rw-r--r--sound/soc/codecs/cs4271.c2
-rw-r--r--sound/soc/codecs/cs42l42.c11
-rw-r--r--sound/soc/codecs/cs42l51.c2
-rw-r--r--sound/soc/codecs/cs43130.c2690
-rw-r--r--sound/soc/codecs/cs43130.h546
-rw-r--r--sound/soc/codecs/cs4349.c2
-rw-r--r--sound/soc/codecs/cs47l24.c6
-rw-r--r--sound/soc/codecs/cs53l30.c17
-rw-r--r--sound/soc/codecs/cx20442.c2
-rw-r--r--sound/soc/codecs/da7210.c2
-rw-r--r--sound/soc/codecs/da7213.c2
-rw-r--r--sound/soc/codecs/da7218.c2
-rw-r--r--sound/soc/codecs/da7219.c2
-rw-r--r--sound/soc/codecs/da732x.c2
-rw-r--r--sound/soc/codecs/da9055.c2
-rw-r--r--sound/soc/codecs/dmic.c54
-rw-r--r--sound/soc/codecs/es7134.c2
-rw-r--r--sound/soc/codecs/es8316.c4
-rw-r--r--sound/soc/codecs/es8328.c2
-rw-r--r--sound/soc/codecs/hdac_hdmi.c43
-rw-r--r--sound/soc/codecs/hdmi-codec.c47
-rw-r--r--sound/soc/codecs/ics43432.c2
-rw-r--r--sound/soc/codecs/inno_rk3036.c4
-rw-r--r--sound/soc/codecs/isabelle.c2
-rw-r--r--sound/soc/codecs/jz4740.c2
-rw-r--r--sound/soc/codecs/lm4857.c2
-rw-r--r--sound/soc/codecs/lm49453.c2
-rw-r--r--sound/soc/codecs/max9768.c2
-rw-r--r--sound/soc/codecs/max98088.c2
-rw-r--r--sound/soc/codecs/max98090.c2
-rw-r--r--sound/soc/codecs/max98095.c2
-rw-r--r--sound/soc/codecs/max98357a.c2
-rw-r--r--sound/soc/codecs/max98371.c14
-rw-r--r--sound/soc/codecs/max9850.c2
-rw-r--r--sound/soc/codecs/max9860.c2
-rw-r--r--sound/soc/codecs/max9867.c4
-rw-r--r--sound/soc/codecs/max98926.c8
-rw-r--r--sound/soc/codecs/max98927.c87
-rw-r--r--sound/soc/codecs/mc13783.c2
-rw-r--r--sound/soc/codecs/ml26124.c2
-rw-r--r--sound/soc/codecs/msm8916-wcd-analog.c415
-rw-r--r--sound/soc/codecs/msm8916-wcd-digital.c39
-rw-r--r--sound/soc/codecs/nau8540.c2
-rw-r--r--sound/soc/codecs/nau8810.c2
-rw-r--r--sound/soc/codecs/nau8824.c2
-rw-r--r--sound/soc/codecs/nau8825.c28
-rw-r--r--sound/soc/codecs/pcm1681.c2
-rw-r--r--sound/soc/codecs/pcm179x.c2
-rw-r--r--sound/soc/codecs/pcm3008.c2
-rw-r--r--sound/soc/codecs/pcm512x.c2
-rw-r--r--sound/soc/codecs/rt274.c1229
-rw-r--r--sound/soc/codecs/rt274.h217
-rw-r--r--sound/soc/codecs/rt286.c2
-rw-r--r--sound/soc/codecs/rt298.c2
-rw-r--r--sound/soc/codecs/rt5514-spi.c146
-rw-r--r--sound/soc/codecs/rt5514-spi.h7
-rw-r--r--sound/soc/codecs/rt5514.c174
-rw-r--r--sound/soc/codecs/rt5514.h22
-rw-r--r--sound/soc/codecs/rt5616.c4
-rw-r--r--sound/soc/codecs/rt5631.c2
-rw-r--r--sound/soc/codecs/rt5640.c2
-rw-r--r--sound/soc/codecs/rt5645.c45
-rw-r--r--sound/soc/codecs/rt5651.c2
-rw-r--r--sound/soc/codecs/rt5659.c4
-rw-r--r--sound/soc/codecs/rt5660.c2
-rw-r--r--sound/soc/codecs/rt5663.c264
-rw-r--r--sound/soc/codecs/rt5663.h2
-rw-r--r--sound/soc/codecs/rt5665.c55
-rw-r--r--sound/soc/codecs/rt5665.h21
-rw-r--r--sound/soc/codecs/rt5670.c64
-rw-r--r--sound/soc/codecs/rt5677.c2
-rw-r--r--sound/soc/codecs/sgtl5000.c2
-rw-r--r--sound/soc/codecs/si476x.c2
-rw-r--r--sound/soc/codecs/sirf-audio-codec.c12
-rw-r--r--sound/soc/codecs/sn95031.c2
-rw-r--r--sound/soc/codecs/spdif_receiver.c2
-rw-r--r--sound/soc/codecs/spdif_transmitter.c2
-rw-r--r--sound/soc/codecs/ssm2518.c2
-rw-r--r--sound/soc/codecs/ssm2602.c2
-rw-r--r--sound/soc/codecs/ssm4567.c2
-rw-r--r--sound/soc/codecs/stac9766.c2
-rw-r--r--sound/soc/codecs/tas2552.c2
-rw-r--r--sound/soc/codecs/tas5086.c2
-rw-r--r--sound/soc/codecs/tas5720.c4
-rw-r--r--sound/soc/codecs/tlv320aic23.c2
-rw-r--r--sound/soc/codecs/tlv320aic26.c2
-rw-r--r--sound/soc/codecs/tlv320aic31xx.c2
-rw-r--r--sound/soc/codecs/tlv320aic32x4.c2
-rw-r--r--sound/soc/codecs/tlv320aic3x.c2
-rw-r--r--sound/soc/codecs/tlv320dac33.c2
-rw-r--r--sound/soc/codecs/twl4030.c2
-rw-r--r--sound/soc/codecs/twl6040.c2
-rw-r--r--sound/soc/codecs/uda134x.c2
-rw-r--r--sound/soc/codecs/uda1380.c2
-rw-r--r--sound/soc/codecs/wl1273.c2
-rw-r--r--sound/soc/codecs/wm5102.c4
-rw-r--r--sound/soc/codecs/wm5110.c4
-rw-r--r--sound/soc/codecs/zx_aud96p22.c4
-rw-r--r--sound/soc/davinci/davinci-mcasp.c6
-rw-r--r--sound/soc/davinci/davinci-vcif.c5
-rw-r--r--sound/soc/dwc/dwc-i2s.c6
-rw-r--r--sound/soc/fsl/fsl-asoc-card.c2
-rw-r--r--sound/soc/fsl/fsl_asrc.c2
-rw-r--r--sound/soc/fsl/fsl_asrc_dma.c6
-rw-r--r--sound/soc/fsl/fsl_dma.c11
-rw-r--r--sound/soc/fsl/fsl_esai.c2
-rw-r--r--sound/soc/fsl/fsl_spdif.c2
-rw-r--r--sound/soc/fsl/fsl_ssi.c4
-rw-r--r--sound/soc/fsl/imx-audmux.c16
-rw-r--r--sound/soc/fsl/imx-es8328.c3
-rw-r--r--sound/soc/fsl/imx-pcm-fiq.c6
-rw-r--r--sound/soc/fsl/mpc5200_dma.c4
-rw-r--r--sound/soc/generic/audio-graph-card.c2
-rw-r--r--sound/soc/generic/audio-graph-scu-card.c2
-rw-r--r--sound/soc/generic/simple-card-utils.c2
-rw-r--r--sound/soc/generic/simple-card.c10
-rw-r--r--sound/soc/hisilicon/hi6210-i2s.c2
-rw-r--r--sound/soc/img/img-i2s-in.c2
-rw-r--r--sound/soc/img/img-i2s-out.c2
-rw-r--r--sound/soc/img/img-parallel-out.c2
-rw-r--r--sound/soc/img/img-spdif-in.c2
-rw-r--r--sound/soc/img/img-spdif-out.c2
-rw-r--r--sound/soc/intel/Kconfig3
-rw-r--r--sound/soc/intel/atom/sst-mfld-platform-pcm.c10
-rw-r--r--sound/soc/intel/atom/sst/sst_drv_interface.c4
-rw-r--r--sound/soc/intel/atom/sst/sst_pci.c2
-rw-r--r--sound/soc/intel/baytrail/sst-baytrail-pcm.c4
-rw-r--r--sound/soc/intel/boards/bxt_rt298.c86
-rw-r--r--sound/soc/intel/boards/byt-max98090.c12
-rw-r--r--sound/soc/intel/boards/cht_bsw_rt5672.c10
-rw-r--r--sound/soc/intel/boards/kbl_rt5663_max98927.c310
-rw-r--r--sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c81
-rw-r--r--sound/soc/intel/boards/mfld_machine.c4
-rw-r--r--sound/soc/intel/haswell/sst-haswell-pcm.c2
-rw-r--r--sound/soc/intel/skylake/Makefile5
-rw-r--r--sound/soc/intel/skylake/bxt-sst.c14
-rw-r--r--sound/soc/intel/skylake/cnl-sst-dsp.c274
-rw-r--r--sound/soc/intel/skylake/cnl-sst-dsp.h112
-rw-r--r--sound/soc/intel/skylake/cnl-sst.c497
-rw-r--r--sound/soc/intel/skylake/skl-messages.c163
-rw-r--r--sound/soc/intel/skylake/skl-pcm.c82
-rw-r--r--sound/soc/intel/skylake/skl-sst-dsp.c6
-rw-r--r--sound/soc/intel/skylake/skl-sst-ipc.c6
-rw-r--r--sound/soc/intel/skylake/skl-sst-ipc.h12
-rw-r--r--sound/soc/intel/skylake/skl-sst-utils.c6
-rw-r--r--sound/soc/intel/skylake/skl-sst.c12
-rw-r--r--sound/soc/intel/skylake/skl-topology.c741
-rw-r--r--sound/soc/intel/skylake/skl-topology.h83
-rw-r--r--sound/soc/intel/skylake/skl.c32
-rw-r--r--sound/soc/intel/skylake/skl.h3
-rw-r--r--sound/soc/jz4740/jz4740-i2s.c21
-rw-r--r--sound/soc/kirkwood/kirkwood-dma.c2
-rw-r--r--sound/soc/kirkwood/kirkwood-i2s.c11
-rw-r--r--sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c2
-rw-r--r--sound/soc/mediatek/mt2701/mt2701-afe-pcm.c15
-rw-r--r--sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c1
-rw-r--r--sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c1
-rw-r--r--sound/soc/mediatek/mt8173/mt8173-rt5650.c1
-rw-r--r--sound/soc/mxs/mxs-saif.c13
-rw-r--r--sound/soc/mxs/mxs-sgtl5000.c1
-rw-r--r--sound/soc/nuc900/nuc900-pcm.c4
-rw-r--r--sound/soc/omap/ams-delta.c10
-rw-r--r--sound/soc/omap/omap-pcm.c4
-rw-r--r--sound/soc/omap/omap-twl4030.c13
-rw-r--r--sound/soc/omap/rx51.c9
-rw-r--r--sound/soc/pxa/hx4700.c8
-rw-r--r--sound/soc/pxa/mmp-pcm.c4
-rw-r--r--sound/soc/pxa/mmp-sspa.c2
-rw-r--r--sound/soc/pxa/pxa2xx-pcm.c4
-rw-r--r--sound/soc/qcom/apq8016_sbc.c58
-rw-r--r--sound/soc/qcom/lpass-platform.c4
-rw-r--r--sound/soc/qcom/storm.c1
-rw-r--r--sound/soc/rockchip/Kconfig2
-rw-r--r--sound/soc/rockchip/rk3288_hdmi_analog.c4
-rw-r--r--sound/soc/rockchip/rk3399_gru_sound.c270
-rw-r--r--sound/soc/rockchip/rockchip_i2s.c4
-rw-r--r--sound/soc/rockchip/rockchip_pdm.c2
-rw-r--r--sound/soc/samsung/h1940_uda1380.c9
-rw-r--r--sound/soc/samsung/i2s.c45
-rw-r--r--sound/soc/samsung/idma.c4
-rw-r--r--sound/soc/samsung/jive_wm8750.c2
-rw-r--r--sound/soc/samsung/odroid.c44
-rw-r--r--sound/soc/samsung/pcm.c8
-rw-r--r--sound/soc/samsung/rx1950_uda1380.c10
-rw-r--r--sound/soc/samsung/s3c-i2s-v2.c14
-rw-r--r--sound/soc/samsung/s3c-i2s-v2.h7
-rw-r--r--sound/soc/samsung/s3c2412-i2s.c15
-rw-r--r--sound/soc/samsung/s3c24xx-i2s.c11
-rw-r--r--sound/soc/samsung/s3c24xx_simtec.c2
-rw-r--r--sound/soc/samsung/s3c24xx_uda134x.c3
-rw-r--r--sound/soc/samsung/smartq_wm8987.c9
-rw-r--r--sound/soc/samsung/smdk_spdif.c2
-rw-r--r--sound/soc/samsung/spdif.c8
-rw-r--r--sound/soc/samsung/tm2_wm5110.c4
-rw-r--r--sound/soc/sh/dma-sh7760.c6
-rw-r--r--sound/soc/sh/fsi.c12
-rw-r--r--sound/soc/sh/migor.c2
-rw-r--r--sound/soc/sh/rcar/adg.c11
-rw-r--r--sound/soc/sh/rcar/core.c109
-rw-r--r--sound/soc/sh/rcar/ctu.c5
-rw-r--r--sound/soc/sh/rcar/dma.c2
-rw-r--r--sound/soc/sh/rcar/dvc.c5
-rw-r--r--sound/soc/sh/rcar/gen.c4
-rw-r--r--sound/soc/sh/rcar/mix.c5
-rw-r--r--sound/soc/sh/rcar/rsnd.h1
-rw-r--r--sound/soc/sh/rcar/src.c14
-rw-r--r--sound/soc/sh/rcar/ssi.c141
-rw-r--r--sound/soc/sh/rcar/ssiu.c2
-rw-r--r--sound/soc/sh/siu_dai.c2
-rw-r--r--sound/soc/sh/siu_pcm.c2
-rw-r--r--sound/soc/soc-compress.c23
-rw-r--r--sound/soc/soc-core.c321
-rw-r--r--sound/soc/soc-jack.c76
-rw-r--r--sound/soc/soc-pcm.c43
-rw-r--r--sound/soc/tegra/tegra_alc5632.c13
-rw-r--r--sound/soc/tegra/tegra_max98090.c18
-rw-r--r--sound/soc/tegra/tegra_rt5640.c13
-rw-r--r--sound/soc/tegra/tegra_rt5677.c18
-rw-r--r--sound/soc/tegra/tegra_wm8903.c6
-rw-r--r--tools/build/feature/test-bpf.c2
-rw-r--r--tools/lib/bpf/bpf.c3
-rw-r--r--tools/lib/bpf/libbpf.c3
-rw-r--r--tools/objtool/arch/x86/decode.c26
-rw-r--r--tools/testing/selftests/bpf/test_pkt_md_access.c11
-rw-r--r--tools/testing/selftests/bpf/test_progs.c8
-rw-r--r--tools/testing/selftests/bpf/test_verifier.c47
-rw-r--r--tools/testing/selftests/futex/Makefile2
-rwxr-xr-x[-rw-r--r--]tools/testing/selftests/kmod/kmod.sh4
-rwxr-xr-xtools/testing/selftests/ntb/ntb_test.sh4
-rwxr-xr-x[-rw-r--r--]tools/testing/selftests/sysctl/sysctl.sh0
-rw-r--r--tools/testing/selftests/timers/freq-step.c7
-rw-r--r--virt/kvm/arm/mmu.c4
-rw-r--r--virt/kvm/arm/pmu.c43
-rw-r--r--virt/kvm/arm/vgic/vgic-init.c3
-rw-r--r--virt/kvm/arm/vgic/vgic-its.c1
-rw-r--r--virt/kvm/arm/vgic/vgic-mmio-v3.c4
-rw-r--r--virt/kvm/kvm_main.c11
1269 files changed, 24912 insertions, 19759 deletions
diff --git a/Documentation/admin-guide/pm/cpufreq.rst b/Documentation/admin-guide/pm/cpufreq.rst
index 463cf7e73db8..7af83a92d2d6 100644
--- a/Documentation/admin-guide/pm/cpufreq.rst
+++ b/Documentation/admin-guide/pm/cpufreq.rst
@@ -237,6 +237,14 @@ are the following:
237 This attribute is not present if the scaling driver in use does not 237 This attribute is not present if the scaling driver in use does not
238 support it. 238 support it.
239 239
240``cpuinfo_cur_freq``
241 Current frequency of the CPUs belonging to this policy as obtained from
242 the hardware (in KHz).
243
244 This is expected to be the frequency the hardware actually runs at.
245 If that frequency cannot be determined, this attribute should not
246 be present.
247
240``cpuinfo_max_freq`` 248``cpuinfo_max_freq``
241 Maximum possible operating frequency the CPUs belonging to this policy 249 Maximum possible operating frequency the CPUs belonging to this policy
242 can run at (in kHz). 250 can run at (in kHz).
diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
index 0764f9ab63dc..e20eac7a3087 100644
--- a/Documentation/devicetree/bindings/ata/sata_rcar.txt
+++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
@@ -1,14 +1,22 @@
1* Renesas R-Car SATA 1* Renesas R-Car SATA
2 2
3Required properties: 3Required properties:
4- compatible : should contain one of the following: 4- compatible : should contain one or more of the following:
5 - "renesas,sata-r8a7779" for R-Car H1 5 - "renesas,sata-r8a7779" for R-Car H1
6 ("renesas,rcar-sata" is deprecated)
7 - "renesas,sata-r8a7790-es1" for R-Car H2 ES1 6 - "renesas,sata-r8a7790-es1" for R-Car H2 ES1
8 - "renesas,sata-r8a7790" for R-Car H2 other than ES1 7 - "renesas,sata-r8a7790" for R-Car H2 other than ES1
9 - "renesas,sata-r8a7791" for R-Car M2-W 8 - "renesas,sata-r8a7791" for R-Car M2-W
10 - "renesas,sata-r8a7793" for R-Car M2-N 9 - "renesas,sata-r8a7793" for R-Car M2-N
11 - "renesas,sata-r8a7795" for R-Car H3 10 - "renesas,sata-r8a7795" for R-Car H3
11 - "renesas,rcar-gen2-sata" for a generic R-Car Gen2 compatible device
12 - "renesas,rcar-gen3-sata" for a generic R-Car Gen3 compatible device
13 - "renesas,rcar-sata" is deprecated
14
15 When compatible with the generic version nodes
16 must list the SoC-specific version corresponding
17 to the platform first followed by the generic
18 version.
19
12- reg : address and length of the SATA registers; 20- reg : address and length of the SATA registers;
13- interrupts : must consist of one interrupt specifier. 21- interrupts : must consist of one interrupt specifier.
14- clocks : must contain a reference to the functional clock. 22- clocks : must contain a reference to the functional clock.
@@ -16,7 +24,7 @@ Required properties:
16Example: 24Example:
17 25
18sata0: sata@ee300000 { 26sata0: sata@ee300000 {
19 compatible = "renesas,sata-r8a7791"; 27 compatible = "renesas,sata-r8a7791", "renesas,rcar-gen2-sata";
20 reg = <0 0xee300000 0 0x2000>; 28 reg = <0 0xee300000 0 0x2000>;
21 interrupt-parent = <&gic>; 29 interrupt-parent = <&gic>;
22 interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>; 30 interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/Documentation/devicetree/bindings/gpio/gpio-exar.txt b/Documentation/devicetree/bindings/gpio/gpio-exar.txt
new file mode 100644
index 000000000000..4540d61824af
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/gpio-exar.txt
@@ -0,0 +1,5 @@
1Exportable MPIO interface of Exar UART chips
2
3Required properties of the device:
4 - exar,first-pin: first exportable pins (0..15)
5 - ngpios: number of exportable pins (1..16)
diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
index d3b6e1a4713a..5aa5926029ee 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
@@ -40,7 +40,7 @@ Optional properties:
40Example for a Mali-T760: 40Example for a Mali-T760:
41 41
42gpu@ffa30000 { 42gpu@ffa30000 {
43 compatible = "rockchip,rk3288-mali", "arm,mali-t760", "arm,mali-midgard"; 43 compatible = "rockchip,rk3288-mali", "arm,mali-t760";
44 reg = <0xffa30000 0x10000>; 44 reg = <0xffa30000 0x10000>;
45 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, 45 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
46 <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, 46 <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/Documentation/devicetree/bindings/sound/cs43130.txt b/Documentation/devicetree/bindings/sound/cs43130.txt
new file mode 100644
index 000000000000..8b1dd5aeb004
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cs43130.txt
@@ -0,0 +1,67 @@
1CS43130 DAC
2
3Required properties:
4
5 - compatible : "cirrus,cs43130", "cirrus,cs4399", "cirrus,cs43131",
6 "cirrus,cs43198"
7
8 - reg : the I2C address of the device for I2C
9
10 - VA-supply, VP-supply, VL-supply, VCP-supply, VD-supply:
11 power supplies for the device, as covered in
12 Documentation/devicetree/bindings/regulator/regulator.txt.
13
14
15Optional properties:
16
17 - reset-gpios : Active low GPIO used to reset the device
18
19 - cirrus,xtal-ibias:
20 When external MCLK is generated by external crystal
21 oscillator, CS43130 can be used to provide bias current
22 for external crystal. Amount of bias current sent is
23 set as:
24 1 = 7.5uA
25 2 = 12.5uA
26 3 = 15uA
27
28 - cirrus,dc-measure:
29 Boolean, define to enable headphone DC impedance measurement.
30
31 - cirrus,ac-measure:
32 Boolean, define to enable headphone AC impedance measurement.
33 DC impedance must also be enabled for AC impedance measurement.
34
35 - cirrus,dc-threshold:
36 Define 2 DC impedance thresholds in ohms for HP output control.
37 Default values are 50 and 120 Ohms.
38
39 - cirrus,ac-freq:
40 Define the frequencies at which to measure HP AC impedance.
41 Only used if "cirrus,dc-measure" is defined.
42 Exactly 10 frequencies must be defined.
43 If this properties is undefined, by default,
44 following frequencies are used:
45 <24 43 93 200 431 928 2000 4309 9283 20000>
46 The above frequencies are logarithmically equally spaced.
47 Log base is 10.
48
49Example:
50
51cs43130: audio-codec@30 {
52 compatible = "cirrus,cs43130";
53 reg = <0x30>;
54 reset-gpios = <&axi_gpio 54 0>;
55 VA-supply = <&dummy_vreg>;
56 VP-supply = <&dummy_vreg>;
57 VL-supply = <&dummy_vreg>;
58 VCP-supply = <&dummy_vreg>;
59 VD-supply = <&dummy_vreg>;
60 cirrus,xtal-ibias = <2>;
61 interrupt-parent = <&gpio0>;
62 interrupts = <55 8>;
63 cirrus,dc-measure;
64 cirrus,ac-measure;
65 cirrus,dc-threshold = /bits/ 16 <20 100>;
66 cirrus,ac-freq = /bits/ 16 <24 43 93 200 431 928 2000 4309 9283 20000>;
67};
diff --git a/Documentation/devicetree/bindings/sound/dmic.txt b/Documentation/devicetree/bindings/sound/dmic.txt
new file mode 100644
index 000000000000..54c8ef6498a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/dmic.txt
@@ -0,0 +1,16 @@
1Device-Tree bindings for Digital microphone (DMIC) codec
2
3This device support generic PDM digital microphone.
4
5Required properties:
6 - compatible: should be "dmic-codec".
7
8Optional properties:
9 - dmicen-gpios: GPIO specifier for dmic to control start and stop
10
11Example node:
12
13 dmic_codec: dmic@0 {
14 compatible = "dmic-codec";
15 dmicen-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
16 };
diff --git a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
index 9800a560e0c2..77a57f84bed4 100644
--- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
+++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
@@ -3,7 +3,8 @@ Mediatek AFE PCM controller for mt2701
3Required properties: 3Required properties:
4- compatible = "mediatek,mt2701-audio"; 4- compatible = "mediatek,mt2701-audio";
5- reg: register location and size 5- reg: register location and size
6- interrupts: Should contain AFE interrupt 6- interrupts: should contain AFE and ASYS interrupts
7- interrupt-names: should be "afe" and "asys"
7- power-domains: should define the power domain 8- power-domains: should define the power domain
8- clock-names: should have these clock names: 9- clock-names: should have these clock names:
9 "infra_sys_audio_clk", 10 "infra_sys_audio_clk",
@@ -59,6 +60,7 @@ Example:
59 <0 0x112A0000 0 0x20000>; 60 <0 0x112A0000 0 0x20000>;
60 interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>, 61 interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
61 <GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>; 62 <GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>;
63 interrupt-names = "afe", "asys";
62 power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>; 64 power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
63 clocks = <&infracfg CLK_INFRA_AUDIO>, 65 clocks = <&infracfg CLK_INFRA_AUDIO>,
64 <&topckgen CLK_TOP_AUD_MUX1_SEL>, 66 <&topckgen CLK_TOP_AUD_MUX1_SEL>,
diff --git a/Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt b/Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt
index ccb401cfef9d..551ecab67efe 100644
--- a/Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt
+++ b/Documentation/devicetree/bindings/sound/qcom,msm8916-wcd-analog.txt
@@ -31,8 +31,22 @@ Required properties
31 - vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node. 31 - vdd-cdc-io-supply: phandle to VDD_CDC_IO regulator DT node.
32 - vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node. 32 - vdd-cdc-tx-rx-cx-supply: phandle to VDD_CDC_TX/RX/CX regulator DT node.
33 - vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node. 33 - vdd-micbias-supply: phandle of VDD_MICBIAS supply's regulator DT node.
34
35Optional Properties: 34Optional Properties:
35 - qcom,mbhc-vthreshold-low: Array of 5 threshold voltages in mV for 5 buttons
36 detection on headset when the mbhc is powered up
37 by internal current source, this is a low power.
38 - qcom,mbhc-vthreshold-high: Array of 5 thresold voltages in mV for 5 buttons
39 detection on headset when mbhc is powered up
40 from micbias.
41- qcom,micbias-lvl: Voltage (mV) for Mic Bias
42- qcom,hphl-jack-type-normally-open: boolean, present if hphl pin on jack is a
43 NO (Normally Open). If not specified, then
44 its assumed that hphl pin on jack is NC
45 (Normally Closed).
46- qcom,gnd-jack-type-normally-open: boolean, present if gnd pin on jack is
47 NO (Normally Open). If not specified, then
48 its assumed that gnd pin on jack is NC
49 (Normally Closed).
36- qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor 50- qcom,micbias1-ext-cap: boolean, present if micbias1 has external capacitor
37 connected. 51 connected.
38- qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor 52- qcom,micbias2-ext-cap: boolean, present if micbias2 has external capacitor
@@ -48,6 +62,8 @@ spmi_bus {
48 reg-names = "pmic-codec-core"; 62 reg-names = "pmic-codec-core";
49 clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>; 63 clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
50 clock-names = "mclk"; 64 clock-names = "mclk";
65 qcom,mbhc-vthreshold-low = <75 150 237 450 500>;
66 qcom,mbhc-vthreshold-high = <75 150 237 450 500>;
51 interrupt-parent = <&spmi_bus>; 67 interrupt-parent = <&spmi_bus>;
52 interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, 68 interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>,
53 <0x1 0xf0 0x1 IRQ_TYPE_NONE>, 69 <0x1 0xf0 0x1 IRQ_TYPE_NONE>,
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
index 7246bb268bf9..a1536fdc60e6 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
@@ -199,10 +199,10 @@ Ex)
199 sound { 199 sound {
200 compatible = "simple-scu-audio-card"; 200 compatible = "simple-scu-audio-card";
201 ... 201 ...
202 simple-audio-card,cpu@0 { 202 simple-audio-card,cpu-0 {
203 sound-dai = <&rcar_sound 0>; 203 sound-dai = <&rcar_sound 0>;
204 }; 204 };
205 simple-audio-card,cpu@1 { 205 simple-audio-card,cpu-1 {
206 sound-dai = <&rcar_sound 1>; 206 sound-dai = <&rcar_sound 1>;
207 }; 207 };
208 simple-audio-card,codec { 208 simple-audio-card,codec {
@@ -441,79 +441,79 @@ rcar_sound: sound@ec500000 {
441 "clk_a", "clk_b", "clk_c", "clk_i"; 441 "clk_a", "clk_b", "clk_c", "clk_i";
442 442
443 rcar_sound,dvc { 443 rcar_sound,dvc {
444 dvc0: dvc@0 { 444 dvc0: dvc-0 {
445 dmas = <&audma0 0xbc>; 445 dmas = <&audma0 0xbc>;
446 dma-names = "tx"; 446 dma-names = "tx";
447 }; 447 };
448 dvc1: dvc@1 { 448 dvc1: dvc-1 {
449 dmas = <&audma0 0xbe>; 449 dmas = <&audma0 0xbe>;
450 dma-names = "tx"; 450 dma-names = "tx";
451 }; 451 };
452 }; 452 };
453 453
454 rcar_sound,mix { 454 rcar_sound,mix {
455 mix0: mix@0 { }; 455 mix0: mix-0 { };
456 mix1: mix@1 { }; 456 mix1: mix-1 { };
457 }; 457 };
458 458
459 rcar_sound,ctu { 459 rcar_sound,ctu {
460 ctu00: ctu@0 { }; 460 ctu00: ctu-0 { };
461 ctu01: ctu@1 { }; 461 ctu01: ctu-1 { };
462 ctu02: ctu@2 { }; 462 ctu02: ctu-2 { };
463 ctu03: ctu@3 { }; 463 ctu03: ctu-3 { };
464 ctu10: ctu@4 { }; 464 ctu10: ctu-4 { };
465 ctu11: ctu@5 { }; 465 ctu11: ctu-5 { };
466 ctu12: ctu@6 { }; 466 ctu12: ctu-6 { };
467 ctu13: ctu@7 { }; 467 ctu13: ctu-7 { };
468 }; 468 };
469 469
470 rcar_sound,src { 470 rcar_sound,src {
471 src0: src@0 { 471 src0: src-0 {
472 interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>; 472 interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>;
473 dmas = <&audma0 0x85>, <&audma1 0x9a>; 473 dmas = <&audma0 0x85>, <&audma1 0x9a>;
474 dma-names = "rx", "tx"; 474 dma-names = "rx", "tx";
475 }; 475 };
476 src1: src@1 { 476 src1: src-1 {
477 interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>; 477 interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>;
478 dmas = <&audma0 0x87>, <&audma1 0x9c>; 478 dmas = <&audma0 0x87>, <&audma1 0x9c>;
479 dma-names = "rx", "tx"; 479 dma-names = "rx", "tx";
480 }; 480 };
481 src2: src@2 { 481 src2: src-2 {
482 interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>; 482 interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>;
483 dmas = <&audma0 0x89>, <&audma1 0x9e>; 483 dmas = <&audma0 0x89>, <&audma1 0x9e>;
484 dma-names = "rx", "tx"; 484 dma-names = "rx", "tx";
485 }; 485 };
486 src3: src@3 { 486 src3: src-3 {
487 interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>; 487 interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>;
488 dmas = <&audma0 0x8b>, <&audma1 0xa0>; 488 dmas = <&audma0 0x8b>, <&audma1 0xa0>;
489 dma-names = "rx", "tx"; 489 dma-names = "rx", "tx";
490 }; 490 };
491 src4: src@4 { 491 src4: src-4 {
492 interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>; 492 interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>;
493 dmas = <&audma0 0x8d>, <&audma1 0xb0>; 493 dmas = <&audma0 0x8d>, <&audma1 0xb0>;
494 dma-names = "rx", "tx"; 494 dma-names = "rx", "tx";
495 }; 495 };
496 src5: src@5 { 496 src5: src-5 {
497 interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>; 497 interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>;
498 dmas = <&audma0 0x8f>, <&audma1 0xb2>; 498 dmas = <&audma0 0x8f>, <&audma1 0xb2>;
499 dma-names = "rx", "tx"; 499 dma-names = "rx", "tx";
500 }; 500 };
501 src6: src@6 { 501 src6: src-6 {
502 interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>; 502 interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>;
503 dmas = <&audma0 0x91>, <&audma1 0xb4>; 503 dmas = <&audma0 0x91>, <&audma1 0xb4>;
504 dma-names = "rx", "tx"; 504 dma-names = "rx", "tx";
505 }; 505 };
506 src7: src@7 { 506 src7: src-7 {
507 interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>; 507 interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>;
508 dmas = <&audma0 0x93>, <&audma1 0xb6>; 508 dmas = <&audma0 0x93>, <&audma1 0xb6>;
509 dma-names = "rx", "tx"; 509 dma-names = "rx", "tx";
510 }; 510 };
511 src8: src@8 { 511 src8: src-8 {
512 interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>; 512 interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>;
513 dmas = <&audma0 0x95>, <&audma1 0xb8>; 513 dmas = <&audma0 0x95>, <&audma1 0xb8>;
514 dma-names = "rx", "tx"; 514 dma-names = "rx", "tx";
515 }; 515 };
516 src9: src@9 { 516 src9: src-9 {
517 interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>; 517 interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>;
518 dmas = <&audma0 0x97>, <&audma1 0xba>; 518 dmas = <&audma0 0x97>, <&audma1 0xba>;
519 dma-names = "rx", "tx"; 519 dma-names = "rx", "tx";
@@ -521,52 +521,52 @@ rcar_sound: sound@ec500000 {
521 }; 521 };
522 522
523 rcar_sound,ssi { 523 rcar_sound,ssi {
524 ssi0: ssi@0 { 524 ssi0: ssi-0 {
525 interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; 525 interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
526 dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>; 526 dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
527 dma-names = "rx", "tx", "rxu", "txu"; 527 dma-names = "rx", "tx", "rxu", "txu";
528 }; 528 };
529 ssi1: ssi@1 { 529 ssi1: ssi-1 {
530 interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; 530 interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
531 dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>; 531 dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
532 dma-names = "rx", "tx", "rxu", "txu"; 532 dma-names = "rx", "tx", "rxu", "txu";
533 }; 533 };
534 ssi2: ssi@2 { 534 ssi2: ssi-2 {
535 interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; 535 interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>;
536 dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>; 536 dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
537 dma-names = "rx", "tx", "rxu", "txu"; 537 dma-names = "rx", "tx", "rxu", "txu";
538 }; 538 };
539 ssi3: ssi@3 { 539 ssi3: ssi-3 {
540 interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; 540 interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>;
541 dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>; 541 dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
542 dma-names = "rx", "tx", "rxu", "txu"; 542 dma-names = "rx", "tx", "rxu", "txu";
543 }; 543 };
544 ssi4: ssi@4 { 544 ssi4: ssi-4 {
545 interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; 545 interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>;
546 dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>; 546 dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
547 dma-names = "rx", "tx", "rxu", "txu"; 547 dma-names = "rx", "tx", "rxu", "txu";
548 }; 548 };
549 ssi5: ssi@5 { 549 ssi5: ssi-5 {
550 interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; 550 interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>;
551 dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>; 551 dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
552 dma-names = "rx", "tx", "rxu", "txu"; 552 dma-names = "rx", "tx", "rxu", "txu";
553 }; 553 };
554 ssi6: ssi@6 { 554 ssi6: ssi-6 {
555 interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; 555 interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>;
556 dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>; 556 dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
557 dma-names = "rx", "tx", "rxu", "txu"; 557 dma-names = "rx", "tx", "rxu", "txu";
558 }; 558 };
559 ssi7: ssi@7 { 559 ssi7: ssi-7 {
560 interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; 560 interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>;
561 dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>; 561 dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
562 dma-names = "rx", "tx", "rxu", "txu"; 562 dma-names = "rx", "tx", "rxu", "txu";
563 }; 563 };
564 ssi8: ssi@8 { 564 ssi8: ssi-8 {
565 interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; 565 interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
566 dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>; 566 dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
567 dma-names = "rx", "tx", "rxu", "txu"; 567 dma-names = "rx", "tx", "rxu", "txu";
568 }; 568 };
569 ssi9: ssi@9 { 569 ssi9: ssi-9 {
570 interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; 570 interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
571 dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>; 571 dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
572 dma-names = "rx", "tx", "rxu", "txu"; 572 dma-names = "rx", "tx", "rxu", "txu";
diff --git a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt b/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
index 921729de7346..2ad66f649a28 100644
--- a/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
+++ b/Documentation/devicetree/bindings/sound/rockchip,pdm.txt
@@ -29,11 +29,14 @@ pdm: pdm@ff040000 {
29 dma-names = "rx"; 29 dma-names = "rx";
30 pinctrl-names = "default", "sleep"; 30 pinctrl-names = "default", "sleep";
31 pinctrl-0 = <&pdmm0_clk 31 pinctrl-0 = <&pdmm0_clk
32 &pdmm0_fsync
33 &pdmm0_sdi0 32 &pdmm0_sdi0
34 &pdmm0_sdi1 33 &pdmm0_sdi1
35 &pdmm0_sdi2 34 &pdmm0_sdi2
36 &pdmm0_sdi3>; 35 &pdmm0_sdi3>;
37 pinctrl-1 = <&pdmm0_sleep>; 36 pinctrl-1 = <&pdmm0_clk_sleep
37 &pdmm0_sdi0_sleep
38 &pdmm0_sdi1_sleep
39 &pdmm0_sdi2_sleep
40 &pdmm0_sdi3_sleep>;
38 status = "disabled"; 41 status = "disabled";
39}; 42};
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
index eac91db07178..72d3cf4c2606 100644
--- a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
+++ b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
@@ -4,7 +4,7 @@ Required properties:
4- compatible: "rockchip,rk3399-gru-sound" 4- compatible: "rockchip,rk3399-gru-sound"
5- rockchip,cpu: The phandle of the Rockchip I2S controller that's 5- rockchip,cpu: The phandle of the Rockchip I2S controller that's
6 connected to the codecs 6 connected to the codecs
7- rockchip,codec: The phandle of the MAX98357A/RT5514/DA7219 codecs 7- rockchip,codec: The phandle of the audio codecs
8 8
9Optional properties: 9Optional properties:
10- dmic-wakeup-delay-ms : specify delay time (ms) for DMIC ready. 10- dmic-wakeup-delay-ms : specify delay time (ms) for DMIC ready.
diff --git a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt
index 206aba1b34bb..b208a752576c 100644
--- a/Documentation/devicetree/bindings/sound/rockchip-i2s.txt
+++ b/Documentation/devicetree/bindings/sound/rockchip-i2s.txt
@@ -7,8 +7,12 @@ Required properties:
7 7
8- compatible: should be one of the following: 8- compatible: should be one of the following:
9 - "rockchip,rk3066-i2s": for rk3066 9 - "rockchip,rk3066-i2s": for rk3066
10 - "rockchip,rk3036-i2s", "rockchip,rk3066-i2s": for rk3036
10 - "rockchip,rk3188-i2s", "rockchip,rk3066-i2s": for rk3188 11 - "rockchip,rk3188-i2s", "rockchip,rk3066-i2s": for rk3188
12 - "rockchip,rk3228-i2s", "rockchip,rk3066-i2s": for rk3228
11 - "rockchip,rk3288-i2s", "rockchip,rk3066-i2s": for rk3288 13 - "rockchip,rk3288-i2s", "rockchip,rk3066-i2s": for rk3288
14 - "rockchip,rk3328-i2s", "rockchip,rk3066-i2s": for rk3328
15 - "rockchip,rk3366-i2s", "rockchip,rk3066-i2s": for rk3366
12 - "rockchip,rk3368-i2s", "rockchip,rk3066-i2s": for rk3368 16 - "rockchip,rk3368-i2s", "rockchip,rk3066-i2s": for rk3368
13 - "rockchip,rk3399-i2s", "rockchip,rk3066-i2s": for rk3399 17 - "rockchip,rk3399-i2s", "rockchip,rk3066-i2s": for rk3399
14- reg: physical base address of the controller and length of memory mapped 18- reg: physical base address of the controller and length of memory mapped
diff --git a/Documentation/devicetree/bindings/sound/rt274.txt b/Documentation/devicetree/bindings/sound/rt274.txt
new file mode 100644
index 000000000000..e9a6178c78cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/rt274.txt
@@ -0,0 +1,33 @@
1RT274 audio CODEC
2
3This device supports I2C only.
4
5Required properties:
6
7- compatible : "realtek,rt274".
8
9- reg : The I2C address of the device.
10
11Optional properties:
12
13- interrupts : The CODEC's interrupt output.
14
15
16Pins on the device (for linking into audio routes) for RT274:
17
18 * DMIC1 Pin
19 * DMIC2 Pin
20 * MIC
21 * LINE1
22 * LINE2
23 * HPO Pin
24 * SPDIF
25 * LINE3
26
27Example:
28
29codec: rt274@1c {
30 compatible = "realtek,rt274";
31 reg = <0x1c>;
32 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
33};
diff --git a/Documentation/devicetree/bindings/sound/rt5663.txt b/Documentation/devicetree/bindings/sound/rt5663.txt
index 70eaeaed2b18..ff381718c517 100644
--- a/Documentation/devicetree/bindings/sound/rt5663.txt
+++ b/Documentation/devicetree/bindings/sound/rt5663.txt
@@ -12,6 +12,14 @@ Required properties:
12 12
13Optional properties: 13Optional properties:
14 14
15- "realtek,dc_offset_l_manual"
16- "realtek,dc_offset_r_manual"
17- "realtek,dc_offset_l_manual_mic"
18- "realtek,dc_offset_r_manual_mic"
19 Based on the different PCB layout, add the manual offset value to
20 compensate the DC offset for each L and R channel, and they are different
21 between headphone and headset.
22
15Pins on the device (for linking into audio routes) for RT5663: 23Pins on the device (for linking into audio routes) for RT5663:
16 24
17 * IN1P 25 * IN1P
diff --git a/Documentation/devicetree/bindings/sound/samsung,odroid.txt b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
index c30934dd975b..625b1b18fd02 100644
--- a/Documentation/devicetree/bindings/sound/samsung,odroid.txt
+++ b/Documentation/devicetree/bindings/sound/samsung,odroid.txt
@@ -7,9 +7,6 @@ Required properties:
7 - model - the user-visible name of this sound complex 7 - model - the user-visible name of this sound complex
8 - clocks - should contain entries matching clock names in the clock-names 8 - clocks - should contain entries matching clock names in the clock-names
9 property 9 property
10 - clock-names - should contain following entries:
11 - "epll" - indicating the EPLL output clock
12 - "i2s_rclk" - indicating the RCLK (root) clock of the I2S0 controller
13 - samsung,audio-widgets - this property specifies off-codec audio elements 10 - samsung,audio-widgets - this property specifies off-codec audio elements
14 like headphones or speakers, for details see widgets.txt 11 like headphones or speakers, for details see widgets.txt
15 - samsung,audio-routing - a list of the connections between audio 12 - samsung,audio-routing - a list of the connections between audio
@@ -46,9 +43,6 @@ sound {
46 "IN1", "Mic Jack", 43 "IN1", "Mic Jack",
47 "Mic Jack", "MICBIAS"; 44 "Mic Jack", "MICBIAS";
48 45
49 clocks = <&clock CLK_FOUT_EPLL>, <&i2s0 CLK_I2S_RCLK_SRC>;
50 clock-names = "epll", "sclk_i2s";
51
52 cpu { 46 cpu {
53 sound-dai = <&i2s0 0>; 47 sound-dai = <&i2s0 0>;
54 }; 48 };
diff --git a/Documentation/fb/efifb.txt b/Documentation/fb/efifb.txt
index a59916c29b33..1a85c1bdaf38 100644
--- a/Documentation/fb/efifb.txt
+++ b/Documentation/fb/efifb.txt
@@ -27,5 +27,11 @@ You have to add the following kernel parameters in your elilo.conf:
27 Macbook Pro 17", iMac 20" : 27 Macbook Pro 17", iMac 20" :
28 video=efifb:i20 28 video=efifb:i20
29 29
30Accepted options:
31
32nowc Don't map the framebuffer write combined. This can be used
33 to workaround side-effects and slowdowns on other CPU cores
34 when large amounts of console data are written.
35
30-- 36--
31Edgar Hucek <gimli@dark-green.com> 37Edgar Hucek <gimli@dark-green.com>
diff --git a/Documentation/gpio/gpio-legacy.txt b/Documentation/gpio/gpio-legacy.txt
index b34fd94f7089..5eacc147ea87 100644
--- a/Documentation/gpio/gpio-legacy.txt
+++ b/Documentation/gpio/gpio-legacy.txt
@@ -459,7 +459,7 @@ pin controller?
459 459
460This is done by registering "ranges" of pins, which are essentially 460This is done by registering "ranges" of pins, which are essentially
461cross-reference tables. These are described in 461cross-reference tables. These are described in
462Documentation/pinctrl.txt 462Documentation/driver-api/pinctl.rst
463 463
464While the pin allocation is totally managed by the pinctrl subsystem, 464While the pin allocation is totally managed by the pinctrl subsystem,
465gpio (under gpiolib) is still maintained by gpio drivers. It may happen 465gpio (under gpiolib) is still maintained by gpio drivers. It may happen
diff --git a/Documentation/media/kapi/dtv-core.rst b/Documentation/media/kapi/dtv-core.rst
index ff86bf0abeae..de9a228aca8a 100644
--- a/Documentation/media/kapi/dtv-core.rst
+++ b/Documentation/media/kapi/dtv-core.rst
@@ -1,6 +1,31 @@
1Digital TV (DVB) devices 1Digital TV (DVB) devices
2------------------------ 2------------------------
3 3
4Digital TV devices are implemented by several different drivers:
5
6- A bridge driver that is responsible to talk with the bus where the other
7 devices are connected (PCI, USB, SPI), bind to the other drivers and
8 implement the digital demux logic (either in software or in hardware);
9
10- Frontend drivers that are usually implemented as two separate drivers:
11
12 - A tuner driver that implements the logic with commands the part of the
13 hardware with is reponsible to tune into a digital TV transponder or
14 physical channel. The output of a tuner is usually a baseband or
15 Intermediate Frequency (IF) signal;
16
17 - A demodulator driver (a.k.a "demod") that implements the logic with
18 commands the digital TV decoding hardware. The output of a demod is
19 a digital stream, with multiple audio, video and data channels typically
20 multiplexed using MPEG Transport Stream [#f1]_.
21
22On most hardware, the frontend drivers talk with the bridge driver using an
23I2C bus.
24
25.. [#f1] Some standards use TCP/IP for multiplexing data, like DVB-H (an
26 abandoned standard, not used anymore) and ATSC version 3.0 current
27 proposals. Currently, the DVB subsystem doesn't implement those standards.
28
4Digital TV Common functions 29Digital TV Common functions
5--------------------------- 30---------------------------
6 31
@@ -55,8 +80,141 @@ Digital TV Frontend
55The Digital TV Frontend kABI defines a driver-internal interface for 80The Digital TV Frontend kABI defines a driver-internal interface for
56registering low-level, hardware specific driver to a hardware independent 81registering low-level, hardware specific driver to a hardware independent
57frontend layer. It is only of interest for Digital TV device driver writers. 82frontend layer. It is only of interest for Digital TV device driver writers.
58The header file for this API is named dvb_frontend.h and located in 83The header file for this API is named ``dvb_frontend.h`` and located in
59drivers/media/dvb-core. 84``drivers/media/dvb-core``.
85
86Demodulator driver
87^^^^^^^^^^^^^^^^^^
88
89The demodulator driver is responsible to talk with the decoding part of the
90hardware. Such driver should implement :c:type:`dvb_frontend_ops`, with
91tells what type of digital TV standards are supported, and points to a
92series of functions that allow the DVB core to command the hardware via
93the code under ``drivers/media/dvb-core/dvb_frontend.c``.
94
95A typical example of such struct in a driver ``foo`` is::
96
97 static struct dvb_frontend_ops foo_ops = {
98 .delsys = { SYS_DVBT, SYS_DVBT2, SYS_DVBC_ANNEX_A },
99 .info = {
100 .name = "foo DVB-T/T2/C driver",
101 .caps = FE_CAN_FEC_1_2 |
102 FE_CAN_FEC_2_3 |
103 FE_CAN_FEC_3_4 |
104 FE_CAN_FEC_5_6 |
105 FE_CAN_FEC_7_8 |
106 FE_CAN_FEC_AUTO |
107 FE_CAN_QPSK |
108 FE_CAN_QAM_16 |
109 FE_CAN_QAM_32 |
110 FE_CAN_QAM_64 |
111 FE_CAN_QAM_128 |
112 FE_CAN_QAM_256 |
113 FE_CAN_QAM_AUTO |
114 FE_CAN_TRANSMISSION_MODE_AUTO |
115 FE_CAN_GUARD_INTERVAL_AUTO |
116 FE_CAN_HIERARCHY_AUTO |
117 FE_CAN_MUTE_TS |
118 FE_CAN_2G_MODULATION,
119 .frequency_min = 42000000, /* Hz */
120 .frequency_max = 1002000000, /* Hz */
121 .symbol_rate_min = 870000,
122 .symbol_rate_max = 11700000
123 },
124 .init = foo_init,
125 .sleep = foo_sleep,
126 .release = foo_release,
127 .set_frontend = foo_set_frontend,
128 .get_frontend = foo_get_frontend,
129 .read_status = foo_get_status_and_stats,
130 .tune = foo_tune,
131 .i2c_gate_ctrl = foo_i2c_gate_ctrl,
132 .get_frontend_algo = foo_get_algo,
133 };
134
135A typical example of such struct in a driver ``bar`` meant to be used on
136Satellite TV reception is::
137
138 static const struct dvb_frontend_ops bar_ops = {
139 .delsys = { SYS_DVBS, SYS_DVBS2 },
140 .info = {
141 .name = "Bar DVB-S/S2 demodulator",
142 .frequency_min = 500000, /* KHz */
143 .frequency_max = 2500000, /* KHz */
144 .frequency_stepsize = 0,
145 .symbol_rate_min = 1000000,
146 .symbol_rate_max = 45000000,
147 .symbol_rate_tolerance = 500,
148 .caps = FE_CAN_INVERSION_AUTO |
149 FE_CAN_FEC_AUTO |
150 FE_CAN_QPSK,
151 },
152 .init = bar_init,
153 .sleep = bar_sleep,
154 .release = bar_release,
155 .set_frontend = bar_set_frontend,
156 .get_frontend = bar_get_frontend,
157 .read_status = bar_get_status_and_stats,
158 .i2c_gate_ctrl = bar_i2c_gate_ctrl,
159 .get_frontend_algo = bar_get_algo,
160 .tune = bar_tune,
161
162 /* Satellite-specific */
163 .diseqc_send_master_cmd = bar_send_diseqc_msg,
164 .diseqc_send_burst = bar_send_burst,
165 .set_tone = bar_set_tone,
166 .set_voltage = bar_set_voltage,
167 };
168
169.. note::
170
171 #) For satellite digital TV standards (DVB-S, DVB-S2, ISDB-S), the
172 frequencies are specified in kHz, while, for terrestrial and cable
173 standards, they're specified in Hz. Due to that, if the same frontend
174 supports both types, you'll need to have two separate
175 :c:type:`dvb_frontend_ops` structures, one for each standard.
176 #) The ``.i2c_gate_ctrl`` field is present only when the hardware has
177 allows controlling an I2C gate (either directly of via some GPIO pin),
178 in order to remove the tuner from the I2C bus after a channel is
179 tuned.
180 #) All new drivers should implement the
181 :ref:`DVBv5 statistics <dvbv5_stats>` via ``.read_status``.
182 Yet, there are a number of callbacks meant to get statistics for
183 signal strength, S/N and UCB. Those are there to provide backward
184 compatibility with legacy applications that don't support the DVBv5
185 API. Implementing those callbacks are optional. Those callbacks may be
186 removed in the future, after we have all existing drivers supporting
187 DVBv5 stats.
188 #) Other callbacks are required for satellite TV standards, in order to
189 control LNBf and DiSEqC: ``.diseqc_send_master_cmd``,
190 ``.diseqc_send_burst``, ``.set_tone``, ``.set_voltage``.
191
192.. |delta| unicode:: U+00394
193
194The ``drivers/media/dvb-core/dvb_frontend.c`` has a kernel thread with is
195responsible for tuning the device. It supports multiple algoritms to
196detect a channel, as defined at enum :c:func:`dvbfe_algo`.
197
198The algorithm to be used is obtained via ``.get_frontend_algo``. If the driver
199doesn't fill its field at struct :c:type:`dvb_frontend_ops`, it will default to
200``DVBFE_ALGO_SW``, meaning that the dvb-core will do a zigzag when tuning,
201e. g. it will try first to use the specified center frequency ``f``,
202then, it will do ``f`` + |delta|, ``f`` - |delta|, ``f`` + 2 x |delta|,
203``f`` - 2 x |delta| and so on.
204
205If the hardware has internally a some sort of zigzag algorithm, you should
206define a ``.get_frontend_algo`` function that would return ``DVBFE_ALGO_HW``.
207
208.. note::
209
210 The core frontend support also supports
211 a third type (``DVBFE_ALGO_CUSTOM``), in order to allow the driver to
212 define its own hardware-assisted algorithm. Very few hardware need to
213 use it nowadays. Using ``DVBFE_ALGO_CUSTOM`` require to provide other
214 function callbacks at struct :c:type:`dvb_frontend_ops`.
215
216Attaching frontend driver to the bridge driver
217^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60 218
61Before using the Digital TV frontend core, the bridge driver should attach 219Before using the Digital TV frontend core, the bridge driver should attach
62the frontend demod, tuner and SEC devices and call 220the frontend demod, tuner and SEC devices and call
@@ -74,6 +232,287 @@ part of their handler for :c:type:`device_driver`.\ ``resume()``.
74 232
75A few other optional functions are provided to handle some special cases. 233A few other optional functions are provided to handle some special cases.
76 234
235.. _dvbv5_stats:
236
237Digital TV Frontend statistics
238~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239
240Introduction
241^^^^^^^^^^^^
242
243Digital TV frontends provide a range of
244:ref:`statistics <frontend-stat-properties>` meant to help tuning the device
245and measuring the quality of service.
246
247For each statistics measurement, the driver should set the type of scale used,
248or ``FE_SCALE_NOT_AVAILABLE`` if the statistics is not available on a given
249time. Drivers should also provide the number of statistics for each type.
250that's usually 1 for most video standards [#f2]_.
251
252Drivers should initialize each statistic counters with length and
253scale at its init code. For example, if the frontend provides signal
254strength, it should have, on its init code::
255
256 struct dtv_frontend_properties *c = &state->fe.dtv_property_cache;
257
258 c->strength.len = 1;
259 c->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
260
261And, when the statistics got updated, set the scale::
262
263 c->strength.stat[0].scale = FE_SCALE_DECIBEL;
264 c->strength.stat[0].uvalue = strength;
265
266.. [#f2] For ISDB-T, it may provide both a global statistics and a per-layer
267 set of statistics. On such cases, len should be equal to 4. The first
268 value corresponds to the global stat; the other ones to each layer, e. g.:
269
270 - c->cnr.stat[0] for global S/N carrier ratio,
271 - c->cnr.stat[1] for Layer A S/N carrier ratio,
272 - c->cnr.stat[2] for layer B S/N carrier ratio,
273 - c->cnr.stat[3] for layer C S/N carrier ratio.
274
275.. note:: Please prefer to use ``FE_SCALE_DECIBEL`` instead of
276 ``FE_SCALE_RELATIVE`` for signal strength and CNR measurements.
277
278Groups of statistics
279^^^^^^^^^^^^^^^^^^^^
280
281There are several groups of statistics currently supported:
282
283Signal strength (:ref:`DTV-STAT-SIGNAL-STRENGTH`)
284 - Measures the signal strength level at the analog part of the tuner or
285 demod.
286
287 - Typically obtained from the gain applied to the tuner and/or frontend
288 in order to detect the carrier. When no carrier is detected, the gain is
289 at the maximum value (so, strength is on its minimal).
290
291 - As the gain is visible through the set of registers that adjust the gain,
292 typically, this statistics is always available [#f3]_.
293
294 - Drivers should try to make it available all the times, as this statistics
295 can be used when adjusting an antenna position and to check for troubles
296 at the cabling.
297
298 .. [#f3] On a few devices, the gain keeps floating if no carrier.
299 On such devices, strength report should check first if carrier is
300 detected at the tuner (``FE_HAS_CARRIER``, see :c:type:`fe_status`),
301 and otherwise return the lowest possible value.
302
303Carrier Signal to Noise ratio (:ref:`DTV-STAT-CNR`)
304 - Signal to Noise ratio for the main carrier.
305
306 - Signal to Noise measurement depends on the device. On some hardware, is
307 available when the main carrier is detected. On those hardware, CNR
308 measurement usually comes from the tuner (e. g. after ``FE_HAS_CARRIER``,
309 see :c:type:`fe_status`).
310
311 On other devices, it requires inner FEC decoding,
312 as the frontend measures it indirectly from other parameters (e. g. after
313 ``FE_HAS_VITERBI``, see :c:type:`fe_status`).
314
315 Having it available after inner FEC is more common.
316
317Bit counts post-FEC (:ref:`DTV-STAT-POST-ERROR-BIT-COUNT` and :ref:`DTV-STAT-POST-TOTAL-BIT-COUNT`)
318 - Those counters measure the number of bits and bit errors errors after
319 the forward error correction (FEC) on the inner coding block
320 (after Viterbi, LDPC or other inner code).
321
322 - Due to its nature, those statistics depend on full coding lock
323 (e. g. after ``FE_HAS_SYNC`` or after ``FE_HAS_LOCK``,
324 see :c:type:`fe_status`).
325
326Bit counts pre-FEC (:ref:`DTV-STAT-PRE-ERROR-BIT-COUNT` and :ref:`DTV-STAT-PRE-TOTAL-BIT-COUNT`)
327 - Those counters measure the number of bits and bit errors errors before
328 the forward error correction (FEC) on the inner coding block
329 (before Viterbi, LDPC or other inner code).
330
331 - Not all frontends provide this kind of statistics.
332
333 - Due to its nature, those statistics depend on inner coding lock (e. g.
334 after ``FE_HAS_VITERBI``, see :c:type:`fe_status`).
335
336Block counts (:ref:`DTV-STAT-ERROR-BLOCK-COUNT` and :ref:`DTV-STAT-TOTAL-BLOCK-COUNT`)
337 - Those counters measure the number of blocks and block errors errors after
338 the forward error correction (FEC) on the inner coding block
339 (before Viterbi, LDPC or other inner code).
340
341 - Due to its nature, those statistics depend on full coding lock
342 (e. g. after ``FE_HAS_SYNC`` or after
343 ``FE_HAS_LOCK``, see :c:type:`fe_status`).
344
345.. note:: All counters should be monotonically increased as they're
346 collected from the hardware.
347
348A typical example of the logic that handle status and statistics is::
349
350 static int foo_get_status_and_stats(struct dvb_frontend *fe)
351 {
352 struct foo_state *state = fe->demodulator_priv;
353 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
354
355 int rc;
356 enum fe_status *status;
357
358 /* Both status and strength are always available */
359 rc = foo_read_status(fe, &status);
360 if (rc < 0)
361 return rc;
362
363 rc = foo_read_strength(fe);
364 if (rc < 0)
365 return rc;
366
367 /* Check if CNR is available */
368 if (!(fe->status & FE_HAS_CARRIER))
369 return 0;
370
371 rc = foo_read_cnr(fe);
372 if (rc < 0)
373 return rc;
374
375 /* Check if pre-BER stats are available */
376 if (!(fe->status & FE_HAS_VITERBI))
377 return 0;
378
379 rc = foo_get_pre_ber(fe);
380 if (rc < 0)
381 return rc;
382
383 /* Check if post-BER stats are available */
384 if (!(fe->status & FE_HAS_SYNC))
385 return 0;
386
387 rc = foo_get_post_ber(fe);
388 if (rc < 0)
389 return rc;
390 }
391
392 static const struct dvb_frontend_ops ops = {
393 /* ... */
394 .read_status = foo_get_status_and_stats,
395 };
396
397Statistics collect
398^^^^^^^^^^^^^^^^^^
399
400On almost all frontend hardware, the bit and byte counts are stored by
401the hardware after a certain amount of time or after the total bit/block
402counter reaches a certain value (usually programable), for example, on
403every 1000 ms or after receiving 1,000,000 bits.
404
405So, if you read the registers too soon, you'll end by reading the same
406value as in the previous reading, causing the monotonic value to be
407incremented too often.
408
409Drivers should take the responsibility to avoid too often reads. That
410can be done using two approaches:
411
412if the driver have a bit that indicates when a collected data is ready
413%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
414
415Driver should check such bit before making the statistics available.
416
417An example of such behavior can be found at this code snippet (adapted
418from mb86a20s driver's logic)::
419
420 static int foo_get_pre_ber(struct dvb_frontend *fe)
421 {
422 struct foo_state *state = fe->demodulator_priv;
423 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
424 int rc, bit_error;
425
426 /* Check if the BER measures are already available */
427 rc = foo_read_u8(state, 0x54);
428 if (rc < 0)
429 return rc;
430
431 if (!rc)
432 return 0;
433
434 /* Read Bit Error Count */
435 bit_error = foo_read_u32(state, 0x55);
436 if (bit_error < 0)
437 return bit_error;
438
439 /* Read Total Bit Count */
440 rc = foo_read_u32(state, 0x51);
441 if (rc < 0)
442 return rc;
443
444 c->pre_bit_error.stat[0].scale = FE_SCALE_COUNTER;
445 c->pre_bit_error.stat[0].uvalue += bit_error;
446 c->pre_bit_count.stat[0].scale = FE_SCALE_COUNTER;
447 c->pre_bit_count.stat[0].uvalue += rc;
448
449 return 0;
450 }
451
452If the driver doesn't provide a statistics available check bit
453%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
454
455A few devices, however, may not provide a way to check if the stats are
456available (or the way to check it is unknown). They may not even provide
457a way to directly read the total number of bits or blocks.
458
459On those devices, the driver need to ensure that it won't be reading from
460the register too often and/or estimate the total number of bits/blocks.
461
462On such drivers, a typical routine to get statistics would be like
463(adapted from dib8000 driver's logic)::
464
465 struct foo_state {
466 /* ... */
467
468 unsigned long per_jiffies_stats;
469 }
470
471 static int foo_get_pre_ber(struct dvb_frontend *fe)
472 {
473 struct foo_state *state = fe->demodulator_priv;
474 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
475 int rc, bit_error;
476 u64 bits;
477
478 /* Check if time for stats was elapsed */
479 if (!time_after(jiffies, state->per_jiffies_stats))
480 return 0;
481
482 /* Next stat should be collected in 1000 ms */
483 state->per_jiffies_stats = jiffies + msecs_to_jiffies(1000);
484
485 /* Read Bit Error Count */
486 bit_error = foo_read_u32(state, 0x55);
487 if (bit_error < 0)
488 return bit_error;
489
490 /*
491 * On this particular frontend, there's no register that
492 * would provide the number of bits per 1000ms sample. So,
493 * some function would calculate it based on DTV properties
494 */
495 bits = get_number_of_bits_per_1000ms(fe);
496
497 c->pre_bit_error.stat[0].scale = FE_SCALE_COUNTER;
498 c->pre_bit_error.stat[0].uvalue += bit_error;
499 c->pre_bit_count.stat[0].scale = FE_SCALE_COUNTER;
500 c->pre_bit_count.stat[0].uvalue += bits;
501
502 return 0;
503 }
504
505Please notice that, on both cases, we're getting the statistics using the
506:c:type:`dvb_frontend_ops` ``.read_status`` callback. The rationale is that
507the frontend core will automatically call this function periodically
508(usually, 3 times per second, when the frontend is locked).
509
510That warrants that we won't miss to collect a counter and increment the
511monotonic stats at the right time.
512
513Digital TV Frontend functions and types
514~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
515
77.. kernel-doc:: drivers/media/dvb-core/dvb_frontend.h 516.. kernel-doc:: drivers/media/dvb-core/dvb_frontend.h
78 517
79 518
diff --git a/Documentation/media/typical_media_device.svg b/Documentation/media/typical_media_device.svg
index 0c8abd69f39a..d6fad90ec199 100644
--- a/Documentation/media/typical_media_device.svg
+++ b/Documentation/media/typical_media_device.svg
@@ -1,2948 +1,106 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<svg 2<svg id="svg2" width="235mm" height="179mm" clip-path="url(#a)" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" preserveAspectRatio="xMidYMid" version="1.2" viewBox="0 0 22648.239 17899.829" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata id="metadata1533"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs id="defs4"><clipPath id="a"><rect id="rect7" width="28000" height="21000"/></clipPath></defs><path id="path11" d="m10146 2636c-518.06 0-1035.1 515-1035.1 1031v4124c0 516 517.06 1032 1035.1 1032h8572.2c518.06 0 1036.1-516 1036.1-1032v-4124c0-516-518.06-1031-1036.1-1031h-8572.2z"
3 xmlns:dc="http://purl.org/dc/elements/1.1/" 3fill="#fcf" style=""/><path id="path15" d="m1505.5 13443c-293 0-585 292-585 585v2340c0 293 292 586 585 586h3275c293 0 586-293 586-586v-2340c0-293-293-585-586-585h-3275z" fill="#ffc" style=""/><path id="path19" d="m517.15 22.013c-461 0-922 461-922 922v11169c0 461 461 923 922 923h3692c461 0 922-462 922-923v-11169c0-461-461-922-922-922h-3692z" fill="#e6e6e6" style=""/><path id="path23" d="m2371.5 6438h-2260v-1086h4520v1086h-2260z" fill="#ff8080" style=""/><path id="path25" d="m2371.5 6438h-2260v-1086h4520v1086h-2260z" fill="none" stroke="#3465af" style=""/><text id="text27" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan29" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan31" class="TextPosition" x="489.5459" y="6111.0132" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan33"
4 xmlns:cc="http://creativecommons.org/ns#" 4fill="#000000" font-family="Serif, serif" font-size="493.88px">Audio decoder</tspan></tspan></tspan></text>
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 5<path id="path37" d="m2371.5 9608h-2260v-1270h4520v1270h-2260z" fill="#ff8080" style=""/><path id="path39" d="m2371.5 9608h-2260v-1270h4520v1270h-2260z" fill="none" stroke="#3465af" style=""/><text id="text41" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan43" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan45" class="TextPosition" x="527.5459" y="9189.0127" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan47" fill="#000000" font-family="Serif, serif" font-size="493.88px">Video decoder</tspan></tspan></tspan></text>
6 xmlns:svg="http://www.w3.org/2000/svg" 6<path id="path51" d="m2363.5 8053h-2269v-1224h4537v1224h-2268z" fill="#ff8080" style=""/><path id="path53" d="m2363.5 8053h-2269v-1224h4537v1224h-2268z" fill="none" stroke="#3465af" style=""/><text id="text55" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan57" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan59" class="TextPosition" x="481.5459" y="7657.0132" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan61" fill="#000000" font-family="Serif, serif" font-size="493.88px">Audio encoder</tspan></tspan></tspan></text>
7 xmlns="http://www.w3.org/2000/svg" 7<path id="path65" d="m13622 10386h-3810v-1281h7620v1281h-3810z" fill="#cfc" style=""/><path id="path67" d="m13622 10386h-3810v-1281h7620v1281h-3810z" fill="none" stroke="#3465af" style=""/><text id="text69" class="TextShape" x="-2089.4541" y="-2446.187" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan71" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan73" class="TextPosition" x="10287.546" y="9960.8135" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan75" fill="#000000" font-family="Serif, serif" font-size="493.88px">Button Key/IR input logic</tspan></tspan></tspan></text>
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" 8<path id="path79" d="m12080 12182h-2268v-1412h4536v1412h-2268z" fill="#cfe7f5" style=""/><path id="path81" d="m12080 12182h-2268v-1412h4536v1412h-2268z" fill="none" stroke="#3465af" style=""/><text id="text83" class="TextShape" x="-2089.4541" y="-2389.7871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan85" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan87" class="TextPosition" x="10792.546" y="11692.213" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan89" fill="#000000" font-family="Serif, serif" font-size="493.88px">EEPROM</tspan></tspan></tspan></text>
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" 9<path id="path93" d="m3050.5 15498h-1563v-1715h3126v1715h-1563z" fill="#fc9" style=""/><path id="path95" d="m3050.5 15498h-1563v-1715h3126v1715h-1563z" fill="none" stroke="#3465af" style=""/><text id="text97" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan99" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan101" class="TextPosition" x="2186.5459" y="14856.013" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan103" fill="#000000" font-family="Serif, serif" font-size="493.88px">Sensor</tspan></tspan></tspan></text>
10 clip-path="url(#a)" 10<path id="path107" d="m4629.5 5866 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z" fill="#729fcf" style=""/><path id="path109" d="m4629.5 5866 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z" fill="none" stroke="#3465af" style=""/><path id="path113" d="m4629.5 7448 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z" fill="#729fcf" style=""/><path id="path115" d="m4629.5 7448 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z" fill="none" stroke="#3465af" style=""/><path id="path119" d="m4631.5 8936 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="#729fcf" style=""/><path id="path121" d="m4631.5 8936 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="none" stroke="#3465af" style=""/><path id="path125" d="m7872.5 11464 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z"
11 xml:space="preserve" 11fill="#729fcf" style=""/><path id="path127" d="m7872.5 11464 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="none" stroke="#3465af" style=""/><path id="path131" d="m7872.5 9716.8 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="#729fcf" style=""/><path id="path133" d="m7872.5 9716.8 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="none" stroke="#3465af" style=""/><path id="path137" d="m7872.5 14994 670-353v176h2028v-176l671 353-671 354v-177h-2028v177l-670-354z" fill="#729fcf" style=""/><path id="path139" d="m7872.5 14994 670-353v176h2028v-176l671 353-671 354v-177h-2028v177l-670-354z" fill="none" stroke="#3465af" style=""/><path id="path143" d="m17534 14105 978.49 840.89-978.49 840.89v-420.86h-2960.5v420.86l-979.49-840.89 979.49-840.89v420.03h2960.5v-420.03z" fill="#729fcf" style=""/><path id="path145" d="m17534 14105 978.49
12 height="179mm" 12840.89-978.49 840.89v-420.86h-2960.5v420.86l-979.49-840.89 979.49-840.89v420.03h2960.5v-420.03z" fill="none" stroke="#3465af" stroke-width="25.77" style=""/><text id="text149" class="TextShape" x="-9922.1533" y="-644.58704" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan151" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan153" class="TextPosition" transform="matrix(0,-1,1,0,8509,40173)" x="14418.847" y="15187.413" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan155" fill="#000000" font-family="Serif, serif" font-size="493.88px">System Bus</tspan></tspan></tspan></text>
13 viewBox="0 0 22648.239 17899.829" 13<path id="path159" d="m11062 7098h-1250v-875h2499v875h-1249z" fill="#cff" style=""/><path id="path161" d="m11062 7098h-1250v-875h2499v875h-1249z" fill="none" stroke="#3465af" style=""/><text id="text163" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan165" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan167" class="TextPosition" x="10125.546" y="6876.0132" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan169" fill="#000000" font-family="Serif, serif" font-size="493.88px">Demux</tspan></tspan></tspan></text>
14 width="235mm" 14<path id="path173" d="m7906.5 6601 373-357v178h1130v-178l374 357-374 358v-179h-1130v179l-373-358z" fill="#729fcf" style=""/><path id="path175" d="m7906.5 6601 373-357v178h1130v-178l374 357-374 358v-179h-1130v179l-373-358z" fill="none" stroke="#3465af" style=""/><path id="path179" d="m7906.5 5214 373-358v179h1130v-179l374 358-374 358v-179h-1130v179l-373-358z" fill="#729fcf" style=""/><path id="path181" d="m7906.5 5214 373-358v179h1130v-179l374 358-374 358v-179h-1130v179l-373-358z" fill="none" stroke="#3465af" style=""/><path id="path185" d="m14233 5828h-4421v-1270h8841v1270h-4420z" fill="#cff" style=""/><path id="path187" d="m14233 5828h-4421v-1270h8841v1270h-4420z" fill="none" stroke="#3465af" style=""/><text id="text189" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan191" class="TextParagraph" font-family="Serif, serif"
15 version="1.2" 15font-size="493.88px"><tspan id="tspan193" class="TextPosition" x="10696.546" y="5409.0132" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan195" fill="#000000" font-family="Serif, serif" font-size="493.88px">Conditional Access Module</tspan></tspan></tspan></text>
16 preserveAspectRatio="xMidYMid" 16<path id="path199" d="m2355.5 11123h-2269v-1224h4537v1224h-2268z" fill="#ff8080" style=""/><path id="path201" d="m2355.5 11123h-2269v-1224h4537v1224h-2268z" fill="none" stroke="#3465af" style=""/><text id="text203" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan205" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan207" class="TextPosition" x="511.5459" y="10727.013" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan209" fill="#000000" font-family="Serif, serif" font-size="493.88px">Video encoder</tspan></tspan></tspan></text>
17 id="svg2" 17<path id="path213" d="m4631.5 10470 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="#729fcf" style=""/><path id="path215" d="m4631.5 10470 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="none" stroke="#3465af" style=""/><path id="path219" d="m18702 5381 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="#729fcf" style=""/><path id="path221" d="m18702 5381 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="none" stroke="#3465af" style=""/><text id="text225" class="TextShape" x="-1976.5541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan227" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan229" class="TextPosition" x="13.4459" y="12314.013" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan231" fill="#000000"
18 inkscape:version="0.91 r13725" 18font-family="Serif, serif" font-size="493.88px">Radio / Analog TV</tspan></tspan></tspan></text>
19 sodipodi:docname="typical_media_device.svg" 19<text id="text235" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan237" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan239" class="TextPosition" x="12866.546" y="8560.0127" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan241" fill="#000000" font-family="Serif, serif" font-size="493.88px">Digital TV</tspan></tspan></tspan></text>
20 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata 20<text id="text245" class="TextShape" x="-8919.0537" y="-1373.787" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan247" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan249" class="TextPosition" x="5804.9458" y="17793.213" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan251" fill="#000000" font-family="Serif, serif" font-size="493.88px">PS.: picture is not complete: other blocks may be present</tspan></tspan></tspan></text>
21 id="metadata1533"><rdf:RDF><cc:Work 21<text id="text255" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan257" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan259" class="TextPosition" x="2109.5459" y="16397.014" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan261" fill="#000000" font-family="Serif, serif" font-size="493.88px">Webcam</tspan></tspan></tspan></text>
22 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 22<path id="path265" d="m12463 13926h-2650v-1412h5299v1412h-2649z" fill="#f90" style=""/><path id="path267" d="m12463 13926h-2650v-1412h5299v1412h-2649z" fill="none" stroke="#3465af" style=""/><text id="text269" class="TextShape" x="-2089.4541" y="-2446.187" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan271" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan273" class="TextPosition" x="10175.546" y="13435.813" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan275" fill="#000000" font-family="Serif, serif" font-size="493.88px">Processing blocks</tspan></tspan></tspan></text>
23 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview 23<path id="path279" d="m7872.5 13208 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="#729fcf" style=""/><path id="path281" d="m7872.5 13208 385-353v176h1166v-176l386 353-386 354v-177h-1166v177l-385-354z" fill="none" stroke="#3465af" style=""/><path id="path285" d="m4612.5 14790 397-353v176h1201v-176l398 353-398 354v-177h-1201v177l-397-354z" fill="#729fcf" style=""/><path id="path287" d="m4612.5 14790 397-353v176h1201v-176l398 353-398 354v-177h-1201v177l-397-354z" fill="none" stroke="#3465af" style=""/><text id="text291" class="TextShape" x="-2428.0542" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan293" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan295" class="TextPosition" x="20421.945" y="6628.0132" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan297" fill="#000000"
24 pagecolor="#ffffff" 24font-family="Serif, serif" font-size="493.88px">Smartcard</tspan></tspan></tspan></text>
25 bordercolor="#666666" 25<path id="path301" d="m623.32 436.01c-334.6 0-669.2 333-669.2 666v2668c0 333 334.6 666 669.2 666h18456c334.6 0 670.2-333 670.2-666v-2668c0-333-335.6-666-670.2-666h-18456z" fill="#fcf" style=""/><path id="path305" d="m3031.5 2991h-1614v-1816h3227v1816h-1613z" fill="#ff8080" style=""/><path id="path307" d="m3031.5 2991h-1614v-1816h3227v1816h-1613z" fill="none" stroke="#3465af" style=""/><text id="text309" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan311" class="TextParagraph"><tspan id="tspan313" class="TextPosition" x="2284.5459" y="1947.0129" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan315" fill="#000000" font-family="Serif, serif" font-size="493.88px">Tuner</tspan></tspan></tspan><tspan id="tspan317" class="TextParagraph"><tspan id="tspan319" class="TextPosition" x="2061.5459" y="2650.0129"
26 borderopacity="1" 26font-family="Serif, serif" font-size="493.88px"><tspan id="tspan321" fill="#000000" font-family="Serif, serif" font-size="493.88px">FM/TV</tspan></tspan></tspan></text>
27 objecttolerance="10" 27<path id="path325" d="m812.55 1538c0 111 40 202 88 202h530c48 0 89-91 89-202 0-110-41-202-89-202h-530c-48 0-88 92-88 202z" fill="#ff8080" style=""/><path id="path327" d="m812.55 1538c0 111 40 202 88 202h530c48 0 89-91 89-202 0-110-41-202-89-202h-530c-48 0-88 92-88 202z" fill="none" stroke="#3465af" style=""/><path id="path329" d="m812.55 1538c0 111 40 202 88 202s88-91 88-202c0-110-40-202-88-202s-88 92-88 202z" fill="#ffb3b3" style=""/><path id="path331" d="m812.55 1538c0 111 40 202 88 202s88-91 88-202c0-110-40-202-88-202s-88 92-88 202z" fill="none" stroke="#3465af" style=""/><path id="path335" d="m813.55 2103c0 110 40 202 88 202h530c48 0 89-92 89-202s-41-203-89-203h-530c-48 0-88 93-88 203z" fill="#ff8080" style=""/><path id="path337" d="m813.55 2103c0 110 40 202 88 202h530c48 0 89-92 89-202s-41-203-89-203h-530c-48 0-88 93-88 203z" fill="none" stroke="#3465af" style=""/><path
28 gridtolerance="10" 28id="path339" d="m813.55 2103c0 110 40 202 88 202s88-92 88-202-40-203-88-203-88 93-88 203z" fill="#ffb3b3" style=""/><path id="path341" d="m813.55 2103c0 110 40 202 88 202s88-92 88-202-40-203-88-203-88 93-88 203z" fill="none" stroke="#3465af" style=""/><path id="path345" d="m4629.5 2032 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z" fill="#729fcf" style=""/><path id="path347" d="m4629.5 2032 385-353v176h1167v-176l386 353-386 354v-177h-1167v177l-385-354z" fill="none" stroke="#3465af" style=""/><path id="path351" d="m7889.5 1986 402-368v184h1217v-184l403 368-403 369v-185h-1217v185l-402-369z" fill="#729fcf" style=""/><path id="path353" d="m7889.5 1986 402-368v184h1217v-184l403 368-403 369v-185h-1217v185l-402-369z" fill="none" stroke="#3465af" style=""/><path id="path357" d="m14411 4025h-4500v-1389h9e3v1389h-4500z" fill="#cff" style=""/><path id="path359" d="m14411
29 guidetolerance="10" 294025h-4500v-1389h9e3v1389h-4500z" fill="none" stroke="#3465af" style=""/><text id="text361" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan363" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan365" class="TextPosition" x="9961.5459" y="3546.0129" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan367" fill="#000000" font-family="Serif, serif" font-size="493.88px">Satellite Equipment Control (SEC)</tspan></tspan></tspan></text>
30 inkscape:pageopacity="0" 30<path id="path371" d="m11311 2436h-1400v-1e3h2800v1e3h-1400z" fill="#cff" style=""/><path id="path373" d="m11311 2436h-1400v-1e3h2800v1e3h-1400z" fill="none" stroke="#3465af" style=""/><text id="text375" class="TextShape" x="-2089.4541" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan377" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan379" class="TextPosition" x="10375.546" y="2152.0129" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan381" fill="#000000" font-family="Serif, serif" font-size="493.88px">Demod</tspan></tspan></tspan></text>
31 inkscape:pageshadow="2" 31<path id="path385" d="m7889.5 3287 402-368v184h1217v-184l403 368-403 369v-185h-1217v185l-402-369z" fill="#729fcf" style=""/><path id="path387" d="m7889.5 3287 402-368v184h1217v-184l403 368-403 369v-185h-1217v185l-402-369z" fill="none" stroke="#3465af" style=""/><path id="path389" d="m7906.5 9121v7302h-1270v-14605h1270v7303z" fill="#ff9" style=""/><path id="path391" d="m7906.5 9121v7302h-1270v-14605h1270v7303z" fill="none" stroke="#3465af" style=""/><text id="text393" class="TextShape" transform="rotate(-90)" x="-20792.584" y="-6589.021" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan395" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan397" class="TextPosition" transform="matrix(0,-1,1,0,-4473,23627)" x="-11215.646" y="7460.9849" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan399" fill="#000000" font-family="Serif,
32 inkscape:window-width="1920" 32serif" font-size="493.88px">I2C Bus (control bus)</tspan></tspan></tspan></text>
33 inkscape:window-height="997" 33<text id="text403" class="TextShape" x="-2145.854" y="-2163.9871" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan405" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan407" class="TextPosition" x="7245.146" y="1114.0129" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan409" fill="#000000" font-family="Serif, serif" font-size="493.88px">Digital TV Frontend</tspan></tspan></tspan></text>
34 id="namedview1531" 34<path id="path415" d="m863.15 636.14c-18.27 0-35.525 0.99994-53.795 2.9998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path417" d="m776.87 644.14c-17.255 2.9998-35.525 6.9996-52.78 11.999" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path419" d="m692.63 666.14c-16.24 5.9996-33.495 11.999-49.735 19.999" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path421" d="m613.46 700.14c-15.225 7.9995-31.465 16.999-46.69 26.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path423" d="m539.36 745.14c-14.21 9.9994-28.42 20.999-42.63 31.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path425" d="m471.36 798.14c-13.195 11.999-26.39 23.999-38.57 36.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path427" d="m410.46 859.13c-11.165 12.999-22.33
35 showgrid="false" 3526.998-33.495 40.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path429" d="m357.68 927.13c-10.15 13.999-19.285 28.998-28.42 44.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path431" d="m314.03 1000.1c-8.12 15.999-15.225 31.998-22.33 48.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path433" d="m280.54 1079.1c-5.075 16.999-10.15 33.998-14.21 50.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path435" d="m260.24 1162.1c-3.045 17.999-5.075 34.998-6.09 52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path437" d="m254.15 1247.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path439" d="m254.15 1333.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path441" d="m254.15 1418.1v52.997"
36 fit-margin-top="0" 36fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path443" d="m254.15 1504.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path445" d="m254.15 1589.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path447" d="m254.15 1675.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path449" d="m254.15 1760.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path451" d="m254.15 1845.1v53.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path453" d="m254.15 1931.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path455" d="m254.15 2016.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path457" d="m254.15 2102.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432"
37 fit-margin-left="0" 37style=""/><path id="path459" d="m254.15 2187.1v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path461" d="m254.15 2273v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path463" d="m254.15 2358v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path465" d="m254.15 2443v53.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path467" d="m254.15 2529v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path469" d="m254.15 2614v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path471" d="m254.15 2700v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path473" d="m254.15 2785v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path475" d="m254.15 2871v52.997" fill="none"
38 fit-margin-right="0" 38stroke="#3465af" stroke-width="28.432" style=""/><path id="path477" d="m254.15 2956v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path479" d="m254.15 3041v53.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path481" d="m254.15 3127v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path483" d="m254.15 3212v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path485" d="m254.15 3298v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path487" d="m254.15 3383v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path489" d="m254.15 3469v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path491" d="m254.15 3554v52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path493"
39 fit-margin-bottom="0" 39d="m254.15 3639c0 17.999 1.015 35.998 3.045 52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path495" d="m262.27 3724c4.06 17.999 8.12 34.998 13.195 51.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path497" d="m285.61 3807c6.09 15.999 13.195 32.998 20.3 48.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path499" d="m321.14 3885c8.12 14.999 17.255 30.998 27.405 45.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path501" d="m366.81 3957.9c10.15 13.999 21.315 27.998 32.48 41.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path503" d="m420.61 4023.9c12.18 12.999 25.375 25.998 38.57 37.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path505" d="m483.54 4083.9c13.195 10.999 27.405 22.999 41.615 32.998" fill="none"
40 inkscape:zoom="1.2707744" 40stroke="#3465af" stroke-width="28.432" style=""/><path id="path507" d="m552.56 4135.9c14.21 9.9994 29.435 18.999 45.675 26.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path509" d="m627.67 4178.9c15.225 6.9996 32.48 14.999 48.72 20.999" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path511" d="m707.85 4210.9c17.255 4.9997 34.51 9.9994 51.765 13.999" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path513" d="m792.1 4230.9c17.255 1.9999 35.525 3.9998 53.795 4.9997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path515" d="m878.37 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path517" d="m964.65 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path519" d="m1051.9 4235.9h53.795" fill="none" stroke="#3465af"
41 inkscape:cx="410.32614" 41stroke-width="28.432" style=""/><path id="path521" d="m1138.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path523" d="m1225.5 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path525" d="m1311.8 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path527" d="m1398.1 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path529" d="m1485.3 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path531" d="m1571.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path533" d="m1658.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path535" d="m1745.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path537"
42 inkscape:cy="316.736" 42d="m1832.5 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path539" d="m1918.7 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path541" d="m2005 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path543" d="m2092.3 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path545" d="m2178.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path547" d="m2265.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path549" d="m2352.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path551" d="m2439.4 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path553" d="m2525.7 4235.9h53.795" fill="none" stroke="#3465af"
43 inkscape:window-x="1920" 43stroke-width="28.432" style=""/><path id="path555" d="m2612 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path557" d="m2699.3 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path559" d="m2785.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path561" d="m2872.8 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path563" d="m2959.1 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path565" d="m3046.4 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path567" d="m3132.7 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path569" d="m3220 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path571"
44 inkscape:window-y="30" 44d="m3306.3 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path573" d="m3392.5 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path575" d="m3479.8 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path577" d="m3566.1 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path579" d="m3653.4 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path581" d="m3739.7 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path583" d="m3826.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path585" d="m3913.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path587" d="m3999.5 4235.9h53.795" fill="none"
45 inkscape:window-maximized="1" 45stroke="#3465af" stroke-width="28.432" style=""/><path id="path589" d="m4086.8 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path591" d="m4173.1 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path593" d="m4260.4 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path595" d="m4346.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path597" d="m4433.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path599" d="m4520.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path601" d="m4606.5 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path603" d="m4693.8 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432"
46 inkscape:current-layer="svg2" /><defs 46style=""/><path id="path605" d="m4780 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path607" d="m4867.3 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path609" d="m4953.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path611" d="m5040.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path613" d="m5127.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path615" d="m5213.4 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path617" d="m5300.7 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path619" d="m5387 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path621" d="m5474.3 4235.9h53.795"
47 id="defs4"><clipPath 47fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path623" d="m5560.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path625" d="m5647.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path627" d="m5734.1 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path629" d="m5820.4 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path631" d="m5907.7 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path633" d="m5994 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path635" d="m6081.3 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path637" d="m6167.5 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432"
48 id="a" 48style=""/><path id="path639" d="m6254.8 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path641" d="m6341.1 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path643" d="m6427.4 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path645" d="m6514.7 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path647" d="m6600.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path649" d="m6688.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path651" d="m6774.5 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path653" d="m6861.8 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path655" d="m6948.1
49 clipPathUnits="userSpaceOnUse"><rect 494235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path657" d="m7035.4 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path659" d="m7121.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path661" d="m7207.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path663" d="m7295.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path665" d="m7381.5 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path667" d="m7468.8 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path669" d="m7555 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path671" d="m7642.3 4235.9h53.795" fill="none" stroke="#3465af"
50 y="0" 50stroke-width="28.432" style=""/><path id="path673" d="m7728.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path675" d="m7814.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path677" d="m7902.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path679" d="m7988.4 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path681" d="m8075.7 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path683" d="m8162 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path685" d="m8249.3 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path687" d="m8335.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path689"
51 x="0" 51d="m8421.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path691" d="m8509.1 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path693" d="m8595.4 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path695" d="m8682.7 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path697" d="m8769 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path699" d="m8856.3 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path701" d="m8942.5 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path703" d="m9028.8 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path705" d="m9116.1 4235.9h53.795" fill="none" stroke="#3465af"
52 width="28000" 52stroke-width="28.432" style=""/><path id="path707" d="m9202.4 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path709" d="m9289.7 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path711" d="m9376 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path713" d="m9463.2 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path715" d="m9549.5 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path717" d="m9635.8 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path719" d="m9723.1 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path721" d="m9809.4 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path723"
53 height="21000" 53d="m9896.6 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path725" d="m9982.9 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path727" d="m10070 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path729" d="m10156 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path731" d="m10243 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path733" d="m10330 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path735" d="m10416 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path737" d="m10504 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path739" d="m10590 4235.9h53.795" fill="none" stroke="#3465af"
54 id="rect7" /></clipPath></defs><path 54stroke-width="28.432" style=""/><path id="path741" d="m10677 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path743" d="m10763 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path745" d="m10850 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path747" d="m10937 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path749" d="m11023 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path751" d="m11111 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path753" d="m11197 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path755" d="m11284 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path757" d="m11370
55 style="fill:#ffccff" 554235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path759" d="m11458 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path761" d="m11544 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path763" d="m11630 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path765" d="m11718 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path767" d="m11804 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path769" d="m11891 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path771" d="m11977 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path773" d="m12065 4235.9h53.795" fill="none" stroke="#3465af"
56 inkscape:connector-curvature="0" 56stroke-width="28.432" style=""/><path id="path775" d="m12151 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path777" d="m12237 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path779" d="m12325 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path781" d="m12411 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path783" d="m12498 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path785" d="m12584 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path787" d="m12672 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path789" d="m12758 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path791"
57 id="path11" 57d="m12844 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path793" d="m12931 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path795" d="m13018 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path797" d="m13105 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path799" d="m13191 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path801" d="m13279 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path803" d="m13365 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path805" d="m13451 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path807" d="m13538 4235.9h53.795" fill="none" stroke="#3465af"
58 d="m 10145.77,2636.013 c -518.0641,0 -1035.1241,515 -1035.1241,1031 l 0,4124 c 0,516 517.06,1032 1035.1241,1032 l 8572.152,0 c 518.064,0 1036.128,-516 1036.128,-1032 l 0,-4124 c 0,-516 -518.064,-1031 -1036.128,-1031 l -8572.152,0 z" /><path 58stroke-width="28.432" style=""/><path id="path809" d="m13625 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path811" d="m13712 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path813" d="m13798 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path815" d="m13886 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path817" d="m13972 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path819" d="m14058 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path821" d="m14145 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path823" d="m14232 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path825" d="m14319
59 style="fill:#ffffcc" 594235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path827" d="m14405 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path829" d="m14493 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path831" d="m14579 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path833" d="m14665 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path835" d="m14752 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path837" d="m14839 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path839" d="m14926 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path841" d="m15012 4235.9h53.795" fill="none" stroke="#3465af"
60 inkscape:connector-curvature="0" 60stroke-width="28.432" style=""/><path id="path843" d="m15100 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path845" d="m15186 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path847" d="m15272 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path849" d="m15359 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path851" d="m15446 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path853" d="m15533 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path855" d="m15619 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path857" d="m15707 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path859" d="m15793
61 id="path15" 614235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path861" d="m15880 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path863" d="m15966 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path865" d="m16053 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path867" d="m16140 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path869" d="m16226 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path871" d="m16313 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path873" d="m16400 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path875" d="m16487 4235.9h53.795" fill="none" stroke="#3465af"
62 d="m 1505.5459,13443.013 c -293,0 -585,292 -585,585 l 0,2340 c 0,293 292,586 585,586 l 3275,0 c 293,0 586,-293 586,-586 l 0,-2340 c 0,-293 -293,-585 -586,-585 l -3275,0 z" /><path 62stroke-width="28.432" style=""/><path id="path877" d="m16573 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path879" d="m16660 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path881" d="m16747 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path883" d="m16833 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path885" d="m16920 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path887" d="m17007 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path889" d="m17094 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path891" d="m17180 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path893"
63 style="fill:#e6e6e6" 63d="m17267 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path895" d="m17354 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path897" d="m17440 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path899" d="m17527 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path901" d="m17614 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path903" d="m17701 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path905" d="m17787 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path907" d="m17874 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path909" d="m17961 4235.9h53.795" fill="none" stroke="#3465af"
64 inkscape:connector-curvature="0" 64stroke-width="28.432" style=""/><path id="path911" d="m18047 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path913" d="m18134 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path915" d="m18221 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path917" d="m18308 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path919" d="m18394 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path921" d="m18481 4235.9h54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path923" d="m18568 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path925" d="m18654 4235.9h53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path927" d="m18741
65 id="path19" 654235.9c17.255-0.9999 35.525-1.9999 53.795-4.9997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path929" d="m18828 4225.9c17.255-3.9998 34.51-8.9995 51.765-13.999" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path931" d="m18911 4200.9c16.24-5.9996 32.48-12.999 48.72-20.999" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path933" d="m18989 4164.9c15.225-7.9996 31.465-16.999 45.675-26.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path935" d="m19062 4118.9c14.21-9.9994 28.42-20.999 42.63-31.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path937" d="m19129 4064.9c13.195-11.999 25.375-24.998 37.555-37.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path939" d="m19189 4002.9c11.165-13.999 22.33-27.998 33.495-41.998" fill="none"
66 d="m 517.1459,22.013 c -461,0 -922,461 -922,922 l 0,11169 c 0,461 461,923 922,923 l 3692,0 c 461,0 922,-462 922,-923 l 0,-11169 c 0,-461 -461,-922 -922,-922 l -3692,0 z" /><path 66stroke="#3465af" stroke-width="28.432" style=""/><path id="path941" d="m19241 3933.9c10.15-14.999 19.285-29.998 27.405-44.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path943" d="m19283 3860c7.105-15.999 14.21-32.998 20.3-48.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path945" d="m19315 3780c5.075-16.999 9.135-33.998 13.195-50.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path947" d="m19333 3697c2.03-17.999 4.06-34.998 4.06-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path949" d="m19337 3612v-53.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path951" d="m19337 3526v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path953" d="m19337 3441v-52.997" fill="none" stroke="#3465af" stroke-width="28.432"
67 style="fill:#ff8080" 67style=""/><path id="path955" d="m19337 3355v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path957" d="m19337 3270v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path959" d="m19337 3184v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path961" d="m19337 3099v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path963" d="m19337 3014v-53.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path965" d="m19337 2928v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path967" d="m19337 2843v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path969" d="m19337 2757v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path971" d="m19337 2672v-52.997" fill="none"
68 inkscape:connector-curvature="0" 68stroke="#3465af" stroke-width="28.432" style=""/><path id="path973" d="m19337 2586v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path975" d="m19337 2501v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path977" d="m19337 2415v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path979" d="m19337 2330v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path981" d="m19337 2245v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path983" d="m19337 2159.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path985" d="m19337 2074.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path987" d="m19337 1988.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path
69 id="path23" 69id="path989" d="m19337 1903.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path991" d="m19337 1817.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path993" d="m19337 1732.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path995" d="m19337 1647.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path997" d="m19337 1561.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path999" d="m19337 1476.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1001" d="m19337 1390.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1003" d="m19337 1305.1v-52.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1005" d="m19337
70 d="m 2371.5459,6438.013 -2260,0 0,-1086 4520,0 0,1086 -2260,0 z" /><path 701219.1c-1.015-16.999-3.045-34.998-5.075-51.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1007" d="m19326 1135.1c-4.06-16.999-8.12-34.998-14.21-50.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1009" d="m19301 1053.1c-6.09-15.999-13.195-32.998-21.315-48.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1011" d="m19264 976.12c-9.135-15.999-18.27-30.998-28.42-45.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1013" d="m19216 904.13c-10.15-13.999-21.315-27.998-33.495-41.997" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1015" d="m19161 838.13c-12.18-12.999-24.36-24.998-37.555-36.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1017" d="m19098 780.14c-14.21-11.999-28.42-21.999-42.63-32.998" fill="none"
71 style="fill:none;stroke:#3465af" 71stroke="#3465af" stroke-width="28.432" style=""/><path id="path1019" d="m19028 729.14c-15.225-8.9995-30.45-17.999-46.69-26.998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1021" d="m18951 688.14c-16.24-7.9995-32.48-13.999-49.735-19.999" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1023" d="m18870 657.14c-17.255-4.9997-34.51-8.9995-51.765-11.999" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1025" d="m18786 640.14c-18.27-2.9998-35.525-3.9998-53.795-3.9998" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1027" d="m18700 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1029" d="m18612 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1031" d="m18526 636.14h-53.795" fill="none" stroke="#3465af"
72 inkscape:connector-curvature="0" 72stroke-width="28.432" style=""/><path id="path1033" d="m18439 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1035" d="m18353 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1037" d="m18266 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1039" d="m18179 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1041" d="m18093 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1043" d="m18005 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1045" d="m17919 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1047" d="m17832 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path
73 id="path25" 73id="path1049" d="m17746 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1051" d="m17659 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1053" d="m17572 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1055" d="m17486 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1057" d="m17399 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1059" d="m17312 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1061" d="m17225 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1063" d="m17139 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1065" d="m17052 636.14h-54.81"
74 d="m 2371.5459,6438.013 -2260,0 0,-1086 4520,0 0,1086 -2260,0 z" /><text 74fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1067" d="m16965 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1069" d="m16879 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1071" d="m16792 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1073" d="m16705 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1075" d="m16618 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1077" d="m16532 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1079" d="m16445 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1081" d="m16358 636.14h-53.795" fill="none" stroke="#3465af"
75 id="text27" 75stroke-width="28.432" style=""/><path id="path1083" d="m16272 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1085" d="m16185 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1087" d="m16098 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1089" d="m16011 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1091" d="m15925 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1093" d="m15837 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1095" d="m15751 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1097" d="m15665 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path
76 class="TextShape" 76id="path1099" d="m15578 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1101" d="m15491 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1103" d="m15404 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1105" d="m15318 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1107" d="m15230 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1109" d="m15144 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1111" d="m15058 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1113" d="m14971 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1115" d="m14884 636.14h-53.795"
77 x="-2089.4541" 77fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1117" d="m14797 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1119" d="m14711 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1121" d="m14624 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1123" d="m14537 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1125" d="m14451 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1127" d="m14364 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1129" d="m14277 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1131" d="m14190 636.14h-53.795" fill="none" stroke="#3465af"
78 y="-2163.9871"><tspan 78stroke-width="28.432" style=""/><path id="path1133" d="m14104 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1135" d="m14017 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1137" d="m13930 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1139" d="m13844 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1141" d="m13757 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1143" d="m13670 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1145" d="m13583 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1147" d="m13497 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path
79 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif" 79id="path1149" d="m13410 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1151" d="m13323 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1153" d="m13237 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1155" d="m13150 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1157" d="m13063 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1159" d="m12976 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1161" d="m12890 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1163" d="m12803 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1165" d="m12716 636.14h-53.795"
80 id="tspan29" 80fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1167" d="m12630 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1169" d="m12543 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1171" d="m12456 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1173" d="m12369 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1175" d="m12283 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1177" d="m12196 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1179" d="m12109 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1181" d="m12022 636.14h-53.795" fill="none" stroke="#3465af"
81 class="TextParagraph" 81stroke-width="28.432" style=""/><path id="path1183" d="m11936 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1185" d="m11850 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1187" d="m11762 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1189" d="m11676 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1191" d="m11589 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1193" d="m11502 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1195" d="m11415 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1197" d="m11329 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path
82 font-weight="400" 82id="path1199" d="m11243 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1201" d="m11155 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1203" d="m11069 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1205" d="m10982 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1207" d="m10895 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1209" d="m10808 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1211" d="m10722 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1213" d="m10636 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1215" d="m10548 636.14h-53.795"
83 font-size="635px"><tspan 83fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1217" d="m10462 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1219" d="m10375 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1221" d="m10288 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1223" d="m10201 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1225" d="m10115 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1227" d="m10029 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1229" d="m9941.3 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1231" d="m9855 636.14h-53.795" fill="none" stroke="#3465af"
84 id="tspan31" 84stroke-width="28.432" style=""/><path id="path1233" d="m9767.7 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1235" d="m9681.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1237" d="m9594.2 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1239" d="m9507.9 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1241" d="m9421.6 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1243" d="m9334.3 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1245" d="m9248.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1247" d="m9160.8 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432"
85 class="TextPosition" 85style=""/><path id="path1249" d="m9074.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1251" d="m8987.2 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1253" d="m8900.9 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1255" d="m8814.7 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1257" d="m8727.4 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1259" d="m8641.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1261" d="m8553.8 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1263" d="m8467.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1265"
86 x="489.5459" 86d="m8380.2 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1267" d="m8294 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1269" d="m8207.7 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1271" d="m8120.4 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1273" d="m8034.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1275" d="m7946.8 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1277" d="m7860.6 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1279" d="m7773.3 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1281" d="m7687 636.14h-53.795" fill="none"
87 y="6111.0132"><tspan 87stroke="#3465af" stroke-width="28.432" style=""/><path id="path1283" d="m7599.7 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1285" d="m7513.4 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1287" d="m7427.2 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1289" d="m7339.9 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1291" d="m7253.6 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1293" d="m7166.3 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1295" d="m7080 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1297" d="m6992.7 636.14h-53.795" fill="none" stroke="#3465af"
88 style="fill:#000000" 88stroke-width="28.432" style=""/><path id="path1299" d="m6906.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1301" d="m6820.2 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1303" d="m6732.9 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1305" d="m6646.6 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1307" d="m6559.3 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1309" d="m6473.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1311" d="m6385.8 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1313" d="m6299.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432"
89 id="tspan33">Audio decoder</tspan></tspan></tspan></text> 89style=""/><path id="path1315" d="m6213.2 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1317" d="m6125.9 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1319" d="m6039.6 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1321" d="m5952.4 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1323" d="m5866.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1325" d="m5778.8 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1327" d="m5692.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1329" d="m5606.2 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1331"
90<path 90d="m5519 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1333" d="m5432.7 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1335" d="m5345.4 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1337" d="m5259.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1339" d="m5171.8 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1341" d="m5085.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1343" d="m4999.3 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1345" d="m4912 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1347" d="m4825.7 636.14h-53.795" fill="none"
91 style="fill:#ff8080" 91stroke="#3465af" stroke-width="28.432" style=""/><path id="path1349" d="m4738.4 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1351" d="m4652.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1353" d="m4564.9 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1355" d="m4478.6 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1357" d="m4392.3 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1359" d="m4305 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1361" d="m4218.7 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1363" d="m4131.4 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432"
92 inkscape:connector-curvature="0" 92style=""/><path id="path1365" d="m4045.2 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1367" d="m3957.9 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1369" d="m3871.6 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1371" d="m3785.3 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1373" d="m3698 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1375" d="m3611.8 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1377" d="m3524.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1379" d="m3438.2 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1381"
93 id="path37" 93d="m3350.9 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1383" d="m3264.6 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1385" d="m3177.3 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1387" d="m3091.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1389" d="m3004.8 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1391" d="m2917.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1393" d="m2831.2 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1395" d="m2743.9 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1397" d="m2657.7 636.14h-53.795"
94 d="m 2371.5459,9608.013 -2260,0 0,-1270 4520,0 0,1270 -2260,0 z" /><path 94fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1399" d="m2570.4 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1401" d="m2484.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1403" d="m2397.8 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1405" d="m2310.5 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1407" d="m2224.3 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1409" d="m2137 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1411" d="m2050.7 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1413" d="m1963.4 636.14h-53.795" fill="none" stroke="#3465af"
95 style="fill:none;stroke:#3465af" 95stroke-width="28.432" style=""/><path id="path1415" d="m1877.1 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1417" d="m1790.9 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1419" d="m1703.6 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1421" d="m1617.3 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1423" d="m1530 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1425" d="m1443.7 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1427" d="m1356.4 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1429" d="m1270.2 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path
96 inkscape:connector-curvature="0" 96id="path1431" d="m1183.9 636.14h-54.81" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1433" d="m1096.6 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1435" d="m1010.3 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><path id="path1437" d="m923.03 636.14h-53.795" fill="none" stroke="#3465af" stroke-width="28.432" style=""/><g id="g4044" style=""><rect id="rect1441" x="21109" y="4753.1" width="1213.6" height="1100.7" fill="#f3e777" style=""/><path id="path1443" d="m20656 5536.4v-405.46l150.7-169.16c82.886-93.039 170.53-186.62 194.77-207.96l44.069-38.798 783.23-0.086 783.23-0.086v1227h-1956v-405.46zm1027.7 136.98v-78.372l-169.91 4.925-169.91 4.9249-5.09 45.854c-8.249 74.303 46.711 101.04 207.69 101.04h137.21v-78.372zm235.86-262.94 4.495-341.31 207.2-8.6408 207.2-8.6408
97 id="path39" 975.144-46.443c9.596-86.615-41.863-102.05-322.02-96.607l-246.71 4.7956-4.438 419.08-4.439 419.08h149.08l4.494-341.31zm391.3 313.72c26.41-19.286 36.255-41.399 32.697-73.447l-5.09-45.854h-348.1l-5.38 48.984c-9.97 90.771 0.993 97.91 150.36 97.91 99.305 0 148.27-7.6982 175.52-27.594zm-627.16-274.84v-77.768h-348.1v66.246c0 36.436 4.973 71.431 11.051 77.768 6.078 6.3366 84.401 11.521 174.05 11.521h163v-77.768zm659.89-4.9154 5.125-74.042-179.18 4.9155-179.18 4.9155-5.38 48.984c-10.473 95.348-2.259 99.57 183.28 94.197l170.2-4.9284 5.125-74.042zm-659.89-237.63v-78.372l-169.91 4.925-169.91 4.925-5.097 73.447-5.097 73.447h350v-78.372zm659.86 4.925-5.097-73.447h-348.1l-5.38 48.984c-10.289 93.673-2.146 97.91 188.15 97.91h175.52l-5.097-73.447zm-659.86-228.98v-77.768h-137.21c-97.358 0-147.91 7.8138-174.05 26.902-34.952 25.523-49.645 92.242-25.79 117.11 6.078 6.3366 84.401 11.521 174.05
98 d="m 2371.5459,9608.013 -2260,0 0,-1270 4520,0 0,1270 -2260,0 z" /><text 9811.521h163v-77.768z" fill="#ca4677" style=""/></g><text id="text1489" class="TextShape" transform="scale(1.1036 .90616)" x="171.41566" y="9913.7109" fill-rule="evenodd" font-family="Serif, serif" font-size="493.87px" stroke-linejoin="round" stroke-width="28.222"><tspan id="tspan1491" class="TextParagraph" font-family="Serif, serif" font-size="493.87px"/></text>
99 id="text41" 99<g id="g4048" style=""><rect id="rect1447" x="18797" y="13737" width="2320.7" height="2342.4" fill="#6076b3" style=""/><rect id="rect1451" x="18532" y="13817" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1453" x="18532" y="14076" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1455" x="18532" y="14334" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1457" x="18532" y="14593" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1459" x="18532" y="14851" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round"
100 class="TextShape" 100stroke-width="28.222" style=""/><rect id="rect1461" x="18532" y="15110" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1463" x="18532" y="15368" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1465" x="18532" y="15626" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1467" x="18532" y="15884" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1469" x="21080" y="13783" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1471" x="21080" y="14041" width="302.7"
101 x="-2089.4541" 101height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1473" x="21080" y="14299" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1475" x="21080" y="14558" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1477" x="21080" y="14816" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1479" x="21080" y="15075" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1481" x="21080" y="15333" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round"
102 y="-2163.9871"><tspan 102stroke-width="28.222" style=""/><rect id="rect1483" x="21080" y="15592" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><rect id="rect1485" x="21080" y="15850" width="302.7" height="137.79" fill="#e0ee2c" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><text id="text1493" transform="scale(1.1036 .90616)" x="17205.688" y="16777.641" fill="#000000" fill-rule="evenodd" font-family="Sans" font-size="856.96px" letter-spacing="0px" stroke-linejoin="round" stroke-width="28.222" word-spacing="0px" style="line-height:125%" line-height="125%" xml:space="preserve"><tspan id="tspan1495" x="17205.688" y="16777.641" style="">CPU</tspan></text>
103 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif" 103</g><text id="text1499" class="TextShape" x="-11700.553" y="565.61298" fill-rule="evenodd" font-family="Serif, serif" font-size="493.88px" stroke-linejoin="round" stroke-width="28.222"><tspan id="tspan1501" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan1503" class="TextPosition" transform="matrix(0,-1,1,0,8509,40173)" x="12640.447" y="16397.613" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan1505" fill="#000000" font-family="Serif, serif" font-size="493.88px">PCI, USB, SPI, I2C, ...</tspan></tspan></tspan></text>
104 id="tspan43" 104<path id="path1511" d="m12408 15562h-1115.1v-1420.3h2230.2v1420.3h-1115.1z" fill="#cfe7f5" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" style=""/><path id="path1513" d="m12408 15562h-1115.1v-1420.3h2230.2v1420.3h-1115.1z" fill="none" stroke="#3465af" stroke-linejoin="round" stroke-width="19.847" style=""/><text id="text1515" class="TextShape" x="-1394.0863" y="590.73016" fill-rule="evenodd" font-family="Serif, serif" font-size="493.88px" stroke-linejoin="round" stroke-width="28.222"><tspan id="tspan1517" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan1519" class="TextPosition" x="11487.915" y="14672.743" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan1521" fill="#000000" font-family="Serif, serif" font-size="493.88px">Bridge</tspan></tspan></tspan></text>
105 class="TextParagraph" 105<text id="text1523" class="TextShape" x="-1450.5308" y="1324.5078" fill-rule="evenodd" font-family="Serif, serif" font-size="493.88px" stroke-linejoin="round" stroke-width="28.222"><tspan id="tspan1525" class="TextParagraph" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan1527" class="TextPosition" x="11431.471" y="15406.52" font-family="Serif, serif" font-size="493.88px"><tspan id="tspan1529" fill="#000000" font-family="Serif, serif" font-size="493.88px"> DMA</tspan></tspan></tspan></text>
106 font-weight="400" 106</svg>
107 font-size="635px"><tspan
108 id="tspan45"
109 class="TextPosition"
110 x="527.5459"
111 y="9189.0127"><tspan
112 style="fill:#000000"
113 id="tspan47">Video decoder</tspan></tspan></tspan></text>
114<path
115 style="fill:#ff8080"
116 inkscape:connector-curvature="0"
117 id="path51"
118 d="m 2363.5459,8053.013 -2269,0 0,-1224 4537,0 0,1224 -2268,0 z" /><path
119 style="fill:none;stroke:#3465af"
120 inkscape:connector-curvature="0"
121 id="path53"
122 d="m 2363.5459,8053.013 -2269,0 0,-1224 4537,0 0,1224 -2268,0 z" /><text
123 id="text55"
124 class="TextShape"
125 x="-2089.4541"
126 y="-2163.9871"><tspan
127 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
128 id="tspan57"
129 class="TextParagraph"
130 font-weight="400"
131 font-size="635px"><tspan
132 id="tspan59"
133 class="TextPosition"
134 x="481.5459"
135 y="7657.0132"><tspan
136 style="fill:#000000"
137 id="tspan61">Audio encoder</tspan></tspan></tspan></text>
138<path
139 style="fill:#ccffcc"
140 inkscape:connector-curvature="0"
141 id="path65"
142 d="m 13621.546,10385.813 -3810.0001,0 0,-1281 7620.0001,0 0,1281 -3810,0 z" /><path
143 style="fill:none;stroke:#3465af"
144 inkscape:connector-curvature="0"
145 id="path67"
146 d="m 13621.546,10385.813 -3810.0001,0 0,-1281 7620.0001,0 0,1281 -3810,0 z" /><text
147 id="text69"
148 class="TextShape"
149 x="-2089.4541"
150 y="-2446.187"><tspan
151 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
152 id="tspan71"
153 class="TextParagraph"
154 font-weight="400"
155 font-size="635px"><tspan
156 id="tspan73"
157 class="TextPosition"
158 x="10287.546"
159 y="9960.8135"><tspan
160 style="fill:#000000"
161 id="tspan75">Button Key/IR input logic</tspan></tspan></tspan></text>
162<path
163 style="fill:#cfe7f5"
164 inkscape:connector-curvature="0"
165 id="path79"
166 d="m 12079.546,12182.213 -2268.0001,0 0,-1412 4536.0001,0 0,1412 -2268,0 z" /><path
167 style="fill:none;stroke:#3465af"
168 inkscape:connector-curvature="0"
169 id="path81"
170 d="m 12079.546,12182.213 -2268.0001,0 0,-1412 4536.0001,0 0,1412 -2268,0 z" /><text
171 id="text83"
172 class="TextShape"
173 x="-2089.4541"
174 y="-2389.7871"><tspan
175 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
176 id="tspan85"
177 class="TextParagraph"
178 font-weight="400"
179 font-size="635px"><tspan
180 id="tspan87"
181 class="TextPosition"
182 x="10792.546"
183 y="11692.213"><tspan
184 style="fill:#000000"
185 id="tspan89">EEPROM</tspan></tspan></tspan></text>
186<path
187 style="fill:#ffcc99"
188 inkscape:connector-curvature="0"
189 id="path93"
190 d="m 3050.5459,15498.013 -1563,0 0,-1715 3126,0 0,1715 -1563,0 z" /><path
191 style="fill:none;stroke:#3465af"
192 inkscape:connector-curvature="0"
193 id="path95"
194 d="m 3050.5459,15498.013 -1563,0 0,-1715 3126,0 0,1715 -1563,0 z" /><text
195 id="text97"
196 class="TextShape"
197 x="-2089.4541"
198 y="-2163.9871"><tspan
199 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
200 id="tspan99"
201 class="TextParagraph"
202 font-weight="400"
203 font-size="635px"><tspan
204 id="tspan101"
205 class="TextPosition"
206 x="2186.5459"
207 y="14856.013"><tspan
208 style="fill:#000000"
209 id="tspan103">Sensor</tspan></tspan></tspan></text>
210<path
211 style="fill:#729fcf"
212 inkscape:connector-curvature="0"
213 id="path107"
214 d="m 4629.5459,5866.013 385,-353 0,176 1167,0 0,-176 386,353 -386,354 0,-177 -1167,0 0,177 -385,-354 z" /><path
215 style="fill:none;stroke:#3465af"
216 inkscape:connector-curvature="0"
217 id="path109"
218 d="m 4629.5459,5866.013 385,-353 0,176 1167,0 0,-176 386,353 -386,354 0,-177 -1167,0 0,177 -385,-354 z" /><path
219 style="fill:#729fcf"
220 inkscape:connector-curvature="0"
221 id="path113"
222 d="m 4629.5459,7448.013 385,-353 0,176 1167,0 0,-176 386,353 -386,354 0,-177 -1167,0 0,177 -385,-354 z" /><path
223 style="fill:none;stroke:#3465af"
224 inkscape:connector-curvature="0"
225 id="path115"
226 d="m 4629.5459,7448.013 385,-353 0,176 1167,0 0,-176 386,353 -386,354 0,-177 -1167,0 0,177 -385,-354 z" /><path
227 style="fill:#729fcf"
228 inkscape:connector-curvature="0"
229 id="path119"
230 d="m 4631.5459,8936.013 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
231 style="fill:none;stroke:#3465af"
232 inkscape:connector-curvature="0"
233 id="path121"
234 d="m 4631.5459,8936.013 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
235 style="fill:#729fcf"
236 inkscape:connector-curvature="0"
237 id="path125"
238 d="m 7872.5459,11464.213 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
239 style="fill:none;stroke:#3465af"
240 inkscape:connector-curvature="0"
241 id="path127"
242 d="m 7872.5459,11464.213 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
243 style="fill:#729fcf"
244 inkscape:connector-curvature="0"
245 id="path131"
246 d="m 7872.5459,9716.813 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
247 style="fill:none;stroke:#3465af"
248 inkscape:connector-curvature="0"
249 id="path133"
250 d="m 7872.5459,9716.813 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
251 style="fill:#729fcf"
252 inkscape:connector-curvature="0"
253 id="path137"
254 d="m 7872.5459,14994.013 670,-353 0,176 2028.0001,0 0,-176 671,353 -671,354 0,-177 -2028.0001,0 0,177 -670,-354 z" /><path
255 style="fill:none;stroke:#3465af"
256 inkscape:connector-curvature="0"
257 id="path139"
258 d="m 7872.5459,14994.013 670,-353 0,176 2028.0001,0 0,-176 671,353 -671,354 0,-177 -2028.0001,0 0,177 -670,-354 z" /><path
259 style="fill:#729fcf"
260 inkscape:connector-curvature="0"
261 id="path143"
262 d="m 17534.058,14104.529 978.488,840.891 -978.488,840.89 0,-420.862 -2960.48,0 0,420.862 -979.489,-840.89 979.489,-840.891 0,420.029 2960.48,0 0,-420.029 z" /><path
263 style="fill:none;stroke:#3465af;stroke-width:25.77035904"
264 inkscape:connector-curvature="0"
265 id="path145"
266 d="m 17534.058,14104.529 978.488,840.891 -978.488,840.89 0,-420.862 -2960.48,0 0,420.862 -979.489,-840.89 979.489,-840.891 0,420.029 2960.48,0 0,-420.029 z" /><text
267 id="text149"
268 class="TextShape"
269 x="-9922.1533"
270 y="-644.58704"><tspan
271 style="font-weight:400;font-size:706px;font-family:'Times New Roman', serif"
272 id="tspan151"
273 class="TextParagraph"
274 font-weight="400"
275 font-size="706px"><tspan
276 id="tspan153"
277 transform="matrix(0,-1,1,0,8509,40173)"
278 class="TextPosition"
279 x="14418.847"
280 y="15187.413"><tspan
281 style="fill:#000000"
282 id="tspan155">System Bus</tspan></tspan></tspan></text>
283<path
284 style="fill:#ccffff"
285 inkscape:connector-curvature="0"
286 id="path159"
287 d="m 11061.546,7098.013 -1250.0001,0 0,-875 2499.0001,0 0,875 -1249,0 z" /><path
288 style="fill:none;stroke:#3465af"
289 inkscape:connector-curvature="0"
290 id="path161"
291 d="m 11061.546,7098.013 -1250.0001,0 0,-875 2499.0001,0 0,875 -1249,0 z" /><text
292 id="text163"
293 class="TextShape"
294 x="-2089.4541"
295 y="-2163.9871"><tspan
296 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
297 id="tspan165"
298 class="TextParagraph"
299 font-weight="400"
300 font-size="635px"><tspan
301 id="tspan167"
302 class="TextPosition"
303 x="10125.546"
304 y="6876.0132"><tspan
305 style="fill:#000000"
306 id="tspan169">Demux</tspan></tspan></tspan></text>
307<path
308 style="fill:#729fcf"
309 inkscape:connector-curvature="0"
310 id="path173"
311 d="m 7906.5459,6601.013 373,-357 0,178 1130,0 0,-178 374,357 -374,358 0,-179 -1130,0 0,179 -373,-358 z" /><path
312 style="fill:none;stroke:#3465af"
313 inkscape:connector-curvature="0"
314 id="path175"
315 d="m 7906.5459,6601.013 373,-357 0,178 1130,0 0,-178 374,357 -374,358 0,-179 -1130,0 0,179 -373,-358 z" /><path
316 style="fill:#729fcf"
317 inkscape:connector-curvature="0"
318 id="path179"
319 d="m 7906.5459,5214.013 373,-358 0,179 1130,0 0,-179 374,358 -374,358 0,-179 -1130,0 0,179 -373,-358 z" /><path
320 style="fill:none;stroke:#3465af"
321 inkscape:connector-curvature="0"
322 id="path181"
323 d="m 7906.5459,5214.013 373,-358 0,179 1130,0 0,-179 374,358 -374,358 0,-179 -1130,0 0,179 -373,-358 z" /><path
324 style="fill:#ccffff"
325 inkscape:connector-curvature="0"
326 id="path185"
327 d="m 14232.546,5828.013 -4421.0001,0 0,-1270 8841.0001,0 0,1270 -4420,0 z" /><path
328 style="fill:none;stroke:#3465af"
329 inkscape:connector-curvature="0"
330 id="path187"
331 d="m 14232.546,5828.013 -4421.0001,0 0,-1270 8841.0001,0 0,1270 -4420,0 z" /><text
332 id="text189"
333 class="TextShape"
334 x="-2089.4541"
335 y="-2163.9871"><tspan
336 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
337 id="tspan191"
338 class="TextParagraph"
339 font-weight="400"
340 font-size="635px"><tspan
341 id="tspan193"
342 class="TextPosition"
343 x="10696.546"
344 y="5409.0132"><tspan
345 style="fill:#000000"
346 id="tspan195">Conditional Access Module</tspan></tspan></tspan></text>
347<path
348 style="fill:#ff8080"
349 inkscape:connector-curvature="0"
350 id="path199"
351 d="m 2355.5459,11123.013 -2269,0 0,-1224 4537,0 0,1224 -2268,0 z" /><path
352 style="fill:none;stroke:#3465af"
353 inkscape:connector-curvature="0"
354 id="path201"
355 d="m 2355.5459,11123.013 -2269,0 0,-1224 4537,0 0,1224 -2268,0 z" /><text
356 id="text203"
357 class="TextShape"
358 x="-2089.4541"
359 y="-2163.9871"><tspan
360 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
361 id="tspan205"
362 class="TextParagraph"
363 font-weight="400"
364 font-size="635px"><tspan
365 id="tspan207"
366 class="TextPosition"
367 x="511.5459"
368 y="10727.013"><tspan
369 style="fill:#000000"
370 id="tspan209">Video encoder</tspan></tspan></tspan></text>
371<path
372 style="fill:#729fcf"
373 inkscape:connector-curvature="0"
374 id="path213"
375 d="m 4631.5459,10470.013 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
376 style="fill:none;stroke:#3465af"
377 inkscape:connector-curvature="0"
378 id="path215"
379 d="m 4631.5459,10470.013 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
380 style="fill:#729fcf"
381 inkscape:connector-curvature="0"
382 id="path219"
383 d="m 18701.546,5381.013 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
384 style="fill:none;stroke:#3465af"
385 inkscape:connector-curvature="0"
386 id="path221"
387 d="m 18701.546,5381.013 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><text
388 id="text225"
389 class="TextShape"
390 x="-1976.5541"
391 y="-2163.9871"><tspan
392 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
393 id="tspan227"
394 class="TextParagraph"
395 font-weight="400"
396 font-size="635px"><tspan
397 id="tspan229"
398 class="TextPosition"
399 x="13.4459"
400 y="12314.013"><tspan
401 style="fill:#000000"
402 id="tspan231">Radio / Analog TV</tspan></tspan></tspan></text>
403<text
404 id="text235"
405 class="TextShape"
406 x="-2089.4541"
407 y="-2163.9871"><tspan
408 style="font-weight:700;font-size:635px;font-family:'Times New Roman', serif"
409 id="tspan237"
410 class="TextParagraph"
411 font-weight="700"
412 font-size="635px"><tspan
413 id="tspan239"
414 class="TextPosition"
415 x="12866.546"
416 y="8560.0127"><tspan
417 style="fill:#000000"
418 id="tspan241">Digital TV</tspan></tspan></tspan></text>
419<text
420 id="text245"
421 class="TextShape"
422 x="-8919.0537"
423 y="-1373.787"><tspan
424 style="font-weight:400;font-size:494px;font-family:'Times New Roman', serif"
425 id="tspan247"
426 class="TextParagraph"
427 font-weight="400"
428 font-size="494px"><tspan
429 id="tspan249"
430 class="TextPosition"
431 x="5804.9458"
432 y="17793.213"><tspan
433 style="fill:#000000"
434 id="tspan251">PS.: picture is not complete: other blocks may be present</tspan></tspan></tspan></text>
435<text
436 id="text255"
437 class="TextShape"
438 x="-2089.4541"
439 y="-2163.9871"><tspan
440 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
441 id="tspan257"
442 class="TextParagraph"
443 font-weight="400"
444 font-size="635px"><tspan
445 id="tspan259"
446 class="TextPosition"
447 x="2109.5459"
448 y="16397.014"><tspan
449 style="fill:#000000"
450 id="tspan261">Webcam</tspan></tspan></tspan></text>
451<path
452 style="fill:#ff9900"
453 inkscape:connector-curvature="0"
454 id="path265"
455 d="m 12462.546,13925.813 -2650.0001,0 0,-1412 5299.0001,0 0,1412 -2649,0 z" /><path
456 style="fill:none;stroke:#3465af"
457 inkscape:connector-curvature="0"
458 id="path267"
459 d="m 12462.546,13925.813 -2650.0001,0 0,-1412 5299.0001,0 0,1412 -2649,0 z" /><text
460 id="text269"
461 class="TextShape"
462 x="-2089.4541"
463 y="-2446.187"><tspan
464 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
465 id="tspan271"
466 class="TextParagraph"
467 font-weight="400"
468 font-size="635px"><tspan
469 id="tspan273"
470 class="TextPosition"
471 x="10175.546"
472 y="13435.813"><tspan
473 style="fill:#000000"
474 id="tspan275">Processing blocks</tspan></tspan></tspan></text>
475<path
476 style="fill:#729fcf"
477 inkscape:connector-curvature="0"
478 id="path279"
479 d="m 7872.5459,13207.813 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
480 style="fill:none;stroke:#3465af"
481 inkscape:connector-curvature="0"
482 id="path281"
483 d="m 7872.5459,13207.813 385,-353 0,176 1166,0 0,-176 386,353 -386,354 0,-177 -1166,0 0,177 -385,-354 z" /><path
484 style="fill:#729fcf"
485 inkscape:connector-curvature="0"
486 id="path285"
487 d="m 4612.5459,14790.013 397,-353 0,176 1201,0 0,-176 398,353 -398,354 0,-177 -1201,0 0,177 -397,-354 z" /><path
488 style="fill:none;stroke:#3465af"
489 inkscape:connector-curvature="0"
490 id="path287"
491 d="m 4612.5459,14790.013 397,-353 0,176 1201,0 0,-176 398,353 -398,354 0,-177 -1201,0 0,177 -397,-354 z" /><text
492 id="text291"
493 class="TextShape"
494 x="-2428.0542"
495 y="-2163.9871"><tspan
496 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
497 id="tspan293"
498 class="TextParagraph"
499 font-weight="400"
500 font-size="635px"><tspan
501 id="tspan295"
502 class="TextPosition"
503 x="20421.945"
504 y="6628.0132"><tspan
505 style="fill:#000000"
506 id="tspan297">Smartcard</tspan></tspan></tspan></text>
507<path
508 style="fill:#ffccff"
509 inkscape:connector-curvature="0"
510 id="path301"
511 d="m 623.3227,436.013 c -334.5984,0 -669.1968,333 -669.1968,666 l 0,2668 c 0,333 334.5984,666 669.1968,666 l 18456.1663,0 c 334.598,0 670.202,-333 670.202,-666 l 0,-2668 c 0,-333 -335.604,-666 -670.202,-666 l -18456.1663,0 z" /><path
512 style="fill:#ff8080"
513 inkscape:connector-curvature="0"
514 id="path305"
515 d="m 3031.5459,2991.013 -1614,0 0,-1816 3227,0 0,1816 -1613,0 z" /><path
516 style="fill:none;stroke:#3465af"
517 inkscape:connector-curvature="0"
518 id="path307"
519 d="m 3031.5459,2991.013 -1614,0 0,-1816 3227,0 0,1816 -1613,0 z" /><text
520 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
521 id="text309"
522 class="TextShape"
523 font-weight="400"
524 font-size="635px"
525 x="-2089.4541"
526 y="-2163.9871"><tspan
527 id="tspan311"
528 class="TextParagraph"><tspan
529 id="tspan313"
530 class="TextPosition"
531 x="2284.5459"
532 y="1947.0129"><tspan
533 style="fill:#000000"
534 id="tspan315">Tuner</tspan></tspan></tspan><tspan
535 id="tspan317"
536 class="TextParagraph"><tspan
537 id="tspan319"
538 class="TextPosition"
539 x="2061.5459"
540 y="2650.0129"><tspan
541 style="fill:#000000"
542 id="tspan321">FM/TV</tspan></tspan></tspan></text>
543<path
544 style="fill:#ff8080"
545 inkscape:connector-curvature="0"
546 id="path325"
547 d="m 812.5459,1538.013 c 0,111 40,202 88,202 l 530,0 c 48,0 89,-91 89,-202 0,-110 -41,-202 -89,-202 l -530,0 c -48,0 -88,92 -88,202 z" /><path
548 style="fill:none;stroke:#3465af"
549 inkscape:connector-curvature="0"
550 id="path327"
551 d="m 812.5459,1538.013 c 0,111 40,202 88,202 l 530,0 c 48,0 89,-91 89,-202 0,-110 -41,-202 -89,-202 l -530,0 c -48,0 -88,92 -88,202 z" /><path
552 style="fill:#ffb3b3"
553 inkscape:connector-curvature="0"
554 id="path329"
555 d="m 812.5459,1538.013 c 0,111 40,202 88,202 48,0 88,-91 88,-202 0,-110 -40,-202 -88,-202 -48,0 -88,92 -88,202 z" /><path
556 style="fill:none;stroke:#3465af"
557 inkscape:connector-curvature="0"
558 id="path331"
559 d="m 812.5459,1538.013 c 0,111 40,202 88,202 48,0 88,-91 88,-202 0,-110 -40,-202 -88,-202 -48,0 -88,92 -88,202 z" /><path
560 style="fill:#ff8080"
561 inkscape:connector-curvature="0"
562 id="path335"
563 d="m 813.5459,2103.013 c 0,110 40,202 88,202 l 530,0 c 48,0 89,-92 89,-202 0,-110 -41,-203 -89,-203 l -530,0 c -48,0 -88,93 -88,203 z" /><path
564 style="fill:none;stroke:#3465af"
565 inkscape:connector-curvature="0"
566 id="path337"
567 d="m 813.5459,2103.013 c 0,110 40,202 88,202 l 530,0 c 48,0 89,-92 89,-202 0,-110 -41,-203 -89,-203 l -530,0 c -48,0 -88,93 -88,203 z" /><path
568 style="fill:#ffb3b3"
569 inkscape:connector-curvature="0"
570 id="path339"
571 d="m 813.5459,2103.013 c 0,110 40,202 88,202 48,0 88,-92 88,-202 0,-110 -40,-203 -88,-203 -48,0 -88,93 -88,203 z" /><path
572 style="fill:none;stroke:#3465af"
573 inkscape:connector-curvature="0"
574 id="path341"
575 d="m 813.5459,2103.013 c 0,110 40,202 88,202 48,0 88,-92 88,-202 0,-110 -40,-203 -88,-203 -48,0 -88,93 -88,203 z" /><path
576 style="fill:#729fcf"
577 inkscape:connector-curvature="0"
578 id="path345"
579 d="m 4629.5459,2032.013 385,-353 0,176 1167,0 0,-176 386,353 -386,354 0,-177 -1167,0 0,177 -385,-354 z" /><path
580 style="fill:none;stroke:#3465af"
581 inkscape:connector-curvature="0"
582 id="path347"
583 d="m 4629.5459,2032.013 385,-353 0,176 1167,0 0,-176 386,353 -386,354 0,-177 -1167,0 0,177 -385,-354 z" /><path
584 style="fill:#729fcf"
585 inkscape:connector-curvature="0"
586 id="path351"
587 d="m 7889.5459,1986.013 402,-368 0,184 1217,0 0,-184 403,368 -403,369 0,-185 -1217,0 0,185 -402,-369 z" /><path
588 style="fill:none;stroke:#3465af"
589 inkscape:connector-curvature="0"
590 id="path353"
591 d="m 7889.5459,1986.013 402,-368 0,184 1217,0 0,-184 403,368 -403,369 0,-185 -1217,0 0,185 -402,-369 z" /><path
592 style="fill:#ccffff"
593 inkscape:connector-curvature="0"
594 id="path357"
595 d="m 14410.546,4025.013 -4500.0001,0 0,-1389 9000.0001,0 0,1389 -4500,0 z" /><path
596 style="fill:none;stroke:#3465af"
597 inkscape:connector-curvature="0"
598 id="path359"
599 d="m 14410.546,4025.013 -4500.0001,0 0,-1389 9000.0001,0 0,1389 -4500,0 z" /><text
600 id="text361"
601 class="TextShape"
602 x="-2089.4541"
603 y="-2163.9871"><tspan
604 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
605 id="tspan363"
606 class="TextParagraph"
607 font-weight="400"
608 font-size="635px"><tspan
609 id="tspan365"
610 class="TextPosition"
611 x="9961.5459"
612 y="3546.0129"><tspan
613 style="fill:#000000"
614 id="tspan367">Satellite Equipment Control (SEC)</tspan></tspan></tspan></text>
615<path
616 style="fill:#ccffff"
617 inkscape:connector-curvature="0"
618 id="path371"
619 d="m 11310.546,2436.013 -1400.0001,0 0,-1000 2800.0001,0 0,1000 -1400,0 z" /><path
620 style="fill:none;stroke:#3465af"
621 inkscape:connector-curvature="0"
622 id="path373"
623 d="m 11310.546,2436.013 -1400.0001,0 0,-1000 2800.0001,0 0,1000 -1400,0 z" /><text
624 id="text375"
625 class="TextShape"
626 x="-2089.4541"
627 y="-2163.9871"><tspan
628 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
629 id="tspan377"
630 class="TextParagraph"
631 font-weight="400"
632 font-size="635px"><tspan
633 id="tspan379"
634 class="TextPosition"
635 x="10375.546"
636 y="2152.0129"><tspan
637 style="fill:#000000"
638 id="tspan381">Demod</tspan></tspan></tspan></text>
639<path
640 style="fill:#729fcf"
641 inkscape:connector-curvature="0"
642 id="path385"
643 d="m 7889.5459,3287.013 402,-368 0,184 1217,0 0,-184 403,368 -403,369 0,-185 -1217,0 0,185 -402,-369 z" /><path
644 style="fill:none;stroke:#3465af"
645 inkscape:connector-curvature="0"
646 id="path387"
647 d="m 7889.5459,3287.013 402,-368 0,184 1217,0 0,-184 403,368 -403,369 0,-185 -1217,0 0,185 -402,-369 z" /><path
648 d="m 7906.5459,9121.013 0,7302 -1270,0 0,-14605 1270,0 0,7303 z"
649 id="path389"
650 inkscape:connector-curvature="0"
651 style="fill:#ffff99" /><path
652 d="m 7906.5459,9121.013 0,7302 -1270,0 0,-14605 1270,0 0,7303 z"
653 id="path391"
654 inkscape:connector-curvature="0"
655 style="fill:none;stroke:#3465af" /><text
656 y="-6589.021"
657 x="-20792.584"
658 transform="matrix(0,-1,1,0,0,0)"
659 class="TextShape"
660 id="text393"><tspan
661 font-size="635px"
662 font-weight="400"
663 class="TextParagraph"
664 id="tspan395"
665 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"><tspan
666 y="7460.9849"
667 x="-11215.646"
668 class="TextPosition"
669 transform="matrix(0,-1,1,0,-4473,23627)"
670 id="tspan397"><tspan
671 id="tspan399"
672 style="fill:#000000">I2C Bus (control bus)</tspan></tspan></tspan></text>
673<text
674 id="text403"
675 class="TextShape"
676 x="-2145.854"
677 y="-2163.9871"><tspan
678 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
679 id="tspan405"
680 class="TextParagraph"
681 font-weight="400"
682 font-size="635px"><tspan
683 id="tspan407"
684 class="TextPosition"
685 x="7245.146"
686 y="1114.0129"><tspan
687 style="fill:#000000"
688 id="tspan409">Digital TV Frontend</tspan></tspan></tspan></text>
689<path
690 style="fill:none;stroke:#3465af;stroke-width:28.432024"
691 d="m 863.1459,636.145 c -18.27,0 -35.525,0.99994 -53.795,2.99982"
692 id="path415"
693 inkscape:connector-curvature="0" /><path
694 style="fill:none;stroke:#3465af;stroke-width:28.432024"
695 d="m 776.8709,644.14452 c -17.255,2.99982 -35.525,6.99958 -52.78,11.99928"
696 id="path417"
697 inkscape:connector-curvature="0" /><path
698 style="fill:none;stroke:#3465af;stroke-width:28.432024"
699 d="m 692.6259,666.1432 c -16.24,5.99964 -33.495,11.99928 -49.735,19.9988"
700 id="path419"
701 inkscape:connector-curvature="0" /><path
702 style="fill:none;stroke:#3465af;stroke-width:28.432024"
703 d="m 613.4559,700.14116 c -15.225,7.99952 -31.465,16.99898 -46.69,26.99838"
704 id="path421"
705 inkscape:connector-curvature="0" /><path
706 style="fill:none;stroke:#3465af;stroke-width:28.432024"
707 d="m 539.3609,745.13846 c -14.21,9.9994 -28.42,20.99874 -42.63,31.99808"
708 id="path423"
709 inkscape:connector-curvature="0" /><path
710 style="fill:none;stroke:#3465af;stroke-width:28.432024"
711 d="m 471.3559,798.13528 c -13.195,11.99928 -26.39,23.99856 -38.57,36.99778"
712 id="path425"
713 inkscape:connector-curvature="0" /><path
714 style="fill:none;stroke:#3465af;stroke-width:28.432024"
715 d="m 410.4559,859.13162 c -11.165,12.99922 -22.33,26.99838 -33.495,40.99754"
716 id="path427"
717 inkscape:connector-curvature="0" /><path
718 style="fill:none;stroke:#3465af;stroke-width:28.432024"
719 d="m 357.6759,927.12754 c -10.15,13.99916 -19.285,28.99826 -28.42,44.9973"
720 id="path429"
721 inkscape:connector-curvature="0" /><path
722 style="fill:none;stroke:#3465af;stroke-width:28.432024"
723 d="m 314.0309,1000.1232 c -8.12,15.999 -15.225,31.998 -22.33,48.997"
724 id="path431"
725 inkscape:connector-curvature="0" /><path
726 style="fill:none;stroke:#3465af;stroke-width:28.432024"
727 d="m 280.5359,1079.1184 c -5.075,16.999 -10.15,33.998 -14.21,50.997"
728 id="path433"
729 inkscape:connector-curvature="0" /><path
730 style="fill:none;stroke:#3465af;stroke-width:28.432024"
731 d="m 260.2359,1162.1134 c -3.045,17.999 -5.075,34.9979 -6.09,52.9969"
732 id="path435"
733 inkscape:connector-curvature="0" /><path
734 style="fill:none;stroke:#3465af;stroke-width:28.432024"
735 d="m 254.1459,1247.1083 0,52.9969"
736 id="path437"
737 inkscape:connector-curvature="0" /><path
738 style="fill:none;stroke:#3465af;stroke-width:28.432024"
739 d="m 254.1459,1333.1032 0,52.9968"
740 id="path439"
741 inkscape:connector-curvature="0" /><path
742 style="fill:none;stroke:#3465af;stroke-width:28.432024"
743 d="m 254.1459,1418.0981 0,52.9968"
744 id="path441"
745 inkscape:connector-curvature="0" /><path
746 style="fill:none;stroke:#3465af;stroke-width:28.432024"
747 d="m 254.1459,1504.0929 0,52.9968"
748 id="path443"
749 inkscape:connector-curvature="0" /><path
750 style="fill:none;stroke:#3465af;stroke-width:28.432024"
751 d="m 254.1459,1589.0878 0,52.9968"
752 id="path445"
753 inkscape:connector-curvature="0" /><path
754 style="fill:none;stroke:#3465af;stroke-width:28.432024"
755 d="m 254.1459,1675.0827 0,52.9968"
756 id="path447"
757 inkscape:connector-curvature="0" /><path
758 style="fill:none;stroke:#3465af;stroke-width:28.432024"
759 d="m 254.1459,1760.0776 0,52.9968"
760 id="path449"
761 inkscape:connector-curvature="0" /><path
762 style="fill:none;stroke:#3465af;stroke-width:28.432024"
763 d="m 254.1459,1845.0725 0,53.9967"
764 id="path451"
765 inkscape:connector-curvature="0" /><path
766 style="fill:none;stroke:#3465af;stroke-width:28.432024"
767 d="m 254.1459,1931.0673 0,52.9968"
768 id="path453"
769 inkscape:connector-curvature="0" /><path
770 style="fill:none;stroke:#3465af;stroke-width:28.432024"
771 d="m 254.1459,2016.0622 0,52.9968"
772 id="path455"
773 inkscape:connector-curvature="0" /><path
774 style="fill:none;stroke:#3465af;stroke-width:28.432024"
775 d="m 254.1459,2102.057 0,52.9969"
776 id="path457"
777 inkscape:connector-curvature="0" /><path
778 style="fill:none;stroke:#3465af;stroke-width:28.432024"
779 d="m 254.1459,2187.0519 0,52.9969"
780 id="path459"
781 inkscape:connector-curvature="0" /><path
782 style="fill:none;stroke:#3465af;stroke-width:28.432024"
783 d="m 254.1459,2273.0468 0,52.9968"
784 id="path461"
785 inkscape:connector-curvature="0" /><path
786 style="fill:none;stroke:#3465af;stroke-width:28.432024"
787 d="m 254.1459,2358.0417 0,52.9968"
788 id="path463"
789 inkscape:connector-curvature="0" /><path
790 style="fill:none;stroke:#3465af;stroke-width:28.432024"
791 d="m 254.1459,2443.0366 0,53.9967"
792 id="path465"
793 inkscape:connector-curvature="0" /><path
794 style="fill:none;stroke:#3465af;stroke-width:28.432024"
795 d="m 254.1459,2529.0314 0,52.9968"
796 id="path467"
797 inkscape:connector-curvature="0" /><path
798 style="fill:none;stroke:#3465af;stroke-width:28.432024"
799 d="m 254.1459,2614.0263 0,52.9968"
800 id="path469"
801 inkscape:connector-curvature="0" /><path
802 style="fill:none;stroke:#3465af;stroke-width:28.432024"
803 d="m 254.1459,2700.0212 0,52.9968"
804 id="path471"
805 inkscape:connector-curvature="0" /><path
806 style="fill:none;stroke:#3465af;stroke-width:28.432024"
807 d="m 254.1459,2785.0161 0,52.9968"
808 id="path473"
809 inkscape:connector-curvature="0" /><path
810 style="fill:none;stroke:#3465af;stroke-width:28.432024"
811 d="m 254.1459,2871.0109 0,52.9968"
812 id="path475"
813 inkscape:connector-curvature="0" /><path
814 style="fill:none;stroke:#3465af;stroke-width:28.432024"
815 d="m 254.1459,2956.0058 0,52.9968"
816 id="path477"
817 inkscape:connector-curvature="0" /><path
818 style="fill:none;stroke:#3465af;stroke-width:28.432024"
819 d="m 254.1459,3041.0007 0,53.9968"
820 id="path479"
821 inkscape:connector-curvature="0" /><path
822 style="fill:none;stroke:#3465af;stroke-width:28.432024"
823 d="m 254.1459,3126.9955 0,52.9969"
824 id="path481"
825 inkscape:connector-curvature="0" /><path
826 style="fill:none;stroke:#3465af;stroke-width:28.432024"
827 d="m 254.1459,3211.9904 0,52.9969"
828 id="path483"
829 inkscape:connector-curvature="0" /><path
830 style="fill:none;stroke:#3465af;stroke-width:28.432024"
831 d="m 254.1459,3297.9853 0,52.9968"
832 id="path485"
833 inkscape:connector-curvature="0" /><path
834 style="fill:none;stroke:#3465af;stroke-width:28.432024"
835 d="m 254.1459,3382.9802 0,52.9968"
836 id="path487"
837 inkscape:connector-curvature="0" /><path
838 style="fill:none;stroke:#3465af;stroke-width:28.432024"
839 d="m 254.1459,3468.975 0,52.9968"
840 id="path489"
841 inkscape:connector-curvature="0" /><path
842 style="fill:none;stroke:#3465af;stroke-width:28.432024"
843 d="m 254.1459,3553.9699 0,52.9968"
844 id="path491"
845 inkscape:connector-curvature="0" /><path
846 style="fill:none;stroke:#3465af;stroke-width:28.432024"
847 d="m 254.1459,3638.9648 c 0,17.9989 1.015,35.9979 3.045,52.9968"
848 id="path493"
849 inkscape:connector-curvature="0" /><path
850 style="fill:none;stroke:#3465af;stroke-width:28.432024"
851 d="m 262.2659,3723.9597 c 4.06,17.9989 8.12,34.9979 13.195,51.9969"
852 id="path495"
853 inkscape:connector-curvature="0" /><path
854 style="fill:none;stroke:#3465af;stroke-width:28.432024"
855 d="m 285.6109,3806.9547 c 6.09,15.9991 13.195,32.9981 20.3,48.9971"
856 id="path497"
857 inkscape:connector-curvature="0" /><path
858 style="fill:none;stroke:#3465af;stroke-width:28.432024"
859 d="m 321.1359,3884.9501 c 8.12,14.9991 17.255,30.9981 27.405,45.9972"
860 id="path499"
861 inkscape:connector-curvature="0" /><path
862 style="fill:none;stroke:#3465af;stroke-width:28.432024"
863 d="m 366.8109,3957.9457 c 10.15,13.9991 21.315,27.9983 32.48,41.9975"
864 id="path501"
865 inkscape:connector-curvature="0" /><path
866 style="fill:none;stroke:#3465af;stroke-width:28.432024"
867 d="m 420.6059,4023.9417 c 12.18,12.9992 25.375,25.9985 38.57,37.9977"
868 id="path503"
869 inkscape:connector-curvature="0" /><path
870 style="fill:none;stroke:#3465af;stroke-width:28.432024"
871 d="m 483.5359,4083.9381 c 13.195,10.9994 27.405,22.9986 41.615,32.998"
872 id="path505"
873 inkscape:connector-curvature="0" /><path
874 style="fill:none;stroke:#3465af;stroke-width:28.432024"
875 d="m 552.5559,4135.935 c 14.21,9.9994 29.435,18.9989 45.675,26.9984"
876 id="path507"
877 inkscape:connector-curvature="0" /><path
878 style="fill:none;stroke:#3465af;stroke-width:28.432024"
879 d="m 627.6659,4178.9324 c 15.225,6.9996 32.48,14.9991 48.72,20.9988"
880 id="path509"
881 inkscape:connector-curvature="0" /><path
882 style="fill:none;stroke:#3465af;stroke-width:28.432024"
883 d="m 707.8509,4210.9305 c 17.255,4.9997 34.51,9.9994 51.765,13.9992"
884 id="path511"
885 inkscape:connector-curvature="0" /><path
886 style="fill:none;stroke:#3465af;stroke-width:28.432024"
887 d="m 792.0959,4230.9293 c 17.255,1.9999 35.525,3.9998 53.795,4.9997"
888 id="path513"
889 inkscape:connector-curvature="0" /><path
890 style="fill:none;stroke:#3465af;stroke-width:28.432024"
891 d="m 878.3709,4235.929 53.795,0"
892 id="path515"
893 inkscape:connector-curvature="0" /><path
894 style="fill:none;stroke:#3465af;stroke-width:28.432024"
895 d="m 964.6459,4235.929 53.795,0"
896 id="path517"
897 inkscape:connector-curvature="0" /><path
898 style="fill:none;stroke:#3465af;stroke-width:28.432024"
899 d="m 1051.9359,4235.929 53.795,0"
900 id="path519"
901 inkscape:connector-curvature="0" /><path
902 style="fill:none;stroke:#3465af;stroke-width:28.432024"
903 d="m 1138.2109,4235.929 53.795,0"
904 id="path521"
905 inkscape:connector-curvature="0" /><path
906 style="fill:none;stroke:#3465af;stroke-width:28.432024"
907 d="m 1225.5009,4235.929 53.795,0"
908 id="path523"
909 inkscape:connector-curvature="0" /><path
910 style="fill:none;stroke:#3465af;stroke-width:28.432024"
911 d="m 1311.7759,4235.929 53.795,0"
912 id="path525"
913 inkscape:connector-curvature="0" /><path
914 style="fill:none;stroke:#3465af;stroke-width:28.432024"
915 d="m 1398.0509,4235.929 54.81,0"
916 id="path527"
917 inkscape:connector-curvature="0" /><path
918 style="fill:none;stroke:#3465af;stroke-width:28.432024"
919 d="m 1485.3409,4235.929 53.795,0"
920 id="path529"
921 inkscape:connector-curvature="0" /><path
922 style="fill:none;stroke:#3465af;stroke-width:28.432024"
923 d="m 1571.6159,4235.929 53.795,0"
924 id="path531"
925 inkscape:connector-curvature="0" /><path
926 style="fill:none;stroke:#3465af;stroke-width:28.432024"
927 d="m 1658.9059,4235.929 53.795,0"
928 id="path533"
929 inkscape:connector-curvature="0" /><path
930 style="fill:none;stroke:#3465af;stroke-width:28.432024"
931 d="m 1745.1809,4235.929 53.795,0"
932 id="path535"
933 inkscape:connector-curvature="0" /><path
934 style="fill:none;stroke:#3465af;stroke-width:28.432024"
935 d="m 1832.4709,4235.929 53.795,0"
936 id="path537"
937 inkscape:connector-curvature="0" /><path
938 style="fill:none;stroke:#3465af;stroke-width:28.432024"
939 d="m 1918.7459,4235.929 53.795,0"
940 id="path539"
941 inkscape:connector-curvature="0" /><path
942 style="fill:none;stroke:#3465af;stroke-width:28.432024"
943 d="m 2005.0209,4235.929 54.81,0"
944 id="path541"
945 inkscape:connector-curvature="0" /><path
946 style="fill:none;stroke:#3465af;stroke-width:28.432024"
947 d="m 2092.3109,4235.929 53.795,0"
948 id="path543"
949 inkscape:connector-curvature="0" /><path
950 style="fill:none;stroke:#3465af;stroke-width:28.432024"
951 d="m 2178.5859,4235.929 53.795,0"
952 id="path545"
953 inkscape:connector-curvature="0" /><path
954 style="fill:none;stroke:#3465af;stroke-width:28.432024"
955 d="m 2265.8759,4235.929 53.795,0"
956 id="path547"
957 inkscape:connector-curvature="0" /><path
958 style="fill:none;stroke:#3465af;stroke-width:28.432024"
959 d="m 2352.1509,4235.929 53.795,0"
960 id="path549"
961 inkscape:connector-curvature="0" /><path
962 style="fill:none;stroke:#3465af;stroke-width:28.432024"
963 d="m 2439.4409,4235.929 53.795,0"
964 id="path551"
965 inkscape:connector-curvature="0" /><path
966 style="fill:none;stroke:#3465af;stroke-width:28.432024"
967 d="m 2525.7159,4235.929 53.795,0"
968 id="path553"
969 inkscape:connector-curvature="0" /><path
970 style="fill:none;stroke:#3465af;stroke-width:28.432024"
971 d="m 2611.9909,4235.929 54.81,0"
972 id="path555"
973 inkscape:connector-curvature="0" /><path
974 style="fill:none;stroke:#3465af;stroke-width:28.432024"
975 d="m 2699.2809,4235.929 53.795,0"
976 id="path557"
977 inkscape:connector-curvature="0" /><path
978 style="fill:none;stroke:#3465af;stroke-width:28.432024"
979 d="m 2785.5559,4235.929 53.795,0"
980 id="path559"
981 inkscape:connector-curvature="0" /><path
982 style="fill:none;stroke:#3465af;stroke-width:28.432024"
983 d="m 2872.8459,4235.929 53.795,0"
984 id="path561"
985 inkscape:connector-curvature="0" /><path
986 style="fill:none;stroke:#3465af;stroke-width:28.432024"
987 d="m 2959.1209,4235.929 53.795,0"
988 id="path563"
989 inkscape:connector-curvature="0" /><path
990 style="fill:none;stroke:#3465af;stroke-width:28.432024"
991 d="m 3046.4109,4235.929 53.795,0"
992 id="path565"
993 inkscape:connector-curvature="0" /><path
994 style="fill:none;stroke:#3465af;stroke-width:28.432024"
995 d="m 3132.6859,4235.929 53.795,0"
996 id="path567"
997 inkscape:connector-curvature="0" /><path
998 style="fill:none;stroke:#3465af;stroke-width:28.432024"
999 d="m 3219.9759,4235.929 53.795,0"
1000 id="path569"
1001 inkscape:connector-curvature="0" /><path
1002 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1003 d="m 3306.2509,4235.929 53.795,0"
1004 id="path571"
1005 inkscape:connector-curvature="0" /><path
1006 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1007 d="m 3392.5259,4235.929 53.795,0"
1008 id="path573"
1009 inkscape:connector-curvature="0" /><path
1010 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1011 d="m 3479.8159,4235.929 53.795,0"
1012 id="path575"
1013 inkscape:connector-curvature="0" /><path
1014 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1015 d="m 3566.0909,4235.929 53.795,0"
1016 id="path577"
1017 inkscape:connector-curvature="0" /><path
1018 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1019 d="m 3653.3809,4235.929 53.795,0"
1020 id="path579"
1021 inkscape:connector-curvature="0" /><path
1022 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1023 d="m 3739.6559,4235.929 53.795,0"
1024 id="path581"
1025 inkscape:connector-curvature="0" /><path
1026 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1027 d="m 3826.9459,4235.929 53.795,0"
1028 id="path583"
1029 inkscape:connector-curvature="0" /><path
1030 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1031 d="m 3913.2209,4235.929 53.795,0"
1032 id="path585"
1033 inkscape:connector-curvature="0" /><path
1034 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1035 d="m 3999.4959,4235.929 53.795,0"
1036 id="path587"
1037 inkscape:connector-curvature="0" /><path
1038 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1039 d="m 4086.7859,4235.929 53.795,0"
1040 id="path589"
1041 inkscape:connector-curvature="0" /><path
1042 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1043 d="m 4173.0609,4235.929 53.795,0"
1044 id="path591"
1045 inkscape:connector-curvature="0" /><path
1046 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1047 d="m 4260.3509,4235.929 53.795,0"
1048 id="path593"
1049 inkscape:connector-curvature="0" /><path
1050 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1051 d="m 4346.6259,4235.929 53.795,0"
1052 id="path595"
1053 inkscape:connector-curvature="0" /><path
1054 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1055 d="m 4433.9159,4235.929 53.795,0"
1056 id="path597"
1057 inkscape:connector-curvature="0" /><path
1058 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1059 d="m 4520.1909,4235.929 53.795,0"
1060 id="path599"
1061 inkscape:connector-curvature="0" /><path
1062 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1063 d="m 4606.4659,4235.929 54.81,0"
1064 id="path601"
1065 inkscape:connector-curvature="0" /><path
1066 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1067 d="m 4693.7559,4235.929 53.795,0"
1068 id="path603"
1069 inkscape:connector-curvature="0" /><path
1070 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1071 d="m 4780.0309,4235.929 53.795,0"
1072 id="path605"
1073 inkscape:connector-curvature="0" /><path
1074 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1075 d="m 4867.3209,4235.929 53.795,0"
1076 id="path607"
1077 inkscape:connector-curvature="0" /><path
1078 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1079 d="m 4953.5959,4235.929 53.795,0"
1080 id="path609"
1081 inkscape:connector-curvature="0" /><path
1082 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1083 d="m 5040.8859,4235.929 53.795,0"
1084 id="path611"
1085 inkscape:connector-curvature="0" /><path
1086 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1087 d="m 5127.1609,4235.929 53.795,0"
1088 id="path613"
1089 inkscape:connector-curvature="0" /><path
1090 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1091 d="m 5213.4359,4235.929 54.81,0"
1092 id="path615"
1093 inkscape:connector-curvature="0" /><path
1094 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1095 d="m 5300.7259,4235.929 53.795,0"
1096 id="path617"
1097 inkscape:connector-curvature="0" /><path
1098 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1099 d="m 5387.0009,4235.929 53.795,0"
1100 id="path619"
1101 inkscape:connector-curvature="0" /><path
1102 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1103 d="m 5474.2909,4235.929 53.795,0"
1104 id="path621"
1105 inkscape:connector-curvature="0" /><path
1106 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1107 d="m 5560.5659,4235.929 53.795,0"
1108 id="path623"
1109 inkscape:connector-curvature="0" /><path
1110 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1111 d="m 5647.8559,4235.929 53.795,0"
1112 id="path625"
1113 inkscape:connector-curvature="0" /><path
1114 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1115 d="m 5734.1309,4235.929 53.795,0"
1116 id="path627"
1117 inkscape:connector-curvature="0" /><path
1118 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1119 d="m 5820.4059,4235.929 54.81,0"
1120 id="path629"
1121 inkscape:connector-curvature="0" /><path
1122 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1123 d="m 5907.6959,4235.929 53.795,0"
1124 id="path631"
1125 inkscape:connector-curvature="0" /><path
1126 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1127 d="m 5993.9709,4235.929 53.795,0"
1128 id="path633"
1129 inkscape:connector-curvature="0" /><path
1130 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1131 d="m 6081.2609,4235.929 53.795,0"
1132 id="path635"
1133 inkscape:connector-curvature="0" /><path
1134 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1135 d="m 6167.5359,4235.929 53.795,0"
1136 id="path637"
1137 inkscape:connector-curvature="0" /><path
1138 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1139 d="m 6254.8259,4235.929 53.795,0"
1140 id="path639"
1141 inkscape:connector-curvature="0" /><path
1142 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1143 d="m 6341.1009,4235.929 53.795,0"
1144 id="path641"
1145 inkscape:connector-curvature="0" /><path
1146 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1147 d="m 6427.3759,4235.929 54.81,0"
1148 id="path643"
1149 inkscape:connector-curvature="0" /><path
1150 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1151 d="m 6514.6659,4235.929 53.795,0"
1152 id="path645"
1153 inkscape:connector-curvature="0" /><path
1154 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1155 d="m 6600.9409,4235.929 53.795,0"
1156 id="path647"
1157 inkscape:connector-curvature="0" /><path
1158 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1159 d="m 6688.2309,4235.929 53.795,0"
1160 id="path649"
1161 inkscape:connector-curvature="0" /><path
1162 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1163 d="m 6774.5059,4235.929 53.795,0"
1164 id="path651"
1165 inkscape:connector-curvature="0" /><path
1166 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1167 d="m 6861.7959,4235.929 53.795,0"
1168 id="path653"
1169 inkscape:connector-curvature="0" /><path
1170 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1171 d="m 6948.0709,4235.929 53.795,0"
1172 id="path655"
1173 inkscape:connector-curvature="0" /><path
1174 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1175 d="m 7035.3609,4235.929 53.795,0"
1176 id="path657"
1177 inkscape:connector-curvature="0" /><path
1178 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1179 d="m 7121.6359,4235.929 53.795,0"
1180 id="path659"
1181 inkscape:connector-curvature="0" /><path
1182 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1183 d="m 7207.9109,4235.929 53.795,0"
1184 id="path661"
1185 inkscape:connector-curvature="0" /><path
1186 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1187 d="m 7295.2009,4235.929 53.795,0"
1188 id="path663"
1189 inkscape:connector-curvature="0" /><path
1190 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1191 d="m 7381.4759,4235.929 53.795,0"
1192 id="path665"
1193 inkscape:connector-curvature="0" /><path
1194 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1195 d="m 7468.7659,4235.929 53.795,0"
1196 id="path667"
1197 inkscape:connector-curvature="0" /><path
1198 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1199 d="m 7555.0409,4235.929 53.795,0"
1200 id="path669"
1201 inkscape:connector-curvature="0" /><path
1202 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1203 d="m 7642.3309,4235.929 53.795,0"
1204 id="path671"
1205 inkscape:connector-curvature="0" /><path
1206 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1207 d="m 7728.6059,4235.929 53.795,0"
1208 id="path673"
1209 inkscape:connector-curvature="0" /><path
1210 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1211 d="m 7814.8809,4235.929 53.795,0"
1212 id="path675"
1213 inkscape:connector-curvature="0" /><path
1214 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1215 d="m 7902.1709,4235.929 53.795,0"
1216 id="path677"
1217 inkscape:connector-curvature="0" /><path
1218 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1219 d="m 7988.4459,4235.929 53.795,0"
1220 id="path679"
1221 inkscape:connector-curvature="0" /><path
1222 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1223 d="m 8075.7359,4235.929 53.795,0"
1224 id="path681"
1225 inkscape:connector-curvature="0" /><path
1226 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1227 d="m 8162.0109,4235.929 53.795,0"
1228 id="path683"
1229 inkscape:connector-curvature="0" /><path
1230 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1231 d="m 8249.3009,4235.929 53.795,0"
1232 id="path685"
1233 inkscape:connector-curvature="0" /><path
1234 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1235 d="m 8335.5759,4235.929 53.795,0"
1236 id="path687"
1237 inkscape:connector-curvature="0" /><path
1238 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1239 d="m 8421.8509,4235.929 53.795,0"
1240 id="path689"
1241 inkscape:connector-curvature="0" /><path
1242 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1243 d="m 8509.1409,4235.929 53.795,0"
1244 id="path691"
1245 inkscape:connector-curvature="0" /><path
1246 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1247 d="m 8595.4159,4235.929 53.795,0"
1248 id="path693"
1249 inkscape:connector-curvature="0" /><path
1250 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1251 d="m 8682.7059,4235.929 53.795,0"
1252 id="path695"
1253 inkscape:connector-curvature="0" /><path
1254 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1255 d="m 8768.9809,4235.929 53.795,0"
1256 id="path697"
1257 inkscape:connector-curvature="0" /><path
1258 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1259 d="m 8856.2709,4235.929 53.795,0"
1260 id="path699"
1261 inkscape:connector-curvature="0" /><path
1262 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1263 d="m 8942.5459,4235.929 53.795,0"
1264 id="path701"
1265 inkscape:connector-curvature="0" /><path
1266 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1267 d="m 9028.8209,4235.929 54.81,0"
1268 id="path703"
1269 inkscape:connector-curvature="0" /><path
1270 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1271 d="m 9116.1109,4235.929 53.795,0"
1272 id="path705"
1273 inkscape:connector-curvature="0" /><path
1274 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1275 d="m 9202.3859,4235.929 53.795,0"
1276 id="path707"
1277 inkscape:connector-curvature="0" /><path
1278 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1279 d="m 9289.6759,4235.929 53.795,0"
1280 id="path709"
1281 inkscape:connector-curvature="0" /><path
1282 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1283 d="m 9375.9509,4235.929 53.795,0"
1284 id="path711"
1285 inkscape:connector-curvature="0" /><path
1286 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1287 d="m 9463.2409,4235.929 53.795,0"
1288 id="path713"
1289 inkscape:connector-curvature="0" /><path
1290 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1291 d="m 9549.5159,4235.929 53.795,0"
1292 id="path715"
1293 inkscape:connector-curvature="0" /><path
1294 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1295 d="m 9635.7909,4235.929 54.81,0"
1296 id="path717"
1297 inkscape:connector-curvature="0" /><path
1298 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1299 d="m 9723.0809,4235.929 53.795,0"
1300 id="path719"
1301 inkscape:connector-curvature="0" /><path
1302 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1303 d="m 9809.3559,4235.929 53.795,0"
1304 id="path721"
1305 inkscape:connector-curvature="0" /><path
1306 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1307 d="m 9896.6459,4235.929 53.795,0"
1308 id="path723"
1309 inkscape:connector-curvature="0" /><path
1310 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1311 d="m 9982.9209,4235.929 53.7951,0"
1312 id="path725"
1313 inkscape:connector-curvature="0" /><path
1314 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1315 d="m 10070.211,4235.929 53.795,0"
1316 id="path727"
1317 inkscape:connector-curvature="0" /><path
1318 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1319 d="m 10156.486,4235.929 53.795,0"
1320 id="path729"
1321 inkscape:connector-curvature="0" /><path
1322 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1323 d="m 10242.761,4235.929 54.81,0"
1324 id="path731"
1325 inkscape:connector-curvature="0" /><path
1326 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1327 d="m 10330.051,4235.929 53.795,0"
1328 id="path733"
1329 inkscape:connector-curvature="0" /><path
1330 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1331 d="m 10416.326,4235.929 53.795,0"
1332 id="path735"
1333 inkscape:connector-curvature="0" /><path
1334 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1335 d="m 10503.616,4235.929 53.795,0"
1336 id="path737"
1337 inkscape:connector-curvature="0" /><path
1338 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1339 d="m 10589.891,4235.929 53.795,0"
1340 id="path739"
1341 inkscape:connector-curvature="0" /><path
1342 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1343 d="m 10677.181,4235.929 53.795,0"
1344 id="path741"
1345 inkscape:connector-curvature="0" /><path
1346 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1347 d="m 10763.456,4235.929 53.795,0"
1348 id="path743"
1349 inkscape:connector-curvature="0" /><path
1350 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1351 d="m 10849.731,4235.929 54.81,0"
1352 id="path745"
1353 inkscape:connector-curvature="0" /><path
1354 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1355 d="m 10937.021,4235.929 53.795,0"
1356 id="path747"
1357 inkscape:connector-curvature="0" /><path
1358 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1359 d="m 11023.296,4235.929 53.795,0"
1360 id="path749"
1361 inkscape:connector-curvature="0" /><path
1362 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1363 d="m 11110.586,4235.929 53.795,0"
1364 id="path751"
1365 inkscape:connector-curvature="0" /><path
1366 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1367 d="m 11196.861,4235.929 53.795,0"
1368 id="path753"
1369 inkscape:connector-curvature="0" /><path
1370 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1371 d="m 11284.151,4235.929 53.795,0"
1372 id="path755"
1373 inkscape:connector-curvature="0" /><path
1374 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1375 d="m 11370.426,4235.929 53.795,0"
1376 id="path757"
1377 inkscape:connector-curvature="0" /><path
1378 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1379 d="m 11457.716,4235.929 53.795,0"
1380 id="path759"
1381 inkscape:connector-curvature="0" /><path
1382 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1383 d="m 11543.991,4235.929 53.795,0"
1384 id="path761"
1385 inkscape:connector-curvature="0" /><path
1386 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1387 d="m 11630.266,4235.929 53.795,0"
1388 id="path763"
1389 inkscape:connector-curvature="0" /><path
1390 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1391 d="m 11717.556,4235.929 53.795,0"
1392 id="path765"
1393 inkscape:connector-curvature="0" /><path
1394 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1395 d="m 11803.831,4235.929 53.795,0"
1396 id="path767"
1397 inkscape:connector-curvature="0" /><path
1398 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1399 d="m 11891.121,4235.929 53.795,0"
1400 id="path769"
1401 inkscape:connector-curvature="0" /><path
1402 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1403 d="m 11977.396,4235.929 53.795,0"
1404 id="path771"
1405 inkscape:connector-curvature="0" /><path
1406 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1407 d="m 12064.686,4235.929 53.795,0"
1408 id="path773"
1409 inkscape:connector-curvature="0" /><path
1410 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1411 d="m 12150.961,4235.929 53.795,0"
1412 id="path775"
1413 inkscape:connector-curvature="0" /><path
1414 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1415 d="m 12237.236,4235.929 53.795,0"
1416 id="path777"
1417 inkscape:connector-curvature="0" /><path
1418 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1419 d="m 12324.526,4235.929 53.795,0"
1420 id="path779"
1421 inkscape:connector-curvature="0" /><path
1422 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1423 d="m 12410.801,4235.929 53.795,0"
1424 id="path781"
1425 inkscape:connector-curvature="0" /><path
1426 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1427 d="m 12498.091,4235.929 53.795,0"
1428 id="path783"
1429 inkscape:connector-curvature="0" /><path
1430 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1431 d="m 12584.366,4235.929 53.795,0"
1432 id="path785"
1433 inkscape:connector-curvature="0" /><path
1434 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1435 d="m 12671.656,4235.929 53.795,0"
1436 id="path787"
1437 inkscape:connector-curvature="0" /><path
1438 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1439 d="m 12757.931,4235.929 53.795,0"
1440 id="path789"
1441 inkscape:connector-curvature="0" /><path
1442 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1443 d="m 12844.206,4235.929 54.81,0"
1444 id="path791"
1445 inkscape:connector-curvature="0" /><path
1446 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1447 d="m 12931.496,4235.929 53.795,0"
1448 id="path793"
1449 inkscape:connector-curvature="0" /><path
1450 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1451 d="m 13017.771,4235.929 53.795,0"
1452 id="path795"
1453 inkscape:connector-curvature="0" /><path
1454 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1455 d="m 13105.061,4235.929 53.795,0"
1456 id="path797"
1457 inkscape:connector-curvature="0" /><path
1458 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1459 d="m 13191.336,4235.929 53.795,0"
1460 id="path799"
1461 inkscape:connector-curvature="0" /><path
1462 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1463 d="m 13278.626,4235.929 53.795,0"
1464 id="path801"
1465 inkscape:connector-curvature="0" /><path
1466 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1467 d="m 13364.901,4235.929 53.795,0"
1468 id="path803"
1469 inkscape:connector-curvature="0" /><path
1470 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1471 d="m 13451.176,4235.929 54.81,0"
1472 id="path805"
1473 inkscape:connector-curvature="0" /><path
1474 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1475 d="m 13538.466,4235.929 53.795,0"
1476 id="path807"
1477 inkscape:connector-curvature="0" /><path
1478 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1479 d="m 13624.741,4235.929 53.795,0"
1480 id="path809"
1481 inkscape:connector-curvature="0" /><path
1482 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1483 d="m 13712.031,4235.929 53.795,0"
1484 id="path811"
1485 inkscape:connector-curvature="0" /><path
1486 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1487 d="m 13798.306,4235.929 53.795,0"
1488 id="path813"
1489 inkscape:connector-curvature="0" /><path
1490 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1491 d="m 13885.596,4235.929 53.795,0"
1492 id="path815"
1493 inkscape:connector-curvature="0" /><path
1494 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1495 d="m 13971.871,4235.929 53.795,0"
1496 id="path817"
1497 inkscape:connector-curvature="0" /><path
1498 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1499 d="m 14058.146,4235.929 54.81,0"
1500 id="path819"
1501 inkscape:connector-curvature="0" /><path
1502 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1503 d="m 14145.436,4235.929 53.795,0"
1504 id="path821"
1505 inkscape:connector-curvature="0" /><path
1506 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1507 d="m 14231.711,4235.929 53.795,0"
1508 id="path823"
1509 inkscape:connector-curvature="0" /><path
1510 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1511 d="m 14319.001,4235.929 53.795,0"
1512 id="path825"
1513 inkscape:connector-curvature="0" /><path
1514 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1515 d="m 14405.276,4235.929 53.795,0"
1516 id="path827"
1517 inkscape:connector-curvature="0" /><path
1518 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1519 d="m 14492.566,4235.929 53.795,0"
1520 id="path829"
1521 inkscape:connector-curvature="0" /><path
1522 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1523 d="m 14578.841,4235.929 53.795,0"
1524 id="path831"
1525 inkscape:connector-curvature="0" /><path
1526 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1527 d="m 14665.116,4235.929 54.81,0"
1528 id="path833"
1529 inkscape:connector-curvature="0" /><path
1530 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1531 d="m 14752.406,4235.929 53.795,0"
1532 id="path835"
1533 inkscape:connector-curvature="0" /><path
1534 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1535 d="m 14838.681,4235.929 53.795,0"
1536 id="path837"
1537 inkscape:connector-curvature="0" /><path
1538 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1539 d="m 14925.971,4235.929 53.795,0"
1540 id="path839"
1541 inkscape:connector-curvature="0" /><path
1542 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1543 d="m 15012.246,4235.929 53.795,0"
1544 id="path841"
1545 inkscape:connector-curvature="0" /><path
1546 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1547 d="m 15099.536,4235.929 53.795,0"
1548 id="path843"
1549 inkscape:connector-curvature="0" /><path
1550 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1551 d="m 15185.811,4235.929 53.795,0"
1552 id="path845"
1553 inkscape:connector-curvature="0" /><path
1554 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1555 d="m 15272.086,4235.929 54.81,0"
1556 id="path847"
1557 inkscape:connector-curvature="0" /><path
1558 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1559 d="m 15359.376,4235.929 53.795,0"
1560 id="path849"
1561 inkscape:connector-curvature="0" /><path
1562 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1563 d="m 15445.651,4235.929 53.795,0"
1564 id="path851"
1565 inkscape:connector-curvature="0" /><path
1566 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1567 d="m 15532.941,4235.929 53.795,0"
1568 id="path853"
1569 inkscape:connector-curvature="0" /><path
1570 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1571 d="m 15619.216,4235.929 53.795,0"
1572 id="path855"
1573 inkscape:connector-curvature="0" /><path
1574 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1575 d="m 15706.506,4235.929 53.795,0"
1576 id="path857"
1577 inkscape:connector-curvature="0" /><path
1578 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1579 d="m 15792.781,4235.929 53.795,0"
1580 id="path859"
1581 inkscape:connector-curvature="0" /><path
1582 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1583 d="m 15880.071,4235.929 53.795,0"
1584 id="path861"
1585 inkscape:connector-curvature="0" /><path
1586 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1587 d="m 15966.346,4235.929 53.795,0"
1588 id="path863"
1589 inkscape:connector-curvature="0" /><path
1590 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1591 d="m 16052.621,4235.929 53.795,0"
1592 id="path865"
1593 inkscape:connector-curvature="0" /><path
1594 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1595 d="m 16139.911,4235.929 53.795,0"
1596 id="path867"
1597 inkscape:connector-curvature="0" /><path
1598 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1599 d="m 16226.186,4235.929 53.795,0"
1600 id="path869"
1601 inkscape:connector-curvature="0" /><path
1602 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1603 d="m 16313.476,4235.929 53.795,0"
1604 id="path871"
1605 inkscape:connector-curvature="0" /><path
1606 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1607 d="m 16399.751,4235.929 53.795,0"
1608 id="path873"
1609 inkscape:connector-curvature="0" /><path
1610 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1611 d="m 16487.041,4235.929 53.795,0"
1612 id="path875"
1613 inkscape:connector-curvature="0" /><path
1614 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1615 d="m 16573.316,4235.929 53.795,0"
1616 id="path877"
1617 inkscape:connector-curvature="0" /><path
1618 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1619 d="m 16659.591,4235.929 53.795,0"
1620 id="path879"
1621 inkscape:connector-curvature="0" /><path
1622 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1623 d="m 16746.881,4235.929 53.795,0"
1624 id="path881"
1625 inkscape:connector-curvature="0" /><path
1626 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1627 d="m 16833.156,4235.929 53.795,0"
1628 id="path883"
1629 inkscape:connector-curvature="0" /><path
1630 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1631 d="m 16920.446,4235.929 53.795,0"
1632 id="path885"
1633 inkscape:connector-curvature="0" /><path
1634 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1635 d="m 17006.721,4235.929 53.795,0"
1636 id="path887"
1637 inkscape:connector-curvature="0" /><path
1638 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1639 d="m 17094.011,4235.929 53.795,0"
1640 id="path889"
1641 inkscape:connector-curvature="0" /><path
1642 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1643 d="m 17180.286,4235.929 53.795,0"
1644 id="path891"
1645 inkscape:connector-curvature="0" /><path
1646 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1647 d="m 17266.561,4235.929 54.81,0"
1648 id="path893"
1649 inkscape:connector-curvature="0" /><path
1650 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1651 d="m 17353.851,4235.929 53.795,0"
1652 id="path895"
1653 inkscape:connector-curvature="0" /><path
1654 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1655 d="m 17440.126,4235.929 53.795,0"
1656 id="path897"
1657 inkscape:connector-curvature="0" /><path
1658 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1659 d="m 17527.416,4235.929 53.795,0"
1660 id="path899"
1661 inkscape:connector-curvature="0" /><path
1662 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1663 d="m 17613.691,4235.929 53.795,0"
1664 id="path901"
1665 inkscape:connector-curvature="0" /><path
1666 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1667 d="m 17700.981,4235.929 53.795,0"
1668 id="path903"
1669 inkscape:connector-curvature="0" /><path
1670 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1671 d="m 17787.256,4235.929 53.795,0"
1672 id="path905"
1673 inkscape:connector-curvature="0" /><path
1674 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1675 d="m 17873.531,4235.929 54.81,0"
1676 id="path907"
1677 inkscape:connector-curvature="0" /><path
1678 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1679 d="m 17960.821,4235.929 53.795,0"
1680 id="path909"
1681 inkscape:connector-curvature="0" /><path
1682 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1683 d="m 18047.096,4235.929 53.795,0"
1684 id="path911"
1685 inkscape:connector-curvature="0" /><path
1686 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1687 d="m 18134.386,4235.929 53.795,0"
1688 id="path913"
1689 inkscape:connector-curvature="0" /><path
1690 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1691 d="m 18220.661,4235.929 53.795,0"
1692 id="path915"
1693 inkscape:connector-curvature="0" /><path
1694 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1695 d="m 18307.951,4235.929 53.795,0"
1696 id="path917"
1697 inkscape:connector-curvature="0" /><path
1698 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1699 d="m 18394.226,4235.929 53.795,0"
1700 id="path919"
1701 inkscape:connector-curvature="0" /><path
1702 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1703 d="m 18480.501,4235.929 54.81,0"
1704 id="path921"
1705 inkscape:connector-curvature="0" /><path
1706 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1707 d="m 18567.791,4235.929 53.795,0"
1708 id="path923"
1709 inkscape:connector-curvature="0" /><path
1710 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1711 d="m 18654.066,4235.929 53.795,0"
1712 id="path925"
1713 inkscape:connector-curvature="0" /><path
1714 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1715 d="m 18741.356,4235.929 c 17.255,-0.9999 35.525,-1.9999 53.795,-4.9997"
1716 id="path927"
1717 inkscape:connector-curvature="0" /><path
1718 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1719 d="m 18827.631,4225.9296 c 17.255,-3.9998 34.51,-8.9995 51.765,-13.9992"
1720 id="path929"
1721 inkscape:connector-curvature="0" /><path
1722 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1723 d="m 18910.861,4200.9311 c 16.24,-5.9996 32.48,-12.9992 48.72,-20.9987"
1724 id="path931"
1725 inkscape:connector-curvature="0" /><path
1726 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1727 d="m 18989.016,4164.9333 c 15.225,-7.9996 31.465,-16.999 45.675,-26.9984"
1728 id="path933"
1729 inkscape:connector-curvature="0" /><path
1730 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1731 d="m 19062.096,4118.936 c 14.21,-9.9994 28.42,-20.9987 42.63,-31.9981"
1732 id="path935"
1733 inkscape:connector-curvature="0" /><path
1734 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1735 d="m 19129.086,4064.9393 c 13.195,-11.9993 25.375,-24.9985 37.555,-37.9978"
1736 id="path937"
1737 inkscape:connector-curvature="0" /><path
1738 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1739 d="m 19188.971,4002.943 c 11.165,-13.9992 22.33,-27.9983 33.495,-41.9975"
1740 id="path939"
1741 inkscape:connector-curvature="0" /><path
1742 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1743 d="m 19240.736,3933.9471 c 10.15,-14.9991 19.285,-29.9982 27.405,-44.9973"
1744 id="path941"
1745 inkscape:connector-curvature="0" /><path
1746 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1747 d="m 19283.366,3859.9516 c 7.105,-15.9991 14.21,-32.9981 20.3,-48.9971"
1748 id="path943"
1749 inkscape:connector-curvature="0" /><path
1750 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1751 d="m 19314.831,3779.9564 c 5.075,-16.999 9.135,-33.998 13.195,-50.997"
1752 id="path945"
1753 inkscape:connector-curvature="0" /><path
1754 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1755 d="m 19333.101,3696.9613 c 2.03,-17.9989 4.06,-34.9979 4.06,-52.9968"
1756 id="path947"
1757 inkscape:connector-curvature="0" /><path
1758 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1759 d="m 19337.161,3611.9664 0,-53.9967"
1760 id="path949"
1761 inkscape:connector-curvature="0" /><path
1762 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1763 d="m 19337.161,3525.9716 0,-52.9968"
1764 id="path951"
1765 inkscape:connector-curvature="0" /><path
1766 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1767 d="m 19337.161,3440.9767 0,-52.9968"
1768 id="path953"
1769 inkscape:connector-curvature="0" /><path
1770 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1771 d="m 19337.161,3354.9819 0,-52.9969"
1772 id="path955"
1773 inkscape:connector-curvature="0" /><path
1774 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1775 d="m 19337.161,3269.987 0,-52.9969"
1776 id="path957"
1777 inkscape:connector-curvature="0" /><path
1778 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1779 d="m 19337.161,3183.9921 0,-52.9968"
1780 id="path959"
1781 inkscape:connector-curvature="0" /><path
1782 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1783 d="m 19337.161,3098.9972 0,-52.9968"
1784 id="path961"
1785 inkscape:connector-curvature="0" /><path
1786 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1787 d="m 19337.161,3014.0023 0,-53.9967"
1788 id="path963"
1789 inkscape:connector-curvature="0" /><path
1790 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1791 d="m 19337.161,2928.0075 0,-52.9968"
1792 id="path965"
1793 inkscape:connector-curvature="0" /><path
1794 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1795 d="m 19337.161,2843.0126 0,-52.9968"
1796 id="path967"
1797 inkscape:connector-curvature="0" /><path
1798 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1799 d="m 19337.161,2757.0177 0,-52.9968"
1800 id="path969"
1801 inkscape:connector-curvature="0" /><path
1802 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1803 d="m 19337.161,2672.0228 0,-52.9968"
1804 id="path971"
1805 inkscape:connector-curvature="0" /><path
1806 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1807 d="m 19337.161,2586.028 0,-52.9968"
1808 id="path973"
1809 inkscape:connector-curvature="0" /><path
1810 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1811 d="m 19337.161,2501.0331 0,-52.9968"
1812 id="path975"
1813 inkscape:connector-curvature="0" /><path
1814 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1815 d="m 19337.161,2415.0383 0,-52.9969"
1816 id="path977"
1817 inkscape:connector-curvature="0" /><path
1818 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1819 d="m 19337.161,2330.0434 0,-52.9969"
1820 id="path979"
1821 inkscape:connector-curvature="0" /><path
1822 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1823 d="m 19337.161,2245.0485 0,-52.9969"
1824 id="path981"
1825 inkscape:connector-curvature="0" /><path
1826 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1827 d="m 19337.161,2159.0536 0,-52.9968"
1828 id="path983"
1829 inkscape:connector-curvature="0" /><path
1830 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1831 d="m 19337.161,2074.0587 0,-52.9968"
1832 id="path985"
1833 inkscape:connector-curvature="0" /><path
1834 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1835 d="m 19337.161,1988.0639 0,-52.9968"
1836 id="path987"
1837 inkscape:connector-curvature="0" /><path
1838 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1839 d="m 19337.161,1903.069 0,-52.9968"
1840 id="path989"
1841 inkscape:connector-curvature="0" /><path
1842 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1843 d="m 19337.161,1817.0741 0,-52.9968"
1844 id="path991"
1845 inkscape:connector-curvature="0" /><path
1846 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1847 d="m 19337.161,1732.0792 0,-52.9968"
1848 id="path993"
1849 inkscape:connector-curvature="0" /><path
1850 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1851 d="m 19337.161,1647.0843 0,-52.9968"
1852 id="path995"
1853 inkscape:connector-curvature="0" /><path
1854 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1855 d="m 19337.161,1561.0895 0,-52.9968"
1856 id="path997"
1857 inkscape:connector-curvature="0" /><path
1858 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1859 d="m 19337.161,1476.0946 0,-52.9968"
1860 id="path999"
1861 inkscape:connector-curvature="0" /><path
1862 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1863 d="m 19337.161,1390.0998 0,-52.9969"
1864 id="path1001"
1865 inkscape:connector-curvature="0" /><path
1866 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1867 d="m 19337.161,1305.1049 0,-52.9969"
1868 id="path1003"
1869 inkscape:connector-curvature="0" /><path
1870 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1871 d="m 19337.161,1219.11 c -1.015,-16.999 -3.045,-34.9979 -5.075,-51.9969"
1872 id="path1005"
1873 inkscape:connector-curvature="0" /><path
1874 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1875 d="m 19325.996,1135.1151 c -4.06,-16.999 -8.12,-34.9979 -14.21,-50.997"
1876 id="path1007"
1877 inkscape:connector-curvature="0" /><path
1878 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1879 d="m 19300.621,1053.12 c -6.09,-15.9991 -13.195,-32.998 -21.315,-48.9971"
1880 id="path1009"
1881 inkscape:connector-curvature="0" /><path
1882 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1883 d="m 19264.081,976.1246 c -9.135,-15.99904 -18.27,-30.99814 -28.42,-45.99724"
1884 id="path1011"
1885 inkscape:connector-curvature="0" /><path
1886 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1887 d="m 19216.376,904.12892 c -10.15,-13.99916 -21.315,-27.99832 -33.495,-41.99748"
1888 id="path1013"
1889 inkscape:connector-curvature="0" /><path
1890 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1891 d="m 19160.551,838.13288 c -12.18,-12.99922 -24.36,-24.9985 -37.555,-36.99778"
1892 id="path1015"
1893 inkscape:connector-curvature="0" /><path
1894 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1895 d="m 19097.621,780.13636 c -14.21,-11.99928 -28.42,-21.99868 -42.63,-32.99802"
1896 id="path1017"
1897 inkscape:connector-curvature="0" /><path
1898 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1899 d="m 19027.586,729.13942 c -15.225,-8.99946 -30.45,-17.99892 -46.69,-26.99838"
1900 id="path1019"
1901 inkscape:connector-curvature="0" /><path
1902 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1903 d="m 18951.461,688.14188 c -16.24,-7.99952 -32.48,-13.99916 -49.735,-19.9988"
1904 id="path1021"
1905 inkscape:connector-curvature="0" /><path
1906 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1907 d="m 18870.261,657.14374 c -17.255,-4.9997 -34.51,-8.99946 -51.765,-11.99928"
1908 id="path1023"
1909 inkscape:connector-curvature="0" /><path
1910 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1911 d="m 18786.016,640.14476 c -18.27,-2.99982 -35.525,-3.99976 -53.795,-3.99976"
1912 id="path1025"
1913 inkscape:connector-curvature="0" /><path
1914 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1915 d="m 18699.741,636.145 -53.795,0"
1916 id="path1027"
1917 inkscape:connector-curvature="0" /><path
1918 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1919 d="m 18612.451,636.145 -53.795,0"
1920 id="path1029"
1921 inkscape:connector-curvature="0" /><path
1922 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1923 d="m 18526.176,636.145 -53.795,0"
1924 id="path1031"
1925 inkscape:connector-curvature="0" /><path
1926 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1927 d="m 18438.886,636.145 -53.795,0"
1928 id="path1033"
1929 inkscape:connector-curvature="0" /><path
1930 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1931 d="m 18352.611,636.145 -53.795,0"
1932 id="path1035"
1933 inkscape:connector-curvature="0" /><path
1934 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1935 d="m 18266.336,636.145 -54.81,0"
1936 id="path1037"
1937 inkscape:connector-curvature="0" /><path
1938 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1939 d="m 18179.046,636.145 -53.795,0"
1940 id="path1039"
1941 inkscape:connector-curvature="0" /><path
1942 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1943 d="m 18092.771,636.145 -53.795,0"
1944 id="path1041"
1945 inkscape:connector-curvature="0" /><path
1946 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1947 d="m 18005.481,636.145 -53.795,0"
1948 id="path1043"
1949 inkscape:connector-curvature="0" /><path
1950 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1951 d="m 17919.206,636.145 -53.795,0"
1952 id="path1045"
1953 inkscape:connector-curvature="0" /><path
1954 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1955 d="m 17831.916,636.145 -53.795,0"
1956 id="path1047"
1957 inkscape:connector-curvature="0" /><path
1958 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1959 d="m 17745.641,636.145 -53.795,0"
1960 id="path1049"
1961 inkscape:connector-curvature="0" /><path
1962 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1963 d="m 17659.366,636.145 -54.81,0"
1964 id="path1051"
1965 inkscape:connector-curvature="0" /><path
1966 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1967 d="m 17572.076,636.145 -53.795,0"
1968 id="path1053"
1969 inkscape:connector-curvature="0" /><path
1970 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1971 d="m 17485.801,636.145 -53.795,0"
1972 id="path1055"
1973 inkscape:connector-curvature="0" /><path
1974 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1975 d="m 17398.511,636.145 -53.795,0"
1976 id="path1057"
1977 inkscape:connector-curvature="0" /><path
1978 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1979 d="m 17312.236,636.145 -53.795,0"
1980 id="path1059"
1981 inkscape:connector-curvature="0" /><path
1982 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1983 d="m 17224.946,636.145 -53.795,0"
1984 id="path1061"
1985 inkscape:connector-curvature="0" /><path
1986 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1987 d="m 17138.671,636.145 -53.795,0"
1988 id="path1063"
1989 inkscape:connector-curvature="0" /><path
1990 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1991 d="m 17052.396,636.145 -54.81,0"
1992 id="path1065"
1993 inkscape:connector-curvature="0" /><path
1994 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1995 d="m 16965.106,636.145 -53.795,0"
1996 id="path1067"
1997 inkscape:connector-curvature="0" /><path
1998 style="fill:none;stroke:#3465af;stroke-width:28.432024"
1999 d="m 16878.831,636.145 -53.795,0"
2000 id="path1069"
2001 inkscape:connector-curvature="0" /><path
2002 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2003 d="m 16791.541,636.145 -53.795,0"
2004 id="path1071"
2005 inkscape:connector-curvature="0" /><path
2006 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2007 d="m 16705.266,636.145 -53.795,0"
2008 id="path1073"
2009 inkscape:connector-curvature="0" /><path
2010 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2011 d="m 16617.976,636.145 -53.795,0"
2012 id="path1075"
2013 inkscape:connector-curvature="0" /><path
2014 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2015 d="m 16531.701,636.145 -53.795,0"
2016 id="path1077"
2017 inkscape:connector-curvature="0" /><path
2018 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2019 d="m 16445.426,636.145 -54.81,0"
2020 id="path1079"
2021 inkscape:connector-curvature="0" /><path
2022 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2023 d="m 16358.136,636.145 -53.795,0"
2024 id="path1081"
2025 inkscape:connector-curvature="0" /><path
2026 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2027 d="m 16271.861,636.145 -53.795,0"
2028 id="path1083"
2029 inkscape:connector-curvature="0" /><path
2030 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2031 d="m 16184.571,636.145 -53.795,0"
2032 id="path1085"
2033 inkscape:connector-curvature="0" /><path
2034 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2035 d="m 16098.296,636.145 -53.795,0"
2036 id="path1087"
2037 inkscape:connector-curvature="0" /><path
2038 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2039 d="m 16011.006,636.145 -53.795,0"
2040 id="path1089"
2041 inkscape:connector-curvature="0" /><path
2042 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2043 d="m 15924.731,636.145 -53.795,0"
2044 id="path1091"
2045 inkscape:connector-curvature="0" /><path
2046 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2047 d="m 15837.441,636.145 -53.795,0"
2048 id="path1093"
2049 inkscape:connector-curvature="0" /><path
2050 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2051 d="m 15751.166,636.145 -53.795,0"
2052 id="path1095"
2053 inkscape:connector-curvature="0" /><path
2054 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2055 d="m 15664.891,636.145 -53.795,0"
2056 id="path1097"
2057 inkscape:connector-curvature="0" /><path
2058 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2059 d="m 15577.601,636.145 -53.795,0"
2060 id="path1099"
2061 inkscape:connector-curvature="0" /><path
2062 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2063 d="m 15491.326,636.145 -53.795,0"
2064 id="path1101"
2065 inkscape:connector-curvature="0" /><path
2066 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2067 d="m 15404.036,636.145 -53.795,0"
2068 id="path1103"
2069 inkscape:connector-curvature="0" /><path
2070 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2071 d="m 15317.761,636.145 -53.795,0"
2072 id="path1105"
2073 inkscape:connector-curvature="0" /><path
2074 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2075 d="m 15230.471,636.145 -53.795,0"
2076 id="path1107"
2077 inkscape:connector-curvature="0" /><path
2078 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2079 d="m 15144.196,636.145 -53.795,0"
2080 id="path1109"
2081 inkscape:connector-curvature="0" /><path
2082 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2083 d="m 15057.921,636.145 -53.795,0"
2084 id="path1111"
2085 inkscape:connector-curvature="0" /><path
2086 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2087 d="m 14970.631,636.145 -53.795,0"
2088 id="path1113"
2089 inkscape:connector-curvature="0" /><path
2090 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2091 d="m 14884.356,636.145 -53.795,0"
2092 id="path1115"
2093 inkscape:connector-curvature="0" /><path
2094 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2095 d="m 14797.066,636.145 -53.795,0"
2096 id="path1117"
2097 inkscape:connector-curvature="0" /><path
2098 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2099 d="m 14710.791,636.145 -53.795,0"
2100 id="path1119"
2101 inkscape:connector-curvature="0" /><path
2102 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2103 d="m 14623.501,636.145 -53.795,0"
2104 id="path1121"
2105 inkscape:connector-curvature="0" /><path
2106 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2107 d="m 14537.226,636.145 -53.795,0"
2108 id="path1123"
2109 inkscape:connector-curvature="0" /><path
2110 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2111 d="m 14450.951,636.145 -54.81,0"
2112 id="path1125"
2113 inkscape:connector-curvature="0" /><path
2114 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2115 d="m 14363.661,636.145 -53.795,0"
2116 id="path1127"
2117 inkscape:connector-curvature="0" /><path
2118 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2119 d="m 14277.386,636.145 -53.795,0"
2120 id="path1129"
2121 inkscape:connector-curvature="0" /><path
2122 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2123 d="m 14190.096,636.145 -53.795,0"
2124 id="path1131"
2125 inkscape:connector-curvature="0" /><path
2126 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2127 d="m 14103.821,636.145 -53.795,0"
2128 id="path1133"
2129 inkscape:connector-curvature="0" /><path
2130 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2131 d="m 14016.531,636.145 -53.795,0"
2132 id="path1135"
2133 inkscape:connector-curvature="0" /><path
2134 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2135 d="m 13930.256,636.145 -53.795,0"
2136 id="path1137"
2137 inkscape:connector-curvature="0" /><path
2138 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2139 d="m 13843.981,636.145 -54.81,0"
2140 id="path1139"
2141 inkscape:connector-curvature="0" /><path
2142 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2143 d="m 13756.691,636.145 -53.795,0"
2144 id="path1141"
2145 inkscape:connector-curvature="0" /><path
2146 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2147 d="m 13670.416,636.145 -53.795,0"
2148 id="path1143"
2149 inkscape:connector-curvature="0" /><path
2150 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2151 d="m 13583.126,636.145 -53.795,0"
2152 id="path1145"
2153 inkscape:connector-curvature="0" /><path
2154 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2155 d="m 13496.851,636.145 -53.795,0"
2156 id="path1147"
2157 inkscape:connector-curvature="0" /><path
2158 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2159 d="m 13409.561,636.145 -53.795,0"
2160 id="path1149"
2161 inkscape:connector-curvature="0" /><path
2162 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2163 d="m 13323.286,636.145 -53.795,0"
2164 id="path1151"
2165 inkscape:connector-curvature="0" /><path
2166 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2167 d="m 13237.011,636.145 -54.81,0"
2168 id="path1153"
2169 inkscape:connector-curvature="0" /><path
2170 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2171 d="m 13149.721,636.145 -53.795,0"
2172 id="path1155"
2173 inkscape:connector-curvature="0" /><path
2174 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2175 d="m 13063.446,636.145 -53.795,0"
2176 id="path1157"
2177 inkscape:connector-curvature="0" /><path
2178 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2179 d="m 12976.156,636.145 -53.795,0"
2180 id="path1159"
2181 inkscape:connector-curvature="0" /><path
2182 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2183 d="m 12889.881,636.145 -53.795,0"
2184 id="path1161"
2185 inkscape:connector-curvature="0" /><path
2186 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2187 d="m 12802.591,636.145 -53.795,0"
2188 id="path1163"
2189 inkscape:connector-curvature="0" /><path
2190 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2191 d="m 12716.316,636.145 -53.795,0"
2192 id="path1165"
2193 inkscape:connector-curvature="0" /><path
2194 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2195 d="m 12630.041,636.145 -54.81,0"
2196 id="path1167"
2197 inkscape:connector-curvature="0" /><path
2198 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2199 d="m 12542.751,636.145 -53.795,0"
2200 id="path1169"
2201 inkscape:connector-curvature="0" /><path
2202 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2203 d="m 12456.476,636.145 -53.795,0"
2204 id="path1171"
2205 inkscape:connector-curvature="0" /><path
2206 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2207 d="m 12369.186,636.145 -53.795,0"
2208 id="path1173"
2209 inkscape:connector-curvature="0" /><path
2210 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2211 d="m 12282.911,636.145 -53.795,0"
2212 id="path1175"
2213 inkscape:connector-curvature="0" /><path
2214 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2215 d="m 12195.621,636.145 -53.795,0"
2216 id="path1177"
2217 inkscape:connector-curvature="0" /><path
2218 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2219 d="m 12109.346,636.145 -53.795,0"
2220 id="path1179"
2221 inkscape:connector-curvature="0" /><path
2222 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2223 d="m 12022.056,636.145 -53.795,0"
2224 id="path1181"
2225 inkscape:connector-curvature="0" /><path
2226 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2227 d="m 11935.781,636.145 -53.795,0"
2228 id="path1183"
2229 inkscape:connector-curvature="0" /><path
2230 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2231 d="m 11849.506,636.145 -53.795,0"
2232 id="path1185"
2233 inkscape:connector-curvature="0" /><path
2234 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2235 d="m 11762.216,636.145 -53.795,0"
2236 id="path1187"
2237 inkscape:connector-curvature="0" /><path
2238 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2239 d="m 11675.941,636.145 -53.795,0"
2240 id="path1189"
2241 inkscape:connector-curvature="0" /><path
2242 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2243 d="m 11588.651,636.145 -53.795,0"
2244 id="path1191"
2245 inkscape:connector-curvature="0" /><path
2246 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2247 d="m 11502.376,636.145 -53.795,0"
2248 id="path1193"
2249 inkscape:connector-curvature="0" /><path
2250 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2251 d="m 11415.086,636.145 -53.795,0"
2252 id="path1195"
2253 inkscape:connector-curvature="0" /><path
2254 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2255 d="m 11328.811,636.145 -53.795,0"
2256 id="path1197"
2257 inkscape:connector-curvature="0" /><path
2258 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2259 d="m 11242.536,636.145 -53.795,0"
2260 id="path1199"
2261 inkscape:connector-curvature="0" /><path
2262 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2263 d="m 11155.246,636.145 -53.795,0"
2264 id="path1201"
2265 inkscape:connector-curvature="0" /><path
2266 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2267 d="m 11068.971,636.145 -53.795,0"
2268 id="path1203"
2269 inkscape:connector-curvature="0" /><path
2270 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2271 d="m 10981.681,636.145 -53.795,0"
2272 id="path1205"
2273 inkscape:connector-curvature="0" /><path
2274 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2275 d="m 10895.406,636.145 -53.795,0"
2276 id="path1207"
2277 inkscape:connector-curvature="0" /><path
2278 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2279 d="m 10808.116,636.145 -53.795,0"
2280 id="path1209"
2281 inkscape:connector-curvature="0" /><path
2282 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2283 d="m 10721.841,636.145 -53.795,0"
2284 id="path1211"
2285 inkscape:connector-curvature="0" /><path
2286 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2287 d="m 10635.566,636.145 -53.795,0"
2288 id="path1213"
2289 inkscape:connector-curvature="0" /><path
2290 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2291 d="m 10548.276,636.145 -53.795,0"
2292 id="path1215"
2293 inkscape:connector-curvature="0" /><path
2294 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2295 d="m 10462.001,636.145 -53.795,0"
2296 id="path1217"
2297 inkscape:connector-curvature="0" /><path
2298 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2299 d="m 10374.711,636.145 -53.795,0"
2300 id="path1219"
2301 inkscape:connector-curvature="0" /><path
2302 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2303 d="m 10288.436,636.145 -53.795,0"
2304 id="path1221"
2305 inkscape:connector-curvature="0" /><path
2306 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2307 d="m 10201.146,636.145 -53.795,0"
2308 id="path1223"
2309 inkscape:connector-curvature="0" /><path
2310 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2311 d="m 10114.871,636.145 -53.795,0"
2312 id="path1225"
2313 inkscape:connector-curvature="0" /><path
2314 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2315 d="m 10028.596,636.145 -54.8101,0"
2316 id="path1227"
2317 inkscape:connector-curvature="0" /><path
2318 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2319 d="m 9941.3059,636.145 -53.795,0"
2320 id="path1229"
2321 inkscape:connector-curvature="0" /><path
2322 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2323 d="m 9855.0309,636.145 -53.795,0"
2324 id="path1231"
2325 inkscape:connector-curvature="0" /><path
2326 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2327 d="m 9767.7409,636.145 -53.795,0"
2328 id="path1233"
2329 inkscape:connector-curvature="0" /><path
2330 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2331 d="m 9681.4659,636.145 -53.795,0"
2332 id="path1235"
2333 inkscape:connector-curvature="0" /><path
2334 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2335 d="m 9594.1759,636.145 -53.795,0"
2336 id="path1237"
2337 inkscape:connector-curvature="0" /><path
2338 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2339 d="m 9507.9009,636.145 -53.795,0"
2340 id="path1239"
2341 inkscape:connector-curvature="0" /><path
2342 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2343 d="m 9421.6259,636.145 -54.81,0"
2344 id="path1241"
2345 inkscape:connector-curvature="0" /><path
2346 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2347 d="m 9334.3359,636.145 -53.795,0"
2348 id="path1243"
2349 inkscape:connector-curvature="0" /><path
2350 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2351 d="m 9248.0609,636.145 -53.795,0"
2352 id="path1245"
2353 inkscape:connector-curvature="0" /><path
2354 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2355 d="m 9160.7709,636.145 -53.795,0"
2356 id="path1247"
2357 inkscape:connector-curvature="0" /><path
2358 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2359 d="m 9074.4959,636.145 -53.795,0"
2360 id="path1249"
2361 inkscape:connector-curvature="0" /><path
2362 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2363 d="m 8987.2059,636.145 -53.795,0"
2364 id="path1251"
2365 inkscape:connector-curvature="0" /><path
2366 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2367 d="m 8900.9309,636.145 -53.795,0"
2368 id="path1253"
2369 inkscape:connector-curvature="0" /><path
2370 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2371 d="m 8814.6559,636.145 -54.81,0"
2372 id="path1255"
2373 inkscape:connector-curvature="0" /><path
2374 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2375 d="m 8727.3659,636.145 -53.795,0"
2376 id="path1257"
2377 inkscape:connector-curvature="0" /><path
2378 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2379 d="m 8641.0909,636.145 -53.795,0"
2380 id="path1259"
2381 inkscape:connector-curvature="0" /><path
2382 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2383 d="m 8553.8009,636.145 -53.795,0"
2384 id="path1261"
2385 inkscape:connector-curvature="0" /><path
2386 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2387 d="m 8467.5259,636.145 -53.795,0"
2388 id="path1263"
2389 inkscape:connector-curvature="0" /><path
2390 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2391 d="m 8380.2359,636.145 -53.795,0"
2392 id="path1265"
2393 inkscape:connector-curvature="0" /><path
2394 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2395 d="m 8293.9609,636.145 -53.795,0"
2396 id="path1267"
2397 inkscape:connector-curvature="0" /><path
2398 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2399 d="m 8207.6859,636.145 -54.81,0"
2400 id="path1269"
2401 inkscape:connector-curvature="0" /><path
2402 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2403 d="m 8120.3959,636.145 -53.795,0"
2404 id="path1271"
2405 inkscape:connector-curvature="0" /><path
2406 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2407 d="m 8034.1209,636.145 -53.795,0"
2408 id="path1273"
2409 inkscape:connector-curvature="0" /><path
2410 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2411 d="m 7946.8309,636.145 -53.795,0"
2412 id="path1275"
2413 inkscape:connector-curvature="0" /><path
2414 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2415 d="m 7860.5559,636.145 -53.795,0"
2416 id="path1277"
2417 inkscape:connector-curvature="0" /><path
2418 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2419 d="m 7773.2659,636.145 -53.795,0"
2420 id="path1279"
2421 inkscape:connector-curvature="0" /><path
2422 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2423 d="m 7686.9909,636.145 -53.795,0"
2424 id="path1281"
2425 inkscape:connector-curvature="0" /><path
2426 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2427 d="m 7599.7009,636.145 -53.795,0"
2428 id="path1283"
2429 inkscape:connector-curvature="0" /><path
2430 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2431 d="m 7513.4259,636.145 -53.795,0"
2432 id="path1285"
2433 inkscape:connector-curvature="0" /><path
2434 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2435 d="m 7427.1509,636.145 -53.795,0"
2436 id="path1287"
2437 inkscape:connector-curvature="0" /><path
2438 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2439 d="m 7339.8609,636.145 -53.795,0"
2440 id="path1289"
2441 inkscape:connector-curvature="0" /><path
2442 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2443 d="m 7253.5859,636.145 -53.795,0"
2444 id="path1291"
2445 inkscape:connector-curvature="0" /><path
2446 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2447 d="m 7166.2959,636.145 -53.795,0"
2448 id="path1293"
2449 inkscape:connector-curvature="0" /><path
2450 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2451 d="m 7080.0209,636.145 -53.795,0"
2452 id="path1295"
2453 inkscape:connector-curvature="0" /><path
2454 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2455 d="m 6992.7309,636.145 -53.795,0"
2456 id="path1297"
2457 inkscape:connector-curvature="0" /><path
2458 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2459 d="m 6906.4559,636.145 -53.795,0"
2460 id="path1299"
2461 inkscape:connector-curvature="0" /><path
2462 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2463 d="m 6820.1809,636.145 -53.795,0"
2464 id="path1301"
2465 inkscape:connector-curvature="0" /><path
2466 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2467 d="m 6732.8909,636.145 -53.795,0"
2468 id="path1303"
2469 inkscape:connector-curvature="0" /><path
2470 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2471 d="m 6646.6159,636.145 -53.795,0"
2472 id="path1305"
2473 inkscape:connector-curvature="0" /><path
2474 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2475 d="m 6559.3259,636.145 -53.795,0"
2476 id="path1307"
2477 inkscape:connector-curvature="0" /><path
2478 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2479 d="m 6473.0509,636.145 -53.795,0"
2480 id="path1309"
2481 inkscape:connector-curvature="0" /><path
2482 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2483 d="m 6385.7609,636.145 -53.795,0"
2484 id="path1311"
2485 inkscape:connector-curvature="0" /><path
2486 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2487 d="m 6299.4859,636.145 -53.795,0"
2488 id="path1313"
2489 inkscape:connector-curvature="0" /><path
2490 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2491 d="m 6213.2109,636.145 -54.81,0"
2492 id="path1315"
2493 inkscape:connector-curvature="0" /><path
2494 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2495 d="m 6125.9209,636.145 -53.795,0"
2496 id="path1317"
2497 inkscape:connector-curvature="0" /><path
2498 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2499 d="m 6039.6459,636.145 -53.795,0"
2500 id="path1319"
2501 inkscape:connector-curvature="0" /><path
2502 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2503 d="m 5952.3559,636.145 -53.795,0"
2504 id="path1321"
2505 inkscape:connector-curvature="0" /><path
2506 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2507 d="m 5866.0809,636.145 -53.795,0"
2508 id="path1323"
2509 inkscape:connector-curvature="0" /><path
2510 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2511 d="m 5778.7909,636.145 -53.795,0"
2512 id="path1325"
2513 inkscape:connector-curvature="0" /><path
2514 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2515 d="m 5692.5159,636.145 -53.795,0"
2516 id="path1327"
2517 inkscape:connector-curvature="0" /><path
2518 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2519 d="m 5606.2409,636.145 -54.81,0"
2520 id="path1329"
2521 inkscape:connector-curvature="0" /><path
2522 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2523 d="m 5518.9509,636.145 -53.795,0"
2524 id="path1331"
2525 inkscape:connector-curvature="0" /><path
2526 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2527 d="m 5432.6759,636.145 -53.795,0"
2528 id="path1333"
2529 inkscape:connector-curvature="0" /><path
2530 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2531 d="m 5345.3859,636.145 -53.795,0"
2532 id="path1335"
2533 inkscape:connector-curvature="0" /><path
2534 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2535 d="m 5259.1109,636.145 -53.795,0"
2536 id="path1337"
2537 inkscape:connector-curvature="0" /><path
2538 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2539 d="m 5171.8209,636.145 -53.795,0"
2540 id="path1339"
2541 inkscape:connector-curvature="0" /><path
2542 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2543 d="m 5085.5459,636.145 -53.795,0"
2544 id="path1341"
2545 inkscape:connector-curvature="0" /><path
2546 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2547 d="m 4999.2709,636.145 -54.81,0"
2548 id="path1343"
2549 inkscape:connector-curvature="0" /><path
2550 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2551 d="m 4911.9809,636.145 -53.795,0"
2552 id="path1345"
2553 inkscape:connector-curvature="0" /><path
2554 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2555 d="m 4825.7059,636.145 -53.795,0"
2556 id="path1347"
2557 inkscape:connector-curvature="0" /><path
2558 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2559 d="m 4738.4159,636.145 -53.795,0"
2560 id="path1349"
2561 inkscape:connector-curvature="0" /><path
2562 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2563 d="m 4652.1409,636.145 -53.795,0"
2564 id="path1351"
2565 inkscape:connector-curvature="0" /><path
2566 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2567 d="m 4564.8509,636.145 -53.795,0"
2568 id="path1353"
2569 inkscape:connector-curvature="0" /><path
2570 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2571 d="m 4478.5759,636.145 -53.795,0"
2572 id="path1355"
2573 inkscape:connector-curvature="0" /><path
2574 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2575 d="m 4392.3009,636.145 -54.81,0"
2576 id="path1357"
2577 inkscape:connector-curvature="0" /><path
2578 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2579 d="m 4305.0109,636.145 -53.795,0"
2580 id="path1359"
2581 inkscape:connector-curvature="0" /><path
2582 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2583 d="m 4218.7359,636.145 -53.795,0"
2584 id="path1361"
2585 inkscape:connector-curvature="0" /><path
2586 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2587 d="m 4131.4459,636.145 -53.795,0"
2588 id="path1363"
2589 inkscape:connector-curvature="0" /><path
2590 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2591 d="m 4045.1709,636.145 -53.795,0"
2592 id="path1365"
2593 inkscape:connector-curvature="0" /><path
2594 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2595 d="m 3957.8809,636.145 -53.795,0"
2596 id="path1367"
2597 inkscape:connector-curvature="0" /><path
2598 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2599 d="m 3871.6059,636.145 -53.795,0"
2600 id="path1369"
2601 inkscape:connector-curvature="0" /><path
2602 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2603 d="m 3785.3309,636.145 -54.81,0"
2604 id="path1371"
2605 inkscape:connector-curvature="0" /><path
2606 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2607 d="m 3698.0409,636.145 -53.795,0"
2608 id="path1373"
2609 inkscape:connector-curvature="0" /><path
2610 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2611 d="m 3611.7659,636.145 -53.795,0"
2612 id="path1375"
2613 inkscape:connector-curvature="0" /><path
2614 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2615 d="m 3524.4759,636.145 -53.795,0"
2616 id="path1377"
2617 inkscape:connector-curvature="0" /><path
2618 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2619 d="m 3438.2009,636.145 -53.795,0"
2620 id="path1379"
2621 inkscape:connector-curvature="0" /><path
2622 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2623 d="m 3350.9109,636.145 -53.795,0"
2624 id="path1381"
2625 inkscape:connector-curvature="0" /><path
2626 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2627 d="m 3264.6359,636.145 -53.795,0"
2628 id="path1383"
2629 inkscape:connector-curvature="0" /><path
2630 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2631 d="m 3177.3459,636.145 -53.795,0"
2632 id="path1385"
2633 inkscape:connector-curvature="0" /><path
2634 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2635 d="m 3091.0709,636.145 -53.795,0"
2636 id="path1387"
2637 inkscape:connector-curvature="0" /><path
2638 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2639 d="m 3004.7959,636.145 -53.795,0"
2640 id="path1389"
2641 inkscape:connector-curvature="0" /><path
2642 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2643 d="m 2917.5059,636.145 -53.795,0"
2644 id="path1391"
2645 inkscape:connector-curvature="0" /><path
2646 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2647 d="m 2831.2309,636.145 -53.795,0"
2648 id="path1393"
2649 inkscape:connector-curvature="0" /><path
2650 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2651 d="m 2743.9409,636.145 -53.795,0"
2652 id="path1395"
2653 inkscape:connector-curvature="0" /><path
2654 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2655 d="m 2657.6659,636.145 -53.795,0"
2656 id="path1397"
2657 inkscape:connector-curvature="0" /><path
2658 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2659 d="m 2570.3759,636.145 -53.795,0"
2660 id="path1399"
2661 inkscape:connector-curvature="0" /><path
2662 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2663 d="m 2484.1009,636.145 -53.795,0"
2664 id="path1401"
2665 inkscape:connector-curvature="0" /><path
2666 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2667 d="m 2397.8259,636.145 -53.795,0"
2668 id="path1403"
2669 inkscape:connector-curvature="0" /><path
2670 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2671 d="m 2310.5359,636.145 -53.795,0"
2672 id="path1405"
2673 inkscape:connector-curvature="0" /><path
2674 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2675 d="m 2224.2609,636.145 -53.795,0"
2676 id="path1407"
2677 inkscape:connector-curvature="0" /><path
2678 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2679 d="m 2136.9709,636.145 -53.795,0"
2680 id="path1409"
2681 inkscape:connector-curvature="0" /><path
2682 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2683 d="m 2050.6959,636.145 -53.795,0"
2684 id="path1411"
2685 inkscape:connector-curvature="0" /><path
2686 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2687 d="m 1963.4059,636.145 -53.795,0"
2688 id="path1413"
2689 inkscape:connector-curvature="0" /><path
2690 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2691 d="m 1877.1309,636.145 -53.795,0"
2692 id="path1415"
2693 inkscape:connector-curvature="0" /><path
2694 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2695 d="m 1790.8559,636.145 -54.81,0"
2696 id="path1417"
2697 inkscape:connector-curvature="0" /><path
2698 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2699 d="m 1703.5659,636.145 -53.795,0"
2700 id="path1419"
2701 inkscape:connector-curvature="0" /><path
2702 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2703 d="m 1617.2909,636.145 -53.795,0"
2704 id="path1421"
2705 inkscape:connector-curvature="0" /><path
2706 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2707 d="m 1530.0009,636.145 -53.795,0"
2708 id="path1423"
2709 inkscape:connector-curvature="0" /><path
2710 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2711 d="m 1443.7259,636.145 -53.795,0"
2712 id="path1425"
2713 inkscape:connector-curvature="0" /><path
2714 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2715 d="m 1356.4359,636.145 -53.795,0"
2716 id="path1427"
2717 inkscape:connector-curvature="0" /><path
2718 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2719 d="m 1270.1609,636.145 -53.795,0"
2720 id="path1429"
2721 inkscape:connector-curvature="0" /><path
2722 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2723 d="m 1183.8859,636.145 -54.81,0"
2724 id="path1431"
2725 inkscape:connector-curvature="0" /><path
2726 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2727 d="m 1096.5959,636.145 -53.795,0"
2728 id="path1433"
2729 inkscape:connector-curvature="0" /><path
2730 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2731 d="m 1010.3209,636.145 -53.795,0"
2732 id="path1435"
2733 inkscape:connector-curvature="0" /><path
2734 style="fill:none;stroke:#3465af;stroke-width:28.432024"
2735 d="m 923.0309,636.145 -53.795,0"
2736 id="path1437"
2737 inkscape:connector-curvature="0" /><g
2738 id="g4044"><rect
2739 height="1100.7"
2740 width="1213.6"
2741 y="4753.1133"
2742 x="21109.146"
2743 id="rect1441"
2744 style="fill:#f3e777" /><path
2745 d="m 20656.146,5536.413 0,-405.46 150.7,-169.16 c 82.886,-93.039 170.53,-186.62 194.77,-207.96 l 44.069,-38.798 783.23,-0.086 783.23,-0.086 0,613.5 0,613.5 -978,0 -978,0 0,-405.46 z m 1027.7,136.98 0,-78.372 -169.91,4.925 -169.91,4.9249 -5.09,45.854 c -8.249,74.303 46.711,101.04 207.69,101.04 l 137.21,0 0,-78.372 z m 235.86,-262.94 4.495,-341.31 207.2,-8.6408 207.2,-8.6408 5.144,-46.443 c 9.596,-86.615 -41.863,-102.05 -322.02,-96.607 l -246.71,4.7956 -4.438,419.08 -4.439,419.08 74.537,0 74.538,0 4.494,-341.31 z m 391.3,313.72 c 26.41,-19.286 36.255,-41.399 32.697,-73.447 l -5.09,-45.854 -174.05,0 -174.05,0 -5.38,48.984 c -9.97,90.771 0.993,97.91 150.36,97.91 99.305,0 148.27,-7.6982 175.52,-27.594 z m -627.16,-274.84 0,-77.768 -174.05,0 -174.05,0 0,66.246 c 0,36.436 4.973,71.431 11.051,77.768 6.078,6.3366 84.401,11.521 174.05,11.521 l 163,0 0,-77.768 z m 659.89,-4.9154 5.125,-74.042 -179.18,4.9155 -179.18,4.9155 -5.38,48.984 c -10.473,95.348 -2.259,99.57 183.28,94.197 l 170.2,-4.9284 5.125,-74.042 z m -659.89,-237.63 0,-78.372 -169.91,4.925 -169.91,4.925 -5.097,73.447 -5.097,73.447 175,0 175,0 0,-78.372 z m 659.86,4.925 -5.097,-73.447 -174.05,0 -174.05,0 -5.38,48.984 c -10.289,93.673 -2.146,97.91 188.15,97.91 l 175.52,0 -5.097,-73.447 z m -659.86,-228.98 0,-77.768 -137.21,0 c -97.358,0 -147.91,7.8138 -174.05,26.902 -34.952,25.523 -49.645,92.242 -25.79,117.11 6.078,6.3366 84.401,11.521 174.05,11.521 l 163,0 0,-77.768 z"
2746 id="path1443"
2747 inkscape:connector-curvature="0"
2748 style="fill:#ca4677" /></g><text
2749 style="font-size:9.10937119px;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
2750 class="TextShape"
2751 id="text1489"
2752 transform="scale(1.1035537,0.9061634)"
2753 x="171.41566"
2754 y="9913.7109"><tspan
2755 font-size="635px"
2756 font-weight="400"
2757 class="TextParagraph"
2758 id="tspan1491"
2759 style="font-weight:400;font-size:482.03753662px;font-family:'Times New Roman', serif" /></text>
2760<g
2761 id="g4048"><rect
2762 height="2342.4341"
2763 width="2320.7097"
2764 y="13737.451"
2765 x="18796.941"
2766 id="rect1447"
2767 style="fill:#6076b3" /><rect
2768 id="rect1451"
2769 height="137.78799"
2770 x="18532.135"
2771 width="302.70312"
2772 y="13817.405"
2773 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2774 id="rect1453"
2775 height="137.78799"
2776 x="18532.135"
2777 width="302.70312"
2778 y="14075.544"
2779 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2780 id="rect1455"
2781 height="137.78799"
2782 x="18532.135"
2783 width="302.70312"
2784 y="14334.443"
2785 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2786 id="rect1457"
2787 height="137.78799"
2788 x="18532.135"
2789 width="302.70312"
2790 y="14592.582"
2791 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2792 id="rect1459"
2793 height="137.78799"
2794 x="18532.135"
2795 width="302.70312"
2796 y="14850.721"
2797 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2798 id="rect1461"
2799 height="137.78799"
2800 x="18532.135"
2801 width="302.70312"
2802 y="15109.62"
2803 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2804 id="rect1463"
2805 height="137.78799"
2806 x="18532.135"
2807 width="302.70312"
2808 y="15367.759"
2809 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2810 id="rect1465"
2811 height="137.78799"
2812 x="18532.135"
2813 width="302.70312"
2814 y="15625.896"
2815 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2816 id="rect1467"
2817 height="137.78799"
2818 x="18532.135"
2819 width="302.70312"
2820 y="15884.035"
2821 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2822 id="rect1469"
2823 height="137.78799"
2824 x="21080.053"
2825 width="302.70312"
2826 y="13783.14"
2827 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2828 id="rect1471"
2829 height="137.78799"
2830 x="21080.053"
2831 width="302.70312"
2832 y="14041.277"
2833 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2834 id="rect1473"
2835 height="137.78799"
2836 x="21080.053"
2837 width="302.70312"
2838 y="14299.416"
2839 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2840 id="rect1475"
2841 height="137.78799"
2842 x="21080.053"
2843 width="302.70312"
2844 y="14558.315"
2845 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2846 id="rect1477"
2847 height="137.78799"
2848 x="21080.053"
2849 width="302.70312"
2850 y="14816.454"
2851 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2852 id="rect1479"
2853 height="137.78799"
2854 x="21080.053"
2855 width="302.70312"
2856 y="15074.593"
2857 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2858 id="rect1481"
2859 height="137.78799"
2860 x="21080.053"
2861 width="302.70312"
2862 y="15333.492"
2863 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2864 id="rect1483"
2865 height="137.78799"
2866 x="21080.053"
2867 width="302.70312"
2868 y="15591.631"
2869 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><rect
2870 id="rect1485"
2871 height="137.78799"
2872 x="21080.053"
2873 width="302.70312"
2874 y="15849.769"
2875 style="fill:#e0ee2c;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><text
2876 transform="scale(1.1035537,0.9061634)"
2877 sodipodi:linespacing="125%"
2878 id="text1493"
2879 line-height="125%"
2880 x="17205.688"
2881 y="16777.641"
2882 font-size="1128.9px"
2883 xml:space="preserve"
2884 style="font-size:856.96411133px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><tspan
2885 id="tspan1495"
2886 x="17205.688"
2887 y="16777.641">CPU</tspan></text>
2888</g><text
2889 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
2890 id="text1499"
2891 class="TextShape"
2892 x="-11700.553"
2893 y="565.61298"><tspan
2894 style="font-weight:400;font-size:706px;font-family:'Times New Roman', serif"
2895 id="tspan1501"
2896 class="TextParagraph"
2897 font-weight="400"
2898 font-size="706px"><tspan
2899 id="tspan1503"
2900 transform="matrix(0,-1,1,0,8509,40173)"
2901 class="TextPosition"
2902 x="12640.447"
2903 y="16397.613"><tspan
2904 style="fill:#000000"
2905 id="tspan1505">PCI, USB, SPI, I2C, ...</tspan></tspan></tspan></text>
2906<path
2907 d="m 12408.066,15561.578 -1115.084,0 0,-1420.331 2230.169,0 0,1420.331 -1115.085,0 z"
2908 id="path1511"
2909 inkscape:connector-curvature="0"
2910 style="fill:#cfe7f5;fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round" /><path
2911 d="m 12408.066,15561.578 -1115.084,0 0,-1420.331 2230.169,0 0,1420.331 -1115.085,0 z"
2912 id="path1513"
2913 inkscape:connector-curvature="0"
2914 style="fill:none;fill-rule:evenodd;stroke:#3465af;stroke-width:19.84712601;stroke-linejoin:round" /><text
2915 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
2916 id="text1515"
2917 class="TextShape"
2918 x="-1394.0863"
2919 y="590.73016"><tspan
2920 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
2921 id="tspan1517"
2922 class="TextParagraph"
2923 font-weight="400"
2924 font-size="635px"><tspan
2925 id="tspan1519"
2926 class="TextPosition"
2927 x="11487.915"
2928 y="14672.743"><tspan
2929 style="fill:#000000"
2930 id="tspan1521">Bridge</tspan></tspan></tspan></text>
2931<text
2932 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"
2933 id="text1523"
2934 class="TextShape"
2935 x="-1450.5308"
2936 y="1324.5078"><tspan
2937 style="font-weight:400;font-size:635px;font-family:'Times New Roman', serif"
2938 id="tspan1525"
2939 class="TextParagraph"
2940 font-weight="400"
2941 font-size="635px"><tspan
2942 id="tspan1527"
2943 class="TextPosition"
2944 x="11431.471"
2945 y="15406.52"><tspan
2946 style="fill:#000000"
2947 id="tspan1529"> DMA</tspan></tspan></tspan></text>
2948</svg> \ No newline at end of file
diff --git a/Documentation/media/uapi/dvb/dvbstb.svg b/Documentation/media/uapi/dvb/dvbstb.svg
index c4140fb518af..4effe45b448d 100644
--- a/Documentation/media/uapi/dvb/dvbstb.svg
+++ b/Documentation/media/uapi/dvb/dvbstb.svg
@@ -1,651 +1,17 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<svg 2<svg id="svg2" width="237.7mm" height="126.28mm" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" preserveAspectRatio="xMidYMid" version="1.2" viewBox="0 0 23770.221 12628.221" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata id="metadata519"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><rect id="rect197" class="BoundingBox" x="5355.1" y="13.111" width="18403" height="9603" fill="none"/><path id="path199" d="m14556 9614.1h-9200v-9600h18400v9600h-9200z" fill="#fff"/><path id="path201" d="m14556 9614.1h-9200v-9600h18400v9600h-9200z" fill="none" stroke="#000"/><rect id="rect206"
3 xmlns:dc="http://purl.org/dc/elements/1.1/" 3class="BoundingBox" x="13.111" y="4013.1" width="4544" height="2403" fill="none"/><path id="path208" d="m2285.1 6414.1h-2271v-2400h4541v2400h-2270z" fill="#fff"/><path id="path210" d="m2285.1 6414.1h-2271v-2400h4541v2400h-2270z" fill="none" stroke="#000"/><text id="text212" class="TextShape" x="-2443.8889" y="-4585.8892"><tspan id="tspan214" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan216" class="TextPosition" x="1281.111" y="5435.1108"><tspan id="tspan218" fill="#000000">Antena</tspan></tspan></tspan></text>
4 xmlns:cc="http://creativecommons.org/ns#" 4<rect id="rect223" class="BoundingBox" x="6213.1" y="1813.1" width="4544" height="2403" fill="none"/><path id="path225" d="m8485.1 4214.1h-2271v-2400h4541v2400h-2270z" fill="#fff"/><path id="path227" d="m8485.1 4214.1h-2271v-2400h4541v2400h-2270z" fill="none" stroke="#000"/><text id="text229" class="TextShape" x="-2443.8889" y="-4585.8892"><tspan id="tspan231" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan233" class="TextPosition" x="7217.1108" y="3235.1111"><tspan id="tspan235" fill="#000000">Frontend</tspan></tspan></tspan></text>
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 5<rect id="rect240" class="BoundingBox" x="12113" y="1813.1" width="4544" height="2403" fill="none"/><path id="path242" d="m14385 4214.1h-2271v-2400h4541v2400h-2270z" fill="#fff"/><path id="path244" d="m14385 4214.1h-2271v-2400h4541v2400h-2270z" fill="none" stroke="#000"/><text id="text246" class="TextShape" x="-2443.8889" y="-4585.8892"><tspan id="tspan248" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan250" class="TextPosition" x="13944.111" y="3235.1111"><tspan id="tspan252" fill="#000000">CA</tspan></tspan></tspan></text>
6 xmlns:svg="http://www.w3.org/2000/svg" 6<rect id="rect257" class="BoundingBox" x="18113" y="1813.1" width="4544" height="2403" fill="none"/><path id="path259" d="m20385 4214.1h-2271v-2400h4541v2400h-2270z" fill="#fff"/><path id="path261" d="m20385 4214.1h-2271v-2400h4541v2400h-2270z" fill="none" stroke="#000"/><text id="text263" class="TextShape" x="-2443.8889" y="-4585.8892"><tspan id="tspan265" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan267" class="TextPosition" x="19384.111" y="3235.1111"><tspan id="tspan269" fill="#000000">Demux</tspan></tspan></tspan></text>
7 xmlns="http://www.w3.org/2000/svg" 7<rect id="rect274" class="BoundingBox" x="6113.1" y="5813.1" width="4544" height="2403" fill="none"/><path id="path276" d="m8385.1 8214.1h-2271v-2400h4541v2400h-2270z" fill="#fff"/><path id="path278" d="m8385.1 8214.1h-2271v-2400h4541v2400h-2270z" fill="none" stroke="#000"/><text id="text280" class="TextShape" x="-2443.8889" y="-4585.8892"><tspan id="tspan282" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan284" class="TextPosition" x="7733.1108" y="7235.1108"><tspan id="tspan286" fill="#000000">SEC</tspan></tspan></tspan></text>
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" 8<rect id="rect291" class="BoundingBox" x="12213" y="5813.1" width="4544" height="2403" fill="none"/><path id="path293" d="m14485 8214.1h-2271v-2400h4541v2400h-2270z" fill="#fff"/><path id="path295" d="m14485 8214.1h-2271v-2400h4541v2400h-2270z" fill="none" stroke="#000"/><text id="text297" class="TextShape" x="-2443.8889" y="-4585.8892"><tspan id="tspan299" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan301" class="TextPosition" x="13676.111" y="7235.1108"><tspan id="tspan303" fill="#000000">Audio</tspan></tspan></tspan></text>
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" 9<rect id="rect308" class="BoundingBox" x="18113" y="5813.1" width="4544" height="2403" fill="none"/><path id="path310" d="m20385 8214.1h-2271v-2400h4541v2400h-2270z" fill="#fff"/><path id="path312" d="m20385 8214.1h-2271v-2400h4541v2400h-2270z" fill="none" stroke="#000"/><text id="text314" class="TextShape" x="-2443.8889" y="-4585.8892"><tspan id="tspan316" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan318" class="TextPosition" x="19583.111" y="7235.1108"><tspan id="tspan320" fill="#000000">Video</tspan></tspan></tspan></text>
10 version="1.2" 10<rect id="rect325" class="BoundingBox" x="15213" y="10213" width="4544" height="2403" fill="none"/><path id="path327" d="m17485 12614h-2271v-2400h4541v2400h-2270z" fill="#fff"/><path id="path329" d="m17485 12614h-2271v-2400h4541v2400h-2270z" fill="none" stroke="#000"/><text id="text331" class="TextShape" x="-2443.8889" y="-4585.8892"><tspan id="tspan333" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan335" class="TextPosition" x="17076.111" y="11635.111"><tspan id="tspan337" fill="#000000">TV</tspan></tspan></tspan></text>
11 width="237.70221mm" 11<rect id="rect342" class="BoundingBox" x="4555.1" y="3014.1" width="1661" height="2202" fill="none"/><path id="path344" d="m4556.1 5214.1 1400-1857" fill="none" stroke="#000"/><path id="path346" d="m6215.1 3014.1-391 269 240 181 151-450z"/><rect id="rect351" class="BoundingBox" x="4555.1" y="5213.1" width="1561" height="1802" fill="none"/><path id="path353" d="m4556.1 5214.1 1277 1475" fill="none" stroke="#000"/><path id="path355" d="m6115.1 7014.1-181-438-227 196 408 242z"/><rect id="rect360" class="BoundingBox" x="10755" y="2864.1" width="1361" height="301" fill="none"/><path id="path362" d="m10756 3014.1h929" fill="none" stroke="#000"/><path id="path364" d="m12115 3014.1-450-150v300l450-150z"/><rect id="rect369" class="BoundingBox" x="16655" y="2864.1" width="1461" height="301" fill="none"/><path id="path371" d="m16656 3014.1h1029" fill="none" stroke="#000"/><path id="path373"
12 height="126.28221mm" 12d="m18115 3014.1-450-150v300l450-150z"/><rect id="rect378" class="BoundingBox" x="20235" y="4213.1" width="301" height="1602" fill="none"/><path id="path380" d="m20385 4214.1v1170" fill="none" stroke="#000"/><path id="path382" d="m20385 5814.1 150-450h-300l150 450z"/><rect id="rect387" class="BoundingBox" x="17485" y="8213.1" width="2902" height="2002" fill="none"/><path id="path389" d="m20385 8214.1-2546 1756" fill="none" stroke="#000"/><path id="path391" d="m17485 10214 456-132-171-247-285 379z"/><rect id="rect396" class="BoundingBox" x="14484" y="8213.1" width="3002" height="2002" fill="none"/><path id="path398" d="m14485 8214.1 2642 1761" fill="none" stroke="#000"/><path id="path400" d="m17485 10214-291-374-167 249 458 125z"/><rect id="rect405" class="BoundingBox" x="14485" y="4213.1" width="5902" height="1629" fill="none"/><path id="path407" d="m20385 4214.1-51 14" fill="none"
13 viewBox="0 0 23770.221 12628.221" 13stroke="#000"/><path id="path409" d="m20283 4242.1-52 14" fill="none" stroke="#000"/><path id="path411" d="m20180 4270.1-51 13" fill="none" stroke="#000"/><path id="path413" d="m20078 4297.1-52 14" fill="none" stroke="#000"/><path id="path415" d="m19975 4325.1-51 14" fill="none" stroke="#000"/><path id="path417" d="m19873 4353.1-52 14" fill="none" stroke="#000"/><path id="path419" d="m19770 4381.1-51 14" fill="none" stroke="#000"/><path id="path421" d="m19668 4409.1-52 13" fill="none" stroke="#000"/><path id="path423" d="m19565 4436.1-51 14" fill="none" stroke="#000"/><path id="path425" d="m19463 4464.1-52 14" fill="none" stroke="#000"/><path id="path427" d="m19360 4492.1-51 14" fill="none" stroke="#000"/><path id="path429" d="m19258 4520.1-52 14" fill="none" stroke="#000"/><path id="path431" d="m19155 4547.1-51 14" fill="none" stroke="#000"/><path id="path433" d="m19053 4575.1-52 14"
14 preserveAspectRatio="xMidYMid" 14fill="none" stroke="#000"/><path id="path435" d="m18950 4603.1-51 14" fill="none" stroke="#000"/><path id="path437" d="m18848 4631.1-51 14" fill="none" stroke="#000"/><path id="path439" d="m18745 4659.1-51 14" fill="none" stroke="#000"/><path id="path441" d="m18643 4686.1-51 14" fill="none" stroke="#000"/><path id="path443" d="m18540 4714.1-51 14" fill="none" stroke="#000"/><path id="path445" d="m18438 4742.1-51 14" fill="none" stroke="#000"/><path id="path447" d="m18335 4770.1-51 14" fill="none" stroke="#000"/><path id="path449" d="m18233 4798.1-51 14" fill="none" stroke="#000"/><path id="path451" d="m18130 4825.1-51 14" fill="none" stroke="#000"/><path id="path453" d="m18028 4853.1-51 14" fill="none" stroke="#000"/><path id="path455" d="m17925 4881.1-51 14" fill="none" stroke="#000"/><path id="path457" d="m17823 4909.1-51 14" fill="none" stroke="#000"/><path id="path459" d="m17720
15 xml:space="preserve" 154937.1-51 13" fill="none" stroke="#000"/><path id="path461" d="m17618 4964.1-51 14" fill="none" stroke="#000"/><path id="path463" d="m17516 4992.1-52 14" fill="none" stroke="#000"/><path id="path465" d="m17413 5020.1-51 14" fill="none" stroke="#000"/><path id="path467" d="m17311 5048.1-52 14" fill="none" stroke="#000"/><path id="path469" d="m17208 5076.1-51 13" fill="none" stroke="#000"/><path id="path471" d="m17106 5103.1-52 14" fill="none" stroke="#000"/><path id="path473" d="m17003 5131.1-51 14" fill="none" stroke="#000"/><path id="path475" d="m16901 5159.1-52 14" fill="none" stroke="#000"/><path id="path477" d="m16798 5187.1-51 14" fill="none" stroke="#000"/><path id="path479" d="m16696 5214.1-52 14" fill="none" stroke="#000"/><path id="path481" d="m16593 5242.1-51 14" fill="none" stroke="#000"/><path id="path483" d="m16491 5270.1-52 14" fill="none" stroke="#000"/><path id="path485"
16 id="svg2" 16d="m16388 5298.1-51 14" fill="none" stroke="#000"/><path id="path487" d="m16286 5326.1-52 14" fill="none" stroke="#000"/><path id="path489" d="m16183 5353.1-51 14" fill="none" stroke="#000"/><path id="path491" d="m16081 5381.1-51 14" fill="none" stroke="#000"/><path id="path493" d="m15978 5409.1-51 14" fill="none" stroke="#000"/><path id="path495" d="m15876 5437.1-51 14" fill="none" stroke="#000"/><path id="path497" d="m15773 5465.1-51 14" fill="none" stroke="#000"/><path id="path499" d="m15671 5492.1-51 14" fill="none" stroke="#000"/><path id="path501" d="m15568 5520.1-51 14" fill="none" stroke="#000"/><path id="path503" d="m15466 5548.1-51 14" fill="none" stroke="#000"/><path id="path505" d="m15363 5576.1-51 14" fill="none" stroke="#000"/><path id="path507" d="m15261 5604.1-51 13" fill="none" stroke="#000"/><path id="path509" d="m15158 5631.1-51 14" fill="none" stroke="#000"/><path
17 inkscape:version="0.91 r13725" 17id="path511" d="m15056 5659.1-51 14" fill="none" stroke="#000"/><path id="path513" d="m14953 5687.1-51 14" fill="none" stroke="#000"/><path id="path515" d="m14485 5814.1 474 27-79-290-395 263z"/></svg>
18 sodipodi:docname="dvbstb.svg"
19 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata
20 id="metadata519"><rdf:RDF><cc:Work
21 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1"
26 objecttolerance="10"
27 gridtolerance="10"
28 guidetolerance="10"
29 inkscape:pageopacity="0"
30 inkscape:pageshadow="2"
31 inkscape:window-width="1920"
32 inkscape:window-height="997"
33 id="namedview517"
34 showgrid="false"
35 inkscape:zoom="1.0818519"
36 inkscape:cx="411.31718"
37 inkscape:cy="274.87517"
38 inkscape:window-x="1920"
39 inkscape:window-y="30"
40 inkscape:window-maximized="1"
41 inkscape:current-layer="svg2"
42 fit-margin-top="0"
43 fit-margin-left="0"
44 fit-margin-right="0"
45 fit-margin-bottom="0" /><defs
46 class="ClipPathGroup"
47 id="defs4" /><defs
48 id="defs9" /><defs
49 id="defs90" /><defs
50 id="defs113" /><defs
51 class="TextShapeIndex"
52 id="defs124" /><defs
53 class="EmbeddedBulletChars"
54 id="defs128" /><defs
55 class="TextEmbeddedBitmaps"
56 id="defs157" /><rect
57 class="BoundingBox"
58 x="5355.1108"
59 y="13.111"
60 width="18403"
61 height="9603"
62 id="rect197"
63 style="fill:none;stroke:none" /><path
64 d="m 14556.111,9614.111 -9200,0 0,-9600 18400,0 0,9600 -9200,0 z"
65 id="path199"
66 inkscape:connector-curvature="0"
67 style="fill:#ffffff;stroke:none" /><path
68 d="m 14556.111,9614.111 -9200,0 0,-9600 18400,0 0,9600 -9200,0 z"
69 id="path201"
70 inkscape:connector-curvature="0"
71 style="fill:none;stroke:#000000" /><rect
72 class="BoundingBox"
73 x="13.111"
74 y="4013.1111"
75 width="4544"
76 height="2403"
77 id="rect206"
78 style="fill:none;stroke:none" /><path
79 d="m 2285.111,6414.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
80 id="path208"
81 inkscape:connector-curvature="0"
82 style="fill:#ffffff;stroke:none" /><path
83 d="m 2285.111,6414.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
84 id="path210"
85 inkscape:connector-curvature="0"
86 style="fill:none;stroke:#000000" /><text
87 class="TextShape"
88 id="text212"
89 y="-4585.8892"
90 x="-2443.8889"><tspan
91 class="TextParagraph"
92 font-size="635px"
93 font-weight="400"
94 id="tspan214"
95 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
96 class="TextPosition"
97 x="1281.111"
98 y="5435.1108"
99 id="tspan216"><tspan
100 id="tspan218"
101 style="fill:#000000;stroke:none">Antena</tspan></tspan></tspan></text>
102<rect
103 class="BoundingBox"
104 x="6213.1108"
105 y="1813.111"
106 width="4544"
107 height="2403"
108 id="rect223"
109 style="fill:none;stroke:none" /><path
110 d="m 8485.111,4214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
111 id="path225"
112 inkscape:connector-curvature="0"
113 style="fill:#ffffff;stroke:none" /><path
114 d="m 8485.111,4214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
115 id="path227"
116 inkscape:connector-curvature="0"
117 style="fill:none;stroke:#000000" /><text
118 class="TextShape"
119 id="text229"
120 x="-2443.8889"
121 y="-4585.8892"><tspan
122 class="TextParagraph"
123 font-size="635px"
124 font-weight="400"
125 id="tspan231"
126 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
127 class="TextPosition"
128 x="7217.1108"
129 y="3235.1111"
130 id="tspan233"><tspan
131 id="tspan235"
132 style="fill:#000000;stroke:none">Frontend</tspan></tspan></tspan></text>
133<rect
134 class="BoundingBox"
135 x="12113.111"
136 y="1813.111"
137 width="4544"
138 height="2403"
139 id="rect240"
140 style="fill:none;stroke:none" /><path
141 d="m 14385.111,4214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
142 id="path242"
143 inkscape:connector-curvature="0"
144 style="fill:#ffffff;stroke:none" /><path
145 d="m 14385.111,4214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
146 id="path244"
147 inkscape:connector-curvature="0"
148 style="fill:none;stroke:#000000" /><text
149 class="TextShape"
150 id="text246"
151 x="-2443.8889"
152 y="-4585.8892"><tspan
153 class="TextParagraph"
154 font-size="635px"
155 font-weight="400"
156 id="tspan248"
157 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
158 class="TextPosition"
159 x="13944.111"
160 y="3235.1111"
161 id="tspan250"><tspan
162 id="tspan252"
163 style="fill:#000000;stroke:none">CA</tspan></tspan></tspan></text>
164<rect
165 class="BoundingBox"
166 x="18113.111"
167 y="1813.111"
168 width="4544"
169 height="2403"
170 id="rect257"
171 style="fill:none;stroke:none" /><path
172 d="m 20385.111,4214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
173 id="path259"
174 inkscape:connector-curvature="0"
175 style="fill:#ffffff;stroke:none" /><path
176 d="m 20385.111,4214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
177 id="path261"
178 inkscape:connector-curvature="0"
179 style="fill:none;stroke:#000000" /><text
180 class="TextShape"
181 id="text263"
182 x="-2443.8889"
183 y="-4585.8892"><tspan
184 class="TextParagraph"
185 font-size="635px"
186 font-weight="400"
187 id="tspan265"
188 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
189 class="TextPosition"
190 x="19384.111"
191 y="3235.1111"
192 id="tspan267"><tspan
193 id="tspan269"
194 style="fill:#000000;stroke:none">Demux</tspan></tspan></tspan></text>
195<rect
196 class="BoundingBox"
197 x="6113.1108"
198 y="5813.1108"
199 width="4544"
200 height="2403"
201 id="rect274"
202 style="fill:none;stroke:none" /><path
203 d="m 8385.111,8214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
204 id="path276"
205 inkscape:connector-curvature="0"
206 style="fill:#ffffff;stroke:none" /><path
207 d="m 8385.111,8214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
208 id="path278"
209 inkscape:connector-curvature="0"
210 style="fill:none;stroke:#000000" /><text
211 class="TextShape"
212 id="text280"
213 x="-2443.8889"
214 y="-4585.8892"><tspan
215 class="TextParagraph"
216 font-size="635px"
217 font-weight="400"
218 id="tspan282"
219 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
220 class="TextPosition"
221 x="7733.1108"
222 y="7235.1108"
223 id="tspan284"><tspan
224 id="tspan286"
225 style="fill:#000000;stroke:none">SEC</tspan></tspan></tspan></text>
226<rect
227 class="BoundingBox"
228 x="12213.111"
229 y="5813.1108"
230 width="4544"
231 height="2403"
232 id="rect291"
233 style="fill:none;stroke:none" /><path
234 d="m 14485.111,8214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
235 id="path293"
236 inkscape:connector-curvature="0"
237 style="fill:#ffffff;stroke:none" /><path
238 d="m 14485.111,8214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
239 id="path295"
240 inkscape:connector-curvature="0"
241 style="fill:none;stroke:#000000" /><text
242 class="TextShape"
243 id="text297"
244 x="-2443.8889"
245 y="-4585.8892"><tspan
246 class="TextParagraph"
247 font-size="635px"
248 font-weight="400"
249 id="tspan299"
250 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
251 class="TextPosition"
252 x="13676.111"
253 y="7235.1108"
254 id="tspan301"><tspan
255 id="tspan303"
256 style="fill:#000000;stroke:none">Audio</tspan></tspan></tspan></text>
257<rect
258 class="BoundingBox"
259 x="18113.111"
260 y="5813.1108"
261 width="4544"
262 height="2403"
263 id="rect308"
264 style="fill:none;stroke:none" /><path
265 d="m 20385.111,8214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
266 id="path310"
267 inkscape:connector-curvature="0"
268 style="fill:#ffffff;stroke:none" /><path
269 d="m 20385.111,8214.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
270 id="path312"
271 inkscape:connector-curvature="0"
272 style="fill:none;stroke:#000000" /><text
273 class="TextShape"
274 id="text314"
275 x="-2443.8889"
276 y="-4585.8892"><tspan
277 class="TextParagraph"
278 font-size="635px"
279 font-weight="400"
280 id="tspan316"
281 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
282 class="TextPosition"
283 x="19583.111"
284 y="7235.1108"
285 id="tspan318"><tspan
286 id="tspan320"
287 style="fill:#000000;stroke:none">Video</tspan></tspan></tspan></text>
288<rect
289 class="BoundingBox"
290 x="15213.111"
291 y="10213.111"
292 width="4544"
293 height="2403"
294 id="rect325"
295 style="fill:none;stroke:none" /><path
296 d="m 17485.111,12614.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
297 id="path327"
298 inkscape:connector-curvature="0"
299 style="fill:#ffffff;stroke:none" /><path
300 d="m 17485.111,12614.111 -2271,0 0,-2400 4541,0 0,2400 -2270,0 z"
301 id="path329"
302 inkscape:connector-curvature="0"
303 style="fill:none;stroke:#000000" /><text
304 class="TextShape"
305 id="text331"
306 x="-2443.8889"
307 y="-4585.8892"><tspan
308 class="TextParagraph"
309 font-size="635px"
310 font-weight="400"
311 id="tspan333"
312 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
313 class="TextPosition"
314 x="17076.111"
315 y="11635.111"
316 id="tspan335"><tspan
317 id="tspan337"
318 style="fill:#000000;stroke:none">TV</tspan></tspan></tspan></text>
319<rect
320 class="BoundingBox"
321 x="4555.1108"
322 y="3014.1111"
323 width="1661"
324 height="2202"
325 id="rect342"
326 style="fill:none;stroke:none" /><path
327 d="m 4556.111,5214.111 1400,-1857"
328 id="path344"
329 inkscape:connector-curvature="0"
330 style="fill:none;stroke:#000000" /><path
331 d="m 6215.111,3014.111 -391,269 240,181 151,-450 z"
332 id="path346"
333 inkscape:connector-curvature="0"
334 style="fill:#000000;stroke:none" /><rect
335 class="BoundingBox"
336 x="4555.1108"
337 y="5213.1108"
338 width="1561"
339 height="1802"
340 id="rect351"
341 style="fill:none;stroke:none" /><path
342 d="m 4556.111,5214.111 1277,1475"
343 id="path353"
344 inkscape:connector-curvature="0"
345 style="fill:none;stroke:#000000" /><path
346 d="m 6115.111,7014.111 -181,-438 -227,196 408,242 z"
347 id="path355"
348 inkscape:connector-curvature="0"
349 style="fill:#000000;stroke:none" /><rect
350 class="BoundingBox"
351 x="10755.111"
352 y="2864.1111"
353 width="1361"
354 height="301"
355 id="rect360"
356 style="fill:none;stroke:none" /><path
357 d="m 10756.111,3014.111 929,0"
358 id="path362"
359 inkscape:connector-curvature="0"
360 style="fill:none;stroke:#000000" /><path
361 d="m 12115.111,3014.111 -450,-150 0,300 450,-150 z"
362 id="path364"
363 inkscape:connector-curvature="0"
364 style="fill:#000000;stroke:none" /><rect
365 class="BoundingBox"
366 x="16655.111"
367 y="2864.1111"
368 width="1461"
369 height="301"
370 id="rect369"
371 style="fill:none;stroke:none" /><path
372 d="m 16656.111,3014.111 1029,0"
373 id="path371"
374 inkscape:connector-curvature="0"
375 style="fill:none;stroke:#000000" /><path
376 d="m 18115.111,3014.111 -450,-150 0,300 450,-150 z"
377 id="path373"
378 inkscape:connector-curvature="0"
379 style="fill:#000000;stroke:none" /><rect
380 class="BoundingBox"
381 x="20235.111"
382 y="4213.1108"
383 width="301"
384 height="1602"
385 id="rect378"
386 style="fill:none;stroke:none" /><path
387 d="m 20385.111,4214.111 0,1170"
388 id="path380"
389 inkscape:connector-curvature="0"
390 style="fill:none;stroke:#000000" /><path
391 d="m 20385.111,5814.111 150,-450 -300,0 150,450 z"
392 id="path382"
393 inkscape:connector-curvature="0"
394 style="fill:#000000;stroke:none" /><rect
395 class="BoundingBox"
396 x="17485.111"
397 y="8213.1113"
398 width="2902"
399 height="2002"
400 id="rect387"
401 style="fill:none;stroke:none" /><path
402 d="m 20385.111,8214.111 -2546,1756"
403 id="path389"
404 inkscape:connector-curvature="0"
405 style="fill:none;stroke:#000000" /><path
406 d="m 17485.111,10214.111 456,-132 -171,-247 -285,379 z"
407 id="path391"
408 inkscape:connector-curvature="0"
409 style="fill:#000000;stroke:none" /><rect
410 class="BoundingBox"
411 x="14484.111"
412 y="8213.1113"
413 width="3002"
414 height="2002"
415 id="rect396"
416 style="fill:none;stroke:none" /><path
417 d="m 14485.111,8214.111 2642,1761"
418 id="path398"
419 inkscape:connector-curvature="0"
420 style="fill:none;stroke:#000000" /><path
421 d="m 17485.111,10214.111 -291,-374 -167,249 458,125 z"
422 id="path400"
423 inkscape:connector-curvature="0"
424 style="fill:#000000;stroke:none" /><rect
425 class="BoundingBox"
426 x="14485.111"
427 y="4213.1108"
428 width="5902"
429 height="1629"
430 id="rect405"
431 style="fill:none;stroke:none" /><path
432 d="m 20385.111,4214.111 -51,14"
433 id="path407"
434 inkscape:connector-curvature="0"
435 style="fill:none;stroke:#000000" /><path
436 d="m 20283.111,4242.111 -52,14"
437 id="path409"
438 inkscape:connector-curvature="0"
439 style="fill:none;stroke:#000000" /><path
440 d="m 20180.111,4270.111 -51,13"
441 id="path411"
442 inkscape:connector-curvature="0"
443 style="fill:none;stroke:#000000" /><path
444 d="m 20078.111,4297.111 -52,14"
445 id="path413"
446 inkscape:connector-curvature="0"
447 style="fill:none;stroke:#000000" /><path
448 d="m 19975.111,4325.111 -51,14"
449 id="path415"
450 inkscape:connector-curvature="0"
451 style="fill:none;stroke:#000000" /><path
452 d="m 19873.111,4353.111 -52,14"
453 id="path417"
454 inkscape:connector-curvature="0"
455 style="fill:none;stroke:#000000" /><path
456 d="m 19770.111,4381.111 -51,14"
457 id="path419"
458 inkscape:connector-curvature="0"
459 style="fill:none;stroke:#000000" /><path
460 d="m 19668.111,4409.111 -52,13"
461 id="path421"
462 inkscape:connector-curvature="0"
463 style="fill:none;stroke:#000000" /><path
464 d="m 19565.111,4436.111 -51,14"
465 id="path423"
466 inkscape:connector-curvature="0"
467 style="fill:none;stroke:#000000" /><path
468 d="m 19463.111,4464.111 -52,14"
469 id="path425"
470 inkscape:connector-curvature="0"
471 style="fill:none;stroke:#000000" /><path
472 d="m 19360.111,4492.111 -51,14"
473 id="path427"
474 inkscape:connector-curvature="0"
475 style="fill:none;stroke:#000000" /><path
476 d="m 19258.111,4520.111 -52,14"
477 id="path429"
478 inkscape:connector-curvature="0"
479 style="fill:none;stroke:#000000" /><path
480 d="m 19155.111,4547.111 -51,14"
481 id="path431"
482 inkscape:connector-curvature="0"
483 style="fill:none;stroke:#000000" /><path
484 d="m 19053.111,4575.111 -52,14"
485 id="path433"
486 inkscape:connector-curvature="0"
487 style="fill:none;stroke:#000000" /><path
488 d="m 18950.111,4603.111 -51,14"
489 id="path435"
490 inkscape:connector-curvature="0"
491 style="fill:none;stroke:#000000" /><path
492 d="m 18848.111,4631.111 -51,14"
493 id="path437"
494 inkscape:connector-curvature="0"
495 style="fill:none;stroke:#000000" /><path
496 d="m 18745.111,4659.111 -51,14"
497 id="path439"
498 inkscape:connector-curvature="0"
499 style="fill:none;stroke:#000000" /><path
500 d="m 18643.111,4686.111 -51,14"
501 id="path441"
502 inkscape:connector-curvature="0"
503 style="fill:none;stroke:#000000" /><path
504 d="m 18540.111,4714.111 -51,14"
505 id="path443"
506 inkscape:connector-curvature="0"
507 style="fill:none;stroke:#000000" /><path
508 d="m 18438.111,4742.111 -51,14"
509 id="path445"
510 inkscape:connector-curvature="0"
511 style="fill:none;stroke:#000000" /><path
512 d="m 18335.111,4770.111 -51,14"
513 id="path447"
514 inkscape:connector-curvature="0"
515 style="fill:none;stroke:#000000" /><path
516 d="m 18233.111,4798.111 -51,14"
517 id="path449"
518 inkscape:connector-curvature="0"
519 style="fill:none;stroke:#000000" /><path
520 d="m 18130.111,4825.111 -51,14"
521 id="path451"
522 inkscape:connector-curvature="0"
523 style="fill:none;stroke:#000000" /><path
524 d="m 18028.111,4853.111 -51,14"
525 id="path453"
526 inkscape:connector-curvature="0"
527 style="fill:none;stroke:#000000" /><path
528 d="m 17925.111,4881.111 -51,14"
529 id="path455"
530 inkscape:connector-curvature="0"
531 style="fill:none;stroke:#000000" /><path
532 d="m 17823.111,4909.111 -51,14"
533 id="path457"
534 inkscape:connector-curvature="0"
535 style="fill:none;stroke:#000000" /><path
536 d="m 17720.111,4937.111 -51,13"
537 id="path459"
538 inkscape:connector-curvature="0"
539 style="fill:none;stroke:#000000" /><path
540 d="m 17618.111,4964.111 -51,14"
541 id="path461"
542 inkscape:connector-curvature="0"
543 style="fill:none;stroke:#000000" /><path
544 d="m 17516.111,4992.111 -52,14"
545 id="path463"
546 inkscape:connector-curvature="0"
547 style="fill:none;stroke:#000000" /><path
548 d="m 17413.111,5020.111 -51,14"
549 id="path465"
550 inkscape:connector-curvature="0"
551 style="fill:none;stroke:#000000" /><path
552 d="m 17311.111,5048.111 -52,14"
553 id="path467"
554 inkscape:connector-curvature="0"
555 style="fill:none;stroke:#000000" /><path
556 d="m 17208.111,5076.111 -51,13"
557 id="path469"
558 inkscape:connector-curvature="0"
559 style="fill:none;stroke:#000000" /><path
560 d="m 17106.111,5103.111 -52,14"
561 id="path471"
562 inkscape:connector-curvature="0"
563 style="fill:none;stroke:#000000" /><path
564 d="m 17003.111,5131.111 -51,14"
565 id="path473"
566 inkscape:connector-curvature="0"
567 style="fill:none;stroke:#000000" /><path
568 d="m 16901.111,5159.111 -52,14"
569 id="path475"
570 inkscape:connector-curvature="0"
571 style="fill:none;stroke:#000000" /><path
572 d="m 16798.111,5187.111 -51,14"
573 id="path477"
574 inkscape:connector-curvature="0"
575 style="fill:none;stroke:#000000" /><path
576 d="m 16696.111,5214.111 -52,14"
577 id="path479"
578 inkscape:connector-curvature="0"
579 style="fill:none;stroke:#000000" /><path
580 d="m 16593.111,5242.111 -51,14"
581 id="path481"
582 inkscape:connector-curvature="0"
583 style="fill:none;stroke:#000000" /><path
584 d="m 16491.111,5270.111 -52,14"
585 id="path483"
586 inkscape:connector-curvature="0"
587 style="fill:none;stroke:#000000" /><path
588 d="m 16388.111,5298.111 -51,14"
589 id="path485"
590 inkscape:connector-curvature="0"
591 style="fill:none;stroke:#000000" /><path
592 d="m 16286.111,5326.111 -52,14"
593 id="path487"
594 inkscape:connector-curvature="0"
595 style="fill:none;stroke:#000000" /><path
596 d="m 16183.111,5353.111 -51,14"
597 id="path489"
598 inkscape:connector-curvature="0"
599 style="fill:none;stroke:#000000" /><path
600 d="m 16081.111,5381.111 -51,14"
601 id="path491"
602 inkscape:connector-curvature="0"
603 style="fill:none;stroke:#000000" /><path
604 d="m 15978.111,5409.111 -51,14"
605 id="path493"
606 inkscape:connector-curvature="0"
607 style="fill:none;stroke:#000000" /><path
608 d="m 15876.111,5437.111 -51,14"
609 id="path495"
610 inkscape:connector-curvature="0"
611 style="fill:none;stroke:#000000" /><path
612 d="m 15773.111,5465.111 -51,14"
613 id="path497"
614 inkscape:connector-curvature="0"
615 style="fill:none;stroke:#000000" /><path
616 d="m 15671.111,5492.111 -51,14"
617 id="path499"
618 inkscape:connector-curvature="0"
619 style="fill:none;stroke:#000000" /><path
620 d="m 15568.111,5520.111 -51,14"
621 id="path501"
622 inkscape:connector-curvature="0"
623 style="fill:none;stroke:#000000" /><path
624 d="m 15466.111,5548.111 -51,14"
625 id="path503"
626 inkscape:connector-curvature="0"
627 style="fill:none;stroke:#000000" /><path
628 d="m 15363.111,5576.111 -51,14"
629 id="path505"
630 inkscape:connector-curvature="0"
631 style="fill:none;stroke:#000000" /><path
632 d="m 15261.111,5604.111 -51,13"
633 id="path507"
634 inkscape:connector-curvature="0"
635 style="fill:none;stroke:#000000" /><path
636 d="m 15158.111,5631.111 -51,14"
637 id="path509"
638 inkscape:connector-curvature="0"
639 style="fill:none;stroke:#000000" /><path
640 d="m 15056.111,5659.111 -51,14"
641 id="path511"
642 inkscape:connector-curvature="0"
643 style="fill:none;stroke:#000000" /><path
644 d="m 14953.111,5687.111 -51,14"
645 id="path513"
646 inkscape:connector-curvature="0"
647 style="fill:none;stroke:#000000" /><path
648 d="m 14485.111,5814.111 474,27 -79,-290 -395,263 z"
649 id="path515"
650 inkscape:connector-curvature="0"
651 style="fill:#000000;stroke:none" /></svg> \ No newline at end of file
diff --git a/Documentation/media/uapi/v4l/bayer.svg b/Documentation/media/uapi/v4l/bayer.svg
index fbd4cfb5e6bf..c395113d1876 100644
--- a/Documentation/media/uapi/v4l/bayer.svg
+++ b/Documentation/media/uapi/v4l/bayer.svg
@@ -1,984 +1,29 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<svg 2<svg id="svg2" width="164.15mm" height="46.771mm" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" preserveAspectRatio="xMidYMid" version="1.2" viewBox="0 0 16415.333 4677.1107" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata id="metadata652"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g186" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id6"><rect id="rect189" class="BoundingBox" x="3299" y="3199" width="1303" height="1203" fill="none"/><path id="path191" d="m3950 4400h-650v-1200h1300v1200h-650z" fill="#00f"/><path id="path193" d="m3950
3 xmlns:dc="http://purl.org/dc/elements/1.1/" 34400h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text195" class="TextShape"><tspan id="tspan197" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan199" class="TextPosition" x="3739" y="4021"><tspan id="tspan201" fill="#ffffff">B</tspan></tspan></tspan></text>
4 xmlns:cc="http://creativecommons.org/ns#" 4</g></g><g id="g203" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id7"><rect id="rect206" class="BoundingBox" x="4599" y="3199" width="1303" height="1203" fill="none"/><path id="path208" d="m5250 4400h-650v-1200h1300v1200h-650z" fill="#0c0"/><path id="path210" d="m5250 4400h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text212" class="TextShape"><tspan id="tspan214" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan216" class="TextPosition" x="5003" y="4021"><tspan id="tspan218" fill="#ffffff">G</tspan></tspan></tspan></text>
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 5</g></g><g id="g220" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id8"><rect id="rect223" class="BoundingBox" x="3299" y="4399" width="1303" height="1203" fill="none"/><path id="path225" d="m3950 5600h-650v-1200h1300v1200h-650z" fill="#0c0"/><path id="path227" d="m3950 5600h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text229" class="TextShape"><tspan id="tspan231" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan233" class="TextPosition" x="3703" y="5221"><tspan id="tspan235" fill="#ffffff">G</tspan></tspan></tspan></text>
6 xmlns:svg="http://www.w3.org/2000/svg" 6</g></g><g id="g237" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id9"><rect id="rect240" class="BoundingBox" x="4599" y="4399" width="1303" height="1203" fill="none"/><path id="path242" d="m5250 5600h-650v-1200h1300v1200h-650z" fill="#f00"/><path id="path244" d="m5250 5600h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text246" class="TextShape"><tspan id="tspan248" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan250" class="TextPosition" x="5022" y="5221"><tspan id="tspan252" fill="#ffffff">R</tspan></tspan></tspan></text>
7 xmlns="http://www.w3.org/2000/svg" 7</g></g><g id="g254" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id10" fill="none"><rect id="rect257" class="BoundingBox" x="5999" y="3299" width="1003" height="1003"/><path id="path259" d="m6500 4300h-500v-1e3h1e3v1e3h-500z" stroke="#00f"/></g></g><g id="g261" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id11" fill="none"><rect id="rect264" class="BoundingBox" x="4699" y="5699" width="1003" height="1003"/><path id="path266" d="m5200 6700h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g><g id="g268" class="com.sun.star.drawing.TextShape" transform="translate(-3285.9 -3185.9)"><g id="id12"><rect id="rect271" class="BoundingBox" x="4e3" y="6900" width="2374" height="963" fill="none"/><text id="text273" class="TextShape"><tspan id="tspan275" class="TextParagraph" font-family="sans-serif" font-size="635px"
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" 8font-weight="400"><tspan id="tspan277" class="TextPosition" x="4250" y="7601"><tspan id="tspan279" fill="#000000">BGGR</tspan></tspan></tspan></text>
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" 9</g></g><g id="g281" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id13"><rect id="rect284" class="BoundingBox" x="8799" y="3199" width="1303" height="1203" fill="none"/><path id="path286" d="m9450 4400h-650v-1200h1300v1200h-650z" fill="#00f"/><path id="path288" d="m9450 4400h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text290" class="TextShape"><tspan id="tspan292" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan294" class="TextPosition" x="9239" y="4021"><tspan id="tspan296" fill="#ffffff">B</tspan></tspan></tspan></text>
10 version="1.2" 10</g></g><g id="g298" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id14"><rect id="rect301" class="BoundingBox" x="7499" y="3199" width="1303" height="1203" fill="none"/><path id="path303" d="m8150 4400h-650v-1200h1300v1200h-650z" fill="#0c0"/><path id="path305" d="m8150 4400h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text307" class="TextShape"><tspan id="tspan309" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan311" class="TextPosition" x="7903" y="4021"><tspan id="tspan313" fill="#ffffff">G</tspan></tspan></tspan></text>
11 width="164.15334mm" 11</g></g><g id="g315" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id15"><rect id="rect318" class="BoundingBox" x="8799" y="4399" width="1303" height="1203" fill="none"/><path id="path320" d="m9450 5600h-650v-1200h1300v1200h-650z" fill="#0c0"/><path id="path322" d="m9450 5600h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text324" class="TextShape"><tspan id="tspan326" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan328" class="TextPosition" x="9203" y="5221"><tspan id="tspan330" fill="#ffffff">G</tspan></tspan></tspan></text>
12 height="46.771107mm" 12</g></g><g id="g332" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id16"><rect id="rect335" class="BoundingBox" x="7499" y="4399" width="1303" height="1203" fill="none"/><path id="path337" d="m8150 5600h-650v-1200h1300v1200h-650z" fill="#f00"/><path id="path339" d="m8150 5600h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text341" class="TextShape"><tspan id="tspan343" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan345" class="TextPosition" x="7922" y="5221"><tspan id="tspan347" fill="#ffffff">R</tspan></tspan></tspan></text>
13 viewBox="0 0 16415.333 4677.1107" 13</g></g><g id="g349" class="com.sun.star.drawing.TextShape" transform="translate(-3285.9 -3185.9)"><g id="id17"><rect id="rect352" class="BoundingBox" x="8200" y="6900" width="2374" height="963" fill="none"/><text id="text354" class="TextShape"><tspan id="tspan356" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan358" class="TextPosition" x="8450" y="7601"><tspan id="tspan360" fill="#000000">GBRG</tspan></tspan></tspan></text>
14 preserveAspectRatio="xMidYMid" 14</g></g><g id="g362" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id18"><rect id="rect365" class="BoundingBox" x="17299" y="4399" width="1303" height="1203" fill="none"/><path id="path367" d="m17950 5600h-650v-1200h1300v1200h-650z" fill="#00f"/><path id="path369" d="m17950 5600h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text371" class="TextShape"><tspan id="tspan373" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan375" class="TextPosition" x="17739" y="5221"><tspan id="tspan377" fill="#ffffff">B</tspan></tspan></tspan></text>
15 xml:space="preserve" 15</g></g><g id="g379" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id19"><rect id="rect382" class="BoundingBox" x="17299" y="3199" width="1303" height="1203" fill="none"/><path id="path384" d="m17950 4400h-650v-1200h1300v1200h-650z" fill="#0c0"/><path id="path386" d="m17950 4400h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text388" class="TextShape"><tspan id="tspan390" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan392" class="TextPosition" x="17703" y="4021"><tspan id="tspan394" fill="#ffffff">G</tspan></tspan></tspan></text>
16 id="svg2" 16</g></g><g id="g396" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id20"><rect id="rect399" class="BoundingBox" x="15999" y="4399" width="1303" height="1203" fill="none"/><path id="path401" d="m16650 5600h-650v-1200h1300v1200h-650z" fill="#0c0"/><path id="path403" d="m16650 5600h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text405" class="TextShape"><tspan id="tspan407" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan409" class="TextPosition" x="16403" y="5221"><tspan id="tspan411" fill="#ffffff">G</tspan></tspan></tspan></text>
17 inkscape:version="0.91 r13725" 17</g></g><g id="g413" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id21"><rect id="rect416" class="BoundingBox" x="15999" y="3199" width="1303" height="1203" fill="none"/><path id="path418" d="m16650 4400h-650v-1200h1300v1200h-650z" fill="#f00"/><path id="path420" d="m16650 4400h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text422" class="TextShape"><tspan id="tspan424" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan426" class="TextPosition" x="16422" y="4021"><tspan id="tspan428" fill="#ffffff">R</tspan></tspan></tspan></text>
18 sodipodi:docname="bayer.svg" 18</g></g><g id="g430" class="com.sun.star.drawing.TextShape" transform="translate(-3285.9 -3185.9)"><g id="id22"><rect id="rect433" class="BoundingBox" x="16700" y="6900" width="2374" height="963" fill="none"/><text id="text435" class="TextShape"><tspan id="tspan437" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan439" class="TextPosition" x="16950" y="7601"><tspan id="tspan441" fill="#000000">RGGB</tspan></tspan></tspan></text>
19 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata 19</g></g><g id="g443" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id23"><rect id="rect446" class="BoundingBox" x="11699" y="4399" width="1303" height="1203" fill="none"/><path id="path448" d="m12350 5600h-650v-1200h1300v1200h-650z" fill="#00f"/><path id="path450" d="m12350 5600h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text452" class="TextShape"><tspan id="tspan454" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan456" class="TextPosition" x="12139" y="5221"><tspan id="tspan458" fill="#ffffff">B</tspan></tspan></tspan></text>
20 id="metadata652"><rdf:RDF><cc:Work 20</g></g><g id="g460" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id24"><rect id="rect463" class="BoundingBox" x="11699" y="3199" width="1303" height="1203" fill="none"/><path id="path465" d="m12350 4400h-650v-1200h1300v1200h-650z" fill="#0c0"/><path id="path467" d="m12350 4400h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text469" class="TextShape"><tspan id="tspan471" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan473" class="TextPosition" x="12103" y="4021"><tspan id="tspan475" fill="#ffffff">G</tspan></tspan></tspan></text>
21 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 21</g></g><g id="g477" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id25"><rect id="rect480" class="BoundingBox" x="12999" y="4399" width="1303" height="1203" fill="none"/><path id="path482" d="m13650 5600h-650v-1200h1300v1200h-650z" fill="#0c0"/><path id="path484" d="m13650 5600h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text486" class="TextShape"><tspan id="tspan488" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan490" class="TextPosition" x="13403" y="5221"><tspan id="tspan492" fill="#ffffff">G</tspan></tspan></tspan></text>
22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview 22</g></g><g id="g494" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id26"><rect id="rect497" class="BoundingBox" x="12999" y="3199" width="1303" height="1203" fill="none"/><path id="path499" d="m13650 4400h-650v-1200h1300v1200h-650z" fill="#f00"/><path id="path501" d="m13650 4400h-650v-1200h1300v1200h-650z" fill="none" stroke="#3465a4"/><text id="text503" class="TextShape"><tspan id="tspan505" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan507" class="TextPosition" x="13422" y="4021"><tspan id="tspan509" fill="#ffffff">R</tspan></tspan></tspan></text>
23 pagecolor="#ffffff" 23</g></g><g id="g511" class="com.sun.star.drawing.TextShape" transform="translate(-3285.9 -3185.9)"><g id="id27"><rect id="rect514" class="BoundingBox" x="12400" y="6900" width="2374" height="963" fill="none"/><text id="text516" class="TextShape"><tspan id="tspan518" class="TextParagraph" font-family="sans-serif" font-size="635px" font-weight="400"><tspan id="tspan520" class="TextPosition" x="12650" y="7601"><tspan id="tspan522" fill="#000000">GRBG</tspan></tspan></tspan></text>
24 bordercolor="#666666" 24</g></g><g id="g524" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id28" fill="none"><rect id="rect527" class="BoundingBox" x="5999" y="5699" width="1003" height="1003"/><path id="path529" d="m6500 6700h-500v-1e3h1e3v1e3h-500z" stroke="#00f"/></g></g><g id="g531" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id29" fill="none"><rect id="rect534" class="BoundingBox" x="3399" y="5699" width="1003" height="1003"/><path id="path536" d="m3900 6700h-500v-1e3h1e3v1e3h-500z" stroke="#00f"/></g></g><g id="g538" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id30" fill="none"><rect id="rect541" class="BoundingBox" x="5999" y="4499" width="1003" height="1003"/><path id="path543" d="m6500 5500h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g><g id="g545"
25 borderopacity="1" 25class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id31" fill="none"><rect id="rect548" class="BoundingBox" x="7599" y="5799" width="1003" height="1003"/><path id="path550" d="m8100 6800h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g><g id="g552" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id32" fill="none"><rect id="rect555" class="BoundingBox" x="10199" y="5799" width="1003" height="1003"/><path id="path557" d="m10700 6800h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g><g id="g559" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id33" fill="none"><rect id="rect562" class="BoundingBox" x="8899" y="5799" width="1003" height="1003"/><path id="path564" d="m9400 6800h-500v-1e3h1e3v1e3h-500z" stroke="#00f"/></g></g><g id="g566" class="com.sun.star.drawing.CustomShape"
26 objecttolerance="10" 26transform="translate(-3285.9 -3185.9)"><g id="id34" fill="none"><rect id="rect569" class="BoundingBox" x="10199" y="4499" width="1003" height="1003"/><path id="path571" d="m10700 5500h-500v-1e3h1e3v1e3h-500z" stroke="#f00"/></g></g><g id="g573" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id35" fill="none"><rect id="rect576" class="BoundingBox" x="10199" y="3299" width="1003" height="1003"/><path id="path578" d="m10700 4300h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g><g id="g580" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id36" fill="none"><rect id="rect583" class="BoundingBox" x="14399" y="3299" width="1003" height="1003"/><path id="path585" d="m14900 4300h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g><g id="g587" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g
27 gridtolerance="10" 27id="id37" fill="none"><rect id="rect590" class="BoundingBox" x="14399" y="5799" width="1003" height="1003"/><path id="path592" d="m14900 6800h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g><g id="g594" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id38" fill="none"><rect id="rect597" class="BoundingBox" x="11799" y="5799" width="1003" height="1003"/><path id="path599" d="m12300 6800h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g><g id="g601" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id39" fill="none"><rect id="rect604" class="BoundingBox" x="14399" y="4499" width="1003" height="1003"/><path id="path606" d="m14900 5500h-500v-1e3h1e3v1e3h-500z" stroke="#00f"/></g></g><g id="g608" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id40" fill="none"><rect id="rect611"
28 guidetolerance="10" 28class="BoundingBox" x="13099" y="5799" width="1003" height="1003"/><path id="path613" d="m13600 6800h-500v-1e3h1e3v1e3h-500z" stroke="#f00"/></g></g><g id="g615" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id41" fill="none"><rect id="rect618" class="BoundingBox" x="16099" y="5799" width="1003" height="1003"/><path id="path620" d="m16600 6800h-500v-1e3h1e3v1e3h-500z" stroke="#f00"/></g></g><g id="g622" class="com.sun.star.drawing.CustomShape" transform="translate(-3398.8 -3185.9)"><g id="id42" fill="none"><rect id="rect625" class="BoundingBox" x="18799" y="5799" width="1003" height="1003"/><path id="path627" d="m19300 6800h-500v-1e3h1e3v1e3h-500z" stroke="#f00"/></g></g><g id="g629" class="com.sun.star.drawing.CustomShape" transform="translate(-3398.8 -3185.9)"><g id="id43" fill="none"><rect id="rect632" class="BoundingBox" x="18799" y="3299"
29 inkscape:pageopacity="0" 29width="1003" height="1003"/><path id="path634" d="m19300 4300h-500v-1e3h1e3v1e3h-500z" stroke="#f00"/></g></g><g id="g636" class="com.sun.star.drawing.CustomShape" transform="translate(-3285.9 -3185.9)"><g id="id44" fill="none"><rect id="rect639" class="BoundingBox" x="17399" y="5799" width="1003" height="1003"/><path id="path641" d="m17900 6800h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g><g id="g643" class="com.sun.star.drawing.CustomShape" transform="translate(-3398.8 -3185.9)"><g id="id45" fill="none"><rect id="rect646" class="BoundingBox" x="18799" y="4499" width="1003" height="1003"/><path id="path648" d="m19300 5500h-500v-1e3h1e3v1e3h-500z" stroke="#0c0"/></g></g></svg>
30 inkscape:pageshadow="2"
31 inkscape:window-width="1920"
32 inkscape:window-height="997"
33 id="namedview650"
34 showgrid="false"
35 fit-margin-top="0"
36 fit-margin-left="0"
37 fit-margin-right="0"
38 fit-margin-bottom="0"
39 inkscape:zoom="2.4000866"
40 inkscape:cx="290.82284"
41 inkscape:cy="82.862197"
42 inkscape:window-x="1920"
43 inkscape:window-y="30"
44 inkscape:window-maximized="1"
45 inkscape:current-layer="svg2" /><defs
46 class="ClipPathGroup"
47 id="defs4" /><defs
48 id="defs9" /><defs
49 id="defs82" /><defs
50 id="defs105" /><defs
51 class="TextShapeIndex"
52 id="defs116" /><defs
53 class="EmbeddedBulletChars"
54 id="defs120" /><defs
55 class="TextEmbeddedBitmaps"
56 id="defs149" /><g
57 class="com.sun.star.drawing.CustomShape"
58 id="g186"
59 transform="translate(-3285.889,-3185.889)"><g
60 id="id6"><rect
61 class="BoundingBox"
62 x="3299"
63 y="3199"
64 width="1303"
65 height="1203"
66 id="rect189"
67 style="fill:none;stroke:none" /><path
68 d="m 3950,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
69 id="path191"
70 inkscape:connector-curvature="0"
71 style="fill:#0000ff;stroke:none" /><path
72 d="m 3950,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
73 id="path193"
74 inkscape:connector-curvature="0"
75 style="fill:none;stroke:#3465a4" /><text
76 class="TextShape"
77 id="text195"><tspan
78 class="TextParagraph"
79 font-size="635px"
80 font-weight="400"
81 id="tspan197"
82 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
83 class="TextPosition"
84 x="3739"
85 y="4021"
86 id="tspan199"><tspan
87 id="tspan201"
88 style="fill:#ffffff;stroke:none">B</tspan></tspan></tspan></text>
89</g></g><g
90 class="com.sun.star.drawing.CustomShape"
91 id="g203"
92 transform="translate(-3285.889,-3185.889)"><g
93 id="id7"><rect
94 class="BoundingBox"
95 x="4599"
96 y="3199"
97 width="1303"
98 height="1203"
99 id="rect206"
100 style="fill:none;stroke:none" /><path
101 d="m 5250,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
102 id="path208"
103 inkscape:connector-curvature="0"
104 style="fill:#00cc00;stroke:none" /><path
105 d="m 5250,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
106 id="path210"
107 inkscape:connector-curvature="0"
108 style="fill:none;stroke:#3465a4" /><text
109 class="TextShape"
110 id="text212"><tspan
111 class="TextParagraph"
112 font-size="635px"
113 font-weight="400"
114 id="tspan214"
115 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
116 class="TextPosition"
117 x="5003"
118 y="4021"
119 id="tspan216"><tspan
120 id="tspan218"
121 style="fill:#ffffff;stroke:none">G</tspan></tspan></tspan></text>
122</g></g><g
123 class="com.sun.star.drawing.CustomShape"
124 id="g220"
125 transform="translate(-3285.889,-3185.889)"><g
126 id="id8"><rect
127 class="BoundingBox"
128 x="3299"
129 y="4399"
130 width="1303"
131 height="1203"
132 id="rect223"
133 style="fill:none;stroke:none" /><path
134 d="m 3950,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
135 id="path225"
136 inkscape:connector-curvature="0"
137 style="fill:#00cc00;stroke:none" /><path
138 d="m 3950,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
139 id="path227"
140 inkscape:connector-curvature="0"
141 style="fill:none;stroke:#3465a4" /><text
142 class="TextShape"
143 id="text229"><tspan
144 class="TextParagraph"
145 font-size="635px"
146 font-weight="400"
147 id="tspan231"
148 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
149 class="TextPosition"
150 x="3703"
151 y="5221"
152 id="tspan233"><tspan
153 id="tspan235"
154 style="fill:#ffffff;stroke:none">G</tspan></tspan></tspan></text>
155</g></g><g
156 class="com.sun.star.drawing.CustomShape"
157 id="g237"
158 transform="translate(-3285.889,-3185.889)"><g
159 id="id9"><rect
160 class="BoundingBox"
161 x="4599"
162 y="4399"
163 width="1303"
164 height="1203"
165 id="rect240"
166 style="fill:none;stroke:none" /><path
167 d="m 5250,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
168 id="path242"
169 inkscape:connector-curvature="0"
170 style="fill:#ff0000;stroke:none" /><path
171 d="m 5250,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
172 id="path244"
173 inkscape:connector-curvature="0"
174 style="fill:none;stroke:#3465a4" /><text
175 class="TextShape"
176 id="text246"><tspan
177 class="TextParagraph"
178 font-size="635px"
179 font-weight="400"
180 id="tspan248"
181 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
182 class="TextPosition"
183 x="5022"
184 y="5221"
185 id="tspan250"><tspan
186 id="tspan252"
187 style="fill:#ffffff;stroke:none">R</tspan></tspan></tspan></text>
188</g></g><g
189 class="com.sun.star.drawing.CustomShape"
190 id="g254"
191 transform="translate(-3285.889,-3185.889)"><g
192 id="id10"><rect
193 class="BoundingBox"
194 x="5999"
195 y="3299"
196 width="1003"
197 height="1003"
198 id="rect257"
199 style="fill:none;stroke:none" /><path
200 d="m 6500,4300 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
201 id="path259"
202 inkscape:connector-curvature="0"
203 style="fill:none;stroke:#0000ff" /></g></g><g
204 class="com.sun.star.drawing.CustomShape"
205 id="g261"
206 transform="translate(-3285.889,-3185.889)"><g
207 id="id11"><rect
208 class="BoundingBox"
209 x="4699"
210 y="5699"
211 width="1003"
212 height="1003"
213 id="rect264"
214 style="fill:none;stroke:none" /><path
215 d="m 5200,6700 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
216 id="path266"
217 inkscape:connector-curvature="0"
218 style="fill:none;stroke:#00cc00" /></g></g><g
219 class="com.sun.star.drawing.TextShape"
220 id="g268"
221 transform="translate(-3285.889,-3185.889)"><g
222 id="id12"><rect
223 class="BoundingBox"
224 x="4000"
225 y="6900"
226 width="2374"
227 height="963"
228 id="rect271"
229 style="fill:none;stroke:none" /><text
230 class="TextShape"
231 id="text273"><tspan
232 class="TextParagraph"
233 font-size="635px"
234 font-weight="400"
235 id="tspan275"
236 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
237 class="TextPosition"
238 x="4250"
239 y="7601"
240 id="tspan277"><tspan
241 id="tspan279"
242 style="fill:#000000;stroke:none">BGGR</tspan></tspan></tspan></text>
243</g></g><g
244 class="com.sun.star.drawing.CustomShape"
245 id="g281"
246 transform="translate(-3285.889,-3185.889)"><g
247 id="id13"><rect
248 class="BoundingBox"
249 x="8799"
250 y="3199"
251 width="1303"
252 height="1203"
253 id="rect284"
254 style="fill:none;stroke:none" /><path
255 d="m 9450,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
256 id="path286"
257 inkscape:connector-curvature="0"
258 style="fill:#0000ff;stroke:none" /><path
259 d="m 9450,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
260 id="path288"
261 inkscape:connector-curvature="0"
262 style="fill:none;stroke:#3465a4" /><text
263 class="TextShape"
264 id="text290"><tspan
265 class="TextParagraph"
266 font-size="635px"
267 font-weight="400"
268 id="tspan292"
269 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
270 class="TextPosition"
271 x="9239"
272 y="4021"
273 id="tspan294"><tspan
274 id="tspan296"
275 style="fill:#ffffff;stroke:none">B</tspan></tspan></tspan></text>
276</g></g><g
277 class="com.sun.star.drawing.CustomShape"
278 id="g298"
279 transform="translate(-3285.889,-3185.889)"><g
280 id="id14"><rect
281 class="BoundingBox"
282 x="7499"
283 y="3199"
284 width="1303"
285 height="1203"
286 id="rect301"
287 style="fill:none;stroke:none" /><path
288 d="m 8150,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
289 id="path303"
290 inkscape:connector-curvature="0"
291 style="fill:#00cc00;stroke:none" /><path
292 d="m 8150,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
293 id="path305"
294 inkscape:connector-curvature="0"
295 style="fill:none;stroke:#3465a4" /><text
296 class="TextShape"
297 id="text307"><tspan
298 class="TextParagraph"
299 font-size="635px"
300 font-weight="400"
301 id="tspan309"
302 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
303 class="TextPosition"
304 x="7903"
305 y="4021"
306 id="tspan311"><tspan
307 id="tspan313"
308 style="fill:#ffffff;stroke:none">G</tspan></tspan></tspan></text>
309</g></g><g
310 class="com.sun.star.drawing.CustomShape"
311 id="g315"
312 transform="translate(-3285.889,-3185.889)"><g
313 id="id15"><rect
314 class="BoundingBox"
315 x="8799"
316 y="4399"
317 width="1303"
318 height="1203"
319 id="rect318"
320 style="fill:none;stroke:none" /><path
321 d="m 9450,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
322 id="path320"
323 inkscape:connector-curvature="0"
324 style="fill:#00cc00;stroke:none" /><path
325 d="m 9450,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
326 id="path322"
327 inkscape:connector-curvature="0"
328 style="fill:none;stroke:#3465a4" /><text
329 class="TextShape"
330 id="text324"><tspan
331 class="TextParagraph"
332 font-size="635px"
333 font-weight="400"
334 id="tspan326"
335 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
336 class="TextPosition"
337 x="9203"
338 y="5221"
339 id="tspan328"><tspan
340 id="tspan330"
341 style="fill:#ffffff;stroke:none">G</tspan></tspan></tspan></text>
342</g></g><g
343 class="com.sun.star.drawing.CustomShape"
344 id="g332"
345 transform="translate(-3285.889,-3185.889)"><g
346 id="id16"><rect
347 class="BoundingBox"
348 x="7499"
349 y="4399"
350 width="1303"
351 height="1203"
352 id="rect335"
353 style="fill:none;stroke:none" /><path
354 d="m 8150,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
355 id="path337"
356 inkscape:connector-curvature="0"
357 style="fill:#ff0000;stroke:none" /><path
358 d="m 8150,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
359 id="path339"
360 inkscape:connector-curvature="0"
361 style="fill:none;stroke:#3465a4" /><text
362 class="TextShape"
363 id="text341"><tspan
364 class="TextParagraph"
365 font-size="635px"
366 font-weight="400"
367 id="tspan343"
368 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
369 class="TextPosition"
370 x="7922"
371 y="5221"
372 id="tspan345"><tspan
373 id="tspan347"
374 style="fill:#ffffff;stroke:none">R</tspan></tspan></tspan></text>
375</g></g><g
376 class="com.sun.star.drawing.TextShape"
377 id="g349"
378 transform="translate(-3285.889,-3185.889)"><g
379 id="id17"><rect
380 class="BoundingBox"
381 x="8200"
382 y="6900"
383 width="2374"
384 height="963"
385 id="rect352"
386 style="fill:none;stroke:none" /><text
387 class="TextShape"
388 id="text354"><tspan
389 class="TextParagraph"
390 font-size="635px"
391 font-weight="400"
392 id="tspan356"
393 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
394 class="TextPosition"
395 x="8450"
396 y="7601"
397 id="tspan358"><tspan
398 id="tspan360"
399 style="fill:#000000;stroke:none">GBRG</tspan></tspan></tspan></text>
400</g></g><g
401 class="com.sun.star.drawing.CustomShape"
402 id="g362"
403 transform="translate(-3285.889,-3185.889)"><g
404 id="id18"><rect
405 class="BoundingBox"
406 x="17299"
407 y="4399"
408 width="1303"
409 height="1203"
410 id="rect365"
411 style="fill:none;stroke:none" /><path
412 d="m 17950,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
413 id="path367"
414 inkscape:connector-curvature="0"
415 style="fill:#0000ff;stroke:none" /><path
416 d="m 17950,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
417 id="path369"
418 inkscape:connector-curvature="0"
419 style="fill:none;stroke:#3465a4" /><text
420 class="TextShape"
421 id="text371"><tspan
422 class="TextParagraph"
423 font-size="635px"
424 font-weight="400"
425 id="tspan373"
426 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
427 class="TextPosition"
428 x="17739"
429 y="5221"
430 id="tspan375"><tspan
431 id="tspan377"
432 style="fill:#ffffff;stroke:none">B</tspan></tspan></tspan></text>
433</g></g><g
434 class="com.sun.star.drawing.CustomShape"
435 id="g379"
436 transform="translate(-3285.889,-3185.889)"><g
437 id="id19"><rect
438 class="BoundingBox"
439 x="17299"
440 y="3199"
441 width="1303"
442 height="1203"
443 id="rect382"
444 style="fill:none;stroke:none" /><path
445 d="m 17950,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
446 id="path384"
447 inkscape:connector-curvature="0"
448 style="fill:#00cc00;stroke:none" /><path
449 d="m 17950,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
450 id="path386"
451 inkscape:connector-curvature="0"
452 style="fill:none;stroke:#3465a4" /><text
453 class="TextShape"
454 id="text388"><tspan
455 class="TextParagraph"
456 font-size="635px"
457 font-weight="400"
458 id="tspan390"
459 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
460 class="TextPosition"
461 x="17703"
462 y="4021"
463 id="tspan392"><tspan
464 id="tspan394"
465 style="fill:#ffffff;stroke:none">G</tspan></tspan></tspan></text>
466</g></g><g
467 class="com.sun.star.drawing.CustomShape"
468 id="g396"
469 transform="translate(-3285.889,-3185.889)"><g
470 id="id20"><rect
471 class="BoundingBox"
472 x="15999"
473 y="4399"
474 width="1303"
475 height="1203"
476 id="rect399"
477 style="fill:none;stroke:none" /><path
478 d="m 16650,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
479 id="path401"
480 inkscape:connector-curvature="0"
481 style="fill:#00cc00;stroke:none" /><path
482 d="m 16650,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
483 id="path403"
484 inkscape:connector-curvature="0"
485 style="fill:none;stroke:#3465a4" /><text
486 class="TextShape"
487 id="text405"><tspan
488 class="TextParagraph"
489 font-size="635px"
490 font-weight="400"
491 id="tspan407"
492 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
493 class="TextPosition"
494 x="16403"
495 y="5221"
496 id="tspan409"><tspan
497 id="tspan411"
498 style="fill:#ffffff;stroke:none">G</tspan></tspan></tspan></text>
499</g></g><g
500 class="com.sun.star.drawing.CustomShape"
501 id="g413"
502 transform="translate(-3285.889,-3185.889)"><g
503 id="id21"><rect
504 class="BoundingBox"
505 x="15999"
506 y="3199"
507 width="1303"
508 height="1203"
509 id="rect416"
510 style="fill:none;stroke:none" /><path
511 d="m 16650,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
512 id="path418"
513 inkscape:connector-curvature="0"
514 style="fill:#ff0000;stroke:none" /><path
515 d="m 16650,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
516 id="path420"
517 inkscape:connector-curvature="0"
518 style="fill:none;stroke:#3465a4" /><text
519 class="TextShape"
520 id="text422"><tspan
521 class="TextParagraph"
522 font-size="635px"
523 font-weight="400"
524 id="tspan424"
525 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
526 class="TextPosition"
527 x="16422"
528 y="4021"
529 id="tspan426"><tspan
530 id="tspan428"
531 style="fill:#ffffff;stroke:none">R</tspan></tspan></tspan></text>
532</g></g><g
533 class="com.sun.star.drawing.TextShape"
534 id="g430"
535 transform="translate(-3285.889,-3185.889)"><g
536 id="id22"><rect
537 class="BoundingBox"
538 x="16700"
539 y="6900"
540 width="2374"
541 height="963"
542 id="rect433"
543 style="fill:none;stroke:none" /><text
544 class="TextShape"
545 id="text435"><tspan
546 class="TextParagraph"
547 font-size="635px"
548 font-weight="400"
549 id="tspan437"
550 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
551 class="TextPosition"
552 x="16950"
553 y="7601"
554 id="tspan439"><tspan
555 id="tspan441"
556 style="fill:#000000;stroke:none">RGGB</tspan></tspan></tspan></text>
557</g></g><g
558 class="com.sun.star.drawing.CustomShape"
559 id="g443"
560 transform="translate(-3285.889,-3185.889)"><g
561 id="id23"><rect
562 class="BoundingBox"
563 x="11699"
564 y="4399"
565 width="1303"
566 height="1203"
567 id="rect446"
568 style="fill:none;stroke:none" /><path
569 d="m 12350,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
570 id="path448"
571 inkscape:connector-curvature="0"
572 style="fill:#0000ff;stroke:none" /><path
573 d="m 12350,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
574 id="path450"
575 inkscape:connector-curvature="0"
576 style="fill:none;stroke:#3465a4" /><text
577 class="TextShape"
578 id="text452"><tspan
579 class="TextParagraph"
580 font-size="635px"
581 font-weight="400"
582 id="tspan454"
583 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
584 class="TextPosition"
585 x="12139"
586 y="5221"
587 id="tspan456"><tspan
588 id="tspan458"
589 style="fill:#ffffff;stroke:none">B</tspan></tspan></tspan></text>
590</g></g><g
591 class="com.sun.star.drawing.CustomShape"
592 id="g460"
593 transform="translate(-3285.889,-3185.889)"><g
594 id="id24"><rect
595 class="BoundingBox"
596 x="11699"
597 y="3199"
598 width="1303"
599 height="1203"
600 id="rect463"
601 style="fill:none;stroke:none" /><path
602 d="m 12350,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
603 id="path465"
604 inkscape:connector-curvature="0"
605 style="fill:#00cc00;stroke:none" /><path
606 d="m 12350,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
607 id="path467"
608 inkscape:connector-curvature="0"
609 style="fill:none;stroke:#3465a4" /><text
610 class="TextShape"
611 id="text469"><tspan
612 class="TextParagraph"
613 font-size="635px"
614 font-weight="400"
615 id="tspan471"
616 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
617 class="TextPosition"
618 x="12103"
619 y="4021"
620 id="tspan473"><tspan
621 id="tspan475"
622 style="fill:#ffffff;stroke:none">G</tspan></tspan></tspan></text>
623</g></g><g
624 class="com.sun.star.drawing.CustomShape"
625 id="g477"
626 transform="translate(-3285.889,-3185.889)"><g
627 id="id25"><rect
628 class="BoundingBox"
629 x="12999"
630 y="4399"
631 width="1303"
632 height="1203"
633 id="rect480"
634 style="fill:none;stroke:none" /><path
635 d="m 13650,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
636 id="path482"
637 inkscape:connector-curvature="0"
638 style="fill:#00cc00;stroke:none" /><path
639 d="m 13650,5600 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
640 id="path484"
641 inkscape:connector-curvature="0"
642 style="fill:none;stroke:#3465a4" /><text
643 class="TextShape"
644 id="text486"><tspan
645 class="TextParagraph"
646 font-size="635px"
647 font-weight="400"
648 id="tspan488"
649 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
650 class="TextPosition"
651 x="13403"
652 y="5221"
653 id="tspan490"><tspan
654 id="tspan492"
655 style="fill:#ffffff;stroke:none">G</tspan></tspan></tspan></text>
656</g></g><g
657 class="com.sun.star.drawing.CustomShape"
658 id="g494"
659 transform="translate(-3285.889,-3185.889)"><g
660 id="id26"><rect
661 class="BoundingBox"
662 x="12999"
663 y="3199"
664 width="1303"
665 height="1203"
666 id="rect497"
667 style="fill:none;stroke:none" /><path
668 d="m 13650,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
669 id="path499"
670 inkscape:connector-curvature="0"
671 style="fill:#ff0000;stroke:none" /><path
672 d="m 13650,4400 -650,0 0,-1200 1300,0 0,1200 -650,0 z"
673 id="path501"
674 inkscape:connector-curvature="0"
675 style="fill:none;stroke:#3465a4" /><text
676 class="TextShape"
677 id="text503"><tspan
678 class="TextParagraph"
679 font-size="635px"
680 font-weight="400"
681 id="tspan505"
682 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
683 class="TextPosition"
684 x="13422"
685 y="4021"
686 id="tspan507"><tspan
687 id="tspan509"
688 style="fill:#ffffff;stroke:none">R</tspan></tspan></tspan></text>
689</g></g><g
690 class="com.sun.star.drawing.TextShape"
691 id="g511"
692 transform="translate(-3285.889,-3185.889)"><g
693 id="id27"><rect
694 class="BoundingBox"
695 x="12400"
696 y="6900"
697 width="2374"
698 height="963"
699 id="rect514"
700 style="fill:none;stroke:none" /><text
701 class="TextShape"
702 id="text516"><tspan
703 class="TextParagraph"
704 font-size="635px"
705 font-weight="400"
706 id="tspan518"
707 style="font-weight:400;font-size:635px;font-family:'Liberation Sans', sans-serif"><tspan
708 class="TextPosition"
709 x="12650"
710 y="7601"
711 id="tspan520"><tspan
712 id="tspan522"
713 style="fill:#000000;stroke:none">GRBG</tspan></tspan></tspan></text>
714</g></g><g
715 class="com.sun.star.drawing.CustomShape"
716 id="g524"
717 transform="translate(-3285.889,-3185.889)"><g
718 id="id28"><rect
719 class="BoundingBox"
720 x="5999"
721 y="5699"
722 width="1003"
723 height="1003"
724 id="rect527"
725 style="fill:none;stroke:none" /><path
726 d="m 6500,6700 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
727 id="path529"
728 inkscape:connector-curvature="0"
729 style="fill:none;stroke:#0000ff" /></g></g><g
730 class="com.sun.star.drawing.CustomShape"
731 id="g531"
732 transform="translate(-3285.889,-3185.889)"><g
733 id="id29"><rect
734 class="BoundingBox"
735 x="3399"
736 y="5699"
737 width="1003"
738 height="1003"
739 id="rect534"
740 style="fill:none;stroke:none" /><path
741 d="m 3900,6700 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
742 id="path536"
743 inkscape:connector-curvature="0"
744 style="fill:none;stroke:#0000ff" /></g></g><g
745 class="com.sun.star.drawing.CustomShape"
746 id="g538"
747 transform="translate(-3285.889,-3185.889)"><g
748 id="id30"><rect
749 class="BoundingBox"
750 x="5999"
751 y="4499"
752 width="1003"
753 height="1003"
754 id="rect541"
755 style="fill:none;stroke:none" /><path
756 d="m 6500,5500 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
757 id="path543"
758 inkscape:connector-curvature="0"
759 style="fill:none;stroke:#00cc00" /></g></g><g
760 class="com.sun.star.drawing.CustomShape"
761 id="g545"
762 transform="translate(-3285.889,-3185.889)"><g
763 id="id31"><rect
764 class="BoundingBox"
765 x="7599"
766 y="5799"
767 width="1003"
768 height="1003"
769 id="rect548"
770 style="fill:none;stroke:none" /><path
771 d="m 8100,6800 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
772 id="path550"
773 inkscape:connector-curvature="0"
774 style="fill:none;stroke:#00cc00" /></g></g><g
775 class="com.sun.star.drawing.CustomShape"
776 id="g552"
777 transform="translate(-3285.889,-3185.889)"><g
778 id="id32"><rect
779 class="BoundingBox"
780 x="10199"
781 y="5799"
782 width="1003"
783 height="1003"
784 id="rect555"
785 style="fill:none;stroke:none" /><path
786 d="m 10700,6800 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
787 id="path557"
788 inkscape:connector-curvature="0"
789 style="fill:none;stroke:#00cc00" /></g></g><g
790 class="com.sun.star.drawing.CustomShape"
791 id="g559"
792 transform="translate(-3285.889,-3185.889)"><g
793 id="id33"><rect
794 class="BoundingBox"
795 x="8899"
796 y="5799"
797 width="1003"
798 height="1003"
799 id="rect562"
800 style="fill:none;stroke:none" /><path
801 d="m 9400,6800 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
802 id="path564"
803 inkscape:connector-curvature="0"
804 style="fill:none;stroke:#0000ff" /></g></g><g
805 class="com.sun.star.drawing.CustomShape"
806 id="g566"
807 transform="translate(-3285.889,-3185.889)"><g
808 id="id34"><rect
809 class="BoundingBox"
810 x="10199"
811 y="4499"
812 width="1003"
813 height="1003"
814 id="rect569"
815 style="fill:none;stroke:none" /><path
816 d="m 10700,5500 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
817 id="path571"
818 inkscape:connector-curvature="0"
819 style="fill:none;stroke:#ff0000" /></g></g><g
820 class="com.sun.star.drawing.CustomShape"
821 id="g573"
822 transform="translate(-3285.889,-3185.889)"><g
823 id="id35"><rect
824 class="BoundingBox"
825 x="10199"
826 y="3299"
827 width="1003"
828 height="1003"
829 id="rect576"
830 style="fill:none;stroke:none" /><path
831 d="m 10700,4300 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
832 id="path578"
833 inkscape:connector-curvature="0"
834 style="fill:none;stroke:#00cc00" /></g></g><g
835 class="com.sun.star.drawing.CustomShape"
836 id="g580"
837 transform="translate(-3285.889,-3185.889)"><g
838 id="id36"><rect
839 class="BoundingBox"
840 x="14399"
841 y="3299"
842 width="1003"
843 height="1003"
844 id="rect583"
845 style="fill:none;stroke:none" /><path
846 d="m 14900,4300 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
847 id="path585"
848 inkscape:connector-curvature="0"
849 style="fill:none;stroke:#00cc00" /></g></g><g
850 class="com.sun.star.drawing.CustomShape"
851 id="g587"
852 transform="translate(-3285.889,-3185.889)"><g
853 id="id37"><rect
854 class="BoundingBox"
855 x="14399"
856 y="5799"
857 width="1003"
858 height="1003"
859 id="rect590"
860 style="fill:none;stroke:none" /><path
861 d="m 14900,6800 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
862 id="path592"
863 inkscape:connector-curvature="0"
864 style="fill:none;stroke:#00cc00" /></g></g><g
865 class="com.sun.star.drawing.CustomShape"
866 id="g594"
867 transform="translate(-3285.889,-3185.889)"><g
868 id="id38"><rect
869 class="BoundingBox"
870 x="11799"
871 y="5799"
872 width="1003"
873 height="1003"
874 id="rect597"
875 style="fill:none;stroke:none" /><path
876 d="m 12300,6800 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
877 id="path599"
878 inkscape:connector-curvature="0"
879 style="fill:none;stroke:#00cc00" /></g></g><g
880 class="com.sun.star.drawing.CustomShape"
881 id="g601"
882 transform="translate(-3285.889,-3185.889)"><g
883 id="id39"><rect
884 class="BoundingBox"
885 x="14399"
886 y="4499"
887 width="1003"
888 height="1003"
889 id="rect604"
890 style="fill:none;stroke:none" /><path
891 d="m 14900,5500 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
892 id="path606"
893 inkscape:connector-curvature="0"
894 style="fill:none;stroke:#0000ff" /></g></g><g
895 class="com.sun.star.drawing.CustomShape"
896 id="g608"
897 transform="translate(-3285.889,-3185.889)"><g
898 id="id40"><rect
899 class="BoundingBox"
900 x="13099"
901 y="5799"
902 width="1003"
903 height="1003"
904 id="rect611"
905 style="fill:none;stroke:none" /><path
906 d="m 13600,6800 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
907 id="path613"
908 inkscape:connector-curvature="0"
909 style="fill:none;stroke:#ff0000" /></g></g><g
910 class="com.sun.star.drawing.CustomShape"
911 id="g615"
912 transform="translate(-3285.889,-3185.889)"><g
913 id="id41"><rect
914 class="BoundingBox"
915 x="16099"
916 y="5799"
917 width="1003"
918 height="1003"
919 id="rect618"
920 style="fill:none;stroke:none" /><path
921 d="m 16600,6800 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
922 id="path620"
923 inkscape:connector-curvature="0"
924 style="fill:none;stroke:#ff0000" /></g></g><g
925 class="com.sun.star.drawing.CustomShape"
926 id="g622"
927 transform="translate(-3398.7778,-3185.889)"><g
928 id="id42"><rect
929 class="BoundingBox"
930 x="18799"
931 y="5799"
932 width="1003"
933 height="1003"
934 id="rect625"
935 style="fill:none;stroke:none" /><path
936 d="m 19300,6800 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
937 id="path627"
938 inkscape:connector-curvature="0"
939 style="fill:none;stroke:#ff0000" /></g></g><g
940 class="com.sun.star.drawing.CustomShape"
941 id="g629"
942 transform="translate(-3398.7778,-3185.889)"><g
943 id="id43"><rect
944 class="BoundingBox"
945 x="18799"
946 y="3299"
947 width="1003"
948 height="1003"
949 id="rect632"
950 style="fill:none;stroke:none" /><path
951 d="m 19300,4300 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
952 id="path634"
953 inkscape:connector-curvature="0"
954 style="fill:none;stroke:#ff0000" /></g></g><g
955 class="com.sun.star.drawing.CustomShape"
956 id="g636"
957 transform="translate(-3285.889,-3185.889)"><g
958 id="id44"><rect
959 class="BoundingBox"
960 x="17399"
961 y="5799"
962 width="1003"
963 height="1003"
964 id="rect639"
965 style="fill:none;stroke:none" /><path
966 d="m 17900,6800 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
967 id="path641"
968 inkscape:connector-curvature="0"
969 style="fill:none;stroke:#00cc00" /></g></g><g
970 class="com.sun.star.drawing.CustomShape"
971 id="g643"
972 transform="translate(-3398.7778,-3185.889)"><g
973 id="id45"><rect
974 class="BoundingBox"
975 x="18799"
976 y="4499"
977 width="1003"
978 height="1003"
979 id="rect646"
980 style="fill:none;stroke:none" /><path
981 d="m 19300,5500 -500,0 0,-1000 1000,0 0,1000 -500,0 z"
982 id="path648"
983 inkscape:connector-curvature="0"
984 style="fill:none;stroke:#00cc00" /></g></g></svg> \ No newline at end of file
diff --git a/Documentation/media/uapi/v4l/constraints.svg b/Documentation/media/uapi/v4l/constraints.svg
index f710ee46b1f8..7e5d7185ca49 100644
--- a/Documentation/media/uapi/v4l/constraints.svg
+++ b/Documentation/media/uapi/v4l/constraints.svg
@@ -1,346 +1,10 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<svg 2<svg id="svg2" width="249.01mm" height="143.01mm" fill-rule="evenodd" stroke-linejoin="round" stroke-width="28.222" preserveAspectRatio="xMidYMid" version="1.2" viewBox="0 0 24900.998 14300.999" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><metadata id="metadata325"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs id="defs4" class="ClipPathGroup"><marker id="marker6261" overflow="visible" orient="auto"><path id="path6263" transform="matrix(-.4 0 0 -.4 -4 0)" d="m0 0 5-5-17.5 5 17.5 5-5-5z" fill="#f00" fill-rule="evenodd" stroke="#f00" stroke-width="1pt"/></marker><marker id="marker6125" overflow="visible"
3 xmlns:dc="http://purl.org/dc/elements/1.1/" 3orient="auto"><path id="path6127" transform="matrix(-.4 0 0 -.4 -4 0)" d="m0 0 5-5-17.5 5 17.5 5-5-5z" fill="#f00" fill-rule="evenodd" stroke="#f00" stroke-width="1pt"/></marker><marker id="marker6001" overflow="visible" orient="auto"><path id="path6003" transform="matrix(-.4 0 0 -.4 -4 0)" d="m0 0 5-5-17.5 5 17.5 5-5-5z" fill="#f00" fill-rule="evenodd" stroke="#f00" stroke-width="1pt"/></marker><marker id="marker5693" overflow="visible" orient="auto"><path id="path5695" transform="matrix(-.4 0 0 -.4 -4 0)" d="m0 0 5-5-17.5 5 17.5 5-5-5z" fill="#f00" fill-rule="evenodd" stroke="#f00" stroke-width="1pt"/></marker><marker id="marker5575" overflow="visible" orient="auto"><path id="path5577" transform="matrix(-.4 0 0 -.4 -4 0)" d="m0 0 5-5-17.5 5 17.5 5-5-5z" fill="#000080" fill-rule="evenodd" stroke="#000080" stroke-width="1pt"/></marker><marker id="marker5469" overflow="visible"
4 xmlns:cc="http://creativecommons.org/ns#" 4orient="auto"><path id="path5471" transform="matrix(-.4 0 0 -.4 -4 0)" d="m0 0 5-5-17.5 5 17.5 5-5-5z" fill="#000080" fill-rule="evenodd" stroke="#000080" stroke-width="1pt"/></marker><marker id="marker5259" overflow="visible" orient="auto"><path id="path5261" transform="matrix(-.4 0 0 -.4 -4 0)" d="m0 0 5-5-17.5 5 17.5 5-5-5z" fill="#000080" fill-rule="evenodd" stroke="#000080" stroke-width="1pt"/></marker><marker id="Arrow2Mend" overflow="visible" orient="auto"><path id="path4241" transform="scale(-.6)" d="m8.7186 4.0337-10.926-4.0177 10.926-4.0177c-1.7455 2.3721-1.7354 5.6175-6e-7 8.0354z" fill="#000080" fill-rule="evenodd" stroke="#000080" stroke-linejoin="round" stroke-width=".625"/></marker></defs><g id="g204" class="com.sun.star.drawing.CustomShape" transform="translate(-1350,-3250)"><g id="id6"><rect id="rect207" class="BoundingBox" x="1350" y="3250" width="24901" height="14301"
5 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 5fill="none"/><path id="path209" d="m13800 17500h-12400v-14200h24800v14200h-12400z" fill="#fff"/><path id="path211" d="m13800 17500h-12400v-14200h24800v14200h-12400z" fill="none" stroke="#f00" stroke-linejoin="round" stroke-width="100"/><text id="text213" class="TextShape"><tspan id="tspan215" class="TextParagraph" font-family="sans-serif" font-size="846px" font-weight="400"><tspan id="tspan217" class="TextPosition" x="1652" y="17093" fill="#ff0000"><tspan id="tspan219"/><tspan id="tspan221">V4L2_SEL_FLAG_GE</tspan></tspan></tspan></text>
6 xmlns:svg="http://www.w3.org/2000/svg" 6</g></g><rect id="rect226" class="BoundingBox" x="3e3" y="2200" width="18101" height="10101" fill="none"/><path id="path228" d="m12050 12250h-9e3v-1e4h18000v1e4h-9e3z" fill="#fff"/><path id="path230" d="m12050 12250h-9e3v-1e4h18000v1e4h-9e3z" fill="none" stroke="#000" stroke-linejoin="round" stroke-width="100"/><text id="text232" class="TextShape" x="-1350" y="-3250"><tspan id="tspan234" class="TextParagraph" font-family="sans-serif" font-size="987px" font-weight="400"><tspan id="tspan236" class="TextPosition" x="3227" y="11503" fill="#000000"><tspan id="tspan238"/><tspan id="tspan240">ORIGINAL</tspan></tspan></tspan></text>
7 xmlns="http://www.w3.org/2000/svg" 7<g id="g242" class="com.sun.star.drawing.CustomShape" transform="translate(-1350,-3250)"><g id="id8"><rect id="rect245" class="BoundingBox" x="7050" y="7950" width="7901" height="5501" fill="none"/><path id="path247" d="m11000 13400h-3900v-5400h7800v5400h-3900z" fill="#fff"/><path id="path249" d="m11000 13400h-3900v-5400h7800v5400h-3900z" fill="none" stroke="#3465a4" stroke-linejoin="round" stroke-width="100"/><text id="text251" class="TextShape"><tspan id="tspan253" class="TextParagraph" font-family="sans-serif" font-size="776px" font-weight="400"><tspan id="tspan255" class="TextPosition" x="7228" y="10969"><tspan id="tspan257" fill="#000080">V4L2_SEL_FLAG_LE</tspan></tspan></tspan></text>
8 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" 8</g></g><rect id="rect262" class="BoundingBox" x="13700" y="7100" width="7101" height="101" fill="none"/><path id="path264" d="m20750 7150h-7e3" fill="none" marker-end="url(#Arrow2Mend)" stroke="#000080" stroke-linejoin="round" stroke-width="99.991"/><rect id="rect269" class="BoundingBox" x="3400" y="7100" width="2101" height="101" fill="none"/><path id="path271" d="m3450 7150h2e3" fill="none" marker-end="url(#marker5575)" stroke="#000080" stroke-linejoin="round" stroke-width="100"/><rect id="rect276" class="BoundingBox" x="9800" y="2900" width="101" height="1501" fill="none"/><path id="path278" d="m9850 2950v1400" fill="none" marker-end="url(#marker5259)" stroke="#000080" stroke-linejoin="round" stroke-width="100"/><rect id="rect283" class="BoundingBox" x="9600" y="10600" width="101" height="1301" fill="none"/><path id="path285" d="m9650 11850v-1200" fill="none"
9 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" 9marker-end="url(#marker5469)" stroke="#000080" stroke-linejoin="round" stroke-width="100"/><rect id="rect290" class="BoundingBox" x="450" y="6850" width="2051" height="601" fill="none"/><path id="path292" d="m2450 7150h-2000.9" fill="none" marker-end="url(#marker6125)" stroke="#f00" stroke-linejoin="round" stroke-width="132.48"/><rect id="rect299" class="BoundingBox" x="21600" y="6750" width="2651" height="601" fill="none"/><path id="path301" d="m21650 7050h2522.6" fill="none" marker-end="url(#marker6001)" stroke="#f00" stroke-linejoin="round" stroke-width="120.41"/><rect id="rect308" class="BoundingBox" x="9550" y="550" width="601" height="1451" fill="none"/><path id="path310" d="m9837 1950v-1453" fill="none" marker-end="url(#marker6261)" stroke="#f00" stroke-linejoin="round" stroke-width="164.04"/><rect id="rect317" class="BoundingBox" x="9350" y="12500" width="601" height="1451"
10 version="1.2" 10fill="none"/><path id="path319" d="m9650 12550v1505.2" fill="none" marker-end="url(#marker5693)" stroke="#f00" stroke-linejoin="round" stroke-width="166.96"/></svg>
11 width="249.00998mm"
12 height="143.00999mm"
13 viewBox="0 0 24900.998 14300.999"
14 preserveAspectRatio="xMidYMid"
15 xml:space="preserve"
16 id="svg2"
17 inkscape:version="0.91 r13725"
18 sodipodi:docname="constraints.svg"
19 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata
20 id="metadata325"><rdf:RDF><cc:Work
21 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
23 pagecolor="#ffffff"
24 bordercolor="#666666"
25 borderopacity="1"
26 objecttolerance="10"
27 gridtolerance="10"
28 guidetolerance="10"
29 inkscape:pageopacity="0"
30 inkscape:pageshadow="2"
31 inkscape:window-width="1920"
32 inkscape:window-height="997"
33 id="namedview323"
34 showgrid="false"
35 inkscape:zoom="1.0818519"
36 inkscape:cx="270.29272"
37 inkscape:cy="249.83854"
38 inkscape:window-x="1920"
39 inkscape:window-y="30"
40 inkscape:window-maximized="1"
41 inkscape:current-layer="svg2"
42 fit-margin-top="0"
43 fit-margin-left="0"
44 fit-margin-right="0"
45 fit-margin-bottom="0" /><defs
46 class="ClipPathGroup"
47 id="defs4"><marker
48 inkscape:isstock="true"
49 style="overflow:visible"
50 id="marker6261"
51 refX="0"
52 refY="0"
53 orient="auto"
54 inkscape:stockid="Arrow1Mend"><path
55 transform="matrix(-0.4,0,0,-0.4,-4,0)"
56 style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
57 d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
58 id="path6263"
59 inkscape:connector-curvature="0" /></marker><marker
60 inkscape:stockid="Arrow1Mend"
61 orient="auto"
62 refY="0"
63 refX="0"
64 id="marker6125"
65 style="overflow:visible"
66 inkscape:isstock="true"
67 inkscape:collect="always"><path
68 id="path6127"
69 d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
70 style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
71 transform="matrix(-0.4,0,0,-0.4,-4,0)"
72 inkscape:connector-curvature="0" /></marker><marker
73 inkscape:isstock="true"
74 style="overflow:visible"
75 id="marker6001"
76 refX="0"
77 refY="0"
78 orient="auto"
79 inkscape:stockid="Arrow1Mend"
80 inkscape:collect="always"><path
81 transform="matrix(-0.4,0,0,-0.4,-4,0)"
82 style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
83 d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
84 id="path6003"
85 inkscape:connector-curvature="0" /></marker><marker
86 inkscape:stockid="Arrow1Mend"
87 orient="auto"
88 refY="0"
89 refX="0"
90 id="marker5693"
91 style="overflow:visible"
92 inkscape:isstock="true"
93 inkscape:collect="always"><path
94 id="path5695"
95 d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
96 style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1pt;stroke-opacity:1"
97 transform="matrix(-0.4,0,0,-0.4,-4,0)"
98 inkscape:connector-curvature="0" /></marker><marker
99 inkscape:isstock="true"
100 style="overflow:visible"
101 id="marker5575"
102 refX="0"
103 refY="0"
104 orient="auto"
105 inkscape:stockid="Arrow1Mend"
106 inkscape:collect="always"><path
107 transform="matrix(-0.4,0,0,-0.4,-4,0)"
108 style="fill:#000080;fill-opacity:1;fill-rule:evenodd;stroke:#000080;stroke-width:1pt;stroke-opacity:1"
109 d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
110 id="path5577"
111 inkscape:connector-curvature="0" /></marker><marker
112 inkscape:stockid="Arrow1Mend"
113 orient="auto"
114 refY="0"
115 refX="0"
116 id="marker5469"
117 style="overflow:visible"
118 inkscape:isstock="true"
119 inkscape:collect="always"><path
120 id="path5471"
121 d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
122 style="fill:#000080;fill-opacity:1;fill-rule:evenodd;stroke:#000080;stroke-width:1pt;stroke-opacity:1"
123 transform="matrix(-0.4,0,0,-0.4,-4,0)"
124 inkscape:connector-curvature="0" /></marker><marker
125 inkscape:stockid="Arrow1Mend"
126 orient="auto"
127 refY="0"
128 refX="0"
129 id="marker5259"
130 style="overflow:visible"
131 inkscape:isstock="true"><path
132 id="path5261"
133 d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
134 style="fill:#000080;fill-opacity:1;fill-rule:evenodd;stroke:#000080;stroke-width:1pt;stroke-opacity:1"
135 transform="matrix(-0.4,0,0,-0.4,-4,0)"
136 inkscape:connector-curvature="0" /></marker><marker
137 inkscape:stockid="Arrow2Mend"
138 orient="auto"
139 refY="0"
140 refX="0"
141 id="Arrow2Mend"
142 style="overflow:visible"
143 inkscape:isstock="true"><path
144 id="path4241"
145 style="fill:#000080;fill-opacity:1;fill-rule:evenodd;stroke:#000080;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
146 d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
147 transform="scale(-0.6,-0.6)"
148 inkscape:connector-curvature="0" /></marker></defs><defs
149 id="defs9" /><defs
150 id="defs100" /><defs
151 id="defs123" /><defs
152 class="TextShapeIndex"
153 id="defs134" /><defs
154 class="EmbeddedBulletChars"
155 id="defs138" /><defs
156 class="TextEmbeddedBitmaps"
157 id="defs167" /><g
158 class="com.sun.star.drawing.CustomShape"
159 id="g204"
160 transform="translate(-1350,-3250)"><g
161 id="id6"><rect
162 class="BoundingBox"
163 x="1350"
164 y="3250"
165 width="24901"
166 height="14301"
167 id="rect207"
168 style="fill:none;stroke:none" /><path
169 d="m 13800,17500 -12400,0 0,-14200 24800,0 0,14200 -12400,0 z"
170 id="path209"
171 inkscape:connector-curvature="0"
172 style="fill:#ffffff;stroke:none" /><path
173 d="m 13800,17500 -12400,0 0,-14200 24800,0 0,14200 -12400,0 z"
174 id="path211"
175 inkscape:connector-curvature="0"
176 style="fill:none;stroke:#ff0000;stroke-width:100;stroke-linejoin:round" /><text
177 class="TextShape"
178 id="text213"><tspan
179 class="TextParagraph"
180 font-size="846px"
181 font-weight="400"
182 id="tspan215"
183 style="font-weight:400;font-size:846px;font-family:'Liberation Sans', sans-serif"><tspan
184 class="TextPosition"
185 x="1652"
186 y="17093"
187 id="tspan217"><tspan
188 id="tspan219"
189 style="fill:#ff0000;stroke:none" /><tspan
190 id="tspan221"
191 style="fill:#ff0000;stroke:none">V4L2_SEL_FLAG_GE</tspan></tspan></tspan></text>
192</g></g><rect
193 class="BoundingBox"
194 x="3000"
195 y="2200"
196 width="18101"
197 height="10101"
198 id="rect226"
199 style="fill:none;stroke:none" /><path
200 d="m 12050,12250 -9000,0 0,-10000 18000,0 0,10000 -9000,0 z"
201 id="path228"
202 inkscape:connector-curvature="0"
203 style="fill:#ffffff;stroke:none" /><path
204 d="m 12050,12250 -9000,0 0,-10000 18000,0 0,10000 -9000,0 z"
205 id="path230"
206 inkscape:connector-curvature="0"
207 style="fill:none;stroke:#000000;stroke-width:100;stroke-linejoin:round" /><text
208 class="TextShape"
209 id="text232"
210 x="-1350"
211 y="-3250"><tspan
212 class="TextParagraph"
213 font-size="987px"
214 font-weight="400"
215 id="tspan234"
216 style="font-weight:400;font-size:987px;font-family:'Liberation Sans', sans-serif"><tspan
217 class="TextPosition"
218 x="3227"
219 y="11503"
220 id="tspan236"><tspan
221 id="tspan238"
222 style="fill:#000000;stroke:none" /><tspan
223 id="tspan240"
224 style="fill:#000000;stroke:none">ORIGINAL</tspan></tspan></tspan></text>
225<g
226 class="com.sun.star.drawing.CustomShape"
227 id="g242"
228 transform="translate(-1350,-3250)"><g
229 id="id8"><rect
230 class="BoundingBox"
231 x="7050"
232 y="7950"
233 width="7901"
234 height="5501"
235 id="rect245"
236 style="fill:none;stroke:none" /><path
237 d="m 11000,13400 -3900,0 0,-5400 7800,0 0,5400 -3900,0 z"
238 id="path247"
239 inkscape:connector-curvature="0"
240 style="fill:#ffffff;stroke:none" /><path
241 d="m 11000,13400 -3900,0 0,-5400 7800,0 0,5400 -3900,0 z"
242 id="path249"
243 inkscape:connector-curvature="0"
244 style="fill:none;stroke:#3465a4;stroke-width:100;stroke-linejoin:round" /><text
245 class="TextShape"
246 id="text251"><tspan
247 class="TextParagraph"
248 font-size="776px"
249 font-weight="400"
250 id="tspan253"
251 style="font-weight:400;font-size:776px;font-family:'Liberation Sans', sans-serif"><tspan
252 class="TextPosition"
253 x="7228"
254 y="10969"
255 id="tspan255"><tspan
256 id="tspan257"
257 style="fill:#000080;stroke:none">V4L2_SEL_FLAG_LE</tspan></tspan></tspan></text>
258</g></g><rect
259 class="BoundingBox"
260 x="13700"
261 y="7100"
262 width="7101"
263 height="101"
264 id="rect262"
265 style="fill:none;stroke:none" /><path
266 d="m 20750,7150 -7000,0"
267 id="path264"
268 inkscape:connector-curvature="0"
269 style="fill:none;stroke:#000080;stroke-width:99.99134064;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;marker-end:url(#Arrow2Mend)" /><rect
270 class="BoundingBox"
271 x="3400"
272 y="7100"
273 width="2101"
274 height="101"
275 id="rect269"
276 style="fill:none;stroke:none" /><path
277 d="m 3450,7150 2000,0"
278 id="path271"
279 inkscape:connector-curvature="0"
280 style="fill:none;stroke:#000080;stroke-width:100;stroke-linejoin:round;marker-end:url(#marker5575)" /><rect
281 class="BoundingBox"
282 x="9800"
283 y="2900"
284 width="101"
285 height="1501"
286 id="rect276"
287 style="fill:none;stroke:none" /><path
288 d="m 9850,2950 0,1400"
289 id="path278"
290 inkscape:connector-curvature="0"
291 style="fill:none;stroke:#000080;stroke-width:100;stroke-linejoin:round;marker-end:url(#marker5259)" /><rect
292 class="BoundingBox"
293 x="9600"
294 y="10600"
295 width="101"
296 height="1301"
297 id="rect283"
298 style="fill:none;stroke:none" /><path
299 d="m 9650,11850 0,-1200"
300 id="path285"
301 inkscape:connector-curvature="0"
302 style="fill:none;stroke:#000080;stroke-width:100;stroke-linejoin:round;marker-end:url(#marker5469)" /><rect
303 class="BoundingBox"
304 x="450"
305 y="6850"
306 width="2051"
307 height="601"
308 id="rect290"
309 style="fill:none;stroke:none" /><path
310 d="m 2450,7150 -2000.8696,0"
311 id="path292"
312 inkscape:connector-curvature="0"
313 style="fill:none;stroke:#ff0000;stroke-width:132.48202515;stroke-linejoin:round;marker-end:url(#marker6125)" /><rect
314 class="BoundingBox"
315 x="21600"
316 y="6750"
317 width="2651"
318 height="601"
319 id="rect299"
320 style="fill:none;stroke:none" /><path
321 d="m 21650,7050 2522.609,0"
322 id="path301"
323 inkscape:connector-curvature="0"
324 style="fill:none;stroke:#ff0000;stroke-width:120.40660858;stroke-linejoin:round;marker-end:url(#marker6001)" /><rect
325 class="BoundingBox"
326 x="9550"
327 y="550"
328 width="601"
329 height="1451"
330 id="rect308"
331 style="fill:none;stroke:none" /><path
332 d="m 9836.957,1950 0,-1453.0435"
333 id="path310"
334 inkscape:connector-curvature="0"
335 style="fill:none;stroke:#ff0000;stroke-width:164.03721619;stroke-linejoin:round;marker-end:url(#marker6261)" /><rect
336 class="BoundingBox"
337 x="9350"
338 y="12500"
339 width="601"
340 height="1451"
341 id="rect317"
342 style="fill:none;stroke:none" /><path
343 d="m 9650,12550 0,1505.217"
344 id="path319"
345 inkscape:connector-curvature="0"
346 style="fill:none;stroke:#ff0000;stroke-width:166.95626831;stroke-linejoin:round;marker-end:url(#marker5693)" /></svg> \ No newline at end of file
diff --git a/Documentation/media/uapi/v4l/crop.svg b/Documentation/media/uapi/v4l/crop.svg
index dc9a471bae6b..3878fe4c49e9 100644
--- a/Documentation/media/uapi/v4l/crop.svg
+++ b/Documentation/media/uapi/v4l/crop.svg
@@ -18,33 +18,34 @@
18 viewBox="0 0 739.11388 339.6584" 18 viewBox="0 0 739.11388 339.6584"
19 sodipodi:docname="crop.svg"><metadata 19 sodipodi:docname="crop.svg"><metadata
20 id="metadata8"><rdf:RDF><cc:Work 20 id="metadata8"><rdf:RDF><cc:Work
21 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 21 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs 22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
23 id="defs6"><clipPath 23 id="defs6"><clipPath
24 clipPathUnits="userSpaceOnUse" 24 clipPathUnits="userSpaceOnUse"
25 id="clipPath44"><path 25 id="clipPath44"><path
26 d="m 0,0 0,1895 4118,0 L 4118,0 0,0 Z m 3051.62,250.48 8.19,17.01 -46.93,23.31 29.61,-25.515 -38.12,8.505 47.25,-23.31 z m -1559.25,800.73 -8.5,-17.01 46.93,-23.31 -29.29,25.2 37.8,-8.19 -46.94,23.31 z" 26 d="m 0,0 0,1895 4118,0 L 4118,0 0,0 Z m 3051.62,250.48 8.19,17.01 -46.93,23.31 29.61,-25.515 -38.12,8.505 47.25,-23.31 z m -1559.25,800.73 -8.5,-17.01 46.93,-23.31 -29.29,25.2 37.8,-8.19 -46.94,23.31 z"
27 id="path46" 27 id="path46"
28 inkscape:connector-curvature="0" 28 inkscape:connector-curvature="0"
29 style="clip-rule:evenodd" /></clipPath><clipPath 29 style="clip-rule:evenodd" /></clipPath><clipPath
30 clipPathUnits="userSpaceOnUse" 30 clipPathUnits="userSpaceOnUse"
31 id="clipPath64"><path 31 id="clipPath64"><path
32 d="m 0,0 0,1895 4118,0 0,-1626 -1,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -1,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 -4,0 0,1 -5,0 0,1 -4,0 0,1 -5,0 0,1 -4,0 0,1 -4,0 0,1 -4,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 1,0 0,3 1,0 0,2 1,0 0,2 1,0 L 4118,0 0,0 Z m 4074,272 0,-1 1,0 0,1 -1,0 z m -1486,743 0,-1 1,0 0,1 -1,0 z m -2,1 0,-1 1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -2,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -2,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -2,0 0,1 -1,0 0,2 2,0 0,-1 4,0 0,-1 5,0 0,-1 4,0 0,-1 5,0 0,-1 5,0 0,-1 4,0 0,-1 3,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -3,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 z" 32 d="m 0,0 0,1895 4118,0 0,-1626 -1,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -1,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 2,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 1,0 0,-1 -4,0 0,1 -5,0 0,1 -4,0 0,1 -5,0 0,1 -4,0 0,1 -4,0 0,1 -4,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 1,0 0,3 1,0 0,2 1,0 0,2 1,0 L 4118,0 0,0 Z m 4074,272 0,-1 1,0 0,1 -1,0 z m -1486,743 0,-1 1,0 0,1 -1,0 z m -2,1 0,-1 1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -2,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -1,0 0,1 -2,0 0,1 -1,0 0,1 -1,0 0,1
33 id="path66" 33-1,0 0,1 -1,0 0,1 -1,0 0,1 -2,0 0,1 -1,0 0,2 2,0 0,-1 4,0 0,-1 5,0 0,-1 4,0 0,-1 5,0 0,-1 5,0 0,-1 4,0 0,-1 3,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -3,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,1 -2,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 -1,0 0,-2 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 0,-1 2,0 z"
34 inkscape:connector-curvature="0" 34 id="path66"
35 style="clip-rule:evenodd" /></clipPath><clipPath 35 inkscape:connector-curvature="0"
36 style="clip-rule:evenodd" /></clipPath><clipPath
36 clipPathUnits="userSpaceOnUse" 37 clipPathUnits="userSpaceOnUse"
37 id="clipPath84"><path 38 id="clipPath84"><path
38 d="m 0,0 0,1895 4118,0 0,-136 -3,0 0,-1 -11,0 0,-1 -11,0 0,-1 -11,0 0,-1 -11,0 0,-1 5,0 0,-1 6,0 0,-1 7,0 0,-1 6,0 0,-1 6,0 0,-1 4,0 0,-1 -1,0 0,-1 -3,0 0,-1 -3,0 0,-1 -2,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 7,0 0,1 11,0 0,1 11,0 0,1 11,0 0,1 3,0 L 4118,0 0,0 Z m 2552,1599 0,-1 2,0 0,1 11,0 0,1 11,0 0,1 11,0 0,1 11,0 0,1 -4,0 0,1 -7,0 0,1 -6,0 0,1 -7,0 0,1 -6,0 0,1 -3,0 0,1 2,0 0,1 2,0 0,1 3,0 0,1 3,0 0,1 3,0 0,1 3,0 0,1 3,0 0,1 2,0 0,1 3,0 0,1 3,0 0,1 3,0 0,1 -7,0 0,-1 -12,0 0,-1 -11,0 0,-1 -11,0 0,-1 -4,0 0,-1 1,0 0,-12 1,0 0,-4 z" 39 d="m 0,0 0,1895 4118,0 0,-136 -3,0 0,-1 -11,0 0,-1 -11,0 0,-1 -11,0 0,-1 -11,0 0,-1 5,0 0,-1 6,0 0,-1 7,0 0,-1 6,0 0,-1 6,0 0,-1 4,0 0,-1 -1,0 0,-1 -3,0 0,-1 -3,0 0,-1 -2,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 -3,0 0,-1 7,0 0,1 11,0 0,1 11,0 0,1 11,0 0,1 3,0 L 4118,0 0,0 Z m 2552,1599 0,-1 2,0 0,1 11,0 0,1 11,0 0,1 11,0 0,1 11,0 0,1 -4,0 0,1 -7,0 0,1 -6,0 0,1 -7,0 0,1 -6,0 0,1 -3,0 0,1 2,0 0,1 2,0 0,1 3,0 0,1 3,0 0,1 3,0 0,1 3,0 0,1 3,0 0,1 2,0 0,1 3,0 0,1 3,0 0,1 3,0 0,1 -7,0 0,-1 -12,0 0,-1 -11,0 0,-1 -11,0 0,-1 -4,0 0,-1 1,0 0,-12 1,0 0,-4 z"
39 id="path86" 40 id="path86"
40 inkscape:connector-curvature="0" 41 inkscape:connector-curvature="0"
41 style="clip-rule:evenodd" /></clipPath><clipPath 42 style="clip-rule:evenodd" /></clipPath><clipPath
42 clipPathUnits="userSpaceOnUse" 43 clipPathUnits="userSpaceOnUse"
43 id="clipPath104"><path 44 id="clipPath104"><path
44 d="m 0,0 0,1895 4118,0 L 4118,0 0,0 Z m 3056.98,1740.43 -1.58,18.9 -52.6,-4.72 38.74,-6.3 -36.85,-12.6 52.29,4.72 z m -1570.28,-123.79 1.58,-18.9 52.6,4.72 -38.43,5.99 36.54,12.91 -52.29,-4.72 z" 45 d="m 0,0 0,1895 4118,0 L 4118,0 0,0 Z m 3056.98,1740.43 -1.58,18.9 -52.6,-4.72 38.74,-6.3 -36.85,-12.6 52.29,4.72 z m -1570.28,-123.79 1.58,-18.9 52.6,4.72 -38.43,5.99 36.54,12.91 -52.29,-4.72 z"
45 id="path106" 46 id="path106"
46 inkscape:connector-curvature="0" 47 inkscape:connector-curvature="0"
47 style="clip-rule:evenodd" /></clipPath></defs><sodipodi:namedview 48 style="clip-rule:evenodd" /></clipPath></defs><sodipodi:namedview
48 pagecolor="#ffffff" 49 pagecolor="#ffffff"
49 bordercolor="#666666" 50 bordercolor="#666666"
50 borderopacity="1" 51 borderopacity="1"
@@ -123,90 +124,90 @@
123 inkscape:connector-curvature="0" /><g 124 inkscape:connector-curvature="0" /><g
124 id="g40" 125 id="g40"
125 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><g 126 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><g
126 clip-path="url(#clipPath44)" 127 clip-path="url(#clipPath44)"
127 id="g42"><path 128 id="g42"><path
128 inkscape:connector-curvature="0" 129 inkscape:connector-curvature="0"
129 id="path48" 130 id="path48"
130 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 131 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
131 d="M 1492.37,1040.5 3051.62,260.875" /></g></g><g 132 d="M 1492.37,1040.5 3051.62,260.875" /></g></g><g
132 id="g50" 133 id="g50"
133 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><path 134 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><path
134 inkscape:connector-curvature="0" 135 inkscape:connector-curvature="0"
135 id="path52" 136 id="path52"
136 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 137 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
137 d="m 1539.31,1027.9 -37.8,8.19 29.29,-25.2 8.51,17.01" /><path 138 d="m 1539.31,1027.9 -37.8,8.19 29.29,-25.2 8.51,17.01" /><path
138 inkscape:connector-curvature="0" 139 inkscape:connector-curvature="0"
139 id="path54" 140 id="path54"
140 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 141 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
141 d="m 1539.31,1027.9 -37.8,8.19 29.29,-25.2 8.51,17.01 z" /><path 142 d="m 1539.31,1027.9 -37.8,8.19 29.29,-25.2 8.51,17.01 z" /><path
142 inkscape:connector-curvature="0" 143 inkscape:connector-curvature="0"
143 id="path56" 144 id="path56"
144 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 145 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
145 d="m 3004.37,273.79 38.12,-8.505 -29.61,25.515 -8.51,-17.01" /><path 146 d="m 3004.37,273.79 38.12,-8.505 -29.61,25.515 -8.51,-17.01" /><path
146 inkscape:connector-curvature="0" 147 inkscape:connector-curvature="0"
147 id="path58" 148 id="path58"
148 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 149 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
149 d="m 3004.37,273.79 38.12,-8.505 -29.61,25.515 -8.51,-17.01 z" /></g><g 150 d="m 3004.37,273.79 38.12,-8.505 -29.61,25.515 -8.51,-17.01 z" /></g><g
150 id="g60" 151 id="g60"
151 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><g 152 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><g
152 clip-path="url(#clipPath64)" 153 clip-path="url(#clipPath64)"
153 id="g62"><path 154 id="g62"><path
154 inkscape:connector-curvature="0" 155 inkscape:connector-curvature="0"
155 id="path68" 156 id="path68"
156 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 157 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
157 d="M 2555.5,1040.5 4114.75,260.875" /></g></g><g 158 d="M 2555.5,1040.5 4114.75,260.875" /></g></g><g
158 id="g70" 159 id="g70"
159 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><path 160 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><path
160 inkscape:connector-curvature="0" 161 inkscape:connector-curvature="0"
161 id="path72" 162 id="path72"
162 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 163 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
163 d="m 2602.43,1027.9 -37.8,8.19 29.3,-25.2 8.5,17.01" /><path 164 d="m 2602.43,1027.9 -37.8,8.19 29.3,-25.2 8.5,17.01" /><path
164 inkscape:connector-curvature="0" 165 inkscape:connector-curvature="0"
165 id="path74" 166 id="path74"
166 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 167 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
167 d="m 2602.43,1027.9 -37.8,8.19 29.3,-25.2 8.5,17.01 z" /><path 168 d="m 2602.43,1027.9 -37.8,8.19 29.3,-25.2 8.5,17.01 z" /><path
168 inkscape:connector-curvature="0" 169 inkscape:connector-curvature="0"
169 id="path76" 170 id="path76"
170 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 171 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
171 d="m 4067.5,273.79 38.11,-8.505 -29.61,25.515 -8.5,-17.01" /><path 172 d="m 4067.5,273.79 38.11,-8.505 -29.61,25.515 -8.5,-17.01" /><path
172 inkscape:connector-curvature="0" 173 inkscape:connector-curvature="0"
173 id="path78" 174 id="path78"
174 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 175 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
175 d="m 4067.5,273.79 38.11,-8.505 -29.61,25.515 -8.5,-17.01 z" /></g><g 176 d="m 4067.5,273.79 38.11,-8.505 -29.61,25.515 -8.5,-17.01 z" /></g><g
176 id="g80" 177 id="g80"
177 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><g 178 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><g
178 clip-path="url(#clipPath84)" 179 clip-path="url(#clipPath84)"
179 id="g82"><path 180 id="g82"><path
180 inkscape:connector-curvature="0" 181 inkscape:connector-curvature="0"
181 id="path88" 182 id="path88"
182 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 183 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
183 d="m 2555.5,1607.5 1559.25,141.75" /></g></g><g 184 d="m 2555.5,1607.5 1559.25,141.75" /></g></g><g
184 id="g90" 185 id="g90"
185 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><path 186 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><path
186 inkscape:connector-curvature="0" 187 inkscape:connector-curvature="0"
187 id="path92" 188 id="path92"
188 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 189 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
189 d="m 2602.12,1621.36 -36.54,-12.91 38.43,-5.99 -1.89,18.9" /><path 190 d="m 2602.12,1621.36 -36.54,-12.91 38.43,-5.99 -1.89,18.9" /><path
190 inkscape:connector-curvature="0" 191 inkscape:connector-curvature="0"
191 id="path94" 192 id="path94"
192 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 193 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
193 d="m 2602.12,1621.36 -36.54,-12.91 38.43,-5.99 -1.89,18.9 z" /><path 194 d="m 2602.12,1621.36 -36.54,-12.91 38.43,-5.99 -1.89,18.9 z" /><path
194 inkscape:connector-curvature="0" 195 inkscape:connector-curvature="0"
195 id="path96" 196 id="path96"
196 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 197 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
197 d="m 4067.81,1735.71 36.86,12.6 -38.75,6.3 1.89,-18.9" /><path 198 d="m 4067.81,1735.71 36.86,12.6 -38.75,6.3 1.89,-18.9" /><path
198 inkscape:connector-curvature="0" 199 inkscape:connector-curvature="0"
199 id="path98" 200 id="path98"
200 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 201 style="fill:none;stroke:#000000;stroke-width:4.7249999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
201 d="m 4067.81,1735.71 36.86,12.6 -38.75,6.3 1.89,-18.9 z" /></g><g 202 d="m 4067.81,1735.71 36.86,12.6 -38.75,6.3 1.89,-18.9 z" /></g><g
202 id="g100" 203 id="g100"
203 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><g 204 transform="matrix(0.14375794,0,0,0.14375794,-0.12334269,-0.08856738)"><g
204 clip-path="url(#clipPath104)" 205 clip-path="url(#clipPath104)"
205 id="g102"><path 206 id="g102"><path
206 inkscape:connector-curvature="0" 207 inkscape:connector-curvature="0"
207 id="path108" 208 id="path108"
208 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 209 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
209 d="m 1492.37,1607.5 1559.25,141.75" /></g></g><path 210 d="m 1492.37,1607.5 1559.25,141.75" /></g></g><path
210 d="m 221.11869,232.99481 -5.25292,-1.85592 5.52462,-0.86111 -0.2717,2.71703" 211 d="m 221.11869,232.99481 -5.25292,-1.85592 5.52462,-0.86111 -0.2717,2.71703"
211 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 212 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
212 id="path112" 213 id="path112"
@@ -225,43 +226,43 @@
225 inkscape:connector-curvature="0" /><g 226 inkscape:connector-curvature="0" /><g
226 id="g120" 227 id="g120"
227 transform="matrix(1.4375794,0,0,1.4375794,-0.12334269,-0.08856738)"><text 228 transform="matrix(1.4375794,0,0,1.4375794,-0.12334269,-0.08856738)"><text
228 transform="matrix(1,0,0,-1,204.52,9.07751)" 229 transform="matrix(1,0,0,-1,204.52,9.07751)"
229 style="font-variant:normal;font-weight:normal;font-size:6.61499977px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#d10000;fill-opacity:1;fill-rule:nonzero;stroke:none" 230 style="font-variant:normal;font-weight:normal;font-size:6.61499977px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#d10000;fill-opacity:1;fill-rule:nonzero;stroke:none"
230 id="text122"><tspan 231 id="text122"><tspan
231 x="0 3.3074999 6.9854398 8.45397 12.13191 15.80985 19.11735 21.320145 24.998085 28.676025 31.983524 35.661465 39.339405 41.178375 44.856316 48.534256 52.212196 55.890137 59.568073" 232 x="0 3.3074999 6.9854398 8.45397 12.13191 15.80985 19.11735 21.320145 24.998085 28.676025 31.983524 35.661465 39.339405 41.178375 44.856316 48.534256 52.212196 55.890137 59.568073"
232 y="0" 233 y="0"
233 sodipodi:role="line" 234 sodipodi:role="line"
234 id="tspan124">v4l2_cropcap.bounds</tspan></text> 235 id="tspan124">v4l2_cropcap.bounds</tspan></text>
235</g><g 236</g><g
236 id="g126" 237 id="g126"
237 transform="matrix(1.4375794,0,0,1.4375794,-0.12334269,-0.08856738)"><text 238 transform="matrix(1.4375794,0,0,1.4375794,-0.12334269,-0.08856738)"><text
238 transform="matrix(1,0,0,-1,58.5175,166.42)" 239 transform="matrix(1,0,0,-1,58.5175,166.42)"
239 style="font-variant:normal;font-weight:normal;font-size:6.61499977px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#0000d1;fill-opacity:1;fill-rule:nonzero;stroke:none" 240 style="font-variant:normal;font-weight:normal;font-size:6.61499977px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#0000d1;fill-opacity:1;fill-rule:nonzero;stroke:none"
240 id="text128"><tspan 241 id="text128"><tspan
241 x="0 3.3074999 6.9854398 8.45397 12.13191 15.80985 19.11735 21.320145 24.998085 28.676025 31.983524 35.661465 39.339405 41.178375 44.856316 48.534256 50.373226 52.576019 56.25396 59.561459" 242 x="0 3.3074999 6.9854398 8.45397 12.13191 15.80985 19.11735 21.320145 24.998085 28.676025 31.983524 35.661465 39.339405 41.178375 44.856316 48.534256 50.373226 52.576019 56.25396 59.561459"
242 y="0" 243 y="0"
243 sodipodi:role="line" 244 sodipodi:role="line"
244 id="tspan130">v4l2_cropcap.defrect</tspan></text> 245 id="tspan130">v4l2_cropcap.defrect</tspan></text>
245</g><g 246</g><g
246 id="g132" 247 id="g132"
247 transform="matrix(1.4375794,0,0,1.4375794,-0.12334269,-0.08856738)"><text 248 transform="matrix(1.4375794,0,0,1.4375794,-0.12334269,-0.08856738)"><text
248 transform="matrix(1,0,0,-1,153.49,152.245)" 249 transform="matrix(1,0,0,-1,153.49,152.245)"
249 style="font-variant:normal;font-weight:normal;font-size:6.61499977px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#008f00;fill-opacity:1;fill-rule:nonzero;stroke:none" 250 style="font-variant:normal;font-weight:normal;font-size:6.61499977px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#008f00;fill-opacity:1;fill-rule:nonzero;stroke:none"
250 id="text134"><tspan 251 id="text134"><tspan
251 x="0 3.3074999 6.9854398 8.45397 12.13191 15.80985 19.11735 21.320145 24.998085 28.676025 30.514996" 252 x="0 3.3074999 6.9854398 8.45397 12.13191 15.80985 19.11735 21.320145 24.998085 28.676025 30.514996"
252 y="0" 253 y="0"
253 sodipodi:role="line" 254 sodipodi:role="line"
254 id="tspan136">v4l2_crop.c</tspan></text> 255 id="tspan136">v4l2_crop.c</tspan></text>
255</g><g 256</g><g
256 id="g138" 257 id="g138"
257 transform="matrix(1.4375794,0,0,1.4375794,-0.12334269,-0.08856738)"><text 258 transform="matrix(1.4375794,0,0,1.4375794,-0.12334269,-0.08856738)"><text
258 transform="matrix(1,0,0,-1,309.415,30.34)" 259 transform="matrix(1,0,0,-1,309.415,30.34)"
259 style="font-variant:normal;font-weight:normal;font-size:6.61499977px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#b000b0;fill-opacity:1;fill-rule:nonzero;stroke:none" 260 style="font-variant:normal;font-weight:normal;font-size:6.61499977px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#b000b0;fill-opacity:1;fill-rule:nonzero;stroke:none"
260 id="text140"><tspan 261 id="text140"><tspan
261 x="0 3.3074999 6.9854398 8.45397 12.13191 15.80985 17.648821 21.326759 23.529554 29.03985 32.717789" 262 x="0 3.3074999 6.9854398 8.45397 12.13191 15.80985 17.648821 21.326759 23.529554 29.03985 32.717789"
262 y="0" 263 y="0"
263 sodipodi:role="line" 264 sodipodi:role="line"
264 id="tspan142">v4l2_format</tspan></text> 265 id="tspan142">v4l2_format</tspan></text>
265</g><text 266</g><text
266 xml:space="preserve" 267 xml:space="preserve"
267 style="font-style:normal;font-weight:normal;font-size:32px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" 268 style="font-style:normal;font-weight:normal;font-size:32px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
@@ -270,12 +271,12 @@
270 id="text3396" 271 id="text3396"
271 sodipodi:linespacing="125%" 272 sodipodi:linespacing="125%"
272 transform="scale(1,-1)"><tspan 273 transform="scale(1,-1)"><tspan
273 sodipodi:role="line" 274 sodipodi:role="line"
274 id="tspan3398" 275 id="tspan3398"
275 x="-99.291145" 276 x="-99.291145"
276 y="-239.49893"></tspan><tspan 277 y="-239.49893"></tspan><tspan
277 sodipodi:role="line" 278 sodipodi:role="line"
278 x="-99.291145" 279 x="-99.291145"
279 y="-199.49893" 280 y="-199.49893"
280 id="tspan3400" /></text> 281 id="tspan3400" /></text>
281</g></svg> 282</g></svg>
diff --git a/Documentation/media/uapi/v4l/fieldseq_bt.svg b/Documentation/media/uapi/v4l/fieldseq_bt.svg
index b195301771ce..909d758f8543 100644
--- a/Documentation/media/uapi/v4l/fieldseq_bt.svg
+++ b/Documentation/media/uapi/v4l/fieldseq_bt.svg
@@ -42,15 +42,15 @@
42 inkscape:window-maximized="1" 42 inkscape:window-maximized="1"
43 inkscape:current-layer="g3627" /><metadata 43 inkscape:current-layer="g3627" /><metadata
44 id="metadata3625"><rdf:RDF><cc:Work 44 id="metadata3625"><rdf:RDF><cc:Work
45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs 46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
47 id="defs3623"><clipPath 47 id="defs3623"><clipPath
48 id="clipPath4301" 48 id="clipPath4301"
49 clipPathUnits="userSpaceOnUse"><path 49 clipPathUnits="userSpaceOnUse"><path
50 style="clip-rule:evenodd" 50 style="clip-rule:evenodd"
51 inkscape:connector-curvature="0" 51 inkscape:connector-curvature="0"
52 id="path4303" 52 id="path4303"
53 d="M 0,6040 0,0 l 5650,0 0,6040 -5650,0 z m 4786.76,-99.89 103.92,0 0,56.69 -103.92,0 0,0 85.03,-28.35 -85.03,-28.34 z" /></clipPath></defs><g 53 d="M 0,6040 0,0 l 5650,0 0,6040 -5650,0 z m 4786.76,-99.89 103.92,0 0,56.69 -103.92,0 0,0 85.03,-28.35 -85.03,-28.34 z" /></clipPath></defs><g
54 transform="matrix(1.25,0,0,-1.25,-1.0537,751.94632)" 54 transform="matrix(1.25,0,0,-1.25,-1.0537,751.94632)"
55 inkscape:label="fieldseq_bt" 55 inkscape:label="fieldseq_bt"
56 inkscape:groupmode="layer" 56 inkscape:groupmode="layer"
@@ -1390,13 +1390,13 @@
1390 transform="scale(0.1,0.1)" 1390 transform="scale(0.1,0.1)"
1391 id="g4297" 1391 id="g4297"
1392 style=""><g 1392 style=""><g
1393 id="g4299" 1393 id="g4299"
1394 clip-path="url(#clipPath4301)" 1394 clip-path="url(#clipPath4301)"
1395 style=""><path 1395 style=""><path
1396 d="m 3778.18,5968.45 1105.42,0" 1396 d="m 3778.18,5968.45 1105.42,0"
1397 style="fill:none;stroke:#000000;stroke-width:14.17199993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 1397 style="fill:none;stroke:#000000;stroke-width:14.17199993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
1398 id="path4305" 1398 id="path4305"
1399 inkscape:connector-curvature="0" /></g></g><path 1399 inkscape:connector-curvature="0" /></g></g><path
1400 d="m 478.676,594.011 8.503,2.834 -8.503,2.835 0,-5.669" 1400 d="m 478.676,594.011 8.503,2.834 -8.503,2.835 0,-5.669"
1401 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 1401 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
1402 id="path4307" 1402 id="path4307"
@@ -2466,148 +2466,148 @@
2466 id="text4841" 2466 id="text4841"
2467 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2467 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2468 transform="scale(1,-1)"><tspan 2468 transform="scale(1,-1)"><tspan
2469 id="tspan4843" 2469 id="tspan4843"
2470 sodipodi:role="line" 2470 sodipodi:role="line"
2471 y="-533.07098" 2471 y="-533.07098"
2472 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464">V4L2_FIELD_TOP</tspan><tspan 2472 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464">V4L2_FIELD_TOP</tspan><tspan
2473 id="tspan4845" 2473 id="tspan4845"
2474 sodipodi:role="line" 2474 sodipodi:role="line"
2475 y="-465.04559" 2475 y="-465.04559"
2476 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054">V4L2_FIELD_BOTTOM</tspan><tspan 2476 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054">V4L2_FIELD_BOTTOM</tspan><tspan
2477 id="tspan4847" 2477 id="tspan4847"
2478 sodipodi:role="line" 2478 sodipodi:role="line"
2479 y="-397.0202" 2479 y="-397.0202"
2480 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963">V4L2_FIELD_ALTERNATE</tspan></text> 2480 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963">V4L2_FIELD_ALTERNATE</tspan></text>
2481<text 2481<text
2482 y="-316.23969" 2482 y="-316.23969"
2483 x="103.58983" 2483 x="103.58983"
2484 id="text4849" 2484 id="text4849"
2485 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2485 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2486 transform="scale(1,-1)"><tspan 2486 transform="scale(1,-1)"><tspan
2487 id="tspan4851" 2487 id="tspan4851"
2488 sodipodi:role="line" 2488 sodipodi:role="line"
2489 y="-316.23969" 2489 y="-316.23969"
2490 x="103.58983 109.09226 113.67899 118.26572 122.85246 127.43919 132.47964 134.77301 140.27545 144.86218 150.81833 155.40506 160.44553 166.86365 188.62184 194.12427 198.711 203.29774 207.88448 212.47121 217.51166 219.80502 225.30746 229.8942 235.85034 240.43707 245.9395 252.35764 257.3981 262.43854 268.85669 375.69293 381.19534 385.78207 390.3688 394.95554 399.54227 404.58273 406.8761 412.37854 416.96527 422.92142 427.50815 433.01059 439.42871 444.46918 449.50961 455.92776 1.551828 7.0542617 11.640993 16.227724 20.814463 25.401194 30.441652 32.735016 38.237442 42.824177 48.780331 53.367065 58.869492 65.287621 70.328079 75.368538 81.786659">V4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_BOTTOMV4L2_FIELD_BOTTOM</tspan><tspan 2490 x="103.58983 109.09226 113.67899 118.26572 122.85246 127.43919 132.47964 134.77301 140.27545 144.86218 150.81833 155.40506 160.44553 166.86365 188.62184 194.12427 198.711 203.29774 207.88448 212.47121 217.51166 219.80502 225.30746 229.8942 235.85034 240.43707 245.9395 252.35764 257.3981 262.43854 268.85669 375.69293 381.19534 385.78207 390.3688 394.95554 399.54227 404.58273 406.8761 412.37854 416.96527 422.92142 427.50815 433.01059 439.42871 444.46918 449.50961 455.92776 1.551828 7.0542617 11.640993 16.227724 20.814463 25.401194 30.441652 32.735016 38.237442 42.824177 48.780331 53.367065 58.869492 65.287621 70.328079 75.368538 81.786659">V4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_BOTTOMV4L2_FIELD_BOTTOM</tspan><tspan
2491 id="tspan4853" 2491 id="tspan4853"
2492 sodipodi:role="line" 2492 sodipodi:role="line"
2493 y="-328.99481" 2493 y="-328.99481"
2494 x="10.054964 14.17972 18.766451 20.597849 25.18458 29.771311 34.358047 38.944778 41.238144 43.531509 48.118244 50.865334 53.158699 55.452068 57.283459 61.870193 63.701588 68.288322">v4l2_buffer.field:</tspan></text> 2494 x="10.054964 14.17972 18.766451 20.597849 25.18458 29.771311 34.358047 38.944778 41.238144 43.531509 48.118244 50.865334 53.158699 55.452068 57.283459 61.870193 63.701588 68.288322">v4l2_buffer.field:</tspan></text>
2495<text 2495<text
2496 y="-592.59381" 2496 y="-592.59381"
2497 x="5.8034" 2497 x="5.8034"
2498 id="text4855" 2498 id="text4855"
2499 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2499 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2500 transform="scale(1,-1)"><tspan 2500 transform="scale(1,-1)"><tspan
2501 id="tspan4857" 2501 id="tspan4857"
2502 sodipodi:role="line" 2502 sodipodi:role="line"
2503 y="-592.59381" 2503 y="-592.59381"
2504 x="5.8034 13.134789 19.806232 29.801399 36.472843 43.144287 47.139954 53.811398 56.475174 59.810898 66.482346 70.478004 77.149452 83.820892 87.816566 91.152283 94.488007 101.15945 107.83089 111.16662 114.50233 121.17377 131.16895 134.50468 137.84041 140.50418 147.17563 149.8394 156.51085 159.84657 163.1823 165.84607 169.84174 175.84123 179.17696 182.51268 185.8484 189.84407 196.51552 203.18695 209.18646 219.18163 221.8454 225.18112 228.51685 235.18829 241.85973 245.19545 249.19112 255.86256 259.19827 265.86972 269.20544 272.54117 282.53635 285.87207 294.53534 301.86673 309.87006 318.53336">Temporal order, bottom field first transmitted (e.g. M/NTSC)</tspan></text> 2504 x="5.8034 13.134789 19.806232 29.801399 36.472843 43.144287 47.139954 53.811398 56.475174 59.810898 66.482346 70.478004 77.149452 83.820892 87.816566 91.152283 94.488007 101.15945 107.83089 111.16662 114.50233 121.17377 131.16895 134.50468 137.84041 140.50418 147.17563 149.8394 156.51085 159.84657 163.1823 165.84607 169.84174 175.84123 179.17696 182.51268 185.8484 189.84407 196.51552 203.18695 209.18646 219.18163 221.8454 225.18112 228.51685 235.18829 241.85973 245.19545 249.19112 255.86256 259.19827 265.86972 269.20544 272.54117 282.53635 285.87207 294.53534 301.86673 309.87006 318.53336">Temporal order, bottom field first transmitted (e.g. M/NTSC)</tspan></text>
2505<text 2505<text
2506 y="-316.23981" 2506 y="-316.23981"
2507 x="290.6604" 2507 x="290.6604"
2508 id="text4859" 2508 id="text4859"
2509 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2509 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2510 transform="scale(1,-1)"><tspan 2510 transform="scale(1,-1)"><tspan
2511 id="tspan4861" 2511 id="tspan4861"
2512 sodipodi:role="line" 2512 sodipodi:role="line"
2513 y="-316.23981" 2513 y="-316.23981"
2514 x="290.6604 296.16284 300.74957 305.3363 309.92303 314.50977 319.55023 321.8436 327.34601 331.93274 337.88889 342.47565 347.51608 353.9342 477.73062 483.23306 487.81979 492.40652 496.99326 501.57999 506.62045 508.91382 514.41626 519.00299 524.95911 529.5459 534.5863 541.00446">V4L2_FIELD_TOPV4L2_FIELD_TOP</tspan></text> 2514 x="290.6604 296.16284 300.74957 305.3363 309.92303 314.50977 319.55023 321.8436 327.34601 331.93274 337.88889 342.47565 347.51608 353.9342 477.73062 483.23306 487.81979 492.40652 496.99326 501.57999 506.62045 508.91382 514.41626 519.00299 524.95911 529.5459 534.5863 541.00446">V4L2_FIELD_TOPV4L2_FIELD_TOP</tspan></text>
2515<text 2515<text
2516 y="-299.23349" 2516 y="-299.23349"
2517 x="5.8034" 2517 x="5.8034"
2518 id="text4863" 2518 id="text4863"
2519 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2519 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2520 transform="scale(1,-1)"><tspan 2520 transform="scale(1,-1)"><tspan
2521 id="tspan4865" 2521 id="tspan4865"
2522 sodipodi:role="line" 2522 sodipodi:role="line"
2523 y="-299.23349" 2523 y="-299.23349"
2524 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 84.504837 93.168114 100.4995 108.50284 117.16611 123.83755 131.8409 140.50418 148.50751 157.17079 160.50652 163.84224 167.17796 175.18129 181.85274 188.52419 195.19562 201.86707 209.19846 212.53418 220.53751 227.20895 235.87224 242.54367 245.87939 254.54268 261.87405 269.87741 278.54068 285.21213 293.21545 301.87872 309.88205 318.54535 325.2168 333.22012">V4L2_FIELD_INTERLACED / V4L2_FIELD_INTERLACED_BT</tspan><tspan 2524 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 84.504837 93.168114 100.4995 108.50284 117.16611 123.83755 131.8409 140.50418 148.50751 157.17079 160.50652 163.84224 167.17796 175.18129 181.85274 188.52419 195.19562 201.86707 209.19846 212.53418 220.53751 227.20895 235.87224 242.54367 245.87939 254.54268 261.87405 269.87741 278.54068 285.21213 293.21545 301.87872 309.88205 318.54535 325.2168 333.22012">V4L2_FIELD_INTERLACED / V4L2_FIELD_INTERLACED_BT</tspan><tspan
2525 id="tspan4867" 2525 id="tspan4867"
2526 sodipodi:role="line" 2526 sodipodi:role="line"
2527 y="-192.9435" 2527 y="-192.9435"
2528 x="1.5518398 9.5551729 16.226616 22.898062 29.569506 36.240948 43.572334 46.908058 54.911392 61.582836 70.246117 76.917557 80.253281 88.916557 96.247948 104.25128 112.91456 119.586 127.58932 136.25262 144.25595 152.91924 159.59067 166.92206 174.9254 178.26112 182.25679 192.25195 194.91573 200.91524 207.58667 210.25046 212.91423 219.58568 226.25713 232.92856 239.60001">V4L2_FIELD_INTERLACED_TB (misaligned)</tspan><tspan 2528 x="1.5518398 9.5551729 16.226616 22.898062 29.569506 36.240948 43.572334 46.908058 54.911392 61.582836 70.246117 76.917557 80.253281 88.916557 96.247948 104.25128 112.91456 119.586 127.58932 136.25262 144.25595 152.91924 159.59067 166.92206 174.9254 178.26112 182.25679 192.25195 194.91573 200.91524 207.58667 210.25046 212.91423 219.58568 226.25713 232.92856 239.60001">V4L2_FIELD_INTERLACED_TB (misaligned)</tspan><tspan
2529 id="tspan4869" 2529 id="tspan4869"
2530 sodipodi:role="line" 2530 sodipodi:role="line"
2531 y="-86.653496" 2531 y="-86.653496"
2532 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 89.172447 97.175781 106.511 113.18245 121.18579">V4L2_FIELD_SEQ_BT</tspan></text> 2532 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 89.172447 97.175781 106.511 113.18245 121.18579">V4L2_FIELD_SEQ_BT</tspan></text>
2533<text 2533<text
2534 y="-533.07098" 2534 y="-533.07098"
2535 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464" 2535 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464"
2536 id="text4592" 2536 id="text4592"
2537 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2537 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2538 transform="scale(1,-1)"><tspan 2538 transform="scale(1,-1)"><tspan
2539 id="tspan4594" 2539 id="tspan4594"
2540 sodipodi:role="line" 2540 sodipodi:role="line"
2541 y="-533.07098" 2541 y="-533.07098"
2542 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464">V4L2_FIELD_TOP</tspan></text> 2542 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464">V4L2_FIELD_TOP</tspan></text>
2543<text 2543<text
2544 y="-465.04559" 2544 y="-465.04559"
2545 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054" 2545 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054"
2546 id="text4596" 2546 id="text4596"
2547 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2547 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2548 transform="scale(1,-1)"><tspan 2548 transform="scale(1,-1)"><tspan
2549 id="tspan4598" 2549 id="tspan4598"
2550 sodipodi:role="line" 2550 sodipodi:role="line"
2551 y="-465.04559" 2551 y="-465.04559"
2552 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054">V4L2_FIELD_BOTTOM</tspan></text> 2552 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054">V4L2_FIELD_BOTTOM</tspan></text>
2553<text 2553<text
2554 y="-397.0202" 2554 y="-397.0202"
2555 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963" 2555 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963"
2556 id="text4600" 2556 id="text4600"
2557 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2557 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2558 transform="scale(1,-1)"><tspan 2558 transform="scale(1,-1)"><tspan
2559 id="tspan4602" 2559 id="tspan4602"
2560 sodipodi:role="line" 2560 sodipodi:role="line"
2561 y="-397.0202" 2561 y="-397.0202"
2562 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963">V4L2_FIELD_ALTERNATE</tspan></text> 2562 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963">V4L2_FIELD_ALTERNATE</tspan></text>
2563<text 2563<text
2564 y="-299.23349" 2564 y="-299.23349"
2565 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 84.504837 93.168114 100.4995 108.50284 117.16611 123.83755 131.8409 140.50418 148.50751 157.17079 160.50652 163.84224 167.17796 175.18129 181.85274 188.52419 195.19562 201.86707 209.19846 212.53418 220.53751 227.20895 235.87224 242.54367 245.87939 254.54268 261.87405 269.87741 278.54068 285.21213 293.21545 301.87872 309.88205 318.54535 325.2168 333.22012" 2565 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 84.504837 93.168114 100.4995 108.50284 117.16611 123.83755 131.8409 140.50418 148.50751 157.17079 160.50652 163.84224 167.17796 175.18129 181.85274 188.52419 195.19562 201.86707 209.19846 212.53418 220.53751 227.20895 235.87224 242.54367 245.87939 254.54268 261.87405 269.87741 278.54068 285.21213 293.21545 301.87872 309.88205 318.54535 325.2168 333.22012"
2566 id="text5862" 2566 id="text5862"
2567 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2567 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2568 transform="scale(1,-1)"><tspan 2568 transform="scale(1,-1)"><tspan
2569 id="tspan5864" 2569 id="tspan5864"
2570 sodipodi:role="line" 2570 sodipodi:role="line"
2571 y="-299.23349" 2571 y="-299.23349"
2572 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 84.504837 93.168114 100.4995 108.50284 117.16611 123.83755 131.8409 140.50418 148.50751 157.17079 160.50652 163.84224 167.17796 175.18129 181.85274 188.52419 195.19562 201.86707 209.19846 212.53418 220.53751 227.20895 235.87224 242.54367 245.87939 254.54268 261.87405 269.87741 278.54068 285.21213 293.21545 301.87872 309.88205 318.54535 325.2168 333.22012">V4L2_FIELD_INTERLACED / V4L2_FIELD_INTERLACED_BT</tspan></text> 2572 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 84.504837 93.168114 100.4995 108.50284 117.16611 123.83755 131.8409 140.50418 148.50751 157.17079 160.50652 163.84224 167.17796 175.18129 181.85274 188.52419 195.19562 201.86707 209.19846 212.53418 220.53751 227.20895 235.87224 242.54367 245.87939 254.54268 261.87405 269.87741 278.54068 285.21213 293.21545 301.87872 309.88205 318.54535 325.2168 333.22012">V4L2_FIELD_INTERLACED / V4L2_FIELD_INTERLACED_BT</tspan></text>
2573<text 2573<text
2574 y="-192.9435" 2574 y="-192.9435"
2575 x="1.5518398 9.5551729 16.226616 22.898062 29.569506 36.240948 43.572334 46.908058 54.911392 61.582836 70.246117 76.917557 80.253281 88.916557 96.247948 104.25128 112.91456 119.586 127.58932 136.25262 144.25595 152.91924 159.59067 166.92206 174.9254 178.26112 182.25679 192.25195 194.91573 200.91524 207.58667 210.25046 212.91423 219.58568 226.25713 232.92856 239.60001" 2575 x="1.5518398 9.5551729 16.226616 22.898062 29.569506 36.240948 43.572334 46.908058 54.911392 61.582836 70.246117 76.917557 80.253281 88.916557 96.247948 104.25128 112.91456 119.586 127.58932 136.25262 144.25595 152.91924 159.59067 166.92206 174.9254 178.26112 182.25679 192.25195 194.91573 200.91524 207.58667 210.25046 212.91423 219.58568 226.25713 232.92856 239.60001"
2576 id="text5866" 2576 id="text5866"
2577 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2577 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2578 transform="scale(1,-1)"><tspan 2578 transform="scale(1,-1)"><tspan
2579 id="tspan5868" 2579 id="tspan5868"
2580 sodipodi:role="line" 2580 sodipodi:role="line"
2581 y="-192.9435" 2581 y="-192.9435"
2582 x="1.5518398 9.5551729 16.226616 22.898062 29.569506 36.240948 43.572334 46.908058 54.911392 61.582836 70.246117 76.917557 80.253281 88.916557 96.247948 104.25128 112.91456 119.586 127.58932 136.25262 144.25595 152.91924 159.59067 166.92206 174.9254 178.26112 182.25679 192.25195 194.91573 200.91524 207.58667 210.25046 212.91423 219.58568 226.25713 232.92856 239.60001">V4L2_FIELD_INTERLACED_TB (misaligned)</tspan></text> 2582 x="1.5518398 9.5551729 16.226616 22.898062 29.569506 36.240948 43.572334 46.908058 54.911392 61.582836 70.246117 76.917557 80.253281 88.916557 96.247948 104.25128 112.91456 119.586 127.58932 136.25262 144.25595 152.91924 159.59067 166.92206 174.9254 178.26112 182.25679 192.25195 194.91573 200.91524 207.58667 210.25046 212.91423 219.58568 226.25713 232.92856 239.60001">V4L2_FIELD_INTERLACED_TB (misaligned)</tspan></text>
2583<text 2583<text
2584 y="-86.653496" 2584 y="-86.653496"
2585 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 89.172447 97.175781 106.511 113.18245 121.18579" 2585 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 89.172447 97.175781 106.511 113.18245 121.18579"
2586 id="text5870" 2586 id="text5870"
2587 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2587 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2588 transform="scale(1,-1)"><tspan 2588 transform="scale(1,-1)"><tspan
2589 id="tspan5872" 2589 id="tspan5872"
2590 sodipodi:role="line" 2590 sodipodi:role="line"
2591 y="-86.653496" 2591 y="-86.653496"
2592 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 89.172447 97.175781 106.511 113.18245 121.18579">V4L2_FIELD_SEQ_BT</tspan></text> 2592 x="5.8034 13.806733 20.478176 27.149622 33.821064 40.492508 47.823895 51.159618 59.162952 65.834396 74.497673 81.169121 89.172447 97.175781 106.511 113.18245 121.18579">V4L2_FIELD_SEQ_BT</tspan></text>
2593<text 2593<text
2594 y="-316.23969" 2594 y="-316.23969"
2595 x="103.58983 109.09226 113.67899 118.26572 122.85246 127.43919 132.47964 134.77301 140.27545 144.86218 150.81833 155.40506 160.44553 166.86365 188.62184 194.12427 198.711 203.29774 207.88448 212.47121 217.51166 219.80502 225.30746 229.8942 235.85034 240.43707 245.9395 252.35764 257.3981 262.43854 268.85669 375.69293 381.19534 385.78207 390.3688 394.95554 399.54227 404.58273 406.8761 412.37854 416.96527 422.92142 427.50815 433.01059 439.42871 444.46918 449.50961 455.92776 1.551828 7.0542617 11.640993 16.227724 20.814463 25.401194 30.441652 32.735016 38.237442 42.824177 48.780331 53.367065 58.869492 65.287621 70.328079 75.368538 81.786659" 2595 x="103.58983 109.09226 113.67899 118.26572 122.85246 127.43919 132.47964 134.77301 140.27545 144.86218 150.81833 155.40506 160.44553 166.86365 188.62184 194.12427 198.711 203.29774 207.88448 212.47121 217.51166 219.80502 225.30746 229.8942 235.85034 240.43707 245.9395 252.35764 257.3981 262.43854 268.85669 375.69293 381.19534 385.78207 390.3688 394.95554 399.54227 404.58273 406.8761 412.37854 416.96527 422.92142 427.50815 433.01059 439.42871 444.46918 449.50961 455.92776 1.551828 7.0542617 11.640993 16.227724 20.814463 25.401194 30.441652 32.735016 38.237442 42.824177 48.780331 53.367065 58.869492 65.287621 70.328079 75.368538 81.786659"
2596 id="text7144" 2596 id="text7144"
2597 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2597 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2598 transform="scale(1,-1)"><tspan 2598 transform="scale(1,-1)"><tspan
2599 id="tspan7146" 2599 id="tspan7146"
2600 sodipodi:role="line" 2600 sodipodi:role="line"
2601 y="-316.23969" 2601 y="-316.23969"
2602 x="103.58983 109.09226 113.67899 118.26572 122.85246 127.43919 132.47964 134.77301 140.27545 144.86218 150.81833 155.40506 160.44553 166.86365 188.62184 194.12427 198.711 203.29774 207.88448 212.47121 217.51166 219.80502 225.30746 229.8942 235.85034 240.43707 245.9395 252.35764 257.3981 262.43854 268.85669 375.69293 381.19534 385.78207 390.3688 394.95554 399.54227 404.58273 406.8761 412.37854 416.96527 422.92142 427.50815 433.01059 439.42871 444.46918 449.50961 455.92776 1.551828 7.0542617 11.640993 16.227724 20.814463 25.401194 30.441652 32.735016 38.237442 42.824177 48.780331 53.367065 58.869492 65.287621 70.328079 75.368538 81.786659">V4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_BOTTOMV4L2_FIELD_BOTTOM</tspan></text> 2602 x="103.58983 109.09226 113.67899 118.26572 122.85246 127.43919 132.47964 134.77301 140.27545 144.86218 150.81833 155.40506 160.44553 166.86365 188.62184 194.12427 198.711 203.29774 207.88448 212.47121 217.51166 219.80502 225.30746 229.8942 235.85034 240.43707 245.9395 252.35764 257.3981 262.43854 268.85669 375.69293 381.19534 385.78207 390.3688 394.95554 399.54227 404.58273 406.8761 412.37854 416.96527 422.92142 427.50815 433.01059 439.42871 444.46918 449.50961 455.92776 1.551828 7.0542617 11.640993 16.227724 20.814463 25.401194 30.441652 32.735016 38.237442 42.824177 48.780331 53.367065 58.869492 65.287621 70.328079 75.368538 81.786659">V4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_BOTTOMV4L2_FIELD_BOTTOM</tspan></text>
2603<text 2603<text
2604 y="-328.99481" 2604 y="-328.99481"
2605 x="10.054964 14.17972 18.766451 20.597849 25.18458 29.771311 34.358047 38.944778 41.238144 43.531509 48.118244 50.865334 53.158699 55.452068 57.283459 61.870193 63.701588 68.288322" 2605 x="10.054964 14.17972 18.766451 20.597849 25.18458 29.771311 34.358047 38.944778 41.238144 43.531509 48.118244 50.865334 53.158699 55.452068 57.283459 61.870193 63.701588 68.288322"
2606 id="text7148" 2606 id="text7148"
2607 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2607 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2608 transform="scale(1,-1)"><tspan 2608 transform="scale(1,-1)"><tspan
2609 id="tspan7150" 2609 id="tspan7150"
2610 sodipodi:role="line" 2610 sodipodi:role="line"
2611 y="-328.99481" 2611 y="-328.99481"
2612 x="10.054964 14.17972 18.766451 20.597849 25.18458 29.771311 34.358047 38.944778 41.238144 43.531509 48.118244 50.865334 53.158699 55.452068 57.283459 61.870193 63.701588 68.288322">v4l2_buffer.field:</tspan></text> 2612 x="10.054964 14.17972 18.766451 20.597849 25.18458 29.771311 34.358047 38.944778 41.238144 43.531509 48.118244 50.865334 53.158699 55.452068 57.283459 61.870193 63.701588 68.288322">v4l2_buffer.field:</tspan></text>
2613</g></svg> \ No newline at end of file 2613</g></svg> \ No newline at end of file
diff --git a/Documentation/media/uapi/v4l/fieldseq_tb.svg b/Documentation/media/uapi/v4l/fieldseq_tb.svg
index 6a7b10ad4ab8..7c74344e770f 100644
--- a/Documentation/media/uapi/v4l/fieldseq_tb.svg
+++ b/Documentation/media/uapi/v4l/fieldseq_tb.svg
@@ -42,15 +42,15 @@
42 inkscape:window-maximized="1" 42 inkscape:window-maximized="1"
43 inkscape:current-layer="g5551" /><metadata 43 inkscape:current-layer="g5551" /><metadata
44 id="metadata5549"><rdf:RDF><cc:Work 44 id="metadata5549"><rdf:RDF><cc:Work
45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs 46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
47 id="defs5547"><clipPath 47 id="defs5547"><clipPath
48 id="clipPath6753" 48 id="clipPath6753"
49 clipPathUnits="userSpaceOnUse"><path 49 clipPathUnits="userSpaceOnUse"><path
50 style="clip-rule:evenodd" 50 style="clip-rule:evenodd"
51 inkscape:connector-curvature="0" 51 inkscape:connector-curvature="0"
52 id="path6755" 52 id="path6755"
53 d="M 0,6000 0,0 l 5660,0 0,6000 -5660,0 z m 4786.76,-102.89 103.92,0 0,56.69 -103.92,0 0,0 85.03,-28.35 -85.03,-28.34 z" /></clipPath></defs><g 53 d="M 0,6000 0,0 l 5660,0 0,6000 -5660,0 z m 4786.76,-102.89 103.92,0 0,56.69 -103.92,0 0,0 85.03,-28.35 -85.03,-28.34 z" /></clipPath></defs><g
54 transform="matrix(1.25,0,0,-1.25,-1.0537,746.57119)" 54 transform="matrix(1.25,0,0,-1.25,-1.0537,746.57119)"
55 inkscape:label="fieldseq_tb" 55 inkscape:label="fieldseq_tb"
56 inkscape:groupmode="layer" 56 inkscape:groupmode="layer"
@@ -2446,13 +2446,13 @@
2446 transform="scale(0.1,0.1)" 2446 transform="scale(0.1,0.1)"
2447 id="g6749" 2447 id="g6749"
2448 style=""><g 2448 style=""><g
2449 id="g6751" 2449 id="g6751"
2450 clip-path="url(#clipPath6753)" 2450 clip-path="url(#clipPath6753)"
2451 style=""><path 2451 style=""><path
2452 d="m 3778.18,5925.45 1105.42,0" 2452 d="m 3778.18,5925.45 1105.42,0"
2453 style="fill:none;stroke:#000000;stroke-width:14.17199993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 2453 style="fill:none;stroke:#000000;stroke-width:14.17199993;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
2454 id="path6757" 2454 id="path6757"
2455 inkscape:connector-curvature="0" /></g></g><path 2455 inkscape:connector-curvature="0" /></g></g><path
2456 d="m 478.676,589.711 8.503,2.834 -8.503,2.835 0,-5.669" 2456 d="m 478.676,589.711 8.503,2.834 -8.503,2.835 0,-5.669"
2457 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 2457 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
2458 id="path6759" 2458 id="path6759"
@@ -2466,142 +2466,145 @@
2466 id="text6765" 2466 id="text6765"
2467 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2467 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2468 transform="scale(1,-1)"><tspan 2468 transform="scale(1,-1)"><tspan
2469 id="tspan6767" 2469 id="tspan6767"
2470 sodipodi:role="line" 2470 sodipodi:role="line"
2471 y="-528.771" 2471 y="-528.771"
2472 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464">V4L2_FIELD_TOP</tspan><tspan 2472 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464">V4L2_FIELD_TOP</tspan><tspan
2473 id="tspan6769" 2473 id="tspan6769"
2474 sodipodi:role="line" 2474 sodipodi:role="line"
2475 y="-460.74561" 2475 y="-460.74561"
2476 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054">V4L2_FIELD_BOTTOM</tspan><tspan 2476 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054">V4L2_FIELD_BOTTOM</tspan><tspan
2477 id="tspan6771" 2477 id="tspan6771"
2478 sodipodi:role="line" 2478 sodipodi:role="line"
2479 y="-392.72021" 2479 y="-392.72021"
2480 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963">V4L2_FIELD_ALTERNATE</tspan></text> 2480 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963">V4L2_FIELD_ALTERNATE</tspan></text>
2481<text 2481<text
2482 y="-324.69479" 2482 y="-324.69479"
2483 x="10.05469" 2483 x="10.05469"
2484 id="text6773" 2484 id="text6773"
2485 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2485 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2486 transform="scale(1,-1)"><tspan 2486 transform="scale(1,-1)"><tspan
2487 id="tspan6775" 2487 id="tspan6775"
2488 sodipodi:role="line" 2488 sodipodi:role="line"
2489 y="-324.69479" 2489 y="-324.69479"
2490 x="10.05469 14.17945 18.766184 20.597576 25.184309 29.771042 34.357777 38.944508 41.237877 43.531242 48.117977 50.865067 53.158432 55.451801 57.283192 61.869926 63.701321 68.288048">v4l2_buffer.field:</tspan><tspan 2490 x="10.05469 14.17945 18.766184 20.597576 25.184309 29.771042 34.357777 38.944508 41.237877 43.531242 48.117977 50.865067 53.158432 55.451801 57.283192 61.869926 63.701321 68.288048">v4l2_buffer.field:</tspan><tspan
2491 id="tspan6777" 2491 id="tspan6777"
2492 sodipodi:role="line" 2492 sodipodi:role="line"
2493 y="-311.9397" 2493 y="-311.9397"
2494 x="10.05469 15.55712 20.143852 24.730585 29.317318 33.904053 38.944508 41.237877 46.740307 51.327042 57.283192 61.869926 66.910378 73.328506 95.0867 100.58913 105.17586 109.7626 114.34933 118.93606 123.97652 126.26987 131.77232 136.35905 142.3152 146.90193 152.40436 158.82249 163.86295 168.9034 175.32153 197.12534 202.62778 207.21451 211.80124 216.38797 220.9747 226.01515 228.30853 233.81096 238.39769 244.35384 248.94058 253.98103 260.39917 282.15695 287.65936 292.24609 296.83282 301.41956 306.00629 311.04675 313.34012 318.84256 323.42929 329.38544 333.97217 339.47461 345.89273 350.9332 355.97363 362.39175 384.19559 389.698 394.28473 398.87149 403.45822 408.04495 413.08539 415.37875 420.8812 425.46793 431.42407 436.0108 441.05127 447.46939 469.2276 474.73001 479.31674 483.90347 488.49023 493.07697 498.1174 500.41077 505.91321 510.49994 516.45612 521.04285 526.54523 532.96338 538.00385 543.04431 549.4624">V4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_TOPV4L2_FIELD_BOTTOM</tspan></text> 2494 x="10.05469 15.55712 20.143852 24.730585 29.317318 33.904053 38.944508 41.237877 46.740307 51.327042 57.283192 61.869926 66.910378 73.328506 95.0867 100.58913 105.17586 109.7626 114.34933 118.93606 123.97652 126.26987 131.77232 136.35905 142.3152 146.90193 152.40436 158.82249 163.86295 168.9034 175.32153 197.12534 202.62778 207.21451 211.80124 216.38797 220.9747 226.01515 228.30853 233.81096 238.39769 244.35384 248.94058 253.98103 260.39917 282.15695 287.65936 292.24609 296.83282 301.41956 306.00629 311.04675 313.34012 318.84256 323.42929 329.38544 333.97217 339.47461 345.89273 350.9332 355.97363 362.39175 384.19559 389.698 394.28473 398.87149 403.45822 408.04495 413.08539 415.37875 420.8812 425.46793 431.42407 436.0108 441.05127 447.46939 469.2276 474.73001 479.31674 483.90347 488.49023 493.07697 498.1174 500.41077 505.91321 510.49994 516.45612 521.04285 526.54523 532.96338
2495538.00385 543.04431 549.4624">V4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_TOPV4L2_FIELD_BOTTOM</tspan></text>
2495<text 2496<text
2496 y="-588.2937" 2497 y="-588.2937"
2497 x="5.8031301" 2498 x="5.8031301"
2498 id="text6779" 2499 id="text6779"
2499 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2500 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2500 transform="scale(1,-1)"><tspan 2501 transform="scale(1,-1)"><tspan
2501 id="tspan6781" 2502 id="tspan6781"
2502 sodipodi:role="line" 2503 sodipodi:role="line"
2503 y="-588.2937" 2504 y="-588.2937"
2504 x="5.8031301 13.134519 19.805964 29.801128 36.472572 43.14402 47.139687 53.811131 56.474907 59.810631 66.482071 70.477737 77.149185 83.820625 87.816299 91.152016 94.48774 97.823463 104.4949 111.16635 114.50207 117.83779 120.50157 127.17302 129.83679 136.50824 139.84396 143.17969 145.84346 149.83913 155.83862 159.17435 162.51007 165.84579 169.84146 176.51291 183.18434 189.18385 199.17902 201.84279 205.17851 208.51424 215.18568 221.85713 225.19284 229.18851 235.85995 239.19568 245.86713 249.20285 252.53857 260.5419 269.87714 273.21286 281.21619 289.21951 295.89096">Temporal order, top field first transmitted (e.g. BG/PAL)</tspan><tspan 2505 x="5.8031301 13.134519 19.805964 29.801128 36.472572 43.14402 47.139687 53.811131 56.474907 59.810631 66.482071 70.477737 77.149185 83.820625 87.816299 91.152016 94.48774 97.823463 104.4949 111.16635 114.50207 117.83779 120.50157 127.17302 129.83679 136.50824 139.84396 143.17969 145.84346 149.83913 155.83862 159.17435 162.51007 165.84579 169.84146 176.51291 183.18434 189.18385 199.17902 201.84279 205.17851 208.51424 215.18568 221.85713 225.19284 229.18851 235.85995 239.19568 245.86713 249.20285 252.53857 260.5419 269.87714 273.21286 281.21619 289.21951 295.89096">Temporal order, top field first transmitted (e.g. BG/PAL)</tspan><tspan
2505 id="tspan6783" 2506 id="tspan6783"
2506 sodipodi:role="line" 2507 sodipodi:role="line"
2507 y="-86.604706" 2508 y="-86.604706"
2508 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 97.175514 106.51073 113.18218 120.51357">V4L2_FIELD_SEQ_TB</tspan><tspan 2509 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 97.175514 106.51073 113.18218 120.51357">V4L2_FIELD_SEQ_TB</tspan><tspan
2509 id="tspan6785" 2510 id="tspan6785"
2510 sodipodi:role="line" 2511 sodipodi:role="line"
2511 y="-192.89471" 2512 y="-192.89471"
2512 x="10.05469 18.058023 24.729465 31.400909 38.072357 44.743801 52.075188 55.410912 63.414246 70.085686 78.748962 85.42041 88.756134 97.419411 104.7508 112.75413 121.41741 128.08885 136.09219 144.75546 152.7588 161.42207 168.09352 176.09685 183.42824 186.76396 190.75963 200.75479 203.41858 209.41808 216.08952 218.7533 221.41707 228.08852 234.75996 241.43141 248.10286">V4L2_FIELD_INTERLACED_BT (misaligned)</tspan><tspan 2513 x="10.05469 18.058023 24.729465 31.400909 38.072357 44.743801 52.075188 55.410912 63.414246 70.085686 78.748962 85.42041 88.756134 97.419411 104.7508 112.75413 121.41741 128.08885 136.09219 144.75546 152.7588 161.42207 168.09352 176.09685 183.42824 186.76396 190.75963 200.75479 203.41858 209.41808 216.08952 218.7533 221.41707 228.08852 234.75996 241.43141 248.10286">V4L2_FIELD_INTERLACED_BT (misaligned)</tspan><tspan
2513 id="tspan6787" 2514 id="tspan6787"
2514 sodipodi:role="line" 2515 sodipodi:role="line"
2515 y="-294.93271" 2516 y="-294.93271"
2516 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 84.50457 93.167847 100.49924 108.50257 117.16585 123.83729 131.84062 140.50391 148.50723 157.17052 160.50624 163.84196 167.17769 175.18102 181.85246 188.52391 195.19534 201.86679 209.19818 212.53391 220.53723 227.20868 235.87196 242.5434 245.87912 254.5424 261.87378 269.87714 278.54041 285.21185 293.21518 301.87845 309.88177 318.54507 325.21652 332.54791">V4L2_FIELD_INTERLACED / V4L2_FIELD_INTERLACED_TB</tspan></text> 2517 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 84.50457 93.167847 100.49924 108.50257 117.16585 123.83729 131.84062 140.50391 148.50723 157.17052 160.50624 163.84196 167.17769 175.18102 181.85246 188.52391 195.19534 201.86679 209.19818 212.53391 220.53723 227.20868 235.87196 242.5434 245.87912 254.5424 261.87378 269.87714 278.54041 285.21185 293.21518 301.87845 309.88177 318.54507 325.21652 332.54791">V4L2_FIELD_INTERLACED / V4L2_FIELD_INTERLACED_TB</tspan></text>
2517<text 2518<text
2518 y="-528.771" 2519 y="-528.771"
2519 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464" 2520 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464"
2520 id="text4583" 2521 id="text4583"
2521 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2522 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2522 transform="scale(1,-1)"><tspan 2523 transform="scale(1,-1)"><tspan
2523 id="tspan4585" 2524 id="tspan4585"
2524 sodipodi:role="line" 2525 sodipodi:role="line"
2525 y="-528.771" 2526 y="-528.771"
2526 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464">V4L2_FIELD_TOP</tspan></text> 2527 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 88.500237 97.835464">V4L2_FIELD_TOP</tspan></text>
2527<text 2528<text
2528 y="-460.74561" 2529 y="-460.74561"
2529 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054" 2530 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054"
2530 id="text4587" 2531 id="text4587"
2531 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2532 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2532 transform="scale(1,-1)"><tspan 2533 transform="scale(1,-1)"><tspan
2533 id="tspan4589" 2534 id="tspan4589"
2534 sodipodi:role="line" 2535 sodipodi:role="line"
2535 y="-460.74561" 2536 y="-460.74561"
2536 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054">V4L2_FIELD_BOTTOM</tspan></text> 2537 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 98.507408 105.83879 113.17018 122.5054">V4L2_FIELD_BOTTOM</tspan></text>
2537<text 2538<text
2538 y="-392.72021" 2539 y="-392.72021"
2539 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963" 2540 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963"
2540 id="text4591" 2541 id="text4591"
2541 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2542 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2542 transform="scale(1,-1)"><tspan 2543 transform="scale(1,-1)"><tspan
2543 id="tspan4593" 2544 id="tspan4593"
2544 sodipodi:role="line" 2545 sodipodi:role="line"
2545 y="-392.72021" 2546 y="-392.72021"
2546 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963">V4L2_FIELD_ALTERNATE</tspan></text> 2547 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 95.843628 103.17502 111.17835 119.84163 128.5049 136.50824 143.83963">V4L2_FIELD_ALTERNATE</tspan></text>
2547<text 2548<text
2548 y="-588.2937" 2549 y="-588.2937"
2549 x="5.8031301 13.134519 19.805964 29.801128 36.472572 43.14402 47.139687 53.811131 56.474907 59.810631 66.482071 70.477737 77.149185 83.820625 87.816299 91.152016 94.48774 97.823463 104.4949 111.16635 114.50207 117.83779 120.50157 127.17302 129.83679 136.50824 139.84396 143.17969 145.84346 149.83913 155.83862 159.17435 162.51007 165.84579 169.84146 176.51291 183.18434 189.18385 199.17902 201.84279 205.17851 208.51424 215.18568 221.85713 225.19284 229.18851 235.85995 239.19568 245.86713 249.20285 252.53857 260.5419 269.87714 273.21286 281.21619 289.21951 295.89096" 2550 x="5.8031301 13.134519 19.805964 29.801128 36.472572 43.14402 47.139687 53.811131 56.474907 59.810631 66.482071 70.477737 77.149185 83.820625 87.816299 91.152016 94.48774 97.823463 104.4949 111.16635 114.50207 117.83779 120.50157 127.17302 129.83679 136.50824 139.84396 143.17969 145.84346 149.83913 155.83862 159.17435 162.51007 165.84579 169.84146 176.51291 183.18434 189.18385 199.17902 201.84279 205.17851 208.51424 215.18568 221.85713 225.19284 229.18851 235.85995 239.19568 245.86713 249.20285 252.53857 260.5419 269.87714 273.21286 281.21619 289.21951 295.89096"
2550 id="text5847" 2551 id="text5847"
2551 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2552 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2552 transform="scale(1,-1)"><tspan 2553 transform="scale(1,-1)"><tspan
2553 id="tspan5849" 2554 id="tspan5849"
2554 sodipodi:role="line" 2555 sodipodi:role="line"
2555 y="-588.2937" 2556 y="-588.2937"
2556 x="5.8031301 13.134519 19.805964 29.801128 36.472572 43.14402 47.139687 53.811131 56.474907 59.810631 66.482071 70.477737 77.149185 83.820625 87.816299 91.152016 94.48774 97.823463 104.4949 111.16635 114.50207 117.83779 120.50157 127.17302 129.83679 136.50824 139.84396 143.17969 145.84346 149.83913 155.83862 159.17435 162.51007 165.84579 169.84146 176.51291 183.18434 189.18385 199.17902 201.84279 205.17851 208.51424 215.18568 221.85713 225.19284 229.18851 235.85995 239.19568 245.86713 249.20285 252.53857 260.5419 269.87714 273.21286 281.21619 289.21951 295.89096">Temporal order, top field first transmitted (e.g. BG/PAL)</tspan></text> 2557 x="5.8031301 13.134519 19.805964 29.801128 36.472572 43.14402 47.139687 53.811131 56.474907 59.810631 66.482071 70.477737 77.149185 83.820625 87.816299 91.152016 94.48774 97.823463 104.4949 111.16635 114.50207 117.83779 120.50157 127.17302 129.83679 136.50824 139.84396 143.17969 145.84346 149.83913 155.83862 159.17435 162.51007 165.84579 169.84146 176.51291 183.18434 189.18385 199.17902 201.84279 205.17851 208.51424 215.18568 221.85713 225.19284 229.18851 235.85995 239.19568 245.86713 249.20285 252.53857 260.5419 269.87714 273.21286 281.21619 289.21951 295.89096">Temporal order, top field first transmitted (e.g. BG/PAL)</tspan></text>
2557<text 2558<text
2558 y="-86.604706" 2559 y="-86.604706"
2559 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 97.175514 106.51073 113.18218 120.51357" 2560 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 97.175514 106.51073 113.18218 120.51357"
2560 id="text5851" 2561 id="text5851"
2561 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2562 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2562 transform="scale(1,-1)"><tspan 2563 transform="scale(1,-1)"><tspan
2563 id="tspan5853" 2564 id="tspan5853"
2564 sodipodi:role="line" 2565 sodipodi:role="line"
2565 y="-86.604706" 2566 y="-86.604706"
2566 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 97.175514 106.51073 113.18218 120.51357">V4L2_FIELD_SEQ_TB</tspan></text> 2567 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 89.17218 97.175514 106.51073 113.18218 120.51357">V4L2_FIELD_SEQ_TB</tspan></text>
2567<text 2568<text
2568 y="-192.89471" 2569 y="-192.89471"
2569 x="10.05469 18.058023 24.729465 31.400909 38.072357 44.743801 52.075188 55.410912 63.414246 70.085686 78.748962 85.42041 88.756134 97.419411 104.7508 112.75413 121.41741 128.08885 136.09219 144.75546 152.7588 161.42207 168.09352 176.09685 183.42824 186.76396 190.75963 200.75479 203.41858 209.41808 216.08952 218.7533 221.41707 228.08852 234.75996 241.43141 248.10286" 2570 x="10.05469 18.058023 24.729465 31.400909 38.072357 44.743801 52.075188 55.410912 63.414246 70.085686 78.748962 85.42041 88.756134 97.419411 104.7508 112.75413 121.41741 128.08885 136.09219 144.75546 152.7588 161.42207 168.09352 176.09685 183.42824 186.76396 190.75963 200.75479 203.41858 209.41808 216.08952 218.7533 221.41707 228.08852 234.75996 241.43141 248.10286"
2570 id="text5855" 2571 id="text5855"
2571 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2572 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2572 transform="scale(1,-1)"><tspan 2573 transform="scale(1,-1)"><tspan
2573 id="tspan5857" 2574 id="tspan5857"
2574 sodipodi:role="line" 2575 sodipodi:role="line"
2575 y="-192.89471" 2576 y="-192.89471"
2576 x="10.05469 18.058023 24.729465 31.400909 38.072357 44.743801 52.075188 55.410912 63.414246 70.085686 78.748962 85.42041 88.756134 97.419411 104.7508 112.75413 121.41741 128.08885 136.09219 144.75546 152.7588 161.42207 168.09352 176.09685 183.42824 186.76396 190.75963 200.75479 203.41858 209.41808 216.08952 218.7533 221.41707 228.08852 234.75996 241.43141 248.10286">V4L2_FIELD_INTERLACED_BT (misaligned)</tspan></text> 2577 x="10.05469 18.058023 24.729465 31.400909 38.072357 44.743801 52.075188 55.410912 63.414246 70.085686 78.748962 85.42041 88.756134 97.419411 104.7508 112.75413 121.41741 128.08885 136.09219 144.75546 152.7588 161.42207 168.09352 176.09685 183.42824 186.76396 190.75963 200.75479 203.41858 209.41808 216.08952 218.7533 221.41707 228.08852 234.75996 241.43141 248.10286">V4L2_FIELD_INTERLACED_BT (misaligned)</tspan></text>
2577<text 2578<text
2578 y="-294.93271" 2579 y="-294.93271"
2579 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 84.50457 93.167847 100.49924 108.50257 117.16585 123.83729 131.84062 140.50391 148.50723 157.17052 160.50624 163.84196 167.17769 175.18102 181.85246 188.52391 195.19534 201.86679 209.19818 212.53391 220.53723 227.20868 235.87196 242.5434 245.87912 254.5424 261.87378 269.87714 278.54041 285.21185 293.21518 301.87845 309.88177 318.54507 325.21652 332.54791" 2580 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 84.50457 93.167847 100.49924 108.50257 117.16585 123.83729 131.84062 140.50391 148.50723 157.17052 160.50624 163.84196 167.17769 175.18102 181.85246 188.52391 195.19534 201.86679 209.19818 212.53391 220.53723 227.20868 235.87196 242.5434 245.87912 254.5424 261.87378 269.87714 278.54041 285.21185 293.21518 301.87845 309.88177 318.54507 325.21652 332.54791"
2580 id="text5859" 2581 id="text5859"
2581 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2582 style="font-variant:normal;font-weight:normal;font-size:11.9989996px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2582 transform="scale(1,-1)"><tspan 2583 transform="scale(1,-1)"><tspan
2583 id="tspan5861" 2584 id="tspan5861"
2584 sodipodi:role="line" 2585 sodipodi:role="line"
2585 y="-294.93271" 2586 y="-294.93271"
2586 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 84.50457 93.167847 100.49924 108.50257 117.16585 123.83729 131.84062 140.50391 148.50723 157.17052 160.50624 163.84196 167.17769 175.18102 181.85246 188.52391 195.19534 201.86679 209.19818 212.53391 220.53723 227.20868 235.87196 242.5434 245.87912 254.5424 261.87378 269.87714 278.54041 285.21185 293.21518 301.87845 309.88177 318.54507 325.21652 332.54791">V4L2_FIELD_INTERLACED / V4L2_FIELD_INTERLACED_TB</tspan></text> 2587 x="5.8031301 13.806463 20.477907 27.149351 33.820797 40.492241 47.823627 51.159351 59.162685 65.834129 74.497406 81.168854 84.50457 93.167847 100.49924 108.50257 117.16585 123.83729 131.84062 140.50391 148.50723 157.17052 160.50624 163.84196 167.17769 175.18102 181.85246 188.52391 195.19534 201.86679 209.19818 212.53391 220.53723 227.20868 235.87196 242.5434 245.87912 254.5424 261.87378 269.87714 278.54041 285.21185 293.21518 301.87845 309.88177 318.54507 325.21652 332.54791">V4L2_FIELD_INTERLACED / V4L2_FIELD_INTERLACED_TB</tspan></text>
2587<text 2588<text
2588 y="-324.69479" 2589 y="-324.69479"
2589 x="10.05469 14.17945 18.766184 20.597576 25.184309 29.771042 34.357777 38.944508 41.237877 43.531242 48.117977 50.865067 53.158432 55.451801 57.283192 61.869926 63.701321 68.288048" 2590 x="10.05469 14.17945 18.766184 20.597576 25.184309 29.771042 34.357777 38.944508 41.237877 43.531242 48.117977 50.865067 53.158432 55.451801 57.283192 61.869926 63.701321 68.288048"
2590 id="text7131" 2591 id="text7131"
2591 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2592 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2592 transform="scale(1,-1)"><tspan 2593 transform="scale(1,-1)"><tspan
2593 id="tspan7133" 2594 id="tspan7133"
2594 sodipodi:role="line" 2595 sodipodi:role="line"
2595 y="-324.69479" 2596 y="-324.69479"
2596 x="10.05469 14.17945 18.766184 20.597576 25.184309 29.771042 34.357777 38.944508 41.237877 43.531242 48.117977 50.865067 53.158432 55.451801 57.283192 61.869926 63.701321 68.288048">v4l2_buffer.field:</tspan></text> 2597 x="10.05469 14.17945 18.766184 20.597576 25.184309 29.771042 34.357777 38.944508 41.237877 43.531242 48.117977 50.865067 53.158432 55.451801 57.283192 61.869926 63.701321 68.288048">v4l2_buffer.field:</tspan></text>
2597<text 2598<text
2598 y="-311.9397" 2599 y="-311.9397"
2599 x="10.05469 15.55712 20.143852 24.730585 29.317318 33.904053 38.944508 41.237877 46.740307 51.327042 57.283192 61.869926 66.910378 73.328506 95.0867 100.58913 105.17586 109.7626 114.34933 118.93606 123.97652 126.26987 131.77232 136.35905 142.3152 146.90193 152.40436 158.82249 163.86295 168.9034 175.32153 197.12534 202.62778 207.21451 211.80124 216.38797 220.9747 226.01515 228.30853 233.81096 238.39769 244.35384 248.94058 253.98103 260.39917 282.15695 287.65936 292.24609 296.83282 301.41956 306.00629 311.04675 313.34012 318.84256 323.42929 329.38544 333.97217 339.47461 345.89273 350.9332 355.97363 362.39175 384.19559 389.698 394.28473 398.87149 403.45822 408.04495 413.08539 415.37875 420.8812 425.46793 431.42407 436.0108 441.05127 447.46939 469.2276 474.73001 479.31674 483.90347 488.49023 493.07697 498.1174 500.41077 505.91321 510.49994 516.45612 521.04285 526.54523 532.96338 538.00385 543.04431 549.4624" 2600 x="10.05469 15.55712 20.143852 24.730585 29.317318 33.904053 38.944508 41.237877 46.740307 51.327042 57.283192 61.869926 66.910378 73.328506 95.0867 100.58913 105.17586 109.7626 114.34933 118.93606 123.97652 126.26987 131.77232 136.35905 142.3152 146.90193 152.40436 158.82249 163.86295 168.9034 175.32153 197.12534 202.62778 207.21451 211.80124 216.38797 220.9747 226.01515 228.30853 233.81096 238.39769 244.35384 248.94058 253.98103 260.39917 282.15695 287.65936 292.24609 296.83282 301.41956 306.00629 311.04675 313.34012 318.84256 323.42929 329.38544 333.97217 339.47461 345.89273 350.9332 355.97363 362.39175 384.19559 389.698 394.28473 398.87149 403.45822 408.04495 413.08539 415.37875 420.8812 425.46793 431.42407 436.0108 441.05127 447.46939 469.2276 474.73001 479.31674 483.90347 488.49023 493.07697 498.1174 500.41077 505.91321 510.49994 516.45612 521.04285 526.54523 532.96338
2601538.00385 543.04431 549.4624"
2600 id="text7135" 2602 id="text7135"
2601 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 2603 style="font-variant:normal;font-weight:normal;font-size:8.2495203px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
2602 transform="scale(1,-1)"><tspan 2604 transform="scale(1,-1)"><tspan
2603 id="tspan7137" 2605 id="tspan7137"
2604 sodipodi:role="line" 2606 sodipodi:role="line"
2605 y="-311.9397" 2607 y="-311.9397"
2606 x="10.05469 15.55712 20.143852 24.730585 29.317318 33.904053 38.944508 41.237877 46.740307 51.327042 57.283192 61.869926 66.910378 73.328506 95.0867 100.58913 105.17586 109.7626 114.34933 118.93606 123.97652 126.26987 131.77232 136.35905 142.3152 146.90193 152.40436 158.82249 163.86295 168.9034 175.32153 197.12534 202.62778 207.21451 211.80124 216.38797 220.9747 226.01515 228.30853 233.81096 238.39769 244.35384 248.94058 253.98103 260.39917 282.15695 287.65936 292.24609 296.83282 301.41956 306.00629 311.04675 313.34012 318.84256 323.42929 329.38544 333.97217 339.47461 345.89273 350.9332 355.97363 362.39175 384.19559 389.698 394.28473 398.87149 403.45822 408.04495 413.08539 415.37875 420.8812 425.46793 431.42407 436.0108 441.05127 447.46939 469.2276 474.73001 479.31674 483.90347 488.49023 493.07697 498.1174 500.41077 505.91321 510.49994 516.45612 521.04285 526.54523 532.96338 538.00385 543.04431 549.4624">V4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_TOPV4L2_FIELD_BOTTOM</tspan></text> 2608 x="10.05469 15.55712 20.143852 24.730585 29.317318 33.904053 38.944508 41.237877 46.740307 51.327042 57.283192 61.869926 66.910378 73.328506 95.0867 100.58913 105.17586 109.7626 114.34933 118.93606 123.97652 126.26987 131.77232 136.35905 142.3152 146.90193 152.40436 158.82249 163.86295 168.9034 175.32153 197.12534 202.62778 207.21451 211.80124 216.38797 220.9747 226.01515 228.30853 233.81096 238.39769 244.35384 248.94058 253.98103 260.39917 282.15695 287.65936 292.24609 296.83282 301.41956 306.00629 311.04675 313.34012 318.84256 323.42929 329.38544 333.97217 339.47461 345.89273 350.9332 355.97363 362.39175 384.19559 389.698 394.28473 398.87149 403.45822 408.04495 413.08539 415.37875 420.8812 425.46793 431.42407 436.0108 441.05127 447.46939 469.2276 474.73001 479.31674 483.90347 488.49023 493.07697 498.1174 500.41077 505.91321 510.49994 516.45612 521.04285 526.54523 532.96338
2609538.00385 543.04431 549.4624">V4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_TOPV4L2_FIELD_BOTTOMV4L2_FIELD_TOPV4L2_FIELD_BOTTOM</tspan></text>
2607</g></svg> \ No newline at end of file 2610</g></svg> \ No newline at end of file
diff --git a/Documentation/media/uapi/v4l/nv12mt.svg b/Documentation/media/uapi/v4l/nv12mt.svg
index 21fcccda9723..65d05606c04c 100644
--- a/Documentation/media/uapi/v4l/nv12mt.svg
+++ b/Documentation/media/uapi/v4l/nv12mt.svg
@@ -18,8 +18,8 @@
18 sodipodi:docname="nv12mt.svg" 18 sodipodi:docname="nv12mt.svg"
19 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata 19 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata
20 id="metadata383"><rdf:RDF><cc:Work 20 id="metadata383"><rdf:RDF><cc:Work
21 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 21 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview 22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
23 pagecolor="#ffffff" 23 pagecolor="#ffffff"
24 bordercolor="#666666" 24 bordercolor="#666666"
25 borderopacity="1" 25 borderopacity="1"
@@ -47,11 +47,11 @@
47 id="defs4"><clipPath 47 id="defs4"><clipPath
48 id="presentation_clip_path" 48 id="presentation_clip_path"
49 clipPathUnits="userSpaceOnUse"><rect 49 clipPathUnits="userSpaceOnUse"><rect
50 x="0" 50 x="0"
51 y="0" 51 y="0"
52 width="28000" 52 width="28000"
53 height="21000" 53 height="21000"
54 id="rect7" /></clipPath></defs><defs 54 id="rect7" /></clipPath></defs><defs
55 id="defs9" /><defs 55 id="defs9" /><defs
56 id="defs80" /><defs 56 id="defs80" /><defs
57 id="defs103" /><defs 57 id="defs103" /><defs
@@ -65,386 +65,386 @@
65 id="g177" 65 id="g177"
66 transform="translate(-3285.889,-3185.889)"><g 66 transform="translate(-3285.889,-3185.889)"><g
67 id="g179"><g 67 id="g179"><g
68 id="id1" 68 id="id1"
69 class="Slide" 69 class="Slide"
70 clip-path="url(#presentation_clip_path)"><g 70 clip-path="url(#presentation_clip_path)"><g
71 class="Page" 71 class="Page"
72 id="g182"><g 72 id="g182"><g
73 class="com.sun.star.drawing.CustomShape" 73 class="com.sun.star.drawing.CustomShape"
74 id="g184"><g 74 id="g184"><g
75 id="id6"><rect 75 id="id6"><rect
76 class="BoundingBox" 76 class="BoundingBox"
77 x="3299" 77 x="3299"
78 y="3199" 78 y="3199"
79 width="2403" 79 width="2403"
80 height="1403" 80 height="1403"
81 id="rect187" 81 id="rect187"
82 style="fill:none;stroke:none" /><path 82 style="fill:none;stroke:none" /><path
83 d="m 4500,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 83 d="m 4500,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
84 id="path189" 84 id="path189"
85 inkscape:connector-curvature="0" 85 inkscape:connector-curvature="0"
86 style="fill:none;stroke:#3465a4" /><text 86 style="fill:none;stroke:#3465a4" /><text
87 class="TextShape" 87 class="TextShape"
88 id="text191"><tspan 88 id="text191"><tspan
89 class="TextParagraph" 89 class="TextParagraph"
90 font-size="635px" 90 font-size="635px"
91 font-weight="400" 91 font-weight="400"
92 id="tspan193" 92 id="tspan193"
93 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 93 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
94 class="TextPosition" 94 class="TextPosition"
95 x="4325" 95 x="4325"
96 y="4121" 96 y="4121"
97 id="tspan195"><tspan 97 id="tspan195"><tspan
98 id="tspan197" 98 id="tspan197"
99 style="fill:#000000;stroke:none">0</tspan></tspan></tspan></text> 99 style="fill:#000000;stroke:none">0</tspan></tspan></tspan></text>
100</g></g><g 100</g></g><g
101 class="com.sun.star.drawing.CustomShape" 101 class="com.sun.star.drawing.CustomShape"
102 id="g199"><g 102 id="g199"><g
103 id="id7"><rect 103 id="id7"><rect
104 class="BoundingBox" 104 class="BoundingBox"
105 x="5699" 105 x="5699"
106 y="3199" 106 y="3199"
107 width="2403" 107 width="2403"
108 height="1403" 108 height="1403"
109 id="rect202" 109 id="rect202"
110 style="fill:none;stroke:none" /><path 110 style="fill:none;stroke:none" /><path
111 d="m 6900,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 111 d="m 6900,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
112 id="path204" 112 id="path204"
113 inkscape:connector-curvature="0" 113 inkscape:connector-curvature="0"
114 style="fill:none;stroke:#3465a4" /></g></g><g 114 style="fill:none;stroke:#3465a4" /></g></g><g
115 class="com.sun.star.drawing.CustomShape" 115 class="com.sun.star.drawing.CustomShape"
116 id="g206"><g 116 id="g206"><g
117 id="id8"><rect 117 id="id8"><rect
118 class="BoundingBox" 118 class="BoundingBox"
119 x="8099" 119 x="8099"
120 y="3199" 120 y="3199"
121 width="2403" 121 width="2403"
122 height="1403" 122 height="1403"
123 id="rect209" 123 id="rect209"
124 style="fill:none;stroke:none" /><path 124 style="fill:none;stroke:none" /><path
125 d="m 9300,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 125 d="m 9300,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
126 id="path211" 126 id="path211"
127 inkscape:connector-curvature="0" 127 inkscape:connector-curvature="0"
128 style="fill:none;stroke:#3465a4" /><text 128 style="fill:none;stroke:#3465a4" /><text
129 class="TextShape" 129 class="TextShape"
130 id="text213"><tspan 130 id="text213"><tspan
131 class="TextParagraph" 131 class="TextParagraph"
132 font-size="635px" 132 font-size="635px"
133 font-weight="400" 133 font-weight="400"
134 id="tspan215" 134 id="tspan215"
135 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 135 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
136 class="TextPosition" 136 class="TextPosition"
137 x="9125" 137 x="9125"
138 y="4121" 138 y="4121"
139 id="tspan217"><tspan 139 id="tspan217"><tspan
140 id="tspan219" 140 id="tspan219"
141 style="fill:#000000;stroke:none">6</tspan></tspan></tspan></text> 141 style="fill:#000000;stroke:none">6</tspan></tspan></tspan></text>
142</g></g><g 142</g></g><g
143 class="com.sun.star.drawing.CustomShape" 143 class="com.sun.star.drawing.CustomShape"
144 id="g221"><g 144 id="g221"><g
145 id="id9"><rect 145 id="id9"><rect
146 class="BoundingBox" 146 class="BoundingBox"
147 x="5699" 147 x="5699"
148 y="3199" 148 y="3199"
149 width="2403" 149 width="2403"
150 height="1403" 150 height="1403"
151 id="rect224" 151 id="rect224"
152 style="fill:none;stroke:none" /><path 152 style="fill:none;stroke:none" /><path
153 d="m 6900,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 153 d="m 6900,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
154 id="path226" 154 id="path226"
155 inkscape:connector-curvature="0" 155 inkscape:connector-curvature="0"
156 style="fill:none;stroke:#3465a4" /><text 156 style="fill:none;stroke:#3465a4" /><text
157 class="TextShape" 157 class="TextShape"
158 id="text228"><tspan 158 id="text228"><tspan
159 class="TextParagraph" 159 class="TextParagraph"
160 font-size="635px" 160 font-size="635px"
161 font-weight="400" 161 font-weight="400"
162 id="tspan230" 162 id="tspan230"
163 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 163 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
164 class="TextPosition" 164 class="TextPosition"
165 x="6725" 165 x="6725"
166 y="4121" 166 y="4121"
167 id="tspan232"><tspan 167 id="tspan232"><tspan
168 id="tspan234" 168 id="tspan234"
169 style="fill:#000000;stroke:none">1</tspan></tspan></tspan></text> 169 style="fill:#000000;stroke:none">1</tspan></tspan></tspan></text>
170</g></g><g 170</g></g><g
171 class="com.sun.star.drawing.CustomShape" 171 class="com.sun.star.drawing.CustomShape"
172 id="g236"><g 172 id="g236"><g
173 id="id10"><rect 173 id="id10"><rect
174 class="BoundingBox" 174 class="BoundingBox"
175 x="10499" 175 x="10499"
176 y="3199" 176 y="3199"
177 width="2403" 177 width="2403"
178 height="1403" 178 height="1403"
179 id="rect239" 179 id="rect239"
180 style="fill:none;stroke:none" /><path 180 style="fill:none;stroke:none" /><path
181 d="m 11700,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 181 d="m 11700,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
182 id="path241" 182 id="path241"
183 inkscape:connector-curvature="0" 183 inkscape:connector-curvature="0"
184 style="fill:none;stroke:#3465a4" /><text 184 style="fill:none;stroke:#3465a4" /><text
185 class="TextShape" 185 class="TextShape"
186 id="text243"><tspan 186 id="text243"><tspan
187 class="TextParagraph" 187 class="TextParagraph"
188 font-size="635px" 188 font-size="635px"
189 font-weight="400" 189 font-weight="400"
190 id="tspan245" 190 id="tspan245"
191 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 191 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
192 class="TextPosition" 192 class="TextPosition"
193 x="11525" 193 x="11525"
194 y="4121" 194 y="4121"
195 id="tspan247"><tspan 195 id="tspan247"><tspan
196 id="tspan249" 196 id="tspan249"
197 style="fill:#000000;stroke:none">7</tspan></tspan></tspan></text> 197 style="fill:#000000;stroke:none">7</tspan></tspan></tspan></text>
198</g></g><g 198</g></g><g
199 class="com.sun.star.drawing.CustomShape" 199 class="com.sun.star.drawing.CustomShape"
200 id="g251"><g 200 id="g251"><g
201 id="id11"><rect 201 id="id11"><rect
202 class="BoundingBox" 202 class="BoundingBox"
203 x="3299" 203 x="3299"
204 y="4599" 204 y="4599"
205 width="2403" 205 width="2403"
206 height="1403" 206 height="1403"
207 id="rect254" 207 id="rect254"
208 style="fill:none;stroke:none" /><path 208 style="fill:none;stroke:none" /><path
209 d="m 4500,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 209 d="m 4500,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
210 id="path256" 210 id="path256"
211 inkscape:connector-curvature="0" 211 inkscape:connector-curvature="0"
212 style="fill:none;stroke:#3465a4" /><text 212 style="fill:none;stroke:#3465a4" /><text
213 class="TextShape" 213 class="TextShape"
214 id="text258"><tspan 214 id="text258"><tspan
215 class="TextParagraph" 215 class="TextParagraph"
216 font-size="635px" 216 font-size="635px"
217 font-weight="400" 217 font-weight="400"
218 id="tspan260" 218 id="tspan260"
219 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 219 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
220 class="TextPosition" 220 class="TextPosition"
221 x="4325" 221 x="4325"
222 y="5521" 222 y="5521"
223 id="tspan262"><tspan 223 id="tspan262"><tspan
224 id="tspan264" 224 id="tspan264"
225 style="fill:#000000;stroke:none">2</tspan></tspan></tspan></text> 225 style="fill:#000000;stroke:none">2</tspan></tspan></tspan></text>
226</g></g><g 226</g></g><g
227 class="com.sun.star.drawing.CustomShape" 227 class="com.sun.star.drawing.CustomShape"
228 id="g266"><g 228 id="g266"><g
229 id="id12"><rect 229 id="id12"><rect
230 class="BoundingBox" 230 class="BoundingBox"
231 x="5699" 231 x="5699"
232 y="4599" 232 y="4599"
233 width="2403" 233 width="2403"
234 height="1403" 234 height="1403"
235 id="rect269" 235 id="rect269"
236 style="fill:none;stroke:none" /><path 236 style="fill:none;stroke:none" /><path
237 d="m 6900,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 237 d="m 6900,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
238 id="path271" 238 id="path271"
239 inkscape:connector-curvature="0" 239 inkscape:connector-curvature="0"
240 style="fill:none;stroke:#3465a4" /></g></g><g 240 style="fill:none;stroke:#3465a4" /></g></g><g
241 class="com.sun.star.drawing.CustomShape" 241 class="com.sun.star.drawing.CustomShape"
242 id="g273"><g 242 id="g273"><g
243 id="id13"><rect 243 id="id13"><rect
244 class="BoundingBox" 244 class="BoundingBox"
245 x="8099" 245 x="8099"
246 y="4599" 246 y="4599"
247 width="2403" 247 width="2403"
248 height="1403" 248 height="1403"
249 id="rect276" 249 id="rect276"
250 style="fill:none;stroke:none" /><path 250 style="fill:none;stroke:none" /><path
251 d="m 9300,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 251 d="m 9300,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
252 id="path278" 252 id="path278"
253 inkscape:connector-curvature="0" 253 inkscape:connector-curvature="0"
254 style="fill:none;stroke:#3465a4" /><text 254 style="fill:none;stroke:#3465a4" /><text
255 class="TextShape" 255 class="TextShape"
256 id="text280"><tspan 256 id="text280"><tspan
257 class="TextParagraph" 257 class="TextParagraph"
258 font-size="635px" 258 font-size="635px"
259 font-weight="400" 259 font-weight="400"
260 id="tspan282" 260 id="tspan282"
261 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 261 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
262 class="TextPosition" 262 class="TextPosition"
263 x="9125" 263 x="9125"
264 y="5521" 264 y="5521"
265 id="tspan284"><tspan 265 id="tspan284"><tspan
266 id="tspan286" 266 id="tspan286"
267 style="fill:#000000;stroke:none">4</tspan></tspan></tspan></text> 267 style="fill:#000000;stroke:none">4</tspan></tspan></tspan></text>
268</g></g><g 268</g></g><g
269 class="com.sun.star.drawing.CustomShape" 269 class="com.sun.star.drawing.CustomShape"
270 id="g288"><g 270 id="g288"><g
271 id="id14"><rect 271 id="id14"><rect
272 class="BoundingBox" 272 class="BoundingBox"
273 x="5699" 273 x="5699"
274 y="4599" 274 y="4599"
275 width="2403" 275 width="2403"
276 height="1403" 276 height="1403"
277 id="rect291" 277 id="rect291"
278 style="fill:none;stroke:none" /><path 278 style="fill:none;stroke:none" /><path
279 d="m 6900,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 279 d="m 6900,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
280 id="path293" 280 id="path293"
281 inkscape:connector-curvature="0" 281 inkscape:connector-curvature="0"
282 style="fill:none;stroke:#3465a4" /><text 282 style="fill:none;stroke:#3465a4" /><text
283 class="TextShape" 283 class="TextShape"
284 id="text295"><tspan 284 id="text295"><tspan
285 class="TextParagraph" 285 class="TextParagraph"
286 font-size="635px" 286 font-size="635px"
287 font-weight="400" 287 font-weight="400"
288 id="tspan297" 288 id="tspan297"
289 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 289 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
290 class="TextPosition" 290 class="TextPosition"
291 x="6725" 291 x="6725"
292 y="5521" 292 y="5521"
293 id="tspan299"><tspan 293 id="tspan299"><tspan
294 id="tspan301" 294 id="tspan301"
295 style="fill:#000000;stroke:none">3</tspan></tspan></tspan></text> 295 style="fill:#000000;stroke:none">3</tspan></tspan></tspan></text>
296</g></g><g 296</g></g><g
297 class="com.sun.star.drawing.CustomShape" 297 class="com.sun.star.drawing.CustomShape"
298 id="g303"><g 298 id="g303"><g
299 id="id15"><rect 299 id="id15"><rect
300 class="BoundingBox" 300 class="BoundingBox"
301 x="10499" 301 x="10499"
302 y="4599" 302 y="4599"
303 width="2403" 303 width="2403"
304 height="1403" 304 height="1403"
305 id="rect306" 305 id="rect306"
306 style="fill:none;stroke:none" /><path 306 style="fill:none;stroke:none" /><path
307 d="m 11700,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 307 d="m 11700,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
308 id="path308" 308 id="path308"
309 inkscape:connector-curvature="0" 309 inkscape:connector-curvature="0"
310 style="fill:none;stroke:#3465a4" /><text 310 style="fill:none;stroke:#3465a4" /><text
311 class="TextShape" 311 class="TextShape"
312 id="text310"><tspan 312 id="text310"><tspan
313 class="TextParagraph" 313 class="TextParagraph"
314 font-size="635px" 314 font-size="635px"
315 font-weight="400" 315 font-weight="400"
316 id="tspan312" 316 id="tspan312"
317 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 317 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
318 class="TextPosition" 318 class="TextPosition"
319 x="11525" 319 x="11525"
320 y="5521" 320 y="5521"
321 id="tspan314"><tspan 321 id="tspan314"><tspan
322 id="tspan316" 322 id="tspan316"
323 style="fill:#000000;stroke:none">5</tspan></tspan></tspan></text> 323 style="fill:#000000;stroke:none">5</tspan></tspan></tspan></text>
324</g></g><g 324</g></g><g
325 class="com.sun.star.drawing.LineShape" 325 class="com.sun.star.drawing.LineShape"
326 id="g318"><g 326 id="g318"><g
327 id="id16"><rect 327 id="id16"><rect
328 class="BoundingBox" 328 class="BoundingBox"
329 x="5199" 329 x="5199"
330 y="3850" 330 y="3850"
331 width="1402" 331 width="1402"
332 height="301" 332 height="301"
333 id="rect321" 333 id="rect321"
334 style="fill:none;stroke:none" /><path 334 style="fill:none;stroke:none" /><path
335 d="m 5200,4000 970,0" 335 d="m 5200,4000 970,0"
336 id="path323" 336 id="path323"
337 inkscape:connector-curvature="0" 337 inkscape:connector-curvature="0"
338 style="fill:none;stroke:#ff3333" /><path 338 style="fill:none;stroke:#ff3333" /><path
339 d="m 6600,4000 -450,-150 0,300 450,-150 z" 339 d="m 6600,4000 -450,-150 0,300 450,-150 z"
340 id="path325" 340 id="path325"
341 inkscape:connector-curvature="0" 341 inkscape:connector-curvature="0"
342 style="fill:#ff3333;stroke:none" /></g></g><g 342 style="fill:#ff3333;stroke:none" /></g></g><g
343 class="com.sun.star.drawing.LineShape" 343 class="com.sun.star.drawing.LineShape"
344 id="g327"><g 344 id="g327"><g
345 id="id17"><rect 345 id="id17"><rect
346 class="BoundingBox" 346 class="BoundingBox"
347 x="5000" 347 x="5000"
348 y="4299" 348 y="4299"
349 width="1202" 349 width="1202"
350 height="802" 350 height="802"
351 id="rect330" 351 id="rect330"
352 style="fill:none;stroke:none" /><path 352 style="fill:none;stroke:none" /><path
353 d="m 6200,4300 -842,561" 353 d="m 6200,4300 -842,561"
354 id="path332" 354 id="path332"
355 inkscape:connector-curvature="0" 355 inkscape:connector-curvature="0"
356 style="fill:none;stroke:#ff3333" /><path 356 style="fill:none;stroke:#ff3333" /><path
357 d="m 5000,5100 458,-125 -167,-249 -291,374 z" 357 d="m 5000,5100 458,-125 -167,-249 -291,374 z"
358 id="path334" 358 id="path334"
359 inkscape:connector-curvature="0" 359 inkscape:connector-curvature="0"
360 style="fill:#ff3333;stroke:none" /></g></g><g 360 style="fill:#ff3333;stroke:none" /></g></g><g
361 class="com.sun.star.drawing.LineShape" 361 class="com.sun.star.drawing.LineShape"
362 id="g336"><g 362 id="g336"><g
363 id="id18"><rect 363 id="id18"><rect
364 class="BoundingBox" 364 class="BoundingBox"
365 x="5399" 365 x="5399"
366 y="5250" 366 y="5250"
367 width="1202" 367 width="1202"
368 height="301" 368 height="301"
369 id="rect339" 369 id="rect339"
370 style="fill:none;stroke:none" /><path 370 style="fill:none;stroke:none" /><path
371 d="m 5400,5400 770,0" 371 d="m 5400,5400 770,0"
372 id="path341" 372 id="path341"
373 inkscape:connector-curvature="0" 373 inkscape:connector-curvature="0"
374 style="fill:none;stroke:#ff3333" /><path 374 style="fill:none;stroke:#ff3333" /><path
375 d="m 6600,5400 -450,-150 0,300 450,-150 z" 375 d="m 6600,5400 -450,-150 0,300 450,-150 z"
376 id="path343" 376 id="path343"
377 inkscape:connector-curvature="0" 377 inkscape:connector-curvature="0"
378 style="fill:#ff3333;stroke:none" /></g></g><g 378 style="fill:#ff3333;stroke:none" /></g></g><g
379 class="com.sun.star.drawing.LineShape" 379 class="com.sun.star.drawing.LineShape"
380 id="g345"><g 380 id="g345"><g
381 id="id19"><rect 381 id="id19"><rect
382 class="BoundingBox" 382 class="BoundingBox"
383 x="7599" 383 x="7599"
384 y="5250" 384 y="5250"
385 width="1202" 385 width="1202"
386 height="301" 386 height="301"
387 id="rect348" 387 id="rect348"
388 style="fill:none;stroke:none" /><path 388 style="fill:none;stroke:none" /><path
389 d="m 7600,5400 770,0" 389 d="m 7600,5400 770,0"
390 id="path350" 390 id="path350"
391 inkscape:connector-curvature="0" 391 inkscape:connector-curvature="0"
392 style="fill:none;stroke:#ff3333" /><path 392 style="fill:none;stroke:#ff3333" /><path
393 d="m 8800,5400 -450,-150 0,300 450,-150 z" 393 d="m 8800,5400 -450,-150 0,300 450,-150 z"
394 id="path352" 394 id="path352"
395 inkscape:connector-curvature="0" 395 inkscape:connector-curvature="0"
396 style="fill:#ff3333;stroke:none" /></g></g><g 396 style="fill:#ff3333;stroke:none" /></g></g><g
397 class="com.sun.star.drawing.LineShape" 397 class="com.sun.star.drawing.LineShape"
398 id="g354"><g 398 id="g354"><g
399 id="id20"><rect 399 id="id20"><rect
400 class="BoundingBox" 400 class="BoundingBox"
401 x="9799" 401 x="9799"
402 y="5250" 402 y="5250"
403 width="1402" 403 width="1402"
404 height="301" 404 height="301"
405 id="rect357" 405 id="rect357"
406 style="fill:none;stroke:none" /><path 406 style="fill:none;stroke:none" /><path
407 d="m 9800,5400 970,0" 407 d="m 9800,5400 970,0"
408 id="path359" 408 id="path359"
409 inkscape:connector-curvature="0" 409 inkscape:connector-curvature="0"
410 style="fill:none;stroke:#ff3333" /><path 410 style="fill:none;stroke:#ff3333" /><path
411 d="m 11200,5400 -450,-150 0,300 450,-150 z" 411 d="m 11200,5400 -450,-150 0,300 450,-150 z"
412 id="path361" 412 id="path361"
413 inkscape:connector-curvature="0" 413 inkscape:connector-curvature="0"
414 style="fill:#ff3333;stroke:none" /></g></g><g 414 style="fill:#ff3333;stroke:none" /></g></g><g
415 class="com.sun.star.drawing.LineShape" 415 class="com.sun.star.drawing.LineShape"
416 id="g363"><g 416 id="g363"><g
417 id="id21"><rect 417 id="id21"><rect
418 class="BoundingBox" 418 class="BoundingBox"
419 x="9900" 419 x="9900"
420 y="4200" 420 y="4200"
421 width="1202" 421 width="1202"
422 height="802" 422 height="802"
423 id="rect366" 423 id="rect366"
424 style="fill:none;stroke:none" /><path 424 style="fill:none;stroke:none" /><path
425 d="m 11100,5000 -842,-561" 425 d="m 11100,5000 -842,-561"
426 id="path368" 426 id="path368"
427 inkscape:connector-curvature="0" 427 inkscape:connector-curvature="0"
428 style="fill:none;stroke:#ff3333" /><path 428 style="fill:none;stroke:#ff3333" /><path
429 d="m 9900,4200 291,374 167,-249 -458,-125 z" 429 d="m 9900,4200 291,374 167,-249 -458,-125 z"
430 id="path370" 430 id="path370"
431 inkscape:connector-curvature="0" 431 inkscape:connector-curvature="0"
432 style="fill:#ff3333;stroke:none" /></g></g><g 432 style="fill:#ff3333;stroke:none" /></g></g><g
433 class="com.sun.star.drawing.LineShape" 433 class="com.sun.star.drawing.LineShape"
434 id="g372"><g 434 id="g372"><g
435 id="id22"><rect 435 id="id22"><rect
436 class="BoundingBox" 436 class="BoundingBox"
437 x="9999" 437 x="9999"
438 y="3850" 438 y="3850"
439 width="1402" 439 width="1402"
440 height="301" 440 height="301"
441 id="rect375" 441 id="rect375"
442 style="fill:none;stroke:none" /><path 442 style="fill:none;stroke:none" /><path
443 d="m 10000,4000 970,0" 443 d="m 10000,4000 970,0"
444 id="path377" 444 id="path377"
445 inkscape:connector-curvature="0" 445 inkscape:connector-curvature="0"
446 style="fill:none;stroke:#ff3333" /><path 446 style="fill:none;stroke:#ff3333" /><path
447 d="m 11400,4000 -450,-150 0,300 450,-150 z" 447 d="m 11400,4000 -450,-150 0,300 450,-150 z"
448 id="path379" 448 id="path379"
449 inkscape:connector-curvature="0" 449 inkscape:connector-curvature="0"
450 style="fill:#ff3333;stroke:none" /></g></g></g></g></g></g></svg> 450 style="fill:#ff3333;stroke:none" /></g></g></g></g></g></g></svg>
diff --git a/Documentation/media/uapi/v4l/nv12mt_example.svg b/Documentation/media/uapi/v4l/nv12mt_example.svg
index d65d989ee73b..fc51fe8fda8b 100644
--- a/Documentation/media/uapi/v4l/nv12mt_example.svg
+++ b/Documentation/media/uapi/v4l/nv12mt_example.svg
@@ -18,8 +18,8 @@
18 sodipodi:docname="nv12mt_example.svg" 18 sodipodi:docname="nv12mt_example.svg"
19 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata 19 style="fill-rule:evenodd;stroke-width:28.22200012;stroke-linejoin:round"><metadata
20 id="metadata953"><rdf:RDF><cc:Work 20 id="metadata953"><rdf:RDF><cc:Work
21 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 21 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview 22 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><sodipodi:namedview
23 pagecolor="#ffffff" 23 pagecolor="#ffffff"
24 bordercolor="#666666" 24 bordercolor="#666666"
25 borderopacity="1" 25 borderopacity="1"
@@ -58,1532 +58,1532 @@
58 id="g188" 58 id="g188"
59 transform="translate(-3285.889,-3185.889)"><g 59 transform="translate(-3285.889,-3185.889)"><g
60 id="id6"><rect 60 id="id6"><rect
61 class="BoundingBox" 61 class="BoundingBox"
62 x="3299" 62 x="3299"
63 y="3199" 63 y="3199"
64 width="2403" 64 width="2403"
65 height="1403" 65 height="1403"
66 id="rect191" 66 id="rect191"
67 style="fill:none;stroke:none" /><path 67 style="fill:none;stroke:none" /><path
68 d="m 4500,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 68 d="m 4500,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
69 id="path193" 69 id="path193"
70 inkscape:connector-curvature="0" 70 inkscape:connector-curvature="0"
71 style="fill:none;stroke:#3465a4" /><text 71 style="fill:none;stroke:#3465a4" /><text
72 class="TextShape" 72 class="TextShape"
73 id="text195"><tspan 73 id="text195"><tspan
74 class="TextParagraph" 74 class="TextParagraph"
75 font-size="635px" 75 font-size="635px"
76 font-weight="400" 76 font-weight="400"
77 id="tspan197" 77 id="tspan197"
78 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 78 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
79 class="TextPosition" 79 class="TextPosition"
80 x="4325" 80 x="4325"
81 y="4121" 81 y="4121"
82 id="tspan199"><tspan 82 id="tspan199"><tspan
83 id="tspan201" 83 id="tspan201"
84 style="fill:#000000;stroke:none">0</tspan></tspan></tspan></text> 84 style="fill:#000000;stroke:none">0</tspan></tspan></tspan></text>
85</g></g><g 85</g></g><g
86 class="com.sun.star.drawing.CustomShape" 86 class="com.sun.star.drawing.CustomShape"
87 id="g203" 87 id="g203"
88 transform="translate(-3285.889,-3185.889)"><g 88 transform="translate(-3285.889,-3185.889)"><g
89 id="id7"><rect 89 id="id7"><rect
90 class="BoundingBox" 90 class="BoundingBox"
91 x="5699" 91 x="5699"
92 y="3199" 92 y="3199"
93 width="2403" 93 width="2403"
94 height="1403" 94 height="1403"
95 id="rect206" 95 id="rect206"
96 style="fill:none;stroke:none" /><path 96 style="fill:none;stroke:none" /><path
97 d="m 6900,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 97 d="m 6900,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
98 id="path208" 98 id="path208"
99 inkscape:connector-curvature="0" 99 inkscape:connector-curvature="0"
100 style="fill:none;stroke:#3465a4" /></g></g><g 100 style="fill:none;stroke:#3465a4" /></g></g><g
101 class="com.sun.star.drawing.CustomShape" 101 class="com.sun.star.drawing.CustomShape"
102 id="g210" 102 id="g210"
103 transform="translate(-3285.889,-3185.889)"><g 103 transform="translate(-3285.889,-3185.889)"><g
104 id="id8"><rect 104 id="id8"><rect
105 class="BoundingBox" 105 class="BoundingBox"
106 x="8099" 106 x="8099"
107 y="3199" 107 y="3199"
108 width="2403" 108 width="2403"
109 height="1403" 109 height="1403"
110 id="rect213" 110 id="rect213"
111 style="fill:none;stroke:none" /><path 111 style="fill:none;stroke:none" /><path
112 d="m 9300,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 112 d="m 9300,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
113 id="path215" 113 id="path215"
114 inkscape:connector-curvature="0" 114 inkscape:connector-curvature="0"
115 style="fill:none;stroke:#3465a4" /><text 115 style="fill:none;stroke:#3465a4" /><text
116 class="TextShape" 116 class="TextShape"
117 id="text217"><tspan 117 id="text217"><tspan
118 class="TextParagraph" 118 class="TextParagraph"
119 font-size="635px" 119 font-size="635px"
120 font-weight="400" 120 font-weight="400"
121 id="tspan219" 121 id="tspan219"
122 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 122 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
123 class="TextPosition" 123 class="TextPosition"
124 x="9125" 124 x="9125"
125 y="4121" 125 y="4121"
126 id="tspan221"><tspan 126 id="tspan221"><tspan
127 id="tspan223" 127 id="tspan223"
128 style="fill:#000000;stroke:none">6</tspan></tspan></tspan></text> 128 style="fill:#000000;stroke:none">6</tspan></tspan></tspan></text>
129</g></g><g 129</g></g><g
130 class="com.sun.star.drawing.CustomShape" 130 class="com.sun.star.drawing.CustomShape"
131 id="g225" 131 id="g225"
132 transform="translate(-3285.889,-3185.889)"><g 132 transform="translate(-3285.889,-3185.889)"><g
133 id="id9"><rect 133 id="id9"><rect
134 class="BoundingBox" 134 class="BoundingBox"
135 x="5699" 135 x="5699"
136 y="3199" 136 y="3199"
137 width="2403" 137 width="2403"
138 height="1403" 138 height="1403"
139 id="rect228" 139 id="rect228"
140 style="fill:none;stroke:none" /><path 140 style="fill:none;stroke:none" /><path
141 d="m 6900,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 141 d="m 6900,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
142 id="path230" 142 id="path230"
143 inkscape:connector-curvature="0" 143 inkscape:connector-curvature="0"
144 style="fill:none;stroke:#3465a4" /><text 144 style="fill:none;stroke:#3465a4" /><text
145 class="TextShape" 145 class="TextShape"
146 id="text232"><tspan 146 id="text232"><tspan
147 class="TextParagraph" 147 class="TextParagraph"
148 font-size="635px" 148 font-size="635px"
149 font-weight="400" 149 font-weight="400"
150 id="tspan234" 150 id="tspan234"
151 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 151 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
152 class="TextPosition" 152 class="TextPosition"
153 x="6725" 153 x="6725"
154 y="4121" 154 y="4121"
155 id="tspan236"><tspan 155 id="tspan236"><tspan
156 id="tspan238" 156 id="tspan238"
157 style="fill:#000000;stroke:none">1</tspan></tspan></tspan></text> 157 style="fill:#000000;stroke:none">1</tspan></tspan></tspan></text>
158</g></g><g 158</g></g><g
159 class="com.sun.star.drawing.CustomShape" 159 class="com.sun.star.drawing.CustomShape"
160 id="g240" 160 id="g240"
161 transform="translate(-3285.889,-3185.889)"><g 161 transform="translate(-3285.889,-3185.889)"><g
162 id="id10"><rect 162 id="id10"><rect
163 class="BoundingBox" 163 class="BoundingBox"
164 x="10499" 164 x="10499"
165 y="3199" 165 y="3199"
166 width="2403" 166 width="2403"
167 height="1403" 167 height="1403"
168 id="rect243" 168 id="rect243"
169 style="fill:none;stroke:none" /><path 169 style="fill:none;stroke:none" /><path
170 d="m 11700,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 170 d="m 11700,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
171 id="path245" 171 id="path245"
172 inkscape:connector-curvature="0" 172 inkscape:connector-curvature="0"
173 style="fill:none;stroke:#3465a4" /><text 173 style="fill:none;stroke:#3465a4" /><text
174 class="TextShape" 174 class="TextShape"
175 id="text247"><tspan 175 id="text247"><tspan
176 class="TextParagraph" 176 class="TextParagraph"
177 font-size="635px" 177 font-size="635px"
178 font-weight="400" 178 font-weight="400"
179 id="tspan249" 179 id="tspan249"
180 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 180 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
181 class="TextPosition" 181 class="TextPosition"
182 x="11525" 182 x="11525"
183 y="4121" 183 y="4121"
184 id="tspan251"><tspan 184 id="tspan251"><tspan
185 id="tspan253" 185 id="tspan253"
186 style="fill:#000000;stroke:none">7</tspan></tspan></tspan></text> 186 style="fill:#000000;stroke:none">7</tspan></tspan></tspan></text>
187</g></g><g 187</g></g><g
188 class="com.sun.star.drawing.CustomShape" 188 class="com.sun.star.drawing.CustomShape"
189 id="g255" 189 id="g255"
190 transform="translate(-3285.889,-3185.889)"><g 190 transform="translate(-3285.889,-3185.889)"><g
191 id="id11"><rect 191 id="id11"><rect
192 class="BoundingBox" 192 class="BoundingBox"
193 x="12899" 193 x="12899"
194 y="3199" 194 y="3199"
195 width="2403" 195 width="2403"
196 height="1403" 196 height="1403"
197 id="rect258" 197 id="rect258"
198 style="fill:none;stroke:none" /><path 198 style="fill:none;stroke:none" /><path
199 d="m 14100,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 199 d="m 14100,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
200 id="path260" 200 id="path260"
201 inkscape:connector-curvature="0" 201 inkscape:connector-curvature="0"
202 style="fill:none;stroke:#3465a4" /></g></g><g 202 style="fill:none;stroke:#3465a4" /></g></g><g
203 class="com.sun.star.drawing.CustomShape" 203 class="com.sun.star.drawing.CustomShape"
204 id="g262" 204 id="g262"
205 transform="translate(-3285.889,-3185.889)"><g 205 transform="translate(-3285.889,-3185.889)"><g
206 id="id12"><rect 206 id="id12"><rect
207 class="BoundingBox" 207 class="BoundingBox"
208 x="15299" 208 x="15299"
209 y="3199" 209 y="3199"
210 width="2403" 210 width="2403"
211 height="1403" 211 height="1403"
212 id="rect265" 212 id="rect265"
213 style="fill:none;stroke:none" /><path 213 style="fill:none;stroke:none" /><path
214 d="m 16500,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 214 d="m 16500,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
215 id="path267" 215 id="path267"
216 inkscape:connector-curvature="0" 216 inkscape:connector-curvature="0"
217 style="fill:none;stroke:#3465a4" /><text 217 style="fill:none;stroke:#3465a4" /><text
218 class="TextShape" 218 class="TextShape"
219 id="text269"><tspan 219 id="text269"><tspan
220 class="TextParagraph" 220 class="TextParagraph"
221 font-size="635px" 221 font-size="635px"
222 font-weight="400" 222 font-weight="400"
223 id="tspan271" 223 id="tspan271"
224 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 224 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
225 class="TextPosition" 225 class="TextPosition"
226 x="16325" 226 x="16325"
227 y="4121" 227 y="4121"
228 id="tspan273"><tspan 228 id="tspan273"><tspan
229 id="tspan275" 229 id="tspan275"
230 style="fill:#000000;stroke:none">9</tspan></tspan></tspan></text> 230 style="fill:#000000;stroke:none">9</tspan></tspan></tspan></text>
231</g></g><g 231</g></g><g
232 class="com.sun.star.drawing.CustomShape" 232 class="com.sun.star.drawing.CustomShape"
233 id="g277" 233 id="g277"
234 transform="translate(-3285.889,-3185.889)"><g 234 transform="translate(-3285.889,-3185.889)"><g
235 id="id13"><rect 235 id="id13"><rect
236 class="BoundingBox" 236 class="BoundingBox"
237 x="12899" 237 x="12899"
238 y="3199" 238 y="3199"
239 width="2403" 239 width="2403"
240 height="1403" 240 height="1403"
241 id="rect280" 241 id="rect280"
242 style="fill:none;stroke:none" /><path 242 style="fill:none;stroke:none" /><path
243 d="m 14100,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 243 d="m 14100,4600 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
244 id="path282" 244 id="path282"
245 inkscape:connector-curvature="0" 245 inkscape:connector-curvature="0"
246 style="fill:none;stroke:#3465a4" /><text 246 style="fill:none;stroke:#3465a4" /><text
247 class="TextShape" 247 class="TextShape"
248 id="text284"><tspan 248 id="text284"><tspan
249 class="TextParagraph" 249 class="TextParagraph"
250 font-size="635px" 250 font-size="635px"
251 font-weight="400" 251 font-weight="400"
252 id="tspan286" 252 id="tspan286"
253 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 253 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
254 class="TextPosition" 254 class="TextPosition"
255 x="13925" 255 x="13925"
256 y="4121" 256 y="4121"
257 id="tspan288"><tspan 257 id="tspan288"><tspan
258 id="tspan290" 258 id="tspan290"
259 style="fill:#000000;stroke:none">8</tspan></tspan></tspan></text> 259 style="fill:#000000;stroke:none">8</tspan></tspan></tspan></text>
260</g></g><g 260</g></g><g
261 class="com.sun.star.drawing.CustomShape" 261 class="com.sun.star.drawing.CustomShape"
262 id="g292" 262 id="g292"
263 transform="translate(-3285.889,-3185.889)"><g 263 transform="translate(-3285.889,-3185.889)"><g
264 id="id14"><rect 264 id="id14"><rect
265 class="BoundingBox" 265 class="BoundingBox"
266 x="3299" 266 x="3299"
267 y="4599" 267 y="4599"
268 width="2403" 268 width="2403"
269 height="1403" 269 height="1403"
270 id="rect295" 270 id="rect295"
271 style="fill:none;stroke:none" /><path 271 style="fill:none;stroke:none" /><path
272 d="m 4500,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 272 d="m 4500,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
273 id="path297" 273 id="path297"
274 inkscape:connector-curvature="0" 274 inkscape:connector-curvature="0"
275 style="fill:none;stroke:#3465a4" /><text 275 style="fill:none;stroke:#3465a4" /><text
276 class="TextShape" 276 class="TextShape"
277 id="text299"><tspan 277 id="text299"><tspan
278 class="TextParagraph" 278 class="TextParagraph"
279 font-size="635px" 279 font-size="635px"
280 font-weight="400" 280 font-weight="400"
281 id="tspan301" 281 id="tspan301"
282 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 282 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
283 class="TextPosition" 283 class="TextPosition"
284 x="4325" 284 x="4325"
285 y="5521" 285 y="5521"
286 id="tspan303"><tspan 286 id="tspan303"><tspan
287 id="tspan305" 287 id="tspan305"
288 style="fill:#000000;stroke:none">2</tspan></tspan></tspan></text> 288 style="fill:#000000;stroke:none">2</tspan></tspan></tspan></text>
289</g></g><g 289</g></g><g
290 class="com.sun.star.drawing.CustomShape" 290 class="com.sun.star.drawing.CustomShape"
291 id="g307" 291 id="g307"
292 transform="translate(-3285.889,-3185.889)"><g 292 transform="translate(-3285.889,-3185.889)"><g
293 id="id15"><rect 293 id="id15"><rect
294 class="BoundingBox" 294 class="BoundingBox"
295 x="5699" 295 x="5699"
296 y="4599" 296 y="4599"
297 width="2403" 297 width="2403"
298 height="1403" 298 height="1403"
299 id="rect310" 299 id="rect310"
300 style="fill:none;stroke:none" /><path 300 style="fill:none;stroke:none" /><path
301 d="m 6900,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 301 d="m 6900,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
302 id="path312" 302 id="path312"
303 inkscape:connector-curvature="0" 303 inkscape:connector-curvature="0"
304 style="fill:none;stroke:#3465a4" /></g></g><g 304 style="fill:none;stroke:#3465a4" /></g></g><g
305 class="com.sun.star.drawing.CustomShape" 305 class="com.sun.star.drawing.CustomShape"
306 id="g314" 306 id="g314"
307 transform="translate(-3285.889,-3185.889)"><g 307 transform="translate(-3285.889,-3185.889)"><g
308 id="id16"><rect 308 id="id16"><rect
309 class="BoundingBox" 309 class="BoundingBox"
310 x="8099" 310 x="8099"
311 y="4599" 311 y="4599"
312 width="2403" 312 width="2403"
313 height="1403" 313 height="1403"
314 id="rect317" 314 id="rect317"
315 style="fill:none;stroke:none" /><path 315 style="fill:none;stroke:none" /><path
316 d="m 9300,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 316 d="m 9300,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
317 id="path319" 317 id="path319"
318 inkscape:connector-curvature="0" 318 inkscape:connector-curvature="0"
319 style="fill:none;stroke:#3465a4" /><text 319 style="fill:none;stroke:#3465a4" /><text
320 class="TextShape" 320 class="TextShape"
321 id="text321"><tspan 321 id="text321"><tspan
322 class="TextParagraph" 322 class="TextParagraph"
323 font-size="635px" 323 font-size="635px"
324 font-weight="400" 324 font-weight="400"
325 id="tspan323" 325 id="tspan323"
326 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 326 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
327 class="TextPosition" 327 class="TextPosition"
328 x="9125" 328 x="9125"
329 y="5521" 329 y="5521"
330 id="tspan325"><tspan 330 id="tspan325"><tspan
331 id="tspan327" 331 id="tspan327"
332 style="fill:#000000;stroke:none">4</tspan></tspan></tspan></text> 332 style="fill:#000000;stroke:none">4</tspan></tspan></tspan></text>
333</g></g><g 333</g></g><g
334 class="com.sun.star.drawing.CustomShape" 334 class="com.sun.star.drawing.CustomShape"
335 id="g329" 335 id="g329"
336 transform="translate(-3285.889,-3185.889)"><g 336 transform="translate(-3285.889,-3185.889)"><g
337 id="id17"><rect 337 id="id17"><rect
338 class="BoundingBox" 338 class="BoundingBox"
339 x="5699" 339 x="5699"
340 y="4599" 340 y="4599"
341 width="2403" 341 width="2403"
342 height="1403" 342 height="1403"
343 id="rect332" 343 id="rect332"
344 style="fill:none;stroke:none" /><path 344 style="fill:none;stroke:none" /><path
345 d="m 6900,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 345 d="m 6900,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
346 id="path334" 346 id="path334"
347 inkscape:connector-curvature="0" 347 inkscape:connector-curvature="0"
348 style="fill:none;stroke:#3465a4" /><text 348 style="fill:none;stroke:#3465a4" /><text
349 class="TextShape" 349 class="TextShape"
350 id="text336"><tspan 350 id="text336"><tspan
351 class="TextParagraph" 351 class="TextParagraph"
352 font-size="635px" 352 font-size="635px"
353 font-weight="400" 353 font-weight="400"
354 id="tspan338" 354 id="tspan338"
355 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 355 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
356 class="TextPosition" 356 class="TextPosition"
357 x="6725" 357 x="6725"
358 y="5521" 358 y="5521"
359 id="tspan340"><tspan 359 id="tspan340"><tspan
360 id="tspan342" 360 id="tspan342"
361 style="fill:#000000;stroke:none">3</tspan></tspan></tspan></text> 361 style="fill:#000000;stroke:none">3</tspan></tspan></tspan></text>
362</g></g><g 362</g></g><g
363 class="com.sun.star.drawing.CustomShape" 363 class="com.sun.star.drawing.CustomShape"
364 id="g344" 364 id="g344"
365 transform="translate(-3285.889,-3185.889)"><g 365 transform="translate(-3285.889,-3185.889)"><g
366 id="id18"><rect 366 id="id18"><rect
367 class="BoundingBox" 367 class="BoundingBox"
368 x="10499" 368 x="10499"
369 y="4599" 369 y="4599"
370 width="2403" 370 width="2403"
371 height="1403" 371 height="1403"
372 id="rect347" 372 id="rect347"
373 style="fill:none;stroke:none" /><path 373 style="fill:none;stroke:none" /><path
374 d="m 11700,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 374 d="m 11700,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
375 id="path349" 375 id="path349"
376 inkscape:connector-curvature="0" 376 inkscape:connector-curvature="0"
377 style="fill:none;stroke:#3465a4" /><text 377 style="fill:none;stroke:#3465a4" /><text
378 class="TextShape" 378 class="TextShape"
379 id="text351"><tspan 379 id="text351"><tspan
380 class="TextParagraph" 380 class="TextParagraph"
381 font-size="635px" 381 font-size="635px"
382 font-weight="400" 382 font-weight="400"
383 id="tspan353" 383 id="tspan353"
384 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 384 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
385 class="TextPosition" 385 class="TextPosition"
386 x="11525" 386 x="11525"
387 y="5521" 387 y="5521"
388 id="tspan355"><tspan 388 id="tspan355"><tspan
389 id="tspan357" 389 id="tspan357"
390 style="fill:#000000;stroke:none">5</tspan></tspan></tspan></text> 390 style="fill:#000000;stroke:none">5</tspan></tspan></tspan></text>
391</g></g><g 391</g></g><g
392 class="com.sun.star.drawing.CustomShape" 392 class="com.sun.star.drawing.CustomShape"
393 id="g359" 393 id="g359"
394 transform="translate(-3285.889,-3185.889)"><g 394 transform="translate(-3285.889,-3185.889)"><g
395 id="id19"><rect 395 id="id19"><rect
396 class="BoundingBox" 396 class="BoundingBox"
397 x="12899" 397 x="12899"
398 y="4599" 398 y="4599"
399 width="2403" 399 width="2403"
400 height="1403" 400 height="1403"
401 id="rect362" 401 id="rect362"
402 style="fill:none;stroke:none" /><path 402 style="fill:none;stroke:none" /><path
403 d="m 14100,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 403 d="m 14100,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
404 id="path364" 404 id="path364"
405 inkscape:connector-curvature="0" 405 inkscape:connector-curvature="0"
406 style="fill:none;stroke:#3465a4" /></g></g><g 406 style="fill:none;stroke:#3465a4" /></g></g><g
407 class="com.sun.star.drawing.CustomShape" 407 class="com.sun.star.drawing.CustomShape"
408 id="g366" 408 id="g366"
409 transform="translate(-3285.889,-3185.889)"><g 409 transform="translate(-3285.889,-3185.889)"><g
410 id="id20"><rect 410 id="id20"><rect
411 class="BoundingBox" 411 class="BoundingBox"
412 x="15299" 412 x="15299"
413 y="4599" 413 y="4599"
414 width="2403" 414 width="2403"
415 height="1403" 415 height="1403"
416 id="rect369" 416 id="rect369"
417 style="fill:none;stroke:none" /><path 417 style="fill:none;stroke:none" /><path
418 d="m 16500,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 418 d="m 16500,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
419 id="path371" 419 id="path371"
420 inkscape:connector-curvature="0" 420 inkscape:connector-curvature="0"
421 style="fill:none;stroke:#3465a4" /><text 421 style="fill:none;stroke:#3465a4" /><text
422 class="TextShape" 422 class="TextShape"
423 id="text373"><tspan 423 id="text373"><tspan
424 class="TextParagraph" 424 class="TextParagraph"
425 font-size="635px" 425 font-size="635px"
426 font-weight="400" 426 font-weight="400"
427 id="tspan375" 427 id="tspan375"
428 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 428 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
429 class="TextPosition" 429 class="TextPosition"
430 x="16149" 430 x="16149"
431 y="5521" 431 y="5521"
432 id="tspan377"><tspan 432 id="tspan377"><tspan
433 id="tspan379" 433 id="tspan379"
434 style="fill:#000000;stroke:none">11</tspan></tspan></tspan></text> 434 style="fill:#000000;stroke:none">11</tspan></tspan></tspan></text>
435</g></g><g 435</g></g><g
436 class="com.sun.star.drawing.CustomShape" 436 class="com.sun.star.drawing.CustomShape"
437 id="g381" 437 id="g381"
438 transform="translate(-3285.889,-3185.889)"><g 438 transform="translate(-3285.889,-3185.889)"><g
439 id="id21"><rect 439 id="id21"><rect
440 class="BoundingBox" 440 class="BoundingBox"
441 x="12899" 441 x="12899"
442 y="4599" 442 y="4599"
443 width="2403" 443 width="2403"
444 height="1403" 444 height="1403"
445 id="rect384" 445 id="rect384"
446 style="fill:none;stroke:none" /><path 446 style="fill:none;stroke:none" /><path
447 d="m 14100,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 447 d="m 14100,6000 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
448 id="path386" 448 id="path386"
449 inkscape:connector-curvature="0" 449 inkscape:connector-curvature="0"
450 style="fill:none;stroke:#3465a4" /><text 450 style="fill:none;stroke:#3465a4" /><text
451 class="TextShape" 451 class="TextShape"
452 id="text388"><tspan 452 id="text388"><tspan
453 class="TextParagraph" 453 class="TextParagraph"
454 font-size="635px" 454 font-size="635px"
455 font-weight="400" 455 font-weight="400"
456 id="tspan390" 456 id="tspan390"
457 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 457 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
458 class="TextPosition" 458 class="TextPosition"
459 x="13749" 459 x="13749"
460 y="5521" 460 y="5521"
461 id="tspan392"><tspan 461 id="tspan392"><tspan
462 id="tspan394" 462 id="tspan394"
463 style="fill:#000000;stroke:none">10</tspan></tspan></tspan></text> 463 style="fill:#000000;stroke:none">10</tspan></tspan></tspan></text>
464</g></g><g 464</g></g><g
465 class="com.sun.star.drawing.CustomShape" 465 class="com.sun.star.drawing.CustomShape"
466 id="g396" 466 id="g396"
467 transform="translate(-3285.889,-3185.889)"><g 467 transform="translate(-3285.889,-3185.889)"><g
468 id="id22"><rect 468 id="id22"><rect
469 class="BoundingBox" 469 class="BoundingBox"
470 x="3299" 470 x="3299"
471 y="5999" 471 y="5999"
472 width="2403" 472 width="2403"
473 height="1403" 473 height="1403"
474 id="rect399" 474 id="rect399"
475 style="fill:none;stroke:none" /><path 475 style="fill:none;stroke:none" /><path
476 d="m 4500,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 476 d="m 4500,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
477 id="path401" 477 id="path401"
478 inkscape:connector-curvature="0" 478 inkscape:connector-curvature="0"
479 style="fill:none;stroke:#3465a4" /><text 479 style="fill:none;stroke:#3465a4" /><text
480 class="TextShape" 480 class="TextShape"
481 id="text403"><tspan 481 id="text403"><tspan
482 class="TextParagraph" 482 class="TextParagraph"
483 font-size="635px" 483 font-size="635px"
484 font-weight="400" 484 font-weight="400"
485 id="tspan405" 485 id="tspan405"
486 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 486 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
487 class="TextPosition" 487 class="TextPosition"
488 x="4149" 488 x="4149"
489 y="6921" 489 y="6921"
490 id="tspan407"><tspan 490 id="tspan407"><tspan
491 id="tspan409" 491 id="tspan409"
492 style="fill:#000000;stroke:none">12</tspan></tspan></tspan></text> 492 style="fill:#000000;stroke:none">12</tspan></tspan></tspan></text>
493</g></g><g 493</g></g><g
494 class="com.sun.star.drawing.CustomShape" 494 class="com.sun.star.drawing.CustomShape"
495 id="g411" 495 id="g411"
496 transform="translate(-3285.889,-3185.889)"><g 496 transform="translate(-3285.889,-3185.889)"><g
497 id="id23"><rect 497 id="id23"><rect
498 class="BoundingBox" 498 class="BoundingBox"
499 x="5699" 499 x="5699"
500 y="5999" 500 y="5999"
501 width="2403" 501 width="2403"
502 height="1403" 502 height="1403"
503 id="rect414" 503 id="rect414"
504 style="fill:none;stroke:none" /><path 504 style="fill:none;stroke:none" /><path
505 d="m 6900,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 505 d="m 6900,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
506 id="path416" 506 id="path416"
507 inkscape:connector-curvature="0" 507 inkscape:connector-curvature="0"
508 style="fill:none;stroke:#3465a4" /></g></g><g 508 style="fill:none;stroke:#3465a4" /></g></g><g
509 class="com.sun.star.drawing.CustomShape" 509 class="com.sun.star.drawing.CustomShape"
510 id="g418" 510 id="g418"
511 transform="translate(-3285.889,-3185.889)"><g 511 transform="translate(-3285.889,-3185.889)"><g
512 id="id24"><rect 512 id="id24"><rect
513 class="BoundingBox" 513 class="BoundingBox"
514 x="8099" 514 x="8099"
515 y="5999" 515 y="5999"
516 width="2403" 516 width="2403"
517 height="1403" 517 height="1403"
518 id="rect421" 518 id="rect421"
519 style="fill:none;stroke:none" /><path 519 style="fill:none;stroke:none" /><path
520 d="m 9300,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 520 d="m 9300,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
521 id="path423" 521 id="path423"
522 inkscape:connector-curvature="0" 522 inkscape:connector-curvature="0"
523 style="fill:none;stroke:#3465a4" /><text 523 style="fill:none;stroke:#3465a4" /><text
524 class="TextShape" 524 class="TextShape"
525 id="text425"><tspan 525 id="text425"><tspan
526 class="TextParagraph" 526 class="TextParagraph"
527 font-size="635px" 527 font-size="635px"
528 font-weight="400" 528 font-weight="400"
529 id="tspan427" 529 id="tspan427"
530 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 530 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
531 class="TextPosition" 531 class="TextPosition"
532 x="8949" 532 x="8949"
533 y="6921" 533 y="6921"
534 id="tspan429"><tspan 534 id="tspan429"><tspan
535 id="tspan431" 535 id="tspan431"
536 style="fill:#000000;stroke:none">18</tspan></tspan></tspan></text> 536 style="fill:#000000;stroke:none">18</tspan></tspan></tspan></text>
537</g></g><g 537</g></g><g
538 class="com.sun.star.drawing.CustomShape" 538 class="com.sun.star.drawing.CustomShape"
539 id="g433" 539 id="g433"
540 transform="translate(-3285.889,-3185.889)"><g 540 transform="translate(-3285.889,-3185.889)"><g
541 id="id25"><rect 541 id="id25"><rect
542 class="BoundingBox" 542 class="BoundingBox"
543 x="5699" 543 x="5699"
544 y="5999" 544 y="5999"
545 width="2403" 545 width="2403"
546 height="1403" 546 height="1403"
547 id="rect436" 547 id="rect436"
548 style="fill:none;stroke:none" /><path 548 style="fill:none;stroke:none" /><path
549 d="m 6900,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 549 d="m 6900,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
550 id="path438" 550 id="path438"
551 inkscape:connector-curvature="0" 551 inkscape:connector-curvature="0"
552 style="fill:none;stroke:#3465a4" /><text 552 style="fill:none;stroke:#3465a4" /><text
553 class="TextShape" 553 class="TextShape"
554 id="text440"><tspan 554 id="text440"><tspan
555 class="TextParagraph" 555 class="TextParagraph"
556 font-size="635px" 556 font-size="635px"
557 font-weight="400" 557 font-weight="400"
558 id="tspan442" 558 id="tspan442"
559 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 559 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
560 class="TextPosition" 560 class="TextPosition"
561 x="6549" 561 x="6549"
562 y="6921" 562 y="6921"
563 id="tspan444"><tspan 563 id="tspan444"><tspan
564 id="tspan446" 564 id="tspan446"
565 style="fill:#000000;stroke:none">13</tspan></tspan></tspan></text> 565 style="fill:#000000;stroke:none">13</tspan></tspan></tspan></text>
566</g></g><g 566</g></g><g
567 class="com.sun.star.drawing.CustomShape" 567 class="com.sun.star.drawing.CustomShape"
568 id="g448" 568 id="g448"
569 transform="translate(-3285.889,-3185.889)"><g 569 transform="translate(-3285.889,-3185.889)"><g
570 id="id26"><rect 570 id="id26"><rect
571 class="BoundingBox" 571 class="BoundingBox"
572 x="10499" 572 x="10499"
573 y="5999" 573 y="5999"
574 width="2403" 574 width="2403"
575 height="1403" 575 height="1403"
576 id="rect451" 576 id="rect451"
577 style="fill:none;stroke:none" /><path 577 style="fill:none;stroke:none" /><path
578 d="m 11700,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 578 d="m 11700,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
579 id="path453" 579 id="path453"
580 inkscape:connector-curvature="0" 580 inkscape:connector-curvature="0"
581 style="fill:none;stroke:#3465a4" /><text 581 style="fill:none;stroke:#3465a4" /><text
582 class="TextShape" 582 class="TextShape"
583 id="text455"><tspan 583 id="text455"><tspan
584 class="TextParagraph" 584 class="TextParagraph"
585 font-size="635px" 585 font-size="635px"
586 font-weight="400" 586 font-weight="400"
587 id="tspan457" 587 id="tspan457"
588 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 588 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
589 class="TextPosition" 589 class="TextPosition"
590 x="11349" 590 x="11349"
591 y="6921" 591 y="6921"
592 id="tspan459"><tspan 592 id="tspan459"><tspan
593 id="tspan461" 593 id="tspan461"
594 style="fill:#000000;stroke:none">19</tspan></tspan></tspan></text> 594 style="fill:#000000;stroke:none">19</tspan></tspan></tspan></text>
595</g></g><g 595</g></g><g
596 class="com.sun.star.drawing.CustomShape" 596 class="com.sun.star.drawing.CustomShape"
597 id="g463" 597 id="g463"
598 transform="translate(-3285.889,-3185.889)"><g 598 transform="translate(-3285.889,-3185.889)"><g
599 id="id27"><rect 599 id="id27"><rect
600 class="BoundingBox" 600 class="BoundingBox"
601 x="12899" 601 x="12899"
602 y="5999" 602 y="5999"
603 width="2403" 603 width="2403"
604 height="1403" 604 height="1403"
605 id="rect466" 605 id="rect466"
606 style="fill:none;stroke:none" /><path 606 style="fill:none;stroke:none" /><path
607 d="m 14100,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 607 d="m 14100,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
608 id="path468" 608 id="path468"
609 inkscape:connector-curvature="0" 609 inkscape:connector-curvature="0"
610 style="fill:none;stroke:#3465a4" /></g></g><g 610 style="fill:none;stroke:#3465a4" /></g></g><g
611 class="com.sun.star.drawing.CustomShape" 611 class="com.sun.star.drawing.CustomShape"
612 id="g470" 612 id="g470"
613 transform="translate(-3285.889,-3185.889)"><g 613 transform="translate(-3285.889,-3185.889)"><g
614 id="id28"><rect 614 id="id28"><rect
615 class="BoundingBox" 615 class="BoundingBox"
616 x="15299" 616 x="15299"
617 y="5999" 617 y="5999"
618 width="2403" 618 width="2403"
619 height="1403" 619 height="1403"
620 id="rect473" 620 id="rect473"
621 style="fill:none;stroke:none" /><path 621 style="fill:none;stroke:none" /><path
622 d="m 16500,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 622 d="m 16500,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
623 id="path475" 623 id="path475"
624 inkscape:connector-curvature="0" 624 inkscape:connector-curvature="0"
625 style="fill:none;stroke:#3465a4" /><text 625 style="fill:none;stroke:#3465a4" /><text
626 class="TextShape" 626 class="TextShape"
627 id="text477"><tspan 627 id="text477"><tspan
628 class="TextParagraph" 628 class="TextParagraph"
629 font-size="635px" 629 font-size="635px"
630 font-weight="400" 630 font-weight="400"
631 id="tspan479" 631 id="tspan479"
632 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 632 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
633 class="TextPosition" 633 class="TextPosition"
634 x="16149" 634 x="16149"
635 y="6921" 635 y="6921"
636 id="tspan481"><tspan 636 id="tspan481"><tspan
637 id="tspan483" 637 id="tspan483"
638 style="fill:#000000;stroke:none">21</tspan></tspan></tspan></text> 638 style="fill:#000000;stroke:none">21</tspan></tspan></tspan></text>
639</g></g><g 639</g></g><g
640 class="com.sun.star.drawing.CustomShape" 640 class="com.sun.star.drawing.CustomShape"
641 id="g485" 641 id="g485"
642 transform="translate(-3285.889,-3185.889)"><g 642 transform="translate(-3285.889,-3185.889)"><g
643 id="id29"><rect 643 id="id29"><rect
644 class="BoundingBox" 644 class="BoundingBox"
645 x="12899" 645 x="12899"
646 y="5999" 646 y="5999"
647 width="2403" 647 width="2403"
648 height="1403" 648 height="1403"
649 id="rect488" 649 id="rect488"
650 style="fill:none;stroke:none" /><path 650 style="fill:none;stroke:none" /><path
651 d="m 14100,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 651 d="m 14100,7400 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
652 id="path490" 652 id="path490"
653 inkscape:connector-curvature="0" 653 inkscape:connector-curvature="0"
654 style="fill:none;stroke:#3465a4" /><text 654 style="fill:none;stroke:#3465a4" /><text
655 class="TextShape" 655 class="TextShape"
656 id="text492"><tspan 656 id="text492"><tspan
657 class="TextParagraph" 657 class="TextParagraph"
658 font-size="635px" 658 font-size="635px"
659 font-weight="400" 659 font-weight="400"
660 id="tspan494" 660 id="tspan494"
661 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 661 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
662 class="TextPosition" 662 class="TextPosition"
663 x="13749" 663 x="13749"
664 y="6921" 664 y="6921"
665 id="tspan496"><tspan 665 id="tspan496"><tspan
666 id="tspan498" 666 id="tspan498"
667 style="fill:#000000;stroke:none">20</tspan></tspan></tspan></text> 667 style="fill:#000000;stroke:none">20</tspan></tspan></tspan></text>
668</g></g><g 668</g></g><g
669 class="com.sun.star.drawing.CustomShape" 669 class="com.sun.star.drawing.CustomShape"
670 id="g500" 670 id="g500"
671 transform="translate(-3285.889,-3185.889)"><g 671 transform="translate(-3285.889,-3185.889)"><g
672 id="id30"><rect 672 id="id30"><rect
673 class="BoundingBox" 673 class="BoundingBox"
674 x="3299" 674 x="3299"
675 y="7399" 675 y="7399"
676 width="2403" 676 width="2403"
677 height="1403" 677 height="1403"
678 id="rect503" 678 id="rect503"
679 style="fill:none;stroke:none" /><path 679 style="fill:none;stroke:none" /><path
680 d="m 4500,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 680 d="m 4500,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
681 id="path505" 681 id="path505"
682 inkscape:connector-curvature="0" 682 inkscape:connector-curvature="0"
683 style="fill:none;stroke:#3465a4" /><text 683 style="fill:none;stroke:#3465a4" /><text
684 class="TextShape" 684 class="TextShape"
685 id="text507"><tspan 685 id="text507"><tspan
686 class="TextParagraph" 686 class="TextParagraph"
687 font-size="635px" 687 font-size="635px"
688 font-weight="400" 688 font-weight="400"
689 id="tspan509" 689 id="tspan509"
690 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 690 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
691 class="TextPosition" 691 class="TextPosition"
692 x="4149" 692 x="4149"
693 y="8321" 693 y="8321"
694 id="tspan511"><tspan 694 id="tspan511"><tspan
695 id="tspan513" 695 id="tspan513"
696 style="fill:#000000;stroke:none">14</tspan></tspan></tspan></text> 696 style="fill:#000000;stroke:none">14</tspan></tspan></tspan></text>
697</g></g><g 697</g></g><g
698 class="com.sun.star.drawing.CustomShape" 698 class="com.sun.star.drawing.CustomShape"
699 id="g515" 699 id="g515"
700 transform="translate(-3285.889,-3185.889)"><g 700 transform="translate(-3285.889,-3185.889)"><g
701 id="id31"><rect 701 id="id31"><rect
702 class="BoundingBox" 702 class="BoundingBox"
703 x="5699" 703 x="5699"
704 y="7399" 704 y="7399"
705 width="2403" 705 width="2403"
706 height="1403" 706 height="1403"
707 id="rect518" 707 id="rect518"
708 style="fill:none;stroke:none" /><path 708 style="fill:none;stroke:none" /><path
709 d="m 6900,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 709 d="m 6900,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
710 id="path520" 710 id="path520"
711 inkscape:connector-curvature="0" 711 inkscape:connector-curvature="0"
712 style="fill:none;stroke:#3465a4" /></g></g><g 712 style="fill:none;stroke:#3465a4" /></g></g><g
713 class="com.sun.star.drawing.CustomShape" 713 class="com.sun.star.drawing.CustomShape"
714 id="g522" 714 id="g522"
715 transform="translate(-3285.889,-3185.889)"><g 715 transform="translate(-3285.889,-3185.889)"><g
716 id="id32"><rect 716 id="id32"><rect
717 class="BoundingBox" 717 class="BoundingBox"
718 x="8099" 718 x="8099"
719 y="7399" 719 y="7399"
720 width="2403" 720 width="2403"
721 height="1403" 721 height="1403"
722 id="rect525" 722 id="rect525"
723 style="fill:none;stroke:none" /><path 723 style="fill:none;stroke:none" /><path
724 d="m 9300,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 724 d="m 9300,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
725 id="path527" 725 id="path527"
726 inkscape:connector-curvature="0" 726 inkscape:connector-curvature="0"
727 style="fill:none;stroke:#3465a4" /><text 727 style="fill:none;stroke:#3465a4" /><text
728 class="TextShape" 728 class="TextShape"
729 id="text529"><tspan 729 id="text529"><tspan
730 class="TextParagraph" 730 class="TextParagraph"
731 font-size="635px" 731 font-size="635px"
732 font-weight="400" 732 font-weight="400"
733 id="tspan531" 733 id="tspan531"
734 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 734 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
735 class="TextPosition" 735 class="TextPosition"
736 x="8949" 736 x="8949"
737 y="8321" 737 y="8321"
738 id="tspan533"><tspan 738 id="tspan533"><tspan
739 id="tspan535" 739 id="tspan535"
740 style="fill:#000000;stroke:none">16</tspan></tspan></tspan></text> 740 style="fill:#000000;stroke:none">16</tspan></tspan></tspan></text>
741</g></g><g 741</g></g><g
742 class="com.sun.star.drawing.CustomShape" 742 class="com.sun.star.drawing.CustomShape"
743 id="g537" 743 id="g537"
744 transform="translate(-3285.889,-3185.889)"><g 744 transform="translate(-3285.889,-3185.889)"><g
745 id="id33"><rect 745 id="id33"><rect
746 class="BoundingBox" 746 class="BoundingBox"
747 x="5699" 747 x="5699"
748 y="7399" 748 y="7399"
749 width="2403" 749 width="2403"
750 height="1403" 750 height="1403"
751 id="rect540" 751 id="rect540"
752 style="fill:none;stroke:none" /><path 752 style="fill:none;stroke:none" /><path
753 d="m 6900,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 753 d="m 6900,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
754 id="path542" 754 id="path542"
755 inkscape:connector-curvature="0" 755 inkscape:connector-curvature="0"
756 style="fill:none;stroke:#3465a4" /><text 756 style="fill:none;stroke:#3465a4" /><text
757 class="TextShape" 757 class="TextShape"
758 id="text544"><tspan 758 id="text544"><tspan
759 class="TextParagraph" 759 class="TextParagraph"
760 font-size="635px" 760 font-size="635px"
761 font-weight="400" 761 font-weight="400"
762 id="tspan546" 762 id="tspan546"
763 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 763 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
764 class="TextPosition" 764 class="TextPosition"
765 x="6549" 765 x="6549"
766 y="8321" 766 y="8321"
767 id="tspan548"><tspan 767 id="tspan548"><tspan
768 id="tspan550" 768 id="tspan550"
769 style="fill:#000000;stroke:none">15</tspan></tspan></tspan></text> 769 style="fill:#000000;stroke:none">15</tspan></tspan></tspan></text>
770</g></g><g 770</g></g><g
771 class="com.sun.star.drawing.CustomShape" 771 class="com.sun.star.drawing.CustomShape"
772 id="g552" 772 id="g552"
773 transform="translate(-3285.889,-3185.889)"><g 773 transform="translate(-3285.889,-3185.889)"><g
774 id="id34"><rect 774 id="id34"><rect
775 class="BoundingBox" 775 class="BoundingBox"
776 x="10499" 776 x="10499"
777 y="7399" 777 y="7399"
778 width="2403" 778 width="2403"
779 height="1403" 779 height="1403"
780 id="rect555" 780 id="rect555"
781 style="fill:none;stroke:none" /><path 781 style="fill:none;stroke:none" /><path
782 d="m 11700,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 782 d="m 11700,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
783 id="path557" 783 id="path557"
784 inkscape:connector-curvature="0" 784 inkscape:connector-curvature="0"
785 style="fill:none;stroke:#3465a4" /><text 785 style="fill:none;stroke:#3465a4" /><text
786 class="TextShape" 786 class="TextShape"
787 id="text559"><tspan 787 id="text559"><tspan
788 class="TextParagraph" 788 class="TextParagraph"
789 font-size="635px" 789 font-size="635px"
790 font-weight="400" 790 font-weight="400"
791 id="tspan561" 791 id="tspan561"
792 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 792 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
793 class="TextPosition" 793 class="TextPosition"
794 x="11349" 794 x="11349"
795 y="8321" 795 y="8321"
796 id="tspan563"><tspan 796 id="tspan563"><tspan
797 id="tspan565" 797 id="tspan565"
798 style="fill:#000000;stroke:none">17</tspan></tspan></tspan></text> 798 style="fill:#000000;stroke:none">17</tspan></tspan></tspan></text>
799</g></g><g 799</g></g><g
800 class="com.sun.star.drawing.CustomShape" 800 class="com.sun.star.drawing.CustomShape"
801 id="g567" 801 id="g567"
802 transform="translate(-3285.889,-3185.889)"><g 802 transform="translate(-3285.889,-3185.889)"><g
803 id="id35"><rect 803 id="id35"><rect
804 class="BoundingBox" 804 class="BoundingBox"
805 x="12899" 805 x="12899"
806 y="7399" 806 y="7399"
807 width="2403" 807 width="2403"
808 height="1403" 808 height="1403"
809 id="rect570" 809 id="rect570"
810 style="fill:none;stroke:none" /><path 810 style="fill:none;stroke:none" /><path
811 d="m 14100,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 811 d="m 14100,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
812 id="path572" 812 id="path572"
813 inkscape:connector-curvature="0" 813 inkscape:connector-curvature="0"
814 style="fill:none;stroke:#3465a4" /></g></g><g 814 style="fill:none;stroke:#3465a4" /></g></g><g
815 class="com.sun.star.drawing.CustomShape" 815 class="com.sun.star.drawing.CustomShape"
816 id="g574" 816 id="g574"
817 transform="translate(-3285.889,-3185.889)"><g 817 transform="translate(-3285.889,-3185.889)"><g
818 id="id36"><rect 818 id="id36"><rect
819 class="BoundingBox" 819 class="BoundingBox"
820 x="15299" 820 x="15299"
821 y="7399" 821 y="7399"
822 width="2403" 822 width="2403"
823 height="1403" 823 height="1403"
824 id="rect577" 824 id="rect577"
825 style="fill:none;stroke:none" /><path 825 style="fill:none;stroke:none" /><path
826 d="m 16500,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 826 d="m 16500,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
827 id="path579" 827 id="path579"
828 inkscape:connector-curvature="0" 828 inkscape:connector-curvature="0"
829 style="fill:none;stroke:#3465a4" /><text 829 style="fill:none;stroke:#3465a4" /><text
830 class="TextShape" 830 class="TextShape"
831 id="text581"><tspan 831 id="text581"><tspan
832 class="TextParagraph" 832 class="TextParagraph"
833 font-size="635px" 833 font-size="635px"
834 font-weight="400" 834 font-weight="400"
835 id="tspan583" 835 id="tspan583"
836 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 836 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
837 class="TextPosition" 837 class="TextPosition"
838 x="16149" 838 x="16149"
839 y="8321" 839 y="8321"
840 id="tspan585"><tspan 840 id="tspan585"><tspan
841 id="tspan587" 841 id="tspan587"
842 style="fill:#000000;stroke:none">23</tspan></tspan></tspan></text> 842 style="fill:#000000;stroke:none">23</tspan></tspan></tspan></text>
843</g></g><g 843</g></g><g
844 class="com.sun.star.drawing.CustomShape" 844 class="com.sun.star.drawing.CustomShape"
845 id="g589" 845 id="g589"
846 transform="translate(-3285.889,-3185.889)"><g 846 transform="translate(-3285.889,-3185.889)"><g
847 id="id37"><rect 847 id="id37"><rect
848 class="BoundingBox" 848 class="BoundingBox"
849 x="12899" 849 x="12899"
850 y="7399" 850 y="7399"
851 width="2403" 851 width="2403"
852 height="1403" 852 height="1403"
853 id="rect592" 853 id="rect592"
854 style="fill:none;stroke:none" /><path 854 style="fill:none;stroke:none" /><path
855 d="m 14100,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 855 d="m 14100,8800 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
856 id="path594" 856 id="path594"
857 inkscape:connector-curvature="0" 857 inkscape:connector-curvature="0"
858 style="fill:none;stroke:#3465a4" /><text 858 style="fill:none;stroke:#3465a4" /><text
859 class="TextShape" 859 class="TextShape"
860 id="text596"><tspan 860 id="text596"><tspan
861 class="TextParagraph" 861 class="TextParagraph"
862 font-size="635px" 862 font-size="635px"
863 font-weight="400" 863 font-weight="400"
864 id="tspan598" 864 id="tspan598"
865 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 865 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
866 class="TextPosition" 866 class="TextPosition"
867 x="13749" 867 x="13749"
868 y="8321" 868 y="8321"
869 id="tspan600"><tspan 869 id="tspan600"><tspan
870 id="tspan602" 870 id="tspan602"
871 style="fill:#000000;stroke:none">22</tspan></tspan></tspan></text> 871 style="fill:#000000;stroke:none">22</tspan></tspan></tspan></text>
872</g></g><g 872</g></g><g
873 class="com.sun.star.drawing.CustomShape" 873 class="com.sun.star.drawing.CustomShape"
874 id="g604" 874 id="g604"
875 transform="translate(-3285.889,-3185.889)"><g 875 transform="translate(-3285.889,-3185.889)"><g
876 id="id38"><rect 876 id="id38"><rect
877 class="BoundingBox" 877 class="BoundingBox"
878 x="3299" 878 x="3299"
879 y="8799" 879 y="8799"
880 width="2403" 880 width="2403"
881 height="1403" 881 height="1403"
882 id="rect607" 882 id="rect607"
883 style="fill:none;stroke:none" /><path 883 style="fill:none;stroke:none" /><path
884 d="m 4500,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 884 d="m 4500,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
885 id="path609" 885 id="path609"
886 inkscape:connector-curvature="0" 886 inkscape:connector-curvature="0"
887 style="fill:none;stroke:#3465a4" /><text 887 style="fill:none;stroke:#3465a4" /><text
888 class="TextShape" 888 class="TextShape"
889 id="text611"><tspan 889 id="text611"><tspan
890 class="TextParagraph" 890 class="TextParagraph"
891 font-size="635px" 891 font-size="635px"
892 font-weight="400" 892 font-weight="400"
893 id="tspan613" 893 id="tspan613"
894 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 894 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
895 class="TextPosition" 895 class="TextPosition"
896 x="4149" 896 x="4149"
897 y="9721" 897 y="9721"
898 id="tspan615"><tspan 898 id="tspan615"><tspan
899 id="tspan617" 899 id="tspan617"
900 style="fill:#000000;stroke:none">24</tspan></tspan></tspan></text> 900 style="fill:#000000;stroke:none">24</tspan></tspan></tspan></text>
901</g></g><g 901</g></g><g
902 class="com.sun.star.drawing.CustomShape" 902 class="com.sun.star.drawing.CustomShape"
903 id="g619" 903 id="g619"
904 transform="translate(-3285.889,-3185.889)"><g 904 transform="translate(-3285.889,-3185.889)"><g
905 id="id39"><rect 905 id="id39"><rect
906 class="BoundingBox" 906 class="BoundingBox"
907 x="5699" 907 x="5699"
908 y="8799" 908 y="8799"
909 width="2403" 909 width="2403"
910 height="1403" 910 height="1403"
911 id="rect622" 911 id="rect622"
912 style="fill:none;stroke:none" /><path 912 style="fill:none;stroke:none" /><path
913 d="m 6900,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 913 d="m 6900,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
914 id="path624" 914 id="path624"
915 inkscape:connector-curvature="0" 915 inkscape:connector-curvature="0"
916 style="fill:none;stroke:#3465a4" /></g></g><g 916 style="fill:none;stroke:#3465a4" /></g></g><g
917 class="com.sun.star.drawing.CustomShape" 917 class="com.sun.star.drawing.CustomShape"
918 id="g626" 918 id="g626"
919 transform="translate(-3285.889,-3185.889)"><g 919 transform="translate(-3285.889,-3185.889)"><g
920 id="id40"><rect 920 id="id40"><rect
921 class="BoundingBox" 921 class="BoundingBox"
922 x="8099" 922 x="8099"
923 y="8799" 923 y="8799"
924 width="2403" 924 width="2403"
925 height="1403" 925 height="1403"
926 id="rect629" 926 id="rect629"
927 style="fill:none;stroke:none" /><path 927 style="fill:none;stroke:none" /><path
928 d="m 9300,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 928 d="m 9300,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
929 id="path631" 929 id="path631"
930 inkscape:connector-curvature="0" 930 inkscape:connector-curvature="0"
931 style="fill:none;stroke:#3465a4" /><text 931 style="fill:none;stroke:#3465a4" /><text
932 class="TextShape" 932 class="TextShape"
933 id="text633"><tspan 933 id="text633"><tspan
934 class="TextParagraph" 934 class="TextParagraph"
935 font-size="635px" 935 font-size="635px"
936 font-weight="400" 936 font-weight="400"
937 id="tspan635" 937 id="tspan635"
938 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 938 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
939 class="TextPosition" 939 class="TextPosition"
940 x="8949" 940 x="8949"
941 y="9721" 941 y="9721"
942 id="tspan637"><tspan 942 id="tspan637"><tspan
943 id="tspan639" 943 id="tspan639"
944 style="fill:#000000;stroke:none">26</tspan></tspan></tspan></text> 944 style="fill:#000000;stroke:none">26</tspan></tspan></tspan></text>
945</g></g><g 945</g></g><g
946 class="com.sun.star.drawing.CustomShape" 946 class="com.sun.star.drawing.CustomShape"
947 id="g641" 947 id="g641"
948 transform="translate(-3285.889,-3185.889)"><g 948 transform="translate(-3285.889,-3185.889)"><g
949 id="id41"><rect 949 id="id41"><rect
950 class="BoundingBox" 950 class="BoundingBox"
951 x="5699" 951 x="5699"
952 y="8799" 952 y="8799"
953 width="2403" 953 width="2403"
954 height="1403" 954 height="1403"
955 id="rect644" 955 id="rect644"
956 style="fill:none;stroke:none" /><path 956 style="fill:none;stroke:none" /><path
957 d="m 6900,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 957 d="m 6900,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
958 id="path646" 958 id="path646"
959 inkscape:connector-curvature="0" 959 inkscape:connector-curvature="0"
960 style="fill:none;stroke:#3465a4" /><text 960 style="fill:none;stroke:#3465a4" /><text
961 class="TextShape" 961 class="TextShape"
962 id="text648"><tspan 962 id="text648"><tspan
963 class="TextParagraph" 963 class="TextParagraph"
964 font-size="635px" 964 font-size="635px"
965 font-weight="400" 965 font-weight="400"
966 id="tspan650" 966 id="tspan650"
967 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 967 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
968 class="TextPosition" 968 class="TextPosition"
969 x="6549" 969 x="6549"
970 y="9721" 970 y="9721"
971 id="tspan652"><tspan 971 id="tspan652"><tspan
972 id="tspan654" 972 id="tspan654"
973 style="fill:#000000;stroke:none">25</tspan></tspan></tspan></text> 973 style="fill:#000000;stroke:none">25</tspan></tspan></tspan></text>
974</g></g><g 974</g></g><g
975 class="com.sun.star.drawing.CustomShape" 975 class="com.sun.star.drawing.CustomShape"
976 id="g656" 976 id="g656"
977 transform="translate(-3285.889,-3185.889)"><g 977 transform="translate(-3285.889,-3185.889)"><g
978 id="id42"><rect 978 id="id42"><rect
979 class="BoundingBox" 979 class="BoundingBox"
980 x="10499" 980 x="10499"
981 y="8799" 981 y="8799"
982 width="2403" 982 width="2403"
983 height="1403" 983 height="1403"
984 id="rect659" 984 id="rect659"
985 style="fill:none;stroke:none" /><path 985 style="fill:none;stroke:none" /><path
986 d="m 11700,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 986 d="m 11700,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
987 id="path661" 987 id="path661"
988 inkscape:connector-curvature="0" 988 inkscape:connector-curvature="0"
989 style="fill:none;stroke:#3465a4" /><text 989 style="fill:none;stroke:#3465a4" /><text
990 class="TextShape" 990 class="TextShape"
991 id="text663"><tspan 991 id="text663"><tspan
992 class="TextParagraph" 992 class="TextParagraph"
993 font-size="635px" 993 font-size="635px"
994 font-weight="400" 994 font-weight="400"
995 id="tspan665" 995 id="tspan665"
996 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 996 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
997 class="TextPosition" 997 class="TextPosition"
998 x="11349" 998 x="11349"
999 y="9721" 999 y="9721"
1000 id="tspan667"><tspan 1000 id="tspan667"><tspan
1001 id="tspan669" 1001 id="tspan669"
1002 style="fill:#000000;stroke:none">27</tspan></tspan></tspan></text> 1002 style="fill:#000000;stroke:none">27</tspan></tspan></tspan></text>
1003</g></g><g 1003</g></g><g
1004 class="com.sun.star.drawing.CustomShape" 1004 class="com.sun.star.drawing.CustomShape"
1005 id="g671" 1005 id="g671"
1006 transform="translate(-3285.889,-3185.889)"><g 1006 transform="translate(-3285.889,-3185.889)"><g
1007 id="id43"><rect 1007 id="id43"><rect
1008 class="BoundingBox" 1008 class="BoundingBox"
1009 x="12899" 1009 x="12899"
1010 y="8799" 1010 y="8799"
1011 width="2403" 1011 width="2403"
1012 height="1403" 1012 height="1403"
1013 id="rect674" 1013 id="rect674"
1014 style="fill:none;stroke:none" /><path 1014 style="fill:none;stroke:none" /><path
1015 d="m 14100,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 1015 d="m 14100,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
1016 id="path676" 1016 id="path676"
1017 inkscape:connector-curvature="0" 1017 inkscape:connector-curvature="0"
1018 style="fill:none;stroke:#3465a4" /></g></g><g 1018 style="fill:none;stroke:#3465a4" /></g></g><g
1019 class="com.sun.star.drawing.CustomShape" 1019 class="com.sun.star.drawing.CustomShape"
1020 id="g678" 1020 id="g678"
1021 transform="translate(-3285.889,-3185.889)"><g 1021 transform="translate(-3285.889,-3185.889)"><g
1022 id="id44"><rect 1022 id="id44"><rect
1023 class="BoundingBox" 1023 class="BoundingBox"
1024 x="15299" 1024 x="15299"
1025 y="8799" 1025 y="8799"
1026 width="2403" 1026 width="2403"
1027 height="1403" 1027 height="1403"
1028 id="rect681" 1028 id="rect681"
1029 style="fill:none;stroke:none" /><path 1029 style="fill:none;stroke:none" /><path
1030 d="m 16500,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 1030 d="m 16500,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
1031 id="path683" 1031 id="path683"
1032 inkscape:connector-curvature="0" 1032 inkscape:connector-curvature="0"
1033 style="fill:none;stroke:#3465a4" /><text 1033 style="fill:none;stroke:#3465a4" /><text
1034 class="TextShape" 1034 class="TextShape"
1035 id="text685"><tspan 1035 id="text685"><tspan
1036 class="TextParagraph" 1036 class="TextParagraph"
1037 font-size="635px" 1037 font-size="635px"
1038 font-weight="400" 1038 font-weight="400"
1039 id="tspan687" 1039 id="tspan687"
1040 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 1040 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
1041 class="TextPosition" 1041 class="TextPosition"
1042 x="16149" 1042 x="16149"
1043 y="9721" 1043 y="9721"
1044 id="tspan689"><tspan 1044 id="tspan689"><tspan
1045 id="tspan691" 1045 id="tspan691"
1046 style="fill:#000000;stroke:none">29</tspan></tspan></tspan></text> 1046 style="fill:#000000;stroke:none">29</tspan></tspan></tspan></text>
1047</g></g><g 1047</g></g><g
1048 class="com.sun.star.drawing.CustomShape" 1048 class="com.sun.star.drawing.CustomShape"
1049 id="g693" 1049 id="g693"
1050 transform="translate(-3285.889,-3185.889)"><g 1050 transform="translate(-3285.889,-3185.889)"><g
1051 id="id45"><rect 1051 id="id45"><rect
1052 class="BoundingBox" 1052 class="BoundingBox"
1053 x="12899" 1053 x="12899"
1054 y="8799" 1054 y="8799"
1055 width="2403" 1055 width="2403"
1056 height="1403" 1056 height="1403"
1057 id="rect696" 1057 id="rect696"
1058 style="fill:none;stroke:none" /><path 1058 style="fill:none;stroke:none" /><path
1059 d="m 14100,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z" 1059 d="m 14100,10200 -1200,0 0,-1400 2400,0 0,1400 -1200,0 z"
1060 id="path698" 1060 id="path698"
1061 inkscape:connector-curvature="0" 1061 inkscape:connector-curvature="0"
1062 style="fill:none;stroke:#3465a4" /><text 1062 style="fill:none;stroke:#3465a4" /><text
1063 class="TextShape" 1063 class="TextShape"
1064 id="text700"><tspan 1064 id="text700"><tspan
1065 class="TextParagraph" 1065 class="TextParagraph"
1066 font-size="635px" 1066 font-size="635px"
1067 font-weight="400" 1067 font-weight="400"
1068 id="tspan702" 1068 id="tspan702"
1069 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan 1069 style="font-weight:400;font-size:635px;font-family:sans-serif"><tspan
1070 class="TextPosition" 1070 class="TextPosition"
1071 x="13749" 1071 x="13749"
1072 y="9721" 1072 y="9721"
1073 id="tspan704"><tspan 1073 id="tspan704"><tspan
1074 id="tspan706" 1074 id="tspan706"
1075 style="fill:#000000;stroke:none">28</tspan></tspan></tspan></text> 1075 style="fill:#000000;stroke:none">28</tspan></tspan></tspan></text>
1076</g></g><g 1076</g></g><g
1077 class="com.sun.star.drawing.LineShape" 1077 class="com.sun.star.drawing.LineShape"
1078 id="g708" 1078 id="g708"
1079 transform="translate(-3285.889,-3185.889)"><g 1079 transform="translate(-3285.889,-3185.889)"><g
1080 id="id46"><rect 1080 id="id46"><rect
1081 class="BoundingBox" 1081 class="BoundingBox"
1082 x="5199" 1082 x="5199"
1083 y="3850" 1083 y="3850"
1084 width="1402" 1084 width="1402"
1085 height="301" 1085 height="301"
1086 id="rect711" 1086 id="rect711"
1087 style="fill:none;stroke:none" /><path 1087 style="fill:none;stroke:none" /><path
1088 d="m 5200,4000 970,0" 1088 d="m 5200,4000 970,0"
1089 id="path713" 1089 id="path713"
1090 inkscape:connector-curvature="0" 1090 inkscape:connector-curvature="0"
1091 style="fill:none;stroke:#ff3333" /><path 1091 style="fill:none;stroke:#ff3333" /><path
1092 d="m 6600,4000 -450,-150 0,300 450,-150 z" 1092 d="m 6600,4000 -450,-150 0,300 450,-150 z"
1093 id="path715" 1093 id="path715"
1094 inkscape:connector-curvature="0" 1094 inkscape:connector-curvature="0"
1095 style="fill:#ff3333;stroke:none" /></g></g><g 1095 style="fill:#ff3333;stroke:none" /></g></g><g
1096 class="com.sun.star.drawing.LineShape" 1096 class="com.sun.star.drawing.LineShape"
1097 id="g717" 1097 id="g717"
1098 transform="translate(-3285.889,-3185.889)"><g 1098 transform="translate(-3285.889,-3185.889)"><g
1099 id="id47"><rect 1099 id="id47"><rect
1100 class="BoundingBox" 1100 class="BoundingBox"
1101 x="5000" 1101 x="5000"
1102 y="4299" 1102 y="4299"
1103 width="1202" 1103 width="1202"
1104 height="802" 1104 height="802"
1105 id="rect720" 1105 id="rect720"
1106 style="fill:none;stroke:none" /><path 1106 style="fill:none;stroke:none" /><path
1107 d="m 6200,4300 -842,561" 1107 d="m 6200,4300 -842,561"
1108 id="path722" 1108 id="path722"
1109 inkscape:connector-curvature="0" 1109 inkscape:connector-curvature="0"
1110 style="fill:none;stroke:#ff3333" /><path 1110 style="fill:none;stroke:#ff3333" /><path
1111 d="m 5000,5100 458,-125 -167,-249 -291,374 z" 1111 d="m 5000,5100 458,-125 -167,-249 -291,374 z"
1112 id="path724" 1112 id="path724"
1113 inkscape:connector-curvature="0" 1113 inkscape:connector-curvature="0"
1114 style="fill:#ff3333;stroke:none" /></g></g><g 1114 style="fill:#ff3333;stroke:none" /></g></g><g
1115 class="com.sun.star.drawing.LineShape" 1115 class="com.sun.star.drawing.LineShape"
1116 id="g726" 1116 id="g726"
1117 transform="translate(-3285.889,-3185.889)"><g 1117 transform="translate(-3285.889,-3185.889)"><g
1118 id="id48"><rect 1118 id="id48"><rect
1119 class="BoundingBox" 1119 class="BoundingBox"
1120 x="5399" 1120 x="5399"
1121 y="5250" 1121 y="5250"
1122 width="1202" 1122 width="1202"
1123 height="301" 1123 height="301"
1124 id="rect729" 1124 id="rect729"
1125 style="fill:none;stroke:none" /><path 1125 style="fill:none;stroke:none" /><path
1126 d="m 5400,5400 770,0" 1126 d="m 5400,5400 770,0"
1127 id="path731" 1127 id="path731"
1128 inkscape:connector-curvature="0" 1128 inkscape:connector-curvature="0"
1129 style="fill:none;stroke:#ff3333" /><path 1129 style="fill:none;stroke:#ff3333" /><path
1130 d="m 6600,5400 -450,-150 0,300 450,-150 z" 1130 d="m 6600,5400 -450,-150 0,300 450,-150 z"
1131 id="path733" 1131 id="path733"
1132 inkscape:connector-curvature="0" 1132 inkscape:connector-curvature="0"
1133 style="fill:#ff3333;stroke:none" /></g></g><g 1133 style="fill:#ff3333;stroke:none" /></g></g><g
1134 class="com.sun.star.drawing.LineShape" 1134 class="com.sun.star.drawing.LineShape"
1135 id="g735" 1135 id="g735"
1136 transform="translate(-3285.889,-3185.889)"><g 1136 transform="translate(-3285.889,-3185.889)"><g
1137 id="id49"><rect 1137 id="id49"><rect
1138 class="BoundingBox" 1138 class="BoundingBox"
1139 x="7599" 1139 x="7599"
1140 y="5250" 1140 y="5250"
1141 width="1202" 1141 width="1202"
1142 height="301" 1142 height="301"
1143 id="rect738" 1143 id="rect738"
1144 style="fill:none;stroke:none" /><path 1144 style="fill:none;stroke:none" /><path
1145 d="m 7600,5400 770,0" 1145 d="m 7600,5400 770,0"
1146 id="path740" 1146 id="path740"
1147 inkscape:connector-curvature="0" 1147 inkscape:connector-curvature="0"
1148 style="fill:none;stroke:#ff3333" /><path 1148 style="fill:none;stroke:#ff3333" /><path
1149 d="m 8800,5400 -450,-150 0,300 450,-150 z" 1149 d="m 8800,5400 -450,-150 0,300 450,-150 z"
1150 id="path742" 1150 id="path742"
1151 inkscape:connector-curvature="0" 1151 inkscape:connector-curvature="0"
1152 style="fill:#ff3333;stroke:none" /></g></g><g 1152 style="fill:#ff3333;stroke:none" /></g></g><g
1153 class="com.sun.star.drawing.LineShape" 1153 class="com.sun.star.drawing.LineShape"
1154 id="g744" 1154 id="g744"
1155 transform="translate(-3285.889,-3185.889)"><g 1155 transform="translate(-3285.889,-3185.889)"><g
1156 id="id50"><rect 1156 id="id50"><rect
1157 class="BoundingBox" 1157 class="BoundingBox"
1158 x="9799" 1158 x="9799"
1159 y="5250" 1159 y="5250"
1160 width="1402" 1160 width="1402"
1161 height="301" 1161 height="301"
1162 id="rect747" 1162 id="rect747"
1163 style="fill:none;stroke:none" /><path 1163 style="fill:none;stroke:none" /><path
1164 d="m 9800,5400 970,0" 1164 d="m 9800,5400 970,0"
1165 id="path749" 1165 id="path749"
1166 inkscape:connector-curvature="0" 1166 inkscape:connector-curvature="0"
1167 style="fill:none;stroke:#ff3333" /><path 1167 style="fill:none;stroke:#ff3333" /><path
1168 d="m 11200,5400 -450,-150 0,300 450,-150 z" 1168 d="m 11200,5400 -450,-150 0,300 450,-150 z"
1169 id="path751" 1169 id="path751"
1170 inkscape:connector-curvature="0" 1170 inkscape:connector-curvature="0"
1171 style="fill:#ff3333;stroke:none" /></g></g><g 1171 style="fill:#ff3333;stroke:none" /></g></g><g
1172 class="com.sun.star.drawing.LineShape" 1172 class="com.sun.star.drawing.LineShape"
1173 id="g753" 1173 id="g753"
1174 transform="translate(-3285.889,-3185.889)"><g 1174 transform="translate(-3285.889,-3185.889)"><g
1175 id="id51"><rect 1175 id="id51"><rect
1176 class="BoundingBox" 1176 class="BoundingBox"
1177 x="9900" 1177 x="9900"
1178 y="4200" 1178 y="4200"
1179 width="1202" 1179 width="1202"
1180 height="802" 1180 height="802"
1181 id="rect756" 1181 id="rect756"
1182 style="fill:none;stroke:none" /><path 1182 style="fill:none;stroke:none" /><path
1183 d="m 11100,5000 -842,-561" 1183 d="m 11100,5000 -842,-561"
1184 id="path758" 1184 id="path758"
1185 inkscape:connector-curvature="0" 1185 inkscape:connector-curvature="0"
1186 style="fill:none;stroke:#ff3333" /><path 1186 style="fill:none;stroke:#ff3333" /><path
1187 d="m 9900,4200 291,374 167,-249 -458,-125 z" 1187 d="m 9900,4200 291,374 167,-249 -458,-125 z"
1188 id="path760" 1188 id="path760"
1189 inkscape:connector-curvature="0" 1189 inkscape:connector-curvature="0"
1190 style="fill:#ff3333;stroke:none" /></g></g><g 1190 style="fill:#ff3333;stroke:none" /></g></g><g
1191 class="com.sun.star.drawing.LineShape" 1191 class="com.sun.star.drawing.LineShape"
1192 id="g762" 1192 id="g762"
1193 transform="translate(-3285.889,-3185.889)"><g 1193 transform="translate(-3285.889,-3185.889)"><g
1194 id="id52"><rect 1194 id="id52"><rect
1195 class="BoundingBox" 1195 class="BoundingBox"
1196 x="9999" 1196 x="9999"
1197 y="3850" 1197 y="3850"
1198 width="1402" 1198 width="1402"
1199 height="301" 1199 height="301"
1200 id="rect765" 1200 id="rect765"
1201 style="fill:none;stroke:none" /><path 1201 style="fill:none;stroke:none" /><path
1202 d="m 10000,4000 970,0" 1202 d="m 10000,4000 970,0"
1203 id="path767" 1203 id="path767"
1204 inkscape:connector-curvature="0" 1204 inkscape:connector-curvature="0"
1205 style="fill:none;stroke:#ff3333" /><path 1205 style="fill:none;stroke:#ff3333" /><path
1206 d="m 11400,4000 -450,-150 0,300 450,-150 z" 1206 d="m 11400,4000 -450,-150 0,300 450,-150 z"
1207 id="path769" 1207 id="path769"
1208 inkscape:connector-curvature="0" 1208 inkscape:connector-curvature="0"
1209 style="fill:#ff3333;stroke:none" /></g></g><g 1209 style="fill:#ff3333;stroke:none" /></g></g><g
1210 class="com.sun.star.drawing.LineShape" 1210 class="com.sun.star.drawing.LineShape"
1211 id="g771" 1211 id="g771"
1212 transform="translate(-3285.889,-3185.889)"><g 1212 transform="translate(-3285.889,-3185.889)"><g
1213 id="id53"><rect 1213 id="id53"><rect
1214 class="BoundingBox" 1214 class="BoundingBox"
1215 x="12399" 1215 x="12399"
1216 y="3850" 1216 y="3850"
1217 width="1202" 1217 width="1202"
1218 height="301" 1218 height="301"
1219 id="rect774" 1219 id="rect774"
1220 style="fill:none;stroke:none" /><path 1220 style="fill:none;stroke:none" /><path
1221 d="m 12400,4000 770,0" 1221 d="m 12400,4000 770,0"
1222 id="path776" 1222 id="path776"
1223 inkscape:connector-curvature="0" 1223 inkscape:connector-curvature="0"
1224 style="fill:none;stroke:#ff3333" /><path 1224 style="fill:none;stroke:#ff3333" /><path
1225 d="m 13600,4000 -450,-150 0,300 450,-150 z" 1225 d="m 13600,4000 -450,-150 0,300 450,-150 z"
1226 id="path778" 1226 id="path778"
1227 inkscape:connector-curvature="0" 1227 inkscape:connector-curvature="0"
1228 style="fill:#ff3333;stroke:none" /></g></g><g 1228 style="fill:#ff3333;stroke:none" /></g></g><g
1229 class="com.sun.star.drawing.LineShape" 1229 class="com.sun.star.drawing.LineShape"
1230 id="g780" 1230 id="g780"
1231 transform="translate(-3285.889,-3185.889)"><g 1231 transform="translate(-3285.889,-3185.889)"><g
1232 id="id54"><rect 1232 id="id54"><rect
1233 class="BoundingBox" 1233 class="BoundingBox"
1234 x="14799" 1234 x="14799"
1235 y="3850" 1235 y="3850"
1236 width="1202" 1236 width="1202"
1237 height="301" 1237 height="301"
1238 id="rect783" 1238 id="rect783"
1239 style="fill:none;stroke:none" /><path 1239 style="fill:none;stroke:none" /><path
1240 d="m 14800,4000 770,0" 1240 d="m 14800,4000 770,0"
1241 id="path785" 1241 id="path785"
1242 inkscape:connector-curvature="0" 1242 inkscape:connector-curvature="0"
1243 style="fill:none;stroke:#ff3333" /><path 1243 style="fill:none;stroke:#ff3333" /><path
1244 d="m 16000,4000 -450,-150 0,300 450,-150 z" 1244 d="m 16000,4000 -450,-150 0,300 450,-150 z"
1245 id="path787" 1245 id="path787"
1246 inkscape:connector-curvature="0" 1246 inkscape:connector-curvature="0"
1247 style="fill:#ff3333;stroke:none" /></g></g><g 1247 style="fill:#ff3333;stroke:none" /></g></g><g
1248 class="com.sun.star.drawing.LineShape" 1248 class="com.sun.star.drawing.LineShape"
1249 id="g789" 1249 id="g789"
1250 transform="translate(-3285.889,-3185.889)"><g 1250 transform="translate(-3285.889,-3185.889)"><g
1251 id="id55"><rect 1251 id="id55"><rect
1252 class="BoundingBox" 1252 class="BoundingBox"
1253 x="14400" 1253 x="14400"
1254 y="4399" 1254 y="4399"
1255 width="1402" 1255 width="1402"
1256 height="602" 1256 height="602"
1257 id="rect792" 1257 id="rect792"
1258 style="fill:none;stroke:none" /><path 1258 style="fill:none;stroke:none" /><path
1259 d="m 15800,4400 -1005,431" 1259 d="m 15800,4400 -1005,431"
1260 id="path794" 1260 id="path794"
1261 inkscape:connector-curvature="0" 1261 inkscape:connector-curvature="0"
1262 style="fill:none;stroke:#ff3333" /><path 1262 style="fill:none;stroke:#ff3333" /><path
1263 d="m 14400,5000 473,-39 -118,-276 -355,315 z" 1263 d="m 14400,5000 473,-39 -118,-276 -355,315 z"
1264 id="path796" 1264 id="path796"
1265 inkscape:connector-curvature="0" 1265 inkscape:connector-curvature="0"
1266 style="fill:#ff3333;stroke:none" /></g></g><g 1266 style="fill:#ff3333;stroke:none" /></g></g><g
1267 class="com.sun.star.drawing.LineShape" 1267 class="com.sun.star.drawing.LineShape"
1268 id="g798" 1268 id="g798"
1269 transform="translate(-3285.889,-3185.889)"><g 1269 transform="translate(-3285.889,-3185.889)"><g
1270 id="id56"><rect 1270 id="id56"><rect
1271 class="BoundingBox" 1271 class="BoundingBox"
1272 x="14599" 1272 x="14599"
1273 y="5250" 1273 y="5250"
1274 width="1402" 1274 width="1402"
1275 height="301" 1275 height="301"
1276 id="rect801" 1276 id="rect801"
1277 style="fill:none;stroke:none" /><path 1277 style="fill:none;stroke:none" /><path
1278 d="m 14600,5400 970,0" 1278 d="m 14600,5400 970,0"
1279 id="path803" 1279 id="path803"
1280 inkscape:connector-curvature="0" 1280 inkscape:connector-curvature="0"
1281 style="fill:none;stroke:#ff3333" /><path 1281 style="fill:none;stroke:#ff3333" /><path
1282 d="m 16000,5400 -450,-150 0,300 450,-150 z" 1282 d="m 16000,5400 -450,-150 0,300 450,-150 z"
1283 id="path805" 1283 id="path805"
1284 inkscape:connector-curvature="0" 1284 inkscape:connector-curvature="0"
1285 style="fill:#ff3333;stroke:none" /></g></g><g 1285 style="fill:#ff3333;stroke:none" /></g></g><g
1286 class="com.sun.star.drawing.LineShape" 1286 class="com.sun.star.drawing.LineShape"
1287 id="g807" 1287 id="g807"
1288 transform="translate(-3285.889,-3185.889)"><g 1288 transform="translate(-3285.889,-3185.889)"><g
1289 id="id57"><rect 1289 id="id57"><rect
1290 class="BoundingBox" 1290 class="BoundingBox"
1291 x="5199" 1291 x="5199"
1292 y="6550" 1292 y="6550"
1293 width="1402" 1293 width="1402"
1294 height="301" 1294 height="301"
1295 id="rect810" 1295 id="rect810"
1296 style="fill:none;stroke:none" /><path 1296 style="fill:none;stroke:none" /><path
1297 d="m 5200,6700 970,0" 1297 d="m 5200,6700 970,0"
1298 id="path812" 1298 id="path812"
1299 inkscape:connector-curvature="0" 1299 inkscape:connector-curvature="0"
1300 style="fill:none;stroke:#ff3333" /><path 1300 style="fill:none;stroke:#ff3333" /><path
1301 d="m 6600,6700 -450,-150 0,300 450,-150 z" 1301 d="m 6600,6700 -450,-150 0,300 450,-150 z"
1302 id="path814" 1302 id="path814"
1303 inkscape:connector-curvature="0" 1303 inkscape:connector-curvature="0"
1304 style="fill:#ff3333;stroke:none" /></g></g><g 1304 style="fill:#ff3333;stroke:none" /></g></g><g
1305 class="com.sun.star.drawing.LineShape" 1305 class="com.sun.star.drawing.LineShape"
1306 id="g816" 1306 id="g816"
1307 transform="translate(-3285.889,-3129.4446)"><g 1307 transform="translate(-3285.889,-3129.4446)"><g
1308 id="id58"><rect 1308 id="id58"><rect
1309 class="BoundingBox" 1309 class="BoundingBox"
1310 x="5000" 1310 x="5000"
1311 y="6999" 1311 y="6999"
1312 width="1202" 1312 width="1202"
1313 height="802" 1313 height="802"
1314 id="rect819" 1314 id="rect819"
1315 style="fill:none;stroke:none" /><path 1315 style="fill:none;stroke:none" /><path
1316 d="m 6200,7000 -842,561" 1316 d="m 6200,7000 -842,561"
1317 id="path821" 1317 id="path821"
1318 inkscape:connector-curvature="0" 1318 inkscape:connector-curvature="0"
1319 style="fill:none;stroke:#ff3333" /><path 1319 style="fill:none;stroke:#ff3333" /><path
1320 d="m 5000,7800 458,-125 -167,-249 -291,374 z" 1320 d="m 5000,7800 458,-125 -167,-249 -291,374 z"
1321 id="path823" 1321 id="path823"
1322 inkscape:connector-curvature="0" 1322 inkscape:connector-curvature="0"
1323 style="fill:#ff3333;stroke:none" /></g></g><g 1323 style="fill:#ff3333;stroke:none" /></g></g><g
1324 class="com.sun.star.drawing.LineShape" 1324 class="com.sun.star.drawing.LineShape"
1325 id="g825" 1325 id="g825"
1326 transform="translate(-3285.889,-3185.889)"><g 1326 transform="translate(-3285.889,-3185.889)"><g
1327 id="id59"><rect 1327 id="id59"><rect
1328 class="BoundingBox" 1328 class="BoundingBox"
1329 x="5399" 1329 x="5399"
1330 y="7950" 1330 y="7950"
1331 width="1202" 1331 width="1202"
1332 height="301" 1332 height="301"
1333 id="rect828" 1333 id="rect828"
1334 style="fill:none;stroke:none" /><path 1334 style="fill:none;stroke:none" /><path
1335 d="m 5400,8100 770,0" 1335 d="m 5400,8100 770,0"
1336 id="path830" 1336 id="path830"
1337 inkscape:connector-curvature="0" 1337 inkscape:connector-curvature="0"
1338 style="fill:none;stroke:#ff3333" /><path 1338 style="fill:none;stroke:#ff3333" /><path
1339 d="m 6600,8100 -450,-150 0,300 450,-150 z" 1339 d="m 6600,8100 -450,-150 0,300 450,-150 z"
1340 id="path832" 1340 id="path832"
1341 inkscape:connector-curvature="0" 1341 inkscape:connector-curvature="0"
1342 style="fill:#ff3333;stroke:none" /></g></g><g 1342 style="fill:#ff3333;stroke:none" /></g></g><g
1343 class="com.sun.star.drawing.LineShape" 1343 class="com.sun.star.drawing.LineShape"
1344 id="g834" 1344 id="g834"
1345 transform="translate(-3285.889,-3185.889)"><g 1345 transform="translate(-3285.889,-3185.889)"><g
1346 id="id60"><rect 1346 id="id60"><rect
1347 class="BoundingBox" 1347 class="BoundingBox"
1348 x="7599" 1348 x="7599"
1349 y="7950" 1349 y="7950"
1350 width="1202" 1350 width="1202"
1351 height="301" 1351 height="301"
1352 id="rect837" 1352 id="rect837"
1353 style="fill:none;stroke:none" /><path 1353 style="fill:none;stroke:none" /><path
1354 d="m 7600,8100 770,0" 1354 d="m 7600,8100 770,0"
1355 id="path839" 1355 id="path839"
1356 inkscape:connector-curvature="0" 1356 inkscape:connector-curvature="0"
1357 style="fill:none;stroke:#ff3333" /><path 1357 style="fill:none;stroke:#ff3333" /><path
1358 d="m 8800,8100 -450,-150 0,300 450,-150 z" 1358 d="m 8800,8100 -450,-150 0,300 450,-150 z"
1359 id="path841" 1359 id="path841"
1360 inkscape:connector-curvature="0" 1360 inkscape:connector-curvature="0"
1361 style="fill:#ff3333;stroke:none" /></g></g><g 1361 style="fill:#ff3333;stroke:none" /></g></g><g
1362 class="com.sun.star.drawing.LineShape" 1362 class="com.sun.star.drawing.LineShape"
1363 id="g843" 1363 id="g843"
1364 transform="translate(-3285.889,-3185.889)"><g 1364 transform="translate(-3285.889,-3185.889)"><g
1365 id="id61"><rect 1365 id="id61"><rect
1366 class="BoundingBox" 1366 class="BoundingBox"
1367 x="9799" 1367 x="9799"
1368 y="7950" 1368 y="7950"
1369 width="1402" 1369 width="1402"
1370 height="301" 1370 height="301"
1371 id="rect846" 1371 id="rect846"
1372 style="fill:none;stroke:none" /><path 1372 style="fill:none;stroke:none" /><path
1373 d="m 9800,8100 970,0" 1373 d="m 9800,8100 970,0"
1374 id="path848" 1374 id="path848"
1375 inkscape:connector-curvature="0" 1375 inkscape:connector-curvature="0"
1376 style="fill:none;stroke:#ff3333" /><path 1376 style="fill:none;stroke:#ff3333" /><path
1377 d="m 11200,8100 -450,-150 0,300 450,-150 z" 1377 d="m 11200,8100 -450,-150 0,300 450,-150 z"
1378 id="path850" 1378 id="path850"
1379 inkscape:connector-curvature="0" 1379 inkscape:connector-curvature="0"
1380 style="fill:#ff3333;stroke:none" /></g></g><g 1380 style="fill:#ff3333;stroke:none" /></g></g><g
1381 class="com.sun.star.drawing.LineShape" 1381 class="com.sun.star.drawing.LineShape"
1382 id="g852" 1382 id="g852"
1383 transform="translate(-3285.889,-3129.4446)"><g 1383 transform="translate(-3285.889,-3129.4446)"><g
1384 id="id62"><rect 1384 id="id62"><rect
1385 class="BoundingBox" 1385 class="BoundingBox"
1386 x="9900" 1386 x="9900"
1387 y="6900" 1387 y="6900"
1388 width="1202" 1388 width="1202"
1389 height="802" 1389 height="802"
1390 id="rect855" 1390 id="rect855"
1391 style="fill:none;stroke:none" /><path 1391 style="fill:none;stroke:none" /><path
1392 d="m 11100,7700 -842,-561" 1392 d="m 11100,7700 -842,-561"
1393 id="path857" 1393 id="path857"
1394 inkscape:connector-curvature="0" 1394 inkscape:connector-curvature="0"
1395 style="fill:none;stroke:#ff3333" /><path 1395 style="fill:none;stroke:#ff3333" /><path
1396 d="m 9900,6900 291,374 167,-249 -458,-125 z" 1396 d="m 9900,6900 291,374 167,-249 -458,-125 z"
1397 id="path859" 1397 id="path859"
1398 inkscape:connector-curvature="0" 1398 inkscape:connector-curvature="0"
1399 style="fill:#ff3333;stroke:none" /></g></g><g 1399 style="fill:#ff3333;stroke:none" /></g></g><g
1400 class="com.sun.star.drawing.LineShape" 1400 class="com.sun.star.drawing.LineShape"
1401 id="g861" 1401 id="g861"
1402 transform="translate(-3285.889,-3185.889)"><g 1402 transform="translate(-3285.889,-3185.889)"><g
1403 id="id63"><rect 1403 id="id63"><rect
1404 class="BoundingBox" 1404 class="BoundingBox"
1405 x="9999" 1405 x="9999"
1406 y="6550" 1406 y="6550"
1407 width="1402" 1407 width="1402"
1408 height="301" 1408 height="301"
1409 id="rect864" 1409 id="rect864"
1410 style="fill:none;stroke:none" /><path 1410 style="fill:none;stroke:none" /><path
1411 d="m 10000,6700 970,0" 1411 d="m 10000,6700 970,0"
1412 id="path866" 1412 id="path866"
1413 inkscape:connector-curvature="0" 1413 inkscape:connector-curvature="0"
1414 style="fill:none;stroke:#ff3333" /><path 1414 style="fill:none;stroke:#ff3333" /><path
1415 d="m 11400,6700 -450,-150 0,300 450,-150 z" 1415 d="m 11400,6700 -450,-150 0,300 450,-150 z"
1416 id="path868" 1416 id="path868"
1417 inkscape:connector-curvature="0" 1417 inkscape:connector-curvature="0"
1418 style="fill:#ff3333;stroke:none" /></g></g><g 1418 style="fill:#ff3333;stroke:none" /></g></g><g
1419 class="com.sun.star.drawing.LineShape" 1419 class="com.sun.star.drawing.LineShape"
1420 id="g870" 1420 id="g870"
1421 transform="translate(-3285.889,-3185.889)"><g 1421 transform="translate(-3285.889,-3185.889)"><g
1422 id="id64"><rect 1422 id="id64"><rect
1423 class="BoundingBox" 1423 class="BoundingBox"
1424 x="12399" 1424 x="12399"
1425 y="6550" 1425 y="6550"
1426 width="1202" 1426 width="1202"
1427 height="301" 1427 height="301"
1428 id="rect873" 1428 id="rect873"
1429 style="fill:none;stroke:none" /><path 1429 style="fill:none;stroke:none" /><path
1430 d="m 12400,6700 770,0" 1430 d="m 12400,6700 770,0"
1431 id="path875" 1431 id="path875"
1432 inkscape:connector-curvature="0" 1432 inkscape:connector-curvature="0"
1433 style="fill:none;stroke:#ff3333" /><path 1433 style="fill:none;stroke:#ff3333" /><path
1434 d="m 13600,6700 -450,-150 0,300 450,-150 z" 1434 d="m 13600,6700 -450,-150 0,300 450,-150 z"
1435 id="path877" 1435 id="path877"
1436 inkscape:connector-curvature="0" 1436 inkscape:connector-curvature="0"
1437 style="fill:#ff3333;stroke:none" /></g></g><g 1437 style="fill:#ff3333;stroke:none" /></g></g><g
1438 class="com.sun.star.drawing.LineShape" 1438 class="com.sun.star.drawing.LineShape"
1439 id="g879" 1439 id="g879"
1440 transform="translate(-3285.889,-3185.889)"><g 1440 transform="translate(-3285.889,-3185.889)"><g
1441 id="id65"><rect 1441 id="id65"><rect
1442 class="BoundingBox" 1442 class="BoundingBox"
1443 x="14799" 1443 x="14799"
1444 y="6550" 1444 y="6550"
1445 width="1202" 1445 width="1202"
1446 height="301" 1446 height="301"
1447 id="rect882" 1447 id="rect882"
1448 style="fill:none;stroke:none" /><path 1448 style="fill:none;stroke:none" /><path
1449 d="m 14800,6700 770,0" 1449 d="m 14800,6700 770,0"
1450 id="path884" 1450 id="path884"
1451 inkscape:connector-curvature="0" 1451 inkscape:connector-curvature="0"
1452 style="fill:none;stroke:#ff3333" /><path 1452 style="fill:none;stroke:#ff3333" /><path
1453 d="m 16000,6700 -450,-150 0,300 450,-150 z" 1453 d="m 16000,6700 -450,-150 0,300 450,-150 z"
1454 id="path886" 1454 id="path886"
1455 inkscape:connector-curvature="0" 1455 inkscape:connector-curvature="0"
1456 style="fill:#ff3333;stroke:none" /></g></g><g 1456 style="fill:#ff3333;stroke:none" /></g></g><g
1457 class="com.sun.star.drawing.LineShape" 1457 class="com.sun.star.drawing.LineShape"
1458 id="g888" 1458 id="g888"
1459 transform="translate(-3285.889,-3129.4446)"><g 1459 transform="translate(-3285.889,-3129.4446)"><g
1460 id="id66"><rect 1460 id="id66"><rect
1461 class="BoundingBox" 1461 class="BoundingBox"
1462 x="14400" 1462 x="14400"
1463 y="7099" 1463 y="7099"
1464 width="1402" 1464 width="1402"
1465 height="602" 1465 height="602"
1466 id="rect891" 1466 id="rect891"
1467 style="fill:none;stroke:none" /><path 1467 style="fill:none;stroke:none" /><path
1468 d="m 15800,7100 -1005,431" 1468 d="m 15800,7100 -1005,431"
1469 id="path893" 1469 id="path893"
1470 inkscape:connector-curvature="0" 1470 inkscape:connector-curvature="0"
1471 style="fill:none;stroke:#ff3333" /><path 1471 style="fill:none;stroke:#ff3333" /><path
1472 d="m 14400,7700 473,-39 -118,-276 -355,315 z" 1472 d="m 14400,7700 473,-39 -118,-276 -355,315 z"
1473 id="path895" 1473 id="path895"
1474 inkscape:connector-curvature="0" 1474 inkscape:connector-curvature="0"
1475 style="fill:#ff3333;stroke:none" /></g></g><g 1475 style="fill:#ff3333;stroke:none" /></g></g><g
1476 class="com.sun.star.drawing.LineShape" 1476 class="com.sun.star.drawing.LineShape"
1477 id="g897" 1477 id="g897"
1478 transform="translate(-3285.889,-3185.889)"><g 1478 transform="translate(-3285.889,-3185.889)"><g
1479 id="id67"><rect 1479 id="id67"><rect
1480 class="BoundingBox" 1480 class="BoundingBox"
1481 x="14599" 1481 x="14599"
1482 y="7950" 1482 y="7950"
1483 width="1402" 1483 width="1402"
1484 height="301" 1484 height="301"
1485 id="rect900" 1485 id="rect900"
1486 style="fill:none;stroke:none" /><path 1486 style="fill:none;stroke:none" /><path
1487 d="m 14600,8100 970,0" 1487 d="m 14600,8100 970,0"
1488 id="path902" 1488 id="path902"
1489 inkscape:connector-curvature="0" 1489 inkscape:connector-curvature="0"
1490 style="fill:none;stroke:#ff3333" /><path 1490 style="fill:none;stroke:#ff3333" /><path
1491 d="m 16000,8100 -450,-150 0,300 450,-150 z" 1491 d="m 16000,8100 -450,-150 0,300 450,-150 z"
1492 id="path904" 1492 id="path904"
1493 inkscape:connector-curvature="0" 1493 inkscape:connector-curvature="0"
1494 style="fill:#ff3333;stroke:none" /></g></g><g 1494 style="fill:#ff3333;stroke:none" /></g></g><g
1495 class="com.sun.star.drawing.LineShape" 1495 class="com.sun.star.drawing.LineShape"
1496 id="g906" 1496 id="g906"
1497 transform="translate(-3285.889,-3185.889)"><g 1497 transform="translate(-3285.889,-3185.889)"><g
1498 id="id68"><rect 1498 id="id68"><rect
1499 class="BoundingBox" 1499 class="BoundingBox"
1500 x="5399" 1500 x="5399"
1501 y="9450" 1501 y="9450"
1502 width="1202" 1502 width="1202"
1503 height="301" 1503 height="301"
1504 id="rect909" 1504 id="rect909"
1505 style="fill:none;stroke:none" /><path 1505 style="fill:none;stroke:none" /><path
1506 d="m 5400,9600 770,0" 1506 d="m 5400,9600 770,0"
1507 id="path911" 1507 id="path911"
1508 inkscape:connector-curvature="0" 1508 inkscape:connector-curvature="0"
1509 style="fill:none;stroke:#ff3333" /><path 1509 style="fill:none;stroke:#ff3333" /><path
1510 d="m 6600,9600 -450,-150 0,300 450,-150 z" 1510 d="m 6600,9600 -450,-150 0,300 450,-150 z"
1511 id="path913" 1511 id="path913"
1512 inkscape:connector-curvature="0" 1512 inkscape:connector-curvature="0"
1513 style="fill:#ff3333;stroke:none" /></g></g><g 1513 style="fill:#ff3333;stroke:none" /></g></g><g
1514 class="com.sun.star.drawing.LineShape" 1514 class="com.sun.star.drawing.LineShape"
1515 id="g915" 1515 id="g915"
1516 transform="translate(-3285.889,-3185.889)"><g 1516 transform="translate(-3285.889,-3185.889)"><g
1517 id="id69"><rect 1517 id="id69"><rect
1518 class="BoundingBox" 1518 class="BoundingBox"
1519 x="7599" 1519 x="7599"
1520 y="9450" 1520 y="9450"
1521 width="1202" 1521 width="1202"
1522 height="301" 1522 height="301"
1523 id="rect918" 1523 id="rect918"
1524 style="fill:none;stroke:none" /><path 1524 style="fill:none;stroke:none" /><path
1525 d="m 7600,9600 770,0" 1525 d="m 7600,9600 770,0"
1526 id="path920" 1526 id="path920"
1527 inkscape:connector-curvature="0" 1527 inkscape:connector-curvature="0"
1528 style="fill:none;stroke:#ff3333" /><path 1528 style="fill:none;stroke:#ff3333" /><path
1529 d="m 8800,9600 -450,-150 0,300 450,-150 z" 1529 d="m 8800,9600 -450,-150 0,300 450,-150 z"
1530 id="path922" 1530 id="path922"
1531 inkscape:connector-curvature="0" 1531 inkscape:connector-curvature="0"
1532 style="fill:#ff3333;stroke:none" /></g></g><g 1532 style="fill:#ff3333;stroke:none" /></g></g><g
1533 class="com.sun.star.drawing.LineShape" 1533 class="com.sun.star.drawing.LineShape"
1534 id="g924" 1534 id="g924"
1535 transform="translate(-3285.889,-3185.889)"><g 1535 transform="translate(-3285.889,-3185.889)"><g
1536 id="id70"><rect 1536 id="id70"><rect
1537 class="BoundingBox" 1537 class="BoundingBox"
1538 x="9999" 1538 x="9999"
1539 y="9450" 1539 y="9450"
1540 width="1202" 1540 width="1202"
1541 height="301" 1541 height="301"
1542 id="rect927" 1542 id="rect927"
1543 style="fill:none;stroke:none" /><path 1543 style="fill:none;stroke:none" /><path
1544 d="m 10000,9600 770,0" 1544 d="m 10000,9600 770,0"
1545 id="path929" 1545 id="path929"
1546 inkscape:connector-curvature="0" 1546 inkscape:connector-curvature="0"
1547 style="fill:none;stroke:#ff3333" /><path 1547 style="fill:none;stroke:#ff3333" /><path
1548 d="m 11200,9600 -450,-150 0,300 450,-150 z" 1548 d="m 11200,9600 -450,-150 0,300 450,-150 z"
1549 id="path931" 1549 id="path931"
1550 inkscape:connector-curvature="0" 1550 inkscape:connector-curvature="0"
1551 style="fill:#ff3333;stroke:none" /></g></g><g 1551 style="fill:#ff3333;stroke:none" /></g></g><g
1552 class="com.sun.star.drawing.LineShape" 1552 class="com.sun.star.drawing.LineShape"
1553 id="g933" 1553 id="g933"
1554 transform="translate(-3285.889,-3185.889)"><g 1554 transform="translate(-3285.889,-3185.889)"><g
1555 id="id71"><rect 1555 id="id71"><rect
1556 class="BoundingBox" 1556 class="BoundingBox"
1557 x="12399" 1557 x="12399"
1558 y="9450" 1558 y="9450"
1559 width="1202" 1559 width="1202"
1560 height="301" 1560 height="301"
1561 id="rect936" 1561 id="rect936"
1562 style="fill:none;stroke:none" /><path 1562 style="fill:none;stroke:none" /><path
1563 d="m 12400,9600 770,0" 1563 d="m 12400,9600 770,0"
1564 id="path938" 1564 id="path938"
1565 inkscape:connector-curvature="0" 1565 inkscape:connector-curvature="0"
1566 style="fill:none;stroke:#ff3333" /><path 1566 style="fill:none;stroke:#ff3333" /><path
1567 d="m 13600,9600 -450,-150 0,300 450,-150 z" 1567 d="m 13600,9600 -450,-150 0,300 450,-150 z"
1568 id="path940" 1568 id="path940"
1569 inkscape:connector-curvature="0" 1569 inkscape:connector-curvature="0"
1570 style="fill:#ff3333;stroke:none" /></g></g><g 1570 style="fill:#ff3333;stroke:none" /></g></g><g
1571 class="com.sun.star.drawing.LineShape" 1571 class="com.sun.star.drawing.LineShape"
1572 id="g942" 1572 id="g942"
1573 transform="translate(-3285.889,-3185.889)"><g 1573 transform="translate(-3285.889,-3185.889)"><g
1574 id="id72"><rect 1574 id="id72"><rect
1575 class="BoundingBox" 1575 class="BoundingBox"
1576 x="14799" 1576 x="14799"
1577 y="9450" 1577 y="9450"
1578 width="1202" 1578 width="1202"
1579 height="301" 1579 height="301"
1580 id="rect945" 1580 id="rect945"
1581 style="fill:none;stroke:none" /><path 1581 style="fill:none;stroke:none" /><path
1582 d="m 14800,9600 770,0" 1582 d="m 14800,9600 770,0"
1583 id="path947" 1583 id="path947"
1584 inkscape:connector-curvature="0" 1584 inkscape:connector-curvature="0"
1585 style="fill:none;stroke:#ff3333" /><path 1585 style="fill:none;stroke:#ff3333" /><path
1586 d="m 16000,9600 -450,-150 0,300 450,-150 z" 1586 d="m 16000,9600 -450,-150 0,300 450,-150 z"
1587 id="path949" 1587 id="path949"
1588 inkscape:connector-curvature="0" 1588 inkscape:connector-curvature="0"
1589 style="fill:#ff3333;stroke:none" /></g></g></svg> 1589 style="fill:#ff3333;stroke:none" /></g></g></svg>
diff --git a/Documentation/media/uapi/v4l/selection.svg b/Documentation/media/uapi/v4l/selection.svg
index d309187af967..a93e3b59786d 100644
--- a/Documentation/media/uapi/v4l/selection.svg
+++ b/Documentation/media/uapi/v4l/selection.svg
@@ -1,5812 +1,1151 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 1<?xml version="1.0" encoding="UTF-8"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) --> 2<svg enable-background="new" version="1" viewBox="0 0 4226.3 1686.8" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3 3 <defs>
4<svg 4 <pattern id="ig" xlink:href="#ka" patternTransform="matrix(5.4432 0 0 10.1 1722.4 161.06)"/>
5 xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" 5 <marker id="er" overflow="visible" orient="auto">
6 xmlns:dc="http://purl.org/dc/elements/1.1/" 6 <path d="m-1.2 0l-1 1 3.5-1-3.5-1 1 1z" fill="#f8d615" fill-rule="evenodd" stroke="#f8d615" stroke-width=".2pt"/>
7 xmlns:cc="http://creativecommons.org/ns#" 7 </marker>
8 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 8 <pattern id="ka" width="2" height="1" patternTransform="scale(10)" patternUnits="userSpaceOnUse">
9 xmlns:svg="http://www.w3.org/2000/svg" 9 <path d="M0-.5h1v2H0z" fill="#f815bb"/>
10 xmlns="http://www.w3.org/2000/svg" 10 </pattern>
11 xmlns:xlink="http://www.w3.org/1999/xlink" 11 <filter id="ep" x="-.085" y="-.366" width="1.169" height="1.732">
12 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" 12 <feGaussianBlur stdDeviation="4.574"/>
13 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" 13 </filter>
14 width="4226.3345" 14 <linearGradient id="n">
15 height="1686.8481" 15 <stop stop-color="#fff" offset="0"/>
16 id="svg2" 16 <stop stop-color="#fff" stop-opacity="0" offset="1"/>
17 sodipodi:version="0.32" 17 </linearGradient>
18 inkscape:version="0.91 r13725" 18 <linearGradient id="j">
19 sodipodi:docname="selection.svg" 19 <stop stop-color="#f9eed3" offset="0"/>
20 inkscape:output_extension="org.inkscape.output.svg.inkscape" 20 <stop stop-opacity="0" offset="1"/>
21 version="1.0" 21 </linearGradient>
22 style="display:inline;enable-background:new" 22 <linearGradient id="s">
23 inkscape:export-filename="/home/cheeseness/Documents/LCA09/mascot/tuz_final.png" 23 <stop stop-color="#283131" stop-opacity="0" offset="0"/>
24 inkscape:export-xdpi="100.03588" 24 <stop stop-color="#1e2424" offset=".5"/>
25 inkscape:export-ydpi="100.03588"> 25 <stop offset="1"/>
26 <sodipodi:namedview 26 </linearGradient>
27 id="base" 27 <linearGradient id="u">
28 pagecolor="#ffffff" 28 <stop stop-color="#cfc690" offset="0"/>
29 bordercolor="#666666" 29 <stop stop-color="#afa775" offset=".212"/>
30 borderopacity="1.0" 30 <stop stop-color="#615c3a" offset=".534"/>
31 gridtolerance="10000" 31 <stop offset=".765"/>
32 guidetolerance="10" 32 <stop stop-color="#403518" offset="1"/>
33 objecttolerance="10" 33 </linearGradient>
34 inkscape:pageopacity="0.0" 34 <radialGradient id="jd" cx="418.3" cy="342.48" r="131.45" gradientTransform="matrix(1.3957 .62111 -.42441 .95372 -15.062 -227.97)" gradientUnits="userSpaceOnUse">
35 inkscape:pageshadow="2" 35 <stop stop-color="#283131" offset="0"/>
36 inkscape:zoom="0.32297491" 36 <stop stop-color="#1e2424" offset=".5"/>
37 inkscape:cx="2113.1672" 37 <stop offset="1"/>
38 inkscape:cy="843.42407" 38 </radialGradient>
39 inkscape:document-units="px" 39 <filter id="iz" x="-.3" y="-.3" width="1.6" height="1.6">
40 inkscape:current-layer="layer16" 40 <feGaussianBlur stdDeviation="2"/>
41 showgrid="false" 41 </filter>
42 inkscape:window-width="1920" 42 <clipPath id="ea">
43 inkscape:window-height="997" 43 <path d="M179.64 267.36c-22.41 39.703-60.616 115.78-69.286 149.64-8.647 33.775-8.772 66.417-.357 86.429 8.36 19.882 26.164 35.633 40.714 41.429-.597-14.376 14.373-43.286 72.857-72.5 58.626-29.285 78.382-27.131 103.57-47.143 25.63-20.362 12.61-67.045 3.214-93.929-9.434-26.993-34.967-59.124-66.429-69.643-31.033-10.375-65.018-4.848-84.286 5.714z" fill="#f5ff04" fill-rule="evenodd"/>
44 inkscape:window-x="1920" 44 </clipPath>
45 inkscape:window-y="30" 45 <radialGradient id="iy" cx="275.44" cy="335.35" r="36.75" gradientTransform="matrix(.05911 2.687 -.72343 .01591 408.73 -424.56)" gradientUnits="userSpaceOnUse">
46 showguides="false" 46 <stop stop-color="#fff" offset="0"/>
47 inkscape:guide-bbox="true" 47 <stop stop-color="#fff" stop-opacity="0" offset="1"/>
48 units="mm" 48 </radialGradient>
49 inkscape:window-maximized="1" 49 <clipPath id="kb">
50 fit-margin-top="0" 50 <path d="m265.94 126.68l-18.767 168.86 174.11-73.121 61.954 88.659 57.884-31.99-37.534-180.06-237.64 27.649z" fill-rule="evenodd" stroke="#000" stroke-width=".9"/>
51 fit-margin-left="0" 51 </clipPath>
52 fit-margin-right="0" 52 <clipPath id="jz">
53 fit-margin-bottom="0" /> 53 <path d="M352.25 211.99c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.027 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#262f2f" fill-rule="evenodd" stroke="#000"/>
54 <defs 54 </clipPath>
55 id="defs4"> 55 <clipPath id="kd">
56 <pattern 56 <path d="M352.25 211.99c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.027 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#262f2f" fill-rule="evenodd" stroke="#000"/>
57 inkscape:collect="always" 57 </clipPath>
58 xlink:href="#Strips1_1" 58 <clipPath id="jx">
59 id="pattern5557" 59 <path d="M352.25 211.99c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.027 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#262f2f" fill-rule="evenodd" stroke="#000"/>
60 patternTransform="matrix(5.4431804,0,0,10.10048,1808.3554,-48.222348)" /> 60 </clipPath>
61 <marker 61 <clipPath id="en">
62 inkscape:stockid="Arrow1Send" 62 <path d="M352.25 211.99c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.027 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#262f2f" fill-rule="evenodd" stroke="#000"/>
63 orient="auto" 63 </clipPath>
64 refY="0" 64 <clipPath id="jw">
65 refX="0" 65 <path d="M821.64 477.89s22.619-6.507 35.743-5.873c13.123.634 30.642 1.939 43.709 12.186 13.067 10.248 25.068 27.14 34.112 58.37s1.698 99.252-6.176 143.35-28.265 106.11-45 140-49.798 77.495-60.569 89.876c-11.364 13.062-56.206 36.426-79.431 42.267 5.303-10.607 48.9-50.589 35-60.714-14.019-10.212-45.76 45.982-84.293 29.033 21.382-13.132 41.779-51.186 34.041-66.594-7.84-15.61-30.705 48.758-93.536 37.013 30.052-27.527 55.407-70.904 41.263-82.98-14.415-12.307-60.462 54.293-60.462 54.293s-2.822-41.7 13.773-68.607c16.639-26.978 79.653-81.615 99.553-111.7 19.9-30.088 33.613-66.009 42.135-92.518s15.801-77.1 15.801-77.1" enable-background="new" fill="#202020" fill-rule="evenodd" stroke="#000"/>
66 id="Arrow1Send" 66 </clipPath>
67 style="overflow:visible" 67 <clipPath id="kp">
68 inkscape:isstock="true"> 68 <path d="m366.89 504.13s-29.554 40.573-47.857 74.286-58.621 126.36-70.357 171.07c-11.759 44.803-62.5 123.57-62.5 123.57l76.071 18.214s11.807-12.823 31.071-46.071 60.357-138.57 60.357-138.57l13.214-202.5z" enable-background="accumulate" fill="#0f0f0f" fill-rule="evenodd" stroke="#000"/>
69 <path 69 </clipPath>
70 id="path7188" 70 <clipPath id="eo">
71 d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z" 71 <path d="M569.03 1018.8c-4.286.714-27.628 3.618-57.857 10s-99.775 25.962-142.86 35.714-117.26 34.816-156.91 27.265c-39.648-7.55-89.516-64.408-89.516-64.408l4.286-94.286s85.886-16.201 112.14-33.571c26.257-17.37 45.582-49.666 59.286-71.429s32.857-71.429 32.857-71.429l238.57 262.14z" enable-background="accumulate" fill="#0b0b0b" fill-rule="evenodd" stroke="#000"/>
72 style="fill:#f8d615;fill-opacity:1;fill-rule:evenodd;stroke:#f8d615;stroke-width:1pt;stroke-opacity:1" 72 </clipPath>
73 transform="matrix(-0.2,0,0,-0.2,-1.2,0)" 73 <filter id="kc" x="-.353" y="-.182" width="1.706" height="1.363">
74 inkscape:connector-curvature="0" /> 74 <feGaussianBlur stdDeviation="48.038"/>
75 </marker> 75 </filter>
76 <pattern 76 <filter id="jb" x="-.611" y="-.149" width="2.223" height="1.299">
77 inkscape:isstock="true" 77 <feGaussianBlur stdDeviation="37.83"/>
78 inkscape:stockid="Stripes 1:1" 78 </filter>
79 id="Strips1_1" 79 <filter id="eg" x="-.235" y="-.245" width="1.47" height="1.49">
80 patternTransform="translate(0,0) scale(10,10)" 80 <feGaussianBlur stdDeviation="58.328"/>
81 height="1" 81 </filter>
82 width="2" 82 <filter id="jy" x="-.205" y="-.29" width="1.409" height="1.58">
83 patternUnits="userSpaceOnUse" 83 <feGaussianBlur stdDeviation="22.3"/>
84 inkscape:collect="always"> 84 </filter>
85 <rect 85 <filter id="jv" x="-.344" y="-.184" width="1.688" height="1.369">
86 id="rect5945" 86 <feGaussianBlur stdDeviation="34.542"/>
87 height="2" 87 </filter>
88 width="1" 88 <filter id="kf" x="-.274" y="-.213" width="1.549" height="1.427">
89 y="-0.5" 89 <feGaussianBlur stdDeviation="11.314"/>
90 x="0" 90 </filter>
91 style="fill:#f815bb;stroke:none" /> 91 <filter id="ja" x="-.259" y="-.224" width="1.518" height="1.447">
92 </pattern> 92 <feGaussianBlur stdDeviation="19.632"/>
93 <linearGradient 93 </filter>
94 id="linearGradient10954" 94 <filter id="kq" x="-.325" y="-.19" width="1.651" height="1.38">
95 osb:paint="solid"> 95 <feGaussianBlur stdDeviation="28.713"/>
96 <stop 96 </filter>
97 style="stop-color:#d9f90b;stop-opacity:1;" 97 <filter id="ko" x="-.381" y="-.175" width="1.762" height="1.35">
98 offset="0" 98 <feGaussianBlur stdDeviation="19.304"/>
99 id="stop10956" /> 99 </filter>
100 </linearGradient> 100 <filter id="kv" x="-.211" y="-.168" width="1.422" height="1.336">
101 <linearGradient 101 <feGaussianBlur stdDeviation="8.369"/>
102 id="linearGradient9165" 102 </filter>
103 osb:paint="solid"> 103 <filter id="ks" x="-.187" y="-.236" width="1.374" height="1.473">
104 <stop 104 <feGaussianBlur stdDeviation="31.212"/>
105 style="stop-color:#000000;stop-opacity:0.31330472;" 105 </filter>
106 offset="0" 106 <clipPath id="ju">
107 id="stop9167" /> 107 <path d="M352.25 211.99c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.027 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#262f2f" fill-rule="evenodd" stroke="#000"/>
108 </linearGradient> 108 </clipPath>
109 <filter 109 <filter id="ki" x="-.252" y="-.053" width="1.503" height="1.106">
110 inkscape:collect="always" 110 <feGaussianBlur stdDeviation="13.025"/>
111 x="-0.084654994" 111 </filter>
112 width="1.16931" 112 <linearGradient id="t" x1="603.84" x2="616.24" y1="627.85" y2="585.43" gradientTransform="translate(450.03 73.844)" gradientUnits="userSpaceOnUse">
113 y="-0.36592469" 113 <stop stop-color="#1a1a1a" offset="0"/>
114 height="1.7318494" 114 <stop stop-color="#1a1a1a" stop-opacity="0" offset="1"/>
115 id="filter11361"> 115 </linearGradient>
116 <feGaussianBlur 116 <filter id="dq" x="-.329" y="-.182" width="1.657" height="1.364">
117 inkscape:collect="always" 117 <feGaussianBlur stdDeviation="20.913"/>
118 stdDeviation="4.5740586" 118 </filter>
119 id="feGaussianBlur11363" /> 119 <filter id="dr" x="-.555" y="-.514" width="2.109" height="2.029">
120 </filter> 120 <feGaussianBlur stdDeviation="20.913"/>
121 <linearGradient 121 </filter>
122 id="linearGradient7622"> 122 <filter id="cy" x="-.326" y="-.845" width="1.653" height="2.691">
123 <stop 123 <feGaussianBlur stdDeviation="21.92"/>
124 style="stop-color:#ffffff;stop-opacity:1;" 124 </filter>
125 offset="0" 125 <filter id="he" x="-.409" y="-.715" width="1.818" height="2.431">
126 id="stop7624" /> 126 <feGaussianBlur stdDeviation="21.92"/>
127 <stop 127 </filter>
128 style="stop-color:#ffffff;stop-opacity:0;" 128 <filter id="o">
129 offset="1" 129 <feGaussianBlur stdDeviation="8.881"/>
130 id="stop7626" /> 130 </filter>
131 </linearGradient> 131 <clipPath id="jt">
132 <linearGradient 132 <path d="M647.61 540.05s22.619-6.507 35.743-5.873c13.123.634 30.642 1.939 43.709 12.186 13.067 10.248 25.068 27.14 34.112 58.37s1.698 99.252-6.176 143.35-28.265 106.11-45 140-49.798 77.495-60.569 89.876c-11.364 13.062-56.206 36.426-79.431 42.267 5.303-10.607 48.9-50.589 35-60.714-14.019-10.212-45.76 45.982-84.293 29.033 21.382-13.132 41.779-51.186 34.041-66.594-7.84-15.61-30.705 48.758-93.536 37.013 30.052-27.527 55.407-70.904 41.263-82.98-14.415-12.307-60.462 54.293-60.462 54.293s-2.822-41.7 13.773-68.607c16.639-26.978 79.653-81.615 99.553-111.7 19.9-30.088 33.613-66.009 42.135-92.518s15.801-77.1 15.801-77.1" enable-background="new" fill="#202020" fill-rule="evenodd"/>
133 id="linearGradient4113"> 133 </clipPath>
134 <stop 134 <filter id="je" x="-.277" y="-.325" width="1.554" height="1.65">
135 style="stop-color:#000000;stop-opacity:0;" 135 <feGaussianBlur stdDeviation="19.956"/>
136 offset="0" 136 </filter>
137 id="stop4115" /> 137 <clipPath id="e">
138 <stop 138 <path d="M760.16 935.83c6.794 18.903 10.494 33.3 11.89 51.212 1.397 17.912-3.783 51.801-2.9 70.656.881 18.845 8.133 40.099 27.345 48.969 19.419 8.966 49.319 10.211 74.12-3.146 24.8-13.357 57.4-70.326 70.974-97.309 13.624-27.084 38.76-114.5 44.66-149.77 5.9-35.27 2.551-41.3-4.617-49.055 2.64-27.84-1.5-54.935 13.11-87.186-30.249 11.826-37.382 40.161-48.319 65.505-8-50.933.21-71.273 3.319-101.22-29.065 14.778-42.862 47.114-45 92.857-10.924-1.304-21.391-4.434-33.571-.714-.264-46.023-1.464-76.889 8.91-114.21-53.254 21.027-62.946 106.59-56.052 112.78-10.883.535-21.371-1.297-32.857 2.857.638-42.57-.261-84.909-30-122.86 0 0-30.958 80.922-31.43 103.57s9.452 40.166 9.452 40.166-8.568 36.741-6.298 58.232c2.295 21.741 20.443 59.676 27.265 78.658z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
139 style="stop-color:#000000;stop-opacity:1;" 139 </clipPath>
140 offset="1" 140 <clipPath id="kr">
141 id="stop4117" /> 141 <path d="m366.89 504.13s-29.554 40.573-47.857 74.286-58.621 126.36-70.357 171.07c-11.759 44.803-62.5 123.57-62.5 123.57l76.071 18.214s11.807-12.823 31.071-46.071 60.357-138.57 60.357-138.57l13.214-202.5z" enable-background="accumulate" fill="#0f0f0f" fill-rule="evenodd"/>
142 </linearGradient> 142 </clipPath>
143 <linearGradient 143 <clipPath id="am">
144 inkscape:collect="always" 144 <path d="M586.13 997.99c6.794 18.903 10.494 33.3 11.89 51.212 1.397 17.912-3.783 51.801-2.9 70.656.881 18.845 8.133 40.099 27.345 48.969 19.419 8.966 49.319 10.211 74.12-3.146 24.8-13.357 57.4-70.326 70.974-97.309 13.624-27.084 38.76-114.5 44.66-149.77 5.9-35.27 2.551-41.3-4.617-49.055 2.64-27.84-1.5-54.935 13.11-87.186-30.249 11.826-37.382 40.161-48.319 65.505-8-50.933.21-71.273 3.319-101.22-29.065 14.778-42.862 47.114-45 92.857-10.924-1.304-21.391-4.434-33.571-.714-.264-46.023-1.464-76.889 8.91-114.21-53.254 21.027-62.946 106.59-56.052 112.78-10.883.535-21.371-1.297-32.857 2.857.638-42.57-.261-84.909-30-122.86 0 0-30.958 80.922-31.43 103.57s9.452 40.166 9.452 40.166-8.568 36.741-6.298 58.232c2.295 21.741 20.443 59.676 27.265 78.658z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
145 id="linearGradient3660"> 145 </clipPath>
146 <stop 146 <filter id="ds">
147 style="stop-color:#ffffff;stop-opacity:1;" 147 <feGaussianBlur stdDeviation="10.893"/>
148 offset="0" 148 </filter>
149 id="stop3662" /> 149 <filter id="bz" x="-.495" y="-.267" width="1.99" height="1.534">
150 <stop 150 <feGaussianBlur stdDeviation="10.731"/>
151 style="stop-color:#ffffff;stop-opacity:0;" 151 </filter>
152 offset="1" 152 <filter id="by" x="-.406" y="-.303" width="1.812" height="1.605">
153 id="stop3664" /> 153 <feGaussianBlur stdDeviation="9.859"/>
154 </linearGradient> 154 </filter>
155 <linearGradient 155 <clipPath id="cj">
156 id="linearGradient3627"> 156 <path d="M586.13 997.99c6.794 18.903 10.494 33.3 11.89 51.212 1.397 17.912-3.783 51.801-2.9 70.656.881 18.845 8.133 40.099 27.345 48.969 19.419 8.966 49.319 10.211 74.12-3.146 24.8-13.357 57.4-70.326 70.974-97.309 13.624-27.084 38.76-114.5 44.66-149.77 5.9-35.27 2.551-41.3-4.617-49.055 2.64-27.84-1.5-54.935 13.11-87.186-30.249 11.826-37.382 40.161-48.319 65.505-8-50.933.21-71.273 3.319-101.22-29.065 14.778-42.862 47.114-45 92.857-10.924-1.304-21.391-4.434-33.571-.714-.264-46.023-1.464-76.889 8.91-114.21-53.254 21.027-62.946 106.59-56.052 112.78-10.883.535-21.371-1.297-32.857 2.857.638-42.57-.261-84.909-30-122.86 0 0-30.958 80.922-31.43 103.57s9.452 40.166 9.452 40.166-8.568 36.741-6.298 58.232c2.295 21.741 20.443 59.676 27.265 78.658z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
157 <stop 157 </clipPath>
158 style="stop-color:#ffffff;stop-opacity:1;" 158 <filter id="il">
159 offset="0" 159 <feGaussianBlur stdDeviation="3.616"/>
160 id="stop3629" /> 160 </filter>
161 <stop 161 <filter id="ir">
162 style="stop-color:#000000;stop-opacity:1;" 162 <feGaussianBlur stdDeviation="3.864"/>
163 offset="1" 163 </filter>
164 id="stop3631" /> 164 <clipPath id="ku">
165 </linearGradient> 165 <path d="M569.03 1018.8c-4.286.714-27.628 3.618-57.857 10s-57.314 4.966-135.79 17.33c-79.852 12.581-94.064 42.542-108.12 47.064-14.7 4.729-145.38-65.822-145.38-65.822l4.286-94.286s85.886-16.201 112.14-33.571c26.257-17.37 45.582-49.666 59.286-71.429s32.857-71.429 32.857-71.429l238.57 262.14z" enable-background="accumulate" fill="#292929" fill-rule="evenodd" stroke="#000"/>
166 <linearGradient 166 </clipPath>
167 id="linearGradient2843"> 167 <linearGradient id="dt" x1="699.33" x2="698.98" y1="269.77" y2="346.14" gradientUnits="userSpaceOnUse">
168 <stop 168 <stop stop-color="#fff" offset="0"/>
169 id="stop2845" 169 <stop offset="1"/>
170 offset="0" 170 </linearGradient>
171 style="stop-color:#000000;stop-opacity:1;" /> 171 <mask id="jc" maskUnits="userSpaceOnUse">
172 <stop 172 <ellipse transform="translate(-174.03 62.156)" cx="579.47" cy="260.58" rx="192.69" ry="164.05" enable-background="accumulate" fill="url(#dt)"/>
173 style="stop-color:#000000;stop-opacity:1;" 173 </mask>
174 offset="0.02188784" 174 <clipPath id="is">
175 id="stop2847" /> 175 <path d="m266.27 924.57c-1.407 18.801-1.145 32.751 2.082 49.303s16.406 45.907 20.334 63.184c3.926 17.267 2.694 38.31-12.46 51.148-15.317 12.977-42.05 21.599-67.831 15.734s-69.55-49.223-88.59-70.228c-19.112-21.083-63.761-93.851-77.94-124.28-14.177-30.425-12.66-36.719-8.119-45.53-9.367-24.52-12.414-50.067-33.712-75.577 30.325 3.114 43.88 26.956 60.126 47.14-5.53-48.076-18.055-64.416-28.374-90.724 29.994 6.082 50.579 31.872 63.98 72.712 9.554-3.918 18.238-9.373 30.187-9.061-11.298-41.696-17.949-69.916-36.687-101.07 53.442 5.67 83.657 80.639 78.971 87.96 9.978-2.243 19.006-6.53 30.437-5.65-11.249-38.348-21.048-76.869-3.66-118.65 0 0 48.287 65.436 54.39 85.805 6.103 20.37 1.52 38.701 1.52 38.701s16.96 31.085 20.293 51.094c3.373 20.241-3.533 59.103-4.946 77.983z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
176 <stop 176 </clipPath>
177 style="stop-color:#000000;stop-opacity:1;" 177 <clipPath id="im">
178 offset="0.75866222" 178 <path d="M760.16 935.83c6.794 18.903 10.494 33.3 11.89 51.212 1.397 17.912-3.783 51.801-2.9 70.656.881 18.845 8.133 40.099 27.345 48.969 19.419 8.966 49.319 10.211 74.12-3.146 24.8-13.357 57.4-70.326 70.974-97.309 13.624-27.084 38.76-114.5 44.66-149.77 5.9-35.27 2.551-41.3-4.617-49.055 2.64-27.84-1.5-54.935 13.11-87.186-30.249 11.826-37.382 40.161-48.319 65.505-8-50.933.21-71.273 3.319-101.22-29.065 14.778-42.862 47.114-45 92.857-10.924-1.304-21.391-4.434-33.571-.714-.264-46.023-1.464-76.889 8.91-114.21-53.254 21.027-62.946 106.59-56.052 112.78-10.883.535-21.371-1.297-32.857 2.857.638-42.57-.261-84.909-30-122.86 0 0-30.958 80.922-31.43 103.57s9.452 40.166 9.452 40.166-8.568 36.741-6.298 58.232c2.295 21.741 20.443 59.676 27.265 78.658z" enable-background="new" fill="#ada469" fill-rule="evenodd" stroke="#000"/>
179 id="stop2849" /> 179 </clipPath>
180 <stop 180 <filter id="jq" x="-.088" y="-.177" width="1.176" height="1.355">
181 id="stop2851" 181 <feGaussianBlur stdDeviation="16.34"/>
182 offset="0.88508981" 182 </filter>
183 style="stop-color:#232323;stop-opacity:1;" /> 183 <filter id="i">
184 <stop 184 <feTurbulence baseFrequency=".24" numOctaves="10" result="result0" seed="655" type="fractalNoise"/>
185 id="stop2853" 185 <feDisplacementMap in="SourceGraphic" in2="result0" scale="62" xChannelSelector="B" yChannelSelector="G"/>
186 offset="1" 186 </filter>
187 style="stop-color:#595959;stop-opacity:1;" /> 187 <filter id="em">
188 </linearGradient> 188 <feGaussianBlur stdDeviation="2.04"/>
189 <linearGradient 189 </filter>
190 inkscape:collect="always" 190 <clipPath id="jo">
191 id="linearGradient8964"> 191 <path d="m709.29 844.51c54.286-1.429 126.04-15.052 170-26.786 44.053-11.757 125.89-36.347 175.36-57.857 49.339-21.453 113.6-59.282 154.29-92.143 40.508-32.721 52.39-55.82 60.714-33.571 8.37 22.368-16.407 56.326-37.857 81.071-21.604 24.923-52.731 52.705-98.929 89.286s-156.08 101.58-212.86 128.57c-57.066 27.125-128.2 58.238-172.14 72.5s-131.43 31.071-131.43 31.071l92.857-192.14z" enable-background="accumulate" fill="#121212" fill-rule="evenodd"/>
192 <stop 192 </clipPath>
193 style="stop-color:#1a1a1a;stop-opacity:1;" 193 <clipPath id="jp">
194 offset="0" 194 <path d="m709.29 844.51c54.286-1.429 126.04-15.052 170-26.786 44.053-11.757 125.89-36.347 175.36-57.857 49.339-21.453 113.6-59.282 154.29-92.143 40.508-32.721 52.39-55.82 60.714-33.571 8.37 22.368-16.407 56.326-37.857 81.071-21.604 24.923-52.731 52.705-98.929 89.286s-156.08 101.58-212.86 128.57c-57.066 27.125-128.2 58.238-172.14 72.5s-131.43 31.071-131.43 31.071l92.857-192.14z" enable-background="accumulate" fill="#121212" fill-rule="evenodd"/>
195 id="stop8966" /> 195 </clipPath>
196 <stop 196 <clipPath id="js">
197 style="stop-color:#1a1a1a;stop-opacity:0;" 197 <path d="m709.29 844.51c54.286-1.429 126.04-15.052 170-26.786 44.053-11.757 125.89-36.347 175.36-57.857 49.339-21.453 113.6-59.282 154.29-92.143 40.508-32.721 52.39-55.82 60.714-33.571 8.37 22.368-16.407 56.326-37.857 81.071-21.604 24.923-52.731 52.705-98.929 89.286s-156.08 101.58-212.86 128.57c-57.066 27.125-128.2 58.238-172.14 72.5s-131.43 31.071-131.43 31.071l92.857-192.14z" enable-background="accumulate" fill="#121212" fill-rule="evenodd"/>
198 offset="1" 198 </clipPath>
199 id="stop8968" /> 199 <clipPath id="ke">
200 </linearGradient> 200 <path d="M178.21 274.15c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.027 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#262f2f" fill-rule="evenodd"/>
201 <linearGradient 201 </clipPath>
202 id="linearGradient8952"> 202 <filter id="iv" x="-.243" y="-.391" width="1.487" height="1.782">
203 <stop 203 <feGaussianBlur stdDeviation="14.59"/>
204 style="stop-color:#0a0c0c;stop-opacity:1;" 204 </filter>
205 offset="0" 205 <filter id="iu" x="-.146" y="-.235" width="1.292" height="1.47">
206 id="stop8954" /> 206 <feGaussianBlur stdDeviation="4.444"/>
207 <stop 207 </filter>
208 style="stop-color:#1f2727;stop-opacity:0;" 208 <filter id="it">
209 offset="1" 209 <feGaussianBlur stdDeviation=".606"/>
210 id="stop8956" /> 210 </filter>
211 </linearGradient> 211 <filter id="ix">
212 <linearGradient 212 <feGaussianBlur stdDeviation="6.589"/>
213 id="linearGradient8430"> 213 </filter>
214 <stop 214 <filter id="iw">
215 style="stop-color:#1e2323;stop-opacity:1;" 215 <feGaussianBlur stdDeviation="1.505"/>
216 offset="0" 216 </filter>
217 id="stop8432" /> 217 <filter id="jj" x="-.103" y="-.342" width="1.206" height="1.685">
218 <stop 218 <feGaussianBlur stdDeviation="1.168"/>
219 id="stop8438" 219 </filter>
220 offset="0.55992389" 220 <filter id="jf" x="-.098" y="-.198" width="1.197" height="1.395">
221 style="stop-color:#181d1d;stop-opacity:1;" /> 221 <feGaussianBlur stdDeviation="1.168"/>
222 <stop 222 </filter>
223 style="stop-color:#000000;stop-opacity:1;" 223 <filter id="jh" x="-.098" y="-.198" width="1.196" height="1.397">
224 offset="1" 224 <feGaussianBlur stdDeviation="1.168"/>
225 id="stop8434" /> 225 </filter>
226 </linearGradient> 226 <filter id="ji" x="-.099" y="-.226" width="1.198" height="1.453">
227 <linearGradient 227 <feGaussianBlur stdDeviation="1.168"/>
228 id="linearGradient8398"> 228 </filter>
229 <stop 229 <filter id="hy" x="-.099" y="-.225" width="1.198" height="1.451">
230 style="stop-color:#283131;stop-opacity:0;" 230 <feGaussianBlur stdDeviation="1.168"/>
231 offset="0" 231 </filter>
232 id="stop8400" /> 232 <filter id="hu" x="-.105" y="-.405" width="1.209" height="1.809">
233 <stop 233 <feGaussianBlur stdDeviation="1.168"/>
234 id="stop8402" 234 </filter>
235 offset="0.5125587" 235 <filter id="hv" x="-.103" y="-.364" width="1.207" height="1.729">
236 style="stop-color:#1e2424;stop-opacity:0;" /> 236 <feGaussianBlur stdDeviation="1.168"/>
237 <stop 237 </filter>
238 style="stop-color:#000000;stop-opacity:1;" 238 <filter id="hw" x="-.102" y="-.324" width="1.204" height="1.647">
239 offset="1" 239 <feGaussianBlur stdDeviation="1.168"/>
240 id="stop8404" /> 240 </filter>
241 </linearGradient> 241 <filter id="hx" x="-.101" y="-.274" width="1.201" height="1.548">
242 <linearGradient 242 <feGaussianBlur stdDeviation="1.168"/>
243 inkscape:collect="always" 243 </filter>
244 id="linearGradient4870"> 244 <filter id="hz" x="-.098" y="-.209" width="1.197" height="1.417">
245 <stop 245 <feGaussianBlur stdDeviation="1.168"/>
246 style="stop-color:#c7bd80;stop-opacity:1;" 246 </filter>
247 offset="0" 247 <filter id="ia" x="-.098" y="-.203" width="1.197" height="1.406">
248 id="stop4872" /> 248 <feGaussianBlur stdDeviation="1.168"/>
249 <stop 249 </filter>
250 style="stop-color:#c7bd80;stop-opacity:0;" 250 <filter id="ib" x="-.098" y="-.198" width="1.196" height="1.397">
251 offset="1" 251 <feGaussianBlur stdDeviation="1.168"/>
252 id="stop4874" /> 252 </filter>
253 </linearGradient> 253 <filter id="jg">
254 <linearGradient 254 <feGaussianBlur stdDeviation="1.168"/>
255 inkscape:collect="always" 255 </filter>
256 id="linearGradient4862"> 256 <filter id="jk">
257 <stop 257 <feGaussianBlur stdDeviation="1.168"/>
258 style="stop-color:#e2e2e2;stop-opacity:1;" 258 </filter>
259 offset="0" 259 <filter id="hr" x="-.031" y="-.103" width="1.062" height="1.205">
260 id="stop4864" /> 260 <feGaussianBlur stdDeviation=".35"/>
261 <stop 261 </filter>
262 style="stop-color:#e2e2e2;stop-opacity:0;" 262 <filter id="hq">
263 offset="1" 263 <feGaussianBlur stdDeviation=".35"/>
264 id="stop4866" /> 264 </filter>
265 </linearGradient> 265 <filter id="hp">
266 <linearGradient 266 <feGaussianBlur stdDeviation=".35"/>
267 id="linearGradient4478"> 267 </filter>
268 <stop 268 <filter id="hn">
269 style="stop-color:#f9eed3;stop-opacity:1;" 269 <feGaussianBlur stdDeviation=".35"/>
270 offset="0" 270 </filter>
271 id="stop4480" /> 271 <filter id="hm">
272 <stop 272 <feGaussianBlur stdDeviation=".35"/>
273 style="stop-color:#000000;stop-opacity:0;" 273 </filter>
274 offset="1" 274 <filter id="hl">
275 id="stop4482" /> 275 <feGaussianBlur stdDeviation=".35"/>
276 </linearGradient> 276 </filter>
277 <linearGradient 277 <filter id="hk">
278 id="linearGradient4106"> 278 <feGaussianBlur stdDeviation=".35"/>
279 <stop 279 </filter>
280 style="stop-color:#d9e002;stop-opacity:1;" 280 <filter id="hj">
281 offset="0" 281 <feGaussianBlur stdDeviation=".35"/>
282 id="stop4108" /> 282 </filter>
283 <stop 283 <filter id="hi">
284 id="stop4114" 284 <feGaussianBlur stdDeviation=".35"/>
285 offset="0.5" 285 </filter>
286 style="stop-color:#a9ae01;stop-opacity:1;" /> 286 <filter id="hh">
287 <stop 287 <feGaussianBlur stdDeviation=".35"/>
288 style="stop-color:#717501;stop-opacity:1;" 288 </filter>
289 offset="1" 289 <filter id="hf" x="-.031" y="-.121" width="1.063" height="1.243">
290 id="stop4110" /> 290 <feGaussianBlur stdDeviation=".35"/>
291 </linearGradient> 291 </filter>
292 <linearGradient 292 <filter id="hg" x="-.031" y="-.109" width="1.062" height="1.219">
293 id="linearGradient4084"> 293 <feGaussianBlur stdDeviation=".35"/>
294 <stop 294 </filter>
295 style="stop-color:#7d7d00;stop-opacity:1;" 295 <filter id="hs">
296 offset="0" 296 <feGaussianBlur stdDeviation=".35"/>
297 id="stop4086" /> 297 </filter>
298 <stop 298 <filter id="ho">
299 id="stop4088" 299 <feGaussianBlur stdDeviation=".35"/>
300 offset="0.3636601" 300 </filter>
301 style="stop-color:#c6c700;stop-opacity:1;" /> 301 <filter id="ht">
302 <stop 302 <feGaussianBlur stdDeviation="1.723"/>
303 style="stop-color:#f6f800;stop-opacity:1;" 303 </filter>
304 offset="1" 304 <clipPath id="jl">
305 id="stop4090" /> 305 <path transform="translate(.08 -.031)" d="M1111.4-285.94l-3.937 1.875c-.041.01-.1.02-.125.031-.42.213-.165.1-.657.313-.486.21-1.737.584-4.093 1.469-3.332 1.25-5.805 2.15-7 3.062-1.537.021-3.72.233-5.657.719a227.677 227.677 0 0 1-6.75 1.594c-1.895.42-1.675.642-2.875.875-1.296.251-1.721-.01-5.437.78-3.49.743-8.895 1.932-10.156 2.688-1.584-.18-3.868-.321-5.844-.03-3.04.446-4.916.672-6.844.905-.655.08-1.04.201-1.344.282-.426.131-.685.26-1.375.343-1.311.16-1.762-.156-5.53.282-3.555.413-9.006 1.272-10.25 1.937-1.6-.297-3.859-.534-5.845-.344-3.058.294-4.972.484-6.906.657-1.934.172-1.688.422-2.906.53-1.316.119-1.76-.163-5.531.25-3.542.39-9.008 1.21-10.281 1.876-1.6-.295-3.887-.507-5.875-.313-3.059.3-4.941.48-6.875.657-.658.06-1.04.178-1.344.25-.428.119-.683.218-1.375.28-1.316.121-1.76-.194-5.531.22-3.556.39-9.006 1.239-10.25
306 </linearGradient> 3061.906-1.599-.294-3.86-.524-5.844-.313-3.056.326-4.974.527-6.906.719s-1.69.44-2.906.563c-1.315.131-1.763-.165-5.532.28-3.539.42-8.977 1.293-10.25 1.97-1.597-.281-3.86-.42-5.843-.188-3.052.358-4.945.568-6.875.781-.657.073-1.041.173-1.344.25-.427.128-.685.268-1.375.344-1.314.146-1.768-.174-5.531.313-3.55.458-8.979 1.419-10.22 2.125-1.593-.245-3.833-.382-5.812-.125-3.048.394-4.95.648-6.875.906-1.924.258-1.726.493-2.937.656-1.31.176-1.748-.104-5.5.469-3.525.538-8.924 1.699-10.188 2.437-1.588-.203-3.846-.254-5.813.094-3.026.536-4.899.862-6.812 1.188-.651.11-1.014.27-1.313.375-.42.164-.663.33-1.344.468-1.294.262-1.727-.006-5.437.813-3.499.772-8.846 2.383-10.062 3.219-1.563-.078-3.758.085-5.688.593-2.972.783-4.817 1.232-6.687 1.75s-1.667.768-2.844 1.094c-1.273.353-1.697.107-5.344 1.188-3.425 1.014-8.65 2.933-9.875 3.843-1.539.013-3.72.273-5.625.875-2.93.928-4.75 1.459-6.594
307 <linearGradient 3072.063-.626.205-.991.393-1.28.531-.408.214-.654.409-1.313.625-1.255.412-1.687.19-5.282 1.438-3.39 1.177-8.595 3.213-9.78 4.156-1.525.06-3.65.395-5.532 1.062-2.897 1.029-4.699 1.676-6.531 2.313-1.832.637-1.628.848-2.781 1.25-1.247.434-1.664.2-5.22 1.562-3.338 1.28-8.486 3.483-9.687 4.47-1.507.107-3.635.498-5.5 1.218a1047.26 1047.26 0 0 1-6.437 2.469c-.617.233-.997.442-1.281.594v.03l-8 3.188 1.812 14.72c-.258-.062 6.188 3.312 6.188 3.312.226-.145.449-.273.718-.375 1.08-.41 2.172-.216 6-1.688 3.829-1.471 5.224-2.005 5.907-2.406.68-.4 1.611-.88 2.218-1.531 1.827-.138 3.571-.493 4.938-1 2.968-1.1 4.875-1.806 6.781-2.469 1.906-.662 2.354-1.415 3.406-1.781 1.092-.38 2.195-.166 6.063-1.531 3.867-1.366 5.283-1.827 5.969-2.22.7-.4 1.7-.932 2.312-1.593 1.97-.055 3.817-.385 5.281-.875 3.002-1.005 4.927-1.622 6.844-2.25 1.539-.504 2.174-1.047 2.906-1.437.23-.135.476-.254.75-.344 1.099-.36 2.182-.082
308 id="linearGradient4041"> 3086.094-1.313 3.912-1.23 5.366-1.673 6.063-2.03.694-.358 1.63-.794 2.25-1.407 1.865-.023 3.635-.267 5.03-.688 3.031-.913 4.993-1.43 6.938-1.968 1.945-.539 2.427-1.265 3.5-1.563 1.114-.31 2.22.007 6.188-1.031 3.967-1.039 5.417-1.433 6.125-1.75.735-.33 1.814-.754 2.437-1.375 1.998.116 3.858-.02 5.344-.375 3.078-.735 5.084-1.101 7.063-1.5 1.588-.32 2.244-.79 3-1.094a3.4 3.4 0 0 1 .75-.25c1.133-.23 2.304.209 6.343-.5 4.04-.709 5.5-.927 6.22-1.187.715-.26 1.704-.568 2.343-1.094 1.924.24 3.748.224 5.188 0 3.126-.488 5.154-.7 7.156-.969 2.001-.268 2.489-.945 3.594-1.094 1.146-.154 2.275.302 6.343-.219 4.068-.52 5.56-.695 6.282-.937.737-.247 1.798-.586 2.437-1.125 2.05.336 3.974.398 5.5.219 3.142-.37 5.18-.56 7.188-.782 1.61-.178 2.264-.608 3.03-.843.242-.086.495-.156.782-.188 1.15-.127 2.301.347 6.375-.125s5.559-.61 6.281-.844c.72-.232 1.7-.473 2.344-.968 1.936.333 3.77.404 5.219.25 3.146-.335
309 <stop 3095.177-.519 7.187-.719 2.01-.2 2.484-.826 3.594-.938 1.151-.115 2.297.366 6.375-.062s5.589-.562 6.313-.781c.739-.224 1.795-.514 2.437-1.031 2.057.398 4.002.493 5.531.343 3.149-.308 5.176-.473 7.188-.656 1.614-.147 2.263-.56 3.031-.781.241-.081.494-.13.781-.156 1.152-.106 2.293.392 6.375 0s5.59-.531 6.313-.75c.72-.219 1.7-.448 2.343-.938 1.939.35 3.77.454 5.22.313 3.148-.309 5.175-.474 7.187-.657 2.011-.183 2.514-.838 3.625-.937 1.152-.103 2.292.385 6.375 0s5.588-.501 6.312-.719c.74-.222 1.796-.514 2.438-1.031 2.057.402 4.003.503 5.531.344 3.147-.329 5.177-.523 7.187-.72 1.613-.156 2.266-.63 3.032-.874.24-.088.463-.122.75-.156 1.148-.14 2.316.34 6.375-.25 4.058-.59 5.562-.778 6.281-1.032.717-.253 1.675-.558 2.312-1.093 1.92.212 3.72.151 5.157-.094 3.119-.533 5.111-.929 7.093-1.313 1.983-.383 2.475-1.04 3.563-1.28 1.129-.251 2.27.115 6.25-.876s5.43-1.42 6.125-1.781c.722-.376 1.762-.87
310 id="stop4043" 3102.375-1.531 1.963-.012 3.794-.291 5.219-.844 2.95-1.145 4.873-1.87 6.687-2.75 1.456-.706 2.32-1.702 2.531-2 .213-.298.1-.729.125-.75.043-.035.34-.094.5-.437.86-1.848 2.324-5.628 2.438-6.313.114-.682.168-1.353.219-1.75.029-.23-.147-.879-.125-.937.03-.082.288-.251.343-.5.267-1.199.09-2.208-.125-3.625-.213-1.418-.971-4.615-1.625-5.47-.658-.861-1.224-1.01-1.75-1z" enable-background="new" fill="#bcb786" fill-rule="evenodd"/>
311 offset="0" 311 </clipPath>
312 style="stop-color:#ffff00;stop-opacity:1;" /> 312 <filter id="kk" x="-.082" y="-.227" width="1.163" height="1.453">
313 <stop 313 <feGaussianBlur stdDeviation="2.437"/>
314 id="stop4045" 314 </filter>
315 offset="1" 315 <filter id="kj" x="-.041" y="-.113" width="1.082" height="1.227">
316 style="stop-color:#ffff00;stop-opacity:0;" /> 316 <feGaussianBlur stdDeviation="1.219"/>
317 </linearGradient> 317 </filter>
318 <linearGradient 318 <clipPath id="kl">
319 id="linearGradient4025"> 319 <path d="M1049.2-282.27l-.09.008c-1.387.884-6.603 1.607-6.629 9.523-.024 7.426 15.013 17.091 17.156 18.094 1.73.81 3.592 1.41 5.406 1.72l1.438.218c1.92.212 3.72.151 5.156-.094 3.12-.532 5.112-.928 7.094-1.312 1.982-.384 2.474-1.04 3.562-1.281 1.129-.251 2.27.116 6.25-.875 3.98-.992 5.43-1.42 6.125-1.782.723-.376 1.762-.87 2.375-1.53 1.963-.013 3.794-.292 5.219-.845 2.951-1.144 4.873-1.869 6.688-2.75 1.455-.706 2.319-1.702 2.53-2 .213-.298.1-.728.126-.75.043-.035.34-.094.5-.437.859-1.847 2.323-5.628 2.437-6.313.114-.682.168-1.352.219-1.75.029-.23-.147-.879-.125-.937.031-.082.288-.25.344-.5.266-1.198.089-2.208-.125-3.625-.214-1.418-.972-4.615-1.625-5.469-.42-.548-.8-.792-1.157-.906-.067-.017-.123-.047-.187-.063-.021-.004-.042.003-.062 0-.312-.075-.609-.158-1.156-.218-.986-.109-2.425-.26-3.969-.25-.515.003-1.037.047-1.563.093-3.558.313-9.01.991-10.218
320 <stop 3201.625-1.634-.334-3.949-.612-5.938-.468-3.064.22-4.968.342-6.906.468-1.939.127-1.686.389-2.906.469-1.32.087-1.787-.223-5.563.094-3.546.297-8.98.993-10.22 1.625-1.632-.335-3.945-.613-5.937-.469-3.064.221-4.967.373-6.906.5-.659.043-1.042.124-1.344.187z" enable-background="new" fill="#bcb786" fill-rule="evenodd" opacity=".824"/>
321 style="stop-color:#ffffff;stop-opacity:1;" 321 </clipPath>
322 offset="0" 322 <filter id="km" x="-.022" width="1.044">
323 id="stop4027" /> 323 <feGaussianBlur stdDeviation=".575"/>
324 <stop 324 </filter>
325 style="stop-color:#ffffff;stop-opacity:0;" 325 <clipPath id="kn">
326 offset="1" 326 <path d="M205.47-408.97l-.09.002c-1.446.786-6.7 1.143-7.276 9.039-.542 7.405 13.786 18.096 15.854 19.245 1.67.927 3.484 1.655 5.273 2.09l1.419.32c1.9.344 3.7.41 5.15.265 3.149-.314 5.164-.57 7.168-.815 2.004-.245 2.54-.865 3.643-1.03 1.144-.172 2.257.274 6.296-.438s5.515-1.038 6.234-1.35c.747-.325 1.818-.746 2.476-1.362 1.96.124 3.805-.026 5.265-.479 3.024-.936 4.991-1.525 6.863-2.277 1.501-.603 2.432-1.536 2.664-1.819.233-.282.15-.72.177-.74.045-.032.346-.07.53-.4.985-1.784 2.709-5.453 2.87-6.128.162-.673.263-1.338.34-1.73.046-.228-.085-.888-.059-.945.037-.08.305-.23.378-.475.35-1.177.243-2.195.128-3.625-.115-1.429-.648-4.67-1.24-5.568-.38-.577-.742-.846-1.09-.985-.066-.022-.12-.055-.183-.075-.02-.005-.042 0-.063-.004-.305-.097-.596-.2-1.138-.299-.975-.176-2.4-.428-3.942-.526a19.346 19.346 0 0
327 id="stop4031" /> 3270-1.565-.015c-3.572.064-9.057.361-10.307.91-1.606-.448-3.896-.886-5.89-.882-3.072.007-4.98-.005-6.922-.013-1.943-.01-1.71.27-2.932.265-1.322-.005-1.767-.347-5.556-.294-3.558.05-9.028.365-10.307.91-1.606-.448-3.893-.887-5.89-.882-3.072.007-4.982.027-6.924.018-.661-.003-1.049.05-1.354.093z" enable-background="new" fill="#bcb786" fill-rule="evenodd" opacity=".824"/>
328 </linearGradient> 328 </clipPath>
329 <linearGradient 329 <linearGradient id="w" x1="774.98" x2="755.12" y1="-211.87" y2="-202.68" gradientTransform="translate(-19.092 4.243)" gradientUnits="userSpaceOnUse" xlink:href="#n"/>
330 id="linearGradient4013"> 330 <mask id="jm" maskUnits="userSpaceOnUse">
331 <stop 331 <path d="m718.41-224.31l33.25 56 276-24 159.5-48.25-66.5-82.75-402.25 99z" fill="url(#w)" fill-rule="evenodd"/>
332 style="stop-color:#ffff00;stop-opacity:1;" 332 </mask>
333 offset="0" 333 <clipPath id="kg">
334 id="stop4015" /> 334 <path d="M734.03 519.49s16.755 37.018 28.701 53.954 52.727 56.046 52.727 56.046l.597-138.59" enable-background="accumulate" fill="#1a1a1a" fill-rule="evenodd" stroke="#000"/>
335 <stop 335 </clipPath>
336 style="stop-color:#b2b200;stop-opacity:1;" 336 <filter id="jn">
337 offset="1" 337 <feGaussianBlur stdDeviation="10.662"/>
338 id="stop4017" /> 338 </filter>
339 </linearGradient> 339 <filter id="ip">
340 <linearGradient 340 <feGaussianBlur stdDeviation="7.18"/>
341 id="linearGradient3985"> 341 </filter>
342 <stop 342 <clipPath id="iq">
343 style="stop-color:#000000;stop-opacity:1;" 343 <path d="m266.27 924.57c-1.407 18.801-1.145 32.751 2.082 49.303 3.226 16.552 16.406 45.907 20.334 63.184 3.926 17.267 2.694 38.31-12.46 51.148-15.317 12.978-42.05 21.599-67.831 15.734s-69.55-49.223-88.59-70.228c-19.112-21.083-63.761-93.851-77.94-124.28-14.177-30.425-12.66-36.719-8.119-45.53-9.367-24.52-12.414-50.067-33.712-75.577 30.325 3.114 43.88 26.956 60.126 47.14-5.53-48.076-18.055-64.417-28.374-90.724 29.994 6.082 50.579 31.872 63.98 72.712 9.554-3.918 18.238-9.373 30.187-9.061-11.298-41.696-17.949-69.916-36.687-101.07 53.442 5.67 83.657 80.639 78.971 87.96 9.978-2.243 19.006-6.53 30.437-5.65-11.249-38.348-21.048-76.869-3.66-118.65 0 0 48.287 65.436 54.39 85.805 6.103 20.37 1.52 38.701 1.52 38.701s16.96 31.085 20.293 51.094c3.373 20.241-3.533 59.103-4.946 77.983z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
344 offset="0" 344 </clipPath>
345 id="stop3987" /> 345 <filter id="in">
346 <stop 346 <feGaussianBlur stdDeviation="6.82"/>
347 style="stop-color:#1d1d1d;stop-opacity:1;" 347 </filter>
348 offset="1" 348 <clipPath id="io">
349 id="stop3989" /> 349 <path d="m266.27 924.57c-1.407 18.801-1.145 32.751 2.082 49.303 3.226 16.552 16.406 45.907 20.334 63.184 3.926 17.267 2.694 38.31-12.46 51.148-15.317 12.978-42.05 21.599-67.831 15.734s-69.55-49.223-88.59-70.228c-19.112-21.083-63.761-93.851-77.94-124.28-14.177-30.425-12.66-36.719-8.119-45.53-9.367-24.52-12.414-50.067-33.712-75.577 30.325 3.114 43.88 26.956 60.126 47.14-5.53-48.076-18.055-64.417-28.374-90.724 29.994 6.082 50.579 31.872 63.98 72.712 9.554-3.918 18.238-9.373 30.187-9.061-11.298-41.696-17.949-69.916-36.687-101.07 53.442 5.67 83.657 80.639 78.971 87.96 9.978-2.243 19.006-6.53 30.437-5.65-11.249-38.348-21.048-76.869-3.66-118.65 0 0 48.287 65.436 54.39 85.805 6.103 20.37 1.52 38.701 1.52 38.701s16.96 31.085 20.293 51.094c3.373 20.241-3.533 59.103-4.946 77.983z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
350 </linearGradient> 350 </clipPath>
351 <linearGradient 351 <filter id="ij" x="-.144" y="-.103" width="1.288" height="1.206">
352 id="linearGradient3961"> 352 <feGaussianBlur stdDeviation="7.389"/>
353 <stop 353 </filter>
354 style="stop-color:#283131;stop-opacity:0;" 354 <clipPath id="ik">
355 offset="0" 355 <path d="M760.16 935.83c6.794 18.903 10.494 33.3 11.89 51.212 1.397 17.912-3.783 51.801-2.9 70.656.881 18.845 8.133 40.099 27.345 48.969 19.419 8.966 49.319 10.211 74.12-3.146 24.8-13.357 57.4-70.326 70.974-97.309 13.624-27.084 38.76-114.5 44.66-149.77 5.9-35.27 2.551-41.3-4.617-49.055 2.64-27.84-1.5-54.935 13.11-87.186-30.249 11.826-37.382 40.161-48.319 65.505-8-50.933.21-71.273 3.319-101.22-29.065 14.778-42.862 47.114-45 92.857-10.924-1.304-21.391-4.434-33.571-.714-.264-46.023-1.464-76.889 8.91-114.21-53.254 21.027-62.946 106.59-56.052 112.78-10.883.535-21.371-1.297-32.857 2.857.638-42.57-.261-84.909-30-122.86 0 0-30.958 80.922-31.43 103.57s9.452 40.166 9.452 40.166-8.568 36.741-6.298 58.232c2.295 21.741 20.443 59.676 27.265 78.658z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
356 id="stop3963" /> 356 </clipPath>
357 <stop 357 <filter id="ih" x="-.09" y="-.103" width="1.181" height="1.205">
358 id="stop3965" 358 <feGaussianBlur stdDeviation="5.346"/>
359 offset="0.5" 359 </filter>
360 style="stop-color:#1e2424;stop-opacity:1;" /> 360 <clipPath id="ii">
361 <stop 361 <path d="M760.16 935.83c6.794 18.903 10.494 33.3 11.89 51.212 1.397 17.912-3.783 51.801-2.9 70.656.881 18.845 8.133 40.099 27.345 48.969 19.419 8.966 49.319 10.211 74.12-3.146 24.8-13.357 57.4-70.326 70.974-97.309 13.624-27.084 38.76-114.5 44.66-149.77 5.9-35.27 2.551-41.3-4.617-49.055 2.64-27.84-1.5-54.935 13.11-87.186-30.249 11.826-37.382 40.161-48.319 65.505-8-50.933.21-71.273 3.319-101.22-29.065 14.778-42.862 47.114-45 92.857-10.924-1.304-21.391-4.434-33.571-.714-.264-46.023-1.464-76.889 8.91-114.21-53.254 21.027-62.946 106.59-56.052 112.78-10.883.535-21.371-1.297-32.857 2.857.638-42.57-.261-84.909-30-122.86 0 0-30.958 80.922-31.43 103.57s9.452 40.166 9.452 40.166-8.568 36.741-6.298 58.232c2.295 21.741 20.443 59.676 27.265 78.658z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
362 style="stop-color:#000000;stop-opacity:1;" 362 </clipPath>
363 offset="1" 363 <clipPath id="gc">
364 id="stop3967" /> 364 <path d="M569.03 1018.8c-4.286.714-27.628 3.618-57.857 10s-99.775 25.962-142.86 35.714-117.26 34.816-156.91 27.265c-39.648-7.55-89.516-64.408-89.516-64.408l4.286-94.286s85.886-16.201 112.14-33.571c26.257-17.37 45.582-49.666 59.286-71.429s32.857-71.429 32.857-71.429l238.57 262.14z" enable-background="accumulate" fill="#0b0b0b" fill-rule="evenodd" stroke="#000"/>
365 </linearGradient> 365 </clipPath>
366 <linearGradient 366 <filter id="gb" x="-.211" y="-.168" width="1.422" height="1.336">
367 id="linearGradient3951"> 367 <feGaussianBlur stdDeviation="8.369"/>
368 <stop 368 </filter>
369 id="stop3953" 369 <clipPath id="fz">
370 offset="0" 370 <path d="M205.47-408.97l-.09.002c-1.446.786-6.7 1.143-7.276 9.039-.542 7.405 13.786 18.096 15.854 19.245 1.67.927 3.484 1.655 5.273 2.09l1.419.32c1.9.344 3.7.41 5.15.265 3.149-.314 5.164-.57 7.168-.815 2.004-.245 2.54-.865 3.643-1.03 1.144-.172 2.257.274 6.296-.438s5.515-1.038 6.234-1.35c.747-.325 1.818-.746 2.476-1.362 1.96.124 3.805-.026 5.265-.479 3.024-.936 4.991-1.525 6.863-2.277 1.501-.603 2.432-1.536 2.664-1.819.233-.282.15-.72.177-.74.045-.032.346-.07.53-.4.985-1.784 2.709-5.453 2.87-6.128.162-.673.263-1.338.34-1.73.046-.228-.085-.888-.059-.945.037-.08.305-.23.378-.475.35-1.177.243-2.195.128-3.625-.115-1.429-.648-4.67-1.24-5.568-.38-.577-.742-.846-1.09-.985-.066-.022-.12-.055-.183-.075-.02-.005-.042 0-.063-.004-.305-.097-.596-.2-1.138-.299-.975-.176-2.4-.428-3.942-.526a19.346 19.346 0 0
371 style="stop-color:#344040;stop-opacity:1;" /> 3710-1.565-.015c-3.572.064-9.057.361-10.307.91-1.606-.448-3.896-.886-5.89-.882-3.072.007-4.98-.005-6.922-.013-1.943-.01-1.71.27-2.932.265-1.322-.005-1.767-.347-5.556-.294-3.558.05-9.028.365-10.307.91-1.606-.448-3.893-.887-5.89-.882-3.072.007-4.982.027-6.924.018-.661-.003-1.049.05-1.354.093z" enable-background="new" fill="#bcb786" fill-rule="evenodd" opacity=".824"/>
372 <stop 372 </clipPath>
373 style="stop-color:#222929;stop-opacity:1;" 373 <filter id="fy" x="-.022" width="1.044">
374 offset="0.5" 374 <feGaussianBlur stdDeviation=".575"/>
375 id="stop3955" /> 375 </filter>
376 <stop 376 <clipPath id="fx">
377 id="stop3957" 377 <path d="M1049.2-282.27l-.09.008c-1.387.884-6.603 1.607-6.629 9.523-.024 7.426 15.013 17.091 17.156 18.094 1.73.81 3.592 1.41 5.406 1.72l1.438.218c1.92.212 3.72.151 5.156-.094 3.12-.532 5.112-.928 7.094-1.312 1.982-.384 2.474-1.04 3.562-1.281 1.129-.251 2.27.116 6.25-.875 3.98-.992 5.43-1.42 6.125-1.782.723-.376 1.762-.87 2.375-1.53 1.963-.013 3.794-.292 5.219-.845 2.951-1.144 4.873-1.869 6.688-2.75 1.455-.706 2.319-1.702 2.53-2 .213-.298.1-.728.126-.75.043-.035.34-.094.5-.437.859-1.847 2.323-5.628 2.437-6.313.114-.682.168-1.352.219-1.75.029-.23-.147-.879-.125-.937.031-.082.288-.25.344-.5.266-1.198.089-2.208-.125-3.625-.214-1.418-.972-4.615-1.625-5.469-.42-.548-.8-.792-1.157-.906-.067-.017-.123-.047-.187-.063-.021-.004-.042.003-.062 0-.312-.075-.609-.158-1.156-.218-.986-.109-2.425-.26-3.969-.25-.515.003-1.037.047-1.563.093-3.558.313-9.01.991-10.218
378 offset="1" 3781.625-1.634-.334-3.949-.612-5.938-.468-3.064.22-4.968.342-6.906.468-1.939.127-1.686.389-2.906.469-1.32.087-1.787-.223-5.563.094-3.546.297-8.98.993-10.22 1.625-1.632-.335-3.945-.613-5.937-.469-3.064.221-4.967.373-6.906.5-.659.043-1.042.124-1.344.187z" enable-background="new" fill="#bcb786" fill-rule="evenodd" opacity=".824"/>
379 style="stop-color:#000000;stop-opacity:1;" /> 379 </clipPath>
380 </linearGradient> 380 <filter id="fw" x="-.082" y="-.227" width="1.163" height="1.453">
381 <linearGradient 381 <feGaussianBlur stdDeviation="2.437"/>
382 id="linearGradient3909"> 382 </filter>
383 <stop 383 <filter id="fv" x="-.041" y="-.113" width="1.082" height="1.227">
384 style="stop-color:#283131;stop-opacity:1;" 384 <feGaussianBlur stdDeviation="1.219"/>
385 offset="0" 385 </filter>
386 id="stop3911" /> 386 <clipPath id="y">
387 <stop 387 <path d="M352.25 211.99c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.027 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#262f2f" fill-rule="evenodd" stroke="#000"/>
388 id="stop3917" 388 </clipPath>
389 offset="0.5" 389 <filter id="fu" x="-.252" y="-.053" width="1.503" height="1.106">
390 style="stop-color:#1e2424;stop-opacity:1;" /> 390 <feGaussianBlur stdDeviation="13.025"/>
391 <stop 391 </filter>
392 style="stop-color:#000000;stop-opacity:1;" 392 <clipPath id="fs">
393 offset="1" 393 <path d="M734.03 519.49s16.755 37.018 28.701 53.954 52.727 56.046 52.727 56.046l.597-138.59" enable-background="accumulate" fill="#1a1a1a" fill-rule="evenodd" stroke="#000"/>
394 id="stop3913" /> 394 </clipPath>
395 </linearGradient> 395 <filter id="fr" x="-.274" y="-.213" width="1.549" height="1.427">
396 <linearGradient 396 <feGaussianBlur stdDeviation="11.314"/>
397 id="linearGradient3537"> 397 </filter>
398 <stop 398 <clipPath id="fq">
399 style="stop-color:#ada469;stop-opacity:1;" 399 <path d="M178.21 274.15c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.027 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#262f2f" fill-rule="evenodd"/>
400 offset="0" 400 </clipPath>
401 id="stop3539" /> 401 <filter id="aq">
402 <stop 402 <feGaussianBlur stdDeviation="2.04"/>
403 id="stop3545" 403 </filter>
404 offset="0.81132078" 404 <filter id="g">
405 style="stop-color:#ada469;stop-opacity:1;" /> 405 <feTurbulence baseFrequency=".24" numOctaves="10" result="result0" seed="655" type="fractalNoise"/>
406 <stop 406 <feDisplacementMap in="SourceGraphic" in2="result0" scale="62" xChannelSelector="B" yChannelSelector="G"/>
407 style="stop-color:#ffffff;stop-opacity:1;" 407 </filter>
408 offset="1" 408 <clipPath id="fp">
409 id="stop3541" /> 409 <path d="M352.25 211.99c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.027 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#262f2f" fill-rule="evenodd" stroke="#000"/>
410 </linearGradient> 410 </clipPath>
411 <linearGradient 411 <filter id="fo" x="-.353" y="-.182" width="1.706" height="1.363">
412 id="linearGradient3317"> 412 <feGaussianBlur stdDeviation="48.038"/>
413 <stop 413 </filter>
414 style="stop-color:#cfc690;stop-opacity:1" 414 <clipPath id="fn">
415 offset="0" 415 <path d="m265.94 126.68l-18.767 168.86 174.11-73.121 61.954 88.659 57.884-31.99-37.534-180.06-237.64 27.649z" fill-rule="evenodd" stroke="#000" stroke-width=".9"/>
416 id="stop3319" /> 416 </clipPath>
417 <stop 417 <filter id="fm" x="-.277" y="-.325" width="1.554" height="1.65">
418 id="stop3321" 418 <feGaussianBlur stdDeviation="19.956"/>
419 offset="0.21161865" 419 </filter>
420 style="stop-color:#afa775;stop-opacity:1;" /> 420 <mask id="fk" maskUnits="userSpaceOnUse">
421 <stop 421 <ellipse transform="translate(-174.03 62.156)" cx="579.47" cy="260.58" rx="192.69" ry="164.05" enable-background="accumulate" fill="url(#dt)"/>
422 id="stop3323" 422 </mask>
423 offset="0.53408515" 423 <filter id="fj" x="-.611" y="-.149" width="2.223" height="1.299">
424 style="stop-color:#615c3a;stop-opacity:1;" /> 424 <feGaussianBlur stdDeviation="37.83"/>
425 <stop 425 </filter>
426 style="stop-color:#000000;stop-opacity:1;" 426 <filter id="fi" x="-.259" y="-.224" width="1.518" height="1.447">
427 offset="0.76504093" 427 <feGaussianBlur stdDeviation="19.632"/>
428 id="stop3325" /> 428 </filter>
429 <stop 429 <filter id="fh" x="-.3" y="-.3" width="1.6" height="1.6">
430 id="stop3327" 430 <feGaussianBlur stdDeviation="2"/>
431 offset="1" 431 </filter>
432 style="stop-color:#403518;stop-opacity:1;" /> 432 <clipPath id="x">
433 </linearGradient> 433 <path d="M179.64 267.36c-22.41 39.703-60.616 115.78-69.286 149.64-8.647 33.775-8.772 66.417-.357 86.429 8.36 19.882 26.164 35.633 40.714 41.429-.597-14.376 14.373-43.286 72.857-72.5 58.626-29.285 78.382-27.131 103.57-47.143 25.63-20.362 12.61-67.045 3.214-93.929-9.434-26.993-34.967-59.124-66.429-69.643-31.033-10.375-65.018-4.848-84.286 5.714z" fill="#f5ff04" fill-rule="evenodd"/>
434 <radialGradient 434 </clipPath>
435 inkscape:collect="always" 435 <filter id="hd">
436 xlink:href="#linearGradient3317" 436 <feGaussianBlur stdDeviation="6.589"/>
437 id="radialGradient3315" 437 </filter>
438 cx="543.6698" 438 <filter id="hc">
439 cy="147.3131" 439 <feGaussianBlur stdDeviation="1.505"/>
440 fx="543.6698" 440 </filter>
441 fy="147.3131" 441 <filter id="hb" x="-.243" y="-.391" width="1.487" height="1.782">
442 r="47.863216" 442 <feGaussianBlur stdDeviation="14.59"/>
443 gradientTransform="matrix(2.1382256,0,0,2.3382884,-77.03847,-101.68704)" 443 </filter>
444 gradientUnits="userSpaceOnUse" /> 444 <filter id="ha" x="-.146" y="-.235" width="1.292" height="1.47">
445 <radialGradient 445 <feGaussianBlur stdDeviation="4.444"/>
446 inkscape:collect="always" 446 </filter>
447 xlink:href="#linearGradient3537" 447 <filter id="gz">
448 id="radialGradient3543" 448 <feGaussianBlur stdDeviation=".606"/>
449 cx="385" 449 </filter>
450 cy="237.00504" 450 <clipPath id="if">
451 fx="385" 451 <path d="m709.29 844.51c54.286-1.429 126.04-15.052 170-26.786 44.053-11.757 125.89-36.347 175.36-57.857 49.339-21.453 113.6-59.282 154.29-92.143 40.508-32.721 52.39-55.82 60.714-33.571 8.37 22.368-16.407 56.326-37.857 81.071-21.604 24.923-52.731 52.705-98.929 89.286s-156.08 101.58-212.86 128.57c-57.066 27.125-128.2 58.238-172.14 72.5s-131.43 31.071-131.43 31.071l92.857-192.14z" enable-background="accumulate" fill="#121212" fill-rule="evenodd"/>
452 fy="237.00504" 452 </clipPath>
453 r="86.928574" 453 <mask id="gy" maskUnits="userSpaceOnUse">
454 gradientTransform="matrix(1,0,0,0.8562038,0,34.080427)" 454 <path d="m718.41-224.31l33.25 56 276-24 159.5-48.25-66.5-82.75-402.25 99z" fill="url(#w)" fill-rule="evenodd"/>
455 gradientUnits="userSpaceOnUse" /> 455 </mask>
456 <radialGradient 456 <clipPath id="gx">
457 inkscape:collect="always" 457 <path transform="translate(.08 -.031)" d="M1111.4-285.94l-3.937 1.875c-.041.01-.1.02-.125.031-.42.213-.165.1-.657.313-.486.21-1.737.584-4.093 1.469-3.332 1.25-5.805 2.15-7 3.062-1.537.021-3.72.233-5.657.719a227.677 227.677 0 0 1-6.75 1.594c-1.895.42-1.675.642-2.875.875-1.296.251-1.721-.01-5.437.78-3.49.743-8.895 1.932-10.156 2.688-1.584-.18-3.868-.321-5.844-.03-3.04.446-4.916.672-6.844.905-.655.08-1.04.201-1.344.282-.426.131-.685.26-1.375.343-1.311.16-1.762-.156-5.53.282-3.555.413-9.006 1.272-10.25 1.937-1.6-.297-3.859-.534-5.845-.344-3.058.294-4.972.484-6.906.657-1.934.172-1.688.422-2.906.53-1.316.119-1.76-.163-5.531.25-3.542.39-9.008 1.21-10.281 1.876-1.6-.295-3.887-.507-5.875-.313-3.059.3-4.941.48-6.875.657-.658.06-1.04.178-1.344.25-.428.119-.683.218-1.375.28-1.316.121-1.76-.194-5.531.22-3.556.39-9.006 1.239-10.25
458 xlink:href="#linearGradient3909" 4581.906-1.599-.294-3.86-.524-5.844-.313-3.056.326-4.974.527-6.906.719s-1.69.44-2.906.563c-1.315.131-1.763-.165-5.532.28-3.539.42-8.977 1.293-10.25 1.97-1.597-.281-3.86-.42-5.843-.188-3.052.358-4.945.568-6.875.781-.657.073-1.041.173-1.344.25-.427.128-.685.268-1.375.344-1.314.146-1.768-.174-5.531.313-3.55.458-8.979 1.419-10.22 2.125-1.593-.245-3.833-.382-5.812-.125-3.048.394-4.95.648-6.875.906-1.924.258-1.726.493-2.937.656-1.31.176-1.748-.104-5.5.469-3.525.538-8.924 1.699-10.188 2.437-1.588-.203-3.846-.254-5.813.094-3.026.536-4.899.862-6.812 1.188-.651.11-1.014.27-1.313.375-.42.164-.663.33-1.344.468-1.294.262-1.727-.006-5.437.813-3.499.772-8.846 2.383-10.062 3.219-1.563-.078-3.758.085-5.688.593-2.972.783-4.817 1.232-6.687 1.75s-1.667.768-2.844 1.094c-1.273.353-1.697.107-5.344 1.188-3.425 1.014-8.65 2.933-9.875 3.843-1.539.013-3.72.273-5.625.875-2.93.928-4.75 1.459-6.594
459 id="radialGradient3915" 4592.063-.626.205-.991.393-1.28.531-.408.214-.654.409-1.313.625-1.255.412-1.687.19-5.282 1.438-3.39 1.177-8.595 3.213-9.78 4.156-1.525.06-3.65.395-5.532 1.062-2.897 1.029-4.699 1.676-6.531 2.313-1.832.637-1.628.848-2.781 1.25-1.247.434-1.664.2-5.22 1.562-3.338 1.28-8.486 3.483-9.687 4.47-1.507.107-3.635.498-5.5 1.218a1047.26 1047.26 0 0 1-6.437 2.469c-.617.233-.997.442-1.281.594v.03l-8 3.188 1.812 14.72c-.258-.062 6.188 3.312 6.188 3.312.226-.145.449-.273.718-.375 1.08-.41 2.172-.216 6-1.688 3.829-1.471 5.224-2.005 5.907-2.406.68-.4 1.611-.88 2.218-1.531 1.827-.138 3.571-.493 4.938-1 2.968-1.1 4.875-1.806 6.781-2.469 1.906-.662 2.354-1.415 3.406-1.781 1.092-.38 2.195-.166 6.063-1.531 3.867-1.366 5.283-1.827 5.969-2.22.7-.4 1.7-.932 2.312-1.593 1.97-.055 3.817-.385 5.281-.875 3.002-1.005 4.927-1.622 6.844-2.25 1.539-.504 2.174-1.047 2.906-1.437.23-.135.476-.254.75-.344 1.099-.36 2.182-.082
460 cx="418.30365" 4606.094-1.313 3.912-1.23 5.366-1.673 6.063-2.03.694-.358 1.63-.794 2.25-1.407 1.865-.023 3.635-.267 5.03-.688 3.031-.913 4.993-1.43 6.938-1.968 1.945-.539 2.427-1.265 3.5-1.563 1.114-.31 2.22.007 6.188-1.031 3.967-1.039 5.417-1.433 6.125-1.75.735-.33 1.814-.754 2.437-1.375 1.998.116 3.858-.02 5.344-.375 3.078-.735 5.084-1.101 7.063-1.5 1.588-.32 2.244-.79 3-1.094a3.4 3.4 0 0 1 .75-.25c1.133-.23 2.304.209 6.343-.5 4.04-.709 5.5-.927 6.22-1.187.715-.26 1.704-.568 2.343-1.094 1.924.24 3.748.224 5.188 0 3.126-.488 5.154-.7 7.156-.969 2.001-.268 2.489-.945 3.594-1.094 1.146-.154 2.275.302 6.343-.219 4.068-.52 5.56-.695 6.282-.937.737-.247 1.798-.586 2.437-1.125 2.05.336 3.974.398 5.5.219 3.142-.37 5.18-.56 7.188-.782 1.61-.178 2.264-.608 3.03-.843.242-.086.495-.156.782-.188 1.15-.127 2.301.347 6.375-.125s5.559-.61 6.281-.844c.72-.232 1.7-.473 2.344-.968 1.936.333 3.77.404 5.219.25 3.146-.335
461 cy="342.47794" 4615.177-.519 7.187-.719 2.01-.2 2.484-.826 3.594-.938 1.151-.115 2.297.366 6.375-.062s5.589-.562 6.313-.781c.739-.224 1.795-.514 2.437-1.031 2.057.398 4.002.493 5.531.343 3.149-.308 5.176-.473 7.188-.656 1.614-.147 2.263-.56 3.031-.781.241-.081.494-.13.781-.156 1.152-.106 2.293.392 6.375 0s5.59-.531 6.313-.75c.72-.219 1.7-.448 2.343-.938 1.939.35 3.77.454 5.22.313 3.148-.309 5.175-.474 7.187-.657 2.011-.183 2.514-.838 3.625-.937 1.152-.103 2.292.385 6.375 0s5.588-.501 6.312-.719c.74-.222 1.796-.514 2.438-1.031 2.057.402 4.003.503 5.531.344 3.147-.329 5.177-.523 7.187-.72 1.613-.156 2.266-.63 3.032-.874.24-.088.463-.122.75-.156 1.148-.14 2.316.34 6.375-.25 4.058-.59 5.562-.778 6.281-1.032.717-.253 1.675-.558 2.312-1.093 1.92.212 3.72.151 5.157-.094 3.119-.533 5.111-.929 7.093-1.313 1.983-.383 2.475-1.04 3.563-1.28 1.129-.251 2.27.115 6.25-.876s5.43-1.42 6.125-1.781c.722-.376 1.762-.87
462 fx="418.30365" 4622.375-1.531 1.963-.012 3.794-.291 5.219-.844 2.95-1.145 4.873-1.87 6.687-2.75 1.456-.706 2.32-1.702 2.531-2 .213-.298.1-.729.125-.75.043-.035.34-.094.5-.437.86-1.848 2.324-5.628 2.438-6.313.114-.682.168-1.353.219-1.75.029-.23-.147-.879-.125-.937.03-.082.288-.251.343-.5.267-1.199.09-2.208-.125-3.625-.213-1.418-.971-4.615-1.625-5.47-.658-.861-1.224-1.01-1.75-1z" enable-background="new" fill="#bcb786" fill-rule="evenodd"/>
463 fy="342.47794" 463 </clipPath>
464 r="131.4509" 464 <filter id="gw">
465 gradientTransform="matrix(1.3957347,0.6211056,-0.4244067,0.9537174,-15.061913,-227.96711)" 465 <feGaussianBlur stdDeviation="1.168"/>
466 gradientUnits="userSpaceOnUse" /> 466 </filter>
467 <radialGradient 467 <filter id="gv" x="-.103" y="-.342" width="1.206" height="1.685">
468 inkscape:collect="always" 468 <feGaussianBlur stdDeviation="1.168"/>
469 xlink:href="#linearGradient3951" 469 </filter>
470 id="radialGradient3933" 470 <filter id="gu" x="-.099" y="-.226" width="1.198" height="1.453">
471 cx="397.16388" 471 <feGaussianBlur stdDeviation="1.168"/>
472 cy="336.95245" 472 </filter>
473 fx="397.16388" 473 <filter id="gt" x="-.098" y="-.198" width="1.196" height="1.397">
474 fy="336.95245" 474 <feGaussianBlur stdDeviation="1.168"/>
475 r="36.75" 475 </filter>
476 gradientUnits="userSpaceOnUse" 476 <filter id="gs">
477 gradientTransform="matrix(1.9449972,2.4894837e-7,-2.4894833e-7,1.9449969,-375.31868,-318.41912)" /> 477 <feGaussianBlur stdDeviation="1.168"/>
478 <linearGradient 478 </filter>
479 inkscape:collect="always" 479 <filter id="gr" x="-.098" y="-.198" width="1.197" height="1.395">
480 xlink:href="#linearGradient3961" 480 <feGaussianBlur stdDeviation="1.168"/>
481 id="linearGradient3959" 481 </filter>
482 x1="398.21429" 482 <filter id="gq" x="-.098" y="-.198" width="1.196" height="1.397">
483 y1="343.52289" 483 <feGaussianBlur stdDeviation="1.168"/>
484 x2="379.28571" 484 </filter>
485 y2="265.30862" 485 <filter id="gp" x="-.098" y="-.203" width="1.197" height="1.406">
486 gradientUnits="userSpaceOnUse" 486 <feGaussianBlur stdDeviation="1.168"/>
487 gradientTransform="translate(450.03125,73.843964)" /> 487 </filter>
488 <filter 488 <filter id="go" x="-.098" y="-.209" width="1.197" height="1.417">
489 inkscape:collect="always" 489 <feGaussianBlur stdDeviation="1.168"/>
490 id="filter3981" 490 </filter>
491 x="-0.30000001" 491 <filter id="gn" x="-.099" y="-.225" width="1.198" height="1.451">
492 width="1.6" 492 <feGaussianBlur stdDeviation="1.168"/>
493 y="-0.30000001" 493 </filter>
494 height="1.6"> 494 <filter id="gm" x="-.101" y="-.274" width="1.201" height="1.548">
495 <feGaussianBlur 495 <feGaussianBlur stdDeviation="1.168"/>
496 inkscape:collect="always" 496 </filter>
497 stdDeviation="2" 497 <filter id="gl" x="-.102" y="-.324" width="1.204" height="1.647">
498 id="feGaussianBlur3983" /> 498 <feGaussianBlur stdDeviation="1.168"/>
499 </filter> 499 </filter>
500 <radialGradient 500 <filter id="gk" x="-.103" y="-.364" width="1.207" height="1.729">
501 inkscape:collect="always" 501 <feGaussianBlur stdDeviation="1.168"/>
502 xlink:href="#linearGradient3985" 502 </filter>
503 id="radialGradient3991" 503 <filter id="gj" x="-.105" y="-.405" width="1.209" height="1.809">
504 cx="402.48898" 504 <feGaussianBlur stdDeviation="1.168"/>
505 cy="317.23578" 505 </filter>
506 fx="402.48898" 506 <filter id="gi">
507 fy="317.23578" 507 <feGaussianBlur stdDeviation="1.723"/>
508 r="23.714285" 508 </filter>
509 gradientUnits="userSpaceOnUse" 509 <filter id="gh">
510 gradientTransform="matrix(4.3776616,0,0,4.3776616,-1358.3025,-1070.7357)" /> 510 <feGaussianBlur stdDeviation=".35"/>
511 <clipPath 511 </filter>
512 clipPathUnits="userSpaceOnUse" 512 <filter id="gg" x="-.031" y="-.103" width="1.062" height="1.205">
513 id="clipPath3999"> 513 <feGaussianBlur stdDeviation=".35"/>
514 <path 514 </filter>
515 style="display:inline;opacity:1;fill:#f5ff04;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" 515 <filter id="gf">
516 d="m 179.64286,267.36218 c -22.41044,39.70292 -60.6161,115.78029 -69.28571,149.64286 -8.64721,33.7751 -8.77199,66.41654 -0.35715,86.42858 8.3602,19.88213 26.16398,35.6328 40.71428,41.42856 -0.59638,-14.37587 14.37295,-43.28583 72.85715,-72.5 58.62627,-29.28514 78.38163,-27.13086 103.57142,-47.14286 25.63006,-20.36176 12.61031,-67.04463 3.21429,-93.92857 -9.43424,-26.99328 -34.96741,-59.12448 -66.42857,-69.64285 -31.03327,-10.37532 -65.01776,-4.84837 -84.28571,5.71428 z" 516 <feGaussianBlur stdDeviation=".35"/>
517 id="path4001" 517 </filter>
518 sodipodi:nodetypes="czzczzzzc" 518 <filter id="ge">
519 inkscape:connector-curvature="0" /> 519 <feGaussianBlur stdDeviation=".35"/>
520 </clipPath> 520 </filter>
521 <radialGradient 521 <filter id="ff">
522 inkscape:collect="always" 522 <feGaussianBlur stdDeviation=".35"/>
523 xlink:href="#linearGradient4013" 523 </filter>
524 id="radialGradient4056" 524 <filter id="fe">
525 gradientUnits="userSpaceOnUse" 525 <feGaussianBlur stdDeviation=".35"/>
526 gradientTransform="matrix(1.1323239,0.7659488,-1.4550286,2.1510098,588.75376,-711.79716)" 526 </filter>
527 cx="228.81355" 527 <filter id="fd">
528 cy="440.26971" 528 <feGaussianBlur stdDeviation=".35"/>
529 fx="228.81355" 529 </filter>
530 fy="440.26971" 530 <filter id="fc">
531 r="119.17509" /> 531 <feGaussianBlur stdDeviation=".35"/>
532 <radialGradient 532 </filter>
533 inkscape:collect="always" 533 <filter id="fb">
534 xlink:href="#linearGradient4041" 534 <feGaussianBlur stdDeviation=".35"/>
535 id="radialGradient4060" 535 </filter>
536 gradientUnits="userSpaceOnUse" 536 <filter id="fa">
537 gradientTransform="matrix(0.05911206,2.6869855,-0.7234268,0.01591495,408.72779,-424.56452)" 537 <feGaussianBlur stdDeviation=".35"/>
538 cx="275.4422" 538 </filter>
539 cy="335.34866" 539 <filter id="ez">
540 fx="275.4422" 540 <feGaussianBlur stdDeviation=".35"/>
541 fy="335.34866" 541 </filter>
542 r="36.75" /> 542 <filter id="ey">
543 <radialGradient 543 <feGaussianBlur stdDeviation=".35"/>
544 inkscape:collect="always" 544 </filter>
545 xlink:href="#linearGradient4025" 545 <filter id="ex" x="-.031" y="-.109" width="1.062" height="1.219">
546 id="radialGradient4062" 546 <feGaussianBlur stdDeviation=".35"/>
547 gradientUnits="userSpaceOnUse" 547 </filter>
548 gradientTransform="matrix(0.05911206,2.6869855,-0.7234268,0.01591495,408.72779,-424.56452)" 548 <filter id="ew" x="-.031" y="-.121" width="1.063" height="1.243">
549 cx="275.4422" 549 <feGaussianBlur stdDeviation=".35"/>
550 cy="335.34866" 550 </filter>
551 fx="275.4422" 551 <clipPath id="ie">
552 fy="335.34866" 552 <path d="m266.27 924.57c-1.407 18.801-1.145 32.751 2.082 49.303 3.226 16.552 16.406 45.907 20.334 63.184 3.926 17.267 2.694 38.31-12.46 51.148-15.317 12.978-42.05 21.599-67.831 15.734s-69.55-49.223-88.59-70.228c-19.112-21.083-63.761-93.851-77.94-124.28-14.177-30.425-12.66-36.719-8.119-45.53-9.367-24.52-12.414-50.067-33.712-75.577 30.325 3.114 43.88 26.956 60.126 47.14-5.53-48.076-18.055-64.417-28.374-90.724 29.994 6.082 50.579 31.872 63.98 72.712 9.554-3.918 18.238-9.373 30.187-9.061-11.298-41.696-17.949-69.916-36.687-101.07 53.442 5.67 83.657 80.639 78.971 87.96 9.978-2.243 19.006-6.53 30.437-5.65-11.249-38.348-21.048-76.869-3.66-118.65 0 0 48.287 65.436 54.39 85.805 6.103 20.37 1.52 38.701 1.52 38.701s16.96 31.085 20.293 51.094c3.373 20.241-3.533 59.103-4.946 77.983z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
553 r="36.75" /> 553 </clipPath>
554 <linearGradient 554 <filter id="id">
555 inkscape:collect="always" 555 <feGaussianBlur stdDeviation="7.18"/>
556 xlink:href="#linearGradient4084" 556 </filter>
557 id="linearGradient4082" 557 <clipPath id="ic">
558 gradientUnits="userSpaceOnUse" 558 <path d="m266.27 924.57c-1.407 18.801-1.145 32.751 2.082 49.303 3.226 16.552 16.406 45.907 20.334 63.184 3.926 17.267 2.694 38.31-12.46 51.148-15.317 12.978-42.05 21.599-67.831 15.734s-69.55-49.223-88.59-70.228c-19.112-21.083-63.761-93.851-77.94-124.28-14.177-30.425-12.66-36.719-8.119-45.53-9.367-24.52-12.414-50.067-33.712-75.577 30.325 3.114 43.88 26.956 60.126 47.14-5.53-48.076-18.055-64.417-28.374-90.724 29.994 6.082 50.579 31.872 63.98 72.712 9.554-3.918 18.238-9.373 30.187-9.061-11.298-41.696-17.949-69.916-36.687-101.07 53.442 5.67 83.657 80.639 78.971 87.96 9.978-2.243 19.006-6.53 30.437-5.65-11.249-38.348-21.048-76.869-3.66-118.65 0 0 48.287 65.436 54.39 85.805 6.103 20.37 1.52 38.701 1.52 38.701s16.96 31.085 20.293 51.094c3.373 20.241-3.533 59.103-4.946 77.983z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
559 x1="182.35046" 559 </clipPath>
560 y1="256.11136" 560 <filter id="gd">
561 x2="145.53348" 561 <feGaussianBlur stdDeviation="6.82"/>
562 y2="542.20502" /> 562 </filter>
563 <clipPath 563 <clipPath id="ev">
564 clipPathUnits="userSpaceOnUse" 564 <path d="M760.16 935.83c6.794 18.903 10.494 33.3 11.89 51.212 1.397 17.912-3.783 51.801-2.9 70.656.881 18.845 8.133 40.099 27.345 48.969 19.419 8.966 49.319 10.211 74.12-3.146 24.8-13.357 57.4-70.326 70.974-97.309 13.624-27.084 38.76-114.5 44.66-149.77 5.9-35.27 2.551-41.3-4.617-49.055 2.64-27.84-1.5-54.935 13.11-87.186-30.249 11.826-37.382 40.161-48.319 65.505-8-50.933.21-71.273 3.319-101.22-29.065 14.778-42.862 47.114-45 92.857-10.924-1.304-21.391-4.434-33.571-.714-.264-46.023-1.464-76.889 8.91-114.21-53.254 21.027-62.946 106.59-56.052 112.78-10.883.535-21.371-1.297-32.857 2.857.638-42.57-.261-84.909-30-122.86 0 0-30.958 80.922-31.43 103.57s9.452 40.166 9.452 40.166-8.568 36.741-6.298 58.232c2.295 21.741 20.443 59.676 27.265 78.658z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
565 id="clipPath4100"> 565 </clipPath>
566 <path 566 <filter id="eu" x="-.144" y="-.103" width="1.288" height="1.206">
567 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.9000755px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" 567 <feGaussianBlur stdDeviation="7.389"/>
568 d="m 265.93541,126.68393 -18.76721,168.86308 174.10543,-73.12068 61.9544,88.65883 57.8844,-31.9903 -37.53442,-180.059677 -237.6426,27.648747 z" 568 </filter>
569 id="path4102" 569 <clipPath id="et">
570 sodipodi:nodetypes="ccccccc" 570 <path d="M760.16 935.83c6.794 18.903 10.494 33.3 11.89 51.212 1.397 17.912-3.783 51.801-2.9 70.656.881 18.845 8.133 40.099 27.345 48.969 19.419 8.966 49.319 10.211 74.12-3.146 24.8-13.357 57.4-70.326 70.974-97.309 13.624-27.084 38.76-114.5 44.66-149.77 5.9-35.27 2.551-41.3-4.617-49.055 2.64-27.84-1.5-54.935 13.11-87.186-30.249 11.826-37.382 40.161-48.319 65.505-8-50.933.21-71.273 3.319-101.22-29.065 14.778-42.862 47.114-45 92.857-10.924-1.304-21.391-4.434-33.571-.714-.264-46.023-1.464-76.889 8.91-114.21-53.254 21.027-62.946 106.59-56.052 112.78-10.883.535-21.371-1.297-32.857 2.857.638-42.57-.261-84.909-30-122.86 0 0-30.958 80.922-31.43 103.57s9.452 40.166 9.452 40.166-8.568 36.741-6.298 58.232c2.295 21.741 20.443 59.676 27.265 78.658z" enable-background="new" fill="#ada469" fill-rule="evenodd"/>
571 inkscape:connector-curvature="0" /> 571 </clipPath>
572 </clipPath> 572 <filter id="es" x="-.09" y="-.103" width="1.181" height="1.205">
573 <radialGradient 573 <feGaussianBlur stdDeviation="5.346"/>
574 inkscape:collect="always" 574 </filter>
575 xlink:href="#linearGradient4106" 575 <marker id="eq" overflow="visible" orient="auto">
576 id="radialGradient4112" 576 <path d="m-1.2 0l-1 1 3.5-1-3.5-1 1 1z" fill="#f8d615" fill-rule="evenodd" stroke="#f8d615" stroke-width=".2pt"/>
577 cx="250.22678" 577 </marker>
578 cy="475.09763" 578 <radialGradient id="r" cx="142.96" cy="107.09" r="66.982" gradientTransform="matrix(-.33248 .90223 -.95824 -.35312 305.29 19.909)" gradientUnits="userSpaceOnUse">
579 fx="250.22678" 579 <stop stop-color="#1e2323" offset="0"/>
580 fy="475.09763" 580 <stop stop-color="#181d1d" offset=".56"/>
581 r="95.98877" 581 <stop offset="1"/>
582 gradientTransform="matrix(1.2259004,-0.7077739,0.1413989,0.2449102,322.22326,608.91815)" 582 </radialGradient>
583 gradientUnits="userSpaceOnUse" /> 583 <radialGradient id="q" cx="317.79" cy="129.65" r="47.863" gradientTransform="matrix(1.0036 0 0 1.6613 -160.53 -96.205)" gradientUnits="userSpaceOnUse" xlink:href="#u"/>
584 <linearGradient 584 <radialGradient id="p" cx="325.31" cy="80.91" r="26.938" gradientTransform="matrix(2.0748 -.1578 .23824 3.1325 -550.77 -65.729)" gradientUnits="userSpaceOnUse">
585 inkscape:collect="always" 585 <stop stop-color="#283131" stop-opacity="0" offset="0"/>
586 xlink:href="#linearGradient4478" 586 <stop stop-color="#1e2424" stop-opacity="0" offset=".513"/>
587 id="linearGradient4484" 587 <stop offset="1"/>
588 x1="412.08926" 588 </radialGradient>
589 y1="404.91574" 589 <linearGradient id="kt" x1="347.9" x2="275.58" y1="1070.2" y2="867.98" gradientUnits="userSpaceOnUse">
590 x2="417.375" 590 <stop offset="0"/>
591 y2="401.82648" 591 <stop offset=".022"/>
592 gradientUnits="userSpaceOnUse" /> 592 <stop offset=".759"/>
593 <linearGradient 593 <stop stop-color="#232323" offset=".885"/>
594 inkscape:collect="always" 594 <stop stop-color="#595959" offset="1"/>
595 xlink:href="#linearGradient4478" 595 </linearGradient>
596 id="linearGradient4486" 596 <linearGradient id="kh" x1="603.84" x2="616.24" y1="627.85" y2="585.43" gradientTransform="translate(450.03 73.844)" gradientUnits="userSpaceOnUse" xlink:href="#t"/>
597 x1="411.91071" 597 <linearGradient id="el" x1="609.31" x2="560.83" y1="239.47" y2="262.86" gradientTransform="translate(450.03 73.844)" gradientUnits="userSpaceOnUse">
598 y1="404.91577" 598 <stop stop-color="#0a0c0c" offset="0"/>
599 x2="417.375" 599 <stop stop-color="#1f2727" stop-opacity="0" offset="1"/>
600 y2="401.82648" 600 </linearGradient>
601 gradientUnits="userSpaceOnUse" /> 601 <radialGradient id="ek" cx="543.67" cy="147.31" r="47.863" gradientTransform="matrix(2.1382 0 0 2.3383 -77.038 -101.69)" gradientUnits="userSpaceOnUse" xlink:href="#u"/>
602 <linearGradient 602 <radialGradient id="ef" cx="385" cy="237.01" r="86.929" gradientTransform="matrix(1 0 0 .8562 0 34.08)" gradientUnits="userSpaceOnUse">
603 inkscape:collect="always" 603 <stop stop-color="#ada469" offset="0"/>
604 xlink:href="#linearGradient4478" 604 <stop stop-color="#ada469" offset=".811"/>
605 id="linearGradient4488" 605 <stop stop-color="#fff" offset="1"/>
606 x1="411.91071" 606 </radialGradient>
607 y1="405.54077" 607 <linearGradient id="ee" x1="398.21" x2="379.29" y1="343.52" y2="265.31" gradientTransform="translate(450.03 73.844)" gradientUnits="userSpaceOnUse" xlink:href="#s"/>
608 x2="417.375" 608 <radialGradient id="ed" cx="397.16" cy="336.95" r="36.75" gradientTransform="translate(-375.32 -318.42) scale(1.945)" gradientUnits="userSpaceOnUse">
609 y2="401.82648" 609 <stop stop-color="#344040" offset="0"/>
610 gradientUnits="userSpaceOnUse" /> 610 <stop stop-color="#222929" offset=".5"/>
611 <linearGradient 611 <stop offset="1"/>
612 inkscape:collect="always" 612 </radialGradient>
613 xlink:href="#linearGradient4478" 613 <radialGradient id="ec" cx="402.49" cy="317.24" r="23.714" gradientTransform="translate(-1358.3 -1070.7) scale(4.3777)" gradientUnits="userSpaceOnUse">
614 id="linearGradient4490" 614 <stop offset="0"/>
615 x1="412.08926" 615 <stop stop-color="#1d1d1d" offset="1"/>
616 y1="405.54077" 616 </radialGradient>
617 x2="417.375" 617 <radialGradient id="eb" cx="250.23" cy="475.1" r="95.989" gradientTransform="matrix(1.2259 -.70777 .1414 .24491 322.22 608.92)" gradientUnits="userSpaceOnUse">
618 y2="401.82648" 618 <stop stop-color="#d9e002" offset="0"/>
619 gradientUnits="userSpaceOnUse" /> 619 <stop stop-color="#a9ae01" offset=".5"/>
620 <linearGradient 620 <stop stop-color="#717501" offset="1"/>
621 inkscape:collect="always" 621 </radialGradient>
622 xlink:href="#linearGradient4478" 622 <radialGradient id="m" cx="228.81" cy="440.27" r="119.18" gradientTransform="matrix(1.1323 .76595 -1.455 2.151 588.75 -711.8)" gradientUnits="userSpaceOnUse">
623 id="linearGradient4492" 623 <stop stop-color="#ff0" offset="0"/>
624 x1="411.73212" 624 <stop stop-color="#b2b200" offset="1"/>
625 y1="405.54077" 625 </radialGradient>
626 x2="417.375" 626 <radialGradient id="dz" cx="275.44" cy="335.35" r="36.75" gradientTransform="matrix(.05911 2.687 -.72343 .01591 408.73 -424.56)" gradientUnits="userSpaceOnUse">
627 y2="401.82648" 627 <stop stop-color="#ff0" offset="0"/>
628 gradientUnits="userSpaceOnUse" /> 628 <stop stop-color="#ff0" stop-opacity="0" offset="1"/>
629 <radialGradient 629 </radialGradient>
630 inkscape:collect="always" 630 <linearGradient id="l" x1="182.35" x2="145.53" y1="256.11" y2="542.21" gradientUnits="userSpaceOnUse">
631 xlink:href="#linearGradient4862" 631 <stop stop-color="#7d7d00" offset="0"/>
632 id="radialGradient4868" 632 <stop stop-color="#c6c700" offset=".364"/>
633 cx="429.56738" 633 <stop stop-color="#f6f800" offset="1"/>
634 cy="377.42877" 634 </linearGradient>
635 fx="429.56738" 635 <radialGradient id="dy" cx="296.34" cy="427.18" r="19.704" gradientTransform="translate(-599.29 -827.09) scale(2.9797)" gradientUnits="userSpaceOnUse">
636 fy="377.42877" 636 <stop stop-opacity="0" offset="0"/>
637 r="72.079735" 637 <stop offset="1"/>
638 gradientTransform="matrix(1,0,0,0.618034,0,144.16496)" 638 </radialGradient>
639 gradientUnits="userSpaceOnUse" /> 639 <radialGradient id="dx" cx="429.57" cy="377.43" r="72.08" gradientTransform="matrix(1 0 0 .61803 0 144.16)" gradientUnits="userSpaceOnUse">
640 <radialGradient 640 <stop stop-color="#e2e2e2" offset="0"/>
641 inkscape:collect="always" 641 <stop stop-color="#e2e2e2" stop-opacity="0" offset="1"/>
642 xlink:href="#linearGradient4870" 642 </radialGradient>
643 id="radialGradient4876" 643 <radialGradient id="dw" cx="437.7" cy="391.22" r="36.612" gradientTransform="matrix(1 0 0 .61803 0 149.43)" gradientUnits="userSpaceOnUse">
644 cx="437.6991" 644 <stop stop-color="#c7bd80" offset="0"/>
645 cy="391.21735" 645 <stop stop-color="#c7bd80" stop-opacity="0" offset="1"/>
646 fx="437.6991" 646 </radialGradient>
647 fy="391.21735" 647 <linearGradient id="dv" x1="412.09" x2="417.38" y1="404.92" y2="401.83" gradientUnits="userSpaceOnUse" xlink:href="#j"/>
648 r="36.611931" 648 <linearGradient id="du" x1="411.91" x2="417.38" y1="404.92" y2="401.83" gradientUnits="userSpaceOnUse" xlink:href="#j"/>
649 gradientTransform="matrix(1,0,0,0.618034,0,149.43174)" 649 <linearGradient id="ej" x1="411.91" x2="417.38" y1="405.54" y2="401.83" gradientUnits="userSpaceOnUse" xlink:href="#j"/>
650 gradientUnits="userSpaceOnUse" /> 650 <linearGradient id="ei" x1="412.09" x2="417.38" y1="405.54" y2="401.83" gradientUnits="userSpaceOnUse" xlink:href="#j"/>
651 <radialGradient 651 <linearGradient id="eh" x1="411.73" x2="417.38" y1="405.54" y2="401.83" gradientUnits="userSpaceOnUse" xlink:href="#j"/>
652 inkscape:collect="always" 652 <linearGradient id="jr" x1="1255.7" x2="893.7" y1="667.09" y2="858.01" gradientUnits="userSpaceOnUse" xlink:href="#n"/>
653 xlink:href="#linearGradient4013" 653 <linearGradient id="ft" x1="603.84" x2="616.24" y1="627.85" y2="585.43" gradientTransform="matrix(1.0057 0 0 2.3995 3424.4 -24.137)" gradientUnits="userSpaceOnUse" xlink:href="#t"/>
654 id="radialGradient3585" 654 <radialGradient id="fl" cx="418.3" cy="342.48" r="131.45" gradientTransform="matrix(1.3957 .62111 -.42441 .95372 -15.062 -227.97)" gradientUnits="userSpaceOnUse" xlink:href="#s"/>
655 gradientUnits="userSpaceOnUse" 655 <radialGradient id="fg" cx="275.44" cy="335.35" r="36.75" gradientTransform="matrix(.05911 2.687 -.72343 .01591 408.73 -424.56)" gradientUnits="userSpaceOnUse" xlink:href="#n"/>
656 gradientTransform="matrix(1.1323239,0.7659488,-1.4550286,2.1510098,588.75376,-711.79716)" 656 <clipPath id="ga">
657 cx="228.81355" 657 <path d="M3492.3 296.46H3930v902.66h-437.7z" fill="#fff"/>
658 cy="440.26971" 658 </clipPath>
659 fx="228.81355" 659 </defs>
660 fy="440.26971" 660 <g stroke-miterlimit="1">
661 r="119.17509" /> 661 <path d="M10.45 109.38h1876.7v1563H10.45z" enable-background="new" fill="#a8a8a8" stroke="#000" stroke-width="20.9"/>
662 <linearGradient 662 <path d="M2337.1 111.42h1878.8v1565H2337.1z" enable-background="new" fill="none" stroke="#000" stroke-width="20.925"/>
663 inkscape:collect="always" 663 <path d="M2358.4 132.96h1833.4v1522.9H2358.4z" enable-background="new" fill="#a8a8a8" stroke="#f83615" stroke-width="20.391"/>
664 xlink:href="#linearGradient4084" 664 </g>
665 id="linearGradient3587" 665 <g fill-rule="evenodd">
666 gradientUnits="userSpaceOnUse" 666 <path transform="translate(-2833.5 -4370) scale(10.727)" d="M304.64 526.65c-10 .357-18.214 2.857-18.214 2.857l7.5 6.071 10.357 3.572 16.071.357 22.5-5.357 7.857 1.071 20.357-2.143-10.357 6.786c5.46-1.023 17.393 3.57 9.643 5.357-1.74.402 13.929-4.643 13.929-4.643l2.5-4.642 3.571-9.286h11.43l18.213-4.643 3.572-5-16.071 1.071-12.143 2.143-14.643-5-70.692 16.708-5.38-5.279z" enable-background="new" filter="url(#ep)" opacity=".5"/>
667 x1="182.35046" 667 <g enable-background="new">
668 y1="256.11136" 668 <path transform="matrix(.71084 -.19374 .26296 .96481 552.25 332.01)" d="m245.12 100.05s-47.128-31.647-67.215-35.801c-20.038-4.144-38.473-3.318-51.934 13.607s-12.077 61.265-13.536 86.97 2.55 70.177 17.605 88.666c15.055 18.488 45.886 13.585 49.927 21.414 2.213 4.287 65.152-174.86 65.152-174.86z" enable-background="accumulate" fill="url(#r)"/>
669 x2="145.53348" 669 <path transform="matrix(.71084 -.19374 .26296 .96481 552.25 332.01)" d="M135.38 82.018s26.344 1.939 37.633 13.903c11.415 12.097 13.735 21.332 15.296 37.735 1.563 16.425-.85 28.418-7.814 36.037s-1.004 19.583-25.916 12.071-27.032-27.783-26.515-46.305c.517-18.529 7.316-53.441 7.316-53.441z" enable-background="accumulate" fill="url(#q)"/>
670 y2="542.20502" /> 670 <path transform="matrix(.71084 -.19374 .26296 .96481 552.25 332.01)" d="M135.65 81.927s-4.645 16.365.588 28.563c5.488 12.793 27.224 44.26 27.224 54.656l22.656-5c2.542-6.966 3.21-15.752 2.188-26.5-1.562-16.403-3.867-25.621-15.281-37.719-9.655-10.232-31.593-13.375-37.375-14z" enable-background="new" fill="url(#p)"/>
671 <clipPath 671 </g>
672 clipPathUnits="userSpaceOnUse" 672 <path d="m893.6 1350.3c-4.286 0.714-27.628 3.618-57.857 10s-57.314 4.966-135.79 17.33c-79.852 12.581-94.064 42.542-108.12 47.064-14.7 4.729-145.38-65.822-145.38-65.822l4.286-94.286s85.886-16.201 112.14-33.571c26.257-17.37 45.582-49.666 59.286-71.429s32.857-71.429 32.857-71.429l238.57 262.14z" enable-background="accumulate" stroke="#000"/>
673 id="clipPath8514"> 673 <path transform="translate(324.57 331.53)" d="m332.34 898.39l-32.732-61.3-37.617 45.106c2.177 1.317 5.774-20.856 45.6-64.417l24.749 80.61z" clip-path="url(#eo)" enable-background="accumulate" fill="#fff" filter="url(#kv)" opacity=".5"/>
674 <path 674 <path transform="translate(324.57 331.53)" d="m200.82 863.03l146.37-51.619 243.95 226.27-241.83 140.01-181.02-87.681 32.527-226.98z" clip-path="url(#ku)" enable-background="accumulate" fill="url(#kt)" filter="url(#ks)"/>
675 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" 675 <path d="m691.46 835.66s-29.554 40.573-47.857 74.286-58.621 126.36-70.357 171.07c-11.759 44.803-62.5 123.57-62.5 123.57l76.071 18.214s11.807-12.823 31.071-46.071 60.357-138.57 60.357-138.57l13.214-202.5z" enable-background="accumulate" fill="#0f0f0f"/>
676 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z" 676 <path transform="translate(324.57 331.53)" d="m430.28 381.94c-7.071 2.828-236.18 32.152-236.18 32.152l-39.64 359.83 90.198 92.64 52.326-114.55 100.47-186.39 32.828-183.68z" clip-path="url(#kr)" enable-background="accumulate" fill="#fff" filter="url(#kq)" opacity=".4"/>
677 id="path8516" 677 <path d="m1018.2 1359.5s23.256 11.394 36.068 20.476c12.697 9.001 29.472 24.649 41.692 37.36 12.306 12.8 20.113 22.599 41.533 24.161 21.432 1.563 53.282-8.788 73.296-24.664 20.014-15.877 45.647-69.233 45.647-69.233l-127.16-143.07" enable-background="accumulate" stroke="#000"/>
678 sodipodi:nodetypes="cscccccccccccc" 678 <path transform="translate(324.57 331.53)" d="M331.34 641.5L216.17 835.36l44.042 90.598 97.581-193.75-26.456-90.711z" clip-path="url(#kp)" enable-background="accumulate" filter="url(#ko)" opacity=".75"/>
679 inkscape:connector-curvature="0" /> 679 <g enable-background="new">
680 </clipPath> 680 <path d="M1113.913 623.101l-.09-.002c-1.48.72-6.744.842-7.674 8.704-.872 7.373 12.962 18.694 14.976 19.936 1.626 1.001 3.407 1.81 5.174 2.325l1.403.382c1.883.43 3.679.575 5.134.496 3.16-.173 5.184-.339 7.197-.493 2.013-.155 2.577-.75 3.686-.866 1.15-.12 2.242.375 6.309-.155 4.066-.53 5.556-.79 6.288-1.07.76-.29 1.85-.663 2.534-1.25 1.952.213 3.803.145 5.281-.241 3.063-.8 5.055-1.3 6.958-1.968 1.527-.536 2.499-1.426 2.744-1.698.245-.271.181-.712.21-.73.046-.03.348-.055.546-.378 1.065-1.737 2.951-5.325 3.143-5.993.191-.664.322-1.324.417-1.713.056-.225-.045-.89-.017-.946.04-.078.315-.216.399-.457.402-1.16.34-2.183.29-3.616-.05-1.433-.438-4.695-.99-5.618-.353-.593-.703-.88-1.044-1.033-.065-.025-.118-.06-.18-.083-.02-.007-.042-.002-.061-.007-.301-.111-.586-.228-1.124-.35-.966-.22-2.379-.535-3.914-.702a19.278 19.278 0 0
681 <clipPath 6810-1.563-.085c-3.571-.097-9.064-.045-10.338.446-1.584-.518-3.852-1.06-5.845-1.144-3.069-.13-4.974-.228-6.914-.324-1.94-.095-1.72.194-2.941.134-1.32-.065-1.75-.426-5.537-.543-3.556-.11-9.035-.04-10.338.447-1.584-.52-3.85-1.06-5.845-1.144-3.07-.131-4.978-.197-6.918-.293-.66-.032-1.05.004-1.356.033z" enable-background="new" fill="#bcb786"/>
682 clipPathUnits="userSpaceOnUse" 682 <g transform="rotate(2.568 -22364 20373)" clip-path="url(#kn)" enable-background="new" filter="url(#km)">
683 id="clipPath8604"> 683 <path d="M229.94-409.12c-3.558.05-9.024.36-10.303.904-1.606-.447-3.903-.881-5.9-.877a979.03 979.03 0 0 1-6.907 0c-.66-.003-1.048.068-1.353.11v1.096c.12-.18.393-.69.95-.767.747-.103 5.17-.151 7.31-.11 1.775.035 4.455.274 6.39.96.32.113.618.273.891.41 1.964.987 7.944 4.302 7.944 4.302s-6.633-3.948-7.483-4.439c-.203-.117-.575-.258-1.036-.41 1.22-.449 5.076-.62 7.828-.713 3.024-.102 3.348-.09 5.41.192 2.13.29 3.34.602 3.34.602s-.08-.64 1.035-.794c.748-.103 5.17-.152 7.31-.11 2.07.04 5.366.407 7.282 1.37 1.003.504 3.035 1.569 4.795 2.536l.096-.02s-3.58-2.162-4.43-2.653c-.204-.117-.575-.258-1.037-.411 1.22-.448 5.047-.62 7.8-.712 3.024-.102 3.347-.09 5.41.191 1.954.267 3.013.53 3.195.576l-.027-.312a8.503 8.503 0 0 0-1.4-.357c-1.301-.235-3.4-.602-5.51-.564-3.571.064-9.052.356-10.302.904-1.606-.447-3.877-.881-5.871-.877-3.072.007-4.994.01-6.936
684 <path 6840-1.943-.009-1.713.28-2.936.274-1.322-.005-1.766-.354-5.555-.301M206.2-407.48c1.92.817 4.577 2.193 6.159 3.397s2.908 1.774 5.555 3.918c.885.718 1.748 1.35 2.591 1.922l.541-.19a57.511 57.511 0 0 1-2.269-1.622c-2.822-2.12-3.627-2.81-6.015-4.274s-4.1-2.366-6.562-3.15" enable-background="new"/>
685 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" 685 <path d="M237.8-407.48c1.92.817 4.606 2.193 6.188 3.397.813.62 1.558 1.07 2.45 1.654l.65-.116a40.414 40.414 0 0 0-2.697-1.784c-2.389-1.465-4.128-2.366-6.59-3.151" enable-background="new"/>
686 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z" 686 </g>
687 id="path8606" 687 <g transform="rotate(6.561 -6814.9 734.73)" clip-path="url(#kl)">
688 sodipodi:nodetypes="cscccccccccccc" 688 <path d="M1056.2-278.8c4.145-1.479 10 3.125 10 3.125.899.28 2.725-.894 2.624-1.686 0 0-1.55-1.86-.374-2.939s5.296 1.507 7.5 1.625 5.562-.23 7-.75 1.113-1.425 2.625-1.75 5.119 1.038 7.06 1.169 4.649.334 5.815-.169.178-1.16 1.875-1.875 7.76-.957 9.625-.125 1.81.52 2.625 3 7.44 5.163-1.125 13.375-59.378 13.786-65.625 2.75 6.23-14.271 10.375-15.75z" enable-background="new" filter="url(#kk)" opacity=".75"/>
689 inkscape:connector-curvature="0" /> 689 <path d="M1058.5-275.43c4.145-1.479 10 3.125 10 3.125.899.28 2.725-.894 2.624-1.686 0 0-1.55-1.86-.374-2.939s5.296 1.507 7.5 1.625 5.562-.23 7-.75 1.113-1.425 2.625-1.75 5.119 1.038 7.06 1.169 4.649.334 5.815-.169.178-1.16 1.875-1.875 7.76-.957 9.625-.125 1.81.52 2.625 3 7.44 5.163-1.125 13.375-59.378 13.786-65.625 2.75 6.23-14.271 10.375-15.75z" enable-background="new" filter="url(#kj)" opacity=".75"/>
690 </clipPath> 690 </g>
691 <clipPath 691 </g>
692 clipPathUnits="userSpaceOnUse" 692 <path d="M676.821 543.52c-3.804-25.264-16.81-50.638-17.157-75.525-.186-13.356 3.273-26.571 13.756-39.554 36.347-65.296 116.94-84.695 185.93-91.465 86.922-11.017 184.91 17.94 233.37 95.401 54.124 75.733 56.675 172.54 80.612 259.53 29.438 127.13 54.779 256.21 60.392 386.85-3.063 78.182-8.426 165.18-60.503 228.13-48.026 50.357-122.79 50.053-187.07 59.002-90.555 4.655-184.35-16.146-261.78-64.198-64.776-37.94-95.73-113.48-97.279-186.02-8.39-79.875 26.392-153.81 51.62-227.16 7.47-82.761 9.413-166.25 9.653-249.38-.837-32.195-7.09-63.817-11.546-95.609z" enable-background="accumulate" fill="#101414"/>
693 id="clipPath8610"> 693 <path transform="translate(324.57 331.53)" d="M311.83 415.43l9.9 121.62-60.105 136.47 15.556 174.66c15.613 61.879 32.185 98.669 74.376 117.05 4.32-36.24-38.612-142.96-39.243-189.12-.631-46.184 10.83-108.61 30.678-158.3 20.048-50.192 36.897-44.846 42.125-92.593s-17.426-149.39-17.426-149.39l-55.86 39.598z" clip-path="url(#en)" enable-background="accumulate" fill="#fff" filter="url(#ki)" opacity=".25"/>
694 <path 694 <path transform="translate(48.571 195.53)" d="m1010 655.49s16.755 37.018 28.702 53.954c11.946 16.936 52.727 56.046 52.727 56.046l52.597-127.59" enable-background="accumulate" fill="url(#kh)"/>
695 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" 695 <path transform="translate(324.57 331.53)" d="m730.32 536.57c0 8.485 42.548 58.468 42.548 58.468l12.607-28.77-55.154-29.698z" clip-path="url(#kg)" enable-background="accumulate" fill="#fff" filter="url(#kf)" opacity=".08"/>
696 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z" 696 </g>
697 id="path8612" 697 <g transform="translate(498.6 269.37)" clip-path="url(#ke)" enable-background="new">
698 sodipodi:nodetypes="cscccccccccccc" 698 <g transform="translate(-174.03 62.156)" filter="url(#em)">
699 inkscape:connector-curvature="0" /> 699 <g filter="url(#i)">
700 </clipPath> 700 <path d="M425.88 476.99c10.805-1.479 24.744 3.354 44.643 3.214s57.453-16.91 82.143-17.143 62.752 12.284 79.286 15 22.848-.158 27.5 7.857 1.927 10.747-10.357 20.714-40.79 12.636-66.071 12.857c-25.282.221-70.381 7.079-95.357 3.93s-56.938-7.824-68.929-17.858-19.851-16.732-17.5-23.929 13.837-3.164 24.643-4.643z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
701 <clipPath 701 <path d="M343.65 412.6h381.84v181.02H343.65z" enable-background="accumulate" fill="none"/>
702 clipPathUnits="userSpaceOnUse" 702 </g>
703 id="clipPath8616"> 703 <g filter="url(#i)">
704 <path 704 <path d="m861.17 390.2c-10.462 9.714-86.98 19.005-100.71 29.286s-14.753 12.888-12.143 20 6.545 9.406 25.714 8.571 98.571-27.622 98.571-21.429l-11.429-36.429z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
705 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" 705 <path d="M702.86 344.82h207.89v162.63H702.86z" enable-background="accumulate" fill="none"/>
706 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z" 706 </g>
707 id="path8618" 707 </g>
708 sodipodi:nodetypes="cscccccccccccc" 708 <g enable-background="new" opacity=".18">
709 inkscape:connector-curvature="0" /> 709 <g transform="translate(-174.03 62.156)" filter="url(#i)">
710 </clipPath> 710 <path d="M425.88 476.99c10.805-1.479 24.744 3.354 44.643 3.214s57.453-16.91 82.143-17.143 62.752 12.284 79.286 15 22.848-.158 27.5 7.857 1.927 10.747-10.357 20.714-40.79 12.636-66.071 12.857c-25.282.221-70.381 7.079-95.357 3.93s-56.938-7.824-68.929-17.858-19.851-16.732-17.5-23.929 13.837-3.164 24.643-4.643z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
711 <clipPath 711 <path d="M343.65 412.6h381.84v181.02H343.65z" enable-background="accumulate" fill="none"/>
712 clipPathUnits="userSpaceOnUse" 712 </g>
713 id="clipPath8622"> 713 <g transform="translate(-174.03 62.156)" filter="url(#i)">
714 <path 714 <path d="m861.17 390.2c-10.462 9.714-86.98 19.005-100.71 29.286s-14.753 12.888-12.143 20 6.545 9.406 25.714 8.571 98.571-27.622 98.571-21.429l-11.429-36.429z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
715 style="display:inline;opacity:1;fill:#202020;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 715 <path d="M702.86 344.82h207.89v162.63H702.86z" enable-background="accumulate" fill="none"/>
716 d="m 821.64329,477.88997 c 0,0 22.61947,-6.50681 35.74275,-5.87273 13.12328,0.63409 30.64158,1.93862 43.70885,12.18619 13.06727,10.24756 25.06774,27.14007 34.11239,58.36965 9.04465,31.22958 1.69832,99.25201 -6.17603,143.34735 -7.87435,44.09534 -28.2651,106.11298 -45,140 -16.7349,33.88702 -49.79771,77.4952 -60.56943,89.87616 -11.36422,13.06197 -56.20589,36.42617 -79.43057,42.26667 5.3033,-10.6066 48.89976,-50.58884 35,-60.71426 -14.01897,-10.21226 -45.76009,45.98236 -84.29315,29.03317 21.38231,-13.13212 41.7794,-51.18606 34.04061,-66.59445 -7.84025,-15.61039 -30.70493,48.75757 -93.53554,37.01288 30.05204,-27.52666 55.40706,-70.90401 41.2627,-82.9797 -14.41516,-12.30687 -60.46175,54.29315 -60.46175,54.29315 0,0 -2.8219,-41.70118 13.7732,-68.60732 16.63935,-26.97787 79.65297,-81.61527 99.55313,-111.70342 19.90015,-30.08814 33.61256,-66.00902 42.13542,-92.51794 8.52286,-26.50892 15.80094,-77.09954 15.80094,-77.09954" 716 </g>
717 id="path8624" 717 </g>
718 sodipodi:nodetypes="czzzzzzczczczczzzc" 718 </g>
719 inkscape:connector-curvature="0" /> 719 <g transform="translate(48.571 195.53)" fill-rule="evenodd">
720 </clipPath> 720 <path transform="translate(276 136)" d="m582.66-7.418l113.14 86.267 108.89 258.8 38.184 207.89 120.21 91.924s-12.728-287.09-19.799-313.96-149.91-393.15-149.91-393.15l-210.72 62.225z" clip-path="url(#kd)" enable-background="accumulate" filter="url(#kc)" opacity=".75"/>
721 <clipPath 721 <path d="m964.14 239.6s8.677 10.897 24.107 11.964c15.43 1.068 49.722-39.953 70.179-52.143 20.479-12.204 47.046-26.602 63.929-20.357 16.882 6.245 22.158 26.436 27.857 48.036 5.7 21.6 6.719 61.814-2.679 92.857-9.397 31.043-50.502 73.104-65.356 103.39s-11.607 39.821-11.607 39.821" enable-background="accumulate" fill="url(#el)"/>
722 clipPathUnits="userSpaceOnUse" 722 <path d="m1124.5 207.63c-15.893-0.893-49.719 12.106-66.071 24.286-16.439 12.244-29.221 24.114-29.286 52.143-0.065 28.206 13.119 39.076 29.107 46.964s33.686 7.12 51.964-11.786c18.278-18.905 14.286-111.61 14.286-111.61z" enable-background="new" fill="url(#ek)"/>
723 id="clipPath8642"> 723 <ellipse transform="matrix(.94347 -.12399 .14401 1.0958 451.95 134.6)" cx="385" cy="237.01" rx="86.429" ry="73.929" clip-path="url(#kb)" enable-background="accumulate" fill="url(#ef)" filter="url(#je)" opacity=".75"/>
724 <path 724 <path transform="translate(450.03 73.844)" d="m527.61 407.45s-122.04 38.403-187.51 9.632c-65.473-28.772-74.377-124.72-74.377-124.72s73.382-80.504 129.92-83.615c55.827-3.072 90.574 20.143 114.87 65.852 24.352 45.813 17.101 132.85 17.101 132.85z" enable-background="accumulate" fill="url(#jd)" mask="url(#jc)"/>
725 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#0f0f0f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" 725 <path d="m772.17 393.35s36.218-27.382 51.607-35.893c15.177-8.393 25.714-11.607 35.893-11.607l-15.536 66.964" enable-background="accumulate" fill="url(#ee)"/>
726 d="m 366.88839,504.13471 c 0,0 -29.55406,40.57305 -47.85714,74.28571 -18.30309,33.71267 -58.62109,126.35694 -70.35714,171.07143 -11.7594,44.80344 -62.5,123.57144 -62.5,123.57144 l 76.07143,18.21428 c 0,0 11.80712,-12.82335 31.07142,-46.07143 19.2643,-33.24808 60.35715,-138.57143 60.35715,-138.57143 l 13.21428,-202.5 z" 726 <circle transform="translate(449.5 74.915)" cx="409.29" cy="306.65" r="36.25" enable-background="accumulate" fill="url(#ed)"/>
727 id="path8644" 727 <path transform="translate(276 136)" d="m311.83 415.43l9.9 121.62-60.105 136.47 15.556 174.66c15.613 61.879 32.185 98.669 74.376 117.05 4.32-36.24 8.682-72.368-31.243-223.12l17.678-69.296 72.125-138.59-42.426-158.39-55.86 39.598z" clip-path="url(#en)" enable-background="accumulate" fill="#fff" filter="url(#jb)" opacity=".3"/>
728 sodipodi:nodetypes="czzcczcc" 728 <path d="m635.21 581.13c-14.142 12.728 39.233 34.58 76.368 24.042s104.64-35.564 103.24-79.196c-1.407-43.632-76.368-128.69-76.368-128.69l-103.24 183.85z" enable-background="accumulate" filter="url(#ja)" opacity=".5"/>
729 inkscape:connector-curvature="0" /> 729 <circle transform="translate(449.67 74.915)" cx="410" cy="306.65" r="23.214" enable-background="accumulate" fill="url(#ec)"/>
730 </clipPath> 730 <circle transform="translate(452 73.487)" cx="414.29" cy="303.08" r="7.5" enable-background="accumulate" fill="#fff" filter="url(#iz)" stroke="#000" stroke-linejoin="bevel"/>
731 <clipPath 731 <path d="m789.32 478.35s7.023 19.569-1.071 35-42.323 38.988-67.5 50c-25.31 11.07-85.473 32.964-101.79 41.964-16.461 9.082-18.214 12.679-18.214 12.679s-7.147-19.064 28.75-51.786c36.172-32.972 142.03-48.05 159.82-87.857z" enable-background="accumulate" fill="url(#eb)"/>
732 clipPathUnits="userSpaceOnUse" 732 </g>
733 id="clipPath8658"> 733 <g enable-background="new">
734 <path 734 <g transform="translate(829.32 270.09)" fill-rule="evenodd">
735 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#0b0b0b;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" 735 <path transform="translate(-329.81)" d="M179.64 267.36c-22.41 39.703-60.616 115.78-69.286 149.64-8.647 33.775-8.772 66.417-.357 86.429 8.36 19.882 26.164 35.633 40.714 41.429-.597-14.376 14.373-43.286 72.857-72.5 58.626-29.285 78.382-27.131 103.57-47.143 25.63-20.362 8.206-79.647 3.214-93.929s-1.236-3.38-1.946-5.093c-10.689-25.816-34.214-54.43-64.483-64.55s-65.018-4.848-84.286 5.714z" clip-path="url(#ea)" fill="url(#m)"/>
736 d="m 569.03125,1018.7776 c -4.28571,0.7143 -27.62815,3.6181 -57.85714,10 -30.22899,6.3819 -99.77493,25.9619 -142.85715,35.7143 -43.08222,9.7524 -117.26443,34.816 -156.91262,27.2654 -39.64818,-7.5506 -89.51595,-64.4083 -89.51595,-64.4083 l 4.28572,-94.28571 c 0,0 85.88551,-16.20094 112.14285,-33.57143 26.25735,-17.37049 45.58238,-49.66598 59.28572,-71.42857 13.70334,-21.76259 32.85714,-71.42858 32.85714,-71.42858 l 238.57143,262.14289 z" 736 <ellipse transform="rotate(28.068 -88.085 -332.1)" cx="183.57" cy="338.08" rx="64.716" ry="134.01" enable-background="accumulate" fill="url(#dz)"/>
737 id="path8660" 737 <ellipse transform="rotate(28.068 -43.578 -333.81)" cx="183.57" cy="338.08" rx="64.716" ry="134.01" enable-background="accumulate" fill="url(#iy)"/>
738 sodipodi:nodetypes="czzzcczzcc" 738 </g>
739 inkscape:connector-curvature="0" /> 739 <path transform="translate(499.51 270.09)" d="M179.64 267.36c-22.41 39.703-60.616 115.78-69.286 149.64-8.647 33.775-8.772 66.417-.357 86.429 8.36 19.882 26.164 35.633 40.714 41.429-.597-14.376 14.373-43.286 72.857-72.5 58.626-29.285 78.382-27.131 103.57-47.143 25.63-20.362 8.206-79.647 3.214-93.929s-1.236-3.38-1.946-5.093c-10.689-25.816-34.214-54.43-64.483-64.55s-65.018-4.848-84.286 5.714z" clip-path="url(#ea)" enable-background="new" fill="none" filter="url(#ix)" stroke="url(#l)" stroke-width="20.8"/>
740 </clipPath> 740 </g>
741 <filter 741 <g transform="translate(48.571 195.53)" fill-rule="evenodd">
742 inkscape:collect="always" 742 <circle transform="translate(452.56 72.581)" cx="310.71" cy="398.08" r="19.704" enable-background="accumulate" stroke="#000" stroke-linejoin="bevel"/>
743 id="filter8802" 743 <circle transform="translate(450.56 72.581)" cx="310.71" cy="398.08" r="19.704" enable-background="accumulate" fill="url(#m)" filter="url(#iw)" stroke="url(#l)" stroke-width="20.8"/>
744 x="-0.35311759" 744 <circle transform="translate(450.56 72.581)" cx="310.71" cy="398.08" r="19.704" enable-background="accumulate" fill="url(#dy)"/>
745 width="1.7062352" 745 <ellipse transform="rotate(-4.471 1823.1 -5529.2)" cx="429.57" cy="377.43" rx="72.08" ry="44.548" enable-background="accumulate" fill="url(#dx)" filter="url(#iv)"/>
746 y="-0.1817714" 746 <ellipse transform="matrix(1.4358 -.07 .07 1.4358 235.18 -63.865)" cx="437.7" cy="391.22" rx="36.612" ry="22.627" enable-background="accumulate" fill="url(#dw)" filter="url(#iu)"/>
747 height="1.3635428"> 747 <g transform="translate(450.03 73.844)" enable-background="new" filter="url(#it)">
748 <feGaussianBlur 748 <circle cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#dv)"/>
749 inkscape:collect="always" 749 <circle transform="translate(13.125 8.125)" cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#du)"/>
750 stdDeviation="48.038491" 750 <circle transform="translate(32.946 7.5)" cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#ej)"/>
751 id="feGaussianBlur8804" /> 751 <circle transform="translate(24.911 -10.268)" cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#ei)"/>
752 </filter> 752 <circle transform="translate(47.589 -.625)" cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#eh)"/>
753 <filter 753 </g>
754 inkscape:collect="always" 754 </g>
755 id="filter8806" 755 <g fill="none" stroke="#000">
756 x="-0.61142862" 756 <path d="M944.771 678.46c.985 4.35 4.537 6.18 7.387 7.892 4.46 2.513 6.52 1.522 9.154-.758 1.602-1.921 10.683-4.698 15.594-7.07 4.33-1.46 8.904-5.36 13.385-8.335 3.395-1.627 5.347.355 7.829 1.01 2.944.717 4.411 2.172 6.06 3.536 2.397 1.175-.927 3.143 3.284 4.293 1.19.218 2.417.577 3.283-.505" enable-background="new"/>
757 width="2.2228572" 757 <path d="M959.421 670.88c2.315-.032 3.178.643 5.493-.82 3.455-3.082 5.402-3.146 7.955-4.42 3.026-1.315 6.535 8.152 10.102 9.849 2.395-.822 1.289 1.794 1.452 2.651.057 2.647 2.807 3.679 4.356 5.43 3.316 2.256 7.375 6.296 11.112 5.303 6.445-2.93 10.28-1.281 16.29-7.386.703-1.182-.585-6.895 3.093-7.198 2.524.254 4.166.05 6.06.569 5.442 2.117 7.738 6.45 14.71 7.955 6.184.966 7.613 3.794 13.89 5.05M925.551 679.05c2.399-.794 6.106 4.192 8.173 7.046.593 2.68 1.154 5.486.758 12.122.785 2.417 2.68 3.03 4.798 3.283 3.117-.537 5.877-1.325 7.324-3.03 1.871-1.943 5.312 2.393 8.08 4.04 3.61 1.912 7.775 1.979 11.87 2.273 1.703-.231 2.37 4.515 3.283 8.08.384 4.379-.886 6.896-1.768 9.85-.294 2.496 2.988 3.53 6.313 4.545 3.183.742 6.545 1.662 9.092 1.768 5.142.875 8.088 2.69 12.122 4.04 2.239.817 3.26 2.243 4.545 3.536" enable-background="new"/>
758 y="-0.14930232" 758 </g>
759 height="1.2986046"> 759 <g fill-rule="evenodd">
760 <feGaussianBlur 760 <path transform="translate(324.57 331.53)" d="m332 187.7s57.5-25.5 57.5-28 5.5-52 5.5-52 91-48.5 91.5-50.5 86-62 86-62l-186 22-75.5 106z" clip-path="url(#jz)" enable-background="new" fill="#fff" filter="url(#jy)" opacity=".25"/>
761 inkscape:collect="always" 761 <path d="m1745.9 918.08s-115.97 73.539-123.04 77.782c-7.071 4.243-230.52 137.18-230.52 137.18l4.243 39.598 216.37-100.41 117.38-101.82 15.556-52.326z" enable-background="accumulate" fill="#fff" opacity=".25"/>
762 stdDeviation="37.830213" 762 <path transform="translate(324.57 331.53)" d="m528.92 556.85c-5.657-1.414-181.02 74.953-181.02 74.953l-33.941 181.02 51.095 193.95 257.2 67.681s206.48 152.74 212.13 148.49c5.657-4.243 168.29-193.75 168.29-193.75l-159.81-183.85-46.669-178.19-267.29-110.31z" clip-path="url(#jx)" enable-background="accumulate" filter="url(#eg)" opacity=".5"/>
763 id="feGaussianBlur8808" /> 763 <path d="m1146.2 809.42s22.62-6.507 35.743-5.873 30.642 1.939 43.709 12.186c13.067 10.248 25.068 27.14 34.112 58.37 9.045 31.23 1.698 99.252-6.176 143.35-7.874 44.095-28.265 106.11-45 140-16.735 33.887-49.798 77.495-60.57 89.876-11.363 13.062-56.205 36.426-79.43 42.267 5.303-10.607 48.9-50.589 35-60.714-14.02-10.212-45.76 45.982-84.293 29.033 21.382-13.132 41.779-51.186 34.04-66.594-7.84-15.61-30.704 48.758-93.535 37.013 30.052-27.527 55.407-70.904 41.263-82.98-14.415-12.307-60.462 54.293-60.462 54.293s-2.822-41.7 13.773-68.607c16.639-26.978 79.653-81.615 99.553-111.7 19.9-30.088 33.613-66.009 42.136-92.518s15.8-77.1 15.8-77.1" enable-background="new" fill="#0c0c0c"/>
764 </filter> 764 <path transform="translate(324.57 331.53)" d="m770.75 609.18l-50.912 97.581-79.903 111.02 34.648 71.418 42.426 79.196 72.125-45.255 14.142-192.33 21.213-138.59-14.142-90.156-39.598 107.13z" clip-path="url(#jw)" enable-background="accumulate" fill="#fff" filter="url(#jv)" opacity=".25"/>
765 <filter 765 <path transform="translate(324.57 331.53)" d="m295 846.2l6.645-68.923s90.32 89.005 162.36 122.92 308 62 308 62l154-26-36 162-286 26-298-89-11-189z" clip-path="url(#ju)" enable-background="accumulate" filter="url(#eg)"/>
766 inkscape:collect="always" 766 <path transform="translate(498.6 269.37)" d="m405.8 845.99l74.953 65.054 2.5 16.88 19.403 10.159 6.492 23.051 31.709-8.371 14.849 48.083c12.257 12.728 89.793-113.11 55.86 38.184l-60.81 16.264-89.203-94.693-62.825-53.8 7.07-60.811z" clip-path="url(#jt)" enable-background="new" fill="#fff" filter="url(#o)"/>
767 id="filter8810" 767 <path d="m1207.9 1113.9c54.286-1.429 126.04-15.052 170-26.786 44.053-11.757 125.89-36.347 175.36-57.857 49.339-21.453 113.6-59.282 154.29-92.143 40.508-32.721 52.39-55.82 60.714-33.571 8.37 22.368-16.407 56.326-37.857 81.071-21.604 24.923-52.731 52.705-98.929 89.286s-156.08 101.58-212.86 128.57c-57.066 27.125-128.2 58.238-172.14 72.5s-131.43 31.071-131.43 31.071l92.857-192.14z" enable-background="accumulate" fill="#121212"/>
768 x="-0.23519406" 768 <path transform="translate(498.6 269.37)" d="m1241.6 652.95s-64.722 54.337-145.66 98.995c-82.024 45.255-284.26 93.338-284.26 93.338s-15.101 21.052 45.255 28.284 224.08-53.301 278.6-96.167 120.21-111.72 120.21-111.72l-14.142-12.728z" clip-path="url(#js)" enable-background="accumulate" fill="url(#jr)" filter="url(#jq)" opacity=".5"/>
769 width="1.4703881" 769 </g>
770 y="-0.24500646" 770 <g transform="translate(498.6 269.37)" clip-path="url(#jp)" enable-background="new">
771 height="1.4900129"> 771 <g filter="url(#em)">
772 <feGaussianBlur 772 <g transform="translate(-174.03 62.156)" filter="url(#i)">
773 inkscape:collect="always" 773 <path d="m1268.3 663.77s-0.296 26.161 4.643 37.857 20.038 26.487 28.572 31.429 18.929 8.571 18.929 8.571l117.86-115 17.857-75.714-96.43 38.571-91.428 74.286z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
774 stdDeviation="58.328041" 774 <path d="M1197.8 486.14h333.75v309.71H1197.8z" enable-background="accumulate" fill="none"/>
775 id="feGaussianBlur8812" /> 775 </g>
776 </filter> 776 </g>
777 <filter 777 <g transform="translate(-174.03 62.156)" enable-background="new" filter="url(#i)" opacity=".18">
778 inkscape:collect="always" 778 <path d="m1268.3 663.77s-0.296 26.161 4.643 37.857 20.038 26.487 28.572 31.429 18.929 8.571 18.929 8.571l117.86-115 17.857-75.714-96.43 38.571-91.428 74.286z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
779 id="filter8814" 779 <path d="M1197.8 486.14h333.75v309.71H1197.8z" enable-background="accumulate" fill="none"/>
780 x="-0.20466694" 780 </g>
781 width="1.4093339" 781 </g>
782 y="-0.29007819" 782 <path transform="translate(498.6 269.37)" d="M1264.2 605c-4.491.733-8.157 3.455-11.938 6.406-10.081 7.87-28.17 34.425-48.031 50.47-39.867 32.202-104 69.976-152.56 91.093-48.614 21.137-130.54 45.818-174.31 57.5-43.398 11.582-115.04 25.131-168.25 26.531l-4.562.125-2 4.125-92.844 192.12-6.5 13.47 14.656-2.845s87.27-16.65 132.34-31.28c44.725-14.518 115.79-45.668 173.03-72.876 57.603-27.38 166.94-91.98 214.28-129.47 46.36-36.71 77.805-64.717 99.938-90.25 10.9-12.576 22.745-27.53 31.03-42.75 8.287-15.219 19.16-44.218 13.688-58.844-1.218-3.254-2.552-6.06-4.594-8.5s-8.475-1.572-8.563-5.03c-.21-8.266-3.315-.245-4.812 0zm2.156 15.219c.415.586 1.031 1.558 1.782 3.563 2.896 7.742-1.441 31.899-8.813 45.438s-22.638 28.924-33.188 41.094c-21.075 24.314-51.904 51.862-97.938 88.312-45.05 35.672-155.46 101.09-211.41 127.69-56.892 27.042-128.1 58.118-171.25 72.125-36.365 11.803-95.845 23.834-115.72
783 height="1.5801564"> 78327.78l84.281-174.47c54.707-2.049 123.79-15.215 167.12-26.78 44.334-11.832 126.08-36.336 176.41-58.22 50.112-21.788 112.53-61.167 154.03-94.687 20.646-16.677 41.745-42.546 49.813-48.844 2.437-1.903 4.08-2.636 4.875-3z" clip-path="url(#jo)" enable-background="accumulate" fill="#050505" fill-rule="evenodd" filter="url(#jn)" opacity=".833"/>
784 <feGaussianBlur 784 <g transform="rotate(6.561 -6814.9 734.74)" enable-background="new" fill-rule="evenodd" mask="url(#jm)">
785 inkscape:collect="always" 785 <path d="M1111.48-285.971l-3.937 1.875c-.041.01-.1.02-.125.031-.42.213-.165.1-.657.312-.486.21-1.737.585-4.093 1.47-3.332 1.25-5.805 2.15-7 3.062-1.537.021-3.72.233-5.657.719a227.677 227.677 0 0 1-6.75 1.593c-1.894.42-1.675.642-2.875.875-1.296.252-1.721-.009-5.437.782-3.49.742-8.895 1.93-10.156 2.687-1.584-.18-3.868-.322-5.844-.031-3.04.447-4.916.673-6.844.906-.655.08-1.04.2-1.343.281-.427.132-.686.26-1.375.344-1.312.16-1.763-.157-5.532.281-3.554.413-9.005 1.273-10.25 1.938-1.599-.297-3.857-.534-5.843-.344-3.06.293-4.972.484-6.907.656-1.934.173-1.688.423-2.906.532-1.316.117-1.76-.164-5.531.25-3.542.388-9.008 1.209-10.281 1.875-1.6-.295-3.887-.507-5.875-.313-3.058.3-4.941.48-6.875.656-.658.06-1.04.179-1.344.25-.428.12-.683.218-1.375.282-1.316.12-1.76-.195-5.531.218-3.556.39-9.006 1.24-10.25
786 stdDeviation="22.300169" 7861.907-1.599-.295-3.86-.524-5.844-.313-3.056.325-4.974.526-6.906.719s-1.69.44-2.906.562c-1.315.132-1.763-.164-5.532.282-3.538.418-8.977 1.292-10.25 1.968-1.597-.28-3.86-.42-5.843-.187-3.052.358-4.945.568-6.875.781-.657.073-1.041.173-1.344.25-.427.127-.685.267-1.375.344-1.314.146-1.768-.174-5.531.312-3.55.46-8.979 1.42-10.22 2.125-1.592-.244-3.833-.381-5.812-.125-3.047.395-4.95.649-6.875.907-1.924.257-1.726.493-2.937.656-1.31.176-1.748-.105-5.5.469-3.525.538-8.924 1.699-10.188 2.437-1.588-.203-3.846-.255-5.813.094-3.026.536-4.899.861-6.812 1.187-.65.111-1.014.271-1.313.375-.42.165-.663.332-1.344.469-1.294.262-1.727-.006-5.437.813-3.499.771-8.846 2.382-10.062 3.218-1.563-.077-3.758.086-5.688.594-2.972.783-4.817 1.232-6.687 1.75s-1.667.767-2.844 1.094c-1.272.353-1.697.107-5.344 1.187-3.424 1.015-8.65 2.934-9.875 3.844-1.539.013-3.72.272-5.625.875-2.93.928-4.75 1.459-6.594
787 id="feGaussianBlur8816" /> 7872.063-.626.205-.991.392-1.28.53-.408.215-.654.41-1.313.626-1.255.411-1.686.189-5.281 1.437-3.39 1.178-8.595 3.214-9.782 4.157-1.524.06-3.65.395-5.53 1.062-2.898 1.028-4.7 1.676-6.532 2.313-1.832.637-1.628.848-2.781 1.25-1.247.434-1.664.2-5.22 1.562-3.338 1.28-8.486 3.483-9.687 4.469-1.507.108-3.635.499-5.5 1.219a1047.26 1047.26 0 0 1-6.437 2.469c-.617.233-.997.442-1.281.593v.031l-8 3.188-12.476 3.492 7.93 19.278c-.592 1.973 12.545-4.739 12.545-4.739.227-.144.45-.272.72-.375 1.08-.41 2.17-.215 6-1.687 3.828-1.472 5.223-2.005 5.905-2.406.68-.4 1.612-.88 2.22-1.531 1.826-.138 3.57-.494 4.937-1 2.968-1.1 4.875-1.807 6.78-2.47 1.907-.662 2.355-1.414 3.407-1.78 1.092-.38 2.195-.166 6.063-1.532 3.867-1.366 5.283-1.827 5.968-2.218.702-.4 1.701-.933 2.313-1.594 1.97-.055 3.817-.385 5.281-.875 3.002-1.005 4.926-1.622 6.844-2.25 1.538-.504 2.174-1.047 2.906-1.438.23-.134.476-.253.75-.343 1.098-.36
788 </filter> 7882.181-.082 6.094-1.313 3.912-1.231 5.366-1.673 6.062-2.031.694-.357 1.63-.793 2.25-1.406 1.866-.023 3.636-.267 5.032-.688 3.03-.913 4.992-1.43 6.937-1.969 1.945-.538 2.426-1.264 3.5-1.562 1.114-.31 2.22.007 6.188-1.031 3.967-1.039 5.417-1.433 6.125-1.75.734-.33 1.813-.754 2.437-1.375 1.998.116 3.857-.02 5.344-.375 3.078-.735 5.083-1.101 7.062-1.5 1.588-.32 2.245-.79 3-1.094a3.4 3.4 0 0 1 .75-.25c1.134-.23 2.305.209 6.344-.5 4.04-.71 5.5-.927 6.219-1.188.716-.26 1.704-.567 2.344-1.093 1.924.239 3.748.224 5.187 0 3.127-.488 5.155-.701 7.156-.97 2.002-.267 2.49-.944 3.594-1.093 1.147-.154 2.276.302 6.344-.219 4.068-.52 5.56-.695 6.281-.937.737-.247 1.798-.586 2.438-1.125 2.05.335 3.973.398 5.5.218 3.142-.368 5.18-.559 7.187-.78 1.611-.179 2.265-.609 3.031-.845.241-.085.495-.155.782-.187 1.15-.128 2.301.347 6.375-.125s5.559-.61 6.28-.844c.72-.232 1.701-.473 2.345-.969 1.936.334 3.77.405
789 <filter 7895.219.25 3.146-.334 5.177-.518 7.187-.718 2.01-.2 2.484-.827 3.594-.938 1.15-.115 2.296.365 6.375-.062s5.589-.562 6.312-.782c.74-.223 1.796-.513 2.438-1.03 2.057.398 4.002.493 5.531.343 3.149-.308 5.176-.473 7.188-.656 1.614-.147 2.263-.56 3.03-.781.242-.081.494-.13.782-.157 1.152-.105 2.293.393 6.375 0s5.589-.53 6.312-.75c.721-.218 1.7-.447 2.344-.937 1.938.35 3.769.454 5.219.312 3.149-.308 5.176-.473 7.187-.656 2.012-.183 2.515-.838 3.625-.937 1.153-.104 2.293.384 6.375 0 4.083-.385 5.59-.501 6.313-.72.74-.222 1.796-.514 2.437-1.03 2.058.401 4.003.503 5.532.343 3.146-.328 5.177-.522 7.187-.718 1.613-.158 2.266-.632 3.031-.875.241-.088.464-.122.75-.157 1.149-.14 2.317.34 6.375-.25 4.059-.59 5.562-.777 6.282-1.03.716-.254 1.674-.559 2.312-1.095 1.92.212 3.72.152 5.156-.093 3.12-.533 5.112-.929 7.094-1.313 1.982-.384 2.474-1.04 3.563-1.281 1.128-.25 2.27.116 6.25-.875s5.43-1.42
790 inkscape:collect="always" 7906.125-1.781c.722-.376 1.761-.87 2.375-1.531 1.963-.012 3.793-.292 5.218-.844 2.952-1.145 4.874-1.87 6.688-2.75 1.456-.707 2.32-1.702 2.531-2 .212-.298.1-.729.125-.75.043-.035.34-.094.5-.438.86-1.847 2.323-5.627 2.438-6.312.113-.682.168-1.353.218-1.75.03-.23-.147-.88-.125-.938.031-.082.289-.25.344-.5.266-1.198.09-2.207-.125-3.625-.214-1.417-.972-4.614-1.625-5.469-.659-.861-1.225-1.01-1.75-1z" enable-background="new" fill="#bcb786"/>
791 id="filter8818" 791 <g clip-path="url(#jl)">
792 x="-0.34381232" 792 <path d="M1107.4-284.05c-.419.213-.156.094-.647.306-.486.21-1.724.574-4.08 1.459-3.33 1.25-5.83 2.153-7.026 3.066-1.536.021-3.72.233-5.656.719a227.709 227.709 0 0 1-6.75 1.593c-1.895.42-1.676.643-2.875.875-1.297.252-1.721-.009-5.438.782-3.49.742-8.894 1.93-10.156 2.687-1.583-.18-3.867-.322-5.843-.031-3.04.447-4.917.673-6.844.906-.655.08-1.041.201-1.344.282-.426.131-.686.26-1.375.343-1.311.16-1.762-.157-5.531.282-3.554.413-9.005 1.272-10.25 1.937-1.599-.297-3.858-.534-5.844-.344-3.059.294-4.972.484-6.906.657-1.934.172-1.689.422-2.906.53-1.317.118-1.76-.163-5.532.25-3.541.39-9.007 1.21-10.28 1.876-1.6-.295-3.888-.507-5.876-.313-3.058.3-4.94.48-6.875.657-.657.06-1.04.178-1.343.25-.428.118-.684.218-1.375.28-1.316.121-1.76-.194-5.532.22-3.556.39-9.005 1.239-10.25
793 width="1.6876246" 7931.906-1.598-.294-3.86-.524-5.843-.313-3.056.326-4.974.526-6.907.719-1.932.192-1.69.44-2.906.562-1.315.132-1.763-.164-5.53.282-3.54.418-8.979 1.292-10.25 1.969-1.599-.282-3.86-.42-5.845-.188-3.052.358-4.945.568-6.875.781-.656.073-1.04.173-1.344.25-.426.127-.684.267-1.375.344-1.313.146-1.767-.174-5.53.313-3.55.458-8.98 1.419-10.22 2.125-1.593-.245-3.834-.382-5.812-.125-3.048.394-4.95.648-6.875.906-1.925.258-1.726.493-2.938.656-1.31.176-1.747-.104-5.5.469-3.524.538-8.923 1.699-10.188 2.437-1.587-.203-3.845-.254-5.812.094-3.026.536-4.9.862-6.813 1.187-.65.111-1.013.271-1.312.375-.42.165-.664.332-1.344.47-1.295.26-1.727-.007-5.438.812-3.498.772-8.846 2.383-10.062 3.219-1.562-.078-3.757.085-5.687.593-2.972.783-4.818 1.232-6.688 1.75s-1.666.768-2.843 1.094c-1.273.353-1.697.107-5.344 1.188-3.425 1.014-8.65 2.933-9.875 3.843-1.539.013-3.72.273-5.625.875-2.931.928-4.75 1.459-6.594
794 y="-0.18433961" 7942.063-.627.205-.992.392-1.281.531-.408.214-.653.409-1.313.625-1.254.412-1.686.19-5.28 1.438-3.39 1.177-8.596 3.213-9.782 4.156-1.524.06-3.65.395-5.531 1.062-2.898 1.029-4.7 1.676-6.531 2.313-1.833.637-1.628.848-2.782 1.25-1.246.434-1.663.2-5.218 1.562-3.34 1.28-8.488 3.483-9.688 4.47-1.507.107-3.636.498-5.5 1.218a1044.752 1044.752 0 0 1-6.437 2.469c-.617.233-.997.442-1.282.593v1.094c.112-.222.386-.817.907-1.094.698-.37 4.813-1.993 6.812-2.718 1.657-.602 4.154-1.329 5.969-1.313.302.003.588.051.844.094 1.842.308 7.468 1.562 7.468 1.562s-6.233-1.646-7.03-1.843c-.191-.048-.536-.07-.97-.063 1.146-.87 4.762-2.393 7.344-3.437 2.839-1.148 3.117-1.252 5.063-1.657 2.008-.417 3.156-.5 3.156-.5s-.082-.6.969-1.125c.705-.351 4.887-1.892 6.906-2.562 1.952-.648 5.057-1.359 6.875-1 1.863.367 7.531 1.812 7.531 1.812s-6.287-1.87-7.094-2.093c-.193-.054-.53-.086-.968-.094 1.158-.833 4.794-2.195 7.406-3.156
795 height="1.3686792"> 7952.87-1.056 3.167-1.162 5.125-1.532 1.853-.35 2.859-.425 3.031-.437.114-.217.377-.81.906-1.063.71-.338 4.926-1.712 6.97-2.312 1.692-.497 4.24-1.037 6.093-.906.308.021.613.097.875.156 1.881.424 7.594 2.031 7.594 2.031s-6.342-2.065-7.157-2.312c-.194-.06-.557-.104-1-.125 1.17-.798 4.863-2.057 7.5-2.938 2.898-.968 3.233-1.003 5.22-1.281 2.049-.287 3.187-.313 3.187-.313s-.073-.607 1-1.062c.72-.306 4.99-1.5 7.062-2 2.003-.483 5.199-.928 7.063-.406 1.91.535 7.719 2.5 7.719 2.5s-6.423-2.424-7.25-2.72c-.198-.07-.583-.14-1.032-.187 1.188-.728 4.916-1.774 7.594-2.5 2.944-.797 3.292-.77 5.313-.906 1.913-.128 2.947-.07 3.125-.062.117-.204.391-.78.937-.97.732-.253 5.079-1.047 7.188-1.374 1.748-.271 4.4-.485 6.312-.094.318.065.605.186.875.281 1.94.69 7.844 3.094 7.844 3.094s-6.535-2.95-7.375-3.312c-.201-.087-.575-.167-1.031-.25 1.206-.633 5.03-1.396 7.75-1.906 2.99-.562 3.3-.53 5.344-.532 2.109-.002
796 <feGaussianBlur 7963.312.125 3.312.125s-.073-.63 1.031-.937c.74-.206 5.126-.834 7.25-1.063 2.053-.22 5.319-.252 7.22.47 1.947.738 7.843 3.374 7.843 3.374s-6.563-3.179-7.406-3.562c-.202-.092-.543-.187-1-.282 1.21-.602 4.984-1.248 7.718-1.656 3.005-.448 3.326-.452 5.375-.406 1.94.043 3.007.194 3.188.219.119-.194.384-.766.937-.907.743-.188 5.155-.734 7.282-.937 1.763-.169 4.42-.234 6.343.25.32.08.604.203.875.312 1.953.784 7.907 3.47 7.907 3.47s-6.592-3.254-7.438-3.657c-.202-.096-.572-.207-1.031-.313 1.214-.574 5.044-1.122 7.781-1.5 3.009-.415 3.323-.442 5.375-.375 2.118.07 3.313.25 3.313.25s-.078-.637 1.03-.906c.745-.18 5.153-.663 7.282-.844 2.059-.174 5.343-.124 7.25.657 1.955.8 7.875 3.53 7.875 3.53s-6.56-3.308-7.406-3.718c-.202-.098-.572-.203-1.031-.312 1.215-.564 5.01-1.115 7.75-1.47 3.01-.389 3.321-.397 5.375-.312 1.944.08 3.006.254 3.187.282.12-.191.383-.746.938-.875.744-.174 5.15-.65 7.28-.813
797 inkscape:collect="always" 7971.767-.134 4.45-.126 6.376.375.32.083.603.201.875.313 1.954.8 7.906 3.562 7.906 3.562s-6.591-3.34-7.437-3.75c-.203-.098-.572-.203-1.032-.312 1.215-.564 5.042-1.084 7.782-1.438 3.01-.39 3.352-.429 5.406-.344 2.12.088 3.312.313 3.312.313s-.078-.65 1.032-.906c.744-.173 5.15-.624 7.28-.782 2.061-.152 5.344-.096 7.25.688 1.956.804 7.876 3.5 7.876 3.5s-6.56-3.276-7.406-3.688c-.203-.098-.572-.202-1.032-.312 1.216-.562 5.012-1.128 7.75-1.5 3.01-.41 3.323-.416 5.375-.344 1.943.068 3.008.165 3.188.188.119-.195.384-.73.937-.875.742-.197 5.131-.83 7.25-1.094 1.757-.22 4.406-.333 6.313.031.317.06.606.19.875.281 1.936.661 7.844 2.938 7.844 2.938s-6.537-2.807-7.375-3.156c-.2-.084-.577-.174-1.032-.25 1.204-.651 5.02-1.372 7.72-2 2.966-.69 3.288-.756 5.312-.875 2.088-.124 3.28-.032 3.28-.032s-.086-.632 1-1.03c.73-.269 5.048-1.339 7.126-1.813 2.008-.46 5.168-1.03 7-.625 1.878.414 13.578 3.015 13.578
798 stdDeviation="34.542167" 7983.015s-12.328-3.022-13.141-3.265c-.195-.058-.559-.107-1-.125 1.167-.804 3.514-1.688 6.11-2.703 1.68-.659.923-.377 2.775-1.004 1.754-.594 2.486-1.01 2.63-1.113.347-.207-.355-.122-.544-.042z" enable-background="new" filter="url(#jk)"/>
799 id="feGaussianBlur8820" /> 799 <path d="m1082.6-275.12c1.873 0.393 4.496 1.146 6.031 1.969s2.822 1.056 5.375 2.5c2.527 1.43 4.796 2.007 6.969 2.531 2.348 0.566 5.435 0.715 8.844 1.188-1.09-0.84-6.608-1.173-8.406-1.563-1.8-0.39-3.895-1.016-6.594-2.313-2.7-1.296-3.495-1.799-5.813-2.687-2.318-0.889-4.004-1.383-6.406-1.625z" enable-background="new" filter="url(#jj)"/>
800 </filter> 800 <path d="M1051.5-270c1.905.578 4.528 1.616 6.094 2.594 1.565.978 2.88 1.36 5.5 3.125 2.593 1.747 4.986 2.71 7.25 3.594 2.446.955 5.682 1.657 9.406 3.062-1.19-1.138-7.063-2.687-8.938-3.375-1.874-.688-4.081-1.566-6.874-3.281-2.794-1.715-3.574-2.284-5.938-3.406-2.364-1.123-4.057-1.835-6.5-2.313z" enable-background="new" filter="url(#ji)"/>
801 <filter 801 <path d="m1020.2-266.84c1.912 0.638 4.581 1.755 6.156 2.813 1.575 1.057 2.896 1.508 5.531 3.406 2.61 1.878 5.029 3.03 7.313 4.062 2.468 1.116 5.764 2.174 9.531 3.844-1.203-1.222-7.203-3.314-9.094-4.125-1.89-0.81-4.064-1.894-6.874-3.75s-3.622-2.477-6-3.719c-2.379-1.242-4.111-1.975-6.563-2.531z" enable-background="new" filter="url(#jh)"/>
802 inkscape:collect="always" 802 <path d="M1110.2-266.89c.15.049.688.631.11 1.484-.81 1.195-5.705 3.325-8.563 4.125-2.845.798-6.29.978-10.562-.375-4.302-1.362-5.47-2.468-10.656-4.312 4.664 2.115 6.195 3.952 10.125 5.344 1.62.574 3.367.94 5.062 1.03-.445.327-1.53.984-3.562 1.595-2.796.84-6.65 1.534-8.25 1.625-1.515.086-3.142-.513-3.438-.625.167.103.374.377-.25 1.03-.899.945-6.147 1.924-9.125 2.25-2.964.326-6.521-.015-10.906-1.905-3.978-1.715-5.339-2.916-9.406-4.75v.156c3.643 2.095 5.284 3.883 8.875 5.562 1.73.81 3.592 1.41 5.406 1.72-.534.286-1.557.71-3.437 1.03-2.87.488-6.81.817-8.438.75-.85-.034-1.728-.184-2.406-.406-.685-.215-1.19-.444-1.312-.5.169.107.43.403-.22 1.031-.909.88-6.245 1.337-9.25 1.47-2.99.131-6.588-.451-11-2.563-4.44-2.127-5.64-3.402-10.905-5.782 4.734 2.597 6.286 4.63 10.344 6.72 1.673.861 3.485 1.493 5.25 1.937-.463.233-1.59.688-3.688.937-2.886.343-6.834.493-8.468.375-1.547-.111-3.232-.857-3.532-1
803 id="filter8822" 803.17.12.414.41-.218 1-.913.851-6.244 1.262-9.25 1.375-2.993.113-6.59-.49-11-2.594-4.002-1.908-5.388-3.137-9.47-5.093v.156c3.656 2.204 5.295 4.053 8.907 5.906 1.74.893 3.637 1.528 5.469 1.969-.54.248-1.578.615-3.469.844-2.886.348-6.866.52-8.5.406a9.446 9.446 0 0 1-2.406-.5 12.532 12.532 0 0 1-1.313-.531c.17.112.465.422-.187 1.03-.913.853-6.275 1.294-9.281 1.407-2.993.112-6.594-.528-11-2.594-4.437-2.08-5.647-3.331-10.906-5.656 4.729 2.548 6.29 4.578 10.344 6.625 1.671.844 3.485 1.467 5.25 1.906-.464.235-1.59.684-3.688.938-2.886.348-6.836.57-8.469.469-1.544-.096-3.2-.83-3.5-.97.17.12.382.405-.25 1-.912.861-6.246 1.331-9.25 1.47-2.99.138-6.567-.451-10.969-2.47-3.993-1.83-5.365-3.028-9.437-4.905v.156c3.647 2.133 5.27 3.935 8.875 5.719 1.737.86 3.607 1.45 5.437 1.875-.54.253-1.55.64-3.437.906-2.88.404-6.838.646-8.469.562a9.36 9.36 0 0 1-2.406-.437 12.971 12.971 0 0
804 x="-0.2742857" 8041-1.313-.5c.17.109.432.41-.218 1.031-.911.87-6.25 1.392-9.25 1.563-2.987.17-6.574-.316-10.97-2.282-4.424-1.978-5.605-3.228-10.843-5.375 4.71 2.388 6.27 4.39 10.312 6.344a23.73 23.73 0 0 0 5.218 1.781c-.461.25-1.597.713-3.687 1.032-2.876.438-6.78.733-8.406.687-1.539-.043-3.233-.745-3.532-.875.169.113.411.414-.218 1.031-.908.891-6.203 1.529-9.188 1.813-2.971.283-6.573-.176-10.938-1.938-3.96-1.598-5.329-2.795-9.344-4.312v.156c3.596 1.811 5.239 3.582 8.813 5.156 1.722.759 3.587 1.29 5.406 1.625-.536.28-1.566.688-3.437 1.063-2.856.572-6.79 1.02-8.407 1.031-.844.006-1.706-.08-2.375-.25-.676-.162-1.16-.33-1.28-.375.166.094.422.383-.22 1.062-.897.951-6.186 1.918-9.125 2.438-2.925.518-6.432.374-10.719-1.031-4.315-1.415-5.472-2.53-10.562-3.969 4.577 1.751 6.09 3.56 10.031 5 1.627.594 3.37.956 5.094 1.156-.453.297-1.555.884-3.594 1.469-2.804.805-6.638 1.576-8.218
805 width="1.5485713" 8051.75-1.495.165-3.117-.317-3.407-.406.164.09.393.36-.218 1.062-.883 1.014-6.045 2.372-8.938 3.063-2.88.687-6.335.76-10.562-.438-3.835-1.086-5.172-2.072-9.062-3.125v.156c3.484 1.395 5.07 2.92 8.53 4.032 1.669.535 3.457.786 5.22.875-.52.352-1.5.914-3.313 1.53-2.765.942-6.59 1.936-8.156 2.157-.818.115-1.633.123-2.281.031-.655-.083-1.133-.218-1.25-.25.162.075.434.34-.188 1.094-.87 1.055-6.01 2.66-8.875 3.438-2.852.774-6.259.958-10.438-.094-4.206-1.06-5.356-2.042-10.344-3.156 4.485 1.46 5.97 3.135 9.813 4.25 1.585.46 3.287.638 4.969.687-.442.337-1.513 1.028-3.5 1.781-2.734 1.037-6.452 2.163-8 2.438-1.465.26-3.06-.117-3.344-.188.16.08.38.321-.219 1.063-.865 1.07-5.916 2.818-8.75 3.687-2.82.866-6.207 1.157-10.344.22-3.753-.852-5.048-1.717-8.875-2.595v.157c3.428 1.237 4.987 2.632 8.375 3.53 1.632.434 3.367.584 5.094.563-.51.384-1.477 1.022-3.25 1.75-2.706 1.112-6.436 2.308-7.969
806 y="-0.21333334" 8062.625-.8.166-1.612.219-2.25.157v1.406c.227-.145.449-.273.719-.375 1.08-.41 2.171-.216 6-1.688 3.828-1.471 5.224-2.005 5.906-2.406.68-.4 1.612-.88 2.219-1.531 1.827-.138 3.57-.493 4.937-1 2.968-1.1 4.876-1.806 6.782-2.469 1.905-.663 2.354-1.415 3.406-1.781 1.091-.38 2.195-.166 6.062-1.531 3.868-1.366 5.283-1.827 5.969-2.22.701-.4 1.7-.932 2.313-1.593 1.97-.055 3.816-.385 5.28-.875 3.002-1.005 4.927-1.622 6.845-2.25 1.538-.504 2.174-1.047 2.906-1.437.23-.135.475-.254.75-.344 1.098-.36 2.181-.082 6.094-1.313 3.912-1.23 5.366-1.673 6.062-2.03.694-.358 1.63-.794 2.25-1.407 1.865-.023 3.636-.267 5.031-.688 3.03-.913 4.993-1.43 6.938-1.968 1.945-.54 2.426-1.265 3.5-1.563 1.114-.31 2.22.007 6.187-1.031 3.968-1.039 5.418-1.433 6.125-1.75.735-.33 1.814-.754 2.438-1.375 1.997.116 3.857-.02 5.344-.375 3.078-.735 5.083-1.101 7.062-1.5 1.588-.32 2.244-.79 3-1.094.238-.107.467-.193.75-.25 1.134-.23
807 height="1.4266667"> 8072.305.209 6.344-.5s5.5-.927 6.219-1.187c.715-.26 1.704-.568 2.343-1.094 1.925.24 3.748.224 5.188 0 3.126-.488 5.155-.7 7.156-.969 2.002-.268 2.489-.945 3.594-1.094 1.146-.154 2.276.302 6.344-.219 4.068-.52 5.56-.695 6.28-.937.738-.247 1.799-.586 2.438-1.125 2.05.335 3.974.398 5.5.219 3.143-.37 5.18-.56 7.188-.782 1.61-.178 2.265-.608 3.031-.843a3.43 3.43 0 0 1 .781-.188c1.15-.128 2.302.347 6.375-.125s5.56-.61 6.282-.844c.719-.232 1.7-.473 2.343-.968 1.937.333 3.77.404 5.22.25 3.145-.335 5.177-.519 7.187-.719 2.01-.2 2.484-.826 3.593-.938 1.152-.115 2.297.366 6.375-.062s5.59-.562 6.313-.781c.74-.224 1.796-.514 2.437-1.031 2.058.398 4.002.493 5.532.343 3.148-.308 5.175-.473 7.187-.656 1.614-.147 2.263-.56 3.031-.781.242-.081.494-.13.782-.156 1.152-.106 2.293.392 6.375 0 4.082-.393 5.589-.531 6.312-.75.721-.219 1.7-.448 2.344-.938 1.938.35 3.769.454 5.219.313 3.148-.309 5.175-.474
808 <feGaussianBlur 8087.187-.657 2.012-.183 2.514-.838 3.625-.937 1.152-.103 2.292.385 6.375 0s5.589-.501 6.313-.719c.739-.222 1.795-.514 2.437-1.031 2.057.402 4.003.503 5.531.344 3.147-.329 5.178-.523 7.188-.72 1.613-.156 2.266-.63 3.031-.874.24-.088.463-.122.75-.156 1.148-.14 2.317.34 6.375-.25 4.058-.59 5.562-.778 6.281-1.032.717-.253 1.675-.558 2.313-1.093 1.92.211 3.72.151 5.156-.094 3.12-.533 5.112-.929 7.094-1.313 1.982-.384 2.474-1.04 3.562-1.28 1.13-.252 2.27.115 6.25-.876s5.43-1.42 6.125-1.781c.723-.376 1.762-.87 2.375-1.531 1.963-.012 3.794-.291 5.22-.844 2.95-1.145 4.872-1.87 6.687-2.75 1.455-.707 2.334-1.686 2.547-1.984.212-.298.111-.746.137-.767.043-.035.32-.085.48-.429.858-1.847 2.32-5.644
809 inkscape:collect="always" 8092.435-6.329.113-.682.163-1.348.214-1.745.03-.23-.147-.865-.125-.924.031-.082.305-.265.36-.515.267-1.198.09-2.191-.125-3.609-.214-1.417-.983-4.622-1.637-5.476-.659-.862-1.223-1.011-1.748-1-.208.27.137.262.163.312.68.05.934.369 1.42.897s1.442 3.94 1.579 5.39.19 2.86-.088 3.468c-.278.609-.944.429-1.237.495.531.186.89.213.953 1.057.058.814-.134 1.64-.52 2.806-.391 1.18-1.845 4.35-2.286 4.599-.452.255-.952.182-1.288.05z" enable-background="new" filter="url(#jg)"/>
810 stdDeviation="11.313708" 810 <path d="m988.75-263.84c1.912 0.634 4.55 1.758 6.125 2.813 1.575 1.054 2.896 1.482 5.531 3.375 2.609 1.873 5.027 3.015 7.313 4.062 2.47 1.132 5.752 2.155 9.531 3.938-1.207-1.259-7.139-3.365-9.031-4.188s-4.128-1.93-6.938-3.781-3.622-2.482-6-3.719c-2.377-1.237-4.08-1.95-6.53-2.5z" enable-background="new" filter="url(#jf)"/>
811 id="feGaussianBlur8824" /> 811 <path d="M957.5-260.78c1.91.618 4.583 1.71 6.156 2.75 1.574 1.04 2.896 1.482 5.531 3.375 2.609 1.873 5.027 3.015 7.313 4.063 2.47 1.131 5.752 2.154 9.531 3.937-1.207-1.258-7.201-3.396-9.094-4.219-1.892-.823-4.096-1.93-6.906-3.781-2.81-1.85-3.593-2.44-5.969-3.656s-4.113-1.939-6.562-2.469z" enable-background="new" filter="url(#ib)"/>
812 </filter> 812 <path d="M926.09-257.38c1.908.597 4.553 1.664 6.125 2.688 1.571 1.023 2.87 1.44 5.5 3.28 2.603 1.823 5.029 2.973 7.313 4 2.467 1.111 5.755 2.094 9.53 3.845-1.205-1.249-7.171-3.319-9.062-4.125s-4.102-1.891-6.906-3.688c-2.804-1.796-3.627-2.402-6-3.594-2.373-1.191-4.054-1.903-6.5-2.406z" enable-background="new" filter="url(#ia)"/>
813 <filter 813 <path d="M894.91-253.56c1.902.554 4.587 1.589 6.156 2.594s2.874 1.408 5.5 3.219c2.6 1.791 5 2.871 7.281 3.875 2.465 1.083 5.76 2.04 9.532 3.75-1.205-1.236-7.175-3.245-9.063-4.032-1.888-.786-4.075-1.83-6.875-3.593s-3.6-2.369-5.969-3.532c-2.37-1.163-4.123-1.834-6.562-2.28z" enable-background="new" filter="url(#hz)"/>
814 inkscape:collect="always" 814 <path d="M863.72-248.66c1.88.43 4.504 1.38 6.063 2.313 1.558.932 2.852 1.257 5.468 3 2.59 1.724 4.981 2.708 7.25 3.625 2.452.99 5.74 1.877 9.5 3.5-1.201-1.208-7.152-3.067-9.03-3.782-1.88-.715-4.086-1.684-6.876-3.375s-3.585-2.228-5.937-3.28-4.026-1.713-6.438-2z" enable-background="new" filter="url(#hy)"/>
815 id="filter8826" 815 <path d="m833.16-241.38c1.848 0.296 4.47 0.976 6 1.781s2.814 1.056 5.375 2.531c2.535 1.46 4.89 2.326 7.125 3.063 2.414 0.797 5.657 1.467 9.375 2.844-1.188-1.129-7.088-2.59-8.938-3.156-1.85-0.567-4.003-1.374-6.75-2.844-2.746-1.47-3.5-1.92-5.812-2.781-2.311-0.861-4.005-1.32-6.375-1.438z" enable-background="new" filter="url(#hx)"/>
816 x="-0.25894088" 816 <path d="m802.91-232.31c1.822 0.211 4.366 0.8 5.875 1.531 1.51 0.73 2.756 0.93 5.281 2.281 2.5 1.338 4.832 2.049 7.031 2.657 2.377 0.656 5.565 1.073 9.22 2.187-1.168-1.045-6.93-2.103-8.75-2.562-1.822-0.46-3.953-1.127-6.657-2.438s-3.471-1.72-5.75-2.469-3.913-1.179-6.25-1.187z" enable-background="new" filter="url(#hw)"/>
817 width="1.5178818" 817 <path d="M773.19-222.19c1.811.179 4.32.665 5.813 1.344 1.491.678 2.753.798 5.25 2.062 2.47 1.252 4.79 1.896 6.968 2.438 2.354.585 5.492.897 9.094 1.844-1.15-.992-6.852-1.784-8.656-2.188s-3.916-1.021-6.594-2.25c-2.678-1.229-3.403-1.61-5.656-2.281-2.253-.67-3.896-1.002-6.219-.969z" enable-background="new" filter="url(#hv)"/>
818 y="-0.2236412" 818 <path d="M743.56-211.19c1.793.13 4.273.55 5.75 1.188s2.716.741 5.188 1.937c2.446 1.184 4.72 1.747 6.874 2.219 2.328.51 5.42.68 9 1.562-1.143-.97-6.747-1.59-8.53-1.937-1.784-.347-3.884-.888-6.532-2.031-2.648-1.144-3.395-1.517-5.625-2.125-2.23-.61-3.826-.91-6.125-.813z" enable-background="new" filter="url(#hu)"/>
819 height="1.4472824"> 819 <g fill="#fff" filter="url(#ht)">
820 <feGaussianBlur 820 <path d="M744.94-212.12s7.222-3.223 9.063-3.5 3.352-.003 6 .563c2.647.565 8.735 2.215 11.188 3.374s5.312 3.563 5.312 3.563-7.146-2.78-10.188-3.563-7.645-2.083-10.375-2.312-11 1.875-11 1.875z"/>
821 inkscape:collect="always" 821 <path d="m735.47-206.95s3.66-2.223 5.5-2.5 3.665 0.247 6.313 0.813 8.735 2.215 11.188 3.375 6.562 2.125 6.562 2.125-8.396-1.343-11.438-2.125-7.957-2.334-10.688-2.563-7.438 0.875-7.438 0.875zm24.38-10.66s8.544-3.299 10.398-3.458c1.854-0.16 3.642 0.48 6.248 1.212s8.577 2.766 10.95 4.08 6.414 2.537 6.414 2.537-8.294-1.873-11.279-2.848c-2.985-0.974-7.792-2.834-10.503-3.236s-12.228 1.713-12.228 1.713zm15.35-5.62s7.771-2.782 9.628-2.904c1.857-0.12 3.631 0.555 6.222 1.341 2.59 0.787 8.519 2.942 10.864 4.304 2.346 1.362 6.36 2.67 6.36 2.67s-8.253-2.045-11.217-3.08c-2.965-1.035-7.733-2.995-10.434-3.452-2.702-0.458-11.422 1.121-11.422 1.121zm14.44-4.72s8.683-3.52 10.542-3.605 3.62 0.624 6.195 1.46c2.575 0.837 8.46 3.107 10.779 4.514 2.318 1.408 6.307 2.793 6.307 2.793s-8.212-2.204-11.156-3.297-7.673-3.144-10.365-3.654-12.3 1.789-12.3 1.789zm14.86-5.38s7.808-2.583 9.666-2.668c1.86-0.085 3.62
822 stdDeviation="19.631544" 8220.625 6.195 1.461 2.575 0.837 8.46 3.107 10.78 4.514 2.318 1.407 6.307 2.792 6.307 2.792s-8.213-2.204-11.156-3.296-7.673-3.144-10.365-3.654-11.426 0.85-11.426 0.85zm15.06-4.25s8.558-2.583 10.417-2.668 3.62 0.625 6.195 1.461c2.575 0.837 8.46 3.107 10.779 4.514 2.318 1.407 6.307 2.792 6.307 2.792s-8.212-2.204-11.156-3.296-7.673-3.144-10.365-3.654-12.176 0.85-12.176 0.85zm16.67-5.02s6.967-1.987 8.828-1.968c1.86 0.02 3.579 0.827 6.102 1.807 2.524 0.98 8.272 3.578 10.508 5.113 2.236 1.536 6.14 3.143 6.14 3.143s-8.075-2.662-10.952-3.919c-2.878-1.256-7.484-3.57-10.143-4.231-2.66-0.66-10.482 0.055-10.482 0.055zm14.5-3.4s7.688-2.028 9.548-1.968 3.56 0.902 6.063 1.936c2.502 1.033 8.194 3.752 10.397 5.335 2.203 1.582 6.072 3.272 6.072 3.272s-8.017-2.833-10.868-4.15c-2.85-1.318-7.407-3.73-10.05-4.446s-11.162 0.021-11.162 0.021zm14.09-3.21s8.17-1.97 10.027-1.854c1.857 0.115 3.532 1.01 6.002
823 id="feGaussianBlur8828" /> 8232.118s8.077 3.997 10.23 5.645 5.972 3.454 5.972 3.454-7.928-3.074-10.738-4.476-7.291-3.95-9.913-4.746c-2.621-0.796-11.58-0.141-11.58-0.141zm16.56-2.39s8.085-1.908 9.938-1.737c1.853 0.172 3.5 1.117 5.935 2.3 2.436 1.182 7.952 4.24 10.055 5.953s5.864 3.633 5.864 3.633-7.832-3.312-10.597-4.8-7.168-4.169-9.764-5.044c-2.597-0.876-11.431-0.305-11.431-0.305zm15.2-2.75s7.642-1.428 9.495-1.265c1.854 0.162 3.505 1.1 5.946 2.27s7.973 4.203 10.084 5.905c2.112 1.703 5.881 3.605 5.881 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-10.998-0.77-10.998-0.77zm14.87-1.64s8.642-1.553 10.495-1.39c1.854 0.162 3.505 1.1 5.946 2.27s7.972 4.203 10.084 5.905c2.111 1.703 5.88 3.605 5.88 3.605s-7.846-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.787-4.998-2.601-0.863-11.998-0.644-11.998-0.644zm16.25-2.31s7.642-0.865 9.495-0.703c1.854 0.163 3.505 1.1 5.946 2.27s7.973 4.203 10.084
824 </filter> 8245.906c2.112 1.702 5.881 3.605 5.881 3.605s-7.847-3.275-10.62-4.749c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.862-10.998-1.331-10.998-1.331zm15.13-1.19s8.58-1.49 10.433-1.328c1.854 0.163 3.505 1.1 5.946 2.27s7.972 4.203 10.084 5.906c2.111 1.702 5.88 3.605 5.88 3.605s-7.846-3.275-10.62-4.749c-2.772-1.474-7.187-4.135-9.787-4.998-2.601-0.862-11.935-0.706-11.935-0.706zm16.25-2.06s7.83-0.803 9.683-0.64c1.854 0.162 3.505 1.1 5.946 2.27s7.972 4.203 10.084 5.905c2.111 1.703 5.88 3.605 5.88 3.605s-7.846-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.787-4.998-2.601-0.863-11.185-1.394-11.185-1.394zm15.37-1.25s8.392-1.178 10.245-1.015c1.854 0.162 3.505 1.1 5.946 2.27s7.972 4.203 10.084 5.905c2.111 1.703 5.88 3.605 5.88 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-11.748-1.02-11.748-1.02zm16.19-2.06s6.892-0.99 8.745-0.828c1.854 0.163 3.505 1.1 5.946 2.27s7.973 4.203
825 <filter 82510.084 5.906c2.112 1.702 5.881 3.605 5.881 3.605s-7.847-3.275-10.62-4.749-7.188-4.135-9.788-4.998c-2.6-0.862-10.248-1.206-10.248-1.206zm17.16-0.94s6.83-1.178 8.683-1.015c1.854 0.162 3.505 1.1 5.946 2.27 2.44 1.171 7.972 4.203 10.084 5.905 2.111 1.703 5.88 3.605 5.88 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-10.185-1.02-10.185-1.02zm16.1-2s6.08-0.428 7.933-0.265c1.854 0.162 3.505 1.1 5.946 2.27 2.44 1.171 7.972 4.203 10.084 5.905 2.111 1.703 5.88 3.605 5.88 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-9.435-1.77-9.435-1.77zm15.8-1.37s6.454-0.678 8.308-0.515c1.854 0.162 3.505 1.1 5.946 2.27 2.44 1.171 7.972 4.203 10.084 5.905 2.111 1.703 5.88 3.605 5.88 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-9.81-1.52-9.81-1.52zm15.6-1.86s5.498-0.91 7.358-0.853c1.86 0.056 3.562 0.896 6.066 1.925
826 inkscape:collect="always" 8262.504 1.03 8.2 3.739 10.406 5.318 2.205 1.578 6.078 3.261 6.078 3.261s-8.022-2.819-10.875-4.131c-2.853-1.313-7.413-3.716-10.06-4.429-2.645-0.712-8.973-1.091-8.973-1.091zm17.4-2.46s4.547-1.156 6.408-1.186c1.86-0.03 3.6 0.73 6.149 1.642 2.55 0.912 8.365 3.354 10.64 4.829 2.277 1.474 6.224 2.976 6.224 2.976s-8.145-2.444-11.055-3.623c-2.91-1.178-7.578-3.368-10.253-3.957-2.676-0.588-8.113-0.68-8.113-0.68zm14.5-3.03s5.96-1.774 7.82-1.83c1.86-0.057 3.61 0.68 6.172 1.555 2.562 0.876 2.522 0.857 5.333 1.49 2.797 0.63 7.077 1.513 7.077 1.513s-3.616-0.016-6.792-0.466c-3.116-0.441-7.375-1.698-10.058-2.249-2.684-0.55-9.552-0.013-9.552-0.013z" enable-background="new"/>
827 id="filter8856" 827 <path d="M1099.2-279.93c.161.269 11.208-4.6 12.188-4.688.98-.087 2 3.125 2 3.125s-.775-1.504-2.875-1.062-11.301 2.671-11.312 2.625z"/>
828 x="-0.3253231" 828 </g>
829 width="1.6506462" 829 <path d="M1107.5-284.09c-.419.213-.156.094-.647.306-.486.21-1.724.574-4.08 1.459-3.33 1.25-5.83 2.153-7.026 3.066-1.536.021-3.72.233-5.656.719a227.709 227.709 0 0 1-6.75 1.593c-1.895.42-1.676.643-2.875.875-1.297.252-1.721-.009-5.438.782-3.49.742-8.894 1.93-10.156 2.687-1.583-.18-3.867-.322-5.843-.031-3.04.447-4.917.673-6.844.906-.655.08-1.041.201-1.344.282-.426.131-.686.26-1.375.343-1.311.16-1.762-.157-5.531.282-3.554.413-9.005 1.272-10.25 1.937-1.599-.297-3.858-.534-5.844-.344-3.059.294-4.972.484-6.906.657-1.934.172-1.689.422-2.906.53-1.317.118-1.76-.163-5.532.25-3.541.39-9.007 1.21-10.28 1.876-1.6-.295-3.888-.507-5.876-.313-3.058.3-4.94.48-6.875.657-.657.06-1.04.178-1.343.25-.428.118-.684.218-1.375.28-1.316.121-1.76-.194-5.532.22-3.556.39-9.005 1.239-10.25
830 y="-0.19013336" 8301.906-1.598-.294-3.86-.524-5.843-.313-3.056.326-4.974.526-6.907.719-1.932.192-1.69.44-2.906.562-1.315.132-1.763-.164-5.53.282-3.54.418-8.979 1.292-10.25 1.969-1.599-.282-3.86-.42-5.845-.188-3.052.358-4.945.568-6.875.781-.656.073-1.04.173-1.344.25-.426.127-.684.267-1.375.344-1.313.146-1.767-.174-5.53.313-3.55.458-8.98 1.419-10.22 2.125-1.593-.245-3.834-.382-5.812-.125-3.048.394-4.95.648-6.875.906-1.925.258-1.726.493-2.938.656-1.31.176-1.747-.104-5.5.469-3.524.538-8.923 1.699-10.188 2.437-1.587-.203-3.845-.254-5.812.094-3.026.536-4.9.862-6.813 1.187-.65.111-1.013.271-1.312.375-.42.165-.664.332-1.344.47-1.295.26-1.727-.007-5.438.812-3.498.772-8.846 2.383-10.062 3.219-1.562-.078-3.757.085-5.687.593-2.972.783-4.818 1.232-6.688 1.75s-1.666.768-2.843 1.094c-1.273.353-1.697.107-5.344 1.188-3.425 1.014-8.65 2.933-9.875 3.843-1.539.013-3.72.273-5.625.875-2.931.928-4.75 1.459-6.594
831 height="1.3802667"> 8312.063-.627.205-.992.392-1.281.531-.408.214-.653.409-1.313.625-1.254.412-1.686.19-5.28 1.438-3.39 1.177-8.596 3.213-9.782 4.156-1.524.06-3.65.395-5.531 1.062-2.898 1.029-4.7 1.676-6.531 2.313-1.833.637-1.628.848-2.782 1.25-1.246.434-1.663.2-5.218 1.562-3.34 1.28-8.488 3.483-9.688 4.47-1.507.107-3.636.498-5.5 1.218a1044.752 1044.752 0 0 1-6.437 2.469c-.617.233-.997.442-1.282.593v1.094c.112-.222.386-.817.907-1.094.698-.37 4.813-1.993 6.812-2.718 1.657-.602 4.154-1.329 5.969-1.313.302.003.588.051.844.094 1.842.308 7.468 1.562 7.468 1.562s-6.233-1.646-7.03-1.843c-.191-.048-.536-.07-.97-.063 1.146-.87 4.762-2.393 7.344-3.437 2.839-1.148 3.117-1.252 5.063-1.657 2.008-.417 3.156-.5 3.156-.5s-.082-.6.969-1.125c.705-.351 4.887-1.892 6.906-2.562 1.952-.648 5.057-1.359 6.875-1 1.863.367 7.531 1.812 7.531 1.812s-6.287-1.87-7.094-2.093c-.193-.054-.53-.086-.968-.094 1.158-.833 4.794-2.195 7.406-3.156
832 <feGaussianBlur 8322.87-1.056 3.167-1.162 5.125-1.532 1.853-.35 2.859-.425 3.031-.437.114-.217.377-.81.906-1.063.71-.338 4.926-1.712 6.97-2.312 1.692-.497 4.24-1.037 6.093-.906.308.021.613.097.875.156 1.881.424 7.594 2.031 7.594 2.031s-6.342-2.065-7.157-2.312c-.194-.06-.557-.104-1-.125 1.17-.798 4.863-2.057 7.5-2.938 2.898-.968 3.233-1.003 5.22-1.281 2.049-.287 3.187-.313 3.187-.313s-.073-.607 1-1.062c.72-.306 4.99-1.5 7.062-2 2.003-.483 5.199-.928 7.063-.406 1.91.535 7.719 2.5 7.719 2.5s-6.423-2.424-7.25-2.72c-.198-.07-.583-.14-1.032-.187 1.188-.728 4.916-1.774 7.594-2.5 2.944-.797 3.292-.77 5.313-.906 1.913-.128 2.947-.07 3.125-.062.117-.204.391-.78.937-.97.732-.253 5.079-1.047 7.188-1.374 1.748-.271 4.4-.485 6.312-.094.318.065.605.186.875.281 1.94.69 7.844 3.094 7.844 3.094s-6.535-2.95-7.375-3.312c-.201-.087-.575-.167-1.031-.25 1.206-.633 5.03-1.396 7.75-1.906 2.99-.562 3.3-.53 5.344-.532 2.109-.002
833 inkscape:collect="always" 8333.312.125 3.312.125s-.073-.63 1.031-.937c.74-.206 5.126-.834 7.25-1.063 2.053-.22 5.319-.252 7.22.47 1.947.738 7.843 3.374 7.843 3.374s-6.563-3.179-7.406-3.562c-.202-.092-.543-.187-1-.282 1.21-.602 4.984-1.248 7.718-1.656 3.005-.448 3.326-.452 5.375-.406 1.94.043 3.007.194 3.188.219.119-.194.384-.766.937-.907.743-.188 5.155-.734 7.282-.937 1.763-.169 4.42-.234 6.343.25.32.08.604.203.875.312 1.953.784 7.907 3.47 7.907 3.47s-6.592-3.254-7.438-3.657c-.202-.096-.572-.207-1.031-.313 1.214-.574 5.044-1.122 7.781-1.5 3.009-.415 3.323-.442 5.375-.375 2.118.07 3.313.25 3.313.25s-.078-.637 1.03-.906c.745-.18 5.153-.663 7.282-.844 2.059-.174 5.343-.124 7.25.657 1.955.8 7.875 3.53 7.875 3.53s-6.56-3.308-7.406-3.718c-.202-.098-.572-.203-1.031-.312 1.215-.564 5.01-1.115 7.75-1.47 3.01-.389 3.321-.397 5.375-.312 1.944.08 3.006.254 3.187.282.12-.191.383-.746.938-.875.744-.174 5.15-.65 7.28-.813
834 stdDeviation="28.712591" 8341.767-.134 4.45-.126 6.376.375.32.083.603.201.875.313 1.954.8 7.906 3.562 7.906 3.562s-6.591-3.34-7.437-3.75c-.203-.098-.572-.203-1.032-.312 1.215-.564 5.042-1.084 7.782-1.438 3.01-.39 3.352-.429 5.406-.344 2.12.088 3.312.313 3.312.313s-.078-.65 1.032-.906c.744-.173 5.15-.624 7.28-.782 2.061-.152 5.344-.096 7.25.688 1.956.804 7.876 3.5 7.876 3.5s-6.56-3.276-7.406-3.688c-.203-.098-.572-.202-1.032-.312 1.216-.562 5.012-1.128 7.75-1.5 3.01-.41 3.323-.416 5.375-.344 1.943.068 3.008.165 3.188.188.119-.195.384-.73.937-.875.742-.197 5.131-.83 7.25-1.094 1.757-.22 4.406-.333 6.313.031.317.06.606.19.875.281 1.936.661 7.844 2.938 7.844 2.938s-6.537-2.807-7.375-3.156c-.2-.084-.577-.174-1.032-.25 1.204-.651 5.02-1.372 7.72-2 2.966-.69 3.288-.756 5.312-.875 2.088-.124 3.28-.032 3.28-.032s-.086-.632 1-1.03c.73-.269 5.048-1.339 7.126-1.813 2.008-.46 5.168-1.03 7-.625 1.878.414 13.578 3.015 13.578
835 id="feGaussianBlur8858" /> 8353.015s-12.328-3.022-13.141-3.265c-.195-.058-.559-.107-1-.125 1.167-.804 3.514-1.688 6.11-2.703 1.68-.659.923-.377 2.775-1.004 1.754-.594 2.486-1.01 2.63-1.113.347-.207-.355-.122-.544-.042z" enable-background="new" filter="url(#hs)" opacity=".25"/>
836 </filter> 836 <path d="m1082.6-275.12c1.873 0.393 4.496 1.146 6.031 1.969s2.822 1.056 5.375 2.5c2.527 1.43 4.796 2.007 6.969 2.531 2.348 0.566 5.435 0.715 8.844 1.188-1.09-0.84-6.608-1.173-8.406-1.563-1.8-0.39-3.895-1.016-6.594-2.313-2.7-1.296-3.495-1.799-5.813-2.687-2.318-0.889-4.004-1.383-6.406-1.625z" enable-background="new" filter="url(#hr)" opacity=".25"/>
837 <filter 837 <path d="M1051.5-270c1.905.578 4.528 1.616 6.094 2.594 1.565.978 2.88 1.36 5.5 3.125 2.593 1.747 4.986 2.71 7.25 3.594 2.446.955 5.682 1.657 9.406 3.062-1.19-1.138-7.063-2.687-8.938-3.375-1.874-.688-4.081-1.566-6.874-3.281-2.794-1.715-3.574-2.284-5.938-3.406-2.364-1.123-4.057-1.835-6.5-2.313z" enable-background="new" filter="url(#hq)" opacity=".25"/>
838 inkscape:collect="always" 838 <path d="m1020.2-266.84c1.912 0.638 4.581 1.755 6.156 2.813 1.575 1.057 2.896 1.508 5.531 3.406 2.61 1.878 5.029 3.03 7.313 4.062 2.468 1.116 5.764 2.174 9.531 3.844-1.203-1.222-7.203-3.314-9.094-4.125-1.89-0.81-4.064-1.894-6.874-3.75s-3.622-2.477-6-3.719c-2.379-1.242-4.111-1.975-6.563-2.531z" enable-background="new" filter="url(#hp)" opacity=".25"/>
839 id="filter8860" 839 <path d="M1110.2-266.89c.15.049.688.631.11 1.484-.81 1.195-5.705 3.325-8.563 4.125-2.845.798-6.29.978-10.562-.375-4.302-1.362-5.47-2.468-10.656-4.312 4.664 2.115 6.195 3.952 10.125 5.344 1.62.574 3.367.94 5.062 1.03-.445.327-1.53.984-3.562 1.595-2.796.84-6.65 1.534-8.25 1.625-1.515.086-3.142-.513-3.438-.625.167.103.374.377-.25 1.03-.899.945-6.147 1.924-9.125 2.25-2.964.326-6.521-.015-10.906-1.905-3.978-1.715-5.339-2.916-9.406-4.75v.156c3.643 2.095 5.284 3.883 8.875 5.562 1.73.81 3.592 1.41 5.406 1.72-.534.286-1.557.71-3.437 1.03-2.87.488-6.81.817-8.438.75-.85-.034-1.728-.184-2.406-.406-.685-.215-1.19-.444-1.312-.5.169.107.43.403-.22 1.031-.909.88-6.245 1.337-9.25 1.47-2.99.131-6.588-.451-11-2.563-4.44-2.127-5.64-3.402-10.905-5.782 4.734 2.597 6.286 4.63 10.344 6.72 1.673.861 3.485 1.493 5.25 1.937-.463.233-1.59.688-3.688.937-2.886.343-6.834.493-8.468.375-1.547-.111-3.232-.857-3.532-1
840 x="-0.38093024" 840.17.12.414.41-.218 1-.913.851-6.244 1.262-9.25 1.375-2.993.113-6.59-.49-11-2.594-4.002-1.908-5.388-3.137-9.47-5.093v.156c3.656 2.204 5.295 4.053 8.907 5.906 1.74.893 3.637 1.528 5.469 1.969-.54.248-1.578.615-3.469.844-2.886.348-6.866.52-8.5.406a9.446 9.446 0 0 1-2.406-.5 12.532 12.532 0 0 1-1.313-.531c.17.112.465.422-.187 1.03-.913.853-6.275 1.294-9.281 1.407-2.993.112-6.594-.528-11-2.594-4.437-2.08-5.647-3.331-10.906-5.656 4.729 2.548 6.29 4.578 10.344 6.625 1.671.844 3.485 1.467 5.25 1.906-.464.235-1.59.684-3.688.938-2.886.348-6.836.57-8.469.469-1.544-.096-3.2-.83-3.5-.97.17.12.382.405-.25 1-.912.861-6.246 1.331-9.25 1.47-2.99.138-6.567-.451-10.969-2.47-3.993-1.83-5.365-3.028-9.437-4.905v.156c3.647 2.133 5.27 3.935 8.875 5.719 1.737.86 3.607 1.45 5.437 1.875-.54.253-1.55.64-3.437.906-2.88.404-6.838.646-8.469.562a9.36 9.36 0 0 1-2.406-.437 12.971 12.971 0 0
841 width="1.7618605" 8411-1.313-.5c.17.109.432.41-.218 1.031-.911.87-6.25 1.392-9.25 1.563-2.987.17-6.574-.316-10.97-2.282-4.424-1.978-5.605-3.228-10.843-5.375 4.71 2.388 6.27 4.39 10.312 6.344a23.73 23.73 0 0 0 5.218 1.781c-.461.25-1.597.713-3.687 1.032-2.876.438-6.78.733-8.406.687-1.539-.043-3.233-.745-3.532-.875.169.113.411.414-.218 1.031-.908.891-6.203 1.529-9.188 1.813-2.971.283-6.573-.176-10.938-1.938-3.96-1.598-5.329-2.795-9.344-4.312v.156c3.596 1.811 5.239 3.582 8.813 5.156 1.722.759 3.587 1.29 5.406 1.625-.536.28-1.566.688-3.437 1.063-2.856.572-6.79 1.02-8.407 1.031-.844.006-1.706-.08-2.375-.25-.676-.162-1.16-.33-1.28-.375.166.094.422.383-.22 1.062-.897.951-6.186 1.918-9.125 2.438-2.925.518-6.432.374-10.719-1.031-4.315-1.415-5.472-2.53-10.562-3.969 4.577 1.751 6.09 3.56 10.031 5 1.627.594 3.37.956 5.094 1.156-.453.297-1.555.884-3.594 1.469-2.804.805-6.638 1.576-8.218
842 y="-0.17518716" 8421.75-1.495.165-3.117-.317-3.407-.406.164.09.393.36-.218 1.062-.883 1.014-6.045 2.372-8.938 3.063-2.88.687-6.335.76-10.562-.438-3.835-1.086-5.172-2.072-9.062-3.125v.156c3.484 1.395 5.07 2.92 8.53 4.032 1.669.535 3.457.786 5.22.875-.52.352-1.5.914-3.313 1.53-2.765.942-6.59 1.936-8.156 2.157-.818.115-1.633.123-2.281.031-.655-.083-1.133-.218-1.25-.25.162.075.434.34-.188 1.094-.87 1.055-6.01 2.66-8.875 3.438-2.852.774-6.259.958-10.438-.094-4.206-1.06-5.356-2.042-10.344-3.156 4.485 1.46 5.97 3.135 9.813 4.25 1.585.46 3.287.638 4.969.687-.442.337-1.513 1.028-3.5 1.781-2.734 1.037-6.452 2.163-8 2.438-1.465.26-3.06-.117-3.344-.188.16.08.38.321-.219 1.063-.865 1.07-5.916 2.818-8.75 3.687-2.82.866-6.207 1.157-10.344.22-3.753-.852-5.048-1.717-8.875-2.595v.157c3.428 1.237 4.987 2.632 8.375 3.53 1.632.434 3.367.584 5.094.563-.51.384-1.477 1.022-3.25 1.75-2.706 1.112-6.436 2.308-7.969
843 height="1.3503743"> 8432.625-.8.166-1.612.219-2.25.157v1.406c.227-.145.449-.273.719-.375 1.08-.41 2.171-.216 6-1.688 3.828-1.471 5.224-2.005 5.906-2.406.68-.4 1.612-.88 2.219-1.531 1.827-.138 3.57-.493 4.937-1 2.968-1.1 4.876-1.806 6.782-2.469 1.905-.663 2.354-1.415 3.406-1.781 1.091-.38 2.195-.166 6.062-1.531 3.868-1.366 5.283-1.827 5.969-2.22.701-.4 1.7-.932 2.313-1.593 1.97-.055 3.816-.385 5.28-.875 3.002-1.005 4.927-1.622 6.845-2.25 1.538-.504 2.174-1.047 2.906-1.437.23-.135.475-.254.75-.344 1.098-.36 2.181-.082 6.094-1.313 3.912-1.23 5.366-1.673 6.062-2.03.694-.358 1.63-.794 2.25-1.407 1.865-.023 3.636-.267 5.031-.688 3.03-.913 4.993-1.43 6.938-1.968 1.945-.54 2.426-1.265 3.5-1.563 1.114-.31 2.22.007 6.187-1.031 3.968-1.039 5.418-1.433 6.125-1.75.735-.33 1.814-.754 2.438-1.375 1.997.116 3.857-.02 5.344-.375 3.078-.735 5.083-1.101 7.062-1.5 1.588-.32 2.244-.79 3-1.094.238-.107.467-.193.75-.25 1.134-.23
844 <feGaussianBlur 8442.305.209 6.344-.5s5.5-.927 6.219-1.187c.715-.26 1.704-.568 2.343-1.094 1.925.24 3.748.224 5.188 0 3.126-.488 5.155-.7 7.156-.969 2.002-.268 2.489-.945 3.594-1.094 1.146-.154 2.276.302 6.344-.219 4.068-.52 5.56-.695 6.28-.937.738-.247 1.799-.586 2.438-1.125 2.05.335 3.974.398 5.5.219 3.143-.37 5.18-.56 7.188-.782 1.61-.178 2.265-.608 3.031-.843a3.43 3.43 0 0 1 .781-.188c1.15-.128 2.302.347 6.375-.125s5.56-.61 6.282-.844c.719-.232 1.7-.473 2.343-.968 1.937.333 3.77.404 5.22.25 3.145-.335 5.177-.519 7.187-.719 2.01-.2 2.484-.826 3.593-.938 1.152-.115 2.297.366 6.375-.062s5.59-.562 6.313-.781c.74-.224 1.796-.514 2.437-1.031 2.058.398 4.002.493 5.532.343 3.148-.308 5.175-.473 7.187-.656 1.614-.147 2.263-.56 3.031-.781.242-.081.494-.13.782-.156 1.152-.106 2.293.392 6.375 0 4.082-.393 5.589-.531 6.312-.75.721-.219 1.7-.448 2.344-.938 1.938.35 3.769.454 5.219.313 3.148-.309 5.175-.474
845 inkscape:collect="always" 8457.187-.657 2.012-.183 2.514-.838 3.625-.937 1.152-.103 2.292.385 6.375 0s5.589-.501 6.313-.719c.739-.222 1.795-.514 2.437-1.031 2.057.402 4.003.503 5.531.344 3.147-.329 5.178-.523 7.188-.72 1.613-.156 2.266-.63 3.031-.874.24-.088.463-.122.75-.156 1.148-.14 2.317.34 6.375-.25 4.058-.59 5.562-.778 6.281-1.032.717-.253 1.675-.558 2.313-1.093 1.92.211 3.72.151 5.156-.094 3.12-.533 5.112-.929 7.094-1.313 1.982-.384 2.474-1.04 3.562-1.28 1.13-.252 2.27.115 6.25-.876s5.43-1.42 6.125-1.781c.723-.376 1.762-.87 2.375-1.531 1.963-.012 3.794-.291 5.22-.844 2.95-1.145 4.872-1.87 6.687-2.75 1.455-.707 2.334-1.686 2.547-1.984.212-.298.111-.746.137-.767.043-.035.32-.085.48-.429.858-1.847 2.32-5.644
846 stdDeviation="19.304015" 8462.435-6.329.113-.682.163-1.348.214-1.745.03-.23-.147-.865-.125-.924.031-.082.305-.265.36-.515.267-1.198.09-2.191-.125-3.609-.214-1.417-.983-4.622-1.637-5.476-.659-.862-1.223-1.011-1.748-1-.208.27.137.262.163.312.68.05.934.369 1.42.897s1.221 3.85 1.358 5.301.19 2.86-.088 3.469c-.278.608-.723.517-1.016.583.531.186.67.125.732.969.058.813-.134 1.64-.52 2.806-.392 1.18-1.846 4.35-2.286 4.598-.452.256-.731.27-1.067.14z" enable-background="new" filter="url(#ho)" opacity=".25"/>
847 id="feGaussianBlur8862" /> 847 <path d="m988.75-263.84c1.912 0.634 4.55 1.758 6.125 2.813 1.575 1.054 2.896 1.482 5.531 3.375 2.609 1.873 5.027 3.015 7.313 4.062 2.47 1.132 5.752 2.155 9.531 3.938-1.207-1.259-7.139-3.365-9.031-4.188s-4.128-1.93-6.938-3.781-3.622-2.482-6-3.719c-2.377-1.237-4.08-1.95-6.53-2.5z" enable-background="new" filter="url(#hn)" opacity=".25"/>
848 </filter> 848 <path d="M957.5-260.78c1.91.618 4.583 1.71 6.156 2.75 1.574 1.04 2.896 1.482 5.531 3.375 2.609 1.873 5.027 3.015 7.313 4.063 2.47 1.131 5.752 2.154 9.531 3.937-1.207-1.258-7.201-3.396-9.094-4.219-1.892-.823-4.096-1.93-6.906-3.781-2.81-1.85-3.593-2.44-5.969-3.656s-4.113-1.939-6.562-2.469z" enable-background="new" filter="url(#hm)" opacity=".25"/>
849 <filter 849 <path d="M926.09-257.38c1.908.597 4.553 1.664 6.125 2.688 1.571 1.023 2.87 1.44 5.5 3.28 2.603 1.823 5.029 2.973 7.313 4 2.467 1.111 5.755 2.094 9.53 3.845-1.205-1.249-7.171-3.319-9.062-4.125s-4.102-1.891-6.906-3.688c-2.804-1.796-3.627-2.402-6-3.594-2.373-1.191-4.054-1.903-6.5-2.406z" enable-background="new" filter="url(#hl)" opacity=".25"/>
850 inkscape:collect="always" 850 <path d="M894.91-253.56c1.902.554 4.587 1.589 6.156 2.594s2.874 1.408 5.5 3.219c2.6 1.791 5 2.871 7.281 3.875 2.465 1.083 5.76 2.04 9.532 3.75-1.205-1.236-7.175-3.245-9.063-4.032-1.888-.786-4.075-1.83-6.875-3.593s-3.6-2.369-5.969-3.532c-2.37-1.163-4.123-1.834-6.562-2.28z" enable-background="new" filter="url(#hk)" opacity=".25"/>
851 id="filter8888" 851 <path d="M863.72-248.66c1.88.43 4.504 1.38 6.063 2.313 1.558.932 2.852 1.257 5.468 3 2.59 1.724 4.981 2.708 7.25 3.625 2.452.99 5.74 1.877 9.5 3.5-1.201-1.208-7.152-3.067-9.03-3.782-1.88-.715-4.086-1.684-6.876-3.375s-3.585-2.228-5.937-3.28-4.026-1.713-6.438-2z" enable-background="new" filter="url(#hj)" opacity=".25"/>
852 x="-0.2112188" 852 <path d="m833.16-241.38c1.848 0.296 4.47 0.976 6 1.781s2.814 1.056 5.375 2.531c2.535 1.46 4.89 2.326 7.125 3.063 2.414 0.797 5.657 1.467 9.375 2.844-1.188-1.129-7.088-2.59-8.938-3.156-1.85-0.567-4.003-1.374-6.75-2.844-2.746-1.47-3.5-1.92-5.812-2.781-2.311-0.861-4.005-1.32-6.375-1.438z" enable-background="new" filter="url(#hi)" opacity=".25"/>
853 width="1.4224375" 853 <path d="m802.91-232.31c1.822 0.211 4.366 0.8 5.875 1.531 1.51 0.73 2.756 0.93 5.281 2.281 2.5 1.338 4.832 2.049 7.031 2.657 2.377 0.656 5.565 1.073 9.22 2.187-1.168-1.045-6.93-2.103-8.75-2.562-1.822-0.46-3.953-1.127-6.657-2.438s-3.471-1.72-5.75-2.469-3.913-1.179-6.25-1.187z" enable-background="new" filter="url(#hh)" opacity=".25"/>
854 y="-0.16808605" 854 <path d="M773.19-222.19c1.811.179 4.32.665 5.813 1.344 1.491.678 2.753.798 5.25 2.062 2.47 1.252 4.79 1.896 6.968 2.438 2.354.585 5.492.897 9.094 1.844-1.15-.992-6.852-1.784-8.656-2.188s-3.916-1.021-6.594-2.25c-2.678-1.229-3.403-1.61-5.656-2.281-2.253-.67-3.896-1.002-6.219-.969z" enable-background="new" filter="url(#hg)" opacity=".25"/>
855 height="1.3361721"> 855 <path d="M743.56-211.19c1.793.13 4.273.55 5.75 1.188s2.716.741 5.188 1.937c2.446 1.184 4.72 1.747 6.874 2.219 2.328.51 5.42.68 9 1.562-1.143-.97-6.747-1.59-8.53-1.937-1.784-.347-3.884-.888-6.532-2.031-2.648-1.144-3.395-1.517-5.625-2.125-2.23-.61-3.826-.91-6.125-.813z" enable-background="new" filter="url(#hf)" opacity=".25"/>
856 <feGaussianBlur 856 </g>
857 inkscape:collect="always" 857 </g>
858 stdDeviation="8.3693583" 858 <path d="M912.45 671.2c1.642-3.218 3.518-5.735 4.861-9.849.8-3.658 3.312-2.03 7.26-8.397 1.403-2.24 5.477.391 8.966-2.399 1.27-.803 2.885-.404 4.483-.063 3.765 1.319 5.825 3.704 8.333 5.808 6.14 5.97 20.534 7.944 23.486 6.314 1.434-2.905 7.882-5.41 12.374-11.112.749-1.123 11.73-8.745 14.647-6.566" enable-background="new" fill="none" stroke="#000"/>
859 id="feGaussianBlur8890" /> 859 <path d="M937.07 660.78c7.363-3.233 13.811-8.908 20.708-13.385 3.31-1.97 6.87 3.216 10.796 3.599 2.298-.218 3.713 1.202 5.682 1.641 5.157 1.318 2.398 3.865 9.975 6.44 6.156 1.72 8.908-6.799 14.9-7.324 4.878-.503 8.1-.316 11.617-.252 3.927.139 4.079-3.498 6.061-5.304 2.98-2.805 7.156-1.85 10.145-4.74 1.018-1.385 1.955-3.011 2.735-5.109.882-2 3.04.306 4.798 1.263" enable-background="new" fill="none" stroke="#000"/>
860 </filter> 860 <g fill-rule="evenodd">
861 <filter 861 <path transform="translate(48.571 195.53)" d="m403.28 1056.3l56.569-42.426 72.125 14.142-46.669 52.326-53.74 7.071-28.284-31.113z" enable-background="accumulate" filter="url(#he)" opacity=".25"/>
862 inkscape:collect="always" 862 <path d="m590.84 1256.1c-1.407 18.801-1.145 32.751 2.082 49.303 3.226 16.552 16.406 45.907 20.334 63.184 3.926 17.267 2.694 38.31-12.46 51.148-15.317 12.977-42.05 21.599-67.831 15.734s-69.55-49.223-88.59-70.228c-19.112-21.083-63.761-93.851-77.94-124.28-14.177-30.425-12.66-36.719-8.119-45.53-9.367-24.52-12.414-50.067-33.712-75.577 30.325 3.114 43.88 26.956 60.126 47.14-5.53-48.076-18.055-64.416-28.374-90.724 29.994 6.082 50.579 31.872 63.98 72.712 9.554-3.918 18.238-9.373 30.187-9.061-11.298-41.696-17.949-69.916-36.687-101.07 53.442 5.67 83.657 80.639 78.971 87.96 9.978-2.243 19.006-6.53 30.437-5.65-11.249-38.348-21.048-76.869-3.66-118.65 0 0 48.287 65.436 54.39 85.805 6.103 20.37 1.52 38.701 1.52 38.701s16.96 31.085 20.293 51.094c3.373 20.241-3.533 59.103-4.946 77.983z" enable-background="new" fill="#ada469"/>
863 id="filter8892" 863 <path transform="matrix(-.90453 .25066 .25066 .90453 1043.9 219.06)" d="M719.5 738.7l18.312 15.432 44.411-15.388L805.5 713.2l11.464 19.221 30.672 12.784 25.097 5.728L892 723.2l16.023 23.826L947 752.2l10.245-6.198L964 754.7l25.5 11 2-40.5-35.551-14.538-32.493-21.527-40.452-11.466-21.307-15.533L840 685.2l-84.971-46.583-33.03 38.083-2.5 62z" clip-path="url(#e)" enable-background="accumulate" fill="#fff" filter="url(#o)"/>
864 x="-0.18692794" 864 <path transform="matrix(-.90453 .25066 .25066 .90453 870.86 206.47)" d="M584 696.5l-6.563 17.156s-7.811 20.365-15.688 43.656c-3.938 11.646-7.883 24.041-10.938 35.125s-5.335 20.38-5.5 28.281c-.398 19.162 5.747 34.888 8.938 41.75-.772 3.555-1.991 9.454-3.344 18.094-1.92 12.268-3.718 27.154-2.375 39.875 1.382 13.088 6.812 28.188 12.594 43.031s12.054 29.227 15.22 38.031c6.631 18.452 9.992 31.576 11.311 48.5.582 7.456-.242 20.336-1.25 33.375s-2.186 26.301-1.687 36.969c.989 21.14 9.328 46.835 33.375 57.937 22.775 10.515 55.327 11.702 83.438-3.437 16.16-8.704 30.076-27.098 43.375-46.906s24.969-41.053 31.938-54.906c15.353-30.521 39.394-115.46 45.625-152.72 3.018-18.047 3.921-29.066 2.625-38.031-.979-6.766-3.828-12.147-6.875-16.22 2.042-27.507-.732-51.368 11.969-79.405l10.562-23.281-23.812 9.312c-17.49 6.838-28.902 19.045-36.594 32.062-.323.546-.563 1.108-.875 1.656.222-22.515 4.408-37.638
865 width="1.3738559" 8656.594-58.688l1.968-19-17.03 8.656c-30.595 15.556-45.696 48.193-49.72 90.22-4.245-.626-8.831-1.02-13.812-.844-.291-39.18-.396-67.037 8.594-99.375l5.594-20.125-19.438 7.656c-30.91 12.204-47.86 41.931-56.625 68.375-4.383 13.222-6.746 25.801-7.594 35.938a92.19 92.19 0 0 0-.312 7.719c-3.242-.037-6.42.136-10.062.5.041-39.005-3.485-79.754-32.281-116.5L584 696.498zm5.813 43.812c16.807 30.644 17.475 63.967 16.938 99.75l-.22 15.062 12.036-6.54c8.662-3.132 19.56-.227 31.934-.835l14.675 9.357-6.331-25.794c-.09-.23-.22-.417-.25-.72-.2-2.039-.222-5.472.125-9.624.694-8.304 2.79-19.585 6.625-31.156 5.155-15.553 13.488-31.192 25.125-42.531-4.684 28.638-3.216 60.259-3.012 95.805l-2.766 13.262 15.496-7.598c9.03-2.758 17.19-.35 29.281 1.094l13.246 9.444L741.094 840c1.448-30.972 8.222-53.678 20.719-68.875-2.987 19.779-5.43 41.785.313 78.344l1.065 6.373-2.938 11.517 10.617-8.168 9.19 10.222-1.549-10.464
866 y="-0.23646873" 8663.427-6.95c5.7-13.21 10.173-26.212 16.344-36.655.96-1.624 2.031-3.065 3.062-4.563-3.68 21.155-2.427 40.208-4.093 57.781l-4.68 7.807 7.398.225c3.22 3.483 3.868 3.85 4.563 8.656s.318 14.4-2.563 31.625c-5.568 33.288-31.846 77.84-43.74 101.49-6.605 13.13-18.528 57.486-31.123 76.246s-28.53 39.767-37.172 44.42c-21.49 11.575-44.556 25.507-60.619 18.09-14.375-6.636-23.04-21.192-23.814-37.742-.383-8.188.613-21.31 1.625-34.406 1.013-13.097 11.29-22.571 15.423-36.563 5.373-18.181-1.447-36.594-12.5-53.937-6.486-10.178-23.977-24.258-29.548-38.562s-10.368-29.003-11.28-37.656c-.927-8.771.422-23.025 2.218-34.5 1.796-11.475 3.844-20.281 3.844-20.281l9.423-3.615-10.485-3.885s-8.5-15.31-8.094-34.812c.071-3.423 1.836-12.728 4.719-23.188s6.764-22.553 10.625-33.97c3.044-9.002 5.78-16.602 8.344-23.687z" clip-path="url(#am)" enable-background="new" filter="url(#ds)" opacity=".588"/>
867 height="1.4729375"> 867 <g transform="translate(324.57 331.53)" clip-path="url(#is)" enable-background="new" fill="#fff">
868 <feGaussianBlur 868 <path transform="matrix(-.90453 .25066 .25066 .90453 -52.2 74.097)" d="m-15.668 843.49l-49.497-15.556-26.87 52.326 41.012 45.255 49.497-38.184z" enable-background="accumulate" filter="url(#dr)"/>
869 inkscape:collect="always" 869 <path transform="matrix(-.90453 .25066 .25066 .90453 -46.928 75.511)" d="m118.71 859.93l-55.154-46.669-43.841 36.77 33.941 53.74-13.597 85.462-39.445 28.292-41.012 11.314-2.828 46.669 56.569 25.456 18.944-69.65 23.457-58.857 46.348-72.615 16.62-39.912z" enable-background="accumulate" filter="url(#dq)"/>
870 stdDeviation="31.21228" 870 </g>
871 id="feGaussianBlur8894" /> 871 <path transform="matrix(-.90453 .25066 .25066 .90453 277.64 407.04)" d="m-70.822 932.58l60.811-26.87 100.41 31.113-63.64 31.113-82.024-16.971-15.556-18.385z" enable-background="accumulate" filter="url(#cy)" opacity=".25"/>
872 </filter> 872 <path transform="matrix(-.90453 .25066 .25066 .90453 870.86 206.47)" d="M583.06 715.75c-12.106 34.45-26.714 68.533-31.75 104.84-.832 14.929 4.59 29.159 8.844 43.062-5.916 27.201-10.137 56.9 1.156 83.125 13.517 38.161 35.001 75.682 32.423 117.47-.948 29.294-9.014 60.994 5.39 88.282 10.199 19.335 33.14 27.312 53.968 27.668 27.862 1.174 56.463-11.622 72-35.261 22.596-29.372 41.802-61.497 55.24-96.06 16.89-45.506 29.672-92.561 37.934-140.4 1.824-12.941 3.1-27.47-4.58-38.823-3.43-7.336.043-15.56-.684-23.31.674-24.995 4.013-50.664 16.653-72.596-17.733 6.445-35.073 16.56-44.003 33.864-3.935 6.71-7.605 13.574-11.372 20.386-3.55-30.014 3.72-59.648 6.781-89.281-20.166 9.055-36.877 25.655-44.175 46.682-6.304 15.58-8.802 32.317-10.263 49.037-8.253-1.52-16.684-2.102-25.062-1.5-.963-38.698-.467-79.407 10.97-115.91-18.682 6.218-35.167 18.736-45.629 35.387-13.853 20.88-21.26 45.754-23.059 70.613.586
873 <clipPath 8734.325-.06 11.84-6.343 9.875-5.332.018-10.63.679-15.938 1.094 1.147-39.381-3.342-81.628-27.062-114.22-3.061-3.637-5.637-7.685-8.625-11.344l-2.813 7.312zm7.75 13.844c18.565 29.296 22.482 64.82 22.125 98.875.204 5.175-.517 11.829.125 16.062 12.319-6.103 26.739-2.44 39.781-2.187 2.317 1.223 3.192 1.652 1.906-1.407-4.164-13.953-1.848-28.613 1.805-42.408 6.367-26.29 20.628-51.088 42.82-67.03-8.617 37.237-5.716 76.562-6.094 113.97 12.253-6.91 27.28-3.446 40.031-.25 3.393 3.535 2.29-.73 2.188-3.812-.483-21.371 4.131-43.07 13.688-62.156 5.963-10.687 14.243-19.804 22.438-28.875-7.872 33.838-9.203 69.336-2.719 103.5 1.725-1.411 4.607-.454 5.656-.375 9.684-21.237 16.351-45.381 34.89-60.742 1.874-.371-1.448 8.525-1.484 11.898-3.535 21.846-7.175 44.142-8.784 66.219-8.784 2.342 2.849 2.323 3.469 4.062 7.923 10.566 4.663 24.405 3.632 36.353-7.064 45.034-22.142 87.362-35.954 130.68-12.075 32.95-27.374
874 clipPathUnits="userSpaceOnUse" 87458.852-47.888 87.202-10.953 13.551-23.245 27.851-40.844 32.5-20.156 6.242-44.207 10.877-62.6.046-17.29-12.34-21.024-35.709-19.262-55.686.048-15.826 4.938-28.512 4.41-43.492-.538-15.263-2.291-30.565-6.542-46.866-4.252-16.302-9.044-24.918-16.12-41.573-7.24-17.045-15.07-36.749-18.204-56.288-1.75-18.627 2.891-37.123 5.78-55.25 3.297-2.837-1.597-5.196-2.312-8.187-7.6-17.015-8.407-36.775-2.742-54.56 7.13-25.072 15.761-49.632 24.68-74.128l2.125 3.906z" clip-path="url(#cj)" enable-background="new" filter="url(#ir)" opacity=".588"/>
875 id="clipPath8906"> 875 <path transform="matrix(-.90453 .25066 .25066 .90453 1043.9 219.06)" d="m735.06 733.04l2.755 21.089 44.411-15.388 4.851-22.39-3.936-22.052-22.452-36.593-8.28 30.305-17.35 45.029z" clip-path="url(#e)" enable-background="accumulate" fill="#fff" filter="url(#bz)"/>
876 <path 876 <path transform="matrix(-.90453 .25066 .25066 .90453 1043.9 219.06)" d="m831.81 730.29l15.822 14.905 20.855 2.9-1.59-39.926 8.325-30.508-7.165-6.341-21.697 20.942-14.55 38.028z" clip-path="url(#e)" enable-background="accumulate" fill="#fff" filter="url(#by)"/>
877 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" 877 </g>
878 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z" 878 <g transform="translate(324.57 331.53)" clip-path="url(#iq)" enable-background="new" filter="url(#ip)">
879 id="path8908" 879 <path d="M36.494 811.806l-14.799 11.372-17.47-31.162 14.663.65 17.606 19.14z" enable-background="accumulate" fill="#fff" fill-rule="evenodd"/>
880 sodipodi:nodetypes="cscccccccccccc" 880 <path d="M-55 757.2h182v177H-55z" enable-background="accumulate" fill="none"/>
881 inkscape:connector-curvature="0" /> 881 </g>
882 </clipPath> 882 <g transform="translate(324.57 331.53)" clip-path="url(#io)" enable-background="new" filter="url(#in)">
883 <filter 883 <path d="m83.111 790.72l-28.201 12.855-5.658-21.687-13.943-25.046 6.325-6.88 26.384 18.51 15.094 22.249z" enable-background="accumulate" fill="#fff" fill-rule="evenodd"/>
884 inkscape:collect="always" 884 <path d="M-22 696.2h165v176H-22z" enable-background="accumulate" fill="none"/>
885 id="filter8940" 885 </g>
886 x="-0.25152978" 886 <g fill-rule="evenodd">
887 width="1.5030596" 887 <path d="m1084.8 1267.3c6.794 18.903 10.494 33.3 11.89 51.212 1.397 17.912-3.783 51.801-2.9 70.656 0.881 18.845 8.133 40.099 27.345 48.969 19.419 8.966 49.319 10.211 74.12-3.146 24.8-13.357 57.4-70.326 70.973-97.309 13.624-27.084 38.761-114.5 44.661-149.77s2.551-41.3-4.617-49.055c2.64-27.84-1.5-54.935 13.11-87.186-30.249 11.826-37.382 40.161-48.319 65.505-8-50.933 0.21-71.273 3.319-101.22-29.065 14.778-42.862 47.114-45 92.857-10.924-1.304-21.391-4.434-33.571-0.714-0.264-46.023-1.464-76.889 8.91-114.21-53.254 21.027-62.946 106.59-56.053 112.78-10.883 0.535-21.371-1.297-32.857 2.857 0.638-42.57-0.26-84.909-30-122.86 0 0-30.958 80.922-31.43 103.57-0.47 22.65 9.452 40.166 9.452 40.166s-8.568 36.741-6.298 58.232c2.295 21.741 20.443 59.676 27.266 78.658z" enable-background="new" fill="#ada469"/>
888 y="-0.053035267" 888 <path transform="translate(324.57 331.53)" d="M719.5 738.7l18.312 15.432 44.411-15.388L805.5 713.2l11.464 19.221 30.672 12.784 25.097 5.728L892 723.2l16.023 23.826L947 752.2l10.245-6.198L964 754.7l25.5 11 2-40.5-35.551-14.538-32.493-21.527-40.452-11.466-21.307-15.533L840 685.2l-84.971-46.583-33.03 38.083-2.5 62z" clip-path="url(#e)" enable-background="accumulate" fill="#fff" filter="url(#o)"/>
889 height="1.1060705"> 889 <path transform="translate(498.6 269.37)" d="M584 696.5l-6.563 17.156s-7.811 20.365-15.688 43.656c-3.938 11.646-7.883 24.041-10.938 35.125s-5.335 20.38-5.5 28.281c-.398 19.162 5.747 34.888 8.938 41.75-.772 3.555-1.991 9.454-3.344 18.094-1.92 12.268-3.718 27.154-2.375 39.875 1.382 13.088 6.812 28.188 12.594 43.031s12.054 29.227 15.22 38.031c6.631 18.452 9.992 31.576 11.311 48.5.582 7.456-.242 20.336-1.25 33.375s-2.186 26.301-1.687 36.969c.989 21.14 9.328 46.835 33.375 57.937 22.775 10.515 55.327 11.702 83.438-3.437 16.16-8.704 30.076-27.098 43.375-46.906s24.969-41.053 31.938-54.906c15.353-30.521 39.394-115.46 45.625-152.72 3.018-18.047 3.921-29.066 2.625-38.031-.979-6.766-3.828-12.147-6.875-16.22 2.042-27.507-.732-51.368 11.969-79.405l10.562-23.281-23.812 9.312c-17.49 6.838-28.902 19.045-36.594 32.062-.323.546-.563 1.108-.875 1.656.222-22.515 4.408-37.638 6.594-58.688l1.968-19-17.03
890 <feGaussianBlur 8908.656c-30.595 15.556-45.696 48.193-49.72 90.22-4.245-.626-8.831-1.02-13.812-.844-.291-39.18-.396-67.037 8.594-99.375l5.594-20.125-19.438 7.656c-30.91 12.204-47.86 41.931-56.625 68.375-4.383 13.222-6.746 25.801-7.594 35.938a92.19 92.19 0 0 0-.312 7.719c-3.242-.037-6.42.136-10.062.5.041-39.005-3.485-79.754-32.281-116.5L584 696.498zm5.813 43.812c16.807 30.644 17.475 63.967 16.938 99.75l-.22 15.062 12.036-6.54c8.662-3.132 19.56-.227 31.934-.835l14.675 9.357-6.331-25.794c-.09-.23-.22-.417-.25-.72-.2-2.039-.222-5.472.125-9.624.694-8.304 2.79-19.585 6.625-31.156 5.155-15.553 13.488-31.192 25.125-42.531-4.684 28.638-3.216 60.259-3.012 95.805l-2.766 13.262 15.496-7.598c9.03-2.758 17.19-.35 29.281 1.094l13.246 9.444L741.094 840c1.448-30.972 8.222-53.678 20.719-68.875-2.987 19.779-5.43 41.785.313 78.344l1.065 6.373-2.938 11.517 10.617-8.168 9.19 10.222-1.549-10.464 3.427-6.95c5.7-13.21
891 inkscape:collect="always" 89110.173-26.212 16.344-36.655.96-1.624 2.031-3.065 3.062-4.563-3.68 21.155-2.427 40.208-4.093 57.781l-4.68 7.807 7.398.225c3.22 3.483 3.868 3.85 4.563 8.656s.318 14.4-2.563 31.625c-5.568 33.288-31.793 123.17-43.688 146.81-6.605 13.13-18.03 33.896-30.625 52.656s-27.359 35.534-36 40.187c-21.49 11.574-48.78 10.26-64.844 2.844-14.375-6.637-20.538-23.45-21.312-40-.383-8.188.613-21.31 1.625-34.406 1.013-13.097 11.29-22.571 15.423-36.563 5.373-18.181-1.447-36.594-12.5-53.937-6.486-10.178-23.977-24.258-29.548-38.562s-10.368-29.003-11.28-37.656c-.927-8.771.422-23.025 2.218-34.5 1.796-11.475 3.844-20.281 3.844-20.281l9.423-3.616-10.485-3.884s-8.5-15.31-8.094-34.812c.071-3.424 1.836-12.728 4.719-23.188s6.764-22.553 10.625-33.97c3.044-9.002 5.78-16.602 8.344-23.687z" clip-path="url(#am)" enable-background="new" filter="url(#ds)" opacity=".588"/>
892 stdDeviation="13.024603" 892 <g transform="translate(324.57 331.53)" clip-path="url(#im)" fill="#fff">
893 id="feGaussianBlur8942" /> 893 <path d="m824.49 818.48l-49.497-15.556-26.87 52.326 41.012 45.255 49.497-38.184z" enable-background="accumulate" filter="url(#dr)"/>
894 </filter> 894 <path d="m964.49 855.25l-55.154-46.669-43.841 36.77 33.941 53.74 7.071 66.468-50.912 35.355-41.012 11.314-2.828 46.669 56.569 25.456 63.64-76.368 24.042-94.752 8.485-57.983z" enable-background="accumulate" filter="url(#dq)"/>
895 <linearGradient 895 </g>
896 inkscape:collect="always" 896 <path transform="translate(48.571 195.53)" d="m1045.3 1043.6l60.811-26.87 100.41 31.113-63.64 31.113-82.024-16.971-15.556-18.385z" enable-background="accumulate" filter="url(#cy)" opacity=".25"/>
897 xlink:href="#linearGradient8952" 897 <path transform="translate(498.6 269.37)" d="M583.06 715.75c-12.106 34.45-26.714 68.533-31.75 104.84-.832 14.929 4.59 29.159 8.844 43.062-5.916 27.201-10.137 56.9 1.156 83.125 13.517 38.161 35.001 75.682 32.423 117.47-.948 29.294-9.014 60.994 5.39 88.282 10.199 19.335 33.14 27.312 53.968 27.668 27.862 1.174 56.463-11.622 72-35.261 22.596-29.372 41.802-61.497 55.24-96.06 16.89-45.506 29.672-92.561 37.934-140.4 1.824-12.941 3.1-27.47-4.58-38.823-3.43-7.336.043-15.56-.684-23.31.674-24.995 4.013-50.664 16.653-72.596-17.733 6.445-35.073 16.56-44.003 33.864-3.935 6.71-7.605 13.574-11.372 20.386-3.55-30.014 3.72-59.648 6.781-89.281-20.166 9.055-36.877 25.655-44.175 46.682-6.304 15.58-8.802 32.317-10.263 49.037-8.253-1.52-16.684-2.102-25.062-1.5-.963-38.698-.467-79.407 10.97-115.91-18.682 6.218-35.167 18.736-45.629 35.387-13.853 20.88-21.26 45.754-23.059 70.613.586 4.325-.06 11.84-6.343
898 id="linearGradient8958" 8989.875-5.332.018-10.63.679-15.938 1.094 1.147-39.381-3.342-81.628-27.062-114.22-3.061-3.637-5.637-7.685-8.625-11.344l-2.813 7.312zm7.75 13.844c18.565 29.296 22.482 64.82 22.125 98.875.204 5.175-.517 11.829.125 16.062 12.319-6.103 26.739-2.44 39.781-2.187 2.317 1.223 3.192 1.652 1.906-1.407-4.164-13.953-1.848-28.613 1.805-42.408 6.367-26.29 20.628-51.088 42.82-67.03-8.617 37.237-5.716 76.562-6.094 113.97 12.253-6.91 27.28-3.446 40.031-.25 3.393 3.535 2.29-.73 2.188-3.812-.483-21.371 4.131-43.07 13.688-62.156 5.963-10.687 14.243-19.804 22.438-28.875-7.872 33.838-9.203 69.336-2.719 103.5 1.725-1.411 4.607-.454 5.656-.375 9.684-21.237 16.351-45.381 34.89-60.742 1.874-.371-1.448 8.525-1.484 11.898-3.535 21.846-3.297 44.173-4.906 66.25-1.312 1.377 2.849 2.323 3.469 4.062 7.923 10.566 3.123 24.831 2.092 36.78-7.064 45.034-21.766 88.38-35.577 131.7-12.075 32.95-30.72 63.08-51.234 91.43-10.953
899 x1="609.31244" 89913.55-23.245 27.85-40.844 32.5-20.156 6.24-43.576 5.174-61.97-5.657-17.29-12.34-21.023-35.709-19.261-55.686.048-15.826 2.372-27.8 7.917-42.805s2.471-31.332-1.78-47.633-12.18-26.26-21.822-42.204-17.637-36.037-20.772-55.577c-1.75-18.627 2.892-37.123 5.781-55.25 3.296-2.837-1.598-5.196-2.312-8.187-7.602-17.015-8.408-36.775-2.743-54.56 7.13-25.072 15.761-49.632 24.68-74.128l2.125 3.906z" clip-path="url(#cj)" enable-background="new" filter="url(#il)" opacity=".588"/>
900 y1="239.46866" 900 <path transform="translate(324.57 331.53)" d="m735.06 733.04l2.755 21.089 44.411-15.388 4.851-22.39-3.936-22.052-22.452-36.593-8.28 30.305-17.35 45.029z" clip-path="url(#e)" enable-background="accumulate" fill="#fff" filter="url(#bz)"/>
901 x2="560.83142" 901 <path transform="translate(324.57 331.53)" d="m831.81 730.29l15.822 14.905 20.855 2.9-1.59-39.926 8.325-30.508-7.165-6.341-21.697 20.942-14.55 38.028z" clip-path="url(#e)" enable-background="accumulate" fill="#fff" filter="url(#by)"/>
902 y2="262.86206" 902 </g>
903 gradientUnits="userSpaceOnUse" 903 <g transform="translate(324.57 331.53)" clip-path="url(#ik)" filter="url(#ij)">
904 gradientTransform="translate(450.03125,73.843964)" /> 904 <path d="M910.14 746.31l32.613 5.174-.361-23.876 7.188-29.682-8.45-5.264-21.823 26.511-9.167 27.137z" enable-background="accumulate" fill="#fff" fill-rule="evenodd"/>
905 <linearGradient 905 <path d="M877.52 650.19h123.04v172.53H877.52z" enable-background="accumulate" fill="none"/>
906 inkscape:collect="always" 906 </g>
907 xlink:href="#linearGradient8964" 907 <g transform="translate(324.57 331.53)" clip-path="url(#ii)" filter="url(#ih)">
908 id="linearGradient8970" 908 <path d="M964 754.69l18.429 7.465 9.071-36.964-14.87 4.839L964 754.69z" enable-background="accumulate" fill="#fff" fill-rule="evenodd"/>
909 x1="603.84064" 909 <path d="M924.9 677.06h142.13v125.16H924.9z" enable-background="accumulate" fill="none"/>
910 y1="627.85303" 910 </g>
911 x2="616.24396" 911 <g stroke-miterlimit="1">
912 y2="585.42664" 912 <path d="m596.57 400.85h440v376h-440z" fill="none" stroke="#f8d615" stroke-width="18"/>
913 gradientUnits="userSpaceOnUse" 913 <path d="m104.57 248.85h1684v1292h-1684z" fill="none" stroke="#f83615" stroke-width="18"/>
914 gradientTransform="translate(450.03125,73.843964)" /> 914 <path d="M3407.4 296.46h522.57v1182.5H3407.4z" fill="url(#ig)" stroke="#f815bb" stroke-width="13.347"/>
915 <filter 915 </g>
916 inkscape:collect="always" 916 <g transform="matrix(1.0057 0 0 2.3995 3452.3 -18.515)" clip-path="url(#if)" enable-background="new">
917 id="filter9020" 917 <g filter="url(#aq)">
918 x="-0.32861114" 918 <g transform="translate(-174.03 62.156)" filter="url(#g)">
919 width="1.6572223" 919 <path d="m1268.3 663.77s-0.296 26.161 4.643 37.857 20.038 26.487 28.572 31.429 18.929 8.571 18.929 8.571l117.86-115 17.857-75.714-96.43 38.571-91.428 74.286z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
920 y="-0.182" 920 <path d="M1197.8 486.14h333.75v309.71H1197.8z" enable-background="accumulate" fill="none"/>
921 height="1.364"> 921 </g>
922 <feGaussianBlur 922 </g>
923 inkscape:collect="always" 923 <g transform="translate(-174.03 62.156)" enable-background="new" filter="url(#g)" opacity=".18">
924 stdDeviation="20.912684" 924 <path d="m1268.3 663.77s-0.296 26.161 4.643 37.857 20.038 26.487 28.572 31.429 18.929 8.571 18.929 8.571l117.86-115 17.857-75.714-96.43 38.571-91.428 74.286z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
925 id="feGaussianBlur9022" /> 925 <path d="M1197.8 486.14h333.75v309.71H1197.8z" enable-background="accumulate" fill="none"/>
926 </filter> 926 </g>
927 <filter 927 </g>
928 inkscape:collect="always" 928 <path d="M3492.3 296.46H3930v902.66h-437.7z" fill="#fff" stroke="#f8d615" stroke-miterlimit="1" stroke-width="18"/>
929 id="filter9024" 929 <g transform="matrix(1.0057 0 0 2.3995 3249.4 125.01)" clip-path="url(#ie)" enable-background="new" filter="url(#id)">
930 x="-0.55453134" 930 <path d="M36.494 811.806l-14.799 11.372-17.47-31.162 14.663.65 17.606 19.14z" enable-background="accumulate" fill="#fff" fill-rule="evenodd"/>
931 width="2.1090627" 931 <path d="M-55 757.2h182v177H-55z" enable-background="accumulate" fill="none"/>
932 y="-0.51434779" 932 </g>
933 height="2.0286956"> 933 <g transform="matrix(1.0057 0 0 2.3995 3249.4 125.01)" clip-path="url(#ic)" enable-background="new" filter="url(#gd)">
934 <feGaussianBlur 934 <path d="m83.111 790.72l-28.201 12.855-5.658-21.687-13.943-25.046 6.325-6.88 26.384 18.51 15.094 22.249z" enable-background="accumulate" fill="#fff" fill-rule="evenodd"/>
935 inkscape:collect="always" 935 <path d="M-22 696.2h165v176H-22z" enable-background="accumulate" fill="none"/>
936 stdDeviation="20.912684" 936 </g>
937 id="feGaussianBlur9026" /> 937 <path transform="matrix(1.0057 0 0 2.3995 3249.4 125.01)" d="m332.34 898.39l-32.732-61.3-37.617 45.106c2.177 1.317 5.774-20.856 45.6-64.417l24.749 80.61z" clip-path="url(#gc)" enable-background="accumulate" fill="#fff" fill-rule="evenodd" filter="url(#gb)" opacity=".5"/>
938 </filter> 938 <g clip-path="url(#ga)">
939 <filter 939 <g fill-rule="evenodd">
940 inkscape:collect="always" 940 <g enable-background="new">
941 id="filter9044" 941 <path transform="matrix(.71488 -.46488 .26446 2.3151 3478.4 126.16)" d="m245.12 100.05s-47.128-31.647-67.215-35.801c-20.038-4.144-38.473-3.318-51.934 13.607s-12.077 61.265-13.536 86.97 2.55 70.177 17.605 88.666c15.055 18.488 45.886 13.585 49.927 21.414 2.213 4.287 65.152-174.86 65.152-174.86z" enable-background="accumulate" fill="url(#r)"/>
942 x="-0.32631579" 942 <path transform="matrix(.71488 -.46488 .26446 2.3151 3478.4 126.16)" d="M135.38 82.018s26.344 1.939 37.633 13.903c11.415 12.097 13.735 21.332 15.296 37.735 1.563 16.425-.85 28.418-7.814 36.037s-1.004 19.583-25.916 12.071-27.032-27.783-26.515-46.305c.517-18.529 7.316-53.441 7.316-53.441z" enable-background="accumulate" fill="url(#q)"/>
943 width="1.6526316" 943 <path transform="matrix(.71488 -.46488 .26446 2.3151 3478.4 126.16)" d="M135.65 81.927s-4.645 16.365.588 28.563c5.488 12.793 27.224 44.26 27.224 54.656l22.656-5c2.542-6.966 3.21-15.752 2.188-26.5-1.562-16.403-3.867-25.621-15.281-37.719-9.655-10.232-31.593-13.375-37.375-14z" enable-background="new" fill="url(#p)"/>
944 y="-0.84545463" 944 </g>
945 height="2.6909094"> 945 <g enable-background="new">
946 <feGaussianBlur 946 <path d="M4043.297 824.626l-.09-.006c-1.489 1.728-6.783 2.02-7.718 20.884-.878 17.694 13.035 44.859 15.06 47.837 1.636 2.403 3.427 4.343 5.205 5.58l1.41.916c1.894 1.031 3.7 1.38 5.163 1.19 3.177-.414 5.214-.812 7.238-1.183 2.025-.372 2.592-1.8 3.707-2.078 1.156-.288 2.255.9 6.345-.372 4.09-1.271 5.587-1.894 6.324-2.566.765-.698 1.86-1.592 2.549-2.999 1.962.51 3.823.346 5.31-.58 3.08-1.92 5.084-3.12 6.998-4.722 1.536-1.285 2.513-3.421 2.759-4.073.246-.653.183-1.71.211-1.754.047-.072.351-.13.55-.906 1.07-4.167 2.968-12.778
947 inkscape:collect="always" 9473.16-14.38.193-1.594.324-3.178.42-4.11.056-.54-.046-2.136-.017-2.27.04-.187.317-.518.401-1.098.404-2.783.343-5.237.292-8.675-.05-3.438-.44-11.267-.995-13.482-.356-1.423-.708-2.109-1.051-2.478-.065-.06-.119-.145-.18-.2-.02-.015-.043-.004-.062-.017-.303-.265-.59-.545-1.13-.839-.972-.527-2.393-1.283-3.937-1.684-.514-.134-1.041-.17-1.572-.205-3.591-.231-9.115-.108-10.396 1.072-1.593-1.244-3.874-2.542-5.879-2.746-3.086-.313-5.002-.546-6.953-.776-1.952-.23-1.73.464-2.958.32-1.328-.155-1.76-1.022-5.568-1.302-3.577-.262-9.087-.095-10.397 1.072-1.593-1.245-3.872-2.542-5.878-2.746-3.087-.313-5.006-.472-6.958-.702-.663-.078-1.055.01-1.364.079z" enable-background="new" fill="#bcb786"/>
948 stdDeviation="21.92031" 948 <g transform="matrix(1.0047 .1075 -.04506 2.3971 3818.4 1782.9)" clip-path="url(#fz)" enable-background="new" filter="url(#fy)">
949 id="feGaussianBlur9046" /> 949 <path d="M229.94-409.12c-3.558.05-9.024.36-10.303.904-1.606-.447-3.903-.881-5.9-.877a979.03 979.03 0 0 1-6.907 0c-.66-.003-1.048.068-1.353.11v1.096c.12-.18.393-.69.95-.767.747-.103 5.17-.151 7.31-.11 1.775.035 4.455.274 6.39.96.32.113.618.273.891.41 1.964.987 7.944 4.302 7.944 4.302s-6.633-3.948-7.483-4.439c-.203-.117-.575-.258-1.036-.41 1.22-.449 5.076-.62 7.828-.713 3.024-.102 3.348-.09 5.41.192 2.13.29 3.34.602 3.34.602s-.08-.64 1.035-.794c.748-.103 5.17-.152 7.31-.11 2.07.04 5.366.407 7.282 1.37 1.003.504 3.035 1.569 4.795 2.536l.096-.02s-3.58-2.162-4.43-2.653c-.204-.117-.575-.258-1.037-.411 1.22-.448 5.047-.62 7.8-.712 3.024-.102 3.347-.09 5.41.191 1.954.267 3.013.53 3.195.576l-.027-.312a8.503 8.503 0 0 0-1.4-.357c-1.301-.235-3.4-.602-5.51-.564-3.571.064-9.052.356-10.302.904-1.606-.447-3.877-.881-5.871-.877-3.072.007-4.994.01-6.936
950 </filter> 9500-1.943-.009-1.713.28-2.936.274-1.322-.005-1.766-.354-5.555-.301M206.2-407.48c1.92.817 4.577 2.193 6.159 3.397s2.908 1.774 5.555 3.918c.885.718 1.748 1.35 2.591 1.922l.541-.19a57.511 57.511 0 0 1-2.269-1.622c-2.822-2.12-3.627-2.81-6.015-4.274s-4.1-2.366-6.562-3.15" enable-background="new"/>
951 <filter 951 <path d="M237.8-407.48c1.92.817 4.606 2.193 6.188 3.397.813.62 1.558 1.07 2.45 1.654l.65-.116a40.414 40.414 0 0 0-2.697-1.784c-2.389-1.465-4.128-2.366-6.59-3.151" enable-background="new"/>
952 inkscape:collect="always"
953 id="filter9048"
954 x="-0.40879121"
955 width="1.8175824"
956 y="-0.71538466"
957 height="2.4307692">
958 <feGaussianBlur
959 inkscape:collect="always"
960 stdDeviation="21.92031"
961 id="feGaussianBlur9050" />
962 </filter>
963 <filter
964 inkscape:collect="always"
965 id="filter3587"
966 x="-0.1">
967 <feGaussianBlur
968 inkscape:collect="always"
969 stdDeviation="8.881432"
970 id="feGaussianBlur3589" />
971 </filter>
972 <clipPath
973 clipPathUnits="userSpaceOnUse"
974 id="clipPath3602">
975 <path
976 sodipodi:nodetypes="czzzzzzczczczczzzc"
977 id="path3604"
978 d="m 647.61204,540.04601 c 0,0 22.61947,-6.50681 35.74275,-5.87273 13.12328,0.63409 30.64158,1.93862 43.70885,12.18619 13.06727,10.24756 25.06774,27.14007 34.11239,58.36965 9.04465,31.22958 1.69832,99.25201 -6.17603,143.34735 -7.87435,44.09534 -28.2651,106.11298 -45,140 -16.7349,33.88702 -49.79771,77.4952 -60.56943,89.87616 -11.36422,13.06197 -56.20589,36.42617 -79.43057,42.26667 5.3033,-10.6066 48.89976,-50.58884 35,-60.71426 -14.01897,-10.21226 -45.76009,45.98236 -84.29315,29.03317 21.38231,-13.13212 41.7794,-51.18606 34.04061,-66.59445 -7.84025,-15.61039 -30.70493,48.75757 -93.53554,37.01288 30.05204,-27.52666 55.40706,-70.90401 41.2627,-82.9797 -14.41516,-12.30687 -60.46175,54.29315 -60.46175,54.29315 0,0 -2.8219,-41.70118 13.7732,-68.60732 16.63935,-26.97787 79.65297,-81.61527 99.55313,-111.70342 19.90015,-30.08814 33.61256,-66.00902 42.13542,-92.51794 8.52286,-26.50892 15.80094,-77.09954 15.80094,-77.09954"
979 style="display:inline;opacity:1;fill:#202020;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
980 inkscape:connector-curvature="0" />
981 </clipPath>
982 <filter
983 inkscape:collect="always"
984 id="filter4120"
985 x="-0.2770822"
986 width="1.5541644"
987 y="-0.32482043"
988 height="1.6496409">
989 <feGaussianBlur
990 inkscape:collect="always"
991 stdDeviation="19.956289"
992 id="feGaussianBlur4122" />
993 </filter>
994 <clipPath
995 clipPathUnits="userSpaceOnUse"
996 id="clipPath3631">
997 <path
998 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
999 d="m 760.16396,935.83377 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.91234 -3.78268,51.80084 -2.90046,70.65614 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.08394 38.76107,-114.49737 44.6608,-149.76859 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
1000 id="path3633"
1001 sodipodi:nodetypes="czzzzzzcccccccccczczz"
1002 inkscape:connector-curvature="0" />
1003 </clipPath>
1004 <clipPath
1005 clipPathUnits="userSpaceOnUse"
1006 id="clipPath3665">
1007 <path
1008 sodipodi:nodetypes="czzcczcc"
1009 id="path3667"
1010 d="m 366.88839,504.13471 c 0,0 -29.55406,40.57305 -47.85714,74.28571 -18.30309,33.71267 -58.62109,126.35694 -70.35714,171.07143 -11.7594,44.80344 -62.5,123.57144 -62.5,123.57144 l 76.07143,18.21428 c 0,0 11.80712,-12.82335 31.07142,-46.07143 19.2643,-33.24808 60.35715,-138.57143 60.35715,-138.57143 l 13.21428,-202.5 z"
1011 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#0f0f0f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1012 inkscape:connector-curvature="0" />
1013 </clipPath>
1014 <clipPath
1015 clipPathUnits="userSpaceOnUse"
1016 id="clipPath3677">
1017 <path
1018 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1019 d="m 586.13271,997.98981 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.9123 -3.78268,51.8008 -2.90046,70.6561 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.0839 38.76107,-114.49733 44.6608,-149.76855 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
1020 id="path3679"
1021 sodipodi:nodetypes="czzzzzzcccccccccczczz"
1022 inkscape:connector-curvature="0" />
1023 </clipPath>
1024 <filter
1025 inkscape:collect="always"
1026 id="filter3898">
1027 <feGaussianBlur
1028 inkscape:collect="always"
1029 stdDeviation="10.892985"
1030 id="feGaussianBlur3900" />
1031 </filter>
1032 <filter
1033 inkscape:collect="always"
1034 id="filter4130"
1035 x="-0.49509686"
1036 width="1.9901937"
1037 y="-0.26708817"
1038 height="1.5341763">
1039 <feGaussianBlur
1040 inkscape:collect="always"
1041 stdDeviation="10.730622"
1042 id="feGaussianBlur4132" />
1043 </filter>
1044 <filter
1045 inkscape:collect="always"
1046 id="filter4141"
1047 x="-0.40611032"
1048 width="1.8122206"
1049 y="-0.30260596"
1050 height="1.6052119">
1051 <feGaussianBlur
1052 inkscape:collect="always"
1053 stdDeviation="9.8586086"
1054 id="feGaussianBlur4143" />
1055 </filter>
1056 <clipPath
1057 clipPathUnits="userSpaceOnUse"
1058 id="clipPath4177">
1059 <path
1060 sodipodi:nodetypes="czzzzzzcccccccccczczz"
1061 id="path4179"
1062 d="m 586.13271,997.98981 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.9123 -3.78268,51.8008 -2.90046,70.6561 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.0839 38.76107,-114.49733 44.6608,-149.76855 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
1063 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1064 inkscape:connector-curvature="0" />
1065 </clipPath>
1066 <filter
1067 inkscape:collect="always"
1068 id="filter4185">
1069 <feGaussianBlur
1070 inkscape:collect="always"
1071 stdDeviation="3.6164709"
1072 id="feGaussianBlur4187" />
1073 </filter>
1074 <filter
1075 inkscape:collect="always"
1076 id="filter4105">
1077 <feGaussianBlur
1078 inkscape:collect="always"
1079 stdDeviation="3.8640966"
1080 id="feGaussianBlur4107" />
1081 </filter>
1082 <clipPath
1083 clipPathUnits="userSpaceOnUse"
1084 id="clipPath2833">
1085 <path
1086 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#292929;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1087 d="m 569.03125,1018.7776 c -4.28571,0.7143 -27.62815,3.6181 -57.85714,10 -30.22899,6.3819 -57.31395,4.9661 -135.78608,17.3296 -79.85178,12.5808 -94.06436,42.5423 -108.12225,47.0643 -14.70014,4.7286 -145.37739,-65.8225 -145.37739,-65.8225 l 4.28572,-94.28571 c 0,0 85.88551,-16.20094 112.14285,-33.57143 26.25735,-17.37049 45.58238,-49.66598 59.28572,-71.42857 13.70334,-21.76259 32.85714,-71.42858 32.85714,-71.42858 l 238.57143,262.14289 z"
1088 id="path2835"
1089 sodipodi:nodetypes="czzzcczzcc"
1090 inkscape:connector-curvature="0" />
1091 </clipPath>
1092 <linearGradient
1093 inkscape:collect="always"
1094 xlink:href="#linearGradient2843"
1095 id="linearGradient2841"
1096 gradientUnits="userSpaceOnUse"
1097 x1="347.89655"
1098 y1="1070.2124"
1099 x2="275.58191"
1100 y2="867.97992" />
1101 <linearGradient
1102 inkscape:collect="always"
1103 xlink:href="#linearGradient3627"
1104 id="linearGradient3688"
1105 gradientUnits="userSpaceOnUse"
1106 x1="699.32867"
1107 y1="269.76755"
1108 x2="698.97504"
1109 y2="346.1351" />
1110 <mask
1111 maskUnits="userSpaceOnUse"
1112 id="mask3684">
1113 <ellipse
1114 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient3688);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.43724918px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1115 id="path3686"
1116 transform="translate(-174.03125,62.156036)"
1117 cx="579.474"
1118 cy="260.57516"
1119 rx="192.6866"
1120 ry="164.04877" />
1121 </mask>
1122 <clipPath
1123 clipPathUnits="userSpaceOnUse"
1124 id="clipPath3622">
1125 <path
1126 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1127 d="m 266.27183,924.57186 c -1.40727,18.80121 -1.1449,32.75103 2.08174,49.30328 3.22665,16.55234 16.40608,45.90736 20.3344,63.18376 3.92622,17.2671 2.69413,38.3096 -12.45944,51.1482 -15.31761,12.9774 -42.05127,21.5989 -67.8323,15.7338 -25.78106,-5.8653 -69.54907,-49.2234 -88.59019,-70.2283 C 100.6939,1012.6293 56.045183,939.86194 41.867508,909.43681 27.689836,879.01169 29.207903,872.71824 33.747793,863.90708 24.381071,839.38658 21.334081,813.84027 0.03533552,788.33044 30.360815,791.44488 43.915625,815.28677 60.161025,835.47019 54.631129,787.39416 42.10631,771.05369 31.787073,744.74589 c 29.994295,6.08166 50.57936,31.8724 63.979783,72.7125 9.554154,-3.91791 18.237764,-9.37294 30.187414,-9.0612 -11.2975,-41.6958 -17.94946,-69.91584 -36.687255,-101.06994 53.441965,5.67033 83.657025,80.63932 78.971425,87.9608 9.97797,-2.24399 19.00565,-6.53038 30.43653,-5.65167 -11.24896,-38.34702 -21.04781,-76.8679 -3.65971,-118.64818 0,0 48.28678,65.43687 54.38966,85.80577 6.10287,20.36891 1.51881,38.70052 1.51881,38.70052 0,0 16.95957,31.08529 20.29392,51.09413 3.3731,20.24135 -3.53269,59.10332 -4.94582,77.98324 z"
1128 id="path3624"
1129 sodipodi:nodetypes="czzzzzzcccccccccczczz"
1130 inkscape:connector-curvature="0" />
1131 </clipPath>
1132 <clipPath
1133 clipPathUnits="userSpaceOnUse"
1134 id="clipPath3636">
1135 <path
1136 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1137 d="m 760.16396,935.83377 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.91234 -3.78268,51.80084 -2.90046,70.65614 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.08394 38.76107,-114.49737 44.6608,-149.76859 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
1138 id="path3638"
1139 sodipodi:nodetypes="czzzzzzcccccccccczczz"
1140 inkscape:connector-curvature="0" />
1141 </clipPath>
1142 <linearGradient
1143 inkscape:collect="always"
1144 xlink:href="#linearGradient3660"
1145 id="linearGradient3666"
1146 x1="1255.7386"
1147 y1="667.09216"
1148 x2="893.69995"
1149 y2="858.01099"
1150 gradientUnits="userSpaceOnUse" />
1151 <filter
1152 inkscape:collect="always"
1153 id="filter3779"
1154 x="-0.087980822"
1155 width="1.1759616"
1156 y="-0.17728332"
1157 height="1.3545666">
1158 <feGaussianBlur
1159 inkscape:collect="always"
1160 stdDeviation="16.340344"
1161 id="feGaussianBlur3781" />
1162 </filter>
1163 <filter
1164 id="filter3785"
1165 inkscape:label="White Fur">
1166 <feTurbulence
1167 id="feTurbulence3787"
1168 type="fractalNoise"
1169 baseFrequency="0.24044943820224721"
1170 numOctaves="10"
1171 seed="655"
1172 result="result0" />
1173 <feDisplacementMap
1174 id="feDisplacementMap3789"
1175 in="SourceGraphic"
1176 in2="result0"
1177 scale="62"
1178 xChannelSelector="B"
1179 yChannelSelector="G" />
1180 </filter>
1181 <filter
1182 inkscape:collect="always"
1183 id="filter3677">
1184 <feGaussianBlur
1185 inkscape:collect="always"
1186 stdDeviation="2.0397518"
1187 id="feGaussianBlur3679" />
1188 </filter>
1189 <clipPath
1190 clipPathUnits="userSpaceOnUse"
1191 id="clipPath3722">
1192 <path
1193 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#121212;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1194 d="m 709.28572,844.50504 c 54.28571,-1.42857 126.035,-15.05199 170,-26.78572 44.05271,-11.75714 125.88628,-36.34724 175.35708,-57.85714 49.3393,-21.45272 113.6037,-59.2816 154.2858,-92.14285 40.5081,-32.72069 52.3899,-55.81981 60.7143,-33.57143 8.3691,22.36779 -16.407,56.32562 -37.8572,81.07143 -21.6041,24.9234 -52.7313,52.70533 -98.9286,89.28571 C 1086.6598,841.08542 976.77458,906.08967 920,933.07647 c -57.06606,27.12536 -128.20334,58.23842 -172.14286,72.50003 -43.93952,14.2616 -131.42857,31.0714 -131.42857,31.0714 l 92.85715,-192.14286 z"
1195 id="path3724"
1196 sodipodi:nodetypes="czzzzzzzzcc"
1197 inkscape:connector-curvature="0" />
1198 </clipPath>
1199 <clipPath
1200 clipPathUnits="userSpaceOnUse"
1201 id="clipPath3986">
1202 <path
1203 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#121212;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1204 d="m 709.28572,844.50504 c 54.28571,-1.42857 126.035,-15.05199 170,-26.78572 44.05271,-11.75714 125.88628,-36.34724 175.35708,-57.85714 49.3393,-21.45272 113.6037,-59.2816 154.2858,-92.14285 40.5081,-32.72069 52.3899,-55.81981 60.7143,-33.57143 8.3691,22.36779 -16.407,56.32562 -37.8572,81.07143 -21.6041,24.9234 -52.7313,52.70533 -98.9286,89.28571 C 1086.6598,841.08542 976.77458,906.08967 920,933.07647 c -57.06606,27.12536 -128.20334,58.23842 -172.14286,72.50003 -43.93952,14.2616 -131.42857,31.0714 -131.42857,31.0714 l 92.85715,-192.14286 z"
1205 id="path3988"
1206 sodipodi:nodetypes="czzzzzzzzcc"
1207 inkscape:connector-curvature="0" />
1208 </clipPath>
1209 <clipPath
1210 clipPathUnits="userSpaceOnUse"
1211 id="clipPath3992">
1212 <path
1213 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#121212;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1214 d="m 709.28572,844.50504 c 54.28571,-1.42857 126.035,-15.05199 170,-26.78572 44.05271,-11.75714 125.88628,-36.34724 175.35708,-57.85714 49.3393,-21.45272 113.6037,-59.2816 154.2858,-92.14285 40.5081,-32.72069 52.3899,-55.81981 60.7143,-33.57143 8.3691,22.36779 -16.407,56.32562 -37.8572,81.07143 -21.6041,24.9234 -52.7313,52.70533 -98.9286,89.28571 C 1086.6598,841.08542 976.77458,906.08967 920,933.07647 c -57.06606,27.12536 -128.20334,58.23842 -172.14286,72.50003 -43.93952,14.2616 -131.42857,31.0714 -131.42857,31.0714 l 92.85715,-192.14286 z"
1215 id="path3994"
1216 sodipodi:nodetypes="czzzzzzzzcc"
1217 inkscape:connector-curvature="0" />
1218 </clipPath>
1219 <clipPath
1220 clipPathUnits="userSpaceOnUse"
1221 id="clipPath3998">
1222 <path
1223 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1224 d="m 178.21428,274.14789 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.55405 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401287 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.3574 -122.78647,50.053 -187.06988,59.0023 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.1982 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z"
1225 id="path4000"
1226 sodipodi:nodetypes="cscccccccccccc"
1227 inkscape:connector-curvature="0" />
1228 </clipPath>
1229 <filter
1230 inkscape:collect="always"
1231 id="filter4002"
1232 x="-0.24334238"
1233 width="1.4866848"
1234 y="-0.39104807"
1235 height="1.7820961">
1236 <feGaussianBlur
1237 inkscape:collect="always"
1238 stdDeviation="14.589518"
1239 id="feGaussianBlur4004" />
1240 </filter>
1241 <filter
1242 inkscape:collect="always"
1243 id="filter4010"
1244 x="-0.14577261"
1245 width="1.2915452"
1246 y="-0.23523259"
1247 height="1.4704652">
1248 <feGaussianBlur
1249 inkscape:collect="always"
1250 stdDeviation="4.4442907"
1251 id="feGaussianBlur4012" />
1252 </filter>
1253 <filter
1254 inkscape:collect="always"
1255 id="filter4053">
1256 <feGaussianBlur
1257 inkscape:collect="always"
1258 stdDeviation="0.6062947"
1259 id="feGaussianBlur4055" />
1260 </filter>
1261 <filter
1262 inkscape:collect="always"
1263 id="filter4079">
1264 <feGaussianBlur
1265 inkscape:collect="always"
1266 stdDeviation="6.5887624"
1267 id="feGaussianBlur4081" />
1268 </filter>
1269 <filter
1270 inkscape:collect="always"
1271 id="filter4083">
1272 <feGaussianBlur
1273 inkscape:collect="always"
1274 stdDeviation="1.5052066"
1275 id="feGaussianBlur4085" />
1276 </filter>
1277 <radialGradient
1278 inkscape:collect="always"
1279 xlink:href="#linearGradient4113"
1280 id="radialGradient4119"
1281 cx="296.33783"
1282 cy="427.17749"
1283 fx="296.33783"
1284 fy="427.17749"
1285 r="19.704132"
1286 gradientUnits="userSpaceOnUse"
1287 gradientTransform="matrix(2.9797125,0,0,2.9797125,-599.28727,-827.0855)" />
1288 <filter
1289 inkscape:collect="always"
1290 id="filter6949"
1291 x="-0.10294895"
1292 width="1.2058979"
1293 y="-0.34224695"
1294 height="1.6844939">
1295 <feGaussianBlur
1296 inkscape:collect="always"
1297 stdDeviation="1.1675612"
1298 id="feGaussianBlur6951" />
1299 </filter>
1300 <filter
1301 inkscape:collect="always"
1302 id="filter6953"
1303 x="-0.098320946"
1304 width="1.1966419"
1305 y="-0.19750816"
1306 height="1.3950163">
1307 <feGaussianBlur
1308 inkscape:collect="always"
1309 stdDeviation="1.1675612"
1310 id="feGaussianBlur6955" />
1311 </filter>
1312 <filter
1313 inkscape:collect="always"
1314 id="filter6957"
1315 x="-0.098213427"
1316 width="1.1964267"
1317 y="-0.19838208"
1318 height="1.3967642">
1319 <feGaussianBlur
1320 inkscape:collect="always"
1321 stdDeviation="1.1675612"
1322 id="feGaussianBlur6959" />
1323 </filter>
1324 <filter
1325 inkscape:collect="always"
1326 id="filter6961"
1327 x="-0.09919104"
1328 width="1.1983821"
1329 y="-0.22643611"
1330 height="1.4528722">
1331 <feGaussianBlur
1332 inkscape:collect="always"
1333 stdDeviation="1.1675612"
1334 id="feGaussianBlur6963" />
1335 </filter>
1336 <filter
1337 inkscape:collect="always"
1338 id="filter6965"
1339 x="-0.099081434"
1340 width="1.1981629"
1341 y="-0.22529824"
1342 height="1.4505965">
1343 <feGaussianBlur
1344 inkscape:collect="always"
1345 stdDeviation="1.1675612"
1346 id="feGaussianBlur6967" />
1347 </filter>
1348 <filter
1349 inkscape:collect="always"
1350 id="filter6969"
1351 x="-0.10450897"
1352 width="1.2090179"
1353 y="-0.40468886"
1354 height="1.8093777">
1355 <feGaussianBlur
1356 inkscape:collect="always"
1357 stdDeviation="1.1675612"
1358 id="feGaussianBlur6971" />
1359 </filter>
1360 <filter
1361 inkscape:collect="always"
1362 id="filter6973"
1363 x="-0.10330495"
1364 width="1.2066098"
1365 y="-0.36439717"
1366 height="1.7287945">
1367 <feGaussianBlur
1368 inkscape:collect="always"
1369 stdDeviation="1.1675612"
1370 id="feGaussianBlur6975" />
1371 </filter>
1372 <filter
1373 inkscape:collect="always"
1374 id="filter6977"
1375 x="-0.10224481"
1376 width="1.2044896"
1377 y="-0.32371372"
1378 height="1.6474274">
1379 <feGaussianBlur
1380 inkscape:collect="always"
1381 stdDeviation="1.1675612"
1382 id="feGaussianBlur6979" />
1383 </filter>
1384 <filter
1385 inkscape:collect="always"
1386 id="filter6981"
1387 x="-0.10052545"
1388 width="1.2010509"
1389 y="-0.2742162"
1390 height="1.5484324">
1391 <feGaussianBlur
1392 inkscape:collect="always"
1393 stdDeviation="1.1675612"
1394 id="feGaussianBlur6983" />
1395 </filter>
1396 <filter
1397 inkscape:collect="always"
1398 id="filter6985"
1399 x="-0.098428868"
1400 width="1.1968577"
1401 y="-0.20853186"
1402 height="1.4170637">
1403 <feGaussianBlur
1404 inkscape:collect="always"
1405 stdDeviation="1.1675612"
1406 id="feGaussianBlur6987" />
1407 </filter>
1408 <filter
1409 inkscape:collect="always"
1410 id="filter6989"
1411 x="-0.098428868"
1412 width="1.1968577"
1413 y="-0.20287035"
1414 height="1.4057407">
1415 <feGaussianBlur
1416 inkscape:collect="always"
1417 stdDeviation="1.1675612"
1418 id="feGaussianBlur6991" />
1419 </filter>
1420 <filter
1421 inkscape:collect="always"
1422 id="filter6993"
1423 x="-0.098213255"
1424 width="1.1964265"
1425 y="-0.19838208"
1426 height="1.3967642">
1427 <feGaussianBlur
1428 inkscape:collect="always"
1429 stdDeviation="1.1675612"
1430 id="feGaussianBlur6995" />
1431 </filter>
1432 <filter
1433 inkscape:collect="always"
1434 id="filter6997">
1435 <feGaussianBlur
1436 inkscape:collect="always"
1437 stdDeviation="1.1675612"
1438 id="feGaussianBlur6999" />
1439 </filter>
1440 <filter
1441 inkscape:collect="always"
1442 id="filter7001">
1443 <feGaussianBlur
1444 inkscape:collect="always"
1445 stdDeviation="1.1675612"
1446 id="feGaussianBlur7003" />
1447 </filter>
1448 <filter
1449 inkscape:collect="always"
1450 id="filter7285"
1451 x="-0.030884685"
1452 width="1.0617694"
1453 y="-0.10267408"
1454 height="1.2053483">
1455 <feGaussianBlur
1456 inkscape:collect="always"
1457 stdDeviation="0.35026836"
1458 id="feGaussianBlur7287" />
1459 </filter>
1460 <filter
1461 inkscape:collect="always"
1462 id="filter7289">
1463 <feGaussianBlur
1464 inkscape:collect="always"
1465 stdDeviation="0.35026836"
1466 id="feGaussianBlur7291" />
1467 </filter>
1468 <filter
1469 inkscape:collect="always"
1470 id="filter7293">
1471 <feGaussianBlur
1472 inkscape:collect="always"
1473 stdDeviation="0.35026836"
1474 id="feGaussianBlur7295" />
1475 </filter>
1476 <filter
1477 inkscape:collect="always"
1478 id="filter7297">
1479 <feGaussianBlur
1480 inkscape:collect="always"
1481 stdDeviation="0.35026836"
1482 id="feGaussianBlur7299" />
1483 </filter>
1484 <filter
1485 inkscape:collect="always"
1486 id="filter7301">
1487 <feGaussianBlur
1488 inkscape:collect="always"
1489 stdDeviation="0.35026836"
1490 id="feGaussianBlur7303" />
1491 </filter>
1492 <filter
1493 inkscape:collect="always"
1494 id="filter7305">
1495 <feGaussianBlur
1496 inkscape:collect="always"
1497 stdDeviation="0.35026836"
1498 id="feGaussianBlur7307" />
1499 </filter>
1500 <filter
1501 inkscape:collect="always"
1502 id="filter7309">
1503 <feGaussianBlur
1504 inkscape:collect="always"
1505 stdDeviation="0.35026836"
1506 id="feGaussianBlur7311" />
1507 </filter>
1508 <filter
1509 inkscape:collect="always"
1510 id="filter7313">
1511 <feGaussianBlur
1512 inkscape:collect="always"
1513 stdDeviation="0.35026836"
1514 id="feGaussianBlur7315" />
1515 </filter>
1516 <filter
1517 inkscape:collect="always"
1518 id="filter7317">
1519 <feGaussianBlur
1520 inkscape:collect="always"
1521 stdDeviation="0.35026836"
1522 id="feGaussianBlur7319" />
1523 </filter>
1524 <filter
1525 inkscape:collect="always"
1526 id="filter7321">
1527 <feGaussianBlur
1528 inkscape:collect="always"
1529 stdDeviation="0.35026836"
1530 id="feGaussianBlur7323" />
1531 </filter>
1532 <filter
1533 inkscape:collect="always"
1534 id="filter7325"
1535 x="-0.031352691"
1536 width="1.0627054"
1537 y="-0.12140666"
1538 height="1.2428133">
1539 <feGaussianBlur
1540 inkscape:collect="always"
1541 stdDeviation="0.35026836"
1542 id="feGaussianBlur7327" />
1543 </filter>
1544 <filter
1545 inkscape:collect="always"
1546 id="filter7329"
1547 x="-0.030991485"
1548 width="1.061983"
1549 y="-0.10931916"
1550 height="1.2186383">
1551 <feGaussianBlur
1552 inkscape:collect="always"
1553 stdDeviation="0.35026836"
1554 id="feGaussianBlur7331" />
1555 </filter>
1556 <filter
1557 inkscape:collect="always"
1558 id="filter7333">
1559 <feGaussianBlur
1560 inkscape:collect="always"
1561 stdDeviation="0.35026836"
1562 id="feGaussianBlur7335" />
1563 </filter>
1564 <filter
1565 inkscape:collect="always"
1566 id="filter7337">
1567 <feGaussianBlur
1568 inkscape:collect="always"
1569 stdDeviation="0.35026836"
1570 id="feGaussianBlur7339" />
1571 </filter>
1572 <filter
1573 inkscape:collect="always"
1574 id="filter7345">
1575 <feGaussianBlur
1576 inkscape:collect="always"
1577 stdDeviation="1.7233839"
1578 id="feGaussianBlur7347" />
1579 </filter>
1580 <clipPath
1581 clipPathUnits="userSpaceOnUse"
1582 id="clipPath7421">
1583 <path
1584 sodipodi:type="inkscape:offset"
1585 inkscape:radius="0"
1586 inkscape:original="M 1111.4062 -285.9375 L 1107.4688 -284.0625 C 1107.4283 -284.05228 1107.3692 -284.04201 1107.3438 -284.03125 C 1106.925 -283.8184 1107.1791 -283.93067 1106.6875 -283.71875 C 1106.2014 -283.50919 1104.9499 -283.13456 1102.5938 -282.25 C 1099.2626 -280.99942 1096.7895 -280.10016 1095.5938 -279.1875 C 1094.0576 -279.16623 1091.8733 -278.95419 1089.9375 -278.46875 C 1086.956 -277.72108 1085.0823 -277.29474 1083.1875 -276.875 C 1081.2927 -276.45527 1081.512 -276.23281 1080.3125 -276 C 1079.0159 -275.74833 1078.5911 -276.00899 1074.875 -275.21875 C 1071.3851 -274.4766 1065.9802 -273.28768 1064.7188 -272.53125 C 1063.1348 -272.71203 1060.8513 -272.85303 1058.875 -272.5625 C 1055.8346 -272.11554 1053.9588 -271.88974 1052.0312 -271.65625 C 1051.3758 -271.57687 1050.9902 -271.45547 1050.6875 -271.375 C 1050.2613 -271.24334 1050.0017 -271.11498 1049.3125 -271.03125 C 1048.0009 -270.87188 1047.5503 -271.18808 1043.7812 -270.75 C 1040.2273 -270.33691 1034.7758 -269.47718 1033.5312 -268.8125 C 1031.9322 -269.10979 1029.6735 -269.34669 1027.6875 -269.15625 C 1024.6287 -268.86293 1022.7155 -268.67226 1020.7812 -268.5 C 1018.847 -268.32773 1019.0926 -268.07763 1017.875 -267.96875 C 1016.5588 -267.85105 1016.1152 -268.13238 1012.3438 -267.71875 C 1008.8017 -267.3303 1003.3359 -266.50948 1002.0625 -265.84375 C 1000.4636 -266.13844 998.1753 -266.35076 996.1875 -266.15625 C 993.12921 -265.857 991.2463 -265.67601 989.3125 -265.5 C 988.65501 -265.44015 988.27245 -265.32144 987.96875 -265.25 C 987.54105 -265.13104 987.28525 -265.03193 986.59375 -264.96875 C 985.27775 -264.84849 984.834 -265.16363 981.0625 -264.75 C 977.50631 -264.35998 972.0569 -263.51084 970.8125 -262.84375 C 969.21381 -263.13793 966.95265 -263.36747 964.96875 -263.15625 C 961.91305 -262.83092 959.9947 -262.63001 958.0625 -262.4375 C 956.13031 -262.24499 956.37275 -261.99662 955.15625 -261.875 C 953.84137 -261.74353 953.3932 -262.03954 949.625 -261.59375 C 946.08611 -261.17509 940.6473 -260.30158 939.375 -259.625 C 937.77741 -259.90604 935.51505 -260.04543 933.53125 -259.8125 C 930.47927 -259.45413 928.58625 -259.24464 926.65625 -259.03125 C 926.00007 -258.95869 925.6156 -258.85856 925.3125 -258.78125 C 924.88571 -258.65402 924.6276 -258.51405 923.9375 -258.4375 C 922.62411 -258.29181 922.17015 -258.61152 918.40625 -258.125 C 914.85737 -257.66624 909.4276 -256.70598 908.1875 -256 C 906.59441 -256.24424 904.3537 -256.38135 902.375 -256.125 C 899.32741 -255.73018 897.4243 -255.47655 895.5 -255.21875 C 893.57571 -254.96096 893.7739 -254.72522 892.5625 -254.5625 C 891.25301 -254.3866 890.8153 -254.66688 887.0625 -254.09375 C 883.53821 -253.55551 878.1393 -252.39458 876.875 -251.65625 C 875.28751 -251.85979 873.0295 -251.91098 871.0625 -251.5625 C 868.03631 -251.02638 866.1636 -250.70081 864.25 -250.375 C 863.59941 -250.26423 863.2363 -250.10406 862.9375 -250 C 862.51681 -249.83512 862.27405 -249.6687 861.59375 -249.53125 C 860.29905 -249.26966 859.86665 -249.53745 856.15625 -248.71875 C 852.65777 -247.9468 847.31035 -246.33582 846.09375 -245.5 C 844.53085 -245.57745 842.33625 -245.41472 840.40625 -244.90625 C 837.43387 -244.12312 835.58855 -243.67416 833.71875 -243.15625 C 831.84875 -242.63835 832.0521 -242.38897 830.875 -242.0625 C 829.60251 -241.7096 829.17795 -241.95541 825.53125 -240.875 C 822.10657 -239.86037 816.88185 -237.94183 815.65625 -237.03125 C 814.11747 -237.01851 811.93645 -236.75903 810.03125 -236.15625 C 807.10027 -235.22891 805.2809 -234.69783 803.4375 -234.09375 C 802.81071 -233.88837 802.44585 -233.70117 802.15625 -233.5625 C 801.74867 -233.34889 801.50295 -233.15375 800.84375 -232.9375 C 799.58925 -232.52596 799.1576 -232.74846 795.5625 -231.5 C 792.17261 -230.32283 786.96755 -228.2863 785.78125 -227.34375 C 784.25737 -227.28408 782.1312 -226.94888 780.25 -226.28125 C 777.35261 -225.25296 775.55095 -224.60577 773.71875 -223.96875 C 771.88655 -223.33174 772.0909 -223.12021 770.9375 -222.71875 C 769.69071 -222.28479 769.27395 -222.51903 765.71875 -221.15625 C 762.38005 -219.87645 757.23165 -217.6737 756.03125 -216.6875 C 754.52407 -216.57981 752.39555 -216.1887 750.53125 -215.46875 C 747.66307 -214.36115 745.90735 -213.68719 744.09375 -213 C 743.47705 -212.76637 743.0973 -212.55797 742.8125 -212.40625 C 742.81251 -212.40625 742.8125 -212.37673 742.8125 -212.375 L 734.8125 -209.1875 L 736.625 -194.46875 C 736.36701 -194.52956 742.8125 -191.15625 742.8125 -191.15625 C 743.03891 -191.30093 743.26145 -191.42886 743.53125 -191.53125 C 744.61177 -191.94123 745.70285 -191.74702 749.53125 -193.21875 C 753.35977 -194.69049 754.7553 -195.22373 755.4375 -195.625 C 756.11711 -196.02478 757.04925 -196.50437 757.65625 -197.15625 C 759.48317 -197.294 761.22705 -197.64948 762.59375 -198.15625 C 765.56175 -199.25677 767.4691 -199.96244 769.375 -200.625 C 771.28081 -201.28754 771.72915 -202.03987 772.78125 -202.40625 C 773.87287 -202.78636 774.97635 -202.57163 778.84375 -203.9375 C 782.71115 -205.30336 784.1269 -205.76458 784.8125 -206.15625 C 785.51361 -206.55677 786.5133 -207.08923 787.125 -207.75 C 789.09581 -207.80466 790.94195 -208.13463 792.40625 -208.625 C 795.40777 -209.63008 797.3324 -210.24671 799.25 -210.875 C 800.78861 -211.3791 801.42415 -211.92177 802.15625 -212.3125 C 802.38647 -212.44681 802.63215 -212.56623 802.90625 -212.65625 C 804.00457 -213.01673 805.0877 -212.73762 809 -213.96875 C 812.91231 -215.19988 814.366 -215.6417 815.0625 -216 C 815.75641 -216.35697 816.6926 -216.79261 817.3125 -217.40625 C 819.17771 -217.42891 820.94835 -217.67308 822.34375 -218.09375 C 825.37415 -219.00729 827.33615 -219.52385 829.28125 -220.0625 C 831.22637 -220.60114 831.70745 -221.32702 832.78125 -221.625 C 833.89527 -221.93415 835.00125 -221.61761 838.96875 -222.65625 C 842.93625 -223.69488 844.38625 -224.08898 845.09375 -224.40625 C 845.82855 -224.73584 846.90765 -225.15997 847.53125 -225.78125 C 849.52907 -225.66525 851.3887 -225.80134 852.875 -226.15625 C 855.95311 -226.89125 857.9584 -227.25719 859.9375 -227.65625 C 861.52541 -227.97643 862.1818 -228.4468 862.9375 -228.75 C 863.17501 -228.8568 863.4044 -228.94276 863.6875 -229 C 864.82091 -229.22919 865.99215 -228.79107 870.03125 -229.5 C 874.07067 -230.20893 875.5315 -230.42709 876.25 -230.6875 C 876.96581 -230.94694 877.95435 -231.25474 878.59375 -231.78125 C 880.51795 -231.54176 882.34165 -231.55672 883.78125 -231.78125 C 886.90767 -232.26887 888.9358 -232.48192 890.9375 -232.75 C 892.93921 -233.01807 893.42625 -233.69514 894.53125 -233.84375 C 895.67767 -233.99793 896.8071 -233.54218 900.875 -234.0625 C 904.94281 -234.58282 906.43525 -234.75823 907.15625 -235 C 907.89337 -235.24714 908.95435 -235.58623 909.59375 -236.125 C 911.64375 -235.78947 913.56745 -235.72704 915.09375 -235.90625 C 918.23595 -236.27521 920.27375 -236.46561 922.28125 -236.6875 C 923.89207 -236.86552 924.5459 -237.2957 925.3125 -237.53125 C 925.55341 -237.61677 925.80655 -237.68685 926.09375 -237.71875 C 927.24345 -237.84647 928.39505 -237.3721 932.46875 -237.84375 C 936.54245 -238.3154 938.0278 -238.45435 938.75 -238.6875 C 939.46941 -238.91977 940.45025 -239.16096 941.09375 -239.65625 C 943.03005 -239.32279 944.8638 -239.25201 946.3125 -239.40625 C 949.45851 -239.7412 951.49 -239.92484 953.5 -240.125 C 955.50991 -240.32514 955.98415 -240.95139 957.09375 -241.0625 C 958.24485 -241.17778 959.39025 -240.69744 963.46875 -241.125 C 967.54725 -241.55256 969.05765 -241.68709 969.78125 -241.90625 C 970.52047 -242.13011 971.57685 -242.4195 972.21875 -242.9375 C 974.27575 -242.53883 976.2206 -242.4441 977.75 -242.59375 C 980.89871 -242.90185 982.9258 -243.067 984.9375 -243.25 C 986.55151 -243.39682 987.20055 -243.81055 987.96875 -244.03125 C 988.21005 -244.11211 988.4623 -244.16116 988.75 -244.1875 C 989.90211 -244.29295 991.0429 -243.79475 995.125 -244.1875 C 999.20711 -244.58025 1000.7139 -244.71834 1001.4375 -244.9375 C 1002.1584 -245.15583 1003.1371 -245.3852 1003.7812 -245.875 C 1005.7193 -245.52501 1007.5501 -245.42062 1009 -245.5625 C 1012.1487 -245.8706 1014.1758 -246.03575 1016.1875 -246.21875 C 1018.1991 -246.40174 1018.7017 -247.05677 1019.8125 -247.15625 C 1020.9648 -247.25948 1022.1047 -246.77142 1026.1875 -247.15625 C 1030.2704 -247.54107 1031.7762 -247.65725 1032.5 -247.875 C 1033.2393 -248.09743 1034.2956 -248.38949 1034.9375 -248.90625 C 1036.9949 -248.50448 1038.9404 -248.40292 1040.4688 -248.5625 C 1043.6153 -248.89102 1045.6458 -249.0852 1047.6562 -249.28125 C 1049.2692 -249.43854 1049.9219 -249.91273 1050.6875 -250.15625 C 1050.9282 -250.24429 1051.1507 -250.27762 1051.4375 -250.3125 C 1052.5858 -250.4522 1053.7542 -249.97259 1057.8125 -250.5625 C 1061.8708 -251.15242 1063.3743 -251.33964 1064.0938 -251.59375 C 1064.8104 -251.84691 1065.7684 -252.15182 1066.4062 -252.6875 C 1068.3259 -252.47556 1070.1262 -252.53609 1071.5625 -252.78125 C 1074.6816 -253.31365 1076.6741 -253.70986 1078.6562 -254.09375 C 1080.6383 -254.47762 1081.1305 -255.1334 1082.2188 -255.375 C 1083.3475 -255.62566 1084.489 -255.25871 1088.4688 -256.25 C 1092.4483 -257.24127 1093.8983 -257.6693 1094.5938 -258.03125 C 1095.316 -258.40725 1096.3555 -258.90183 1096.9688 -259.5625 C 1098.9317 -259.57454 1100.7625 -259.85355 1102.1875 -260.40625 C 1105.1387 -261.55085 1107.0607 -262.27567 1108.875 -263.15625 C 1110.3307 -263.86277 1111.1941 -264.85828 1111.4062 -265.15625 C 1111.6185 -265.4542 1111.5051 -265.8848 1111.5312 -265.90625 C 1111.5742 -265.94148 1111.8716 -266.00028 1112.0312 -266.34375 C 1112.8902 -268.19082 1114.3544 -271.97139 1114.4688 -272.65625 C 1114.5825 -273.33839 1114.6368 -274.00902 1114.6875 -274.40625 C 1114.7169 -274.63575 1114.5404 -275.28515 1114.5625 -275.34375 C 1114.5934 -275.42579 1114.8508 -275.59432 1114.9062 -275.84375 C 1115.1725 -277.04206 1114.9953 -278.05111 1114.7812 -279.46875 C 1114.5673 -280.88638 1113.8096 -284.08338 1113.1562 -284.9375 C 1112.4973 -285.79922 1111.9314 -285.94801 1111.4062 -285.9375 z "
1587 style="display:inline;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1588 id="path7423"
1589 d="m 1111.4062,-285.9375 -3.9374,1.875 c -0.041,0.0102 -0.1,0.0205 -0.125,0.0312 -0.4188,0.21285 -0.1647,0.10058 -0.6563,0.3125 -0.4861,0.20956 -1.7376,0.58419 -4.0937,1.46875 -3.3312,1.25058 -5.8043,2.14984 -7,3.0625 -1.5362,0.0213 -3.7205,0.23331 -5.6563,0.71875 -2.9815,0.74767 -4.8552,1.17401 -6.75,1.59375 -1.8948,0.41973 -1.6755,0.64219 -2.875,0.875 -1.2966,0.25167 -1.7214,-0.009 -5.4375,0.78125 -3.4899,0.74215 -8.8948,1.93107 -10.1562,2.6875 -1.584,-0.18078 -3.8675,-0.32178 -5.8438,-0.0312 -3.0404,0.44696 -4.9162,0.67276 -6.8438,0.90625 -0.6554,0.0794 -1.041,0.20078 -1.3437,0.28125 -0.4262,0.13166 -0.6858,0.26002 -1.375,0.34375 -1.3116,0.15937 -1.7622,-0.15683 -5.5313,0.28125 -3.5539,0.41309 -9.0054,1.27282 -10.25,1.9375 -1.599,-0.29729 -3.8577,-0.53419 -5.8437,-0.34375 -3.0588,0.29332 -4.972,0.48399 -6.9063,0.65625 -1.9342,0.17227 -1.6886,0.42237 -2.9062,0.53125 -1.3162,0.1177 -1.7598,-0.16363 -5.5312,0.25 -3.5421,0.38845 -9.0079,1.20927 -10.2813,1.875 -1.5989,-0.29469 -3.8872,-0.50701 -5.875,-0.3125 -3.05829,0.29925 -4.9412,0.48024 -6.875,0.65625 -0.65749,0.0598 -1.04005,0.17856 -1.34375,0.25 -0.4277,0.11896 -0.6835,0.21807 -1.375,0.28125 -1.316,0.12026 -1.75975,-0.19488 -5.53125,0.21875 -3.55619,0.39002 -9.0056,1.23916 -10.25,1.90625 -1.59869,-0.29418 -3.85985,-0.52372 -5.84375,-0.3125 -3.0557,0.32533 -4.97405,0.52624 -6.90625,0.71875 -1.93219,0.19251 -1.68975,0.44088 -2.90625,0.5625 -1.31488,0.13147 -1.76305,-0.16454 -5.53125,0.28125 -3.53889,0.41866 -8.9777,1.29217 -10.25,1.96875 -1.59759,-0.28104 -3.85995,-0.42043 -5.84375,-0.1875 -3.05198,0.35837 -4.945,0.56786 -6.875,0.78125 -0.65618,0.0726 -1.04065,0.17269 -1.34375,0.25 -0.42679,0.12723 -0.6849,0.2672 -1.375,0.34375 -1.31339,0.14569 -1.76735,-0.17402 -5.53125,0.3125 -3.54888,0.45876 -8.97865,1.41902 -10.21875,2.125 -1.59309,-0.24424 -3.8338,-0.38135 -5.8125,-0.125 -3.04759,0.39482 -4.9507,0.64845 -6.875,0.90625 -1.92429,0.25779 -1.7261,0.49353 -2.9375,0.65625 -1.30949,0.1759 -1.7472,-0.10438 -5.5,0.46875 -3.52429,0.53824 -8.9232,1.69917 -10.1875,2.4375 -1.58749,-0.20354 -3.8455,-0.25473 -5.8125,0.0937 -3.02619,0.53612 -4.8989,0.86169 -6.8125,1.1875 -0.65059,0.11077 -1.0137,0.27094 -1.3125,0.375 -0.42069,0.16488 -0.66345,0.3313 -1.34375,0.46875 -1.2947,0.26159 -1.7271,-0.006 -5.4375,0.8125 -3.49848,0.77195 -8.8459,2.38293 -10.0625,3.21875 -1.5629,-0.0774 -3.7575,0.0853 -5.6875,0.59375 -2.97238,0.78313 -4.8177,1.23209 -6.6875,1.75 -1.87,0.5179 -1.66665,0.76728 -2.84375,1.09375 -1.27249,0.3529 -1.69705,0.10709 -5.34375,1.1875 -3.42468,1.01463 -8.6494,2.93317 -9.875,3.84375 -1.53878,0.0127 -3.7198,0.27222 -5.625,0.875 -2.93098,0.92734 -4.75035,1.45842 -6.59375,2.0625 -0.62679,0.20538 -0.99165,0.39258 -1.28125,0.53125 -0.40758,0.21361 -0.6533,0.40875 -1.3125,0.625 -1.2545,0.41154 -1.68615,0.18904 -5.28125,1.4375 -3.38989,1.17717 -8.59495,3.2137 -9.78125,4.15625 -1.52388,0.0597 -3.65005,0.39487 -5.53125,1.0625 -2.89739,1.02829 -4.69905,1.67548 -6.53125,2.3125 -1.8322,0.63701 -1.62785,0.84854 -2.78125,1.25 -1.24679,0.43396 -1.66355,0.19972 -5.21875,1.5625 -3.3387,1.2798 -8.4871,3.48255 -9.6875,4.46875 -1.50718,0.10769 -3.6357,0.4988 -5.5,1.21875 -2.86818,1.1076 -4.6239,1.78156 -6.4375,2.46875 -0.6167,0.23363 -0.99645,0.44203 -1.28125,0.59375 10e-6,0 0,0.0295 0,0.0312 l -8,3.1875 1.8125,14.71875 c -0.25799,-0.0608 6.1875,3.3125 6.1875,3.3125 0.22641,-0.14468 0.44895,-0.27261 0.71875,-0.375 1.08052,-0.40998 2.1716,-0.21577 6,-1.6875 3.82852,-1.47174 5.22405,-2.00498 5.90625,-2.40625 0.67961,-0.39978 1.61175,-0.87937 2.21875,-1.53125 1.82692,-0.13775 3.5708,-0.49323 4.9375,-1 2.968,-1.10052 4.87535,-1.80619 6.78125,-2.46875 1.90581,-0.66254 2.35415,-1.41487 3.40625,-1.78125 1.09162,-0.38011 2.1951,-0.16538 6.0625,-1.53125 3.8674,-1.36586 5.28315,-1.82708 5.96875,-2.21875 0.70111,-0.40052 1.7008,-0.93298 2.3125,-1.59375 1.97081,-0.0547 3.81695,-0.38463 5.28125,-0.875 3.00152,-1.00508 4.92615,-1.62171 6.84375,-2.25 1.53861,-0.5041 2.17415,-1.04677 2.90625,-1.4375 0.23022,-0.13431 0.4759,-0.25373 0.75,-0.34375 1.09832,-0.36048 2.18145,-0.0814 6.09375,-1.3125 3.91231,-1.23113 5.366,-1.67295 6.0625,-2.03125 0.69391,-0.35697 1.6301,-0.79261 2.25,-1.40625 1.86521,-0.0227 3.63585,-0.26683 5.03125,-0.6875 3.0304,-0.91354 4.9924,-1.4301 6.9375,-1.96875 1.94512,-0.53864 2.4262,-1.26452 3.5,-1.5625 1.11402,-0.30915 2.22,0.007 6.1875,-1.03125 3.9675,-1.03863 5.4175,-1.43273 6.125,-1.75 0.7348,-0.32959 1.8139,-0.75372 2.4375,-1.375 1.99782,0.116 3.85745,-0.0201 5.34375,-0.375 3.07811,-0.735 5.0834,-1.10094 7.0625,-1.5 1.58791,-0.32018 2.2443,-0.79055 3,-1.09375 0.23751,-0.1068 0.4669,-0.19276 0.75,-0.25 1.13341,-0.22919 2.30465,0.20893 6.34375,-0.5 4.03942,-0.70893 5.50025,-0.92709 6.21875,-1.1875 0.71581,-0.25944 1.70435,-0.56724 2.34375,-1.09375 1.9242,0.23949 3.7479,0.22453 5.1875,0 3.12642,-0.48762 5.15455,-0.70067 7.15625,-0.96875 2.00171,-0.26807 2.48875,-0.94514 3.59375,-1.09375 1.14642,-0.15418 2.27585,0.30157 6.34375,-0.21875 4.06781,-0.52032 5.56025,-0.69573 6.28125,-0.9375 0.73712,-0.24714 1.7981,-0.58623 2.4375,-1.125 2.05,0.33553 3.9737,0.39796 5.5,0.21875 3.1422,-0.36896 5.18,-0.55936 7.1875,-0.78125 1.61082,-0.17802 2.26465,-0.6082 3.03125,-0.84375 0.24091,-0.0855 0.49405,-0.1556 0.78125,-0.1875 1.1497,-0.12772 2.3013,0.34665 6.375,-0.125 4.0737,-0.47165 5.55905,-0.6106 6.28125,-0.84375 0.71941,-0.23227 1.70025,-0.47346 2.34375,-0.96875 1.9363,0.33346 3.77005,0.40424 5.21875,0.25 3.14601,-0.33495 5.1775,-0.51859 7.1875,-0.71875 2.00991,-0.20014 2.48415,-0.82639 3.59375,-0.9375 1.1511,-0.11528 2.2965,0.36506 6.375,-0.0625 4.0785,-0.42756 5.5889,-0.56209 6.3125,-0.78125 0.73922,-0.22386 1.7956,-0.51325 2.4375,-1.03125 2.057,0.39867 4.00185,0.4934 5.53125,0.34375 3.14871,-0.3081 5.1758,-0.47325 7.1875,-0.65625 1.61401,-0.14682 2.26305,-0.56055 3.03125,-0.78125 0.2413,-0.0809 0.49355,-0.12991 0.78125,-0.15625 1.15211,-0.10545 2.2929,0.39275 6.375,0 4.08211,-0.39275 5.5889,-0.53084 6.3125,-0.75 0.7209,-0.21833 1.6996,-0.4477 2.3437,-0.9375 1.9381,0.34999 3.7689,0.45438 5.2188,0.3125 3.1487,-0.3081 5.1758,-0.47325 7.1875,-0.65625 2.0116,-0.18299 2.5142,-0.83802 3.625,-0.9375 1.1523,-0.10323 2.2922,0.38483 6.375,0 4.0829,-0.38482 5.5887,-0.501 6.3125,-0.71875 0.7393,-0.22243 1.7956,-0.51449 2.4375,-1.03125 2.0574,0.40177 4.0029,0.50333 5.5313,0.34375 3.1465,-0.32852 5.177,-0.5227 7.1874,-0.71875 1.613,-0.15729 2.2657,-0.63148 3.0313,-0.875 0.2407,-0.088 0.4632,-0.12137 0.75,-0.15625 1.1483,-0.1397 2.3167,0.33991 6.375,-0.25 4.0583,-0.58992 5.5618,-0.77714 6.2813,-1.03125 0.7166,-0.25316 1.6746,-0.55807 2.3124,-1.09375 1.9197,0.21194 3.72,0.15141 5.1563,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0937,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5626,-1.28125 1.1287,-0.25066 2.2702,0.11629 6.25,-0.875 3.9795,-0.99127 5.4295,-1.4193 6.125,-1.78125 0.7222,-0.376 1.7617,-0.87058 2.375,-1.53125 1.9629,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.1446 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70652 2.3191,-1.70203 2.5312,-2 0.2123,-0.29795 0.099,-0.72855 0.125,-0.75 0.043,-0.0352 0.3404,-0.094 0.5,-0.4375 0.859,-1.84707 2.3232,-5.62764 2.4376,-6.3125 0.1137,-0.68214 0.168,-1.35277 0.2187,-1.75 0.029,-0.2295 -0.1471,-0.8789 -0.125,-0.9375 0.031,-0.082 0.2883,-0.25057 0.3437,-0.5 0.2663,-1.19831 0.089,-2.20736 -0.125,-3.625 -0.2139,-1.41763 -0.9716,-4.61463 -1.625,-5.46875 -0.6589,-0.86172 -1.2248,-1.01051 -1.75,-1 z"
1590 transform="translate(0.08004571,-0.03125)" />
1591 </clipPath>
1592 <filter
1593 inkscape:collect="always"
1594 id="filter7578"
1595 x="-0.08160872"
1596 width="1.1632174"
1597 y="-0.22659944"
1598 height="1.4531989">
1599 <feGaussianBlur
1600 inkscape:collect="always"
1601 stdDeviation="2.437399"
1602 id="feGaussianBlur7580" />
1603 </filter>
1604 <filter
1605 inkscape:collect="always"
1606 id="filter7594"
1607 x="-0.040804356"
1608 width="1.0816087"
1609 y="-0.11329972"
1610 height="1.2265995">
1611 <feGaussianBlur
1612 inkscape:collect="always"
1613 stdDeviation="1.2186995"
1614 id="feGaussianBlur7596" />
1615 </filter>
1616 <clipPath
1617 clipPathUnits="userSpaceOnUse"
1618 id="clipPath7606">
1619 <path
1620 id="path7608"
1621 d="m 1049.205,-282.26672 -0.09,0.008 c -1.3874,0.88445 -6.6033,1.6072 -6.629,9.52344 -0.024,7.42525 15.0129,17.09146 17.1563,18.09375 1.7302,0.80909 3.5916,1.40876 5.4063,1.71875 l 1.4374,0.21875 c 1.9197,0.21194 3.72,0.15141 5.1563,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0937,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5626,-1.28125 1.1287,-0.25066 2.2702,0.11629 6.25,-0.875 3.9795,-0.99128 5.4294,-1.4193 6.125,-1.78125 0.7222,-0.37601 1.7617,-0.87058 2.375,-1.53125 1.9629,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.14461 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70653 2.3191,-1.70203 2.5312,-2 0.2123,-0.29796 0.099,-0.72855 0.125,-0.75 0.043,-0.0352 0.3405,-0.094 0.5,-0.4375 0.859,-1.84708 2.3232,-5.62764 2.4376,-6.3125 0.1137,-0.68215 0.168,-1.35277 0.2187,-1.75 0.029,-0.22951 -0.1471,-0.8789 -0.125,-0.9375 0.031,-0.082 0.2883,-0.25057 0.3437,-0.5 0.2663,-1.19832 0.089,-2.20736 -0.125,-3.625 -0.2139,-1.41764 -0.9716,-4.61463 -1.625,-5.46875 -0.4194,-0.54857 -0.7993,-0.7925 -1.1562,-0.90625 -0.067,-0.0173 -0.1239,-0.0467 -0.1875,-0.0625 -0.021,-0.004 -0.042,0.003 -0.062,0 -0.3116,-0.0755 -0.6085,-0.15867 -1.1562,-0.21875 -0.9855,-0.10812 -2.4247,-0.2594 -3.9688,-0.25 -0.5147,0.003 -1.0371,0.0476 -1.5625,0.0937 -3.5589,0.31228 -9.0098,0.99108 -10.2187,1.625 -1.6331,-0.33402 -3.9482,-0.61223 -5.9376,-0.46875 -3.064,0.22097 -4.9677,0.34219 -6.9062,0.46875 -1.9384,0.12655 -1.6861,0.38864 -2.9062,0.46875 -1.3191,0.0866 -1.7869,-0.22325 -5.5626,0.0937 -3.5457,0.29772 -8.9806,0.99317 -10.2187,1.625 -1.6334,-0.33451 -3.9459,-0.61239 -5.9375,-0.46875 -3.0642,0.22098 -4.9678,0.37344 -6.9062,0.5 -0.6592,0.043 -1.0424,0.12393 -1.3438,0.1875 z"
1622 style="display:inline;opacity:0.82448976;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1623 inkscape:connector-curvature="0" />
1624 </clipPath>
1625 <filter
1626 inkscape:collect="always"
1627 id="filter7610"
1628 x="-0.021942979"
1629 width="1.0438859"
1630 y="-0.10017137"
1631 height="1.2003427">
1632 <feGaussianBlur
1633 inkscape:collect="always"
1634 stdDeviation="0.57530213"
1635 id="feGaussianBlur7612" />
1636 </filter>
1637 <clipPath
1638 clipPathUnits="userSpaceOnUse"
1639 id="clipPath7616">
1640 <path
1641 id="path7618"
1642 d="m 205.47016,-408.97318 -0.0901,0.002 c -1.44563,0.78566 -6.69921,1.14335 -7.27625,9.03857 -0.54134,7.40553 13.78595,18.09566 15.85433,19.24481 1.66964,0.92764 3.48475,1.65551 5.27345,2.09115 l 1.41867,0.31834 c 1.90027,0.34514 3.70042,0.41015 5.15031,0.26563 3.1486,-0.31384 5.16386,-0.57031 7.16789,-0.8152 2.00402,-0.24488 2.5407,-0.86478 3.64319,-1.02999 1.14342,-0.17143 2.25659,0.27414 6.29577,-0.43753 4.03888,-0.71169 5.51507,-1.03768 6.23419,-1.3503 0.74664,-0.32479 1.81806,-0.74575 2.47589,-1.3621 1.95897,0.12471 3.80476,-0.0261 5.2648,-0.47819 3.02376,-0.93627 4.99157,-1.52544 6.8628,-2.27751 1.50138,-0.60342 2.43202,-1.53636 2.66436,-1.81883 0.23254,-0.28245 0.14951,-0.71989 0.17694,-0.73948 0.0453,-0.0322 0.34622,-0.0701 0.52926,-0.40161 0.98557,-1.78276 2.70955,-5.45215 2.87137,-6.12738 0.16094,-0.67257 0.26182,-1.33778 0.34007,-1.73051 0.0453,-0.22691 -0.0855,-0.88701 -0.0594,-0.94393 0.0365,-0.0797 0.30505,-0.22988 0.37769,-0.47485 0.34913,-1.17686 0.24274,-2.19578 0.1278,-3.6249 -0.11463,-1.42909 -0.64781,-4.6711 -1.24013,-5.56865 -0.38017,-0.57646 -0.74215,-0.84625 -1.09026,-0.98459 -0.0657,-0.0219 -0.12035,-0.0553 -0.1827,-0.0754 -0.0207,-0.005 -0.0418,2.3e-4 -0.0623,-0.004 -0.30559,-0.097 -0.59597,-0.20067 -1.13816,-0.29875 -0.97557,-0.1765 -2.40074,-0.42766 -3.94175,-0.52584 -0.51366,-0.0327 -1.0379,-0.0247 -1.56523,-0.0153 -3.57201,0.0636 -9.05695,0.3611 -10.30707,0.90928 -1.60587,-0.44697 -3.89597,-0.88576 -5.89053,-0.8812 -3.07195,0.007 -4.97947,-0.005 -6.92207,-0.0134 -1.94251,-0.009 -1.70908,0.27025 -2.9318,0.26518 -1.32192,-0.005 -1.76701,-0.34717 -5.55562,-0.29393 -3.55782,0.05 -9.02796,0.36522 -10.30706,0.90927 -1.60614,-0.44747 -3.89367,-0.88575 -5.89043,-0.88118 -3.07215,0.007 -4.98175,0.0265 -6.92426,0.0177 -0.66059,-0.003 -1.0485,0.051 -1.35359,0.0934 z"
1643 style="display:inline;opacity:0.82448976;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1644 inkscape:connector-curvature="0" />
1645 </clipPath>
1646 <linearGradient
1647 inkscape:collect="always"
1648 xlink:href="#linearGradient7622"
1649 id="linearGradient7708"
1650 gradientUnits="userSpaceOnUse"
1651 gradientTransform="translate(-19.091883,4.2426407)"
1652 x1="774.97668"
1653 y1="-211.87105"
1654 x2="755.11584"
1655 y2="-202.67865" />
1656 <mask
1657 maskUnits="userSpaceOnUse"
1658 id="mask7704">
1659 <path
1660 style="fill:url(#linearGradient7708);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
1661 d="m 718.40812,-224.31217 33.25,56 275.99998,-24 159.5,-48.25 -66.5,-82.75 -402.24998,99 z"
1662 id="path7706"
1663 inkscape:connector-curvature="0" />
1664 </mask>
1665 <radialGradient
1666 inkscape:collect="always"
1667 xlink:href="#linearGradient8430"
1668 id="radialGradient7904"
1669 gradientUnits="userSpaceOnUse"
1670 gradientTransform="matrix(-0.3324832,0.9022288,-0.9582407,-0.3531242,305.29227,19.909497)"
1671 cx="142.95833"
1672 cy="107.09234"
1673 fx="142.95833"
1674 fy="107.09234"
1675 r="66.981766" />
1676 <radialGradient
1677 inkscape:collect="always"
1678 xlink:href="#linearGradient3317"
1679 id="radialGradient7906"
1680 gradientUnits="userSpaceOnUse"
1681 gradientTransform="matrix(1.0036478,-1.0345492e-7,1.7124628e-7,1.6613125,-160.53487,-96.205369)"
1682 cx="317.78754"
1683 cy="129.65378"
1684 fx="317.78754"
1685 fy="129.65378"
1686 r="47.863216" />
1687 <radialGradient
1688 inkscape:collect="always"
1689 xlink:href="#linearGradient8398"
1690 id="radialGradient7908"
1691 gradientUnits="userSpaceOnUse"
1692 gradientTransform="matrix(2.0747661,-0.1577957,0.2382425,3.1325183,-550.77432,-65.728909)"
1693 cx="325.30847"
1694 cy="80.909554"
1695 fx="325.30847"
1696 fy="80.909554"
1697 r="26.937988" />
1698 <clipPath
1699 clipPathUnits="userSpaceOnUse"
1700 id="clipPath8209">
1701 <path
1702 sodipodi:nodetypes="czcc"
1703 id="path8211"
1704 d="m 734.03125,519.49186 c 0,0 16.75513,37.01806 28.70141,53.95395 11.94629,16.93589 52.72716,56.04605 52.72716,56.04605 l 0.59717,-138.58975"
1705 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#1a1a1a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1706 inkscape:connector-curvature="0" />
1707 </clipPath>
1708 <filter
1709 inkscape:collect="always"
1710 id="filter8225">
1711 <feGaussianBlur
1712 inkscape:collect="always"
1713 stdDeviation="10.661912"
1714 id="feGaussianBlur8227" />
1715 </filter>
1716 <filter
1717 inkscape:collect="always"
1718 id="filter8333">
1719 <feGaussianBlur
1720 inkscape:collect="always"
1721 stdDeviation="7.18"
1722 id="feGaussianBlur8335" />
1723 </filter>
1724 <clipPath
1725 clipPathUnits="userSpaceOnUse"
1726 id="clipPath8338">
1727 <path
1728 sodipodi:nodetypes="czzzzzzcccccccccczczz"
1729 id="path8340"
1730 d="m 266.27183,924.57185 c -1.40727,18.80122 -1.1449,32.75104 2.08174,49.30328 3.22666,16.55238 16.40609,45.90737 20.33441,63.18377 3.92621,17.2671 2.69413,38.3097 -12.45944,51.1482 -15.31761,12.9775 -42.05127,21.599 -67.8323,15.7338 -25.78106,-5.8653 -69.54908,-49.2234 -88.59019,-70.2283 C 100.6939,1012.6293 56.045182,939.86193 41.867507,909.4368 27.689835,879.01168 29.207902,872.71823 33.747792,863.90708 24.38107,839.38658 21.33408,813.84026 0.03533448,788.33044 30.360814,791.44487 43.915624,815.28676 60.161024,835.47019 54.631128,787.39416 42.106309,771.05368 31.787072,744.74589 c 29.994295,6.08165 50.57936,31.87239 63.979783,72.7125 9.554155,-3.91792 18.237765,-9.37294 30.187415,-9.0612 -11.2975,-41.6958 -17.94947,-69.91585 -36.687256,-101.06994 53.441966,5.67032 83.657026,80.63932 78.971426,87.9608 9.97797,-2.24399 19.00565,-6.53038 30.43653,-5.65167 -11.24897,-38.34703 -21.04782,-76.8679 -3.65971,-118.64819 0,0 48.28678,65.43688 54.38965,85.80578 6.10288,20.3689 1.51882,38.70051 1.51882,38.70051 0,0 16.95957,31.0853 20.29392,51.09414 3.3731,20.24134 -3.53269,59.10331 -4.94582,77.98323 z"
1731 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1732 inkscape:connector-curvature="0" />
1733 </clipPath>
1734 <filter
1735 inkscape:collect="always"
1736 id="filter8354">
1737 <feGaussianBlur
1738 inkscape:collect="always"
1739 stdDeviation="6.82"
1740 id="feGaussianBlur8356" />
1741 </filter>
1742 <clipPath
1743 clipPathUnits="userSpaceOnUse"
1744 id="clipPath8359">
1745 <path
1746 sodipodi:nodetypes="czzzzzzcccccccccczczz"
1747 id="path8361"
1748 d="m 266.27183,924.57185 c -1.40727,18.80122 -1.1449,32.75104 2.08174,49.30328 3.22666,16.55238 16.40609,45.90737 20.33441,63.18377 3.92621,17.2671 2.69413,38.3097 -12.45944,51.1482 -15.31761,12.9775 -42.05127,21.599 -67.8323,15.7338 -25.78106,-5.8653 -69.54908,-49.2234 -88.59019,-70.2283 C 100.6939,1012.6293 56.045182,939.86193 41.867507,909.4368 27.689835,879.01168 29.207902,872.71823 33.747792,863.90708 24.38107,839.38658 21.33408,813.84026 0.03533448,788.33044 30.360814,791.44487 43.915624,815.28676 60.161024,835.47019 54.631128,787.39416 42.106309,771.05368 31.787072,744.74589 c 29.994295,6.08165 50.57936,31.87239 63.979783,72.7125 9.554155,-3.91792 18.237765,-9.37294 30.187415,-9.0612 -11.2975,-41.6958 -17.94947,-69.91585 -36.687256,-101.06994 53.441966,5.67032 83.657026,80.63932 78.971426,87.9608 9.97797,-2.24399 19.00565,-6.53038 30.43653,-5.65167 -11.24897,-38.34703 -21.04782,-76.8679 -3.65971,-118.64819 0,0 48.28678,65.43688 54.38965,85.80578 6.10288,20.3689 1.51882,38.70051 1.51882,38.70051 0,0 16.95957,31.0853 20.29392,51.09414 3.3731,20.24134 -3.53269,59.10331 -4.94582,77.98323 z"
1749 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1750 inkscape:connector-curvature="0" />
1751 </clipPath>
1752 <filter
1753 inkscape:collect="always"
1754 id="filter8379"
1755 x="-0.14413793"
1756 width="1.288276"
1757 y="-0.10278689"
1758 height="1.2055738">
1759 <feGaussianBlur
1760 inkscape:collect="always"
1761 stdDeviation="7.389266"
1762 id="feGaussianBlur8381" />
1763 </filter>
1764 <clipPath
1765 clipPathUnits="userSpaceOnUse"
1766 id="clipPath8392">
1767 <path
1768 sodipodi:nodetypes="czzzzzzcccccccccczczz"
1769 id="path8394"
1770 d="m 760.16396,935.83377 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.91234 -3.78268,51.80084 -2.90046,70.65614 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.08394 38.76107,-114.49737 44.6608,-149.76859 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
1771 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1772 inkscape:connector-curvature="0" />
1773 </clipPath>
1774 <filter
1775 inkscape:collect="always"
1776 id="filter8404"
1777 x="-0.090268657"
1778 width="1.1805373"
1779 y="-0.10250848"
1780 height="1.205017">
1781 <feGaussianBlur
1782 inkscape:collect="always"
1783 stdDeviation="5.3457272"
1784 id="feGaussianBlur8406" />
1785 </filter>
1786 <clipPath
1787 clipPathUnits="userSpaceOnUse"
1788 id="clipPath8417">
1789 <path
1790 sodipodi:nodetypes="czzzzzzcccccccccczczz"
1791 id="path8419"
1792 d="m 760.16396,935.83377 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.91234 -3.78268,51.80084 -2.90046,70.65614 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.08394 38.76107,-114.49737 44.6608,-149.76859 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
1793 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1794 inkscape:connector-curvature="0" />
1795 </clipPath>
1796 <filter
1797 inkscape:collect="always"
1798 x="-0.084654994"
1799 width="1.16931"
1800 y="-0.36592469"
1801 height="1.7318494"
1802 id="filter11361-3">
1803 <feGaussianBlur
1804 inkscape:collect="always"
1805 stdDeviation="4.5740586"
1806 id="feGaussianBlur11363-6" />
1807 </filter>
1808 <radialGradient
1809 inkscape:collect="always"
1810 xlink:href="#linearGradient8430"
1811 id="radialGradient7904-7"
1812 gradientUnits="userSpaceOnUse"
1813 gradientTransform="matrix(-0.3324832,0.9022288,-0.9582407,-0.3531242,305.29227,19.909497)"
1814 cx="142.95833"
1815 cy="107.09234"
1816 fx="142.95833"
1817 fy="107.09234"
1818 r="66.981766" />
1819 <radialGradient
1820 inkscape:collect="always"
1821 xlink:href="#linearGradient3317"
1822 id="radialGradient7906-6"
1823 gradientUnits="userSpaceOnUse"
1824 gradientTransform="matrix(1.0036478,-1.0345492e-7,1.7124628e-7,1.6613125,-160.53487,-96.205369)"
1825 cx="317.78754"
1826 cy="129.65378"
1827 fx="317.78754"
1828 fy="129.65378"
1829 r="47.863216" />
1830 <radialGradient
1831 inkscape:collect="always"
1832 xlink:href="#linearGradient8398"
1833 id="radialGradient7908-0"
1834 gradientUnits="userSpaceOnUse"
1835 gradientTransform="matrix(2.0747661,-0.1577957,0.2382425,3.1325183,-550.77432,-65.728909)"
1836 cx="325.30847"
1837 cy="80.909554"
1838 fx="325.30847"
1839 fy="80.909554"
1840 r="26.937988" />
1841 <clipPath
1842 clipPathUnits="userSpaceOnUse"
1843 id="clipPath8658-06">
1844 <path
1845 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#0b0b0b;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1846 d="m 569.03125,1018.7776 c -4.28571,0.7143 -27.62815,3.6181 -57.85714,10 -30.22899,6.3819 -99.77493,25.9619 -142.85715,35.7143 -43.08222,9.7524 -117.26443,34.816 -156.91262,27.2654 -39.64818,-7.5506 -89.51595,-64.4083 -89.51595,-64.4083 l 4.28572,-94.28571 c 0,0 85.88551,-16.20094 112.14285,-33.57143 26.25735,-17.37049 45.58238,-49.66598 59.28572,-71.42857 13.70334,-21.76259 32.85714,-71.42858 32.85714,-71.42858 l 238.57143,262.14289 z"
1847 id="path8660-2"
1848 sodipodi:nodetypes="czzzcczzcc"
1849 inkscape:connector-curvature="0" />
1850 </clipPath>
1851 <filter
1852 inkscape:collect="always"
1853 id="filter8888-6"
1854 x="-0.2112188"
1855 width="1.4224375"
1856 y="-0.16808605"
1857 height="1.3361721">
1858 <feGaussianBlur
1859 inkscape:collect="always"
1860 stdDeviation="8.3693583"
1861 id="feGaussianBlur8890-1" />
1862 </filter>
1863 <clipPath
1864 clipPathUnits="userSpaceOnUse"
1865 id="clipPath2833-2">
1866 <path
1867 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#292929;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1868 d="m 569.03125,1018.7776 c -4.28571,0.7143 -27.62815,3.6181 -57.85714,10 -30.22899,6.3819 -57.31395,4.9661 -135.78608,17.3296 -79.85178,12.5808 -94.06436,42.5423 -108.12225,47.0643 -14.70014,4.7286 -145.37739,-65.8225 -145.37739,-65.8225 l 4.28572,-94.28571 c 0,0 85.88551,-16.20094 112.14285,-33.57143 26.25735,-17.37049 45.58238,-49.66598 59.28572,-71.42857 13.70334,-21.76259 32.85714,-71.42858 32.85714,-71.42858 l 238.57143,262.14289 z"
1869 id="path2835-3"
1870 sodipodi:nodetypes="czzzcczzcc"
1871 inkscape:connector-curvature="0" />
1872 </clipPath>
1873 <filter
1874 inkscape:collect="always"
1875 id="filter8892-7"
1876 x="-0.18692794"
1877 width="1.3738559"
1878 y="-0.23646873"
1879 height="1.4729375">
1880 <feGaussianBlur
1881 inkscape:collect="always"
1882 stdDeviation="31.21228"
1883 id="feGaussianBlur8894-5" />
1884 </filter>
1885 <clipPath
1886 clipPathUnits="userSpaceOnUse"
1887 id="clipPath3665-9">
1888 <path
1889 sodipodi:nodetypes="czzcczcc"
1890 id="path3667-2"
1891 d="m 366.88839,504.13471 c 0,0 -29.55406,40.57305 -47.85714,74.28571 -18.30309,33.71267 -58.62109,126.35694 -70.35714,171.07143 -11.7594,44.80344 -62.5,123.57144 -62.5,123.57144 l 76.07143,18.21428 c 0,0 11.80712,-12.82335 31.07142,-46.07143 19.2643,-33.24808 60.35715,-138.57143 60.35715,-138.57143 l 13.21428,-202.5 z"
1892 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#0f0f0f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1893 inkscape:connector-curvature="0" />
1894 </clipPath>
1895 <filter
1896 inkscape:collect="always"
1897 id="filter8856-2"
1898 x="-0.3253231"
1899 width="1.6506462"
1900 y="-0.19013336"
1901 height="1.3802667">
1902 <feGaussianBlur
1903 inkscape:collect="always"
1904 stdDeviation="28.712591"
1905 id="feGaussianBlur8858-8" />
1906 </filter>
1907 <clipPath
1908 clipPathUnits="userSpaceOnUse"
1909 id="clipPath8642-9">
1910 <path
1911 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#0f0f0f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1912 d="m 366.88839,504.13471 c 0,0 -29.55406,40.57305 -47.85714,74.28571 -18.30309,33.71267 -58.62109,126.35694 -70.35714,171.07143 -11.7594,44.80344 -62.5,123.57144 -62.5,123.57144 l 76.07143,18.21428 c 0,0 11.80712,-12.82335 31.07142,-46.07143 19.2643,-33.24808 60.35715,-138.57143 60.35715,-138.57143 l 13.21428,-202.5 z"
1913 id="path8644-7"
1914 sodipodi:nodetypes="czzcczcc"
1915 inkscape:connector-curvature="0" />
1916 </clipPath>
1917 <filter
1918 inkscape:collect="always"
1919 id="filter8860-3"
1920 x="-0.38093024"
1921 width="1.7618605"
1922 y="-0.17518716"
1923 height="1.3503743">
1924 <feGaussianBlur
1925 inkscape:collect="always"
1926 stdDeviation="19.304015"
1927 id="feGaussianBlur8862-6" />
1928 </filter>
1929 <clipPath
1930 clipPathUnits="userSpaceOnUse"
1931 id="clipPath7616-1">
1932 <path
1933 id="path7618-2"
1934 d="m 205.47016,-408.97318 -0.0901,0.002 c -1.44563,0.78566 -6.69921,1.14335 -7.27625,9.03857 -0.54134,7.40553 13.78595,18.09566 15.85433,19.24481 1.66964,0.92764 3.48475,1.65551 5.27345,2.09115 l 1.41867,0.31834 c 1.90027,0.34514 3.70042,0.41015 5.15031,0.26563 3.1486,-0.31384 5.16386,-0.57031 7.16789,-0.8152 2.00402,-0.24488 2.5407,-0.86478 3.64319,-1.02999 1.14342,-0.17143 2.25659,0.27414 6.29577,-0.43753 4.03888,-0.71169 5.51507,-1.03768 6.23419,-1.3503 0.74664,-0.32479 1.81806,-0.74575 2.47589,-1.3621 1.95897,0.12471 3.80476,-0.0261 5.2648,-0.47819 3.02376,-0.93627 4.99157,-1.52544 6.8628,-2.27751 1.50138,-0.60342 2.43202,-1.53636 2.66436,-1.81883 0.23254,-0.28245 0.14951,-0.71989 0.17694,-0.73948 0.0453,-0.0322 0.34622,-0.0701 0.52926,-0.40161 0.98557,-1.78276 2.70955,-5.45215 2.87137,-6.12738 0.16094,-0.67257 0.26182,-1.33778 0.34007,-1.73051 0.0453,-0.22691 -0.0855,-0.88701 -0.0594,-0.94393 0.0365,-0.0797 0.30505,-0.22988 0.37769,-0.47485 0.34913,-1.17686 0.24274,-2.19578 0.1278,-3.6249 -0.11463,-1.42909 -0.64781,-4.6711 -1.24013,-5.56865 -0.38017,-0.57646 -0.74215,-0.84625 -1.09026,-0.98459 -0.0657,-0.0219 -0.12035,-0.0553 -0.1827,-0.0754 -0.0207,-0.005 -0.0418,2.3e-4 -0.0623,-0.004 -0.30559,-0.097 -0.59597,-0.20067 -1.13816,-0.29875 -0.97557,-0.1765 -2.40074,-0.42766 -3.94175,-0.52584 -0.51366,-0.0327 -1.0379,-0.0247 -1.56523,-0.0153 -3.57201,0.0636 -9.05695,0.3611 -10.30707,0.90928 -1.60587,-0.44697 -3.89597,-0.88576 -5.89053,-0.8812 -3.07195,0.007 -4.97947,-0.005 -6.92207,-0.0134 -1.94251,-0.009 -1.70908,0.27025 -2.9318,0.26518 -1.32192,-0.005 -1.76701,-0.34717 -5.55562,-0.29393 -3.55782,0.05 -9.02796,0.36522 -10.30706,0.90927 -1.60614,-0.44747 -3.89367,-0.88575 -5.89043,-0.88118 -3.07215,0.007 -4.98175,0.0265 -6.92426,0.0177 -0.66059,-0.003 -1.0485,0.051 -1.35359,0.0934 z"
1935 style="display:inline;opacity:0.82448976;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1936 inkscape:connector-curvature="0" />
1937 </clipPath>
1938 <filter
1939 inkscape:collect="always"
1940 id="filter7610-9"
1941 x="-0.021942979"
1942 width="1.0438859"
1943 y="-0.10017137"
1944 height="1.2003427">
1945 <feGaussianBlur
1946 inkscape:collect="always"
1947 stdDeviation="0.57530213"
1948 id="feGaussianBlur7612-3" />
1949 </filter>
1950 <clipPath
1951 clipPathUnits="userSpaceOnUse"
1952 id="clipPath7606-1">
1953 <path
1954 id="path7608-9"
1955 d="m 1049.205,-282.26672 -0.09,0.008 c -1.3874,0.88445 -6.6033,1.6072 -6.629,9.52344 -0.024,7.42525 15.0129,17.09146 17.1563,18.09375 1.7302,0.80909 3.5916,1.40876 5.4063,1.71875 l 1.4374,0.21875 c 1.9197,0.21194 3.72,0.15141 5.1563,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0937,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5626,-1.28125 1.1287,-0.25066 2.2702,0.11629 6.25,-0.875 3.9795,-0.99128 5.4294,-1.4193 6.125,-1.78125 0.7222,-0.37601 1.7617,-0.87058 2.375,-1.53125 1.9629,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.14461 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70653 2.3191,-1.70203 2.5312,-2 0.2123,-0.29796 0.099,-0.72855 0.125,-0.75 0.043,-0.0352 0.3405,-0.094 0.5,-0.4375 0.859,-1.84708 2.3232,-5.62764 2.4376,-6.3125 0.1137,-0.68215 0.168,-1.35277 0.2187,-1.75 0.029,-0.22951 -0.1471,-0.8789 -0.125,-0.9375 0.031,-0.082 0.2883,-0.25057 0.3437,-0.5 0.2663,-1.19832 0.089,-2.20736 -0.125,-3.625 -0.2139,-1.41764 -0.9716,-4.61463 -1.625,-5.46875 -0.4194,-0.54857 -0.7993,-0.7925 -1.1562,-0.90625 -0.067,-0.0173 -0.1239,-0.0467 -0.1875,-0.0625 -0.021,-0.004 -0.042,0.003 -0.062,0 -0.3116,-0.0755 -0.6085,-0.15867 -1.1562,-0.21875 -0.9855,-0.10812 -2.4247,-0.2594 -3.9688,-0.25 -0.5147,0.003 -1.0371,0.0476 -1.5625,0.0937 -3.5589,0.31228 -9.0098,0.99108 -10.2187,1.625 -1.6331,-0.33402 -3.9482,-0.61223 -5.9376,-0.46875 -3.064,0.22097 -4.9677,0.34219 -6.9062,0.46875 -1.9384,0.12655 -1.6861,0.38864 -2.9062,0.46875 -1.3191,0.0866 -1.7869,-0.22325 -5.5626,0.0937 -3.5457,0.29772 -8.9806,0.99317 -10.2187,1.625 -1.6334,-0.33451 -3.9459,-0.61239 -5.9375,-0.46875 -3.0642,0.22098 -4.9678,0.37344 -6.9062,0.5 -0.6592,0.043 -1.0424,0.12393 -1.3438,0.1875 z"
1956 style="display:inline;opacity:0.82448976;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
1957 inkscape:connector-curvature="0" />
1958 </clipPath>
1959 <filter
1960 inkscape:collect="always"
1961 id="filter7578-4"
1962 x="-0.08160872"
1963 width="1.1632174"
1964 y="-0.22659944"
1965 height="1.4531989">
1966 <feGaussianBlur
1967 inkscape:collect="always"
1968 stdDeviation="2.437399"
1969 id="feGaussianBlur7580-7" />
1970 </filter>
1971 <filter
1972 inkscape:collect="always"
1973 id="filter7594-8"
1974 x="-0.040804356"
1975 width="1.0816087"
1976 y="-0.11329972"
1977 height="1.2265995">
1978 <feGaussianBlur
1979 inkscape:collect="always"
1980 stdDeviation="1.2186995"
1981 id="feGaussianBlur7596-4" />
1982 </filter>
1983 <clipPath
1984 clipPathUnits="userSpaceOnUse"
1985 id="clipPath8616-5">
1986 <path
1987 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
1988 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z"
1989 id="path8618-0"
1990 sodipodi:nodetypes="cscccccccccccc"
1991 inkscape:connector-curvature="0" />
1992 </clipPath>
1993 <filter
1994 inkscape:collect="always"
1995 id="filter8940-3"
1996 x="-0.25152978"
1997 width="1.5030596"
1998 y="-0.053035267"
1999 height="1.1060705">
2000 <feGaussianBlur
2001 inkscape:collect="always"
2002 stdDeviation="13.024603"
2003 id="feGaussianBlur8942-6" />
2004 </filter>
2005 <clipPath
2006 clipPathUnits="userSpaceOnUse"
2007 id="clipPath8209-6">
2008 <path
2009 sodipodi:nodetypes="czcc"
2010 id="path8211-3"
2011 d="m 734.03125,519.49186 c 0,0 16.75513,37.01806 28.70141,53.95395 11.94629,16.93589 52.72716,56.04605 52.72716,56.04605 l 0.59717,-138.58975"
2012 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#1a1a1a;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2013 inkscape:connector-curvature="0" />
2014 </clipPath>
2015 <filter
2016 inkscape:collect="always"
2017 id="filter8822-2"
2018 x="-0.2742857"
2019 width="1.5485713"
2020 y="-0.21333334"
2021 height="1.4266667">
2022 <feGaussianBlur
2023 inkscape:collect="always"
2024 stdDeviation="11.313708"
2025 id="feGaussianBlur8824-0" />
2026 </filter>
2027 <clipPath
2028 clipPathUnits="userSpaceOnUse"
2029 id="clipPath3998-6">
2030 <path
2031 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2032 d="m 178.21428,274.14789 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.55405 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401287 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.3574 -122.78647,50.053 -187.06988,59.0023 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.1982 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z"
2033 id="path4000-1"
2034 sodipodi:nodetypes="cscccccccccccc"
2035 inkscape:connector-curvature="0" />
2036 </clipPath>
2037 <filter
2038 inkscape:collect="always"
2039 id="filter3677-5">
2040 <feGaussianBlur
2041 inkscape:collect="always"
2042 stdDeviation="2.0397518"
2043 id="feGaussianBlur3679-5" />
2044 </filter>
2045 <filter
2046 id="filter3785-4"
2047 inkscape:label="White Fur">
2048 <feTurbulence
2049 id="feTurbulence3787-7"
2050 type="fractalNoise"
2051 baseFrequency="0.24044943820224721"
2052 numOctaves="10"
2053 seed="655"
2054 result="result0" />
2055 <feDisplacementMap
2056 id="feDisplacementMap3789-65"
2057 in="SourceGraphic"
2058 in2="result0"
2059 scale="62"
2060 xChannelSelector="B"
2061 yChannelSelector="G" />
2062 </filter>
2063 <clipPath
2064 clipPathUnits="userSpaceOnUse"
2065 id="clipPath8604-69">
2066 <path
2067 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2068 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z"
2069 id="path8606-3"
2070 sodipodi:nodetypes="cscccccccccccc"
2071 inkscape:connector-curvature="0" />
2072 </clipPath>
2073 <filter
2074 inkscape:collect="always"
2075 id="filter8802-7"
2076 x="-0.35311759"
2077 width="1.7062352"
2078 y="-0.1817714"
2079 height="1.3635428">
2080 <feGaussianBlur
2081 inkscape:collect="always"
2082 stdDeviation="48.038491"
2083 id="feGaussianBlur8804-4" />
2084 </filter>
2085 <radialGradient
2086 inkscape:collect="always"
2087 xlink:href="#linearGradient3317"
2088 id="radialGradient3315-5"
2089 cx="543.6698"
2090 cy="147.3131"
2091 fx="543.6698"
2092 fy="147.3131"
2093 r="47.863216"
2094 gradientTransform="matrix(2.1382256,0,0,2.3382884,-77.03847,-101.68704)"
2095 gradientUnits="userSpaceOnUse" />
2096 <radialGradient
2097 inkscape:collect="always"
2098 xlink:href="#linearGradient3537"
2099 id="radialGradient3543-4"
2100 cx="385"
2101 cy="237.00504"
2102 fx="385"
2103 fy="237.00504"
2104 r="86.928574"
2105 gradientTransform="matrix(1,0,0,0.8562038,0,34.080427)"
2106 gradientUnits="userSpaceOnUse" />
2107 <clipPath
2108 clipPathUnits="userSpaceOnUse"
2109 id="clipPath4100-3">
2110 <path
2111 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.9000755px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
2112 d="m 265.93541,126.68393 -18.76721,168.86308 174.10543,-73.12068 61.9544,88.65883 57.8844,-31.9903 -37.53442,-180.059677 -237.6426,27.648747 z"
2113 id="path4102-0"
2114 sodipodi:nodetypes="ccccccc"
2115 inkscape:connector-curvature="0" />
2116 </clipPath>
2117 <filter
2118 inkscape:collect="always"
2119 id="filter4120-7"
2120 x="-0.2770822"
2121 width="1.5541644"
2122 y="-0.32482043"
2123 height="1.6496409">
2124 <feGaussianBlur
2125 inkscape:collect="always"
2126 stdDeviation="19.956289"
2127 id="feGaussianBlur4122-8" />
2128 </filter>
2129 <radialGradient
2130 inkscape:collect="always"
2131 xlink:href="#linearGradient3961"
2132 id="radialGradient3915-6"
2133 cx="418.30365"
2134 cy="342.47794"
2135 fx="418.30365"
2136 fy="342.47794"
2137 r="131.4509"
2138 gradientTransform="matrix(1.3957347,0.6211056,-0.4244067,0.9537174,-15.061913,-227.96711)"
2139 gradientUnits="userSpaceOnUse" />
2140 <mask
2141 maskUnits="userSpaceOnUse"
2142 id="mask3684-3">
2143 <ellipse
2144 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient3688);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.43724918px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2145 id="path3686-1"
2146 transform="translate(-174.03125,62.156036)"
2147 cx="579.474"
2148 cy="260.57516"
2149 rx="192.6866"
2150 ry="164.04877" />
2151 </mask>
2152 <radialGradient
2153 inkscape:collect="always"
2154 xlink:href="#linearGradient3951"
2155 id="radialGradient3933-8"
2156 cx="397.16388"
2157 cy="336.95245"
2158 fx="397.16388"
2159 fy="336.95245"
2160 r="36.75"
2161 gradientUnits="userSpaceOnUse"
2162 gradientTransform="matrix(1.9449972,2.4894837e-7,-2.4894833e-7,1.9449969,-375.31868,-318.41912)" />
2163 <filter
2164 inkscape:collect="always"
2165 id="filter8806-6"
2166 x="-0.61142862"
2167 width="2.2228572"
2168 y="-0.14930232"
2169 height="1.2986046">
2170 <feGaussianBlur
2171 inkscape:collect="always"
2172 stdDeviation="37.830213"
2173 id="feGaussianBlur8808-4" />
2174 </filter>
2175 <filter
2176 inkscape:collect="always"
2177 id="filter8826-9"
2178 x="-0.25894088"
2179 width="1.5178818"
2180 y="-0.2236412"
2181 height="1.4472824">
2182 <feGaussianBlur
2183 inkscape:collect="always"
2184 stdDeviation="19.631544"
2185 id="feGaussianBlur8828-5" />
2186 </filter>
2187 <radialGradient
2188 inkscape:collect="always"
2189 xlink:href="#linearGradient3985"
2190 id="radialGradient3991-0"
2191 cx="402.48898"
2192 cy="317.23578"
2193 fx="402.48898"
2194 fy="317.23578"
2195 r="23.714285"
2196 gradientUnits="userSpaceOnUse"
2197 gradientTransform="matrix(4.3776616,0,0,4.3776616,-1358.3025,-1070.7357)" />
2198 <filter
2199 inkscape:collect="always"
2200 id="filter3981-7"
2201 x="-0.30000001"
2202 width="1.6"
2203 y="-0.30000001"
2204 height="1.6">
2205 <feGaussianBlur
2206 inkscape:collect="always"
2207 stdDeviation="2"
2208 id="feGaussianBlur3983-1" />
2209 </filter>
2210 <radialGradient
2211 inkscape:collect="always"
2212 xlink:href="#linearGradient4106"
2213 id="radialGradient4112-7"
2214 cx="250.22678"
2215 cy="475.09763"
2216 fx="250.22678"
2217 fy="475.09763"
2218 r="95.98877"
2219 gradientTransform="matrix(1.2259004,-0.7077739,0.1413989,0.2449102,322.22326,608.91815)"
2220 gradientUnits="userSpaceOnUse" />
2221 <radialGradient
2222 inkscape:collect="always"
2223 xlink:href="#linearGradient4013"
2224 id="radialGradient3585-2"
2225 gradientUnits="userSpaceOnUse"
2226 gradientTransform="matrix(1.1323239,0.7659488,-1.4550286,2.1510098,588.75376,-711.79716)"
2227 cx="228.81355"
2228 cy="440.26971"
2229 fx="228.81355"
2230 fy="440.26971"
2231 r="119.17509" />
2232 <clipPath
2233 clipPathUnits="userSpaceOnUse"
2234 id="clipPath3999-0">
2235 <path
2236 style="display:inline;opacity:1;fill:#f5ff04;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
2237 d="m 179.64286,267.36218 c -22.41044,39.70292 -60.6161,115.78029 -69.28571,149.64286 -8.64721,33.7751 -8.77199,66.41654 -0.35715,86.42858 8.3602,19.88213 26.16398,35.6328 40.71428,41.42856 -0.59638,-14.37587 14.37295,-43.28583 72.85715,-72.5 58.62627,-29.28514 78.38163,-27.13086 103.57142,-47.14286 25.63006,-20.36176 12.61031,-67.04463 3.21429,-93.92857 -9.43424,-26.99328 -34.96741,-59.12448 -66.42857,-69.64285 -31.03327,-10.37532 -65.01776,-4.84837 -84.28571,5.71428 z"
2238 id="path4001-61"
2239 sodipodi:nodetypes="czzczzzzc"
2240 inkscape:connector-curvature="0" />
2241 </clipPath>
2242 <radialGradient
2243 inkscape:collect="always"
2244 xlink:href="#linearGradient4041"
2245 id="radialGradient4060-5"
2246 gradientUnits="userSpaceOnUse"
2247 gradientTransform="matrix(0.05911206,2.6869855,-0.7234268,0.01591495,408.72779,-424.56452)"
2248 cx="275.4422"
2249 cy="335.34866"
2250 fx="275.4422"
2251 fy="335.34866"
2252 r="36.75" />
2253 <radialGradient
2254 inkscape:collect="always"
2255 xlink:href="#linearGradient7622"
2256 id="radialGradient4062-9"
2257 gradientUnits="userSpaceOnUse"
2258 gradientTransform="matrix(0.05911206,2.6869855,-0.7234268,0.01591495,408.72779,-424.56452)"
2259 cx="275.4422"
2260 cy="335.34866"
2261 fx="275.4422"
2262 fy="335.34866"
2263 r="36.75" />
2264 <filter
2265 inkscape:collect="always"
2266 id="filter4079-1">
2267 <feGaussianBlur
2268 inkscape:collect="always"
2269 stdDeviation="6.5887624"
2270 id="feGaussianBlur4081-1" />
2271 </filter>
2272 <radialGradient
2273 inkscape:collect="always"
2274 xlink:href="#linearGradient4013"
2275 id="radialGradient4056-5"
2276 gradientUnits="userSpaceOnUse"
2277 gradientTransform="matrix(1.1323239,0.7659488,-1.4550286,2.1510098,588.75376,-711.79716)"
2278 cx="228.81355"
2279 cy="440.26971"
2280 fx="228.81355"
2281 fy="440.26971"
2282 r="119.17509" />
2283 <filter
2284 inkscape:collect="always"
2285 id="filter4083-9">
2286 <feGaussianBlur
2287 inkscape:collect="always"
2288 stdDeviation="1.5052066"
2289 id="feGaussianBlur4085-7" />
2290 </filter>
2291 <radialGradient
2292 inkscape:collect="always"
2293 xlink:href="#linearGradient4113"
2294 id="radialGradient4119-7"
2295 cx="296.33783"
2296 cy="427.17749"
2297 fx="296.33783"
2298 fy="427.17749"
2299 r="19.704132"
2300 gradientUnits="userSpaceOnUse"
2301 gradientTransform="matrix(2.9797125,0,0,2.9797125,-599.28727,-827.0855)" />
2302 <radialGradient
2303 inkscape:collect="always"
2304 xlink:href="#linearGradient4862"
2305 id="radialGradient4868-3"
2306 cx="429.56738"
2307 cy="377.42877"
2308 fx="429.56738"
2309 fy="377.42877"
2310 r="72.079735"
2311 gradientTransform="matrix(1,0,0,0.618034,0,144.16496)"
2312 gradientUnits="userSpaceOnUse" />
2313 <filter
2314 inkscape:collect="always"
2315 id="filter4002-6"
2316 x="-0.24334238"
2317 width="1.4866848"
2318 y="-0.39104807"
2319 height="1.7820961">
2320 <feGaussianBlur
2321 inkscape:collect="always"
2322 stdDeviation="14.589518"
2323 id="feGaussianBlur4004-3" />
2324 </filter>
2325 <radialGradient
2326 inkscape:collect="always"
2327 xlink:href="#linearGradient4870"
2328 id="radialGradient4876-9"
2329 cx="437.6991"
2330 cy="391.21735"
2331 fx="437.6991"
2332 fy="391.21735"
2333 r="36.611931"
2334 gradientTransform="matrix(1,0,0,0.618034,0,149.43174)"
2335 gradientUnits="userSpaceOnUse" />
2336 <filter
2337 inkscape:collect="always"
2338 id="filter4010-1"
2339 x="-0.14577261"
2340 width="1.2915452"
2341 y="-0.23523259"
2342 height="1.4704652">
2343 <feGaussianBlur
2344 inkscape:collect="always"
2345 stdDeviation="4.4442907"
2346 id="feGaussianBlur4012-2" />
2347 </filter>
2348 <filter
2349 inkscape:collect="always"
2350 id="filter4053-9">
2351 <feGaussianBlur
2352 inkscape:collect="always"
2353 stdDeviation="0.6062947"
2354 id="feGaussianBlur4055-3" />
2355 </filter>
2356 <clipPath
2357 clipPathUnits="userSpaceOnUse"
2358 id="clipPath8514-8">
2359 <path
2360 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2361 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z"
2362 id="path8516-8"
2363 sodipodi:nodetypes="cscccccccccccc"
2364 inkscape:connector-curvature="0" />
2365 </clipPath>
2366 <filter
2367 inkscape:collect="always"
2368 id="filter8814-5"
2369 x="-0.20466694"
2370 width="1.4093339"
2371 y="-0.29007819"
2372 height="1.5801564">
2373 <feGaussianBlur
2374 inkscape:collect="always"
2375 stdDeviation="22.300169"
2376 id="feGaussianBlur8816-0" />
2377 </filter>
2378 <clipPath
2379 clipPathUnits="userSpaceOnUse"
2380 id="clipPath8610-9">
2381 <path
2382 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2383 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z"
2384 id="path8612-6"
2385 sodipodi:nodetypes="cscccccccccccc"
2386 inkscape:connector-curvature="0" />
2387 </clipPath>
2388 <filter
2389 inkscape:collect="always"
2390 id="filter8810-3"
2391 x="-0.23519406"
2392 width="1.4703881"
2393 y="-0.24500646"
2394 height="1.4900129">
2395 <feGaussianBlur
2396 inkscape:collect="always"
2397 stdDeviation="58.328041"
2398 id="feGaussianBlur8812-8" />
2399 </filter>
2400 <clipPath
2401 clipPathUnits="userSpaceOnUse"
2402 id="clipPath8622-5">
2403 <path
2404 style="display:inline;opacity:1;fill:#202020;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2405 d="m 821.64329,477.88997 c 0,0 22.61947,-6.50681 35.74275,-5.87273 13.12328,0.63409 30.64158,1.93862 43.70885,12.18619 13.06727,10.24756 25.06774,27.14007 34.11239,58.36965 9.04465,31.22958 1.69832,99.25201 -6.17603,143.34735 -7.87435,44.09534 -28.2651,106.11298 -45,140 -16.7349,33.88702 -49.79771,77.4952 -60.56943,89.87616 -11.36422,13.06197 -56.20589,36.42617 -79.43057,42.26667 5.3033,-10.6066 48.89976,-50.58884 35,-60.71426 -14.01897,-10.21226 -45.76009,45.98236 -84.29315,29.03317 21.38231,-13.13212 41.7794,-51.18606 34.04061,-66.59445 -7.84025,-15.61039 -30.70493,48.75757 -93.53554,37.01288 30.05204,-27.52666 55.40706,-70.90401 41.2627,-82.9797 -14.41516,-12.30687 -60.46175,54.29315 -60.46175,54.29315 0,0 -2.8219,-41.70118 13.7732,-68.60732 16.63935,-26.97787 79.65297,-81.61527 99.55313,-111.70342 19.90015,-30.08814 33.61256,-66.00902 42.13542,-92.51794 8.52286,-26.50892 15.80094,-77.09954 15.80094,-77.09954"
2406 id="path8624-61"
2407 sodipodi:nodetypes="czzzzzzczczczczzzc"
2408 inkscape:connector-curvature="0" />
2409 </clipPath>
2410 <filter
2411 inkscape:collect="always"
2412 id="filter8818-1"
2413 x="-0.34381232"
2414 width="1.6876246"
2415 y="-0.18433961"
2416 height="1.3686792">
2417 <feGaussianBlur
2418 inkscape:collect="always"
2419 stdDeviation="34.542167"
2420 id="feGaussianBlur8820-5" />
2421 </filter>
2422 <clipPath
2423 clipPathUnits="userSpaceOnUse"
2424 id="clipPath8906-9">
2425 <path
2426 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#262f2f;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2427 d="m 352.24553,211.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.554046 36.34702,-65.295835 116.94091,-84.694685 185.93466,-91.465427 86.92239,-11.016801 184.91267,17.940072 233.37134,95.401283 54.12402,75.7333 56.67476,172.53912 80.61204,259.52795 29.43779,127.1276 54.77914,256.21414 60.39224,386.85035 -3.06348,78.18185 -8.42634,165.18415 -60.50321,228.13413 -48.02654,50.35744 -122.78647,50.05304 -187.06988,59.00234 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.19824 -64.77564,-37.94001 -95.73019,-113.47863 -97.2794,-186.01958 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z"
2428 id="path8908-8"
2429 sodipodi:nodetypes="cscccccccccccc"
2430 inkscape:connector-curvature="0" />
2431 </clipPath>
2432 <clipPath
2433 clipPathUnits="userSpaceOnUse"
2434 id="clipPath3602-4">
2435 <path
2436 sodipodi:nodetypes="czzzzzzczczczczzzc"
2437 id="path3604-8"
2438 d="m 647.61204,540.04601 c 0,0 22.61947,-6.50681 35.74275,-5.87273 13.12328,0.63409 30.64158,1.93862 43.70885,12.18619 13.06727,10.24756 25.06774,27.14007 34.11239,58.36965 9.04465,31.22958 1.69832,99.25201 -6.17603,143.34735 -7.87435,44.09534 -28.2651,106.11298 -45,140 -16.7349,33.88702 -49.79771,77.4952 -60.56943,89.87616 -11.36422,13.06197 -56.20589,36.42617 -79.43057,42.26667 5.3033,-10.6066 48.89976,-50.58884 35,-60.71426 -14.01897,-10.21226 -45.76009,45.98236 -84.29315,29.03317 21.38231,-13.13212 41.7794,-51.18606 34.04061,-66.59445 -7.84025,-15.61039 -30.70493,48.75757 -93.53554,37.01288 30.05204,-27.52666 55.40706,-70.90401 41.2627,-82.9797 -14.41516,-12.30687 -60.46175,54.29315 -60.46175,54.29315 0,0 -2.8219,-41.70118 13.7732,-68.60732 16.63935,-26.97787 79.65297,-81.61527 99.55313,-111.70342 19.90015,-30.08814 33.61256,-66.00902 42.13542,-92.51794 8.52286,-26.50892 15.80094,-77.09954 15.80094,-77.09954"
2439 style="display:inline;opacity:1;fill:#202020;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2440 inkscape:connector-curvature="0" />
2441 </clipPath>
2442 <filter
2443 inkscape:collect="always"
2444 id="filter3587-1"
2445 x="-0.1">
2446 <feGaussianBlur
2447 inkscape:collect="always"
2448 stdDeviation="8.881432"
2449 id="feGaussianBlur3589-0" />
2450 </filter>
2451 <clipPath
2452 clipPathUnits="userSpaceOnUse"
2453 id="clipPath3992-4">
2454 <path
2455 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#121212;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2456 d="m 709.28572,844.50504 c 54.28571,-1.42857 126.035,-15.05199 170,-26.78572 44.05271,-11.75714 125.88628,-36.34724 175.35708,-57.85714 49.3393,-21.45272 113.6037,-59.2816 154.2858,-92.14285 40.5081,-32.72069 52.3899,-55.81981 60.7143,-33.57143 8.3691,22.36779 -16.407,56.32562 -37.8572,81.07143 -21.6041,24.9234 -52.7313,52.70533 -98.9286,89.28571 C 1086.6598,841.08542 976.77458,906.08967 920,933.07647 c -57.06606,27.12536 -128.20334,58.23842 -172.14286,72.50003 -43.93952,14.2616 -131.42857,31.0714 -131.42857,31.0714 l 92.85715,-192.14286 z"
2457 id="path3994-4"
2458 sodipodi:nodetypes="czzzzzzzzcc"
2459 inkscape:connector-curvature="0" />
2460 </clipPath>
2461 <filter
2462 inkscape:collect="always"
2463 id="filter3779-4"
2464 x="-0.087980822"
2465 width="1.1759616"
2466 y="-0.17728332"
2467 height="1.3545666">
2468 <feGaussianBlur
2469 inkscape:collect="always"
2470 stdDeviation="16.340344"
2471 id="feGaussianBlur3781-4" />
2472 </filter>
2473 <clipPath
2474 clipPathUnits="userSpaceOnUse"
2475 id="clipPath3986-7">
2476 <path
2477 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#121212;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2478 d="m 709.28572,844.50504 c 54.28571,-1.42857 126.035,-15.05199 170,-26.78572 44.05271,-11.75714 125.88628,-36.34724 175.35708,-57.85714 49.3393,-21.45272 113.6037,-59.2816 154.2858,-92.14285 40.5081,-32.72069 52.3899,-55.81981 60.7143,-33.57143 8.3691,22.36779 -16.407,56.32562 -37.8572,81.07143 -21.6041,24.9234 -52.7313,52.70533 -98.9286,89.28571 C 1086.6598,841.08542 976.77458,906.08967 920,933.07647 c -57.06606,27.12536 -128.20334,58.23842 -172.14286,72.50003 -43.93952,14.2616 -131.42857,31.0714 -131.42857,31.0714 l 92.85715,-192.14286 z"
2479 id="path3988-6"
2480 sodipodi:nodetypes="czzzzzzzzcc"
2481 inkscape:connector-curvature="0" />
2482 </clipPath>
2483 <clipPath
2484 clipPathUnits="userSpaceOnUse"
2485 id="clipPath3722-3">
2486 <path
2487 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#121212;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
2488 d="m 709.28572,844.50504 c 54.28571,-1.42857 126.035,-15.05199 170,-26.78572 44.05271,-11.75714 125.88628,-36.34724 175.35708,-57.85714 49.3393,-21.45272 113.6037,-59.2816 154.2858,-92.14285 40.5081,-32.72069 52.3899,-55.81981 60.7143,-33.57143 8.3691,22.36779 -16.407,56.32562 -37.8572,81.07143 -21.6041,24.9234 -52.7313,52.70533 -98.9286,89.28571 C 1086.6598,841.08542 976.77458,906.08967 920,933.07647 c -57.06606,27.12536 -128.20334,58.23842 -172.14286,72.50003 -43.93952,14.2616 -131.42857,31.0714 -131.42857,31.0714 l 92.85715,-192.14286 z"
2489 id="path3724-1"
2490 sodipodi:nodetypes="czzzzzzzzcc"
2491 inkscape:connector-curvature="0" />
2492 </clipPath>
2493 <filter
2494 inkscape:collect="always"
2495 id="filter8225-7">
2496 <feGaussianBlur
2497 inkscape:collect="always"
2498 stdDeviation="10.661912"
2499 id="feGaussianBlur8227-5" />
2500 </filter>
2501 <mask
2502 maskUnits="userSpaceOnUse"
2503 id="mask7704-9">
2504 <path
2505 style="fill:url(#linearGradient7708);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
2506 d="m 718.40812,-224.31217 33.25,56 275.99998,-24 159.5,-48.25 -66.5,-82.75 -402.24998,99 z"
2507 id="path7706-6"
2508 inkscape:connector-curvature="0" />
2509 </mask>
2510 <clipPath
2511 clipPathUnits="userSpaceOnUse"
2512 id="clipPath7421-7">
2513 <path
2514 sodipodi:type="inkscape:offset"
2515 inkscape:radius="0"
2516 inkscape:original="M 1111.4062 -285.9375 L 1107.4688 -284.0625 C 1107.4283 -284.05228 1107.3692 -284.04201 1107.3438 -284.03125 C 1106.925 -283.8184 1107.1791 -283.93067 1106.6875 -283.71875 C 1106.2014 -283.50919 1104.9499 -283.13456 1102.5938 -282.25 C 1099.2626 -280.99942 1096.7895 -280.10016 1095.5938 -279.1875 C 1094.0576 -279.16623 1091.8733 -278.95419 1089.9375 -278.46875 C 1086.956 -277.72108 1085.0823 -277.29474 1083.1875 -276.875 C 1081.2927 -276.45527 1081.512 -276.23281 1080.3125 -276 C 1079.0159 -275.74833 1078.5911 -276.00899 1074.875 -275.21875 C 1071.3851 -274.4766 1065.9802 -273.28768 1064.7188 -272.53125 C 1063.1348 -272.71203 1060.8513 -272.85303 1058.875 -272.5625 C 1055.8346 -272.11554 1053.9588 -271.88974 1052.0312 -271.65625 C 1051.3758 -271.57687 1050.9902 -271.45547 1050.6875 -271.375 C 1050.2613 -271.24334 1050.0017 -271.11498 1049.3125 -271.03125 C 1048.0009 -270.87188 1047.5503 -271.18808 1043.7812 -270.75 C 1040.2273 -270.33691 1034.7758 -269.47718 1033.5312 -268.8125 C 1031.9322 -269.10979 1029.6735 -269.34669 1027.6875 -269.15625 C 1024.6287 -268.86293 1022.7155 -268.67226 1020.7812 -268.5 C 1018.847 -268.32773 1019.0926 -268.07763 1017.875 -267.96875 C 1016.5588 -267.85105 1016.1152 -268.13238 1012.3438 -267.71875 C 1008.8017 -267.3303 1003.3359 -266.50948 1002.0625 -265.84375 C 1000.4636 -266.13844 998.1753 -266.35076 996.1875 -266.15625 C 993.12921 -265.857 991.2463 -265.67601 989.3125 -265.5 C 988.65501 -265.44015 988.27245 -265.32144 987.96875 -265.25 C 987.54105 -265.13104 987.28525 -265.03193 986.59375 -264.96875 C 985.27775 -264.84849 984.834 -265.16363 981.0625 -264.75 C 977.50631 -264.35998 972.0569 -263.51084 970.8125 -262.84375 C 969.21381 -263.13793 966.95265 -263.36747 964.96875 -263.15625 C 961.91305 -262.83092 959.9947 -262.63001 958.0625 -262.4375 C 956.13031 -262.24499 956.37275 -261.99662 955.15625 -261.875 C 953.84137 -261.74353 953.3932 -262.03954 949.625 -261.59375 C 946.08611 -261.17509 940.6473 -260.30158 939.375 -259.625 C 937.77741 -259.90604 935.51505 -260.04543 933.53125 -259.8125 C 930.47927 -259.45413 928.58625 -259.24464 926.65625 -259.03125 C 926.00007 -258.95869 925.6156 -258.85856 925.3125 -258.78125 C 924.88571 -258.65402 924.6276 -258.51405 923.9375 -258.4375 C 922.62411 -258.29181 922.17015 -258.61152 918.40625 -258.125 C 914.85737 -257.66624 909.4276 -256.70598 908.1875 -256 C 906.59441 -256.24424 904.3537 -256.38135 902.375 -256.125 C 899.32741 -255.73018 897.4243 -255.47655 895.5 -255.21875 C 893.57571 -254.96096 893.7739 -254.72522 892.5625 -254.5625 C 891.25301 -254.3866 890.8153 -254.66688 887.0625 -254.09375 C 883.53821 -253.55551 878.1393 -252.39458 876.875 -251.65625 C 875.28751 -251.85979 873.0295 -251.91098 871.0625 -251.5625 C 868.03631 -251.02638 866.1636 -250.70081 864.25 -250.375 C 863.59941 -250.26423 863.2363 -250.10406 862.9375 -250 C 862.51681 -249.83512 862.27405 -249.6687 861.59375 -249.53125 C 860.29905 -249.26966 859.86665 -249.53745 856.15625 -248.71875 C 852.65777 -247.9468 847.31035 -246.33582 846.09375 -245.5 C 844.53085 -245.57745 842.33625 -245.41472 840.40625 -244.90625 C 837.43387 -244.12312 835.58855 -243.67416 833.71875 -243.15625 C 831.84875 -242.63835 832.0521 -242.38897 830.875 -242.0625 C 829.60251 -241.7096 829.17795 -241.95541 825.53125 -240.875 C 822.10657 -239.86037 816.88185 -237.94183 815.65625 -237.03125 C 814.11747 -237.01851 811.93645 -236.75903 810.03125 -236.15625 C 807.10027 -235.22891 805.2809 -234.69783 803.4375 -234.09375 C 802.81071 -233.88837 802.44585 -233.70117 802.15625 -233.5625 C 801.74867 -233.34889 801.50295 -233.15375 800.84375 -232.9375 C 799.58925 -232.52596 799.1576 -232.74846 795.5625 -231.5 C 792.17261 -230.32283 786.96755 -228.2863 785.78125 -227.34375 C 784.25737 -227.28408 782.1312 -226.94888 780.25 -226.28125 C 777.35261 -225.25296 775.55095 -224.60577 773.71875 -223.96875 C 771.88655 -223.33174 772.0909 -223.12021 770.9375 -222.71875 C 769.69071 -222.28479 769.27395 -222.51903 765.71875 -221.15625 C 762.38005 -219.87645 757.23165 -217.6737 756.03125 -216.6875 C 754.52407 -216.57981 752.39555 -216.1887 750.53125 -215.46875 C 747.66307 -214.36115 745.90735 -213.68719 744.09375 -213 C 743.47705 -212.76637 743.0973 -212.55797 742.8125 -212.40625 C 742.81251 -212.40625 742.8125 -212.37673 742.8125 -212.375 L 734.8125 -209.1875 L 736.625 -194.46875 C 736.36701 -194.52956 742.8125 -191.15625 742.8125 -191.15625 C 743.03891 -191.30093 743.26145 -191.42886 743.53125 -191.53125 C 744.61177 -191.94123 745.70285 -191.74702 749.53125 -193.21875 C 753.35977 -194.69049 754.7553 -195.22373 755.4375 -195.625 C 756.11711 -196.02478 757.04925 -196.50437 757.65625 -197.15625 C 759.48317 -197.294 761.22705 -197.64948 762.59375 -198.15625 C 765.56175 -199.25677 767.4691 -199.96244 769.375 -200.625 C 771.28081 -201.28754 771.72915 -202.03987 772.78125 -202.40625 C 773.87287 -202.78636 774.97635 -202.57163 778.84375 -203.9375 C 782.71115 -205.30336 784.1269 -205.76458 784.8125 -206.15625 C 785.51361 -206.55677 786.5133 -207.08923 787.125 -207.75 C 789.09581 -207.80466 790.94195 -208.13463 792.40625 -208.625 C 795.40777 -209.63008 797.3324 -210.24671 799.25 -210.875 C 800.78861 -211.3791 801.42415 -211.92177 802.15625 -212.3125 C 802.38647 -212.44681 802.63215 -212.56623 802.90625 -212.65625 C 804.00457 -213.01673 805.0877 -212.73762 809 -213.96875 C 812.91231 -215.19988 814.366 -215.6417 815.0625 -216 C 815.75641 -216.35697 816.6926 -216.79261 817.3125 -217.40625 C 819.17771 -217.42891 820.94835 -217.67308 822.34375 -218.09375 C 825.37415 -219.00729 827.33615 -219.52385 829.28125 -220.0625 C 831.22637 -220.60114 831.70745 -221.32702 832.78125 -221.625 C 833.89527 -221.93415 835.00125 -221.61761 838.96875 -222.65625 C 842.93625 -223.69488 844.38625 -224.08898 845.09375 -224.40625 C 845.82855 -224.73584 846.90765 -225.15997 847.53125 -225.78125 C 849.52907 -225.66525 851.3887 -225.80134 852.875 -226.15625 C 855.95311 -226.89125 857.9584 -227.25719 859.9375 -227.65625 C 861.52541 -227.97643 862.1818 -228.4468 862.9375 -228.75 C 863.17501 -228.8568 863.4044 -228.94276 863.6875 -229 C 864.82091 -229.22919 865.99215 -228.79107 870.03125 -229.5 C 874.07067 -230.20893 875.5315 -230.42709 876.25 -230.6875 C 876.96581 -230.94694 877.95435 -231.25474 878.59375 -231.78125 C 880.51795 -231.54176 882.34165 -231.55672 883.78125 -231.78125 C 886.90767 -232.26887 888.9358 -232.48192 890.9375 -232.75 C 892.93921 -233.01807 893.42625 -233.69514 894.53125 -233.84375 C 895.67767 -233.99793 896.8071 -233.54218 900.875 -234.0625 C 904.94281 -234.58282 906.43525 -234.75823 907.15625 -235 C 907.89337 -235.24714 908.95435 -235.58623 909.59375 -236.125 C 911.64375 -235.78947 913.56745 -235.72704 915.09375 -235.90625 C 918.23595 -236.27521 920.27375 -236.46561 922.28125 -236.6875 C 923.89207 -236.86552 924.5459 -237.2957 925.3125 -237.53125 C 925.55341 -237.61677 925.80655 -237.68685 926.09375 -237.71875 C 927.24345 -237.84647 928.39505 -237.3721 932.46875 -237.84375 C 936.54245 -238.3154 938.0278 -238.45435 938.75 -238.6875 C 939.46941 -238.91977 940.45025 -239.16096 941.09375 -239.65625 C 943.03005 -239.32279 944.8638 -239.25201 946.3125 -239.40625 C 949.45851 -239.7412 951.49 -239.92484 953.5 -240.125 C 955.50991 -240.32514 955.98415 -240.95139 957.09375 -241.0625 C 958.24485 -241.17778 959.39025 -240.69744 963.46875 -241.125 C 967.54725 -241.55256 969.05765 -241.68709 969.78125 -241.90625 C 970.52047 -242.13011 971.57685 -242.4195 972.21875 -242.9375 C 974.27575 -242.53883 976.2206 -242.4441 977.75 -242.59375 C 980.89871 -242.90185 982.9258 -243.067 984.9375 -243.25 C 986.55151 -243.39682 987.20055 -243.81055 987.96875 -244.03125 C 988.21005 -244.11211 988.4623 -244.16116 988.75 -244.1875 C 989.90211 -244.29295 991.0429 -243.79475 995.125 -244.1875 C 999.20711 -244.58025 1000.7139 -244.71834 1001.4375 -244.9375 C 1002.1584 -245.15583 1003.1371 -245.3852 1003.7812 -245.875 C 1005.7193 -245.52501 1007.5501 -245.42062 1009 -245.5625 C 1012.1487 -245.8706 1014.1758 -246.03575 1016.1875 -246.21875 C 1018.1991 -246.40174 1018.7017 -247.05677 1019.8125 -247.15625 C 1020.9648 -247.25948 1022.1047 -246.77142 1026.1875 -247.15625 C 1030.2704 -247.54107 1031.7762 -247.65725 1032.5 -247.875 C 1033.2393 -248.09743 1034.2956 -248.38949 1034.9375 -248.90625 C 1036.9949 -248.50448 1038.9404 -248.40292 1040.4688 -248.5625 C 1043.6153 -248.89102 1045.6458 -249.0852 1047.6562 -249.28125 C 1049.2692 -249.43854 1049.9219 -249.91273 1050.6875 -250.15625 C 1050.9282 -250.24429 1051.1507 -250.27762 1051.4375 -250.3125 C 1052.5858 -250.4522 1053.7542 -249.97259 1057.8125 -250.5625 C 1061.8708 -251.15242 1063.3743 -251.33964 1064.0938 -251.59375 C 1064.8104 -251.84691 1065.7684 -252.15182 1066.4062 -252.6875 C 1068.3259 -252.47556 1070.1262 -252.53609 1071.5625 -252.78125 C 1074.6816 -253.31365 1076.6741 -253.70986 1078.6562 -254.09375 C 1080.6383 -254.47762 1081.1305 -255.1334 1082.2188 -255.375 C 1083.3475 -255.62566 1084.489 -255.25871 1088.4688 -256.25 C 1092.4483 -257.24127 1093.8983 -257.6693 1094.5938 -258.03125 C 1095.316 -258.40725 1096.3555 -258.90183 1096.9688 -259.5625 C 1098.9317 -259.57454 1100.7625 -259.85355 1102.1875 -260.40625 C 1105.1387 -261.55085 1107.0607 -262.27567 1108.875 -263.15625 C 1110.3307 -263.86277 1111.1941 -264.85828 1111.4062 -265.15625 C 1111.6185 -265.4542 1111.5051 -265.8848 1111.5312 -265.90625 C 1111.5742 -265.94148 1111.8716 -266.00028 1112.0312 -266.34375 C 1112.8902 -268.19082 1114.3544 -271.97139 1114.4688 -272.65625 C 1114.5825 -273.33839 1114.6368 -274.00902 1114.6875 -274.40625 C 1114.7169 -274.63575 1114.5404 -275.28515 1114.5625 -275.34375 C 1114.5934 -275.42579 1114.8508 -275.59432 1114.9062 -275.84375 C 1115.1725 -277.04206 1114.9953 -278.05111 1114.7812 -279.46875 C 1114.5673 -280.88638 1113.8096 -284.08338 1113.1562 -284.9375 C 1112.4973 -285.79922 1111.9314 -285.94801 1111.4062 -285.9375 z "
2517 style="display:inline;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2518 id="path7423-8"
2519 d="m 1111.4062,-285.9375 -3.9374,1.875 c -0.041,0.0102 -0.1,0.0205 -0.125,0.0312 -0.4188,0.21285 -0.1647,0.10058 -0.6563,0.3125 -0.4861,0.20956 -1.7376,0.58419 -4.0937,1.46875 -3.3312,1.25058 -5.8043,2.14984 -7,3.0625 -1.5362,0.0213 -3.7205,0.23331 -5.6563,0.71875 -2.9815,0.74767 -4.8552,1.17401 -6.75,1.59375 -1.8948,0.41973 -1.6755,0.64219 -2.875,0.875 -1.2966,0.25167 -1.7214,-0.009 -5.4375,0.78125 -3.4899,0.74215 -8.8948,1.93107 -10.1562,2.6875 -1.584,-0.18078 -3.8675,-0.32178 -5.8438,-0.0312 -3.0404,0.44696 -4.9162,0.67276 -6.8438,0.90625 -0.6554,0.0794 -1.041,0.20078 -1.3437,0.28125 -0.4262,0.13166 -0.6858,0.26002 -1.375,0.34375 -1.3116,0.15937 -1.7622,-0.15683 -5.5313,0.28125 -3.5539,0.41309 -9.0054,1.27282 -10.25,1.9375 -1.599,-0.29729 -3.8577,-0.53419 -5.8437,-0.34375 -3.0588,0.29332 -4.972,0.48399 -6.9063,0.65625 -1.9342,0.17227 -1.6886,0.42237 -2.9062,0.53125 -1.3162,0.1177 -1.7598,-0.16363 -5.5312,0.25 -3.5421,0.38845 -9.0079,1.20927 -10.2813,1.875 -1.5989,-0.29469 -3.8872,-0.50701 -5.875,-0.3125 -3.05829,0.29925 -4.9412,0.48024 -6.875,0.65625 -0.65749,0.0598 -1.04005,0.17856 -1.34375,0.25 -0.4277,0.11896 -0.6835,0.21807 -1.375,0.28125 -1.316,0.12026 -1.75975,-0.19488 -5.53125,0.21875 -3.55619,0.39002 -9.0056,1.23916 -10.25,1.90625 -1.59869,-0.29418 -3.85985,-0.52372 -5.84375,-0.3125 -3.0557,0.32533 -4.97405,0.52624 -6.90625,0.71875 -1.93219,0.19251 -1.68975,0.44088 -2.90625,0.5625 -1.31488,0.13147 -1.76305,-0.16454 -5.53125,0.28125 -3.53889,0.41866 -8.9777,1.29217 -10.25,1.96875 -1.59759,-0.28104 -3.85995,-0.42043 -5.84375,-0.1875 -3.05198,0.35837 -4.945,0.56786 -6.875,0.78125 -0.65618,0.0726 -1.04065,0.17269 -1.34375,0.25 -0.42679,0.12723 -0.6849,0.2672 -1.375,0.34375 -1.31339,0.14569 -1.76735,-0.17402 -5.53125,0.3125 -3.54888,0.45876 -8.97865,1.41902 -10.21875,2.125 -1.59309,-0.24424 -3.8338,-0.38135 -5.8125,-0.125 -3.04759,0.39482 -4.9507,0.64845 -6.875,0.90625 -1.92429,0.25779 -1.7261,0.49353 -2.9375,0.65625 -1.30949,0.1759 -1.7472,-0.10438 -5.5,0.46875 -3.52429,0.53824 -8.9232,1.69917 -10.1875,2.4375 -1.58749,-0.20354 -3.8455,-0.25473 -5.8125,0.0937 -3.02619,0.53612 -4.8989,0.86169 -6.8125,1.1875 -0.65059,0.11077 -1.0137,0.27094 -1.3125,0.375 -0.42069,0.16488 -0.66345,0.3313 -1.34375,0.46875 -1.2947,0.26159 -1.7271,-0.006 -5.4375,0.8125 -3.49848,0.77195 -8.8459,2.38293 -10.0625,3.21875 -1.5629,-0.0774 -3.7575,0.0853 -5.6875,0.59375 -2.97238,0.78313 -4.8177,1.23209 -6.6875,1.75 -1.87,0.5179 -1.66665,0.76728 -2.84375,1.09375 -1.27249,0.3529 -1.69705,0.10709 -5.34375,1.1875 -3.42468,1.01463 -8.6494,2.93317 -9.875,3.84375 -1.53878,0.0127 -3.7198,0.27222 -5.625,0.875 -2.93098,0.92734 -4.75035,1.45842 -6.59375,2.0625 -0.62679,0.20538 -0.99165,0.39258 -1.28125,0.53125 -0.40758,0.21361 -0.6533,0.40875 -1.3125,0.625 -1.2545,0.41154 -1.68615,0.18904 -5.28125,1.4375 -3.38989,1.17717 -8.59495,3.2137 -9.78125,4.15625 -1.52388,0.0597 -3.65005,0.39487 -5.53125,1.0625 -2.89739,1.02829 -4.69905,1.67548 -6.53125,2.3125 -1.8322,0.63701 -1.62785,0.84854 -2.78125,1.25 -1.24679,0.43396 -1.66355,0.19972 -5.21875,1.5625 -3.3387,1.2798 -8.4871,3.48255 -9.6875,4.46875 -1.50718,0.10769 -3.6357,0.4988 -5.5,1.21875 -2.86818,1.1076 -4.6239,1.78156 -6.4375,2.46875 -0.6167,0.23363 -0.99645,0.44203 -1.28125,0.59375 10e-6,0 0,0.0295 0,0.0312 l -8,3.1875 1.8125,14.71875 c -0.25799,-0.0608 6.1875,3.3125 6.1875,3.3125 0.22641,-0.14468 0.44895,-0.27261 0.71875,-0.375 1.08052,-0.40998 2.1716,-0.21577 6,-1.6875 3.82852,-1.47174 5.22405,-2.00498 5.90625,-2.40625 0.67961,-0.39978 1.61175,-0.87937 2.21875,-1.53125 1.82692,-0.13775 3.5708,-0.49323 4.9375,-1 2.968,-1.10052 4.87535,-1.80619 6.78125,-2.46875 1.90581,-0.66254 2.35415,-1.41487 3.40625,-1.78125 1.09162,-0.38011 2.1951,-0.16538 6.0625,-1.53125 3.8674,-1.36586 5.28315,-1.82708 5.96875,-2.21875 0.70111,-0.40052 1.7008,-0.93298 2.3125,-1.59375 1.97081,-0.0547 3.81695,-0.38463 5.28125,-0.875 3.00152,-1.00508 4.92615,-1.62171 6.84375,-2.25 1.53861,-0.5041 2.17415,-1.04677 2.90625,-1.4375 0.23022,-0.13431 0.4759,-0.25373 0.75,-0.34375 1.09832,-0.36048 2.18145,-0.0814 6.09375,-1.3125 3.91231,-1.23113 5.366,-1.67295 6.0625,-2.03125 0.69391,-0.35697 1.6301,-0.79261 2.25,-1.40625 1.86521,-0.0227 3.63585,-0.26683 5.03125,-0.6875 3.0304,-0.91354 4.9924,-1.4301 6.9375,-1.96875 1.94512,-0.53864 2.4262,-1.26452 3.5,-1.5625 1.11402,-0.30915 2.22,0.007 6.1875,-1.03125 3.9675,-1.03863 5.4175,-1.43273 6.125,-1.75 0.7348,-0.32959 1.8139,-0.75372 2.4375,-1.375 1.99782,0.116 3.85745,-0.0201 5.34375,-0.375 3.07811,-0.735 5.0834,-1.10094 7.0625,-1.5 1.58791,-0.32018 2.2443,-0.79055 3,-1.09375 0.23751,-0.1068 0.4669,-0.19276 0.75,-0.25 1.13341,-0.22919 2.30465,0.20893 6.34375,-0.5 4.03942,-0.70893 5.50025,-0.92709 6.21875,-1.1875 0.71581,-0.25944 1.70435,-0.56724 2.34375,-1.09375 1.9242,0.23949 3.7479,0.22453 5.1875,0 3.12642,-0.48762 5.15455,-0.70067 7.15625,-0.96875 2.00171,-0.26807 2.48875,-0.94514 3.59375,-1.09375 1.14642,-0.15418 2.27585,0.30157 6.34375,-0.21875 4.06781,-0.52032 5.56025,-0.69573 6.28125,-0.9375 0.73712,-0.24714 1.7981,-0.58623 2.4375,-1.125 2.05,0.33553 3.9737,0.39796 5.5,0.21875 3.1422,-0.36896 5.18,-0.55936 7.1875,-0.78125 1.61082,-0.17802 2.26465,-0.6082 3.03125,-0.84375 0.24091,-0.0855 0.49405,-0.1556 0.78125,-0.1875 1.1497,-0.12772 2.3013,0.34665 6.375,-0.125 4.0737,-0.47165 5.55905,-0.6106 6.28125,-0.84375 0.71941,-0.23227 1.70025,-0.47346 2.34375,-0.96875 1.9363,0.33346 3.77005,0.40424 5.21875,0.25 3.14601,-0.33495 5.1775,-0.51859 7.1875,-0.71875 2.00991,-0.20014 2.48415,-0.82639 3.59375,-0.9375 1.1511,-0.11528 2.2965,0.36506 6.375,-0.0625 4.0785,-0.42756 5.5889,-0.56209 6.3125,-0.78125 0.73922,-0.22386 1.7956,-0.51325 2.4375,-1.03125 2.057,0.39867 4.00185,0.4934 5.53125,0.34375 3.14871,-0.3081 5.1758,-0.47325 7.1875,-0.65625 1.61401,-0.14682 2.26305,-0.56055 3.03125,-0.78125 0.2413,-0.0809 0.49355,-0.12991 0.78125,-0.15625 1.15211,-0.10545 2.2929,0.39275 6.375,0 4.08211,-0.39275 5.5889,-0.53084 6.3125,-0.75 0.7209,-0.21833 1.6996,-0.4477 2.3437,-0.9375 1.9381,0.34999 3.7689,0.45438 5.2188,0.3125 3.1487,-0.3081 5.1758,-0.47325 7.1875,-0.65625 2.0116,-0.18299 2.5142,-0.83802 3.625,-0.9375 1.1523,-0.10323 2.2922,0.38483 6.375,0 4.0829,-0.38482 5.5887,-0.501 6.3125,-0.71875 0.7393,-0.22243 1.7956,-0.51449 2.4375,-1.03125 2.0574,0.40177 4.0029,0.50333 5.5313,0.34375 3.1465,-0.32852 5.177,-0.5227 7.1874,-0.71875 1.613,-0.15729 2.2657,-0.63148 3.0313,-0.875 0.2407,-0.088 0.4632,-0.12137 0.75,-0.15625 1.1483,-0.1397 2.3167,0.33991 6.375,-0.25 4.0583,-0.58992 5.5618,-0.77714 6.2813,-1.03125 0.7166,-0.25316 1.6746,-0.55807 2.3124,-1.09375 1.9197,0.21194 3.72,0.15141 5.1563,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0937,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5626,-1.28125 1.1287,-0.25066 2.2702,0.11629 6.25,-0.875 3.9795,-0.99127 5.4295,-1.4193 6.125,-1.78125 0.7222,-0.376 1.7617,-0.87058 2.375,-1.53125 1.9629,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.1446 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70652 2.3191,-1.70203 2.5312,-2 0.2123,-0.29795 0.099,-0.72855 0.125,-0.75 0.043,-0.0352 0.3404,-0.094 0.5,-0.4375 0.859,-1.84707 2.3232,-5.62764 2.4376,-6.3125 0.1137,-0.68214 0.168,-1.35277 0.2187,-1.75 0.029,-0.2295 -0.1471,-0.8789 -0.125,-0.9375 0.031,-0.082 0.2883,-0.25057 0.3437,-0.5 0.2663,-1.19831 0.089,-2.20736 -0.125,-3.625 -0.2139,-1.41763 -0.9716,-4.61463 -1.625,-5.46875 -0.6589,-0.86172 -1.2248,-1.01051 -1.75,-1 z"
2520 transform="translate(0.08004571,-0.03125)" />
2521 </clipPath>
2522 <filter
2523 inkscape:collect="always"
2524 id="filter7001-5">
2525 <feGaussianBlur
2526 inkscape:collect="always"
2527 stdDeviation="1.1675612"
2528 id="feGaussianBlur7003-7" />
2529 </filter>
2530 <filter
2531 inkscape:collect="always"
2532 id="filter6949-4"
2533 x="-0.10294895"
2534 width="1.2058979"
2535 y="-0.34224695"
2536 height="1.6844939">
2537 <feGaussianBlur
2538 inkscape:collect="always"
2539 stdDeviation="1.1675612"
2540 id="feGaussianBlur6951-1" />
2541 </filter>
2542 <filter
2543 inkscape:collect="always"
2544 id="filter6961-8"
2545 x="-0.09919104"
2546 width="1.1983821"
2547 y="-0.22643611"
2548 height="1.4528722">
2549 <feGaussianBlur
2550 inkscape:collect="always"
2551 stdDeviation="1.1675612"
2552 id="feGaussianBlur6963-5" />
2553 </filter>
2554 <filter
2555 inkscape:collect="always"
2556 id="filter6957-9"
2557 x="-0.098213427"
2558 width="1.1964267"
2559 y="-0.19838208"
2560 height="1.3967642">
2561 <feGaussianBlur
2562 inkscape:collect="always"
2563 stdDeviation="1.1675612"
2564 id="feGaussianBlur6959-7" />
2565 </filter>
2566 <filter
2567 inkscape:collect="always"
2568 id="filter6997-5">
2569 <feGaussianBlur
2570 inkscape:collect="always"
2571 stdDeviation="1.1675612"
2572 id="feGaussianBlur6999-3" />
2573 </filter>
2574 <filter
2575 inkscape:collect="always"
2576 id="filter6953-8"
2577 x="-0.098320946"
2578 width="1.1966419"
2579 y="-0.19750816"
2580 height="1.3950163">
2581 <feGaussianBlur
2582 inkscape:collect="always"
2583 stdDeviation="1.1675612"
2584 id="feGaussianBlur6955-8" />
2585 </filter>
2586 <filter
2587 inkscape:collect="always"
2588 id="filter6993-3"
2589 x="-0.098213255"
2590 width="1.1964265"
2591 y="-0.19838208"
2592 height="1.3967642">
2593 <feGaussianBlur
2594 inkscape:collect="always"
2595 stdDeviation="1.1675612"
2596 id="feGaussianBlur6995-1" />
2597 </filter>
2598 <filter
2599 inkscape:collect="always"
2600 id="filter6989-8"
2601 x="-0.098428868"
2602 width="1.1968577"
2603 y="-0.20287035"
2604 height="1.4057407">
2605 <feGaussianBlur
2606 inkscape:collect="always"
2607 stdDeviation="1.1675612"
2608 id="feGaussianBlur6991-9" />
2609 </filter>
2610 <filter
2611 inkscape:collect="always"
2612 id="filter6985-6"
2613 x="-0.098428868"
2614 width="1.1968577"
2615 y="-0.20853186"
2616 height="1.4170637">
2617 <feGaussianBlur
2618 inkscape:collect="always"
2619 stdDeviation="1.1675612"
2620 id="feGaussianBlur6987-4" />
2621 </filter>
2622 <filter
2623 inkscape:collect="always"
2624 id="filter6965-3"
2625 x="-0.099081434"
2626 width="1.1981629"
2627 y="-0.22529824"
2628 height="1.4505965">
2629 <feGaussianBlur
2630 inkscape:collect="always"
2631 stdDeviation="1.1675612"
2632 id="feGaussianBlur6967-3" />
2633 </filter>
2634 <filter
2635 inkscape:collect="always"
2636 id="filter6981-3"
2637 x="-0.10052545"
2638 width="1.2010509"
2639 y="-0.2742162"
2640 height="1.5484324">
2641 <feGaussianBlur
2642 inkscape:collect="always"
2643 stdDeviation="1.1675612"
2644 id="feGaussianBlur6983-8" />
2645 </filter>
2646 <filter
2647 inkscape:collect="always"
2648 id="filter6977-6"
2649 x="-0.10224481"
2650 width="1.2044896"
2651 y="-0.32371372"
2652 height="1.6474274">
2653 <feGaussianBlur
2654 inkscape:collect="always"
2655 stdDeviation="1.1675612"
2656 id="feGaussianBlur6979-0" />
2657 </filter>
2658 <filter
2659 inkscape:collect="always"
2660 id="filter6973-4"
2661 x="-0.10330495"
2662 width="1.2066098"
2663 y="-0.36439717"
2664 height="1.7287945">
2665 <feGaussianBlur
2666 inkscape:collect="always"
2667 stdDeviation="1.1675612"
2668 id="feGaussianBlur6975-8" />
2669 </filter>
2670 <filter
2671 inkscape:collect="always"
2672 id="filter6969-8"
2673 x="-0.10450897"
2674 width="1.2090179"
2675 y="-0.40468886"
2676 height="1.8093777">
2677 <feGaussianBlur
2678 inkscape:collect="always"
2679 stdDeviation="1.1675612"
2680 id="feGaussianBlur6971-8" />
2681 </filter>
2682 <filter
2683 inkscape:collect="always"
2684 id="filter7345-9">
2685 <feGaussianBlur
2686 inkscape:collect="always"
2687 stdDeviation="1.7233839"
2688 id="feGaussianBlur7347-7" />
2689 </filter>
2690 <filter
2691 inkscape:collect="always"
2692 id="filter7333-7">
2693 <feGaussianBlur
2694 inkscape:collect="always"
2695 stdDeviation="0.35026836"
2696 id="feGaussianBlur7335-6" />
2697 </filter>
2698 <filter
2699 inkscape:collect="always"
2700 id="filter7285-4"
2701 x="-0.030884685"
2702 width="1.0617694"
2703 y="-0.10267408"
2704 height="1.2053483">
2705 <feGaussianBlur
2706 inkscape:collect="always"
2707 stdDeviation="0.35026836"
2708 id="feGaussianBlur7287-3" />
2709 </filter>
2710 <filter
2711 inkscape:collect="always"
2712 id="filter7289-0">
2713 <feGaussianBlur
2714 inkscape:collect="always"
2715 stdDeviation="0.35026836"
2716 id="feGaussianBlur7291-3" />
2717 </filter>
2718 <filter
2719 inkscape:collect="always"
2720 id="filter7293-0">
2721 <feGaussianBlur
2722 inkscape:collect="always"
2723 stdDeviation="0.35026836"
2724 id="feGaussianBlur7295-9" />
2725 </filter>
2726 <filter
2727 inkscape:collect="always"
2728 id="filter7337-2">
2729 <feGaussianBlur
2730 inkscape:collect="always"
2731 stdDeviation="0.35026836"
2732 id="feGaussianBlur7339-5" />
2733 </filter>
2734 <filter
2735 inkscape:collect="always"
2736 id="filter7297-4">
2737 <feGaussianBlur
2738 inkscape:collect="always"
2739 stdDeviation="0.35026836"
2740 id="feGaussianBlur7299-0" />
2741 </filter>
2742 <filter
2743 inkscape:collect="always"
2744 id="filter7301-5">
2745 <feGaussianBlur
2746 inkscape:collect="always"
2747 stdDeviation="0.35026836"
2748 id="feGaussianBlur7303-9" />
2749 </filter>
2750 <filter
2751 inkscape:collect="always"
2752 id="filter7305-4">
2753 <feGaussianBlur
2754 inkscape:collect="always"
2755 stdDeviation="0.35026836"
2756 id="feGaussianBlur7307-6" />
2757 </filter>
2758 <filter
2759 inkscape:collect="always"
2760 id="filter7309-9">
2761 <feGaussianBlur
2762 inkscape:collect="always"
2763 stdDeviation="0.35026836"
2764 id="feGaussianBlur7311-2" />
2765 </filter>
2766 <filter
2767 inkscape:collect="always"
2768 id="filter7313-2">
2769 <feGaussianBlur
2770 inkscape:collect="always"
2771 stdDeviation="0.35026836"
2772 id="feGaussianBlur7315-4" />
2773 </filter>
2774 <filter
2775 inkscape:collect="always"
2776 id="filter7317-7">
2777 <feGaussianBlur
2778 inkscape:collect="always"
2779 stdDeviation="0.35026836"
2780 id="feGaussianBlur7319-7" />
2781 </filter>
2782 <filter
2783 inkscape:collect="always"
2784 id="filter7321-5">
2785 <feGaussianBlur
2786 inkscape:collect="always"
2787 stdDeviation="0.35026836"
2788 id="feGaussianBlur7323-4" />
2789 </filter>
2790 <filter
2791 inkscape:collect="always"
2792 id="filter7329-8"
2793 x="-0.030991485"
2794 width="1.061983"
2795 y="-0.10931916"
2796 height="1.2186383">
2797 <feGaussianBlur
2798 inkscape:collect="always"
2799 stdDeviation="0.35026836"
2800 id="feGaussianBlur7331-1" />
2801 </filter>
2802 <filter
2803 inkscape:collect="always"
2804 id="filter7325-2"
2805 x="-0.031352691"
2806 width="1.0627054"
2807 y="-0.12140666"
2808 height="1.2428133">
2809 <feGaussianBlur
2810 inkscape:collect="always"
2811 stdDeviation="0.35026836"
2812 id="feGaussianBlur7327-8" />
2813 </filter>
2814 <filter
2815 inkscape:collect="always"
2816 id="filter9048-9"
2817 x="-0.40879121"
2818 width="1.8175824"
2819 y="-0.71538466"
2820 height="2.4307692">
2821 <feGaussianBlur
2822 inkscape:collect="always"
2823 stdDeviation="21.92031"
2824 id="feGaussianBlur9050-3" />
2825 </filter>
2826 <clipPath
2827 clipPathUnits="userSpaceOnUse"
2828 id="clipPath3631-6">
2829 <path
2830 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2831 d="m 760.16396,935.83377 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.91234 -3.78268,51.80084 -2.90046,70.65614 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.08394 38.76107,-114.49737 44.6608,-149.76859 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
2832 id="path3633-8"
2833 sodipodi:nodetypes="czzzzzzcccccccccczczz"
2834 inkscape:connector-curvature="0" />
2835 </clipPath>
2836 <clipPath
2837 clipPathUnits="userSpaceOnUse"
2838 id="clipPath3677-0">
2839 <path
2840 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2841 d="m 586.13271,997.98981 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.9123 -3.78268,51.8008 -2.90046,70.6561 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.0839 38.76107,-114.49733 44.6608,-149.76855 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
2842 id="path3679-2"
2843 sodipodi:nodetypes="czzzzzzcccccccccczczz"
2844 inkscape:connector-curvature="0" />
2845 </clipPath>
2846 <filter
2847 inkscape:collect="always"
2848 id="filter3898-1">
2849 <feGaussianBlur
2850 inkscape:collect="always"
2851 stdDeviation="10.892985"
2852 id="feGaussianBlur3900-0" />
2853 </filter>
2854 <clipPath
2855 clipPathUnits="userSpaceOnUse"
2856 id="clipPath3622-5">
2857 <path
2858 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2859 d="m 266.27183,924.57186 c -1.40727,18.80121 -1.1449,32.75103 2.08174,49.30328 3.22665,16.55234 16.40608,45.90736 20.3344,63.18376 3.92622,17.2671 2.69413,38.3096 -12.45944,51.1482 -15.31761,12.9774 -42.05127,21.5989 -67.8323,15.7338 -25.78106,-5.8653 -69.54907,-49.2234 -88.59019,-70.2283 C 100.6939,1012.6293 56.045183,939.86194 41.867508,909.43681 27.689836,879.01169 29.207903,872.71824 33.747793,863.90708 24.381071,839.38658 21.334081,813.84027 0.03533552,788.33044 30.360815,791.44488 43.915625,815.28677 60.161025,835.47019 54.631129,787.39416 42.10631,771.05369 31.787073,744.74589 c 29.994295,6.08166 50.57936,31.8724 63.979783,72.7125 9.554154,-3.91791 18.237764,-9.37294 30.187414,-9.0612 -11.2975,-41.6958 -17.94946,-69.91584 -36.687255,-101.06994 53.441965,5.67033 83.657025,80.63932 78.971425,87.9608 9.97797,-2.24399 19.00565,-6.53038 30.43653,-5.65167 -11.24896,-38.34702 -21.04781,-76.8679 -3.65971,-118.64818 0,0 48.28678,65.43687 54.38966,85.80577 6.10287,20.36891 1.51881,38.70052 1.51881,38.70052 0,0 16.95957,31.08529 20.29392,51.09413 3.3731,20.24135 -3.53269,59.10332 -4.94582,77.98324 z"
2860 id="path3624-1"
2861 sodipodi:nodetypes="czzzzzzcccccccccczczz"
2862 inkscape:connector-curvature="0" />
2863 </clipPath>
2864 <filter
2865 inkscape:collect="always"
2866 id="filter9024-1"
2867 x="-0.55453134"
2868 width="2.1090627"
2869 y="-0.51434779"
2870 height="2.0286956">
2871 <feGaussianBlur
2872 inkscape:collect="always"
2873 stdDeviation="20.912684"
2874 id="feGaussianBlur9026-0" />
2875 </filter>
2876 <filter
2877 inkscape:collect="always"
2878 id="filter9020-8"
2879 x="-0.32861114"
2880 width="1.6572223"
2881 y="-0.182"
2882 height="1.364">
2883 <feGaussianBlur
2884 inkscape:collect="always"
2885 stdDeviation="20.912684"
2886 id="feGaussianBlur9022-5" />
2887 </filter>
2888 <filter
2889 inkscape:collect="always"
2890 id="filter9044-0"
2891 x="-0.32631579"
2892 width="1.6526316"
2893 y="-0.84545463"
2894 height="2.6909094">
2895 <feGaussianBlur
2896 inkscape:collect="always"
2897 stdDeviation="21.92031"
2898 id="feGaussianBlur9046-6" />
2899 </filter>
2900 <clipPath
2901 clipPathUnits="userSpaceOnUse"
2902 id="clipPath4177-4">
2903 <path
2904 sodipodi:nodetypes="czzzzzzcccccccccczczz"
2905 id="path4179-6"
2906 d="m 586.13271,997.98981 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.9123 -3.78268,51.8008 -2.90046,70.6561 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.0839 38.76107,-114.49733 44.6608,-149.76855 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
2907 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2908 inkscape:connector-curvature="0" />
2909 </clipPath>
2910 <filter
2911 inkscape:collect="always"
2912 id="filter4105-2">
2913 <feGaussianBlur
2914 inkscape:collect="always"
2915 stdDeviation="3.8640966"
2916 id="feGaussianBlur4107-5" />
2917 </filter>
2918 <filter
2919 inkscape:collect="always"
2920 id="filter4130-8"
2921 x="-0.49509686"
2922 width="1.9901937"
2923 y="-0.26708817"
2924 height="1.5341763">
2925 <feGaussianBlur
2926 inkscape:collect="always"
2927 stdDeviation="10.730622"
2928 id="feGaussianBlur4132-6" />
2929 </filter>
2930 <filter
2931 inkscape:collect="always"
2932 id="filter4141-2"
2933 x="-0.40611032"
2934 width="1.8122206"
2935 y="-0.30260596"
2936 height="1.6052119">
2937 <feGaussianBlur
2938 inkscape:collect="always"
2939 stdDeviation="9.8586086"
2940 id="feGaussianBlur4143-8" />
2941 </filter>
2942 <clipPath
2943 clipPathUnits="userSpaceOnUse"
2944 id="clipPath8338-4">
2945 <path
2946 sodipodi:nodetypes="czzzzzzcccccccccczczz"
2947 id="path8340-7"
2948 d="m 266.27183,924.57185 c -1.40727,18.80122 -1.1449,32.75104 2.08174,49.30328 3.22666,16.55238 16.40609,45.90737 20.33441,63.18377 3.92621,17.2671 2.69413,38.3097 -12.45944,51.1482 -15.31761,12.9775 -42.05127,21.599 -67.8323,15.7338 -25.78106,-5.8653 -69.54908,-49.2234 -88.59019,-70.2283 C 100.6939,1012.6293 56.045182,939.86193 41.867507,909.4368 27.689835,879.01168 29.207902,872.71823 33.747792,863.90708 24.38107,839.38658 21.33408,813.84026 0.03533448,788.33044 30.360814,791.44487 43.915624,815.28676 60.161024,835.47019 54.631128,787.39416 42.106309,771.05368 31.787072,744.74589 c 29.994295,6.08165 50.57936,31.87239 63.979783,72.7125 9.554155,-3.91792 18.237765,-9.37294 30.187415,-9.0612 -11.2975,-41.6958 -17.94947,-69.91585 -36.687256,-101.06994 53.441966,5.67032 83.657026,80.63932 78.971426,87.9608 9.97797,-2.24399 19.00565,-6.53038 30.43653,-5.65167 -11.24897,-38.34703 -21.04782,-76.8679 -3.65971,-118.64819 0,0 48.28678,65.43688 54.38965,85.80578 6.10288,20.3689 1.51882,38.70051 1.51882,38.70051 0,0 16.95957,31.0853 20.29392,51.09414 3.3731,20.24134 -3.53269,59.10331 -4.94582,77.98323 z"
2949 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2950 inkscape:connector-curvature="0" />
2951 </clipPath>
2952 <filter
2953 inkscape:collect="always"
2954 id="filter8333-2">
2955 <feGaussianBlur
2956 inkscape:collect="always"
2957 stdDeviation="7.18"
2958 id="feGaussianBlur8335-4" />
2959 </filter>
2960 <clipPath
2961 clipPathUnits="userSpaceOnUse"
2962 id="clipPath8359-0">
2963 <path
2964 sodipodi:nodetypes="czzzzzzcccccccccczczz"
2965 id="path8361-6"
2966 d="m 266.27183,924.57185 c -1.40727,18.80122 -1.1449,32.75104 2.08174,49.30328 3.22666,16.55238 16.40609,45.90737 20.33441,63.18377 3.92621,17.2671 2.69413,38.3097 -12.45944,51.1482 -15.31761,12.9775 -42.05127,21.599 -67.8323,15.7338 -25.78106,-5.8653 -69.54908,-49.2234 -88.59019,-70.2283 C 100.6939,1012.6293 56.045182,939.86193 41.867507,909.4368 27.689835,879.01168 29.207902,872.71823 33.747792,863.90708 24.38107,839.38658 21.33408,813.84026 0.03533448,788.33044 30.360814,791.44487 43.915624,815.28676 60.161024,835.47019 54.631128,787.39416 42.106309,771.05368 31.787072,744.74589 c 29.994295,6.08165 50.57936,31.87239 63.979783,72.7125 9.554155,-3.91792 18.237765,-9.37294 30.187415,-9.0612 -11.2975,-41.6958 -17.94947,-69.91585 -36.687256,-101.06994 53.441966,5.67032 83.657026,80.63932 78.971426,87.9608 9.97797,-2.24399 19.00565,-6.53038 30.43653,-5.65167 -11.24897,-38.34703 -21.04782,-76.8679 -3.65971,-118.64819 0,0 48.28678,65.43688 54.38965,85.80578 6.10288,20.3689 1.51882,38.70051 1.51882,38.70051 0,0 16.95957,31.0853 20.29392,51.09414 3.3731,20.24134 -3.53269,59.10331 -4.94582,77.98323 z"
2967 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2968 inkscape:connector-curvature="0" />
2969 </clipPath>
2970 <filter
2971 inkscape:collect="always"
2972 id="filter8354-2">
2973 <feGaussianBlur
2974 inkscape:collect="always"
2975 stdDeviation="6.82"
2976 id="feGaussianBlur8356-9" />
2977 </filter>
2978 <clipPath
2979 clipPathUnits="userSpaceOnUse"
2980 id="clipPath3636-90">
2981 <path
2982 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
2983 d="m 760.16396,935.83377 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.91234 -3.78268,51.80084 -2.90046,70.65614 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.08394 38.76107,-114.49737 44.6608,-149.76859 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
2984 id="path3638-8"
2985 sodipodi:nodetypes="czzzzzzcccccccccczczz"
2986 inkscape:connector-curvature="0" />
2987 </clipPath>
2988 <filter
2989 inkscape:collect="always"
2990 id="filter4185-1">
2991 <feGaussianBlur
2992 inkscape:collect="always"
2993 stdDeviation="3.6164709"
2994 id="feGaussianBlur4187-3" />
2995 </filter>
2996 <clipPath
2997 clipPathUnits="userSpaceOnUse"
2998 id="clipPath8392-1">
2999 <path
3000 sodipodi:nodetypes="czzzzzzcccccccccczczz"
3001 id="path8394-1"
3002 d="m 760.16396,935.83377 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.91234 -3.78268,51.80084 -2.90046,70.65614 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.08394 38.76107,-114.49737 44.6608,-149.76859 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
3003 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3004 inkscape:connector-curvature="0" />
3005 </clipPath>
3006 <filter
3007 inkscape:collect="always"
3008 id="filter8379-0"
3009 x="-0.14413793"
3010 width="1.288276"
3011 y="-0.10278689"
3012 height="1.2055738">
3013 <feGaussianBlur
3014 inkscape:collect="always"
3015 stdDeviation="7.389266"
3016 id="feGaussianBlur8381-3" />
3017 </filter>
3018 <clipPath
3019 clipPathUnits="userSpaceOnUse"
3020 id="clipPath8417-4">
3021 <path
3022 sodipodi:nodetypes="czzzzzzcccccccccczczz"
3023 id="path8419-03"
3024 d="m 760.16396,935.83377 c 6.7941,18.90279 10.49369,33.29969 11.8903,51.21189 1.39662,17.91234 -3.78268,51.80084 -2.90046,70.65614 0.88175,18.8452 8.13369,40.099 27.34463,48.9689 19.41887,8.9658 49.31924,10.2113 74.11984,-3.1456 24.8006,-13.357 57.40102,-70.3255 70.97426,-97.3087 13.62385,-27.08394 38.76107,-114.49737 44.6608,-149.76859 5.89973,-35.27121 2.55054,-41.30077 -4.61748,-49.05549 2.6403,-27.84015 -1.49972,-54.93543 13.10969,-87.18618 -30.24901,11.8257 -37.38229,40.1607 -48.31889,65.50508 -8.00091,-50.93293 0.20916,-71.27319 3.31889,-101.21936 -29.06476,14.77791 -42.86151,47.11402 -45,92.85714 -10.92395,-1.3042 -21.39144,-4.43423 -33.57143,-0.71429 -0.26404,-46.02334 -1.46356,-76.88941 8.91063,-114.20649 -53.25547,21.02686 -62.94728,106.5941 -56.05349,112.77792 -10.88282,0.535 -21.37108,-1.2973 -32.85714,2.85715 0.63892,-42.57135 -0.26046,-84.90861 -30,-122.85715 0,0 -30.95806,80.92234 -31.42857,103.57143 -0.47051,22.64909 9.45159,40.16588 9.45159,40.16588 0,0 -8.56807,36.74051 -6.29859,58.23223 2.29585,21.74146 20.4429,59.67617 27.26542,78.65809 z"
3025 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3026 inkscape:connector-curvature="0" />
3027 </clipPath>
3028 <filter
3029 inkscape:collect="always"
3030 id="filter8404-9"
3031 x="-0.090268657"
3032 width="1.1805373"
3033 y="-0.10250848"
3034 height="1.205017">
3035 <feGaussianBlur
3036 inkscape:collect="always"
3037 stdDeviation="5.3457272"
3038 id="feGaussianBlur8406-1" />
3039 </filter>
3040 <linearGradient
3041 inkscape:collect="always"
3042 xlink:href="#linearGradient2843"
3043 id="linearGradient6951"
3044 gradientUnits="userSpaceOnUse"
3045 x1="347.89655"
3046 y1="1070.2124"
3047 x2="275.58191"
3048 y2="867.97992" />
3049 <linearGradient
3050 inkscape:collect="always"
3051 xlink:href="#linearGradient8964"
3052 id="linearGradient6953"
3053 gradientUnits="userSpaceOnUse"
3054 gradientTransform="translate(450.03125,73.843964)"
3055 x1="603.84064"
3056 y1="627.85303"
3057 x2="616.24396"
3058 y2="585.42664" />
3059 <linearGradient
3060 inkscape:collect="always"
3061 xlink:href="#linearGradient8952"
3062 id="linearGradient6955"
3063 gradientUnits="userSpaceOnUse"
3064 gradientTransform="translate(450.03125,73.843964)"
3065 x1="609.31244"
3066 y1="239.46866"
3067 x2="560.83142"
3068 y2="262.86206" />
3069 <linearGradient
3070 inkscape:collect="always"
3071 xlink:href="#linearGradient3961"
3072 id="linearGradient6957"
3073 gradientUnits="userSpaceOnUse"
3074 gradientTransform="translate(450.03125,73.843964)"
3075 x1="398.21429"
3076 y1="343.52289"
3077 x2="379.28571"
3078 y2="265.30862" />
3079 <linearGradient
3080 inkscape:collect="always"
3081 xlink:href="#linearGradient4084"
3082 id="linearGradient6959"
3083 gradientUnits="userSpaceOnUse"
3084 x1="182.35046"
3085 y1="256.11136"
3086 x2="145.53348"
3087 y2="542.20502" />
3088 <linearGradient
3089 inkscape:collect="always"
3090 xlink:href="#linearGradient4084"
3091 id="linearGradient6961"
3092 gradientUnits="userSpaceOnUse"
3093 x1="182.35046"
3094 y1="256.11136"
3095 x2="145.53348"
3096 y2="542.20502" />
3097 <linearGradient
3098 inkscape:collect="always"
3099 xlink:href="#linearGradient4478"
3100 id="linearGradient6963"
3101 gradientUnits="userSpaceOnUse"
3102 x1="412.08926"
3103 y1="404.91574"
3104 x2="417.375"
3105 y2="401.82648" />
3106 <linearGradient
3107 inkscape:collect="always"
3108 xlink:href="#linearGradient4478"
3109 id="linearGradient6965"
3110 gradientUnits="userSpaceOnUse"
3111 x1="411.91071"
3112 y1="404.91577"
3113 x2="417.375"
3114 y2="401.82648" />
3115 <linearGradient
3116 inkscape:collect="always"
3117 xlink:href="#linearGradient4478"
3118 id="linearGradient6967"
3119 gradientUnits="userSpaceOnUse"
3120 x1="411.91071"
3121 y1="405.54077"
3122 x2="417.375"
3123 y2="401.82648" />
3124 <linearGradient
3125 inkscape:collect="always"
3126 xlink:href="#linearGradient4478"
3127 id="linearGradient6969"
3128 gradientUnits="userSpaceOnUse"
3129 x1="412.08926"
3130 y1="405.54077"
3131 x2="417.375"
3132 y2="401.82648" />
3133 <linearGradient
3134 inkscape:collect="always"
3135 xlink:href="#linearGradient4478"
3136 id="linearGradient6971"
3137 gradientUnits="userSpaceOnUse"
3138 x1="411.73212"
3139 y1="405.54077"
3140 x2="417.375"
3141 y2="401.82648" />
3142 <linearGradient
3143 inkscape:collect="always"
3144 xlink:href="#linearGradient3660"
3145 id="linearGradient6973"
3146 gradientUnits="userSpaceOnUse"
3147 x1="1255.7386"
3148 y1="667.09216"
3149 x2="893.69995"
3150 y2="858.01099" />
3151 <clipPath
3152 clipPathUnits="userSpaceOnUse"
3153 id="clipPath6975">
3154 <rect
3155 id="rect6977"
3156 width="440"
3157 height="376"
3158 x="547.99994"
3159 y="205.32277"
3160 style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke:#f8d615;stroke-width:18;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new" />
3161 </clipPath>
3162 <marker
3163 inkscape:stockid="Arrow1Send"
3164 orient="auto"
3165 refY="0"
3166 refX="0"
3167 id="Arrow1Send-4"
3168 style="overflow:visible"
3169 inkscape:isstock="true">
3170 <path
3171 inkscape:connector-curvature="0"
3172 id="path7188-9"
3173 d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
3174 style="fill:#f8d615;fill-opacity:1;fill-rule:evenodd;stroke:#f8d615;stroke-width:1pt;stroke-opacity:1"
3175 transform="matrix(-0.2,0,0,-0.2,-1.2,0)" />
3176 </marker>
3177 </defs>
3178 <metadata
3179 id="metadata7">
3180 <rdf:RDF>
3181 <cc:Work
3182 rdf:about="">
3183 <dc:format>image/svg+xml</dc:format>
3184 <dc:type
3185 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
3186 <dc:title></dc:title>
3187 </cc:Work>
3188 </rdf:RDF>
3189 </metadata>
3190 <g
3191 inkscape:groupmode="layer"
3192 id="layer1"
3193 inkscape:label="Shadow"
3194 transform="translate(48.571445,195.53053)" />
3195 <g
3196 inkscape:groupmode="layer"
3197 id="layer20"
3198 inkscape:label="New Ear"
3199 transform="translate(48.571445,195.53053)" />
3200 <g
3201 inkscape:groupmode="layer"
3202 id="layer21"
3203 inkscape:label="Rendered2"
3204 style="display:inline"
3205 transform="translate(48.571445,195.53053)" />
3206 <g
3207 inkscape:groupmode="layer"
3208 id="layer15"
3209 inkscape:label="Feet"
3210 style="display:inline"
3211 transform="translate(48.571445,195.53053)" />
3212 <g
3213 inkscape:groupmode="layer"
3214 id="layer16"
3215 inkscape:label="Left Foot"
3216 style="display:inline"
3217 transform="translate(48.571445,195.53053)">
3218 <rect
3219 style="display:inline;opacity:1;fill:#a8a8a8;fill-opacity:1;stroke:#000000;stroke-width:20.89992332;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
3220 id="rect6676-3-7-5"
3221 width="1876.7191"
3222 height="1562.9667"
3223 x="-38.121483"
3224 y="-86.153076" />
3225 <rect
3226 style="display:inline;opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:20.92477036;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
3227 id="rect6676-3-7"
3228 width="1878.7875"
3229 height="1564.9603"
3230 x="2288.5129"
3231 y="-84.10511" />
3232 <rect
3233 style="display:inline;opacity:1;fill:#a8a8a8;fill-opacity:1;stroke:#f83615;stroke-width:20.39127541;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;enable-background:new"
3234 id="rect6676-3"
3235 width="1833.4282"
3236 height="1522.9458"
3237 x="2309.7717"
3238 y="-62.567806" />
3239 <g
3240 id="g4303">
3241 <path
3242 inkscape:export-ydpi="142.10527"
3243 inkscape:export-xdpi="142.10527"
3244 inkscape:export-filename="/home/cheeseness/Documents/LCA09/mascot/tuz_new.png"
3245 transform="matrix(10.726753,0,0,10.726753,-2882.1235,-4565.4583)"
3246 sodipodi:nodetypes="cccccccccsccccccccccc"
3247 id="path10326"
3248 d="m 304.64285,526.6479 c -10,0.35715 -18.21428,2.85714 -18.21428,2.85714 l 7.5,6.07143 10.35714,3.57143 16.07143,0.35714 22.5,-5.35714 7.85714,1.07143 20.35715,-2.14286 -10.35715,6.78572 c 5.45923,-1.02361 17.39329,3.56911 9.64286,5.35714 -1.74,0.40142 13.92857,-4.64285 13.92857,-4.64285 l 2.5,-4.64287 3.57143,-9.28571 11.42857,0 18.21428,-4.64286 3.57144,-4.99999 -16.07144,1.07142 -12.14285,2.14286 -14.64286,-5 -70.6921,16.70774 -5.37933,-5.27917 z"
3249 style="display:inline;opacity:0.5;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter11361);enable-background:new"
3250 inkscape:connector-curvature="0" />
3251 <g
3252 transform="matrix(0.71084,-0.1937433,0.262963,0.9648058,503.68027,136.48399)"
3253 id="g7882"
3254 style="display:inline;opacity:1;enable-background:new">
3255 <path
3256 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient7904);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3257 d="m 245.12255,100.05344 c 0,0 -47.12811,-31.646921 -67.21465,-35.800939 -20.03792,-4.143963 -38.4729,-3.317578 -51.93364,13.607323 -13.46074,16.924901 -12.07739,61.265196 -13.53554,86.969546 -1.45815,25.70435 2.54945,70.17701 17.6046,88.66552 15.05516,18.4885 45.88634,13.58502 49.92695,21.4137 2.21283,4.28736 65.15228,-174.85515 65.15228,-174.85515 z"
3258 id="path7876"
3259 sodipodi:nodetypes="czzzzcc"
3260 inkscape:connector-curvature="0" />
3261 <path
3262 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient7906);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3263 d="m 135.37935,82.017807 c 0,0 26.34355,1.938783 37.63307,13.903188 11.41494,12.097335 13.73457,21.331515 15.29586,37.734585 1.56337,16.42499 -0.84957,28.41812 -7.81382,36.03734 -6.96425,7.61922 -1.00429,19.58332 -25.91605,12.07107 -24.91176,-7.51225 -27.03224,-27.78298 -26.51523,-46.30475 0.51721,-18.52898 7.31617,-53.441433 7.31617,-53.441433 z"
3264 id="path7878"
3265 sodipodi:nodetypes="czzzzzc"
3266 inkscape:connector-curvature="0" />
3267 <path
3268 style="display:inline;opacity:1;fill:url(#radialGradient7908);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3269 d="m 135.648,81.927211 c 0,0 -4.64465,16.365075 0.58825,28.563099 5.48794,12.79254 27.22425,44.26007 27.22425,54.65565 l 22.65625,-5 c 2.54218,-6.96644 3.21052,-15.75206 2.1875,-26.5 -1.56129,-16.40307 -3.8663,-25.62141 -15.28125,-37.718749 -9.65488,-10.232047 -31.59311,-13.374857 -37.375,-14 z"
3270 id="path7880"
3271 sodipodi:nodetypes="czccssc"
3272 inkscape:connector-curvature="0" />
3273 </g>
3274 <path
3275 sodipodi:nodetypes="czzzcczzcc"
3276 id="path7917"
3277 d="m 845.03125,1154.7776 c -4.28571,0.7143 -27.62815,3.6181 -57.85714,10 -30.22899,6.3819 -57.31395,4.9661 -135.78608,17.3296 -79.85178,12.5808 -94.06436,42.5423 -108.12225,47.0643 -14.70014,4.7286 -145.37739,-65.8225 -145.37739,-65.8225 l 4.28572,-94.2857 c 0,0 85.88551,-16.2009 112.14285,-33.5714 26.25735,-17.3705 45.58238,-49.66602 59.28572,-71.42861 13.70334,-21.76259 32.85714,-71.42858 32.85714,-71.42858 l 238.57143,262.14289 z"
3278 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3279 inkscape:connector-curvature="0" />
3280 <path
3281 transform="translate(276,136)"
3282 sodipodi:nodetypes="ccccc"
3283 clip-path="url(#clipPath8658)"
3284 id="path7919"
3285 d="m 332.34019,898.38549 -32.73181,-61.29956 -37.61734,45.10646 c 2.17675,1.31711 5.77425,-20.85603 45.6004,-64.41708 l 24.74875,80.61018 z"
3286 style="display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8888);enable-background:accumulate"
3287 inkscape:connector-curvature="0" />
3288 <path
3289 transform="translate(276,136)"
3290 sodipodi:nodetypes="cccccc"
3291 clip-path="url(#clipPath2833)"
3292 id="path7923"
3293 d="m 200.81833,863.03015 146.3711,-51.61879 243.95184,226.27414 -241.83052,140.0072 -181.01934,-87.6813 32.52692,-226.98125 z"
3294 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient2841);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8892);enable-background:accumulate"
3295 inkscape:connector-curvature="0" />
3296 <path
3297 sodipodi:nodetypes="czzcczcc"
3298 id="path7921"
3299 d="m 642.88839,640.13471 c 0,0 -29.55406,40.57305 -47.85714,74.28571 -18.30309,33.71267 -58.62109,126.35694 -70.35714,171.07143 -11.7594,44.80344 -62.5,123.57145 -62.5,123.57145 l 76.07143,18.2143 c 0,0 11.80712,-12.8234 31.07142,-46.07146 19.2643,-33.24808 60.35715,-138.57143 60.35715,-138.57143 l 13.21428,-202.5 z"
3300 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#0f0f0f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3301 inkscape:connector-curvature="0" />
3302 <path
3303 transform="translate(276,136)"
3304 clip-path="url(#clipPath3665)"
3305 sodipodi:nodetypes="ccccccc"
3306 id="path7925"
3307 d="m 430.28131,381.94122 c -7.07106,2.82843 -236.18124,32.15181 -236.18124,32.15181 l -39.63961,359.83304 90.19849,92.63961 52.3259,-114.5513 100.46804,-186.39192 32.82842,-183.68124 z"
3308 style="display:inline;overflow:visible;visibility:visible;opacity:0.4;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8856);enable-background:accumulate"
3309 inkscape:connector-curvature="0" />
3310 <path
3311 sodipodi:nodetypes="czzzzcc"
3312 id="path7927"
3313 d="m 969.67051,1164.0346 c 0,0 23.25628,11.3937 36.06779,20.4761 12.6974,9.0015 29.4724,24.6491 41.6924,37.3605 12.3055,12.8002 20.1127,22.5987 41.5327,24.1608 21.4322,1.5629 53.2824,-8.7876 73.296,-24.6642 20.0135,-15.8766 45.6469,-69.2328 45.6469,-69.2328 l -127.1608,-143.0717"
3314 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3315 inkscape:connector-curvature="0" />
3316 <path
3317 transform="translate(276,136)"
3318 sodipodi:nodetypes="ccccc"
3319 clip-path="url(#clipPath8642)"
3320 id="path7929"
3321 d="M 331.34019,641.50471 216.17367,835.36467 260.2153,925.96265 357.79603,732.21539 331.34019,641.50471 Z"
3322 style="display:inline;overflow:visible;visibility:visible;opacity:0.75;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8860);enable-background:accumulate"
3323 inkscape:connector-curvature="0" />
3324 <g
3325 inkscape:transform-center-y="-28.255779"
3326 inkscape:transform-center-x="-347.89063"
3327 transform="matrix(0.9934486,0.1142802,-0.1142802,0.9934486,-9.24324,588.09054)"
3328 id="g7931"
3329 style="display:inline;opacity:1;enable-background:new">
3330 <path
3331 id="path7933"
3332 d="m 1049.205,-282.26672 -0.09,0.008 c -1.3874,0.88445 -6.6033,1.6072 -6.629,9.52344 -0.024,7.42525 15.0129,17.09146 17.1563,18.09375 1.7302,0.80909 3.5916,1.40876 5.4063,1.71875 l 1.4374,0.21875 c 1.9197,0.21194 3.72,0.15141 5.1563,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0937,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5626,-1.28125 1.1287,-0.25066 2.2702,0.11629 6.25,-0.875 3.9795,-0.99128 5.4294,-1.4193 6.125,-1.78125 0.7222,-0.37601 1.7617,-0.87058 2.375,-1.53125 1.9629,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.14461 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70653 2.3191,-1.70203 2.5312,-2 0.2123,-0.29796 0.099,-0.72855 0.125,-0.75 0.043,-0.0352 0.3405,-0.094 0.5,-0.4375 0.859,-1.84708 2.3232,-5.62764 2.4376,-6.3125 0.1137,-0.68215 0.168,-1.35277 0.2187,-1.75 0.029,-0.22951 -0.1471,-0.8789 -0.125,-0.9375 0.031,-0.082 0.2883,-0.25057 0.3437,-0.5 0.2663,-1.19832 0.089,-2.20736 -0.125,-3.625 -0.2139,-1.41764 -0.9716,-4.61463 -1.625,-5.46875 -0.4194,-0.54857 -0.7993,-0.7925 -1.1562,-0.90625 -0.067,-0.0173 -0.1239,-0.0467 -0.1875,-0.0625 -0.021,-0.004 -0.042,0.003 -0.062,0 -0.3116,-0.0755 -0.6085,-0.15867 -1.1562,-0.21875 -0.9855,-0.10812 -2.4247,-0.2594 -3.9688,-0.25 -0.5147,0.003 -1.0371,0.0476 -1.5625,0.0937 -3.5589,0.31228 -9.0098,0.99108 -10.2187,1.625 -1.6331,-0.33402 -3.9482,-0.61223 -5.9376,-0.46875 -3.064,0.22097 -4.9677,0.34219 -6.9062,0.46875 -1.9384,0.12655 -1.6861,0.38864 -2.9062,0.46875 -1.3191,0.0866 -1.7869,-0.22325 -5.5626,0.0937 -3.5457,0.29772 -8.9806,0.99317 -10.2187,1.625 -1.6334,-0.33451 -3.9459,-0.61239 -5.9375,-0.46875 -3.0642,0.22098 -4.9678,0.37344 -6.9062,0.5 -0.6592,0.043 -1.0424,0.12393 -1.3438,0.1875 z"
3333 style="display:inline;opacity:1;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3334 inkscape:connector-curvature="0" />
3335 <g
3336 transform="matrix(0.9975712,-0.06965428,0.06965428,0.9975712,872.72062,140.02502)"
3337 id="g7935"
3338 style="display:inline;filter:url(#filter7610);enable-background:new"
3339 clip-path="url(#clipPath7616)">
3340 <path
3341 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3342 d="m 229.94262,-409.12268 c -3.55781,0.05 -9.0242,0.36009 -10.30334,0.90414 -1.60609,-0.44747 -3.90316,-0.88131 -5.89995,-0.87674 -3.07199,0.007 -4.96469,0.009 -6.90727,0 -0.66047,-0.003 -1.04759,0.0672 -1.35267,0.10959 0,0 0,1.09593 0,1.09593 0.11972,-0.17947 0.39252,-0.69046 0.94975,-0.76715 0.74758,-0.10289 5.16928,-0.15123 7.31019,-0.1096 1.7746,0.0345 4.45523,0.27427 6.38921,0.95895 0.3214,0.11378 0.61925,0.27378 0.89219,0.41097 1.96342,0.98693 7.94336,4.30154 7.94336,4.30154 0,0 -6.63275,-3.94768 -7.48287,-4.43853 -0.20331,-0.11739 -0.57464,-0.25769 -1.03609,-0.41098 1.22063,-0.44779 5.07597,-0.61971 7.82823,-0.71235 3.0245,-0.10182 3.34776,-0.0896 5.41069,0.19179 2.12931,0.29043 3.33851,0.60276 3.33851,0.60276 -1e-5,0 -0.0784,-0.64118 1.03609,-0.79455 0.74757,-0.10289 5.16929,-0.15123 7.31019,-0.1096 2.0695,0.0403 5.36605,0.40716 7.2814,1.36992 1.00332,0.50433 3.03564,1.56863 4.79535,2.53571 l 0.0956,-0.0194 c 0,0 -3.58034,-2.16242 -4.43047,-2.65327 -0.20331,-0.11739 -0.57463,-0.25769 -1.03609,-0.41098 1.22062,-0.44779 5.04719,-0.61971 7.79945,-0.71235 3.0245,-0.10182 3.34775,-0.0896 5.41069,0.19179 1.95316,0.2664 3.01292,0.53006 3.19461,0.57536 0,0 -0.0271,-0.31146 -0.0271,-0.31146 -0.40903,-0.13645 -0.71424,-0.23335 -1.40038,-0.35748 -1.30081,-0.23533 -3.39912,-0.60156 -5.50857,-0.56398 -3.57195,0.0636 -9.05328,0.35596 -10.30334,0.90414 -1.60583,-0.44695 -3.87662,-0.8813 -5.87117,-0.87674 -3.07199,0.007 -4.99348,0.009 -6.93605,0 -1.94256,-0.009 -1.71268,0.27907 -2.93558,0.27398 -1.32191,-0.005 -1.76612,-0.35463 -5.55459,-0.30138 0,0 0,0 0,0"
3343 id="path7937"
3344 sodipodi:nodetypes="ccssscsssscscsscsssccscssccsscssscc"
3345 inkscape:connector-curvature="0" />
3346 <path
3347 sodipodi:nodetypes="cssccsscc"
3348 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3349 d="m 206.1989,-407.47878 c 1.92021,0.81706 4.57715,2.19283 6.15897,3.39739 1.58184,1.20456 2.90757,1.77368 5.55459,3.91795 0.88557,0.71738 1.74865,1.34985 2.59193,1.92174 l 0.54057,-0.19011 c -0.71323,-0.48339 -1.46776,-1.02031 -2.26909,-1.62203 -2.82223,-2.11921 -3.62655,-2.80973 -6.01507,-4.27414 -2.38854,-1.4644 -4.09948,-2.36576 -6.5619,-3.1508 0,0 0,0 0,0"
3350 id="path7939"
3351 inkscape:connector-curvature="0" />
3352 <path
3353 sodipodi:nodetypes="csccscc"
3354 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3355 d="m 237.79963,-407.47878 c 1.92021,0.81706 4.60594,2.19283 6.18775,3.39739 0.81307,0.61916 1.55849,1.07042 2.45046,1.65401 l 0.649,-0.11666 c -0.79831,-0.57637 -1.57177,-1.09435 -2.69653,-1.78394 -2.38854,-1.4644 -4.12826,-2.36576 -6.59068,-3.1508 0,0 0,0 0,0"
3356 id="path7941"
3357 inkscape:connector-curvature="0" />
3358 </g>
3359 <g
3360 id="g7943"
3361 clip-path="url(#clipPath7606)">
3362 <path
3363 sodipodi:nodetypes="czzzzzzzzzzzzzz"
3364 id="path7945"
3365 d="m 1056.25,-278.80481 c 4.1446,-1.47877 10,3.125 10,3.125 0.899,0.28092 2.7251,-0.89447 2.6243,-1.68614 0,0 -1.5503,-1.86062 -0.3743,-2.93886 1.176,-1.07824 5.296,1.50738 7.5,1.625 2.204,0.11762 5.5621,-0.22941 7,-0.75 1.4379,-0.52059 1.1129,-1.42459 2.625,-1.75 1.5121,-0.32541 5.1189,1.03754 7.0605,1.16883 1.9416,0.13129 4.6481,0.33427 5.8145,-0.16883 1.1664,-0.5031 0.1782,-1.15921 1.875,-1.875 1.6968,-0.71579 7.7602,-0.95662 9.625,-0.125 1.8648,0.83162 1.8099,0.5192 2.625,3 0.8151,2.4808 7.4398,5.16285 -1.125,13.375 -8.5648,8.21215 -59.3779,13.78594 -65.625,2.75 -6.2471,-11.03594 6.2304,-14.27123 10.375,-15.75 z"
3366 style="display:inline;opacity:0.75;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7578);enable-background:new"
3367 inkscape:connector-curvature="0" />
3368 <path
3369 sodipodi:nodetypes="czzzzzzzzzzzzzz"
3370 id="path7947"
3371 d="m 1058.5,-275.42981 c 4.1446,-1.47877 10,3.125 10,3.125 0.899,0.28092 2.7251,-0.89447 2.6243,-1.68614 0,0 -1.5503,-1.86062 -0.3743,-2.93886 1.176,-1.07824 5.296,1.50738 7.5,1.625 2.204,0.11762 5.5621,-0.22941 7,-0.75 1.4379,-0.52059 1.1129,-1.42459 2.625,-1.75 1.5121,-0.32541 5.1189,1.03754 7.0605,1.16883 1.9416,0.13129 4.6481,0.33427 5.8145,-0.16883 1.1664,-0.5031 0.1782,-1.15921 1.875,-1.875 1.6968,-0.71579 7.7602,-0.95662 9.625,-0.125 1.8648,0.83162 1.8099,0.5192 2.625,3 0.8151,2.4808 7.4398,5.16285 -1.125,13.375 -8.5648,8.21215 -59.3779,13.78594 -65.625,2.75 -6.2471,-11.03594 6.2304,-14.27123 10.375,-15.75 z"
3372 style="display:inline;opacity:0.75;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7594);enable-background:new"
3373 inkscape:connector-curvature="0" />
3374 </g>
3375 </g>
3376 <path
3377 sodipodi:nodetypes="cscccccccccccc"
3378 id="path7949"
3379 d="m 628.24553,347.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.55405 36.34702,-65.29583 116.94091,-84.69468 185.93466,-91.46542 86.92239,-11.0168 184.91267,17.94007 233.37138,95.40128 54.124,75.7333 56.6747,172.53912 80.612,259.52795 29.4378,127.1276 54.7791,256.21414 60.3922,386.85035 -3.0634,78.18185 -8.4263,165.18417 -60.5032,228.13417 -48.0265,50.3574 -122.7864,50.053 -187.06985,59.0023 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.1982 -64.77564,-37.94 -95.73019,-113.47867 -97.2794,-186.01962 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z"
3380 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#101414;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3381 inkscape:connector-curvature="0" />
3382 <path
3383 transform="translate(276,136)"
3384 clip-path="url(#clipPath8616)"
3385 sodipodi:nodetypes="ccccczzzcc"
3386 id="path7951"
3387 d="m 311.83409,415.43155 9.8995,121.62237 -60.10408,136.47161 15.55635,174.65537 c 15.61326,61.8792 32.18545,98.66905 74.37615,117.05383 4.31911,-36.23998 -38.61152,-142.95988 -39.24264,-189.11984 -0.63145,-46.18445 10.83034,-108.60786 30.67767,-158.29647 20.04835,-50.19188 36.89674,-44.84642 42.12489,-92.59293 5.22815,-47.74651 -17.4264,-149.39192 -17.4264,-149.39192 l -55.86144,39.59798 z"
3388 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8940);enable-background:accumulate"
3389 inkscape:connector-curvature="0" />
3390 <path
3391 sodipodi:nodetypes="czcc"
3392 id="path7953"
3393 d="m 1010.0312,655.49186 c 0,0 16.7552,37.01806 28.7015,53.95395 11.9462,16.93589 52.7271,56.04605 52.7271,56.04605 l 52.5972,-127.58975"
3394 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient8970);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3395 inkscape:connector-curvature="0" />
3396 <path
3397 transform="translate(276,136)"
3398 clip-path="url(#clipPath8209)"
3399 sodipodi:nodetypes="cccc"
3400 id="path7955"
3401 d="m 730.31998,536.56864 c 0,8.48528 42.54774,58.46803 42.54774,58.46803 l 12.60659,-28.76954 -55.15433,-29.69849 z"
3402 style="display:inline;overflow:visible;visibility:visible;opacity:0.07999998;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8822);enable-background:accumulate"
3403 inkscape:connector-curvature="0" />
3404 <g
3405 clip-path="url(#clipPath3998)"
3406 id="g7957"
3407 style="display:inline;opacity:1;enable-background:new"
3408 transform="translate(450.03125,73.843964)">
3409 <g
3410 id="g7959"
3411 style="filter:url(#filter3677)"
3412 transform="translate(-174.03125,62.156036)">
3413 <g
3414 style="filter:url(#filter3785)"
3415 id="g7961">
3416 <path
3417 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3418 d="m 425.88244,476.99186 c 10.80543,-1.47866 24.74401,3.35451 44.64286,3.21428 19.89885,-0.14023 57.45322,-16.91122 82.14285,-17.14286 24.68963,-0.23164 62.7517,12.28406 79.28572,15 16.53402,2.71594 22.84832,-0.15852 27.49999,7.85715 4.65167,8.01567 1.92671,10.74724 -10.35714,20.71429 -12.28385,9.96705 -40.78968,12.63632 -66.07143,12.85714 -25.28234,0.22082 -70.38129,7.07852 -95.35714,3.92856 -24.97585,-3.14996 -56.93756,-7.82267 -68.92857,-17.85714 -11.99101,-10.03447 -19.85084,-16.73182 -17.5,-23.92857 2.35084,-7.19675 13.83743,-3.16419 24.64286,-4.64285 z"
3419 id="path7963"
3420 sodipodi:nodetypes="czzzzzzzzzz"
3421 inkscape:connector-curvature="0" />
3422 <rect
3423 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3424 id="rect7965"
3425 width="381.83765"
3426 height="181.01935"
3427 x="343.6539"
3428 y="412.60312" />
3429 </g>
3430 <g
3431 style="filter:url(#filter3785)"
3432 id="g7967">
3433 <path
3434 transform="translate(174.03125,-62.156036)"
3435 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3436 d="m 687.14286,452.36218 c -10.46169,9.71443 -86.9796,19.00514 -100.71429,29.28572 -13.73469,10.28058 -14.75252,12.88826 -12.14286,20 2.60966,7.11174 6.54527,9.40572 25.71429,8.57142 19.16902,-0.8343 98.57143,-27.62172 98.57143,-21.42857 l -11.42857,-36.42857 z"
3437 id="path7969"
3438 sodipodi:nodetypes="czzzcc"
3439 inkscape:connector-curvature="0" />
3440 <rect
3441 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3442 id="rect7971"
3443 width="207.8894"
3444 height="162.63455"
3445 x="702.86414"
3446 y="344.82138" />
3447 </g>
3448 </g>
3449 <g
3450 id="g7973"
3451 style="display:inline;opacity:0.18000004;enable-background:new"
3452 transform="translate(-174.03125,62.156036)">
3453 <g
3454 style="filter:url(#filter3785)"
3455 id="g7975">
3456 <path
3457 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3458 d="m 425.88244,476.99186 c 10.80543,-1.47866 24.74401,3.35451 44.64286,3.21428 19.89885,-0.14023 57.45322,-16.91122 82.14285,-17.14286 24.68963,-0.23164 62.7517,12.28406 79.28572,15 16.53402,2.71594 22.84832,-0.15852 27.49999,7.85715 4.65167,8.01567 1.92671,10.74724 -10.35714,20.71429 -12.28385,9.96705 -40.78968,12.63632 -66.07143,12.85714 -25.28234,0.22082 -70.38129,7.07852 -95.35714,3.92856 -24.97585,-3.14996 -56.93756,-7.82267 -68.92857,-17.85714 -11.99101,-10.03447 -19.85084,-16.73182 -17.5,-23.92857 2.35084,-7.19675 13.83743,-3.16419 24.64286,-4.64285 z"
3459 id="path7977"
3460 sodipodi:nodetypes="czzzzzzzzzz"
3461 inkscape:connector-curvature="0" />
3462 <rect
3463 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3464 id="rect7979"
3465 width="381.83765"
3466 height="181.01935"
3467 x="343.6539"
3468 y="412.60312" />
3469 </g>
3470 <g
3471 style="filter:url(#filter3785)"
3472 id="g7981">
3473 <path
3474 transform="translate(174.03125,-62.156036)"
3475 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3476 d="m 687.14286,452.36218 c -10.46169,9.71443 -86.9796,19.00514 -100.71429,29.28572 -13.73469,10.28058 -14.75252,12.88826 -12.14286,20 2.60966,7.11174 6.54527,9.40572 25.71429,8.57142 19.16902,-0.8343 98.57143,-27.62172 98.57143,-21.42857 l -11.42857,-36.42857 z"
3477 id="path7983"
3478 sodipodi:nodetypes="czzzcc"
3479 inkscape:connector-curvature="0" />
3480 <rect
3481 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3482 id="rect7985"
3483 width="207.8894"
3484 height="162.63455"
3485 x="702.86414"
3486 y="344.82138" />
3487 </g>
3488 </g>
3489 </g>
3490 <path
3491 transform="translate(276,136)"
3492 sodipodi:nodetypes="cccccscc"
3493 clip-path="url(#clipPath8604)"
3494 id="path7987"
3495 d="M 582.65599,-7.4183011 695.79307,78.848726 804.68752,337.64981 842.87128,545.5392 963.07944,637.46308 c 0,0 -12.72793,-287.08535 -19.799,-313.95541 C 936.20938,296.63761 793.37381,-69.643698 793.37381,-69.643698 L 582.65599,-7.4183011 Z"
3496 style="display:inline;overflow:visible;visibility:visible;opacity:0.75;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8802);enable-background:accumulate"
3497 inkscape:connector-curvature="0" />
3498 <path
3499 sodipodi:nodetypes="czzzzzzc"
3500 id="path7989"
3501 d="m 964.13839,239.599 c 0,0 8.67732,10.89662 24.10715,11.96428 15.42986,1.06766 49.72166,-39.95267 70.17856,-52.14285 20.4793,-12.20353 47.0464,-26.60225 63.9286,-20.35714 16.8821,6.2451 22.1578,26.43609 27.8571,48.03571 5.6994,21.59961 6.7186,61.81389 -2.6785,92.85715 -9.3972,31.04325 -50.5033,73.10375 -65.3572,103.39285 -14.8539,30.2891 -11.6071,39.82143 -11.6071,39.82143"
3502 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient8958);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3503 inkscape:connector-curvature="0" />
3504 <path
3505 sodipodi:nodetypes="czzzzc"
3506 id="path7991"
3507 d="m 1124.4955,207.63471 c -15.8928,-0.89286 -49.7188,12.10583 -66.0714,24.28572 -16.4386,12.2439 -29.2209,24.1144 -29.2857,52.14285 -0.065,28.20604 13.1191,39.07641 29.1071,46.96429 15.988,7.88789 33.6862,7.11928 51.9643,-11.78571 18.2782,-18.905 14.2857,-111.60715 14.2857,-111.60715 z"
3508 style="display:inline;opacity:1;fill:url(#radialGradient3315);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3509 inkscape:connector-curvature="0" />
3510 <ellipse
3511 clip-path="url(#clipPath4100)"
3512 transform="matrix(0.9434749,-0.1239943,0.1440089,1.0957669,451.94827,134.5988)"
3513 id="path7993"
3514 style="display:inline;overflow:visible;visibility:visible;opacity:0.75;fill:url(#radialGradient3543);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4120);enable-background:accumulate"
3515 cx="385"
3516 cy="237.00504"
3517 rx="86.428574"
3518 ry="73.928574" />
3519 <path
3520 mask="url(#mask3684)"
3521 sodipodi:nodetypes="csczzc"
3522 id="path7995"
3523 d="m 527.60588,407.44884 c 0,0 -122.04144,38.40348 -187.51434,9.63181 -65.47289,-28.77166 -74.37725,-124.71847 -74.37725,-124.71847 0,0 73.38158,-80.50393 129.92078,-83.61476 55.82705,-3.07164 90.57386,20.14332 114.87001,65.85171 24.352,45.81348 17.1008,132.84971 17.1008,132.84971 z"
3524 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient3915);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3525 transform="translate(450.03125,73.843964)"
3526 inkscape:connector-curvature="0" />
3527 <path
3528 sodipodi:nodetypes="czcc"
3529 id="path7997"
3530 d="m 772.17411,393.349 c 0,0 36.21754,-27.38247 51.60714,-35.89286 15.17734,-8.39301 25.71428,-11.60714 35.89285,-11.60714 l -15.53571,66.96428"
3531 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient3959);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3532 inkscape:connector-curvature="0" />
3533 <circle
3534 transform="translate(449.49554,74.915393)"
3535 id="path7999"
3536 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient3933);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3537 cx="409.28571"
3538 cy="306.64789"
3539 r="36.25" />
3540 <path
3541 transform="translate(276,136)"
3542 clip-path="url(#clipPath8616)"
3543 sodipodi:nodetypes="cccccccccc"
3544 id="path8001"
3545 d="m 311.83409,415.43155 9.8995,121.62237 -60.10408,136.47161 15.55635,174.65537 c 15.61326,61.8792 32.18545,98.66905 74.37615,117.05383 4.31911,-36.23998 8.68161,-72.36764 -31.24264,-223.11984 l 17.67767,-69.29647 72.12489,-138.59293 -42.4264,-158.39192 -55.86144,39.59798 z"
3546 style="display:inline;overflow:visible;visibility:visible;opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8806);enable-background:accumulate"
3547 inkscape:connector-curvature="0" />
3548 <path
3549 sodipodi:nodetypes="czzcc"
3550 id="path8003"
3551 d="m 635.21025,581.13004 c -14.14214,12.72792 39.23347,34.58015 76.36753,24.04163 37.13406,-10.53852 104.64487,-35.56437 103.23759,-79.19596 -1.40728,-43.63158 -76.36753,-128.69343 -76.36753,-128.69343 L 635.21025,581.13004 Z"
3552 style="display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8826);enable-background:accumulate"
3553 inkscape:connector-curvature="0" />
3554 <circle
3555 transform="translate(449.67411,74.915393)"
3556 id="path8005"
3557 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient3991);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3558 cx="410"
3559 cy="306.64789"
3560 r="23.214285" />
3561 <circle
3562 transform="translate(451.99554,73.486821)"
3563 id="path8007"
3564 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter3981);enable-background:accumulate"
3565 cx="414.28571"
3566 cy="303.07648"
3567 r="7.5" />
3568 <path
3569 sodipodi:nodetypes="czzzczc"
3570 id="path8009"
3571 d="m 789.31696,478.349 c 0,0 7.02281,19.56859 -1.07143,35 -8.09424,15.43141 -42.32317,38.98822 -67.49999,50 -25.30972,11.06991 -85.473,32.96393 -101.78572,41.96428 -16.46148,9.08243 -18.21428,12.67857 -18.21428,12.67857 0,0 -7.14693,-19.06441 28.74999,-51.7857 36.17211,-32.97214 142.02712,-48.0495 159.82143,-87.85715 z"
3572 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4112);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3573 inkscape:connector-curvature="0" />
3574 <g
3575 transform="translate(780.74553,74.55825)"
3576 id="g8011"
3577 style="display:inline;opacity:1;enable-background:new">
3578 <path
3579 style="display:inline;opacity:1;fill:url(#radialGradient3585);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
3580 d="m 179.64286,267.36218 c -22.41044,39.70292 -60.6161,115.78029 -69.28571,149.64286 -8.64721,33.7751 -8.77199,66.41654 -0.35715,86.42858 8.3602,19.88213 26.16398,35.6328 40.71428,41.42856 -0.59638,-14.37587 14.37295,-43.28583 72.85715,-72.5 58.62627,-29.28514 78.38163,-27.13086 103.57142,-47.14286 25.63006,-20.36176 8.20587,-79.64664 3.21429,-93.92857 -4.99158,-14.28193 -1.23663,-3.37974 -1.94602,-5.09301 -10.68928,-25.81592 -34.21432,-54.4303 -64.48255,-64.54984 -30.26823,-10.11954 -65.01776,-4.84837 -84.28571,5.71428 z"
3581 id="path8013"
3582 sodipodi:nodetypes="czzczzzszc"
3583 clip-path="url(#clipPath3999)"
3584 transform="translate(-329.81481,0)"
3585 inkscape:connector-curvature="0" />
3586 <ellipse
3587 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4060);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3588 id="path8015"
3589 transform="matrix(0.8823874,0.4705236,-0.4705236,0.8823874,-166.62245,2.387362)"
3590 cx="183.57143"
3591 cy="338.07648"
3592 rx="64.715881"
3593 ry="134.00607" />
3594 <ellipse
3595 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4062);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3596 id="path8017"
3597 transform="matrix(0.8823874,0.4705236,-0.4705236,0.8823874,-162.19388,-18.755495)"
3598 cx="183.57143"
3599 cy="338.07648"
3600 rx="64.715881"
3601 ry="134.00607" />
3602 <path
3603 style="display:inline;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient3587);stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4079);enable-background:new"
3604 d="m 179.64286,267.36218 c -22.41044,39.70292 -60.6161,115.78029 -69.28571,149.64286 -8.64721,33.7751 -8.77199,66.41654 -0.35715,86.42858 8.3602,19.88213 26.16398,35.6328 40.71428,41.42856 -0.59638,-14.37587 14.37295,-43.28583 72.85715,-72.5 58.62627,-29.28514 78.38163,-27.13086 103.57142,-47.14286 25.63006,-20.36176 8.20587,-79.64664 3.21429,-93.92857 -4.99158,-14.28193 -1.23663,-3.37974 -1.94602,-5.09301 -10.68928,-25.81592 -34.21432,-54.4303 -64.48255,-64.54984 -30.26823,-10.11954 -65.01776,-4.84837 -84.28571,5.71428 z"
3605 id="path8019"
3606 sodipodi:nodetypes="czzczzzszc"
3607 clip-path="url(#clipPath3999)"
3608 transform="translate(-329.81481,3e-7)"
3609 inkscape:connector-curvature="0" />
3610 </g>
3611 <circle
3612 transform="translate(452.55663,72.581273)"
3613 id="path8021"
3614 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3615 cx="310.71429"
3616 cy="398.07648"
3617 r="19.704132" />
3618 <circle
3619 transform="translate(450.55663,72.581273)"
3620 id="path8023"
3621 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4056);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4082);stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4083);enable-background:accumulate"
3622 cx="310.71429"
3623 cy="398.07648"
3624 r="19.704132" />
3625 <circle
3626 transform="translate(450.55663,72.581273)"
3627 id="path8025"
3628 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4119);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3629 cx="310.71429"
3630 cy="398.07648"
3631 r="19.704132" />
3632 <ellipse
3633 inkscape:transform-center-y="-3.6935079"
3634 inkscape:transform-center-x="-47.231976"
3635 transform="matrix(0.9969564,-0.07796167,0.07796167,0.9969564,436.61877,125.29509)"
3636 id="path8027"
3637 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4868);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4002);enable-background:accumulate"
3638 cx="429.56738"
3639 cy="377.42877"
3640 rx="72.079735"
3641 ry="44.547726" />
3642 <ellipse
3643 inkscape:transform-center-y="-13.056625"
3644 inkscape:transform-center-x="-20.955902"
3645 transform="matrix(1.4357951,-0.06999104,0.06999104,1.4357951,235.18065,-63.86546)"
3646 id="path8029"
3647 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4876);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4010);enable-background:accumulate"
3648 cx="437.6991"
3649 cy="391.21735"
3650 rx="36.611931"
3651 ry="22.627417" />
3652 <g
3653 style="display:inline;opacity:1;filter:url(#filter4053);enable-background:new"
3654 id="g8031"
3655 transform="translate(450.03125,73.843964)">
3656 <circle
3657 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4484);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3658 id="path8033"
3659 cx="413.66071"
3660 cy="401.82648"
3661 r="3.2142856" />
3662 <circle
3663 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4486);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3664 id="path8035"
3665 transform="translate(13.125009,8.1249913)"
3666 cx="413.66071"
3667 cy="401.82648"
3668 r="3.2142856" />
3669 <circle
3670 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4488);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3671 id="path8037"
3672 transform="translate(32.946437,7.4999913)"
3673 cx="413.66071"
3674 cy="401.82648"
3675 r="3.2142856" />
3676 <circle
3677 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4490);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3678 id="path8039"
3679 transform="translate(24.910723,-10.267866)"
3680 cx="413.66071"
3681 cy="401.82648"
3682 r="3.2142856" />
3683 <circle
3684 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient4492);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3685 id="path8041"
3686 transform="translate(47.589294,-0.6250087)"
3687 cx="413.66071"
3688 cy="401.82648"
3689 r="3.2142856" />
3690 </g>
3691 <path
3692 sodipodi:nodetypes="ccccccccc"
3693 id="path8043"
3694 d="m 896.20301,482.92837 c 0.98509,4.35008 4.53707,6.17948 7.38673,7.89182 4.46068,2.51292 6.52016,1.52211 9.15451,-0.75761 1.60195,-1.92117 10.68311,-4.69865 15.59423,-7.07107 4.32961,-1.45891 8.9033,-5.35873 13.38452,-8.33376 3.39514,-1.62724 5.34664,0.35464 7.82868,1.01015 2.94412,0.71661 4.41117,2.17175 6.06092,3.53554 2.39616,1.17519 -0.9279,3.14313 3.283,4.29314 1.19091,0.21794 2.41695,0.57645 3.28299,-0.50507"
3695 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3696 inkscape:connector-curvature="0" />
3697 <path
3698 sodipodi:nodetypes="cccccccccccc"
3699 id="path8045"
3700 d="m 910.85021,475.35223 c 2.31494,-0.032 3.17778,0.64253 5.49271,-0.82075 3.45564,-3.08113 5.40254,-3.14477 7.95495,-4.41942 3.02657,-1.31523 6.5357,8.15169 10.10153,9.84899 2.39509,-0.82142 1.28914,1.79379 1.45209,2.65165 0.0571,2.64684 2.80694,3.67806 4.35628,5.42957 3.31604,2.25549 7.37523,6.29546 11.11168,5.3033 6.44525,-2.93107 10.27922,-1.28146 16.28871,-7.38674 0.70405,-1.18134 -0.58425,-6.8946 3.09359,-7.19734 2.52399,0.25338 4.16667,0.0502 6.06092,0.56822 5.441,2.11719 7.73778,6.45 14.71034,7.95495 6.1829,0.96639 7.61264,3.79426 13.88959,5.05076"
3701 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3702 inkscape:connector-curvature="0" />
3703 <path
3704 sodipodi:nodetypes="ccccccccccccc"
3705 id="path8047"
3706 d="m 876.98133,483.52197 c 2.39858,-0.7938 6.10613,4.1921 8.17313,7.04568 0.59281,2.67952 1.15377,5.48645 0.75761,12.12183 0.78513,2.41754 2.68049,3.03095 4.79823,3.283 3.11745,-0.53678 5.87669,-1.3243 7.3236,-3.03046 1.8716,-1.94167 5.31253,2.39394 8.08122,4.04061 3.61009,1.91209 7.77378,1.97886 11.8693,2.27284 1.70358,-0.23064 2.3704,4.51515 3.28299,8.08123 0.38414,4.37806 -0.88544,6.89569 -1.76776,9.84898 -0.2943,2.49655 2.9885,3.52974 6.31345,4.54569 3.18244,0.74124 6.54424,1.66184 9.09137,1.76777 5.14186,0.87491 8.08874,2.69052 12.12183,4.04061 2.23914,0.81655 3.26019,2.24216 4.54569,3.53553"
3707 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3708 inkscape:connector-curvature="0" />
3709 <path
3710 transform="translate(276,136)"
3711 clip-path="url(#clipPath8514)"
3712 id="path8049"
3713 d="m 332,187.69519 c 0,0 57.5,-25.5 57.5,-28 0,-2.5 5.5,-52 5.5,-52 0,0 91,-48.500001 91.5,-50.500001 0.5,-2 86,-62.0000004 86,-62.0000004 L 386.5,17.195189 311,123.19519 l 21,64.5 z"
3714 style="display:inline;opacity:0.25;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter8814);enable-background:new"
3715 inkscape:connector-curvature="0" />
3716 <path
3717 id="path8051"
3718 d="m 1697.2846,722.5514 c 0,0 -115.9655,73.5391 -123.0365,77.78174 -7.0711,4.24264 -230.5169,137.17872 -230.5169,137.17872 l 4.2427,39.59798 216.3747,-100.40917 117.3797,-101.82337 15.5563,-52.3259 z"
3719 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3720 inkscape:connector-curvature="0" />
3721 <path
3722 transform="translate(276,136)"
3723 sodipodi:nodetypes="cccccscccc"
3724 clip-path="url(#clipPath8610)"
3725 id="path8053"
3726 d="m 528.91587,556.85291 c -5.65685,-1.41421 -181.01933,74.95332 -181.01933,74.95332 l -33.94113,181.01934 51.09546,193.94823 257.2031,67.6813 c 0,0 206.47518,152.735 212.13203,148.4924 5.65686,-4.2426 168.2914,-193.7473 168.2914,-193.7473 L 842.87128,845.35248 796.20224,667.16157 528.91587,556.85291 Z"
3727 style="display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8810);enable-background:accumulate"
3728 inkscape:connector-curvature="0" />
3729 <path
3730 sodipodi:nodetypes="czzzzzzczczczczzzc"
3731 id="path8055"
3732 d="m 1097.6433,613.88997 c 0,0 22.6195,-6.50681 35.7427,-5.87273 13.1233,0.63409 30.6416,1.93862 43.7089,12.18619 13.0673,10.24756 25.0677,27.14007 34.1124,58.36965 9.0446,31.22958 1.6983,99.25201 -6.1761,143.34735 -7.8743,44.09534 -28.2651,106.11298 -45,140 -16.7348,33.88702 -49.7977,77.49517 -60.5694,89.87617 -11.3642,13.062 -56.2059,36.4262 -79.4306,42.2667 5.3034,-10.6066 48.8998,-50.5889 35,-60.7143 -14.0189,-10.2123 -45.76,45.9824 -84.2931,29.0332 21.38231,-13.1321 41.7794,-51.1861 34.0406,-66.59448 -7.84024,-15.61039 -30.70492,48.75758 -93.53553,37.01288 30.05204,-27.5267 55.40706,-70.90401 41.2627,-82.9797 -14.41516,-12.30687 -60.46175,54.2932 -60.46175,54.2932 0,0 -2.8219,-41.70123 13.7732,-68.60737 16.63935,-26.97787 79.65297,-81.61527 99.55308,-111.70342 19.9002,-30.08814 33.6126,-66.00902 42.1355,-92.51794 8.5228,-26.50892 15.8009,-77.09954 15.8009,-77.09954"
3733 style="display:inline;opacity:1;fill:#0c0c0c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3734 inkscape:connector-curvature="0" />
3735 <path
3736 transform="translate(276,136)"
3737 sodipodi:nodetypes="cccccccccc"
3738 clip-path="url(#clipPath8622)"
3739 id="path8057"
3740 d="m 770.74639,609.17881 -50.91169,97.58074 -79.90307,111.01576 34.64824,71.41778 42.42641,79.19597 72.12489,-45.25484 14.14214,-192.33305 21.2132,-138.59292 -14.14214,-90.15612 -39.59798,107.12668 z"
3741 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8818);enable-background:accumulate"
3742 inkscape:connector-curvature="0" />
3743 <path
3744 transform="translate(276,136)"
3745 sodipodi:nodetypes="cczcccccc"
3746 clip-path="url(#clipPath8906)"
3747 id="path8059"
3748 d="m 295,846.19519 6.64488,-68.92285 c 0,0 90.31951,89.00457 162.35512,122.92285 72.03561,33.91828 308,62 308,62 l 154,-26 -36,162.00001 -286,26 -298,-89 -11,-189.00001 z"
3749 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8810);enable-background:accumulate"
3750 inkscape:connector-curvature="0" />
3751 <path
3752 clip-path="url(#clipPath3602)"
3753 sodipodi:nodetypes="cccccccccccc"
3754 id="path8061"
3755 d="m 405.79629,845.99023 74.95332,65.05383 2.49963,16.8804 19.40336,10.15891 6.49204,23.05109 31.70905,-8.3711 14.84924,48.08324 c 12.25652,12.7279 89.79344,-113.1097 55.86143,38.1838 l -60.81118,16.2635 -89.20292,-94.69286 -62.82503,-53.79963 7.07106,-60.81118 z"
3756 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3587);enable-background:new"
3757 transform="translate(450.03125,73.843964)"
3758 inkscape:connector-curvature="0" />
3759 <path
3760 sodipodi:nodetypes="czzzzzzzzcc"
3761 id="path8063"
3762 d="m 1159.317,918.349 c 54.2857,-1.42857 126.035,-15.05199 170,-26.78572 44.0527,-11.75714 125.8863,-36.34724 175.357,-57.85714 49.3393,-21.45272 113.6038,-59.2816 154.2859,-92.14285 40.5081,-32.72069 52.3899,-55.81981 60.7142,-33.57143 8.3691,22.36779 -16.4069,56.32562 -37.8571,81.07143 -21.6042,24.9234 -52.7314,52.70533 -98.9287,89.28571 -46.1973,36.58038 -156.0825,101.58463 -212.8571,128.5714 -57.066,27.1254 -128.2033,58.2385 -172.1428,72.5001 -43.9395,14.2616 -131.4286,31.0714 -131.4286,31.0714 L 1159.317,918.349 Z"
3763 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#121212;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3764 inkscape:connector-curvature="0" />
3765 <path
3766 clip-path="url(#clipPath3992)"
3767 sodipodi:nodetypes="czczzcc"
3768 id="path8065"
3769 d="m 1241.5965,652.95007 c 0,0 -64.7215,54.33706 -145.6639,98.99494 -82.0244,45.25484 -284.25704,93.3381 -284.25704,93.3381 0,0 -15.10137,21.05196 45.25489,28.28428 60.35626,7.23232 224.08195,-53.30069 278.60015,-96.16654 54.5182,-42.86585 120.2081,-111.72286 120.2081,-111.72286 l -14.1422,-12.72792 z"
3770 style="display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:url(#linearGradient3666);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter3779);enable-background:accumulate"
3771 transform="translate(450.03125,73.843964)"
3772 inkscape:connector-curvature="0" />
3773 <g
3774 clip-path="url(#clipPath3986)"
3775 id="g8067"
3776 style="display:inline;opacity:1;enable-background:new"
3777 transform="translate(450.03125,73.843964)">
3778 <g
3779 id="g8069"
3780 style="filter:url(#filter3677)"
3781 transform="translate(-174.03125,62.156036)">
3782 <g
3783 id="g8071"
3784 style="filter:url(#filter3785)">
3785 <path
3786 transform="translate(174.03125,-62.156036)"
3787 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3788 d="m 1094.2857,725.93361 c 0,0 -0.2961,26.16091 4.6428,37.85715 4.9389,11.69624 20.0381,26.48665 28.5715,31.42857 8.5334,4.94192 18.9286,8.57142 18.9286,8.57142 l 117.8571,-115 17.8572,-75.71428 -96.4286,38.57143 -91.4286,74.28571 z"
3789 id="path8073"
3790 sodipodi:nodetypes="czzccccc"
3791 inkscape:connector-curvature="0" />
3792 <rect
3793 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3794 id="rect8075"
3795 width="333.75412"
3796 height="309.71277"
3797 x="1197.8389"
3798 y="486.14224" />
3799 </g>
3800 </g>
3801 <g
3802 id="g8077"
3803 style="display:inline;opacity:0.18000004;enable-background:new"
3804 transform="translate(-174.03125,62.156036)">
3805 <g
3806 id="g8079"
3807 style="filter:url(#filter3785)">
3808 <path
3809 transform="translate(174.03125,-62.156036)"
3810 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3811 d="m 1094.2857,725.93361 c 0,0 -0.2961,26.16091 4.6428,37.85715 4.9389,11.69624 20.0381,26.48665 28.5715,31.42857 8.5334,4.94192 18.9286,8.57142 18.9286,8.57142 l 117.8571,-115 17.8572,-75.71428 -96.4286,38.57143 -91.4286,74.28571 z"
3812 id="path8081"
3813 sodipodi:nodetypes="czzccccc"
3814 inkscape:connector-curvature="0" />
3815 <rect
3816 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
3817 id="rect8083"
3818 width="333.75412"
3819 height="309.71277"
3820 x="1197.8389"
3821 y="486.14224" />
3822 </g>
3823 </g>
3824 </g>
3825 <path
3826 sodipodi:nodetypes="cssssccccccssssssssccssssssccssssc"
3827 clip-path="url(#clipPath3722)"
3828 id="path8085"
3829 d="m 1264.1875,605 c -4.4911,0.73268 -8.157,3.45509 -11.9375,6.40625 -10.0813,7.86976 -28.1695,34.42524 -48.0312,50.46875 -39.8674,32.20316 -103.996,69.97701 -152.5626,91.09375 -48.614,21.13738 -130.54122,45.81801 -174.31245,57.5 -43.39821,11.58246 -115.04403,25.13107 -168.25,26.53125 l -4.5625,0.125 -2,4.125 -92.84375,192.125 -6.5,13.4688 14.65625,-2.8438 c 0,0 87.26968,-16.6514 132.34375,-31.2812 44.7252,-14.51667 115.79086,-45.66683 173.03125,-72.87505 C 980.82199,912.46306 1090.1551,847.86412 1137.5,810.375 c 46.3608,-36.70982 77.8049,-64.71682 99.9375,-90.25 10.9011,-12.576 22.7448,-27.53144 31.0313,-42.75 8.2864,-15.21856 19.1597,-44.21808 13.6874,-58.84375 -1.2177,-3.25474 -2.5514,-6.0613 -4.5937,-8.5 -2.0423,-2.4387 -8.4747,-1.57199 -8.5625,-5.03125 -0.2098,-8.26482 -3.3155,-0.24423 -4.8125,0 z m 2.1563,15.21875 c 0.4148,0.58574 1.0311,1.55766 1.7812,3.5625 2.8968,7.74213 -1.4407,31.89875 -8.8125,45.4375 -7.3718,13.53875 -22.6384,28.92394 -33.1875,41.09375 -21.0754,24.31356 -51.9037,51.86156 -97.9375,88.3125 -45.0496,35.67159 -155.46033,101.09459 -211.40625,127.6875 -56.89173,27.04249 -128.09616,58.1184 -171.25,72.125 -36.36491,11.8031 -95.84471,23.8338 -115.71875,27.7813 L 714.09375,851.75 c 54.70691,-2.0493 123.79259,-15.21635 167.125,-26.78125 44.33422,-11.83225 126.07865,-36.33633 176.40625,-58.21875 50.112,-21.78871 112.5344,-61.16816 154.0312,-94.6875 20.6464,-16.67721 41.7449,-42.54588 49.8126,-48.84375 2.437,-1.90242 4.0806,-2.6358 4.875,-3 z"
3830 style="display:inline;overflow:visible;visibility:visible;opacity:0.83300003;fill:#050505;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;filter:url(#filter8225);enable-background:accumulate"
3831 transform="translate(450.03125,73.843964)"
3832 inkscape:connector-curvature="0" />
3833 <g
3834 inkscape:transform-center-y="-12.859654"
3835 inkscape:transform-center-x="-185.09603"
3836 transform="matrix(0.9934486,0.1142802,-0.1142802,0.9934486,-9.24324,588.09054)"
3837 mask="url(#mask7704)"
3838 id="g8087"
3839 style="display:inline;opacity:1;enable-background:new">
3840 <path
3841 sodipodi:nodetypes="ccssscsssscssssscsssscssssscsssscssssscsssscssssscsssscssssscsssscssscccccssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsssssssssssc"
3842 id="path8089"
3843 d="m 1111.4062,-285.9375 -3.9374,1.875 c -0.041,0.0102 -0.1,0.0205 -0.125,0.0312 -0.4188,0.21285 -0.1647,0.10058 -0.6563,0.3125 -0.4861,0.20956 -1.7376,0.58419 -4.0937,1.46875 -3.3312,1.25058 -5.8043,2.14984 -7,3.0625 -1.5362,0.0213 -3.7205,0.23331 -5.6563,0.71875 -2.9815,0.74767 -4.8552,1.17401 -6.75,1.59375 -1.8948,0.41973 -1.6755,0.64219 -2.875,0.875 -1.2966,0.25167 -1.7214,-0.009 -5.4375,0.78125 -3.4899,0.74215 -8.8948,1.93107 -10.1562,2.6875 -1.584,-0.18078 -3.8675,-0.32178 -5.8438,-0.0312 -3.0404,0.44696 -4.9162,0.67276 -6.8438,0.90625 -0.6554,0.0794 -1.041,0.20078 -1.3437,0.28125 -0.4262,0.13166 -0.6858,0.26002 -1.375,0.34375 -1.3116,0.15937 -1.7622,-0.15683 -5.5313,0.28125 -3.5539,0.41309 -9.0054,1.27282 -10.25,1.9375 -1.599,-0.29729 -3.8577,-0.53419 -5.8437,-0.34375 -3.0588,0.29332 -4.972,0.48399 -6.9063,0.65625 -1.9342,0.17227 -1.6886,0.42237 -2.9062,0.53125 -1.3162,0.1177 -1.7598,-0.16363 -5.5312,0.25 -3.5421,0.38845 -9.0079,1.20927 -10.2813,1.875 -1.5989,-0.29469 -3.8872,-0.50701 -5.875,-0.3125 -3.05829,0.29925 -4.9412,0.48024 -6.875,0.65625 -0.65749,0.0598 -1.04005,0.17856 -1.34375,0.25 -0.4277,0.11896 -0.6835,0.21807 -1.375,0.28125 -1.316,0.12026 -1.75975,-0.19488 -5.53125,0.21875 -3.55619,0.39002 -9.0056,1.23916 -10.25,1.90625 -1.59869,-0.29418 -3.85985,-0.52372 -5.84375,-0.3125 -3.0557,0.32533 -4.97405,0.52624 -6.90625,0.71875 -1.93219,0.19251 -1.68975,0.44088 -2.90625,0.5625 -1.31488,0.13147 -1.76305,-0.16454 -5.53125,0.28125 -3.53889,0.41866 -8.9777,1.29217 -10.25,1.96875 -1.59759,-0.28104 -3.85995,-0.42043 -5.84375,-0.1875 -3.05198,0.35837 -4.945,0.56786 -6.875,0.78125 -0.65618,0.0726 -1.04065,0.17269 -1.34375,0.25 -0.42679,0.12723 -0.6849,0.2672 -1.375,0.34375 -1.31339,0.14569 -1.76735,-0.17402 -5.53125,0.3125 -3.54888,0.45876 -8.97865,1.41902 -10.21875,2.125 -1.59309,-0.24424 -3.8338,-0.38135 -5.8125,-0.125 -3.04759,0.39482 -4.9507,0.64845 -6.875,0.90625 -1.92429,0.25779 -1.7261,0.49353 -2.9375,0.65625 -1.30949,0.1759 -1.7472,-0.10438 -5.5,0.46875 -3.52429,0.53824 -8.9232,1.69917 -10.1875,2.4375 -1.58749,-0.20354 -3.8455,-0.25473 -5.8125,0.0937 -3.02619,0.53612 -4.8989,0.86169 -6.8125,1.1875 -0.65059,0.11077 -1.0137,0.27094 -1.3125,0.375 -0.42069,0.16488 -0.66345,0.3313 -1.34375,0.46875 -1.2947,0.26159 -1.7271,-0.006 -5.4375,0.8125 -3.49848,0.77195 -8.8459,2.38293 -10.0625,3.21875 -1.5629,-0.0774 -3.7575,0.0853 -5.6875,0.59375 -2.97238,0.78313 -4.8177,1.23209 -6.6875,1.75 -1.87,0.5179 -1.66665,0.76728 -2.84375,1.09375 -1.27249,0.3529 -1.69705,0.10709 -5.34375,1.1875 -3.42468,1.01463 -8.6494,2.93317 -9.875,3.84375 -1.53878,0.0127 -3.7198,0.27222 -5.625,0.875 -2.93098,0.92734 -4.75035,1.45842 -6.59375,2.0625 -0.62679,0.20538 -0.99165,0.39258 -1.28125,0.53125 -0.40758,0.21361 -0.6533,0.40875 -1.3125,0.625 -1.2545,0.41154 -1.68615,0.18904 -5.28125,1.4375 -3.38989,1.17717 -8.59495,3.2137 -9.78125,4.15625 -1.52388,0.0597 -3.65005,0.39487 -5.53125,1.0625 -2.89739,1.02829 -4.69905,1.67548 -6.53125,2.3125 -1.8322,0.63701 -1.62785,0.84854 -2.78125,1.25 -1.24679,0.43396 -1.66355,0.19972 -5.21875,1.5625 -3.3387,1.2798 -8.4871,3.48255 -9.6875,4.46875 -1.50718,0.10769 -3.6357,0.4988 -5.5,1.21875 -2.86818,1.1076 -4.6239,1.78156 -6.4375,2.46875 -0.6167,0.23363 -0.99645,0.44203 -1.28125,0.59375 10e-6,0 0,0.0295 0,0.0312 l -8,3.1875 -12.4759,3.49189 7.92966,19.27772 c -0.59163,1.97357 12.54624,-4.73836 12.54624,-4.73836 0.22641,-0.14468 0.44895,-0.27261 0.71875,-0.375 1.08052,-0.40998 2.1716,-0.21577 6,-1.6875 3.82852,-1.47174 5.22405,-2.00498 5.90625,-2.40625 0.67961,-0.39978 1.61175,-0.87937 2.21875,-1.53125 1.82692,-0.13775 3.5708,-0.49323 4.9375,-1 2.968,-1.10052 4.87535,-1.80619 6.78125,-2.46875 1.90581,-0.66254 2.35415,-1.41487 3.40625,-1.78125 1.09162,-0.38011 2.1951,-0.16538 6.0625,-1.53125 3.8674,-1.36586 5.28315,-1.82708 5.96875,-2.21875 0.70111,-0.40052 1.7008,-0.93298 2.3125,-1.59375 1.97081,-0.0547 3.81695,-0.38463 5.28125,-0.875 3.00152,-1.00508 4.92615,-1.62171 6.84375,-2.25 1.53861,-0.5041 2.17415,-1.04677 2.90625,-1.4375 0.23022,-0.13431 0.4759,-0.25373 0.75,-0.34375 1.09832,-0.36048 2.18145,-0.0814 6.09375,-1.3125 3.91231,-1.23113 5.366,-1.67295 6.0625,-2.03125 0.69391,-0.35697 1.6301,-0.79261 2.25,-1.40625 1.86521,-0.0227 3.63585,-0.26683 5.03125,-0.6875 3.0304,-0.91354 4.9924,-1.4301 6.9375,-1.96875 1.94512,-0.53864 2.4262,-1.26452 3.5,-1.5625 1.11402,-0.30915 2.22,0.007 6.1875,-1.03125 3.9675,-1.03863 5.4175,-1.43273 6.125,-1.75 0.7348,-0.32959 1.8139,-0.75372 2.4375,-1.375 1.99782,0.116 3.85745,-0.0201 5.34375,-0.375 3.07811,-0.735 5.0834,-1.10094 7.0625,-1.5 1.58791,-0.32018 2.2443,-0.79055 3,-1.09375 0.23751,-0.1068 0.4669,-0.19276 0.75,-0.25 1.13341,-0.22919 2.30465,0.20893 6.34375,-0.5 4.03942,-0.70893 5.50025,-0.92709 6.21875,-1.1875 0.71581,-0.25944 1.70435,-0.56724 2.34375,-1.09375 1.9242,0.23949 3.7479,0.22453 5.1875,0 3.12642,-0.48762 5.15455,-0.70067 7.15625,-0.96875 2.00171,-0.26807 2.48875,-0.94514 3.59375,-1.09375 1.14642,-0.15418 2.27585,0.30157 6.34375,-0.21875 4.06781,-0.52032 5.56025,-0.69573 6.28125,-0.9375 0.73712,-0.24714 1.7981,-0.58623 2.4375,-1.125 2.05,0.33553 3.9737,0.39796 5.5,0.21875 3.1422,-0.36896 5.18,-0.55936 7.1875,-0.78125 1.61082,-0.17802 2.26465,-0.6082 3.03125,-0.84375 0.24091,-0.0855 0.49405,-0.1556 0.78125,-0.1875 1.1497,-0.12772 2.3013,0.34665 6.375,-0.125 4.0737,-0.47165 5.55905,-0.6106 6.28125,-0.84375 0.71941,-0.23227 1.70025,-0.47346 2.34375,-0.96875 1.9363,0.33346 3.77005,0.40424 5.21875,0.25 3.14601,-0.33495 5.1775,-0.51859 7.1875,-0.71875 2.00991,-0.20014 2.48415,-0.82639 3.59375,-0.9375 1.1511,-0.11528 2.2965,0.36506 6.375,-0.0625 4.0785,-0.42756 5.5889,-0.56209 6.3125,-0.78125 0.73922,-0.22386 1.7956,-0.51325 2.4375,-1.03125 2.057,0.39867 4.00185,0.4934 5.53125,0.34375 3.14871,-0.3081 5.1758,-0.47325 7.1875,-0.65625 1.61401,-0.14682 2.26305,-0.56055 3.03125,-0.78125 0.2413,-0.0809 0.49355,-0.12991 0.78125,-0.15625 1.15211,-0.10545 2.2929,0.39275 6.375,0 4.08211,-0.39275 5.5889,-0.53084 6.3125,-0.75 0.7209,-0.21833 1.6996,-0.4477 2.3437,-0.9375 1.9381,0.34999 3.7689,0.45438 5.2188,0.3125 3.1487,-0.3081 5.1758,-0.47325 7.1875,-0.65625 2.0116,-0.18299 2.5142,-0.83802 3.625,-0.9375 1.1523,-0.10323 2.2922,0.38483 6.375,0 4.0829,-0.38482 5.5887,-0.501 6.3125,-0.71875 0.7393,-0.22243 1.7956,-0.51449 2.4375,-1.03125 2.0574,0.40177 4.0029,0.50333 5.5313,0.34375 3.1465,-0.32852 5.177,-0.5227 7.1874,-0.71875 1.613,-0.15729 2.2657,-0.63148 3.0313,-0.875 0.2407,-0.088 0.4632,-0.12137 0.75,-0.15625 1.1483,-0.1397 2.3167,0.33991 6.375,-0.25 4.0583,-0.58992 5.5618,-0.77714 6.2813,-1.03125 0.7166,-0.25316 1.6746,-0.55807 2.3124,-1.09375 1.9197,0.21194 3.72,0.15141 5.1563,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0937,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5626,-1.28125 1.1287,-0.25066 2.2702,0.11629 6.25,-0.875 3.9795,-0.99127 5.4295,-1.4193 6.125,-1.78125 0.7222,-0.376 1.7617,-0.87058 2.375,-1.53125 1.9629,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.1446 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70652 2.3191,-1.70203 2.5312,-2 0.2123,-0.29795 0.099,-0.72855 0.125,-0.75 0.043,-0.0352 0.3404,-0.094 0.5,-0.4375 0.859,-1.84707 2.3232,-5.62764 2.4376,-6.3125 0.1137,-0.68214 0.168,-1.35277 0.2187,-1.75 0.029,-0.2295 -0.1471,-0.8789 -0.125,-0.9375 0.031,-0.082 0.2883,-0.25057 0.3437,-0.5 0.2663,-1.19831 0.089,-2.20736 -0.125,-3.625 -0.2139,-1.41763 -0.9716,-4.61463 -1.625,-5.46875 -0.6589,-0.86172 -1.2248,-1.01051 -1.75,-1 z"
3844 style="display:inline;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3845 transform="translate(0.08004571,-0.03125)"
3846 inkscape:connector-curvature="0" />
3847 <g
3848 id="g8091"
3849 clip-path="url(#clipPath7421)">
3850 <path
3851 sodipodi:nodetypes="czscsssscssssscsssscssssscsssscssssscsssscssssscsssscssssscsssscssccsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscc"
3852 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7001);enable-background:new"
3853 d="m 1107.409,-284.04961 c -0.4187,0.21283 -0.1556,0.0939 -0.6472,0.30581 -0.4861,0.20954 -1.7234,0.57439 -4.0796,1.45895 -3.3311,1.25057 -5.8302,2.15344 -7.0259,3.0661 -1.5361,0.0213 -3.7205,0.23331 -5.6563,0.71875 -2.9815,0.74766 -4.8552,1.17401 -6.75,1.59375 -1.8948,0.41972 -1.6755,0.64219 -2.875,0.875 -1.2966,0.25166 -1.7214,-0.009 -5.4375,0.78125 -3.4899,0.74214 -8.8948,1.93107 -10.1562,2.6875 -1.5839,-0.18079 -3.8675,-0.32178 -5.8438,-0.0312 -3.0404,0.44695 -4.9162,0.67276 -6.8437,0.90625 -0.6554,0.0794 -1.0411,0.20078 -1.3438,0.28125 -0.4262,0.13165 -0.6858,0.26002 -1.375,0.34375 -1.3116,0.15936 -1.7622,-0.15683 -5.5312,0.28125 -3.5539,0.41308 -9.0054,1.27282 -10.25,1.9375 -1.599,-0.2973 -3.8578,-0.53419 -5.8438,-0.34375 -3.0588,0.29331 -4.972,0.48399 -6.9062,0.65625 -1.9343,0.17226 -1.6887,0.42237 -2.9063,0.53125 -1.3162,0.11769 -1.7598,-0.16363 -5.5312,0.25 -3.5419,0.38844 -9.0079,1.20927 -10.2813,1.875 -1.5989,-0.2947 -3.88717,-0.50701 -5.875,-0.3125 -3.05824,0.29924 -4.94113,0.48024 -6.875,0.65625 -0.65749,0.0598 -1.04004,0.17856 -1.34375,0.25 -0.42765,0.11895 -0.68351,0.21807 -1.375,0.28125 -1.31596,0.12025 -1.75976,-0.19488 -5.53125,0.21875 -3.55614,0.39001 -9.00554,1.23916 -10.25,1.90625 -1.59863,-0.29419 -3.85984,-0.52372 -5.84375,-0.3125 -3.0556,0.32532 -4.97404,0.52624 -6.90625,0.71875 -1.93221,0.1925 -1.68987,0.44088 -2.90625,0.5625 -1.31488,0.13146 -1.76298,-0.16454 -5.53125,0.28125 -3.53887,0.41865 -8.97768,1.29217 -10.25,1.96875 -1.59755,-0.28105 -3.85996,-0.42043 -5.84375,-0.1875 -3.05198,0.35836 -4.94508,0.56786 -6.875,0.78125 -0.6562,0.0725 -1.04066,0.17269 -1.34375,0.25 -0.42677,0.12722 -0.68491,0.2672 -1.375,0.34375 -1.31333,0.14568 -1.76746,-0.17402 -5.53125,0.3125 -3.54889,0.45875 -8.97863,1.41902 -10.21875,2.125 -1.59305,-0.24424 -3.83381,-0.38135 -5.8125,-0.125 -3.04759,0.39481 -4.95071,0.64845 -6.875,0.90625 -1.92428,0.25779 -1.72611,0.49353 -2.9375,0.65625 -1.30946,0.1759 -1.74719,-0.10438 -5.5,0.46875 -3.52429,0.53824 -8.92315,1.69917 -10.1875,2.4375 -1.5875,-0.20354 -3.8455,-0.25473 -5.8125,0.0937 -3.02617,0.53612 -4.89889,0.86169 -6.8125,1.1875 -0.65061,0.11077 -1.01371,0.27094 -1.3125,0.375 -0.42067,0.16488 -0.66345,0.3313 -1.34375,0.46875 -1.29465,0.26159 -1.72712,-0.006 -5.4375,0.8125 -3.49853,0.77195 -8.84595,2.38293 -10.0625,3.21875 -1.56278,-0.0774 -3.75758,0.0853 -5.6875,0.59375 -2.97244,0.78313 -4.81761,1.23209 -6.6875,1.75 -1.86988,0.5179 -1.6666,0.76728 -2.84375,1.09375 -1.27246,0.3529 -1.69703,0.10709 -5.34375,1.1875 -3.4247,1.01463 -8.64944,2.93317 -9.875,3.84375 -1.53883,0.0127 -3.71983,0.27222 -5.625,0.875 -2.93106,0.92734 -4.75031,1.45842 -6.59375,2.0625 -0.62676,0.20538 -0.99173,0.39258 -1.28125,0.53125 -0.40763,0.21361 -0.65334,0.40875 -1.3125,0.625 -1.25446,0.41154 -1.68611,0.18904 -5.28125,1.4375 -3.38985,1.17717 -8.59498,3.2137 -9.78125,4.15625 -1.52389,0.0597 -3.65005,0.39487 -5.53125,1.0625 -2.89739,1.02829 -4.69908,1.67548 -6.53125,2.3125 -1.83217,0.63701 -1.62785,0.84854 -2.78125,1.25 -1.24678,0.43396 -1.66361,0.19972 -5.21875,1.5625 -3.33867,1.2798 -8.48715,3.48255 -9.6875,4.46875 -1.50718,0.10769 -3.63569,0.4988 -5.5,1.21875 -2.86818,1.1076 -4.6238,1.78156 -6.4375,2.46875 -0.61666,0.23363 -0.99641,0.44203 -1.28125,0.59375 0,0 0,1.09375 0,1.09375 0.11178,-0.22236 0.38599,-0.81743 0.90625,-1.09375 0.69797,-0.37072 4.81363,-1.99337 6.8125,-2.71875 1.65686,-0.60125 4.15389,-1.32868 5.96875,-1.3125 0.30162,0.003 0.58762,0.0509 0.84375,0.0937 1.84249,0.30825 7.46875,1.5625 7.46875,1.5625 -10e-6,0 -6.23349,-1.64675 -7.03125,-1.84375 -0.19079,-0.0471 -0.53572,-0.0687 -0.96875,-0.0625 1.14546,-0.86971 4.761,-2.39351 7.34375,-3.4375 2.83822,-1.14727 3.11681,-1.25182 5.0625,-1.65625 2.0083,-0.41744 3.15625,-0.5 3.15625,-0.5 0,10e-6 -0.0824,-0.60114 0.96875,-1.125 0.7051,-0.35141 4.88702,-1.8924 6.90625,-2.5625 1.9519,-0.64773 5.0574,-1.3585 6.875,-1 1.86323,0.3675 7.53125,1.8125 7.53125,1.8125 10e-6,0 -6.287,-1.87111 -7.09375,-2.09375 -0.19292,-0.0532 -0.53084,-0.086 -0.96875,-0.0937 1.15834,-0.83288 4.79444,-2.19532 7.40625,-3.15625 2.87016,-1.05601 3.16734,-1.1618 5.125,-1.53125 1.85349,-0.34979 2.85884,-0.42548 3.03125,-0.4375 0.1136,-0.21724 0.37745,-0.81002 0.90625,-1.0625 0.70944,-0.33874 4.92607,-1.71275 6.96875,-2.3125 1.69317,-0.49711 4.24077,-1.03677 6.09375,-0.90625 0.30795,0.0217 0.61349,0.0973 0.875,0.15625 1.88118,0.42432 7.59375,2.03125 7.59375,2.03125 10e-6,0 -6.34174,-2.06525 -7.15625,-2.3125 -0.19479,-0.0591 -0.55788,-0.10394 -1,-0.125 1.16949,-0.79755 4.86302,-2.05622 7.5,-2.9375 2.89781,-0.96847 3.23301,-1.00332 5.21875,-1.28125 2.04965,-0.28689 3.1875,-0.3125 3.1875,-0.3125 -2e-5,0 -0.0728,-0.60697 1,-1.0625 0.7196,-0.30557 4.99098,-1.50075 7.0625,-2 2.00244,-0.48258 5.19849,-0.92829 7.0625,-0.40625 1.91078,0.53515 7.71875,2.5 7.71875,2.5 0,0 -6.42266,-2.42351 -7.25,-2.71875 -0.19784,-0.0706 -0.58216,-0.14039 -1.03125,-0.1875 1.1879,-0.72865 4.91527,-1.77408 7.59375,-2.5 2.94342,-0.79775 3.29208,-0.77083 5.3125,-0.90625 1.91289,-0.12823 2.94705,-0.0711 3.125,-0.0625 0.11728,-0.20366 0.39176,-0.77948 0.9375,-0.96875 0.73219,-0.25394 5.07852,-1.04789 7.1875,-1.375 1.74813,-0.27111 4.40088,-0.4847 6.3125,-0.0937 0.31766,0.065 0.60522,0.18551 0.875,0.28125 1.94074,0.68873 7.84375,3.09375 7.84375,3.09375 10e-6,0 -6.53471,-2.95077 -7.375,-3.3125 -0.20097,-0.0865 -0.57513,-0.16679 -1.03125,-0.25 1.2065,-0.63318 5.02956,-1.3956 7.75,-1.90625 2.98953,-0.56119 3.30023,-0.52954 5.34375,-0.53125 2.10926,-0.002 3.3125,0.125 3.3125,0.125 0,1e-5 -0.0727,-0.63119 1.03125,-0.9375 0.74052,-0.20547 5.12612,-0.83387 7.25,-1.0625 2.05302,-0.22099 5.31863,-0.25222 7.21875,0.46875 1.94779,0.73907 7.84375,3.375 7.84375,3.375 2e-5,0 -6.56288,-3.17897 -7.40625,-3.5625 -0.20168,-0.0917 -0.54221,-0.18621 -1,-0.28125 1.21092,-0.60188 4.98442,-1.24884 7.71875,-1.65625 3.0048,-0.44772 3.32551,-0.4517 5.375,-0.40625 1.94045,0.043 3.00699,0.19423 3.1875,0.21875 0.11892,-0.19316 0.3839,-0.76583 0.9375,-0.90625 0.74271,-0.18838 5.15429,-0.73428 7.28125,-0.9375 1.76303,-0.16842 4.42009,-0.23429 6.34375,0.25 0.31968,0.0805 0.60351,0.20359 0.875,0.3125 1.95293,0.78349 7.90625,3.46875 7.90625,3.46875 -2e-5,0 -6.59191,-3.25348 -7.4375,-3.65625 -0.20222,-0.0963 -0.57226,-0.20703 -1.03125,-0.3125 1.21414,-0.57427 5.04366,-1.12219 7.78125,-1.5 3.00838,-0.4152 3.32307,-0.44263 5.375,-0.375 2.11798,0.0698 3.3125,0.25 3.3125,0.25 -2e-5,0 -0.0773,-0.63741 1.03125,-0.90625 0.74362,-0.18035 5.15176,-0.66355 7.28125,-0.84375 2.05847,-0.17417 5.34324,-0.12432 7.25,0.65625 1.95459,0.80016 7.875,3.53125 7.875,3.53125 -2e-5,0 -6.55993,-3.30876 -7.40625,-3.71875 -0.20237,-0.0981 -0.57186,-0.2031 -1.03125,-0.3125 1.21517,-0.5639 5.01008,-1.1143 7.75,-1.46875 3.01091,-0.38952 3.32131,-0.39765 5.375,-0.3125 1.94439,0.0806 3.00663,0.25324 3.1875,0.28125 0.11916,-0.19086 0.38277,-0.74531 0.9375,-0.875 0.74426,-0.174 5.14993,-0.65047 7.28125,-0.8125 1.76662,-0.13427 4.4497,-0.12571 6.375,0.375 0.32,0.0832 0.6033,0.20127 0.875,0.3125 1.9546,0.80016 7.9063,3.5625 7.9063,3.5625 -10e-5,0 -6.5912,-3.34001 -7.4375,-3.75 -0.2024,-0.0981 -0.5719,-0.20311 -1.0313,-0.3125 1.2151,-0.5639 5.0413,-1.08306 7.7813,-1.4375 3.0109,-0.38953 3.3525,-0.4289 5.4062,-0.34375 2.1197,0.0879 3.3125,0.3125 3.3125,0.3125 0,0 -0.078,-0.64902 1.0313,-0.90625 0.7443,-0.17256 5.1495,-0.62336 7.2812,-0.78125 2.0606,-0.1526 5.3429,-0.0968 7.25,0.6875 1.955,0.80395 7.875,3.5 7.875,3.5 0,0 -6.5598,-3.27587 -7.4062,-3.6875 -0.2025,-0.0984 -0.5718,-0.20222 -1.0313,-0.3125 1.2154,-0.56154 5.0119,-1.12778 7.75,-1.5 3.009,-0.40905 3.3227,-0.41558 5.375,-0.34375 1.9431,0.068 3.0072,0.16485 3.1875,0.1875 0.1188,-0.1944 0.3846,-0.72881 0.9375,-0.875 0.7418,-0.19612 5.1311,-0.82878 7.25,-1.09375 1.7564,-0.21961 4.4053,-0.33231 6.3125,0.0312 0.3169,0.0604 0.6058,0.18938 0.875,0.28125 1.9362,0.66092 7.8438,2.9375 7.8438,2.9375 -1e-4,0 -6.5367,-2.80655 -7.375,-3.15625 -0.2005,-0.0836 -0.5762,-0.17333 -1.0313,-0.25 1.2037,-0.65046 5.0191,-1.37195 7.7188,-2 2.9667,-0.6902 3.2889,-0.75507 5.3125,-0.875 2.0886,-0.1238 3.2812,-0.0312 3.2812,-0.0312 0,1e-5 -0.087,-0.63205 1,-1.03125 0.7292,-0.2678 5.0472,-1.33797 7.125,-1.8125 2.0085,-0.45869 5.1679,-1.0293 7,-0.625 1.8781,0.41446 13.5782,3.01563 13.5782,3.01563 0,0 -12.3275,-3.02266 -13.1407,-3.26563 -0.1945,-0.0581 -0.5586,-0.10626 -1,-0.125 1.1676,-0.80369 3.5142,-1.6873 6.1094,-2.70312 1.6814,-0.65818 0.9237,-0.37659 2.7759,-1.0036 1.7536,-0.59366 2.4854,-1.01071 2.6304,-1.11299 0.3461,-0.20651 -0.356,-0.12188 -0.5442,-0.0424 z"
3854 id="path8093"
3855 inkscape:connector-curvature="0" />
3856 <path
3857 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6949);enable-background:new"
3858 d="m 1082.625,-275.125 c 1.873,0.39348 4.4961,1.14555 6.0313,1.96875 1.5352,0.82319 2.8222,1.056 5.375,2.5 2.5266,1.42926 4.7958,2.00696 6.9687,2.53125 2.3476,0.56642 5.4354,0.71523 8.8438,1.1875 -1.0889,-0.83975 -6.6074,-1.17245 -8.4063,-1.5625 -1.7989,-0.39006 -3.8941,-1.01616 -6.5937,-2.3125 -2.6997,-1.29634 -3.4944,-1.79896 -5.8125,-2.6875 -2.3182,-0.88854 -4.0044,-1.38314 -6.4063,-1.625 z"
3859 id="path8095"
3860 inkscape:connector-curvature="0" />
3861 <path
3862 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6961);enable-background:new"
3863 d="m 1051.4688,-270 c 1.9053,0.57759 4.5281,1.61572 6.0937,2.59375 1.5656,0.97802 2.8802,1.35981 5.5,3.125 2.593,1.74716 4.9859,2.70927 7.25,3.59375 2.4461,0.95557 5.6826,1.65713 9.4063,3.0625 -1.1896,-1.13784 -7.0631,-2.68675 -8.9375,-3.375 -1.8745,-0.68825 -4.0818,-1.5662 -6.875,-3.28125 -2.7933,-1.71504 -3.5736,-2.2839 -5.9375,-3.40625 -2.3641,-1.12234 -4.0567,-1.83455 -6.5,-2.3125 z"
3864 id="path8097"
3865 inkscape:connector-curvature="0" />
3866 <path
3867 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6957);enable-background:new"
3868 d="m 1020.2188,-266.84375 c 1.9119,0.63811 4.5812,1.75536 6.1562,2.8125 1.5751,1.05715 2.8956,1.50867 5.5313,3.40625 2.6086,1.87821 5.0284,3.03003 7.3125,4.0625 2.4677,1.11545 5.7645,2.1733 9.5312,3.84375 -1.2033,-1.22253 -7.2028,-3.31423 -9.0937,-4.125 -1.891,-0.81077 -4.0649,-1.89379 -6.875,-3.75 -2.8102,-1.8562 -3.6218,-2.47693 -6,-3.71875 -2.3783,-1.2418 -4.1107,-1.97569 -6.5625,-2.53125 z"
3869 id="path8099"
3870 inkscape:connector-curvature="0" />
3871 <path
3872 sodipodi:nodetypes="cssscscsscsssccscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssccscsscscssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsszsszssszzcczzzczzzc"
3873 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6997);enable-background:new"
3874 d="m 1110.1719,-266.89063 c 0.1508,0.0486 0.688,0.631 0.1094,1.48438 -0.8101,1.19459 -5.7049,3.32429 -8.5625,4.125 -2.8449,0.79712 -6.2901,0.97774 -10.5625,-0.375 -4.3016,-1.36195 -5.4697,-2.46872 -10.6563,-4.3125 4.664,2.11517 6.1953,3.95233 10.125,5.34375 1.6207,0.57387 3.3671,0.9396 5.0625,1.03125 -0.4451,0.32563 -1.5303,0.9833 -3.5625,1.59375 -2.7955,0.83969 -6.6491,1.53378 -8.25,1.625 -1.5146,0.0863 -3.142,-0.51249 -3.4375,-0.625 0.1667,0.10308 0.3732,0.37734 -0.25,1.03125 -0.8993,0.94363 -6.1474,1.923 -9.125,2.25 -2.9643,0.32555 -6.5216,-0.016 -10.9062,-1.90625 -3.978,-1.71497 -5.339,-2.91536 -9.4063,-4.75 0,0 0,0.15625 0,0.15625 3.6431,2.09529 5.284,3.88327 8.875,5.5625 1.7302,0.80909 3.5917,1.40876 5.4063,1.71875 -0.5349,0.28676 -1.5578,0.71151 -3.4375,1.03125 -2.869,0.48796 -6.809,0.81614 -8.4375,0.75 -0.8507,-0.0345 -1.7286,-0.18437 -2.4063,-0.40625 -0.6848,-0.21488 -1.1897,-0.44467 -1.3125,-0.5 0.1694,0.10721 0.4311,0.40288 -0.2187,1.03125 -0.9097,0.87962 -6.2461,1.33638 -9.25,1.46875 -2.9905,0.13179 -6.5889,-0.45063 -11,-2.5625 -4.4412,-2.12626 -5.6415,-3.4016 -10.9063,-5.78125 4.7343,2.59704 6.2865,4.6291 10.3438,6.71875 1.6733,0.86185 3.4852,1.49425 5.25,1.9375 -0.4633,0.23332 -1.5894,0.68814 -3.6875,0.9375 -2.8863,0.34298 -6.8346,0.49288 -8.4688,0.375 -1.5462,-0.1115 -3.2312,-0.85696 -3.5312,-1 0.1691,0.12029 0.4138,0.41048 -0.2188,1 -0.9128,0.85073 -6.2441,1.26212 -9.25,1.375 -2.9925,0.11237 -6.5897,-0.49043 -11,-2.59375 -4.00125,-1.90823 -5.38803,-3.13783 -9.46875,-5.09375 -3e-5,0 0,0.15625 0,0.15625 3.65506,2.20392 5.29421,4.05255 8.90625,5.90625 1.74029,0.89315 3.637,1.52827 5.4688,1.96875 -0.54,0.2483 -1.5781,0.61533 -3.4688,0.84375 -2.88568,0.34858 -6.86605,0.52095 -8.5,0.40625 -0.85345,-0.0599 -1.72631,-0.25791 -2.40625,-0.5 -0.6871,-0.2353 -1.18935,-0.47226 -1.3125,-0.53125 0.16998,0.11227 0.46448,0.42225 -0.1875,1.03125 -0.91265,0.8525 -6.27533,1.29337 -9.28125,1.40625 -2.99246,0.11237 -6.59346,-0.52805 -11,-2.59375 -4.43653,-2.07978 -5.64688,-3.33171 -10.90625,-5.65625 4.72938,2.54749 6.29074,4.5778 10.34375,6.625 1.67155,0.84433 3.48554,1.46643 5.25,1.90625 -0.46323,0.23422 -1.5897,0.68407 -3.6875,0.9375 -2.88569,0.34858 -6.8362,0.56952 -8.46875,0.46875 -1.54456,-0.0953 -3.20031,-0.82885 -3.5,-0.96875 0.16899,0.11853 0.38192,0.40385 -0.25,1 -0.91186,0.86028 -6.24665,1.33025 -9.25,1.46875 -2.98995,0.1379 -6.56745,-0.45068 -10.96875,-2.46875 -3.99308,-1.83089 -5.36511,-3.0292 -9.4375,-4.90625 -2e-5,0 0,0.15625 0,0.15625 3.64761,2.13327 5.27033,3.93487 8.875,5.71875 1.73675,0.85951 3.60727,1.45014 5.4375,1.875 -0.53947,0.2529 -1.55063,0.64129 -3.4375,0.90625 -2.87978,0.40436 -6.83813,0.64562 -8.46875,0.5625 -0.85172,-0.0434 -1.7277,-0.20855 -2.40625,-0.4375 -0.68569,-0.22201 -1.1896,-0.44339 -1.3125,-0.5 0.16959,0.10899 0.4319,0.40965 -0.21875,1.03125 -0.91079,0.87014 -6.25021,1.39152 -9.25,1.5625 -2.98633,0.17021 -6.57381,-0.31577 -10.96875,-2.28125 -4.42489,-1.97888 -5.60596,-3.22819 -10.84375,-5.375 4.70997,2.38767 6.27017,4.38873 10.3125,6.34375 1.66715,0.80631 3.46043,1.39658 5.21875,1.78125 -0.46163,0.2487 -1.597,0.71225 -3.6875,1.03125 -2.8756,0.43876 -6.7804,0.7331 -8.40625,0.6875 -1.53823,-0.0431 -3.2328,-0.74522 -3.53125,-0.875 0.16833,0.11282 0.41057,0.41375 -0.21875,1.03125 -0.90812,0.8911 -6.20295,1.52825 -9.1875,1.8125 -2.97118,0.28298 -6.57342,-0.1758 -10.9375,-1.9375 -3.95934,-1.59831 -5.32915,-2.79487 -9.34375,-4.3125 3e-5,0 0,0.15625 0,0.15625 3.5959,1.81135 5.23831,3.58233 8.8125,5.15625 1.72207,0.75835 3.58748,1.28895 5.40625,1.625 -0.53609,0.27908 -1.56658,0.68763 -3.4375,1.0625 -2.85539,0.5721 -6.78942,1.01939 -8.40625,1.03125 -0.84451,0.006 -1.70608,-0.0809 -2.375,-0.25 -0.67591,-0.16151 -1.16009,-0.32923 -1.28125,-0.375 0.16722,0.094 0.42267,0.38348 -0.21875,1.0625 -0.89787,0.95052 -6.18648,1.91708 -9.125,2.4375 -2.92534,0.51809 -6.43215,0.37424 -10.71875,-1.03125 -4.3158,-1.41507 -5.47277,-2.52994 -10.5625,-3.96875 4.57685,1.75101 6.08855,3.56006 10.03125,5 1.62608,0.59389 3.36885,0.95565 5.09375,1.15625 -0.45285,0.29702 -1.55478,0.88339 -3.59375,1.46875 -2.80472,0.80517 -6.63886,1.57583 -8.21875,1.75 -1.49475,0.1648 -3.11623,-0.31681 -3.40625,-0.40625 0.16356,0.0901 0.39278,0.35993 -0.21875,1.0625 -0.88247,1.01385 -6.04452,2.37165 -8.9375,3.0625 -2.88002,0.68778 -6.3356,0.76002 -10.5625,-0.4375 -3.83485,-1.08645 -5.17258,-2.07237 -9.0625,-3.125 -10e-6,0 0,0.15625 0,0.15625 3.48418,1.39485 5.06941,2.9194 8.53125,4.03125 1.66793,0.53572 3.45578,0.78674 5.21875,0.875 -0.51964,0.35212 -1.50039,0.91452 -3.3125,1.53125 -2.76566,0.94125 -6.59024,1.93537 -8.15625,2.15625 -0.81794,0.11539 -1.6331,0.12283 -2.28125,0.0312 -0.65496,-0.0832 -1.1326,-0.21827 -1.25,-0.25 0.16204,0.0746 0.43399,0.34044 -0.1875,1.09375 -0.87,1.05453 -6.00963,2.65925 -8.875,3.4375 -2.85253,0.77476 -6.25912,0.9582 -10.4375,-0.0937 -4.20683,-1.05913 -5.35669,-2.04166 -10.34375,-3.15625 4.48454,1.45946 5.96935,3.13523 9.8125,4.25 1.58504,0.45977 3.28679,0.63825 4.96875,0.6875 -0.44157,0.33676 -1.51251,1.02773 -3.5,1.78125 -2.73393,1.03649 -6.45198,2.16269 -8,2.4375 -1.46462,0.26002 -3.05958,-0.11654 -3.34375,-0.1875 0.16025,0.0796 0.38044,0.32098 -0.21875,1.0625 -0.86466,1.07006 -5.91652,2.81815 -8.75,3.6875 -2.8208,0.86547 -6.2075,1.15631 -10.34375,0.21875 -3.75259,-0.85061 -5.04785,-1.71647 -8.875,-2.59375 0,0 0,0.15625 0,0.15625 3.42796,1.23779 4.98741,2.6323 8.375,3.53125 1.63216,0.43314 3.36704,0.58301 5.09375,0.5625 -0.50893,0.38417 -1.47675,1.02182 -3.25,1.75 -2.70634,1.11134 -6.43633,2.30781 -7.96875,2.625 -0.8004,0.16569 -1.61231,0.21862 -2.25,0.15625 0,0 0,0.51552 0,0.92229 0,0.26507 0,0.48396 0,0.48396 0.22645,-0.14468 0.44891,-0.27261 0.71875,-0.375 1.08052,-0.40998 2.17161,-0.21577 6,-1.6875 3.82843,-1.47174 5.22412,-2.00498 5.90625,-2.40625 0.6796,-0.39978 1.61165,-0.87937 2.21875,-1.53125 1.82685,-0.13775 3.57075,-0.49323 4.9375,-1 2.96812,-1.10052 4.87537,-1.80619 6.78125,-2.46875 1.90586,-0.66254 2.35409,-1.41487 3.40625,-1.78125 1.09155,-0.38011 2.19511,-0.16538 6.0625,-1.53125 3.86745,-1.36586 5.28316,-1.82708 5.96875,-2.21875 0.70109,-0.40052 1.70081,-0.93298 2.3125,-1.59375 1.9708,-0.0547 3.81685,-0.38463 5.28125,-0.875 3.00148,-1.00508 4.92615,-1.62171 6.84375,-2.25 1.5386,-0.5041 2.17402,-1.04677 2.90625,-1.4375 0.23016,-0.13431 0.47574,-0.25373 0.75,-0.34375 1.09823,-0.36048 2.18145,-0.0814 6.09375,-1.3125 3.91233,-1.23113 5.36605,-1.67295 6.0625,-2.03125 0.69388,-0.35697 1.63015,-0.79261 2.25,-1.40625 1.86521,-0.0227 3.63581,-0.26683 5.03125,-0.6875 3.03043,-0.91354 4.99238,-1.4301 6.9375,-1.96875 1.94511,-0.53864 2.42618,-1.26452 3.5,-1.5625 1.11401,-0.30915 2.21994,0.007 6.1875,-1.03125 3.96761,-1.03863 5.41758,-1.43273 6.125,-1.75 0.73487,-0.32959 1.81383,-0.75372 2.4375,-1.375 1.99774,0.116 3.85743,-0.0201 5.34375,-0.375 3.07811,-0.735 5.08344,-1.10094 7.0625,-1.5 1.58792,-0.32018 2.24429,-0.79055 3,-1.09375 0.23757,-0.1068 0.46695,-0.19276 0.75,-0.25 1.13347,-0.22919 2.30448,0.20893 6.34375,-0.5 4.03933,-0.70893 5.50025,-0.92709 6.21875,-1.1875 0.71586,-0.25944 1.70428,-0.56724 2.34375,-1.09375 1.92427,0.23949 3.74788,0.22453 5.1875,0 3.12633,-0.48762 5.15455,-0.70067 7.15625,-0.96875 2.00171,-0.26807 2.48869,-0.94514 3.59375,-1.09375 1.14639,-0.15418 2.27592,0.30157 6.34375,-0.21875 4.06784,-0.52032 5.56013,-0.69573 6.28125,-0.9375 0.7371,-0.24714 1.79809,-0.58623 2.4375,-1.125 2.05007,0.33553 3.97378,0.39796 5.5,0.21875 3.14231,-0.36896 5.17994,-0.55936 7.1875,-0.78125 1.61076,-0.17802 2.26467,-0.6082 3.03125,-0.84375 0.24094,-0.0855 0.49412,-0.1556 0.78125,-0.1875 1.14978,-0.12772 2.30129,0.34665 6.375,-0.125 4.07374,-0.47165 5.55909,-0.6106 6.28125,-0.84375 0.71946,-0.23227 1.70024,-0.47346 2.34375,-0.96875 1.93637,0.33346 3.77006,0.40424 5.21875,0.25 3.14602,-0.33495 5.17756,-0.51859 7.1875,-0.71875 2.00996,-0.20014 2.48414,-0.82639 3.59375,-0.9375 1.15114,-0.11528 2.29643,0.36506 6.375,-0.0625 4.07861,-0.42756 5.58886,-0.56209 6.3125,-0.78125 0.73915,-0.22386 1.79572,-0.51325 2.4375,-1.03125 2.0571,0.39867 4.00187,0.4934 5.53125,0.34375 3.14873,-0.3081 5.17584,-0.47325 7.1875,-0.65625 1.61407,-0.14682 2.2631,-0.56055 3.03125,-0.78125 0.24142,-0.0809 0.49353,-0.12991 0.78125,-0.15625 1.15211,-0.10545 2.29296,0.39275 6.375,0 4.08208,-0.39275 5.5889,-0.53084 6.3125,-0.75 0.7209,-0.21833 1.6997,-0.4477 2.3438,-0.9375 1.938,0.34999 3.7688,0.45438 5.2187,0.3125 3.1487,-0.3081 5.1758,-0.47325 7.1875,-0.65625 2.0116,-0.18299 2.5142,-0.83802 3.625,-0.9375 1.1523,-0.10323 2.2922,0.38483 6.375,0 4.0829,-0.38482 5.5887,-0.501 6.3125,-0.71875 0.7393,-0.22243 1.7956,-0.51449 2.4375,-1.03125 2.0574,0.40177 4.0029,0.50333 5.5313,0.34375 3.1466,-0.32852 5.1771,-0.5227 7.1875,-0.71875 1.613,-0.15729 2.2656,-0.63148 3.0312,-0.875 0.2407,-0.088 0.4632,-0.12137 0.75,-0.15625 1.1483,-0.1397 2.3167,0.33991 6.375,-0.25 4.0583,-0.58992 5.5618,-0.77714 6.2813,-1.03125 0.7167,-0.25316 1.6745,-0.55807 2.3125,-1.09375 1.9197,0.21194 3.7199,0.15141 5.1562,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0938,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5625,-1.28125 1.1288,-0.25066 2.2703,0.11629 6.25,-0.875 3.9796,-0.99128 5.4296,-1.4193 6.125,-1.78125 0.7223,-0.37601 1.7619,-0.87058 2.375,-1.53125 1.963,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.14461 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70653 2.3348,-1.68641 2.5469,-1.98438 0.2122,-0.29796 0.1118,-0.7453 0.1379,-0.76675 0.043,-0.0352 0.3193,-0.085 0.479,-0.42844 0.8589,-1.84708 2.321,-5.64459 2.4352,-6.32945 0.1137,-0.68216 0.1638,-1.34774 0.2145,-1.74497 0.029,-0.22952 -0.1467,-0.86544 -0.1246,-0.92404 0.031,-0.0821 0.3045,-0.26528 0.3599,-0.51471 0.2663,-1.19833 0.089,-2.19129 -0.1251,-3.60893 -0.214,-1.41764 -0.9837,-4.62214 -1.6369,-5.47626 -0.6589,-0.86172 -1.2229,-1.01117 -1.7479,-1.00066 -0.2086,0.26976 0.1368,0.26309 0.1626,0.31261 0.6806,0.0508 0.934,0.36864 1.4192,0.89662 0.4852,0.52798 1.4428,3.93956 1.5794,5.38995 0.1366,1.45039 0.19,2.8602 -0.088,3.46864 -0.2781,0.60845 -0.9442,0.42864 -1.2366,0.49452 0.531,0.18589 0.8908,0.21322 0.9524,1.05768 0.059,0.81338 -0.1332,1.63969 -0.5198,2.80562 -0.3912,1.18001 -1.8452,4.34998 -2.2857,4.59877 -0.4523,0.25551 -0.9524,0.18199 -1.288,0.0511 z"
3875 id="path8101"
3876 inkscape:connector-curvature="0" />
3877 <path
3878 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6953);enable-background:new"
3879 d="m 988.75,-263.84375 c 1.91161,0.6344 4.55027,1.75841 6.125,2.8125 1.57477,1.05409 2.8961,1.48252 5.5313,3.375 2.6082,1.87314 5.0269,3.01522 7.3125,4.0625 2.4693,1.13147 5.7521,2.15474 9.5312,3.9375 -1.2072,-1.2584 -7.139,-3.36445 -9.0312,-4.1875 -1.8922,-0.82304 -4.128,-1.93049 -6.9375,-3.78125 -2.80961,-1.85075 -3.62224,-2.48154 -6.00005,-3.71875 -2.37782,-1.23719 -4.07988,-1.9492 -6.53125,-2.5 z"
3880 id="path8103"
3881 inkscape:connector-curvature="0" />
3882 <path
3883 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6993);enable-background:new"
3884 d="m 957.5,-260.78125 c 1.91,0.6181 4.58288,1.70934 6.15625,2.75 1.57339,1.04066 2.89608,1.48252 5.53125,3.375 2.60823,1.87315 5.02692,3.01521 7.3125,4.0625 2.46931,1.13147 5.75213,2.15475 9.53125,3.9375 -1.20728,-1.2584 -7.20154,-3.3957 -9.09375,-4.21875 -1.89217,-0.82304 -4.09666,-1.9305 -6.90625,-3.78125 -2.80958,-1.85075 -3.59295,-2.43932 -5.96875,-3.65625 -2.37578,-1.21691 -4.11321,-1.93885 -6.5625,-2.46875 z"
3885 id="path8105"
3886 inkscape:connector-curvature="0" />
3887 <path
3888 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6989);enable-background:new"
3889 d="m 926.09375,-257.375 c 1.90772,0.59745 4.55348,1.66384 6.125,2.6875 1.5715,1.02365 2.87022,1.43971 5.5,3.28125 2.60291,1.82273 5.02887,2.9722 7.3125,4 2.4672,1.11041 5.75535,2.09323 9.53125,3.84375 -1.20623,-1.2481 -7.1719,-3.31809 -9.0625,-4.125 -1.89058,-0.8069 -4.10242,-1.89104 -6.90625,-3.6875 -2.80385,-1.79644 -3.62704,-2.40251 -6,-3.59375 -2.37297,-1.19124 -4.05362,-1.90283 -6.5,-2.40625 z"
3890 id="path8107"
3891 inkscape:connector-curvature="0" />
3892 <path
3893 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6985);enable-background:new"
3894 d="m 894.90625,-253.5625 c 1.90213,0.55355 4.58701,1.58887 6.15625,2.59375 1.56923,1.00487 2.87401,1.40864 5.5,3.21875 2.59912,1.79164 5.00034,2.87189 7.28125,3.875 2.46428,1.08374 5.75984,2.04029 9.53125,3.75 -1.2048,-1.23507 -7.17416,-3.24478 -9.0625,-4.03125 -1.88832,-0.78647 -4.0752,-1.8308 -6.875,-3.59375 -2.79977,-1.76294 -3.59919,-2.36836 -5.96875,-3.53125 -2.36957,-1.16288 -4.12325,-1.83412 -6.5625,-2.28125 z"
3895 id="path8109"
3896 inkscape:connector-curvature="0" />
3897 <path
3898 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6965);enable-background:new"
3899 d="m 863.71875,-248.65625 c 1.88062,0.42909 4.50427,1.38038 6.0625,2.3125 1.55823,0.93211 2.85233,1.25776 5.46875,3 2.58971,1.72444 4.98067,2.70802 7.25,3.625 2.45176,0.99069 5.73959,1.87707 9.5,3.5 -1.20131,-1.20734 -7.15249,-3.06609 -9.03125,-3.78125 -1.87875,-0.71517 -4.0854,-1.68442 -6.875,-3.375 -2.78963,-1.69057 -3.58461,-2.22822 -5.9375,-3.28125 -2.35292,-1.05301 -4.02584,-1.71248 -6.4375,-2 z"
3900 id="path8111"
3901 inkscape:connector-curvature="0" />
3902 <path
3903 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6981);enable-background:new"
3904 d="m 833.15625,-241.375 c 1.84836,0.29644 4.46945,0.97632 6,1.78125 1.53058,0.80493 2.81374,1.05573 5.375,2.53125 2.53504,1.46046 4.89068,2.32509 7.125,3.0625 2.41399,0.79668 5.65711,1.46689 9.375,2.84375 -1.18771,-1.12873 -7.08772,-2.58975 -8.9375,-3.15625 -1.84977,-0.5665 -4.00342,-1.37392 -6.75,-2.84375 -2.74657,-1.46983 -3.50136,-1.92028 -5.8125,-2.78125 -2.31115,-0.86095 -4.00471,-1.32009 -6.375,-1.4375 z"
3905 id="path8113"
3906 inkscape:connector-curvature="0" />
3907 <path
3908 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6977);enable-background:new"
3909 d="m 802.90625,-232.3125 c 1.8222,0.21127 4.36576,0.80057 5.875,1.53125 1.50925,0.73066 2.75568,0.92998 5.28125,2.28125 2.49976,1.33746 4.83154,2.04843 7.03125,2.65625 2.37653,0.65667 5.56464,1.07288 9.21875,2.1875 -1.16735,-1.04496 -6.92888,-2.10329 -8.75,-2.5625 -1.82111,-0.45921 -3.95225,-1.12696 -6.65625,-2.4375 -2.70403,-1.31052 -3.47106,-1.7199 -5.75,-2.46875 -2.27895,-0.74883 -3.91325,-1.17931 -6.25,-1.1875 z"
3910 id="path8115"
3911 inkscape:connector-curvature="0" />
3912 <path
3913 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6973);enable-background:new"
3914 d="m 773.1875,-222.1875 c 1.81109,0.1787 4.32059,0.66506 5.8125,1.34375 1.49194,0.67869 2.7534,0.79822 5.25,2.0625 2.47107,1.25138 4.79005,1.89614 6.96875,2.4375 2.35387,0.58488 5.49134,0.89752 9.09375,1.84375 -1.15084,-0.99116 -6.85251,-1.7833 -8.65625,-2.1875 -1.80372,-0.4042 -3.91553,-1.02116 -6.59375,-2.25 -2.67818,-1.22884 -3.40345,-1.61089 -5.65625,-2.28125 -2.25279,-0.67034 -3.89627,-1.00232 -6.21875,-0.96875 z"
3915 id="path8117"
3916 inkscape:connector-curvature="0" />
3917 <path
3918 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6969);enable-background:new"
3919 d="m 743.5625,-211.1875 c 1.79281,0.12911 4.27313,0.54965 5.75,1.1875 1.4769,0.63785 2.7161,0.74156 5.1875,1.9375 2.44618,1.18372 4.72054,1.74666 6.875,2.21875 2.32767,0.51003 5.4196,0.68064 9,1.5625 -1.14379,-0.9706 -6.74759,-1.59065 -8.53125,-1.9375 -1.78367,-0.34684 -3.88285,-0.88756 -6.53125,-2.03125 -2.64841,-1.14368 -3.39495,-1.51631 -5.625,-2.125 -2.23008,-0.60868 -3.82594,-0.90966 -6.125,-0.8125 z"
3920 id="path8119"
3921 inkscape:connector-curvature="0" />
3922 <g
3923 style="fill:#ffffff;fill-opacity:1;filter:url(#filter7345)"
3924 id="g8121">
3925 <path
3926 style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
3927 d="m 744.9375,-212.11731 c 0,0 7.22229,-3.22318 9.0625,-3.5 1.84021,-0.27682 3.35225,-0.003 6,0.5625 2.64775,0.56573 8.7357,2.21518 11.1875,3.375 2.4518,1.15982 5.3125,3.5625 5.3125,3.5625 0,0 -7.14644,-2.78019 -10.1875,-3.5625 -3.04106,-0.78231 -7.64461,-2.08374 -10.375,-2.3125 -2.73039,-0.22876 -11,1.875 -11,1.875 z"
3928 id="path8123"
3929 sodipodi:nodetypes="czzzczzc"
3930 inkscape:connector-curvature="0" />
3931 <path
3932 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3933 d="m 735.46875,-206.95416 c 0,0 3.65979,-2.22318 5.5,-2.5 1.84021,-0.27682 3.66475,0.24677 6.3125,0.8125 2.64775,0.56573 8.7357,2.21518 11.1875,3.375 2.4518,1.15982 6.5625,2.125 6.5625,2.125 0,0 -8.39644,-1.34269 -11.4375,-2.125 -3.04106,-0.78231 -7.95711,-2.33374 -10.6875,-2.5625 -2.73039,-0.22876 -7.4375,0.875 -7.4375,0.875 z"
3934 id="path8125"
3935 sodipodi:nodetypes="czzzczzc"
3936 inkscape:connector-curvature="0" />
3937 <path
3938 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3939 d="m 759.85042,-217.61116 c 0,0 8.5437,-3.29857 10.39778,-3.45786 1.85409,-0.1593 3.64166,0.4792 6.2481,1.21208 2.60644,0.73288 8.57724,2.76594 10.95036,4.07925 2.37312,1.31331 6.41417,2.53782 6.41417,2.53782 0,0 -8.29413,-1.87365 -11.27931,-2.84767 -2.98519,-0.97402 -7.79269,-2.83478 -10.50302,-3.23662 -2.71033,-0.40184 -12.22808,1.713 -12.22808,1.713 z"
3940 id="path8127"
3941 sodipodi:nodetypes="czzzczzc"
3942 inkscape:connector-curvature="0" />
3943 <path
3944 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3945 d="m 775.19813,-223.2266 c 0,0 7.77133,-2.78244 9.62831,-2.90349 1.85697,-0.12104 3.631,0.55417 6.22178,1.34062 2.59077,0.78645 8.5184,2.94217 10.86394,4.30412 2.34555,1.36195 6.36049,2.6695 6.36049,2.6695 0,0 -8.25373,-2.04423 -11.21821,-3.07958 -2.96447,-1.03535 -7.73259,-2.99481 -10.43406,-3.45243 -2.70147,-0.45763 -11.42225,1.12126 -11.42225,1.12126 z"
3946 id="path8129"
3947 sodipodi:nodetypes="czzzczzc"
3948 inkscape:connector-curvature="0" />
3949 <path
3950 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3951 d="m 789.64298,-227.95417 c 0,0 8.68256,-3.52031 10.54154,-3.60535 1.85897,-0.085 3.61958,0.62442 6.19463,1.46093 2.57505,0.83649 8.45979,3.10666 10.77851,4.5138 2.31872,1.40715 6.30757,2.79224 6.30757,2.79224 0,0 -8.21257,-2.20377 -11.15643,-3.29636 -2.94386,-1.09259 -7.67312,-3.14408 -10.36522,-3.65397 -2.69209,-0.50988 -12.3006,1.78871 -12.3006,1.78871 z"
3952 id="path8131"
3953 sodipodi:nodetypes="czzzczzc"
3954 inkscape:transform-center-x="13.852145"
3955 inkscape:transform-center-y="-4.3190906"
3956 inkscape:connector-curvature="0" />
3957 <path
3958 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3959 d="m 804.49513,-233.32948 c 0,0 7.80756,-2.58281 9.66654,-2.66785 1.85897,-0.085 3.61958,0.62442 6.19463,1.46093 2.57505,0.83649 8.45979,3.10666 10.77851,4.5138 2.31872,1.40715 6.30757,2.79224 6.30757,2.79224 0,0 -8.21257,-2.20377 -11.15643,-3.29636 -2.94386,-1.09259 -7.67312,-3.14408 -10.36522,-3.65397 -2.69209,-0.50988 -11.4256,0.85121 -11.4256,0.85121 z"
3960 id="path8133"
3961 sodipodi:nodetypes="czzzczzc"
3962 inkscape:transform-center-x="13.852145"
3963 inkscape:transform-center-y="-4.3190906"
3964 inkscape:connector-curvature="0" />
3965 <path
3966 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3967 d="m 819.55763,-237.57948 c 0,0 8.55756,-2.58281 10.41654,-2.66785 1.85897,-0.085 3.61958,0.62442 6.19463,1.46093 2.57505,0.83649 8.45979,3.10666 10.77851,4.5138 2.31872,1.40715 6.30757,2.79224 6.30757,2.79224 0,0 -8.21257,-2.20377 -11.15643,-3.29636 -2.94386,-1.09259 -7.67312,-3.14408 -10.36522,-3.65397 -2.69209,-0.50988 -12.1756,0.85121 -12.1756,0.85121 z"
3968 id="path8135"
3969 sodipodi:nodetypes="czzzczzc"
3970 inkscape:transform-center-x="13.852145"
3971 inkscape:transform-center-y="-4.3190906"
3972 inkscape:connector-curvature="0" />
3973 <path
3974 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3975 d="m 836.23395,-242.60125 c 0,0 6.96702,-1.98723 8.82784,-1.96757 1.86081,0.0197 3.57873,0.82702 6.10265,1.80705 2.52393,0.98 8.27166,3.57758 10.50756,5.11291 2.2359,1.53535 6.14053,3.14261 6.14053,3.14261 0,0 -8.07561,-2.66222 -10.95336,-3.91866 -2.87774,-1.25645 -7.48412,-3.5707 -10.14328,-4.23121 -2.65915,-0.66049 -10.48194,0.0549 -10.48194,0.0549 z"
3976 id="path8137"
3977 sodipodi:nodetypes="czzzczzc"
3978 inkscape:transform-center-x="13.64141"
3979 inkscape:transform-center-y="-4.9269042"
3980 inkscape:connector-curvature="0" />
3981 <path
3982 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3983 d="m 850.73028,-246.00461 c 0,0 7.68784,-2.02768 9.54782,-1.96854 1.85997,0.0592 3.56038,0.90279 6.06293,1.93616 2.50255,1.03334 8.19387,3.75232 10.39668,5.33475 2.20282,1.58245 6.07245,3.2722 6.07245,3.2722 0,0 -8.01729,-2.83298 -10.86772,-4.15022 -2.85043,-1.31723 -7.40666,-3.72872 -10.0512,-4.4455 -2.64454,-0.71678 -11.16096,0.0211 -11.16096,0.0211 z"
3984 id="path8139"
3985 sodipodi:nodetypes="czzzczzc"
3986 inkscape:transform-center-x="13.55068"
3987 inkscape:transform-center-y="-5.1542119"
3988 inkscape:connector-curvature="0" />
3989 <path
3990 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3991 d="m 864.82496,-249.21081 c 0,0 8.16952,-1.96906 10.02688,-1.85396 1.85735,0.11512 3.53158,1.00956 6.0019,2.11779 2.47031,1.10821 8.0772,3.99727 10.23138,5.64531 2.15418,1.64804 5.9712,3.45352 5.9712,3.45352 0,0 -7.92839,-3.07306 -10.73787,-4.4755 -2.80949,-1.40244 -7.29106,-3.94999 -9.91283,-4.74606 -2.62176,-0.79606 -11.58066,-0.1411 -11.58066,-0.1411 z"
3992 id="path8141"
3993 sodipodi:nodetypes="czzzczzc"
3994 inkscape:transform-center-x="13.41151"
3995 inkscape:transform-center-y="-5.4740887"
3996 inkscape:connector-curvature="0" />
3997 <path
3998 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
3999 d="m 881.38485,-251.60282 c 0,0 8.08536,-1.90809 9.93837,-1.73664 1.853,0.17147 3.4993,1.11633 5.93482,2.29908 2.43553,1.18271 7.95209,4.2407 10.05523,5.95339 2.10314,1.7127 5.86357,3.63326 5.86357,3.63326 0,0 -7.8314,-3.3124 -10.597,-4.7995 -2.76561,-1.48712 -7.16775,-4.16959 -9.76414,-5.04491 -2.59637,-0.87531 -11.43085,-0.30468 -11.43085,-0.30468 z"
4000 id="path8143"
4001 sodipodi:nodetypes="czzzczzc"
4002 inkscape:transform-center-x="13.258805"
4003 inkscape:transform-center-y="-5.79376"
4004 inkscape:connector-curvature="0" />
4005 <path
4006 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4007 d="m 896.58415,-254.34724 c 0,0 7.64166,-1.4277 9.49547,-1.26515 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -10.99774,-0.76897 -10.99774,-0.76897 z"
4008 id="path8145"
4009 sodipodi:nodetypes="czzzczzc"
4010 inkscape:transform-center-x="13.28378"
4011 inkscape:transform-center-y="-5.7433893"
4012 inkscape:connector-curvature="0" />
4013 <path
4014 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4015 d="m 911.45328,-255.98544 c 0,0 8.64166,-1.5527 10.49547,-1.39015 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -11.99774,-0.64397 -11.99774,-0.64397 z"
4016 id="path8147"
4017 sodipodi:nodetypes="czzzczzc"
4018 inkscape:transform-center-x="13.28378"
4019 inkscape:transform-center-y="-5.7433893"
4020 inkscape:connector-curvature="0" />
4021 <path
4022 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4023 d="m 927.70328,-258.29794 c 0,0 7.64166,-0.8652 9.49547,-0.70265 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -10.99774,-1.33147 -10.99774,-1.33147 z"
4024 id="path8149"
4025 sodipodi:nodetypes="czzzczzc"
4026 inkscape:transform-center-x="13.28378"
4027 inkscape:transform-center-y="-5.7433893"
4028 inkscape:connector-curvature="0" />
4029 <path
4030 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4031 d="m 942.82828,-259.48544 c 0,0 8.57916,-1.4902 10.43297,-1.32765 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -11.93524,-0.70647 -11.93524,-0.70647 z"
4032 id="path8151"
4033 sodipodi:nodetypes="czzzczzc"
4034 inkscape:transform-center-x="13.28378"
4035 inkscape:transform-center-y="-5.7433893"
4036 inkscape:connector-curvature="0" />
4037 <path
4038 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4039 d="m 959.07828,-261.54794 c 0,0 7.82916,-0.8027 9.68297,-0.64015 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -11.18524,-1.39397 -11.18524,-1.39397 z"
4040 id="path8153"
4041 sodipodi:nodetypes="czzzczzc"
4042 inkscape:transform-center-x="13.28378"
4043 inkscape:transform-center-y="-5.7433893"
4044 inkscape:connector-curvature="0" />
4045 <path
4046 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4047 d="m 974.45328,-262.79794 c 0,0 8.39166,-1.1777 10.24547,-1.01515 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08376,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.84721,-3.27474 -10.61993,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -11.74774,-1.01897 -11.74774,-1.01897 z"
4048 id="path8155"
4049 sodipodi:nodetypes="czzzczzc"
4050 inkscape:transform-center-x="13.28378"
4051 inkscape:transform-center-y="-5.7433893"
4052 inkscape:connector-curvature="0" />
4053 <path
4054 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4055 d="m 990.64078,-264.86044 c 0,0 6.89166,-0.9902 8.74547,-0.82765 1.85385,0.16256 3.50465,1.0995 5.94575,2.27053 2.4412,1.171 7.9724,4.20246 10.0838,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.8472,-3.27474 -10.6199,-4.74855 -2.7727,-1.4738 -7.1877,-4.13509 -9.7883,-4.99793 -2.60053,-0.86282 -10.24772,-1.20647 -10.24772,-1.20647 z"
4056 id="path8157"
4057 sodipodi:nodetypes="czzzczzc"
4058 inkscape:transform-center-x="13.28378"
4059 inkscape:transform-center-y="-5.7433893"
4060 inkscape:connector-curvature="0" />
4061 <path
4062 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4063 d="m 1007.7658,-265.79794 c 0,0 6.8291,-1.1777 8.683,-1.01515 1.8538,0.16256 3.5046,1.0995 5.9457,2.27053 2.4412,1.171 7.9724,4.20246 10.0838,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.8472,-3.27474 -10.6199,-4.74855 -2.7727,-1.4738 -7.1877,-4.13509 -9.7883,-4.99793 -2.6005,-0.86282 -10.1852,-1.01897 -10.1852,-1.01897 z"
4064 id="path8159"
4065 sodipodi:nodetypes="czzzczzc"
4066 inkscape:transform-center-x="13.28378"
4067 inkscape:transform-center-y="-5.7433893"
4068 inkscape:connector-curvature="0" />
4069 <path
4070 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4071 d="m 1023.8908,-267.79794 c 0,0 6.0791,-0.4277 7.933,-0.26515 1.8538,0.16256 3.5046,1.0995 5.9457,2.27053 2.4412,1.171 7.9724,4.20246 10.0838,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.8472,-3.27474 -10.6199,-4.74855 -2.7727,-1.4738 -7.1877,-4.13509 -9.7883,-4.99793 -2.6005,-0.86282 -9.4352,-1.76897 -9.4352,-1.76897 z"
4072 id="path8161"
4073 sodipodi:nodetypes="czzzczzc"
4074 inkscape:transform-center-x="13.28378"
4075 inkscape:transform-center-y="-5.7433893"
4076 inkscape:connector-curvature="0" />
4077 <path
4078 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4079 d="m 1039.7033,-269.17294 c 0,0 6.4541,-0.6777 8.308,-0.51515 1.8538,0.16256 3.5046,1.0995 5.9457,2.27053 2.4412,1.171 7.9724,4.20246 10.0838,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.8472,-3.27474 -10.6199,-4.74855 -2.7727,-1.4738 -7.1877,-4.13509 -9.7883,-4.99793 -2.6005,-0.86282 -9.8102,-1.51897 -9.8102,-1.51897 z"
4080 id="path8163"
4081 sodipodi:nodetypes="czzzczzc"
4082 inkscape:transform-center-x="13.28378"
4083 inkscape:transform-center-y="-5.7433893"
4084 inkscape:connector-curvature="0" />
4085 <path
4086 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4087 d="m 1055.2718,-271.03319 c 0,0 5.4976,-0.90945 7.3578,-0.85348 1.8601,0.056 3.5619,0.89674 6.0661,1.92586 2.5044,1.0291 8.2003,3.7384 10.4058,5.31709 2.2055,1.57871 6.078,3.2619 6.078,3.2619 0,0 -8.022,-2.81939 -10.8748,-4.13178 -2.8526,-1.31238 -7.4129,-3.71613 -10.0587,-4.42843 -2.6457,-0.71228 -8.9742,-1.09116 -8.9742,-1.09116 z"
4088 id="path8165"
4089 sodipodi:nodetypes="czzzczzc"
4090 inkscape:transform-center-x="13.55813"
4091 inkscape:transform-center-y="-5.1360724"
4092 inkscape:connector-curvature="0" />
4093 <path
4094 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4095 d="m 1072.7007,-273.48537 c 0,0 4.5472,-1.15581 6.408,-1.18621 1.8607,-0.0304 3.5996,0.73049 6.1489,1.64231 2.5494,0.91177 8.3649,3.35386 10.6414,4.8285 2.2763,1.47468 6.2227,2.97636 6.2227,2.97636 0,0 -8.1442,-2.44411 -11.0547,-3.62272 -2.9105,-1.1786 -7.5774,-3.36815 -10.2534,-3.95691 -2.6759,-0.58875 -8.1129,-0.68133 -8.1129,-0.68133 z"
4096 id="path8167"
4097 sodipodi:nodetypes="czzzczzc"
4098 inkscape:transform-center-x="13.74758"
4099 inkscape:transform-center-y="-4.6370147"
4100 inkscape:connector-curvature="0" />
4101 <path
4102 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4103 d="m 1087.1585,-276.5244 c 0,0 5.96,-1.77355 7.8202,-1.83024 1.86,-0.0567 3.6096,0.67955 6.1715,1.55525 2.562,0.87566 2.5226,0.85713 5.3335,1.49015 2.7969,0.62986 7.0767,1.51313 7.0767,1.51313 0,0 -3.6155,-0.0163 -6.7923,-0.46614 -3.1155,-0.44119 -7.3743,-1.69825 -10.0584,-2.24913 -2.6839,-0.55088 -9.5512,-0.013 -9.5512,-0.013 z"
4104 id="path8169"
4105 sodipodi:nodetypes="czzzczzc"
4106 inkscape:transform-center-x="13.79933"
4107 inkscape:transform-center-y="-4.4842392"
4108 inkscape:connector-curvature="0" />
4109 <path
4110 style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
4111 d="m 1099.25,-279.92981 c 0.1612,0.26862 11.2081,-4.60046 12.1875,-4.6875 0.9794,-0.087 2,3.125 2,3.125 0,0 -0.7751,-1.50434 -2.875,-1.0625 -2.0999,0.44184 -11.3009,2.67141 -11.3125,2.625 z"
4112 id="path8171"
4113 sodipodi:nodetypes="czczc"
4114 inkscape:connector-curvature="0" />
4115 </g>
4116 <path
4117 sodipodi:nodetypes="czscsssscssssscsssscssssscsssscssssscsssscssssscsssscssssscsssscssccsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscc"
4118 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7333);enable-background:new"
4119 d="m 1107.4532,-284.0938 c -0.4187,0.21283 -0.1556,0.0939 -0.6472,0.30581 -0.4861,0.20954 -1.7234,0.57439 -4.0796,1.45895 -3.3311,1.25057 -5.8302,2.15344 -7.0259,3.0661 -1.5361,0.0213 -3.7205,0.23331 -5.6563,0.71875 -2.9815,0.74766 -4.8552,1.17401 -6.75,1.59375 -1.8948,0.41972 -1.6755,0.64219 -2.875,0.875 -1.2966,0.25166 -1.7214,-0.009 -5.4375,0.78125 -3.4899,0.74214 -8.8948,1.93107 -10.1562,2.6875 -1.5839,-0.18079 -3.8675,-0.32178 -5.8438,-0.0312 -3.0404,0.44695 -4.9162,0.67276 -6.8437,0.90625 -0.6554,0.0794 -1.0411,0.20078 -1.3438,0.28125 -0.4262,0.13165 -0.6858,0.26002 -1.375,0.34375 -1.3116,0.15936 -1.7622,-0.15683 -5.5312,0.28125 -3.5539,0.41308 -9.0054,1.27282 -10.25,1.9375 -1.599,-0.2973 -3.8578,-0.53419 -5.8438,-0.34375 -3.0588,0.29331 -4.972,0.48399 -6.9062,0.65625 -1.9343,0.17226 -1.6887,0.42237 -2.9063,0.53125 -1.3162,0.11769 -1.7598,-0.16363 -5.5312,0.25 -3.5419,0.38844 -9.0079,1.20927 -10.2813,1.875 -1.5989,-0.2947 -3.88718,-0.50701 -5.87501,-0.3125 -3.05824,0.29924 -4.94113,0.48024 -6.875,0.65625 -0.65749,0.0598 -1.04004,0.17856 -1.34375,0.25 -0.42765,0.11895 -0.68351,0.21807 -1.375,0.28125 -1.31596,0.12025 -1.75976,-0.19488 -5.53125,0.21875 -3.55614,0.39001 -9.00554,1.23916 -10.25,1.90625 -1.59863,-0.29419 -3.85984,-0.52372 -5.84375,-0.3125 -3.0556,0.32532 -4.97404,0.52624 -6.90625,0.71875 -1.93221,0.1925 -1.68987,0.44088 -2.90625,0.5625 -1.31488,0.13146 -1.76298,-0.16454 -5.53125,0.28125 -3.53887,0.41865 -8.97768,1.29217 -10.25,1.96875 -1.59755,-0.28105 -3.85996,-0.42043 -5.84375,-0.1875 -3.05198,0.35836 -4.94508,0.56786 -6.875,0.78125 -0.6562,0.0726 -1.04066,0.17269 -1.34375,0.25 -0.42677,0.12722 -0.68491,0.2672 -1.375,0.34375 -1.31333,0.14568 -1.76746,-0.17402 -5.53125,0.3125 -3.54889,0.45875 -8.97863,1.41902 -10.21875,2.125 -1.59305,-0.24424 -3.83381,-0.38135 -5.8125,-0.125 -3.04759,0.39481 -4.95071,0.64845 -6.875,0.90625 -1.92428,0.25779 -1.72611,0.49353 -2.9375,0.65625 -1.30946,0.1759 -1.74719,-0.10438 -5.5,0.46875 -3.52429,0.53824 -8.92315,1.69917 -10.1875,2.4375 -1.5875,-0.20354 -3.8455,-0.25473 -5.8125,0.0937 -3.02617,0.53612 -4.89889,0.86169 -6.8125,1.1875 -0.65061,0.11077 -1.01371,0.27094 -1.3125,0.375 -0.42067,0.16488 -0.66345,0.3313 -1.34375,0.46875 -1.29465,0.26159 -1.72712,-0.006 -5.4375,0.8125 -3.49853,0.77195 -8.84595,2.38293 -10.0625,3.21875 -1.56278,-0.0775 -3.75758,0.0853 -5.6875,0.59375 -2.97244,0.78313 -4.81761,1.23209 -6.6875,1.75 -1.86988,0.5179 -1.6666,0.76728 -2.84375,1.09375 -1.27246,0.3529 -1.69703,0.10709 -5.34375,1.1875 -3.4247,1.01463 -8.64944,2.93317 -9.875,3.84375 -1.53883,0.0127 -3.71983,0.27222 -5.625,0.875 -2.93106,0.92734 -4.75031,1.45842 -6.59375,2.0625 -0.62676,0.20538 -0.99173,0.39258 -1.28125,0.53125 -0.40763,0.21361 -0.65334,0.40875 -1.3125,0.625 -1.25446,0.41154 -1.68611,0.18904 -5.28125,1.4375 -3.38985,1.17717 -8.59498,3.2137 -9.78125,4.15625 -1.52389,0.0597 -3.65005,0.39487 -5.53125,1.0625 -2.89739,1.02829 -4.69908,1.67548 -6.53125,2.3125 -1.83217,0.63701 -1.62785,0.84854 -2.78125,1.25 -1.24678,0.43396 -1.66361,0.19972 -5.21875,1.5625 -3.33867,1.2798 -8.48715,3.48255 -9.6875,4.46875 -1.50718,0.10769 -3.63569,0.4988 -5.5,1.21875 -2.86818,1.1076 -4.6238,1.78156 -6.4375,2.46875 -0.61666,0.23363 -0.99641,0.44203 -1.28125,0.59375 0,0 0,1.09375 0,1.09375 0.11178,-0.22236 0.38599,-0.81743 0.90625,-1.09375 0.69797,-0.37072 4.81363,-1.99337 6.8125,-2.71875 1.65686,-0.60125 4.15389,-1.32868 5.96875,-1.3125 0.30162,0.003 0.58762,0.0509 0.84375,0.0937 1.84249,0.30825 7.46875,1.5625 7.46875,1.5625 -10e-6,0 -6.23349,-1.64675 -7.03125,-1.84375 -0.19079,-0.0471 -0.53572,-0.0687 -0.96875,-0.0625 1.14546,-0.86971 4.761,-2.39351 7.34375,-3.4375 2.83822,-1.14727 3.11681,-1.25182 5.0625,-1.65625 2.0083,-0.41744 3.15625,-0.5 3.15625,-0.5 0,1e-5 -0.0824,-0.60114 0.96875,-1.125 0.7051,-0.35141 4.88702,-1.8924 6.90625,-2.5625 1.9519,-0.64773 5.0574,-1.3585 6.875,-1 1.86323,0.3675 7.53125,1.8125 7.53125,1.8125 1e-5,0 -6.287,-1.87111 -7.09375,-2.09375 -0.19292,-0.0533 -0.53084,-0.086 -0.96875,-0.0937 1.15834,-0.83288 4.79444,-2.19532 7.40625,-3.15625 2.87016,-1.05601 3.16734,-1.1618 5.125,-1.53125 1.85349,-0.34979 2.85884,-0.42548 3.03125,-0.4375 0.1136,-0.21724 0.37745,-0.81002 0.90625,-1.0625 0.70944,-0.33874 4.92607,-1.71275 6.96875,-2.3125 1.69317,-0.49711 4.24077,-1.03677 6.09375,-0.90625 0.30795,0.0217 0.61349,0.0973 0.875,0.15625 1.88118,0.42432 7.59375,2.03125 7.59375,2.03125 1e-5,0 -6.34174,-2.06525 -7.15625,-2.3125 -0.19479,-0.0591 -0.55788,-0.10394 -1,-0.125 1.16949,-0.79755 4.86302,-2.05622 7.5,-2.9375 2.89781,-0.96847 3.23301,-1.00332 5.21875,-1.28125 2.04965,-0.28689 3.1875,-0.3125 3.1875,-0.3125 -2e-5,0 -0.0727,-0.60697 1,-1.0625 0.7196,-0.30557 4.99098,-1.50075 7.0625,-2 2.00244,-0.48258 5.19849,-0.92829 7.0625,-0.40625 1.91078,0.53515 7.71875,2.5 7.71875,2.5 0,0 -6.42266,-2.42351 -7.25,-2.71875 -0.19784,-0.0706 -0.58216,-0.14039 -1.03125,-0.1875 1.1879,-0.72865 4.91527,-1.77408 7.59375,-2.5 2.94342,-0.79775 3.29208,-0.77083 5.3125,-0.90625 1.91289,-0.12823 2.94705,-0.0711 3.125,-0.0625 0.11728,-0.20366 0.39176,-0.77948 0.9375,-0.96875 0.73219,-0.25394 5.07852,-1.04789 7.1875,-1.375 1.74813,-0.27111 4.40088,-0.4847 6.3125,-0.0937 0.31766,0.065 0.60522,0.18551 0.875,0.28125 1.94074,0.68873 7.84375,3.09375 7.84375,3.09375 1e-5,0 -6.53471,-2.95077 -7.375,-3.3125 -0.20097,-0.0865 -0.57513,-0.16679 -1.03125,-0.25 1.2065,-0.63318 5.02956,-1.3956 7.75,-1.90625 2.98953,-0.56119 3.30023,-0.52954 5.34375,-0.53125 2.10926,-0.002 3.3125,0.125 3.3125,0.125 0,1e-5 -0.0727,-0.63119 1.03125,-0.9375 0.74052,-0.20547 5.12612,-0.83387 7.25,-1.0625 2.05302,-0.22099 5.31863,-0.25222 7.21875,0.46875 1.94779,0.73907 7.84375,3.375 7.84375,3.375 2e-5,0 -6.56288,-3.17897 -7.40625,-3.5625 -0.20168,-0.0917 -0.54221,-0.18621 -1,-0.28125 1.21092,-0.60188 4.98442,-1.24884 7.71875,-1.65625 3.0048,-0.44772 3.32551,-0.4517 5.375,-0.40625 1.94045,0.043 3.00699,0.19423 3.1875,0.21875 0.11892,-0.19316 0.3839,-0.76583 0.9375,-0.90625 0.74271,-0.18838 5.15429,-0.73428 7.28125,-0.9375 1.76303,-0.16842 4.42009,-0.23429 6.34375,0.25 0.31968,0.0805 0.60351,0.20359 0.875,0.3125 1.95293,0.78349 7.90625,3.46875 7.90625,3.46875 -2e-5,0 -6.59191,-3.25348 -7.4375,-3.65625 -0.20222,-0.0963 -0.57226,-0.20703 -1.03125,-0.3125 1.21414,-0.57427 5.04366,-1.12219 7.78125,-1.5 3.00838,-0.4152 3.32307,-0.44263 5.375,-0.375 2.11798,0.0698 3.3125,0.25 3.3125,0.25 -2e-5,0 -0.0772,-0.63741 1.03125,-0.90625 0.74362,-0.18035 5.15176,-0.66355 7.28125,-0.84375 2.05847,-0.17417 5.34324,-0.12432 7.25,0.65625 1.95459,0.80016 7.875,3.53125 7.875,3.53125 -2e-5,0 -6.55993,-3.30876 -7.40625,-3.71875 -0.20237,-0.0981 -0.57186,-0.2031 -1.03125,-0.3125 1.21517,-0.5639 5.01008,-1.1143 7.75,-1.46875 3.01091,-0.38952 3.32131,-0.39765 5.375,-0.3125 1.94439,0.0806 3.00663,0.25324 3.1875,0.28125 0.11916,-0.19086 0.38277,-0.74531 0.9375,-0.875 0.74426,-0.174 5.14993,-0.65047 7.28125,-0.8125 1.76662,-0.13427 4.44971,-0.12571 6.37501,0.375 0.32,0.0832 0.6033,0.20127 0.875,0.3125 1.9546,0.80016 7.9063,3.5625 7.9063,3.5625 -1e-4,0 -6.5912,-3.34001 -7.4375,-3.75 -0.2024,-0.0981 -0.5719,-0.20311 -1.0313,-0.3125 1.2151,-0.5639 5.0413,-1.08306 7.7813,-1.4375 3.0109,-0.38953 3.3525,-0.4289 5.4062,-0.34375 2.1197,0.0879 3.3125,0.3125 3.3125,0.3125 0,0 -0.078,-0.64902 1.0313,-0.90625 0.7443,-0.17256 5.1495,-0.62336 7.2812,-0.78125 2.0606,-0.1526 5.3429,-0.0968 7.25,0.6875 1.955,0.80395 7.875,3.5 7.875,3.5 0,0 -6.5598,-3.27587 -7.4062,-3.6875 -0.2025,-0.0984 -0.5718,-0.20222 -1.0313,-0.3125 1.2154,-0.56154 5.0119,-1.12778 7.75,-1.5 3.009,-0.40905 3.3227,-0.41558 5.375,-0.34375 1.9431,0.068 3.0072,0.16485 3.1875,0.1875 0.1188,-0.1944 0.3846,-0.72881 0.9375,-0.875 0.7418,-0.19612 5.1311,-0.82878 7.25,-1.09375 1.7564,-0.21961 4.4053,-0.33231 6.3125,0.0312 0.3169,0.0604 0.6058,0.18938 0.875,0.28125 1.9362,0.66092 7.8438,2.9375 7.8438,2.9375 -10e-5,0 -6.5367,-2.80655 -7.375,-3.15625 -0.2005,-0.0836 -0.5762,-0.17333 -1.0313,-0.25 1.2037,-0.65046 5.0191,-1.37195 7.7188,-2 2.9667,-0.6902 3.2889,-0.75507 5.3125,-0.875 2.0886,-0.1238 3.2812,-0.0312 3.2812,-0.0312 0,1e-5 -0.087,-0.63205 1,-1.03125 0.7292,-0.2678 5.0472,-1.33797 7.125,-1.8125 2.0085,-0.45869 5.1679,-1.0293 7,-0.625 1.8781,0.41446 13.5782,3.01563 13.5782,3.01563 0,0 -12.3275,-3.02266 -13.1407,-3.26563 -0.1945,-0.0581 -0.5586,-0.10626 -1,-0.125 1.1676,-0.80369 3.5142,-1.6873 6.1094,-2.70312 1.6814,-0.65818 0.9237,-0.37659 2.7759,-1.0036 1.7536,-0.59366 2.4854,-1.01071 2.6304,-1.11299 0.3461,-0.20651 -0.356,-0.12188 -0.5442,-0.0424 z"
4120 id="path8173"
4121 inkscape:connector-curvature="0" />
4122 <path
4123 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7285);enable-background:new"
4124 d="m 1082.625,-275.125 c 1.873,0.39348 4.4961,1.14555 6.0313,1.96875 1.5352,0.82319 2.8222,1.056 5.375,2.5 2.5266,1.42926 4.7958,2.00696 6.9687,2.53125 2.3476,0.56642 5.4354,0.71523 8.8438,1.1875 -1.0889,-0.83975 -6.6074,-1.17245 -8.4063,-1.5625 -1.7989,-0.39006 -3.8941,-1.01616 -6.5937,-2.3125 -2.6997,-1.29634 -3.4944,-1.79896 -5.8125,-2.6875 -2.3182,-0.88854 -4.0044,-1.38314 -6.4063,-1.625 z"
4125 id="path8175"
4126 inkscape:connector-curvature="0" />
4127 <path
4128 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7289);enable-background:new"
4129 d="m 1051.4688,-270 c 1.9053,0.57759 4.5281,1.61572 6.0937,2.59375 1.5656,0.97802 2.8802,1.35981 5.5,3.125 2.593,1.74716 4.9859,2.70927 7.25,3.59375 2.4461,0.95557 5.6826,1.65713 9.4063,3.0625 -1.1896,-1.13784 -7.0631,-2.68675 -8.9375,-3.375 -1.8745,-0.68825 -4.0818,-1.5662 -6.875,-3.28125 -2.7933,-1.71504 -3.5736,-2.2839 -5.9375,-3.40625 -2.3641,-1.12234 -4.0567,-1.83455 -6.5,-2.3125 z"
4130 id="path8177"
4131 inkscape:connector-curvature="0" />
4132 <path
4133 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7293);enable-background:new"
4134 d="m 1020.2188,-266.84375 c 1.9119,0.63811 4.5812,1.75536 6.1562,2.8125 1.5751,1.05715 2.8956,1.50867 5.5313,3.40625 2.6086,1.87821 5.0284,3.03003 7.3125,4.0625 2.4677,1.11545 5.7645,2.1733 9.5312,3.84375 -1.2033,-1.22253 -7.2028,-3.31423 -9.0937,-4.125 -1.891,-0.81077 -4.0649,-1.89379 -6.875,-3.75 -2.8102,-1.8562 -3.6218,-2.47693 -6,-3.71875 -2.3783,-1.2418 -4.1107,-1.97569 -6.5625,-2.53125 z"
4135 id="path8179"
4136 inkscape:connector-curvature="0" />
4137 <path
4138 sodipodi:nodetypes="cssscscsscsssccscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssccscsscscssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsszsszssszzcczzzczzzc"
4139 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7337);enable-background:new"
4140 d="m 1110.1719,-266.89063 c 0.1508,0.0486 0.688,0.631 0.1094,1.48438 -0.8101,1.19459 -5.7049,3.32429 -8.5625,4.125 -2.8449,0.79712 -6.2901,0.97774 -10.5625,-0.375 -4.3016,-1.36195 -5.4697,-2.46872 -10.6563,-4.3125 4.664,2.11517 6.1953,3.95233 10.125,5.34375 1.6207,0.57387 3.3671,0.9396 5.0625,1.03125 -0.4451,0.32563 -1.5303,0.9833 -3.5625,1.59375 -2.7955,0.83969 -6.6491,1.53378 -8.25,1.625 -1.5146,0.0863 -3.142,-0.51249 -3.4375,-0.625 0.1667,0.10308 0.3732,0.37734 -0.25,1.03125 -0.8993,0.94363 -6.1474,1.923 -9.125,2.25 -2.9643,0.32555 -6.5216,-0.016 -10.9062,-1.90625 -3.978,-1.71497 -5.339,-2.91536 -9.4063,-4.75 0,0 0,0.15625 0,0.15625 3.6431,2.09529 5.284,3.88327 8.875,5.5625 1.7302,0.80909 3.5917,1.40876 5.4063,1.71875 -0.5349,0.28676 -1.5578,0.71151 -3.4375,1.03125 -2.869,0.48796 -6.809,0.81614 -8.4375,0.75 -0.8507,-0.0345 -1.7286,-0.18437 -2.4063,-0.40625 -0.6848,-0.21488 -1.1897,-0.44467 -1.3125,-0.5 0.1694,0.10721 0.4311,0.40288 -0.2187,1.03125 -0.9097,0.87962 -6.2461,1.33638 -9.25,1.46875 -2.9905,0.13179 -6.5889,-0.45063 -11,-2.5625 -4.4412,-2.12626 -5.6415,-3.4016 -10.9063,-5.78125 4.7343,2.59704 6.2865,4.6291 10.3438,6.71875 1.6733,0.86185 3.4852,1.49425 5.25,1.9375 -0.4633,0.23332 -1.5894,0.68814 -3.6875,0.9375 -2.8863,0.34298 -6.8346,0.49288 -8.4688,0.375 -1.5462,-0.1115 -3.2312,-0.85696 -3.5312,-1 0.1691,0.12029 0.4138,0.41048 -0.2188,1 -0.9128,0.85073 -6.2441,1.26212 -9.25,1.375 -2.9925,0.11237 -6.5897,-0.49043 -11,-2.59375 -4.00125,-1.90823 -5.38803,-3.13783 -9.46875,-5.09375 -3e-5,0 0,0.15625 0,0.15625 3.65506,2.20392 5.29421,4.05255 8.90625,5.90625 1.74029,0.89315 3.637,1.52827 5.4688,1.96875 -0.54,0.2483 -1.5781,0.61533 -3.4688,0.84375 -2.88568,0.34858 -6.86605,0.52095 -8.5,0.40625 -0.85345,-0.0599 -1.72631,-0.25791 -2.40625,-0.5 -0.6871,-0.2353 -1.18935,-0.47226 -1.3125,-0.53125 0.16998,0.11227 0.46448,0.42225 -0.1875,1.03125 -0.91265,0.8525 -6.27533,1.29337 -9.28125,1.40625 -2.99246,0.11237 -6.59346,-0.52805 -11,-2.59375 -4.43653,-2.07978 -5.64688,-3.33171 -10.90625,-5.65625 4.72938,2.54749 6.29074,4.5778 10.34375,6.625 1.67155,0.84433 3.48554,1.46643 5.25,1.90625 -0.46323,0.23422 -1.5897,0.68407 -3.6875,0.9375 -2.88569,0.34858 -6.8362,0.56952 -8.46875,0.46875 -1.54456,-0.0953 -3.20031,-0.82885 -3.5,-0.96875 0.16899,0.11853 0.38192,0.40385 -0.25,1 -0.91186,0.86028 -6.24665,1.33025 -9.25,1.46875 -2.98995,0.1379 -6.56745,-0.45068 -10.96875,-2.46875 -3.99308,-1.83089 -5.36511,-3.0292 -9.4375,-4.90625 -2e-5,0 0,0.15625 0,0.15625 3.64761,2.13327 5.27033,3.93487 8.875,5.71875 1.73675,0.85951 3.60727,1.45014 5.4375,1.875 -0.53947,0.2529 -1.55063,0.64129 -3.4375,0.90625 -2.87978,0.40436 -6.83813,0.64562 -8.46875,0.5625 -0.85172,-0.0434 -1.7277,-0.20855 -2.40625,-0.4375 -0.68569,-0.22201 -1.1896,-0.44339 -1.3125,-0.5 0.16959,0.10899 0.4319,0.40965 -0.21875,1.03125 -0.91079,0.87014 -6.25021,1.39152 -9.25,1.5625 -2.98633,0.17021 -6.57381,-0.31577 -10.96875,-2.28125 -4.42489,-1.97888 -5.60596,-3.22819 -10.84375,-5.375 4.70997,2.38767 6.27017,4.38873 10.3125,6.34375 1.66715,0.80631 3.46043,1.39658 5.21875,1.78125 -0.46163,0.2487 -1.597,0.71225 -3.6875,1.03125 -2.8756,0.43876 -6.7804,0.7331 -8.40625,0.6875 -1.53823,-0.0431 -3.2328,-0.74522 -3.53125,-0.875 0.16833,0.11282 0.41057,0.41375 -0.21875,1.03125 -0.90812,0.8911 -6.20295,1.52825 -9.1875,1.8125 -2.97118,0.28298 -6.57342,-0.1758 -10.9375,-1.9375 -3.95934,-1.59831 -5.32915,-2.79487 -9.34375,-4.3125 3e-5,0 0,0.15625 0,0.15625 3.5959,1.81135 5.23831,3.58233 8.8125,5.15625 1.72207,0.75835 3.58748,1.28895 5.40625,1.625 -0.53609,0.27908 -1.56658,0.68763 -3.4375,1.0625 -2.85539,0.5721 -6.78942,1.01939 -8.40625,1.03125 -0.84451,0.006 -1.70608,-0.0809 -2.375,-0.25 -0.67591,-0.16151 -1.16009,-0.32923 -1.28125,-0.375 0.16722,0.094 0.42267,0.38348 -0.21875,1.0625 -0.89787,0.95052 -6.18648,1.91708 -9.125,2.4375 -2.92534,0.51809 -6.43215,0.37424 -10.71875,-1.03125 -4.3158,-1.41507 -5.47277,-2.52994 -10.5625,-3.96875 4.57685,1.75101 6.08855,3.56006 10.03125,5 1.62608,0.59389 3.36885,0.95565 5.09375,1.15625 -0.45285,0.29702 -1.55478,0.88339 -3.59375,1.46875 -2.80472,0.80517 -6.63886,1.57583 -8.21875,1.75 -1.49475,0.1648 -3.11623,-0.31681 -3.40625,-0.40625 0.16356,0.0901 0.39278,0.35993 -0.21875,1.0625 -0.88247,1.01385 -6.04452,2.37165 -8.9375,3.0625 -2.88002,0.68778 -6.3356,0.76002 -10.5625,-0.4375 -3.83485,-1.08645 -5.17258,-2.07237 -9.0625,-3.125 -10e-6,0 0,0.15625 0,0.15625 3.48418,1.39485 5.06941,2.9194 8.53125,4.03125 1.66793,0.53572 3.45578,0.78674 5.21875,0.875 -0.51964,0.35212 -1.50039,0.91452 -3.3125,1.53125 -2.76566,0.94125 -6.59024,1.93537 -8.15625,2.15625 -0.81794,0.11539 -1.6331,0.12283 -2.28125,0.0312 -0.65496,-0.0832 -1.1326,-0.21827 -1.25,-0.25 0.16204,0.0746 0.43399,0.34044 -0.1875,1.09375 -0.87,1.05453 -6.00963,2.65925 -8.875,3.4375 -2.85253,0.77476 -6.25912,0.9582 -10.4375,-0.0937 -4.20683,-1.05913 -5.35669,-2.04166 -10.34375,-3.15625 4.48454,1.45946 5.96935,3.13523 9.8125,4.25 1.58504,0.45977 3.28679,0.63825 4.96875,0.6875 -0.44157,0.33676 -1.51251,1.02773 -3.5,1.78125 -2.73393,1.03649 -6.45198,2.16269 -8,2.4375 -1.46462,0.26002 -3.05958,-0.11654 -3.34375,-0.1875 0.16025,0.0796 0.38044,0.32098 -0.21875,1.0625 -0.86466,1.07006 -5.91652,2.81815 -8.75,3.6875 -2.8208,0.86547 -6.2075,1.15631 -10.34375,0.21875 -3.75259,-0.85061 -5.04785,-1.71647 -8.875,-2.59375 0,0 0,0.15625 0,0.15625 3.42796,1.23779 4.98741,2.6323 8.375,3.53125 1.63216,0.43314 3.36704,0.58301 5.09375,0.5625 -0.50893,0.38417 -1.47675,1.02182 -3.25,1.75 -2.70634,1.11134 -6.43633,2.30781 -7.96875,2.625 -0.8004,0.16569 -1.61231,0.21862 -2.25,0.15625 0,0 0,0.51552 0,0.92229 0,0.26507 0,0.48396 0,0.48396 0.22645,-0.14468 0.44891,-0.27261 0.71875,-0.375 1.08052,-0.40998 2.17161,-0.21577 6,-1.6875 3.82843,-1.47174 5.22412,-2.00498 5.90625,-2.40625 0.6796,-0.39978 1.61165,-0.87937 2.21875,-1.53125 1.82685,-0.13775 3.57075,-0.49323 4.9375,-1 2.96812,-1.10052 4.87537,-1.80619 6.78125,-2.46875 1.90586,-0.66254 2.35409,-1.41487 3.40625,-1.78125 1.09155,-0.38011 2.19511,-0.16538 6.0625,-1.53125 3.86745,-1.36586 5.28316,-1.82708 5.96875,-2.21875 0.70109,-0.40052 1.70081,-0.93298 2.3125,-1.59375 1.9708,-0.0547 3.81685,-0.38463 5.28125,-0.875 3.00148,-1.00508 4.92615,-1.62171 6.84375,-2.25 1.5386,-0.5041 2.17402,-1.04677 2.90625,-1.4375 0.23016,-0.13431 0.47574,-0.25373 0.75,-0.34375 1.09823,-0.36048 2.18145,-0.0814 6.09375,-1.3125 3.91233,-1.23113 5.36605,-1.67295 6.0625,-2.03125 0.69388,-0.35697 1.63015,-0.79261 2.25,-1.40625 1.86521,-0.0227 3.63581,-0.26683 5.03125,-0.6875 3.03043,-0.91354 4.99238,-1.4301 6.9375,-1.96875 1.94511,-0.53864 2.42618,-1.26452 3.5,-1.5625 1.11401,-0.30915 2.21994,0.007 6.1875,-1.03125 3.96761,-1.03863 5.41758,-1.43273 6.125,-1.75 0.73487,-0.32959 1.81383,-0.75372 2.4375,-1.375 1.99774,0.116 3.85743,-0.0201 5.34375,-0.375 3.07811,-0.735 5.08344,-1.10094 7.0625,-1.5 1.58792,-0.32018 2.24429,-0.79055 3,-1.09375 0.23757,-0.1068 0.46695,-0.19276 0.75,-0.25 1.13347,-0.22919 2.30448,0.20893 6.34375,-0.5 4.03933,-0.70893 5.50025,-0.92709 6.21875,-1.1875 0.71586,-0.25944 1.70428,-0.56724 2.34375,-1.09375 1.92427,0.23949 3.74788,0.22453 5.1875,0 3.12633,-0.48762 5.15455,-0.70067 7.15625,-0.96875 2.00171,-0.26807 2.48869,-0.94514 3.59375,-1.09375 1.14639,-0.15418 2.27592,0.30157 6.34375,-0.21875 4.06784,-0.52032 5.56013,-0.69573 6.28125,-0.9375 0.7371,-0.24714 1.79809,-0.58623 2.4375,-1.125 2.05007,0.33553 3.97378,0.39796 5.5,0.21875 3.14231,-0.36896 5.17994,-0.55936 7.1875,-0.78125 1.61076,-0.17802 2.26467,-0.6082 3.03125,-0.84375 0.24094,-0.0855 0.49412,-0.1556 0.78125,-0.1875 1.14978,-0.12772 2.30129,0.34665 6.375,-0.125 4.07374,-0.47165 5.55909,-0.6106 6.28125,-0.84375 0.71946,-0.23227 1.70024,-0.47346 2.34375,-0.96875 1.93637,0.33346 3.77006,0.40424 5.21875,0.25 3.14602,-0.33495 5.17756,-0.51859 7.1875,-0.71875 2.00996,-0.20014 2.48414,-0.82639 3.59375,-0.9375 1.15114,-0.11528 2.29643,0.36506 6.375,-0.0625 4.07861,-0.42756 5.58886,-0.56209 6.3125,-0.78125 0.73915,-0.22386 1.79572,-0.51325 2.4375,-1.03125 2.0571,0.39867 4.00187,0.4934 5.53125,0.34375 3.14873,-0.3081 5.17584,-0.47325 7.1875,-0.65625 1.61407,-0.14682 2.2631,-0.56055 3.03125,-0.78125 0.24142,-0.0809 0.49353,-0.12991 0.78125,-0.15625 1.15211,-0.10545 2.29296,0.39275 6.375,0 4.08208,-0.39275 5.5889,-0.53084 6.3125,-0.75 0.7209,-0.21833 1.6997,-0.4477 2.3438,-0.9375 1.938,0.34999 3.7688,0.45438 5.2187,0.3125 3.1487,-0.3081 5.1758,-0.47325 7.1875,-0.65625 2.0116,-0.18299 2.5142,-0.83802 3.625,-0.9375 1.1523,-0.10323 2.2922,0.38483 6.375,0 4.0829,-0.38482 5.5887,-0.501 6.3125,-0.71875 0.7393,-0.22243 1.7956,-0.51449 2.4375,-1.03125 2.0574,0.40177 4.0029,0.50333 5.5313,0.34375 3.1466,-0.32852 5.1771,-0.5227 7.1875,-0.71875 1.613,-0.15729 2.2656,-0.63148 3.0312,-0.875 0.2407,-0.088 0.4632,-0.12137 0.75,-0.15625 1.1483,-0.1397 2.3167,0.33991 6.375,-0.25 4.0583,-0.58992 5.5618,-0.77714 6.2813,-1.03125 0.7167,-0.25316 1.6745,-0.55807 2.3125,-1.09375 1.9197,0.21194 3.7199,0.15141 5.1562,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0938,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5625,-1.28125 1.1288,-0.25066 2.2703,0.11629 6.25,-0.875 3.9796,-0.99128 5.4296,-1.4193 6.125,-1.78125 0.7223,-0.37601 1.7619,-0.87058 2.375,-1.53125 1.963,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.14461 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70653 2.3348,-1.68641 2.5469,-1.98438 0.2122,-0.29796 0.1118,-0.7453 0.1379,-0.76675 0.043,-0.0352 0.3193,-0.085 0.479,-0.42844 0.8589,-1.84708 2.321,-5.64459 2.4352,-6.32945 0.1137,-0.68216 0.1638,-1.34774 0.2145,-1.74497 0.029,-0.22952 -0.1467,-0.86544 -0.1246,-0.92404 0.031,-0.0821 0.3045,-0.26528 0.3599,-0.51471 0.2663,-1.19833 0.089,-2.19129 -0.1251,-3.60893 -0.214,-1.41764 -0.9837,-4.62214 -1.6369,-5.47626 -0.6589,-0.86172 -1.2229,-1.01117 -1.7479,-1.00066 -0.2086,0.26976 0.1368,0.26309 0.1626,0.31261 0.6806,0.0508 0.934,0.36864 1.4192,0.89662 0.4852,0.52798 1.2218,3.85117 1.3584,5.30156 0.1366,1.45039 0.19,2.8602 -0.088,3.46864 -0.2781,0.60845 -0.7232,0.51703 -1.0156,0.58291 0.531,0.18589 0.6698,0.12483 0.7314,0.96929 0.059,0.81338 -0.1332,1.63969 -0.5198,2.80562 -0.3912,1.18001 -1.8452,4.34998 -2.2857,4.59877 -0.4523,0.25551 -0.7314,0.27038 -1.067,0.13944 z"
4141 id="path8181"
4142 inkscape:connector-curvature="0" />
4143 <path
4144 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7297);enable-background:new"
4145 d="m 988.75,-263.84375 c 1.91161,0.6344 4.55027,1.75841 6.125,2.8125 1.57477,1.05409 2.8961,1.48252 5.5313,3.375 2.6082,1.87314 5.0269,3.01522 7.3125,4.0625 2.4693,1.13147 5.7521,2.15474 9.5312,3.9375 -1.2072,-1.2584 -7.139,-3.36445 -9.0312,-4.1875 -1.8922,-0.82304 -4.128,-1.93049 -6.9375,-3.78125 -2.80961,-1.85075 -3.62224,-2.48154 -6.00005,-3.71875 -2.37782,-1.23719 -4.07988,-1.9492 -6.53125,-2.5 z"
4146 id="path8183"
4147 inkscape:connector-curvature="0" />
4148 <path
4149 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7301);enable-background:new"
4150 d="m 957.5,-260.78125 c 1.91,0.6181 4.58288,1.70934 6.15625,2.75 1.57339,1.04066 2.89608,1.48252 5.53125,3.375 2.60823,1.87315 5.02692,3.01521 7.3125,4.0625 2.46931,1.13147 5.75213,2.15475 9.53125,3.9375 -1.20728,-1.2584 -7.20154,-3.3957 -9.09375,-4.21875 -1.89217,-0.82304 -4.09666,-1.9305 -6.90625,-3.78125 -2.80958,-1.85075 -3.59295,-2.43932 -5.96875,-3.65625 -2.37578,-1.21691 -4.11321,-1.93885 -6.5625,-2.46875 z"
4151 id="path8185"
4152 inkscape:connector-curvature="0" />
4153 <path
4154 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7305);enable-background:new"
4155 d="m 926.09375,-257.375 c 1.90772,0.59745 4.55348,1.66384 6.125,2.6875 1.5715,1.02365 2.87022,1.43971 5.5,3.28125 2.60291,1.82273 5.02887,2.9722 7.3125,4 2.4672,1.11041 5.75535,2.09323 9.53125,3.84375 -1.20623,-1.2481 -7.1719,-3.31809 -9.0625,-4.125 -1.89058,-0.8069 -4.10242,-1.89104 -6.90625,-3.6875 -2.80385,-1.79644 -3.62704,-2.40251 -6,-3.59375 -2.37297,-1.19124 -4.05362,-1.90283 -6.5,-2.40625 z"
4156 id="path8187"
4157 inkscape:connector-curvature="0" />
4158 <path
4159 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7309);enable-background:new"
4160 d="m 894.90625,-253.5625 c 1.90213,0.55355 4.58701,1.58887 6.15625,2.59375 1.56923,1.00487 2.87401,1.40864 5.5,3.21875 2.59912,1.79164 5.00034,2.87189 7.28125,3.875 2.46428,1.08374 5.75984,2.04029 9.53125,3.75 -1.2048,-1.23507 -7.17416,-3.24478 -9.0625,-4.03125 -1.88832,-0.78647 -4.0752,-1.8308 -6.875,-3.59375 -2.79977,-1.76294 -3.59919,-2.36836 -5.96875,-3.53125 -2.36957,-1.16288 -4.12325,-1.83412 -6.5625,-2.28125 z"
4161 id="path8189"
4162 inkscape:connector-curvature="0" />
4163 <path
4164 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7313);enable-background:new"
4165 d="m 863.71875,-248.65625 c 1.88062,0.42909 4.50427,1.38038 6.0625,2.3125 1.55823,0.93211 2.85233,1.25776 5.46875,3 2.58971,1.72444 4.98067,2.70802 7.25,3.625 2.45176,0.99069 5.73959,1.87707 9.5,3.5 -1.20131,-1.20734 -7.15249,-3.06609 -9.03125,-3.78125 -1.87875,-0.71517 -4.0854,-1.68442 -6.875,-3.375 -2.78963,-1.69057 -3.58461,-2.22822 -5.9375,-3.28125 -2.35292,-1.05301 -4.02584,-1.71248 -6.4375,-2 z"
4166 id="path8191"
4167 inkscape:connector-curvature="0" />
4168 <path
4169 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7317);enable-background:new"
4170 d="m 833.15625,-241.375 c 1.84836,0.29644 4.46945,0.97632 6,1.78125 1.53058,0.80493 2.81374,1.05573 5.375,2.53125 2.53504,1.46046 4.89068,2.32509 7.125,3.0625 2.41399,0.79668 5.65711,1.46689 9.375,2.84375 -1.18771,-1.12873 -7.08772,-2.58975 -8.9375,-3.15625 -1.84977,-0.5665 -4.00342,-1.37392 -6.75,-2.84375 -2.74657,-1.46983 -3.50136,-1.92028 -5.8125,-2.78125 -2.31115,-0.86095 -4.00471,-1.32009 -6.375,-1.4375 z"
4171 id="path8193"
4172 inkscape:connector-curvature="0" />
4173 <path
4174 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7321);enable-background:new"
4175 d="m 802.90625,-232.3125 c 1.8222,0.21127 4.36576,0.80057 5.875,1.53125 1.50925,0.73066 2.75568,0.92998 5.28125,2.28125 2.49976,1.33746 4.83154,2.04843 7.03125,2.65625 2.37653,0.65667 5.56464,1.07288 9.21875,2.1875 -1.16735,-1.04496 -6.92888,-2.10329 -8.75,-2.5625 -1.82111,-0.45921 -3.95225,-1.12696 -6.65625,-2.4375 -2.70403,-1.31052 -3.47106,-1.7199 -5.75,-2.46875 -2.27895,-0.74883 -3.91325,-1.17931 -6.25,-1.1875 z"
4176 id="path8195"
4177 inkscape:connector-curvature="0" />
4178 <path
4179 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7329);enable-background:new"
4180 d="m 773.1875,-222.1875 c 1.81109,0.1787 4.32059,0.66506 5.8125,1.34375 1.49194,0.67869 2.7534,0.79822 5.25,2.0625 2.47107,1.25138 4.79005,1.89614 6.96875,2.4375 2.35387,0.58488 5.49134,0.89752 9.09375,1.84375 -1.15084,-0.99116 -6.85251,-1.7833 -8.65625,-2.1875 -1.80372,-0.4042 -3.91553,-1.02116 -6.59375,-2.25 -2.67818,-1.22884 -3.40345,-1.61089 -5.65625,-2.28125 -2.25279,-0.67034 -3.89627,-1.00232 -6.21875,-0.96875 z"
4181 id="path8197"
4182 inkscape:connector-curvature="0" />
4183 <path
4184 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7325);enable-background:new"
4185 d="m 743.5625,-211.1875 c 1.79281,0.12911 4.27313,0.54965 5.75,1.1875 1.4769,0.63785 2.7161,0.74156 5.1875,1.9375 2.44618,1.18372 4.72054,1.74666 6.875,2.21875 2.32767,0.51003 5.4196,0.68064 9,1.5625 -1.14379,-0.9706 -6.74759,-1.59065 -8.53125,-1.9375 -1.78367,-0.34684 -3.88285,-0.88756 -6.53125,-2.03125 -2.64841,-1.14368 -3.39495,-1.51631 -5.625,-2.125 -2.23008,-0.60868 -3.82594,-0.90966 -6.125,-0.8125 z"
4186 id="path8199"
4187 inkscape:connector-curvature="0" />
4188 </g>
4189 </g>
4190 <path
4191 sodipodi:nodetypes="ccccccccc"
4192 id="path8201"
4193 d="m 863.87812,475.6679 c 1.64212,-3.218 3.51781,-5.73529 4.86136,-9.84898 0.79872,-3.65789 3.31204,-2.03073 7.26047,-8.3969 1.40193,-2.2395 5.47653,0.39136 8.9651,-2.39911 1.27072,-0.80319 2.88488,-0.40431 4.48256,-0.0631 3.76539,1.31896 5.82576,3.70355 8.33376,5.80837 6.13906,5.97023 20.53414,7.94327 23.48604,6.31346 1.43405,-2.90474 7.88128,-5.40888 12.37437,-11.11168 0.74811,-1.12267 11.72936,-8.74446 14.64721,-6.56599"
4194 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4195 inkscape:connector-curvature="0" />
4196 <path
4197 sodipodi:nodetypes="ccccccccccc"
4198 id="path8203"
4199 d="m 888.50059,465.25071 c 7.36341,-3.23297 13.8109,-8.9084 20.70813,-13.38452 3.31057,-1.96954 6.86983,3.21601 10.796,3.59866 2.29773,-0.21813 3.7129,1.20259 5.68211,1.6415 5.15636,1.31779 2.39793,3.86488 9.97526,6.43972 6.15561,1.7204 8.9074,-6.79847 14.89975,-7.3236 4.87739,-0.50299 8.09892,-0.31603 11.61675,-0.25254 3.92696,0.13889 4.07855,-3.4976 6.06092,-5.3033 2.98056,-2.80522 7.15561,-1.84972 10.14485,-4.7409 1.01754,-1.38468 1.95458,-3.01085 2.73459,-5.10809 0.88201,-2.00034 3.04006,0.30598 4.79823,1.26269"
4200 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4201 inkscape:connector-curvature="0" />
4202 <path
4203 id="path8994"
4204 d="m 403.27922,1056.3058 56.56854,-42.4264 72.12489,14.1421 -46.66904,52.3259 -53.74012,7.0711 -28.28427,-31.1127 z"
4205 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9048);enable-background:accumulate"
4206 inkscape:connector-curvature="0" />
4207 <path
4208 sodipodi:nodetypes="czzzzzzcccccccccczczz"
4209 id="path4189"
4210 d="m 542.27183,1060.5719 c -1.40727,18.8012 -1.1449,32.751 2.08174,49.3033 3.22666,16.5523 16.40609,45.9073 20.33441,63.1837 3.92621,17.2671 2.69413,38.3097 -12.45944,51.1483 -15.31761,12.9774 -42.05128,21.5989 -67.83231,15.7337 -25.78105,-5.8652 -69.54907,-49.2234 -88.59019,-70.2283 -19.11214,-21.0833 -63.76086,-93.8506 -77.93853,-124.2758 -14.17767,-30.4251 -12.65961,-36.7186 -8.11972,-45.52972 -9.36672,-24.5205 -12.41371,-50.06681 -33.71245,-75.57664 30.32547,3.11444 43.88028,26.95633 60.12568,47.13975 -5.52989,-48.07603 -18.05471,-64.4165 -28.37395,-90.7243 29.9943,6.08165 50.57936,31.87239 63.97979,72.7125 9.55415,-3.91791 18.23776,-9.37294 30.18741,-9.0612 -11.2975,-41.6958 -17.94946,-69.91584 -36.68725,-101.06994 53.44196,5.67033 83.65702,80.63932 78.97142,87.9608 9.97797,-2.24399 19.00565,-6.53038 30.43653,-5.65167 -11.24897,-38.34702 -21.04781,-76.8679 -3.65971,-118.64819 0,0 48.28678,65.43688 54.38966,85.80578 6.10287,20.3689 1.51881,38.70051 1.51881,38.70051 0,0 16.95957,31.0853 20.29392,51.09414 3.3731,20.24138 -3.53269,59.10328 -4.94582,77.98328 z"
4211 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4212 inkscape:connector-curvature="0" />
4213 <path
4214 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,995.28646,23.53493)"
4215 clip-path="url(#clipPath3631)"
4216 sodipodi:nodetypes="cccccccccccccccccccccc"
4217 id="path4191"
4218 d="m 719.5,738.69519 18.31177,15.43196 44.41103,-15.38821 23.2772,-25.54375 11.46397,19.22065 30.67161,12.78354 25.09737,5.72837 L 892,723.19519 908.02309,747.02126 947,752.19519 l 10.24541,-6.19852 6.75471,8.6982 25.49988,11.00032 2,-40.5 L 955.94866,710.6576 923.45591,689.1305 883.0038,677.66492 861.69668,662.13148 840,685.19519 755.02878,638.61208 722,676.69519 l -2.5,62 z"
4219 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter3587);enable-background:accumulate"
4220 inkscape:connector-curvature="0" />
4221 <path
4222 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,822.28931,10.93589)"
4223 sodipodi:nodetypes="ccssscsssssssssssssccccscccccccccsscccccccccccssscccccccccccccccsccccssssssssssssscccsssc"
4224 clip-path="url(#clipPath3677)"
4225 id="path4193"
4226 d="m 584,696.5 -6.5625,17.15625 c 0,0 -7.81152,20.36488 -15.6875,43.65625 -3.93799,11.64568 -7.88302,24.04145 -10.9375,35.125 -3.05448,11.08355 -5.33586,20.37986 -5.5,28.28125 -0.39807,19.16196 5.74653,34.8883 8.9375,41.75 -0.77153,3.55523 -1.99137,9.45432 -3.34375,18.09375 -1.92042,12.26821 -3.71827,27.15441 -2.375,39.875 1.38209,13.08835 6.81222,28.18765 12.59375,43.03125 5.78153,14.8436 12.05435,29.22711 15.21875,38.03125 6.63206,18.4519 9.99296,31.5763 11.3125,48.5 0.58135,7.4561 -0.24227,20.336 -1.25,33.375 -1.00773,13.039 -2.18661,26.3014 -1.6875,36.9688 0.98911,21.1398 9.32798,46.8347 33.375,57.9374 22.77483,10.5154 55.32682,11.7022 83.4375,-3.4374 16.15992,-8.7034 30.07634,-27.0976 43.375,-46.9063 13.29866,-19.8087 24.96917,-41.0534 31.9375,-54.9063 15.35292,-30.5212 39.39353,-115.46418 45.625,-152.7187 3.01859,-18.04653 3.92166,-29.06555 2.625,-38.03125 -0.97853,-6.76604 -3.82819,-12.1474 -6.875,-16.21875 2.04274,-27.50791 -0.73207,-51.36878 11.96875,-79.40625 L 840.75,763.375 l -23.8125,9.3125 c -17.48975,6.83753 -28.90164,19.04536 -36.59375,32.0625 -0.32251,0.54577 -0.56314,1.10776 -0.875,1.65625 0.22203,-22.51521 4.40784,-37.63759 6.59375,-58.6875 l 1.96875,-19 L 771,737.375 c -30.59449,15.55571 -45.69489,48.19321 -49.71875,90.21875 -4.24532,-0.62547 -8.8314,-1.01965 -13.8125,-0.84375 -0.29149,-39.18036 -0.39629,-67.03685 8.59375,-99.375 l 5.59375,-20.125 -19.4375,7.65625 c -30.90937,12.20394 -47.85954,41.93073 -56.625,68.375 -4.38273,13.22214 -6.74582,25.80121 -7.59375,35.9375 -0.23203,2.77373 -0.31106,5.31132 -0.3125,7.71875 -3.24187,-0.0364 -6.42052,0.13589 -10.0625,0.5 0.0416,-39.00473 -3.48424,-79.75415 -32.28125,-116.5 L 584,696.5 Z m 5.8125,43.8125 c 16.80691,30.64383 17.47451,63.96728 16.9375,99.75 l -0.21875,15.0625 12.03493,-6.53921 c 8.66205,-3.13302 19.56058,-0.22752 31.93382,-0.83579 l 14.67465,9.3566 -6.3309,-25.7941 c -0.0897,-0.22997 -0.22046,-0.41669 -0.25,-0.71875 -0.19951,-2.03986 -0.22232,-5.47307 0.125,-9.625 0.69464,-8.30386 2.78957,-19.58524 6.625,-31.15625 5.15532,-15.55294 13.48801,-31.19248 25.125,-42.53125 -4.68381,28.63798 -3.21559,60.25934 -3.01164,95.80514 l -2.76593,13.26164 15.49632,-7.59803 c 9.0294,-2.75771 17.18897,-0.34996 29.28125,1.09375 l 13.24632,9.44423 L 741.09375,840 c 1.44793,-30.97177 8.22149,-53.67808 20.71875,-68.875 -2.98688,19.77884 -5.43043,41.7848 0.3125,78.34375 l 1.06552,6.37318 -2.93815,11.51685 10.61711,-8.16818 9.18973,10.22198 -1.54828,-10.4636 L 781.9375,852 c 5.70102,-13.21149 10.17282,-26.21337 16.34375,-36.65625 0.95986,-1.62434 2.03153,-3.06436 3.0625,-4.5625 -3.68066,21.15535 -2.42716,40.20815 -4.09375,57.78125 l -4.68014,7.80698 7.39889,0.22427 c 3.22005,3.48361 3.8675,3.85068 4.5625,8.65625 0.695,4.80557 0.31862,14.40035 -2.5625,31.625 -5.56799,33.28792 -31.84562,77.83981 -43.7404,101.4864 -6.60491,13.1304 -18.52833,57.4859 -31.12335,76.2465 -12.59502,18.7605 -28.53137,39.7673 -37.17204,44.4209 -21.49052,11.5742 -44.55594,25.5059 -60.61889,18.0895 -14.37486,-6.637 -23.03969,-21.1927 -23.81407,-37.7433 -0.38311,-8.188 0.61279,-21.3092 1.625,-34.4062 1.01221,-13.0971 11.28891,-22.5708 15.42339,-36.5626 5.37229,-18.1808 -1.44687,-36.5944 -12.5,-53.93745 -6.48655,-10.17778 -23.9768,-24.2579 -29.54839,-38.5625 -5.57159,-14.3046 -10.36751,-29.00315 -11.28125,-37.65625 -0.92621,-8.77113 0.4225,-23.02502 2.21875,-34.5 1.79625,-11.47497 3.84375,-20.28125 3.84375,-20.28125 l 9.42278,-3.6152 -10.48528,-3.8848 c 0,0 -8.49889,-15.3101 -8.09375,-34.8125 0.0711,-3.42316 1.83626,-12.72805 4.71875,-23.1875 2.88249,-10.45945 6.76466,-22.55271 10.625,-33.96875 3.04439,-9.00308 5.78063,-16.60345 8.34375,-23.6875 z"
4227 style="display:inline;opacity:0.58775509;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3898);enable-background:new"
4228 inkscape:connector-curvature="0" />
4229 <g
4230 transform="translate(276,136)"
4231 clip-path="url(#clipPath3622)"
4232 id="g3617"
4233 style="display:inline;enable-background:new">
4234 <path
4235 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9024);enable-background:accumulate"
4236 d="m -15.66751,843.48852 -49.49748,-15.55635 -26.87005,52.3259 41.01219,45.25484 49.49747,-38.18377 -14.14213,-43.84062 z"
4237 id="path4195"
4238 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,-52.200498,74.09707)"
4239 inkscape:connector-curvature="0" />
4240 <path
4241 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9020);enable-background:accumulate"
4242 d="m 118.70648,859.93048 -55.154328,-46.66904 -43.84062,36.76955 33.94113,53.74011 -13.596814,85.46203 -39.44536579,28.29217 -41.01220021,11.3137 -2.82842,46.669 56.56854,25.4559 18.943987,-69.65 23.45655,-58.85663 46.347541,-72.61491 16.62,-39.91188 z"
4243 id="path4197"
4244 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,-46.92842,75.511284)"
4245 sodipodi:nodetypes="ccccccccccccc"
4246 inkscape:connector-curvature="0" />
4247 </g>
4248 <path
4249 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,229.07158,211.51128)"
4250 id="path4199"
4251 d="m -70.82184,932.58397 60.81118,-26.87005 100.40916,31.1127 -63.63961,31.11269 -82.02438,-16.97056 -15.55635,-18.38478 z"
4252 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9044);enable-background:accumulate"
4253 inkscape:connector-curvature="0" />
4254 <path
4255 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,822.28931,10.93589)"
4256 clip-path="url(#clipPath4177)"
4257 sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccczzzcccccc"
4258 id="path4201"
4259 d="m 583.0625,715.75 c -12.10609,34.44974 -26.7145,68.53333 -31.75,104.84375 -0.83208,14.92867 4.58915,29.15943 8.84375,43.0625 -5.91624,27.20126 -10.13681,56.89995 1.15625,83.125 13.51717,38.16085 35.00147,75.68215 32.42279,117.46825 -0.9483,29.2942 -9.01444,60.9941 5.38971,88.2817 10.19864,19.3348 33.13956,27.3117 53.96785,27.6676 27.86219,1.1741 56.46261,-11.6216 72.0009,-35.2613 22.59549,-29.3717 41.80051,-61.4973 55.23865,-96.0598 16.89053,-45.506 29.6718,-92.56072 37.93402,-140.3989 1.8244,-12.94106 3.10108,-27.46985 -4.57892,-38.82255 -3.43115,-7.33632 0.0421,-15.56014 -0.68457,-23.30977 0.674,-24.99466 4.01232,-50.66376 16.65332,-72.59648 -17.73313,6.4446 -35.07268,16.55971 -44.00307,33.86425 -3.93508,6.70955 -7.60482,13.57413 -11.37193,20.38575 -3.54999,-30.01408 3.71963,-59.64828 6.78125,-89.28125 -20.16604,9.05463 -36.87672,25.65522 -44.17495,46.682 -6.30463,15.58003 -8.80222,32.31718 -10.26255,49.03675 -8.25334,-1.51925 -16.68447,-2.10155 -25.0625,-1.5 -0.96308,-38.69787 -0.46696,-79.40715 10.96875,-115.90625 -18.68113,6.21776 -35.16621,18.73551 -45.62803,35.38723 -13.85254,20.87979 -21.2614,45.75395 -23.05947,70.61277 0.58534,4.32454 -0.0613,11.84009 -6.34375,9.875 -5.33118,0.0176 -10.62908,0.67883 -15.9375,1.09375 1.14784,-39.38148 -3.34144,-81.6282 -27.0625,-114.21875 -3.06071,-3.63717 -5.63685,-7.68438 -8.625,-11.34375 -0.9375,2.4375 -1.875,4.875 -2.8125,7.3125 z m 7.75,13.84375 c 18.56527,29.29629 22.4825,64.82012 22.125,98.875 0.20409,5.17526 -0.51656,11.8292 0.125,16.0625 12.31856,-6.10275 26.73912,-2.4399 39.78125,-2.1875 2.31712,1.22325 3.1921,1.65243 1.90625,-1.40625 -4.16455,-13.95285 -1.84828,-28.613 1.80504,-42.40764 6.36687,-26.29064 20.62828,-51.08798 42.81996,-67.02986 -8.61709,37.23706 -5.71658,76.56161 -6.09375,113.96875 12.25344,-6.9099 27.27879,-3.44613 40.03125,-0.25 3.39222,3.5348 2.28935,-0.72948 2.1875,-3.8125 -0.48309,-21.37058 4.13133,-43.06963 13.6875,-62.15625 5.96266,-10.68727 14.24338,-19.80379 22.4375,-28.875 -7.87156,33.8381 -9.2029,69.33593 -2.71875,103.5 1.72485,-1.41118 4.60681,-0.45414 5.65625,-0.375 9.68369,-21.23682 16.35112,-45.38062 34.89016,-60.74185 1.87329,-0.37122 -1.44818,8.52495 -1.48391,11.8981 -3.53488,21.84581 -7.17516,44.14234 -8.78421,66.21911 -8.78379,2.34171 2.84835,2.32354 3.46875,4.0625 7.92311,10.5658 4.66299,24.40472 3.63165,36.35334 -7.06405,45.03355 -22.14231,87.36194 -35.95355,130.6798 -12.07476,32.9493 -27.3742,58.8525 -47.88808,87.2015 -10.95257,13.5514 -23.24472,27.8513 -40.84375,32.5 -20.15601,6.2413 -44.20676,10.8769 -62.59956,0.046 -17.28966,-12.3414 -21.02393,-35.7089 -19.26226,-55.6864 0.0488,-15.8262 4.93886,-28.5121 4.4106,-43.4918 -0.53824,-15.2629 -2.29135,-30.5647 -6.54261,-46.8663 -4.25126,-16.30162 -9.04325,-24.91794 -16.11906,-41.57338 -7.24111,-17.04456 -15.07015,-36.74863 -18.20542,-56.28842 -1.74948,-18.62714 2.89171,-37.12262 5.78125,-55.25 3.29623,-2.83696 -1.59799,-5.19659 -2.3125,-8.1875 -7.60113,-17.01508 -8.40747,-36.7749 -2.74234,-54.55998 7.1302,-25.0723 15.76087,-49.63241 24.67984,-74.12752 0.70833,1.30208 1.41667,2.60417 2.125,3.90625 z"
4260 style="display:inline;opacity:0.58775509;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4105);enable-background:new"
4261 inkscape:connector-curvature="0" />
4262 <path
4263 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,995.28646,23.53493)"
4264 clip-path="url(#clipPath3631)"
4265 sodipodi:nodetypes="cccccccc"
4266 id="path4203"
4267 d="m 735.05635,733.03834 2.75542,21.08881 44.41103,-15.38821 4.85063,-22.38975 -3.93617,-22.05222 -22.45163,-36.59301 -8.28004,30.30494 -17.34924,45.02944 z"
4268 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4130);enable-background:accumulate"
4269 inkscape:connector-curvature="0" />
4270 <path
4271 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,995.28646,23.53493)"
4272 clip-path="url(#clipPath3631)"
4273 sodipodi:nodetypes="cccccccc"
4274 id="path4205"
4275 d="m 831.81321,730.29452 15.82237,14.90486 20.85473,2.89994 -1.59029,-39.92598 8.32561,-30.50842 -7.16499,-6.34106 -21.69669,20.9424 -14.55074,38.02826 z"
4276 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4141);enable-background:accumulate"
4277 inkscape:connector-curvature="0" />
4278 <g
4279 transform="translate(276,136)"
4280 clip-path="url(#clipPath8338)"
4281 style="display:inline;filter:url(#filter8333);enable-background:new"
4282 id="g8317">
4283 <path
4284 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4285 d="m 964.00012,754.69487 18.42881,7.46479 9.07107,-36.96447 -14.87031,4.83886 -12.62957,24.66082 z"
4286 id="path4209"
4287 sodipodi:nodetypes="ccccc"
4288 clip-path="none"
4289 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,719.28646,-112.46507)"
4290 inkscape:connector-curvature="0" />
4291 <rect
4292 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4293 id="rect8315"
4294 width="182"
4295 height="177"
4296 x="-55"
4297 y="757.19519" />
4298 </g>
4299 <g
4300 transform="translate(276,136)"
4301 clip-path="url(#clipPath8359)"
4302 style="display:inline;filter:url(#filter8354);enable-background:new"
4303 id="g8346">
4304 <path
4305 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4306 d="m 910.14441,746.31415 32.61295,5.17393 -0.36119,-23.87619 7.18853,-29.68221 -8.45112,-5.26365 -21.82194,26.51077 -9.16723,27.13735 z"
4307 id="path4207"
4308 sodipodi:nodetypes="ccccccc"
4309 clip-path="none"
4310 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,719.28646,-112.46507)"
4311 inkscape:connector-curvature="0" />
4312 <rect
4313 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4314 id="rect8344"
4315 width="165"
4316 height="176"
4317 x="-22"
4318 y="696.19519" />
4319 </g>
4320 <path
4321 sodipodi:nodetypes="czzzzzzcccccccccczczz"
4322 id="path8848"
4323 d="m 1036.164,1071.8338 c 6.7941,18.9028 10.4937,33.2997 11.8903,51.2119 1.3966,17.9123 -3.7827,51.8008 -2.9005,70.6561 0.8818,18.8452 8.1337,40.099 27.3446,48.9689 19.4189,8.9658 49.3193,10.2113 74.1199,-3.1456 24.8006,-13.357 57.401,-70.3255 70.9742,-97.3087 13.6239,-27.0839 38.7611,-114.4974 44.6608,-149.76859 5.8998,-35.27121 2.5506,-41.30077 -4.6174,-49.05549 2.6403,-27.84015 -1.4998,-54.93543 13.1096,-87.18618 -30.249,11.8257 -37.3823,40.1607 -48.3189,65.50508 -8.0009,-50.93293 0.2092,-71.27319 3.3189,-101.21936 -29.0647,14.77791 -42.8615,47.11402 -45,92.85714 -10.9239,-1.3042 -21.3914,-4.43423 -33.5714,-0.71429 -0.264,-46.02334 -1.4635,-76.88941 8.9106,-114.20649 -53.2554,21.02686 -62.9472,106.5941 -56.0535,112.77792 -10.8828,0.535 -21.371,-1.2973 -32.8571,2.85715 0.6389,-42.57135 -0.2605,-84.90861 -30,-122.85715 0,0 -30.958,80.92234 -31.4286,103.57143 -0.4705,22.64909 9.4516,40.16588 9.4516,40.16588 0,0 -8.568,36.74051 -6.2986,58.23223 2.2959,21.74142 20.4429,59.67622 27.2655,78.65812 z"
4324 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4325 inkscape:connector-curvature="0" />
4326 <path
4327 transform="translate(276,136)"
4328 clip-path="url(#clipPath3631)"
4329 sodipodi:nodetypes="cccccccccccccccccccccc"
4330 id="path3635"
4331 d="m 719.5,738.69519 18.31177,15.43196 44.41103,-15.38821 23.2772,-25.54375 11.46397,19.22065 30.67161,12.78354 25.09737,5.72837 L 892,723.19519 908.02309,747.02126 947,752.19519 l 10.24541,-6.19852 6.75471,8.6982 25.49988,11.00032 2,-40.5 L 955.94866,710.6576 923.45591,689.1305 883.0038,677.66492 861.69668,662.13148 840,685.19519 755.02878,638.61208 722,676.69519 l -2.5,62 z"
4332 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter3587);enable-background:accumulate"
4333 inkscape:connector-curvature="0" />
4334 <path
4335 sodipodi:nodetypes="ccssscsssssssssssssccccscccccccccsscccccccccccssscccccccccccccccsccccssssssssssssscccsssc"
4336 clip-path="url(#clipPath3677)"
4337 id="path3669"
4338 d="m 584,696.5 -6.5625,17.15625 c 0,0 -7.81152,20.36488 -15.6875,43.65625 -3.93799,11.64568 -7.88302,24.04145 -10.9375,35.125 -3.05448,11.08355 -5.33586,20.37986 -5.5,28.28125 -0.39807,19.16196 5.74653,34.8883 8.9375,41.75 -0.77153,3.55523 -1.99137,9.45432 -3.34375,18.09375 -1.92042,12.26821 -3.71827,27.15441 -2.375,39.875 1.38209,13.08835 6.81222,28.18765 12.59375,43.03125 5.78153,14.8436 12.05435,29.22711 15.21875,38.03125 6.63206,18.4519 9.99296,31.5763 11.3125,48.5 0.58135,7.4561 -0.24227,20.336 -1.25,33.375 -1.00773,13.039 -2.18661,26.3014 -1.6875,36.9688 0.98911,21.1398 9.32798,46.8347 33.375,57.9374 22.77483,10.5154 55.32682,11.7022 83.4375,-3.4374 16.15992,-8.7034 30.07634,-27.0976 43.375,-46.9063 13.29866,-19.8087 24.96917,-41.0534 31.9375,-54.9063 15.35292,-30.5212 39.39353,-115.46418 45.625,-152.7187 3.01859,-18.04653 3.92166,-29.06555 2.625,-38.03125 -0.97853,-6.76604 -3.82819,-12.1474 -6.875,-16.21875 2.04274,-27.50791 -0.73207,-51.36878 11.96875,-79.40625 L 840.75,763.375 l -23.8125,9.3125 c -17.48975,6.83753 -28.90164,19.04536 -36.59375,32.0625 -0.32251,0.54577 -0.56314,1.10776 -0.875,1.65625 0.22203,-22.51521 4.40784,-37.63759 6.59375,-58.6875 l 1.96875,-19 L 771,737.375 c -30.59449,15.55571 -45.69489,48.19321 -49.71875,90.21875 -4.24532,-0.62547 -8.8314,-1.01965 -13.8125,-0.84375 -0.29149,-39.18036 -0.39629,-67.03685 8.59375,-99.375 l 5.59375,-20.125 -19.4375,7.65625 c -30.90937,12.20394 -47.85954,41.93073 -56.625,68.375 -4.38273,13.22214 -6.74582,25.80121 -7.59375,35.9375 -0.23203,2.77373 -0.31106,5.31132 -0.3125,7.71875 -3.24187,-0.0364 -6.42052,0.13589 -10.0625,0.5 0.0416,-39.00473 -3.48424,-79.75415 -32.28125,-116.5 L 584,696.5 Z m 5.8125,43.8125 c 16.80691,30.64383 17.47451,63.96728 16.9375,99.75 l -0.21875,15.0625 12.03493,-6.53921 c 8.66205,-3.13302 19.56058,-0.22752 31.93382,-0.83579 l 14.67465,9.3566 -6.3309,-25.7941 c -0.0897,-0.22997 -0.22046,-0.41669 -0.25,-0.71875 -0.19951,-2.03986 -0.22232,-5.47307 0.125,-9.625 0.69464,-8.30386 2.78957,-19.58524 6.625,-31.15625 5.15532,-15.55294 13.48801,-31.19248 25.125,-42.53125 -4.68381,28.63798 -3.21559,60.25934 -3.01164,95.80514 l -2.76593,13.26164 15.49632,-7.59803 c 9.0294,-2.75771 17.18897,-0.34996 29.28125,1.09375 l 13.24632,9.44423 L 741.09375,840 c 1.44793,-30.97177 8.22149,-53.67808 20.71875,-68.875 -2.98688,19.77884 -5.43043,41.7848 0.3125,78.34375 l 1.06552,6.37318 -2.93815,11.51685 10.61711,-8.16818 9.18973,10.22198 -1.54828,-10.4636 L 781.9375,852 c 5.70102,-13.21149 10.17282,-26.21337 16.34375,-36.65625 0.95986,-1.62434 2.03153,-3.06436 3.0625,-4.5625 -3.68066,21.15535 -2.42716,40.20815 -4.09375,57.78125 l -4.68014,7.80698 7.39889,0.22427 c 3.22005,3.48361 3.8675,3.85068 4.5625,8.65625 0.695,4.80557 0.31862,14.40035 -2.5625,31.625 -5.56799,33.28792 -31.79272,123.1659 -43.6875,146.8125 -6.60491,13.1304 -18.02998,33.8957 -30.625,52.6563 -12.59502,18.7605 -27.35933,35.5338 -36,40.1874 -21.49052,11.5742 -48.7808,10.2602 -64.84375,2.8438 -14.37486,-6.637 -20.53812,-23.4494 -21.3125,-40 -0.38311,-8.188 0.61279,-21.3092 1.625,-34.4062 1.01221,-13.0971 11.28891,-22.5708 15.42339,-36.5626 5.37229,-18.1808 -1.44687,-36.5944 -12.5,-53.93745 -6.48655,-10.17778 -23.9768,-24.2579 -29.54839,-38.5625 -5.57159,-14.3046 -10.36751,-29.00315 -11.28125,-37.65625 -0.92621,-8.77113 0.4225,-23.02502 2.21875,-34.5 1.79625,-11.47497 3.84375,-20.28125 3.84375,-20.28125 l 9.42278,-3.6152 -10.48528,-3.8848 c 0,0 -8.49889,-15.3101 -8.09375,-34.8125 0.0711,-3.42316 1.83626,-12.72805 4.71875,-23.1875 2.88249,-10.45945 6.76466,-22.55271 10.625,-33.96875 3.04439,-9.00308 5.78063,-16.60345 8.34375,-23.6875 z"
4339 style="display:inline;opacity:0.58775509;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3898);enable-background:new"
4340 transform="translate(450.03125,73.843964)"
4341 inkscape:connector-curvature="0" />
4342 <g
4343 transform="translate(276,136)"
4344 clip-path="url(#clipPath3636)"
4345 id="g3628">
4346 <path
4347 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9024);enable-background:accumulate"
4348 d="m 824.48651,818.48242 -49.49748,-15.55635 -26.87005,52.3259 41.01219,45.25484 49.49747,-38.18377 -14.14213,-43.84062 z"
4349 id="path8988"
4350 inkscape:connector-curvature="0" />
4351 <path
4352 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9020);enable-background:accumulate"
4353 d="m 964.49365,855.25197 -55.15433,-46.66904 -43.84062,36.76955 33.94113,53.74011 7.07106,66.46804 -50.91168,35.35537 -41.0122,11.3137 -2.82842,46.669 56.56854,25.4559 63.63961,-76.3676 24.04163,-94.75227 8.48528,-57.98276 z"
4354 id="path8990"
4355 inkscape:connector-curvature="0" />
4356 </g>
4357 <path
4358 id="path8992"
4359 d="m 1045.3322,1043.5779 60.8112,-26.8701 100.4091,31.1127 -63.6396,31.1127 -82.0244,-16.9706 -15.5563,-18.3847 z"
4360 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9044);enable-background:accumulate"
4361 inkscape:connector-curvature="0" />
4362 <path
4363 clip-path="url(#clipPath4177)"
4364 sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccczzzcccccc"
4365 id="path4149"
4366 d="m 583.0625,715.75 c -12.10609,34.44974 -26.7145,68.53333 -31.75,104.84375 -0.83208,14.92867 4.58915,29.15943 8.84375,43.0625 -5.91624,27.20126 -10.13681,56.89995 1.15625,83.125 13.51717,38.16085 35.00147,75.68215 32.42279,117.46825 -0.9483,29.2942 -9.01444,60.9941 5.38971,88.2817 10.19864,19.3348 33.13956,27.3117 53.96785,27.6676 27.86219,1.1741 56.46261,-11.6216 72.0009,-35.2613 22.59549,-29.3717 41.80051,-61.4973 55.23865,-96.0598 16.89053,-45.506 29.6718,-92.56072 37.93402,-140.3989 1.8244,-12.94106 3.10108,-27.46985 -4.57892,-38.82255 -3.43115,-7.33632 0.0421,-15.56014 -0.68457,-23.30977 0.674,-24.99466 4.01232,-50.66376 16.65332,-72.59648 -17.73313,6.4446 -35.07268,16.55971 -44.00307,33.86425 -3.93508,6.70955 -7.60482,13.57413 -11.37193,20.38575 -3.54999,-30.01408 3.71963,-59.64828 6.78125,-89.28125 -20.16604,9.05463 -36.87672,25.65522 -44.17495,46.682 -6.30463,15.58003 -8.80222,32.31718 -10.26255,49.03675 -8.25334,-1.51925 -16.68447,-2.10155 -25.0625,-1.5 -0.96308,-38.69787 -0.46696,-79.40715 10.96875,-115.90625 -18.68113,6.21776 -35.16621,18.73551 -45.62803,35.38723 -13.85254,20.87979 -21.2614,45.75395 -23.05947,70.61277 0.58534,4.32454 -0.0613,11.84009 -6.34375,9.875 -5.33118,0.0176 -10.62908,0.67883 -15.9375,1.09375 1.14784,-39.38148 -3.34144,-81.6282 -27.0625,-114.21875 -3.06071,-3.63717 -5.63685,-7.68438 -8.625,-11.34375 -0.9375,2.4375 -1.875,4.875 -2.8125,7.3125 z m 7.75,13.84375 c 18.56527,29.29629 22.4825,64.82012 22.125,98.875 0.20409,5.17526 -0.51656,11.8292 0.125,16.0625 12.31856,-6.10275 26.73912,-2.4399 39.78125,-2.1875 2.31712,1.22325 3.1921,1.65243 1.90625,-1.40625 -4.16455,-13.95285 -1.84828,-28.613 1.80504,-42.40764 6.36687,-26.29064 20.62828,-51.08798 42.81996,-67.02986 -8.61709,37.23706 -5.71658,76.56161 -6.09375,113.96875 12.25344,-6.9099 27.27879,-3.44613 40.03125,-0.25 3.39222,3.5348 2.28935,-0.72948 2.1875,-3.8125 -0.48309,-21.37058 4.13133,-43.06963 13.6875,-62.15625 5.96266,-10.68727 14.24338,-19.80379 22.4375,-28.875 -7.87156,33.8381 -9.2029,69.33593 -2.71875,103.5 1.72485,-1.41118 4.60681,-0.45414 5.65625,-0.375 9.68369,-21.23682 16.35112,-45.38062 34.89016,-60.74185 1.87329,-0.37122 -1.44818,8.52495 -1.48391,11.8981 -3.53488,21.84581 -3.2972,44.17323 -4.90625,66.25 -1.31238,1.37679 2.84835,2.32354 3.46875,4.0625 7.92311,10.5658 3.12294,24.83149 2.0916,36.78011 -7.06405,45.03355 -21.76553,88.37934 -35.57677,131.69714 -12.07476,32.9493 -30.7197,63.08 -51.23358,91.429 -10.95257,13.5514 -23.24472,27.8513 -40.84375,32.5 -20.15601,6.2413 -43.57595,5.1744 -61.96875,-5.6562 -17.28966,-12.3414 -21.02393,-35.7089 -19.26226,-55.6864 0.0488,-15.8262 2.37211,-27.8008 7.91747,-42.8053 5.54535,-15.0045 2.47105,-31.3317 -1.78021,-47.6333 -4.25126,-16.3016 -12.17903,-26.26002 -21.82158,-42.20417 -9.64255,-15.94415 -17.6369,-36.03734 -20.77217,-55.57713 -1.74948,-18.62714 2.89171,-37.12262 5.78125,-55.25 3.29623,-2.83696 -1.59799,-5.19659 -2.3125,-8.1875 -7.60113,-17.01508 -8.40747,-36.7749 -2.74234,-54.55998 7.1302,-25.0723 15.76087,-49.63241 24.67984,-74.12752 0.70833,1.30208 1.41667,2.60417 2.125,3.90625 z"
4367 style="display:inline;opacity:0.58775509;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4185);enable-background:new"
4368 transform="translate(450.03125,73.843964)"
4369 inkscape:connector-curvature="0" />
4370 <path
4371 transform="translate(276,136)"
4372 clip-path="url(#clipPath3631)"
4373 sodipodi:nodetypes="cccccccc"
4374 id="path3902"
4375 d="m 735.05635,733.03834 2.75542,21.08881 44.41103,-15.38821 4.85063,-22.38975 -3.93617,-22.05222 -22.45163,-36.59301 -8.28004,30.30494 -17.34924,45.02944 z"
4376 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4130);enable-background:accumulate"
4377 inkscape:connector-curvature="0" />
4378 <path
4379 transform="translate(276,136)"
4380 clip-path="url(#clipPath3631)"
4381 sodipodi:nodetypes="cccccccc"
4382 id="path4135"
4383 d="m 831.81321,730.29452 15.82237,14.90486 20.85473,2.89994 -1.59029,-39.92598 8.32561,-30.50842 -7.16499,-6.34106 -21.69669,20.9424 -14.55074,38.02826 z"
4384 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4141);enable-background:accumulate"
4385 inkscape:connector-curvature="0" />
4386 <g
4387 transform="translate(276,136)"
4388 clip-path="url(#clipPath8392)"
4389 style="filter:url(#filter8379)"
4390 id="g8367">
4391 <path
4392 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4393 d="m 910.14441,746.31415 32.61295,5.17393 -0.36119,-23.87619 7.18853,-29.68221 -8.45112,-5.26365 -21.82194,26.51077 -9.16723,27.13735 z"
4394 id="path4145"
4395 sodipodi:nodetypes="ccccccc"
4396 clip-path="none"
4397 inkscape:connector-curvature="0" />
4398 <rect
4399 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4400 id="rect8365"
4401 width="123.03658"
4402 height="172.53406"
4403 x="877.51953"
4404 y="650.19098" />
4405 </g>
4406 <g
4407 transform="translate(276,136)"
4408 clip-path="url(#clipPath8417)"
4409 style="filter:url(#filter8404)"
4410 id="g8400">
4411 <path
4412 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4413 d="m 964.00012,754.69487 18.42881,7.46479 9.07107,-36.96447 -14.87031,4.83886 -12.62957,24.66082 z"
4414 id="path4147"
4415 sodipodi:nodetypes="ccccc"
4416 clip-path="none"
4417 inkscape:connector-curvature="0" />
4418 <rect
4419 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4420 id="rect8398"
4421 width="142.12846"
4422 height="125.1579"
4423 x="924.89569"
4424 y="677.06104" />
4425 </g>
4426 </g> 952 </g>
4427 <rect 953 <g transform="matrix(.9991 .27421 -.11493 2.3838 2962.6 1209.8)" clip-path="url(#fx)">
4428 id="rect6247" 954 <path d="M1056.2-278.8c4.145-1.479 10 3.125 10 3.125.899.28 2.725-.894 2.624-1.686 0 0-1.55-1.86-.374-2.939s5.296 1.507 7.5 1.625 5.562-.23 7-.75 1.113-1.425 2.625-1.75 5.119 1.038 7.06 1.169 4.649.334 5.815-.169.178-1.16 1.875-1.875 7.76-.957 9.625-.125 1.81.52 2.625 3 7.44 5.163-1.125 13.375-59.378 13.786-65.625 2.75 6.23-14.271 10.375-15.75z" enable-background="new" filter="url(#fw)" opacity=".75"/>
4429 width="440" 955 <path d="M1058.5-275.43c4.145-1.479 10 3.125 10 3.125.899.28 2.725-.894 2.624-1.686 0 0-1.55-1.86-.374-2.939s5.296 1.507 7.5 1.625 5.562-.23 7-.75 1.113-1.425 2.625-1.75 5.119 1.038 7.06 1.169 4.649.334 5.815-.169.178-1.16 1.875-1.875 7.76-.957 9.625-.125 1.81.52 2.625 3 7.44 5.163-1.125 13.375-59.378 13.786-65.625 2.75 6.23-14.271 10.375-15.75z" enable-background="new" filter="url(#fv)" opacity=".75"/>
4430 height="376"
4431 x="548"
4432 y="205.32275"
4433 style="opacity:1;fill:none;fill-opacity:1;stroke:#f8d615;stroke-width:18;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
4434 <rect
4435 style="opacity:1;fill:none;fill-opacity:1;stroke:#f83615;stroke-width:18;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
4436 id="rect6676"
4437 width="1684"
4438 height="1292"
4439 x="56"
4440 y="53.322754" />
4441 <rect
4442 style="opacity:1;fill:url(#pattern5557);fill-opacity:1;stroke:#f815bb;stroke-width:13.34657478;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
4443 id="rect6731"
4444 width="522.56604"
4445 height="1182.4679"
4446 x="3493.3721"
4447 y="87.178711" />
4448 <g
4449 id="g7477"
4450 transform="matrix(0.53474256,0,0,1,1882.7509,3.0962157)">
4451 <rect
4452 y="99.705269"
4453 x="3039.4895"
4454 height="902.66437"
4455 width="818.51605"
4456 id="rect6979"
4457 style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#f8d615;stroke-width:18;stroke-linejoin:miter;stroke-miterlimit:1;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
4458 <g
4459 clip-path="url(#clipPath6975)"
4460 id="g4303-9"
4461 style="display:inline;enable-background:new"
4462 transform="matrix(1.8806916,0,0,2.3994874,1997.8763,-394.32602)">
4463 <path
4464 inkscape:connector-curvature="0"
4465 style="display:inline;opacity:0.5;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter11361-3);enable-background:new"
4466 d="m 304.64285,526.6479 c -10,0.35715 -18.21428,2.85714 -18.21428,2.85714 l 7.5,6.07143 10.35714,3.57143 16.07143,0.35714 22.5,-5.35714 7.85714,1.07143 20.35715,-2.14286 -10.35715,6.78572 c 5.45923,-1.02361 17.39329,3.56911 9.64286,5.35714 -1.74,0.40142 13.92857,-4.64285 13.92857,-4.64285 l 2.5,-4.64287 3.57143,-9.28571 11.42857,0 18.21428,-4.64286 3.57144,-4.99999 -16.07144,1.07142 -12.14285,2.14286 -14.64286,-5 -70.6921,16.70774 -5.37933,-5.27917 z"
4467 id="path10326-6"
4468 sodipodi:nodetypes="cccccccccsccccccccccc"
4469 transform="matrix(10.726753,0,0,10.726753,-2882.1235,-4565.4583)"
4470 inkscape:export-filename="/home/cheeseness/Documents/LCA09/mascot/tuz_new.png"
4471 inkscape:export-xdpi="142.10527"
4472 inkscape:export-ydpi="142.10527" />
4473 <g
4474 style="display:inline;opacity:1;enable-background:new"
4475 id="g7882-9"
4476 transform="matrix(0.71084,-0.1937433,0.262963,0.9648058,503.68027,136.48399)">
4477 <path
4478 inkscape:connector-curvature="0"
4479 sodipodi:nodetypes="czzzzcc"
4480 id="path7876-3"
4481 d="m 245.12255,100.05344 c 0,0 -47.12811,-31.646921 -67.21465,-35.800939 -20.03792,-4.143963 -38.4729,-3.317578 -51.93364,13.607323 -13.46074,16.924901 -12.07739,61.265196 -13.53554,86.969546 -1.45815,25.70435 2.54945,70.17701 17.6046,88.66552 15.05516,18.4885 45.88634,13.58502 49.92695,21.4137 2.21283,4.28736 65.15228,-174.85515 65.15228,-174.85515 z"
4482 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient7904-7);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4483 <path
4484 inkscape:connector-curvature="0"
4485 sodipodi:nodetypes="czzzzzc"
4486 id="path7878-3"
4487 d="m 135.37935,82.017807 c 0,0 26.34355,1.938783 37.63307,13.903188 11.41494,12.097335 13.73457,21.331515 15.29586,37.734585 1.56337,16.42499 -0.84957,28.41812 -7.81382,36.03734 -6.96425,7.61922 -1.00429,19.58332 -25.91605,12.07107 -24.91176,-7.51225 -27.03224,-27.78298 -26.51523,-46.30475 0.51721,-18.52898 7.31617,-53.441433 7.31617,-53.441433 z"
4488 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient7906-6);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4489 <path
4490 inkscape:connector-curvature="0"
4491 sodipodi:nodetypes="czccssc"
4492 id="path7880-8"
4493 d="m 135.648,81.927211 c 0,0 -4.64465,16.365075 0.58825,28.563099 5.48794,12.79254 27.22425,44.26007 27.22425,54.65565 l 22.65625,-5 c 2.54218,-6.96644 3.21052,-15.75206 2.1875,-26.5 -1.56129,-16.40307 -3.8663,-25.62141 -15.28125,-37.718749 -9.65488,-10.232047 -31.59311,-13.374857 -37.375,-14 z"
4494 style="display:inline;opacity:1;fill:url(#radialGradient7908-0);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
4495 </g>
4496 <path
4497 inkscape:connector-curvature="0"
4498 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4499 d="m 845.03125,1154.7776 c -4.28571,0.7143 -27.62815,3.6181 -57.85714,10 -30.22899,6.3819 -57.31395,4.9661 -135.78608,17.3296 -79.85178,12.5808 -94.06436,42.5423 -108.12225,47.0643 -14.70014,4.7286 -145.37739,-65.8225 -145.37739,-65.8225 l 4.28572,-94.2857 c 0,0 85.88551,-16.2009 112.14285,-33.5714 26.25735,-17.3705 45.58238,-49.66602 59.28572,-71.42861 13.70334,-21.76259 32.85714,-71.42858 32.85714,-71.42858 l 238.57143,262.14289 z"
4500 id="path7917-0"
4501 sodipodi:nodetypes="czzzcczzcc" />
4502 <path
4503 inkscape:connector-curvature="0"
4504 style="display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8888-6);enable-background:accumulate"
4505 d="m 332.34019,898.38549 -32.73181,-61.29956 -37.61734,45.10646 c 2.17675,1.31711 5.77425,-20.85603 45.6004,-64.41708 l 24.74875,80.61018 z"
4506 id="path7919-5"
4507 clip-path="url(#clipPath8658-06)"
4508 sodipodi:nodetypes="ccccc"
4509 transform="translate(276,136)" />
4510 <path
4511 inkscape:connector-curvature="0"
4512 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient6951);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8892-7);enable-background:accumulate"
4513 d="m 200.81833,863.03015 146.3711,-51.61879 243.95184,226.27414 -241.83052,140.0072 -181.01934,-87.6813 32.52692,-226.98125 z"
4514 id="path7923-6"
4515 clip-path="url(#clipPath2833-2)"
4516 sodipodi:nodetypes="cccccc"
4517 transform="translate(276,136)" />
4518 <path
4519 inkscape:connector-curvature="0"
4520 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#0f0f0f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4521 d="m 642.88839,640.13471 c 0,0 -29.55406,40.57305 -47.85714,74.28571 -18.30309,33.71267 -58.62109,126.35694 -70.35714,171.07143 -11.7594,44.80344 -62.5,123.57145 -62.5,123.57145 l 76.07143,18.2143 c 0,0 11.80712,-12.8234 31.07142,-46.07146 19.2643,-33.24808 60.35715,-138.57143 60.35715,-138.57143 l 13.21428,-202.5 z"
4522 id="path7921-6"
4523 sodipodi:nodetypes="czzcczcc" />
4524 <path
4525 inkscape:connector-curvature="0"
4526 style="display:inline;overflow:visible;visibility:visible;opacity:0.4;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8856-2);enable-background:accumulate"
4527 d="m 430.28131,381.94122 c -7.07106,2.82843 -236.18124,32.15181 -236.18124,32.15181 l -39.63961,359.83304 90.19849,92.63961 52.3259,-114.5513 100.46804,-186.39192 32.82842,-183.68124 z"
4528 id="path7925-4"
4529 sodipodi:nodetypes="ccccccc"
4530 clip-path="url(#clipPath3665-9)"
4531 transform="translate(276,136)" />
4532 <path
4533 inkscape:connector-curvature="0"
4534 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4535 d="m 969.67051,1164.0346 c 0,0 23.25628,11.3937 36.06779,20.4761 12.6974,9.0015 29.4724,24.6491 41.6924,37.3605 12.3055,12.8002 20.1127,22.5987 41.5327,24.1608 21.4322,1.5629 53.2824,-8.7876 73.296,-24.6642 20.0135,-15.8766 45.6469,-69.2328 45.6469,-69.2328 l -127.1608,-143.0717"
4536 id="path7927-0"
4537 sodipodi:nodetypes="czzzzcc" />
4538 <path
4539 inkscape:connector-curvature="0"
4540 style="display:inline;overflow:visible;visibility:visible;opacity:0.75;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8860-3);enable-background:accumulate"
4541 d="M 331.34019,641.50471 216.17367,835.36467 260.2153,925.96265 357.79603,732.21539 331.34019,641.50471 Z"
4542 id="path7929-0"
4543 clip-path="url(#clipPath8642-9)"
4544 sodipodi:nodetypes="ccccc"
4545 transform="translate(276,136)" />
4546 <g
4547 style="display:inline;opacity:1;enable-background:new"
4548 id="g7931-4"
4549 transform="matrix(0.9934486,0.1142802,-0.1142802,0.9934486,-9.24324,588.09054)"
4550 inkscape:transform-center-x="-347.89063"
4551 inkscape:transform-center-y="-28.255779">
4552 <path
4553 inkscape:connector-curvature="0"
4554 style="display:inline;opacity:1;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4555 d="m 1049.205,-282.26672 -0.09,0.008 c -1.3874,0.88445 -6.6033,1.6072 -6.629,9.52344 -0.024,7.42525 15.0129,17.09146 17.1563,18.09375 1.7302,0.80909 3.5916,1.40876 5.4063,1.71875 l 1.4374,0.21875 c 1.9197,0.21194 3.72,0.15141 5.1563,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0937,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5626,-1.28125 1.1287,-0.25066 2.2702,0.11629 6.25,-0.875 3.9795,-0.99128 5.4294,-1.4193 6.125,-1.78125 0.7222,-0.37601 1.7617,-0.87058 2.375,-1.53125 1.9629,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.14461 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70653 2.3191,-1.70203 2.5312,-2 0.2123,-0.29796 0.099,-0.72855 0.125,-0.75 0.043,-0.0352 0.3405,-0.094 0.5,-0.4375 0.859,-1.84708 2.3232,-5.62764 2.4376,-6.3125 0.1137,-0.68215 0.168,-1.35277 0.2187,-1.75 0.029,-0.22951 -0.1471,-0.8789 -0.125,-0.9375 0.031,-0.082 0.2883,-0.25057 0.3437,-0.5 0.2663,-1.19832 0.089,-2.20736 -0.125,-3.625 -0.2139,-1.41764 -0.9716,-4.61463 -1.625,-5.46875 -0.4194,-0.54857 -0.7993,-0.7925 -1.1562,-0.90625 -0.067,-0.0173 -0.1239,-0.0467 -0.1875,-0.0625 -0.021,-0.004 -0.042,0.003 -0.062,0 -0.3116,-0.0755 -0.6085,-0.15867 -1.1562,-0.21875 -0.9855,-0.10812 -2.4247,-0.2594 -3.9688,-0.25 -0.5147,0.003 -1.0371,0.0476 -1.5625,0.0937 -3.5589,0.31228 -9.0098,0.99108 -10.2187,1.625 -1.6331,-0.33402 -3.9482,-0.61223 -5.9376,-0.46875 -3.064,0.22097 -4.9677,0.34219 -6.9062,0.46875 -1.9384,0.12655 -1.6861,0.38864 -2.9062,0.46875 -1.3191,0.0866 -1.7869,-0.22325 -5.5626,0.0937 -3.5457,0.29772 -8.9806,0.99317 -10.2187,1.625 -1.6334,-0.33451 -3.9459,-0.61239 -5.9375,-0.46875 -3.0642,0.22098 -4.9678,0.37344 -6.9062,0.5 -0.6592,0.043 -1.0424,0.12393 -1.3438,0.1875 z"
4556 id="path7933-6" />
4557 <g
4558 clip-path="url(#clipPath7616-1)"
4559 style="display:inline;filter:url(#filter7610-9);enable-background:new"
4560 id="g7935-2"
4561 transform="matrix(0.9975712,-0.06965428,0.06965428,0.9975712,872.72062,140.02502)">
4562 <path
4563 inkscape:connector-curvature="0"
4564 sodipodi:nodetypes="ccssscsssscscsscsssccscssccsscssscc"
4565 id="path7937-6"
4566 d="m 229.94262,-409.12268 c -3.55781,0.05 -9.0242,0.36009 -10.30334,0.90414 -1.60609,-0.44747 -3.90316,-0.88131 -5.89995,-0.87674 -3.07199,0.007 -4.96469,0.009 -6.90727,0 -0.66047,-0.003 -1.04759,0.0672 -1.35267,0.10959 0,0 0,1.09593 0,1.09593 0.11972,-0.17947 0.39252,-0.69046 0.94975,-0.76715 0.74758,-0.10289 5.16928,-0.15123 7.31019,-0.1096 1.7746,0.0345 4.45523,0.27427 6.38921,0.95895 0.3214,0.11378 0.61925,0.27378 0.89219,0.41097 1.96342,0.98693 7.94336,4.30154 7.94336,4.30154 0,0 -6.63275,-3.94768 -7.48287,-4.43853 -0.20331,-0.11739 -0.57464,-0.25769 -1.03609,-0.41098 1.22063,-0.44779 5.07597,-0.61971 7.82823,-0.71235 3.0245,-0.10182 3.34776,-0.0896 5.41069,0.19179 2.12931,0.29043 3.33851,0.60276 3.33851,0.60276 -1e-5,0 -0.0784,-0.64118 1.03609,-0.79455 0.74757,-0.10289 5.16929,-0.15123 7.31019,-0.1096 2.0695,0.0403 5.36605,0.40716 7.2814,1.36992 1.00332,0.50433 3.03564,1.56863 4.79535,2.53571 l 0.0956,-0.0194 c 0,0 -3.58034,-2.16242 -4.43047,-2.65327 -0.20331,-0.11739 -0.57463,-0.25769 -1.03609,-0.41098 1.22062,-0.44779 5.04719,-0.61971 7.79945,-0.71235 3.0245,-0.10182 3.34775,-0.0896 5.41069,0.19179 1.95316,0.2664 3.01292,0.53006 3.19461,0.57536 0,0 -0.0271,-0.31146 -0.0271,-0.31146 -0.40903,-0.13645 -0.71424,-0.23335 -1.40038,-0.35748 -1.30081,-0.23533 -3.39912,-0.60156 -5.50857,-0.56398 -3.57195,0.0636 -9.05328,0.35596 -10.30334,0.90414 -1.60583,-0.44695 -3.87662,-0.8813 -5.87117,-0.87674 -3.07199,0.007 -4.99348,0.009 -6.93605,0 -1.94256,-0.009 -1.71268,0.27907 -2.93558,0.27398 -1.32191,-0.005 -1.76612,-0.35463 -5.55459,-0.30138 0,0 0,0 0,0"
4567 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
4568 <path
4569 inkscape:connector-curvature="0"
4570 id="path7939-7"
4571 d="m 206.1989,-407.47878 c 1.92021,0.81706 4.57715,2.19283 6.15897,3.39739 1.58184,1.20456 2.90757,1.77368 5.55459,3.91795 0.88557,0.71738 1.74865,1.34985 2.59193,1.92174 l 0.54057,-0.19011 c -0.71323,-0.48339 -1.46776,-1.02031 -2.26909,-1.62203 -2.82223,-2.11921 -3.62655,-2.80973 -6.01507,-4.27414 -2.38854,-1.4644 -4.09948,-2.36576 -6.5619,-3.1508 0,0 0,0 0,0"
4572 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4573 sodipodi:nodetypes="cssccsscc" />
4574 <path
4575 inkscape:connector-curvature="0"
4576 id="path7941-5"
4577 d="m 237.79963,-407.47878 c 1.92021,0.81706 4.60594,2.19283 6.18775,3.39739 0.81307,0.61916 1.55849,1.07042 2.45046,1.65401 l 0.649,-0.11666 c -0.79831,-0.57637 -1.57177,-1.09435 -2.69653,-1.78394 -2.38854,-1.4644 -4.12826,-2.36576 -6.59068,-3.1508 0,0 0,0 0,0"
4578 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4579 sodipodi:nodetypes="csccscc" />
4580 </g>
4581 <g
4582 clip-path="url(#clipPath7606-1)"
4583 id="g7943-6">
4584 <path
4585 inkscape:connector-curvature="0"
4586 style="display:inline;opacity:0.75;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7578-4);enable-background:new"
4587 d="m 1056.25,-278.80481 c 4.1446,-1.47877 10,3.125 10,3.125 0.899,0.28092 2.7251,-0.89447 2.6243,-1.68614 0,0 -1.5503,-1.86062 -0.3743,-2.93886 1.176,-1.07824 5.296,1.50738 7.5,1.625 2.204,0.11762 5.5621,-0.22941 7,-0.75 1.4379,-0.52059 1.1129,-1.42459 2.625,-1.75 1.5121,-0.32541 5.1189,1.03754 7.0605,1.16883 1.9416,0.13129 4.6481,0.33427 5.8145,-0.16883 1.1664,-0.5031 0.1782,-1.15921 1.875,-1.875 1.6968,-0.71579 7.7602,-0.95662 9.625,-0.125 1.8648,0.83162 1.8099,0.5192 2.625,3 0.8151,2.4808 7.4398,5.16285 -1.125,13.375 -8.5648,8.21215 -59.3779,13.78594 -65.625,2.75 -6.2471,-11.03594 6.2304,-14.27123 10.375,-15.75 z"
4588 id="path7945-9"
4589 sodipodi:nodetypes="czzzzzzzzzzzzzz" />
4590 <path
4591 inkscape:connector-curvature="0"
4592 style="display:inline;opacity:0.75;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7594-8);enable-background:new"
4593 d="m 1058.5,-275.42981 c 4.1446,-1.47877 10,3.125 10,3.125 0.899,0.28092 2.7251,-0.89447 2.6243,-1.68614 0,0 -1.5503,-1.86062 -0.3743,-2.93886 1.176,-1.07824 5.296,1.50738 7.5,1.625 2.204,0.11762 5.5621,-0.22941 7,-0.75 1.4379,-0.52059 1.1129,-1.42459 2.625,-1.75 1.5121,-0.32541 5.1189,1.03754 7.0605,1.16883 1.9416,0.13129 4.6481,0.33427 5.8145,-0.16883 1.1664,-0.5031 0.1782,-1.15921 1.875,-1.875 1.6968,-0.71579 7.7602,-0.95662 9.625,-0.125 1.8648,0.83162 1.8099,0.5192 2.625,3 0.8151,2.4808 7.4398,5.16285 -1.125,13.375 -8.5648,8.21215 -59.3779,13.78594 -65.625,2.75 -6.2471,-11.03594 6.2304,-14.27123 10.375,-15.75 z"
4594 id="path7947-8"
4595 sodipodi:nodetypes="czzzzzzzzzzzzzz" />
4596 </g>
4597 </g>
4598 <path
4599 inkscape:connector-curvature="0"
4600 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#101414;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4601 d="m 628.24553,347.99185 c -3.80443,-25.26423 -16.80972,-50.63802 -17.1568,-75.52523 -0.18626,-13.35552 3.27285,-26.57091 13.75553,-39.55405 36.34702,-65.29583 116.94091,-84.69468 185.93466,-91.46542 86.92239,-11.0168 184.91267,17.94007 233.37138,95.40128 54.124,75.7333 56.6747,172.53912 80.612,259.52795 29.4378,127.1276 54.7791,256.21414 60.3922,386.85035 -3.0634,78.18185 -8.4263,165.18417 -60.5032,228.13417 -48.0265,50.3574 -122.7864,50.053 -187.06985,59.0023 -90.55539,4.655 -184.35153,-16.1458 -261.7839,-64.1982 -64.77564,-37.94 -95.73019,-113.47867 -97.2794,-186.01962 -8.38917,-79.87516 26.39152,-153.80851 51.6204,-227.15961 7.47061,-82.76107 9.41286,-166.24775 9.65334,-249.38484 -0.83682,-32.19544 -7.08953,-63.81733 -11.54636,-95.60908 z"
4602 id="path7949-7"
4603 sodipodi:nodetypes="cscccccccccccc" />
4604 <path
4605 inkscape:connector-curvature="0"
4606 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8940-3);enable-background:accumulate"
4607 d="m 311.83409,415.43155 9.8995,121.62237 -60.10408,136.47161 15.55635,174.65537 c 15.61326,61.8792 32.18545,98.66905 74.37615,117.05383 4.31911,-36.23998 -38.61152,-142.95988 -39.24264,-189.11984 -0.63145,-46.18445 10.83034,-108.60786 30.67767,-158.29647 20.04835,-50.19188 36.89674,-44.84642 42.12489,-92.59293 5.22815,-47.74651 -17.4264,-149.39192 -17.4264,-149.39192 l -55.86144,39.59798 z"
4608 id="path7951-2"
4609 sodipodi:nodetypes="ccccczzzcc"
4610 clip-path="url(#clipPath8616-5)"
4611 transform="translate(276,136)" />
4612 <path
4613 inkscape:connector-curvature="0"
4614 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient6953);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4615 d="m 1010.0312,655.49186 c 0,0 16.7552,37.01806 28.7015,53.95395 11.9462,16.93589 52.7271,56.04605 52.7271,56.04605 l 52.5972,-127.58975"
4616 id="path7953-8"
4617 sodipodi:nodetypes="czcc" />
4618 <path
4619 inkscape:connector-curvature="0"
4620 style="display:inline;overflow:visible;visibility:visible;opacity:0.07999998;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8822-2);enable-background:accumulate"
4621 d="m 730.31998,536.56864 c 0,8.48528 42.54774,58.46803 42.54774,58.46803 l 12.60659,-28.76954 -55.15433,-29.69849 z"
4622 id="path7955-2"
4623 sodipodi:nodetypes="cccc"
4624 clip-path="url(#clipPath8209-6)"
4625 transform="translate(276,136)" />
4626 <g
4627 transform="translate(450.03125,73.843964)"
4628 style="display:inline;opacity:1;enable-background:new"
4629 id="g7957-9"
4630 clip-path="url(#clipPath3998-6)">
4631 <g
4632 transform="translate(-174.03125,62.156036)"
4633 style="filter:url(#filter3677-5)"
4634 id="g7959-9">
4635 <g
4636 id="g7961-6"
4637 style="filter:url(#filter3785-4)">
4638 <path
4639 inkscape:connector-curvature="0"
4640 sodipodi:nodetypes="czzzzzzzzzz"
4641 id="path7963-0"
4642 d="m 425.88244,476.99186 c 10.80543,-1.47866 24.74401,3.35451 44.64286,3.21428 19.89885,-0.14023 57.45322,-16.91122 82.14285,-17.14286 24.68963,-0.23164 62.7517,12.28406 79.28572,15 16.53402,2.71594 22.84832,-0.15852 27.49999,7.85715 4.65167,8.01567 1.92671,10.74724 -10.35714,20.71429 -12.28385,9.96705 -40.78968,12.63632 -66.07143,12.85714 -25.28234,0.22082 -70.38129,7.07852 -95.35714,3.92856 -24.97585,-3.14996 -56.93756,-7.82267 -68.92857,-17.85714 -11.99101,-10.03447 -19.85084,-16.73182 -17.5,-23.92857 2.35084,-7.19675 13.83743,-3.16419 24.64286,-4.64285 z"
4643 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
4644 <rect
4645 y="412.60312"
4646 x="343.6539"
4647 height="181.01935"
4648 width="381.83765"
4649 id="rect7965-2"
4650 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4651 </g>
4652 <g
4653 id="g7967-7"
4654 style="filter:url(#filter3785-4)">
4655 <path
4656 inkscape:connector-curvature="0"
4657 sodipodi:nodetypes="czzzcc"
4658 id="path7969-6"
4659 d="m 687.14286,452.36218 c -10.46169,9.71443 -86.9796,19.00514 -100.71429,29.28572 -13.73469,10.28058 -14.75252,12.88826 -12.14286,20 2.60966,7.11174 6.54527,9.40572 25.71429,8.57142 19.16902,-0.8343 98.57143,-27.62172 98.57143,-21.42857 l -11.42857,-36.42857 z"
4660 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4661 transform="translate(174.03125,-62.156036)" />
4662 <rect
4663 y="344.82138"
4664 x="702.86414"
4665 height="162.63455"
4666 width="207.8894"
4667 id="rect7971-1"
4668 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4669 </g>
4670 </g>
4671 <g
4672 transform="translate(-174.03125,62.156036)"
4673 style="display:inline;opacity:0.18000004;enable-background:new"
4674 id="g7973-3">
4675 <g
4676 id="g7975-2"
4677 style="filter:url(#filter3785-4)">
4678 <path
4679 inkscape:connector-curvature="0"
4680 sodipodi:nodetypes="czzzzzzzzzz"
4681 id="path7977-1"
4682 d="m 425.88244,476.99186 c 10.80543,-1.47866 24.74401,3.35451 44.64286,3.21428 19.89885,-0.14023 57.45322,-16.91122 82.14285,-17.14286 24.68963,-0.23164 62.7517,12.28406 79.28572,15 16.53402,2.71594 22.84832,-0.15852 27.49999,7.85715 4.65167,8.01567 1.92671,10.74724 -10.35714,20.71429 -12.28385,9.96705 -40.78968,12.63632 -66.07143,12.85714 -25.28234,0.22082 -70.38129,7.07852 -95.35714,3.92856 -24.97585,-3.14996 -56.93756,-7.82267 -68.92857,-17.85714 -11.99101,-10.03447 -19.85084,-16.73182 -17.5,-23.92857 2.35084,-7.19675 13.83743,-3.16419 24.64286,-4.64285 z"
4683 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
4684 <rect
4685 y="412.60312"
4686 x="343.6539"
4687 height="181.01935"
4688 width="381.83765"
4689 id="rect7979-5"
4690 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4691 </g>
4692 <g
4693 id="g7981-9"
4694 style="filter:url(#filter3785-4)">
4695 <path
4696 inkscape:connector-curvature="0"
4697 sodipodi:nodetypes="czzzcc"
4698 id="path7983-9"
4699 d="m 687.14286,452.36218 c -10.46169,9.71443 -86.9796,19.00514 -100.71429,29.28572 -13.73469,10.28058 -14.75252,12.88826 -12.14286,20 2.60966,7.11174 6.54527,9.40572 25.71429,8.57142 19.16902,-0.8343 98.57143,-27.62172 98.57143,-21.42857 l -11.42857,-36.42857 z"
4700 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4701 transform="translate(174.03125,-62.156036)" />
4702 <rect
4703 y="344.82138"
4704 x="702.86414"
4705 height="162.63455"
4706 width="207.8894"
4707 id="rect7985-1"
4708 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4709 </g>
4710 </g>
4711 </g>
4712 <path
4713 inkscape:connector-curvature="0"
4714 style="display:inline;overflow:visible;visibility:visible;opacity:0.75;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8802-7);enable-background:accumulate"
4715 d="M 582.65599,-7.4183011 695.79307,78.848726 804.68752,337.64981 842.87128,545.5392 963.07944,637.46308 c 0,0 -12.72793,-287.08535 -19.799,-313.95541 C 936.20938,296.63761 793.37381,-69.643698 793.37381,-69.643698 L 582.65599,-7.4183011 Z"
4716 id="path7987-4"
4717 clip-path="url(#clipPath8604-69)"
4718 sodipodi:nodetypes="cccccscc"
4719 transform="translate(276,136)" />
4720 <path
4721 inkscape:connector-curvature="0"
4722 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient6955);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4723 d="m 964.13839,239.599 c 0,0 8.67732,10.89662 24.10715,11.96428 15.42986,1.06766 49.72166,-39.95267 70.17856,-52.14285 20.4793,-12.20353 47.0464,-26.60225 63.9286,-20.35714 16.8821,6.2451 22.1578,26.43609 27.8571,48.03571 5.6994,21.59961 6.7186,61.81389 -2.6785,92.85715 -9.3972,31.04325 -50.5033,73.10375 -65.3572,103.39285 -14.8539,30.2891 -11.6071,39.82143 -11.6071,39.82143"
4724 id="path7989-9"
4725 sodipodi:nodetypes="czzzzzzc" />
4726 <path
4727 inkscape:connector-curvature="0"
4728 style="display:inline;opacity:1;fill:url(#radialGradient3315-5);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4729 d="m 1124.4955,207.63471 c -15.8928,-0.89286 -49.7188,12.10583 -66.0714,24.28572 -16.4386,12.2439 -29.2209,24.1144 -29.2857,52.14285 -0.065,28.20604 13.1191,39.07641 29.1071,46.96429 15.988,7.88789 33.6862,7.11928 51.9643,-11.78571 18.2782,-18.905 14.2857,-111.60715 14.2857,-111.60715 z"
4730 id="path7991-1"
4731 sodipodi:nodetypes="czzzzc" />
4732 <ellipse
4733 ry="73.928574"
4734 rx="86.428574"
4735 cy="237.00504"
4736 cx="385"
4737 style="display:inline;overflow:visible;visibility:visible;opacity:0.75;fill:url(#radialGradient3543-4);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4120-7);enable-background:accumulate"
4738 id="path7993-0"
4739 transform="matrix(0.9434749,-0.1239943,0.1440089,1.0957669,451.94827,134.5988)"
4740 clip-path="url(#clipPath4100-3)" />
4741 <path
4742 inkscape:connector-curvature="0"
4743 transform="translate(450.03125,73.843964)"
4744 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient3915-6);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4745 d="m 527.60588,407.44884 c 0,0 -122.04144,38.40348 -187.51434,9.63181 -65.47289,-28.77166 -74.37725,-124.71847 -74.37725,-124.71847 0,0 73.38158,-80.50393 129.92078,-83.61476 55.82705,-3.07164 90.57386,20.14332 114.87001,65.85171 24.352,45.81348 17.1008,132.84971 17.1008,132.84971 z"
4746 id="path7995-7"
4747 sodipodi:nodetypes="csczzc"
4748 mask="url(#mask3684-3)" />
4749 <path
4750 inkscape:connector-curvature="0"
4751 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#linearGradient6957);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4752 d="m 772.17411,393.349 c 0,0 36.21754,-27.38247 51.60714,-35.89286 15.17734,-8.39301 25.71428,-11.60714 35.89285,-11.60714 l -15.53571,66.96428"
4753 id="path7997-5"
4754 sodipodi:nodetypes="czcc" />
4755 <circle
4756 r="36.25"
4757 cy="306.64789"
4758 cx="409.28571"
4759 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient3933-8);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4760 id="path7999-8"
4761 transform="translate(449.49554,74.915393)" />
4762 <path
4763 inkscape:connector-curvature="0"
4764 style="display:inline;overflow:visible;visibility:visible;opacity:0.3;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8806-6);enable-background:accumulate"
4765 d="m 311.83409,415.43155 9.8995,121.62237 -60.10408,136.47161 15.55635,174.65537 c 15.61326,61.8792 32.18545,98.66905 74.37615,117.05383 4.31911,-36.23998 8.68161,-72.36764 -31.24264,-223.11984 l 17.67767,-69.29647 72.12489,-138.59293 -42.4264,-158.39192 -55.86144,39.59798 z"
4766 id="path8001-7"
4767 sodipodi:nodetypes="cccccccccc"
4768 clip-path="url(#clipPath8616-5)"
4769 transform="translate(276,136)" />
4770 <path
4771 inkscape:connector-curvature="0"
4772 style="display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8826-9);enable-background:accumulate"
4773 d="m 635.21025,581.13004 c -14.14214,12.72792 39.23347,34.58015 76.36753,24.04163 37.13406,-10.53852 104.64487,-35.56437 103.23759,-79.19596 -1.40728,-43.63158 -76.36753,-128.69343 -76.36753,-128.69343 L 635.21025,581.13004 Z"
4774 id="path8003-0"
4775 sodipodi:nodetypes="czzcc" />
4776 <circle
4777 r="23.214285"
4778 cy="306.64789"
4779 cx="410"
4780 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient3991-0);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4781 id="path8005-4"
4782 transform="translate(449.67411,74.915393)" />
4783 <circle
4784 r="7.5"
4785 cy="303.07648"
4786 cx="414.28571"
4787 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter3981-7);enable-background:accumulate"
4788 id="path8007-8"
4789 transform="translate(451.99554,73.486821)" />
4790 <path
4791 inkscape:connector-curvature="0"
4792 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4112-7);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4793 d="m 789.31696,478.349 c 0,0 7.02281,19.56859 -1.07143,35 -8.09424,15.43141 -42.32317,38.98822 -67.49999,50 -25.30972,11.06991 -85.473,32.96393 -101.78572,41.96428 -16.46148,9.08243 -18.21428,12.67857 -18.21428,12.67857 0,0 -7.14693,-19.06441 28.74999,-51.7857 36.17211,-32.97214 142.02712,-48.0495 159.82143,-87.85715 z"
4794 id="path8009-0"
4795 sodipodi:nodetypes="czzzczc" />
4796 <g
4797 style="display:inline;opacity:1;enable-background:new"
4798 id="g8011-4"
4799 transform="translate(780.74553,74.55825)">
4800 <path
4801 inkscape:connector-curvature="0"
4802 transform="translate(-329.81481,0)"
4803 clip-path="url(#clipPath3999-0)"
4804 sodipodi:nodetypes="czzczzzszc"
4805 id="path8013-2"
4806 d="m 179.64286,267.36218 c -22.41044,39.70292 -60.6161,115.78029 -69.28571,149.64286 -8.64721,33.7751 -8.77199,66.41654 -0.35715,86.42858 8.3602,19.88213 26.16398,35.6328 40.71428,41.42856 -0.59638,-14.37587 14.37295,-43.28583 72.85715,-72.5 58.62627,-29.28514 78.38163,-27.13086 103.57142,-47.14286 25.63006,-20.36176 8.20587,-79.64664 3.21429,-93.92857 -4.99158,-14.28193 -1.23663,-3.37974 -1.94602,-5.09301 -10.68928,-25.81592 -34.21432,-54.4303 -64.48255,-64.54984 -30.26823,-10.11954 -65.01776,-4.84837 -84.28571,5.71428 z"
4807 style="display:inline;opacity:1;fill:url(#radialGradient3585-2);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
4808 <ellipse
4809 ry="134.00607"
4810 rx="64.715881"
4811 cy="338.07648"
4812 cx="183.57143"
4813 transform="matrix(0.8823874,0.4705236,-0.4705236,0.8823874,-166.62245,2.387362)"
4814 id="path8015-9"
4815 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4060-5);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4816 <ellipse
4817 ry="134.00607"
4818 rx="64.715881"
4819 cy="338.07648"
4820 cx="183.57143"
4821 transform="matrix(0.8823874,0.4705236,-0.4705236,0.8823874,-162.19388,-18.755495)"
4822 id="path8017-6"
4823 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4062-9);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4824 <path
4825 inkscape:connector-curvature="0"
4826 transform="translate(-329.81481,3e-7)"
4827 clip-path="url(#clipPath3999-0)"
4828 sodipodi:nodetypes="czzczzzszc"
4829 id="path8019-1"
4830 d="m 179.64286,267.36218 c -22.41044,39.70292 -60.6161,115.78029 -69.28571,149.64286 -8.64721,33.7751 -8.77199,66.41654 -0.35715,86.42858 8.3602,19.88213 26.16398,35.6328 40.71428,41.42856 -0.59638,-14.37587 14.37295,-43.28583 72.85715,-72.5 58.62627,-29.28514 78.38163,-27.13086 103.57142,-47.14286 25.63006,-20.36176 8.20587,-79.64664 3.21429,-93.92857 -4.99158,-14.28193 -1.23663,-3.37974 -1.94602,-5.09301 -10.68928,-25.81592 -34.21432,-54.4303 -64.48255,-64.54984 -30.26823,-10.11954 -65.01776,-4.84837 -84.28571,5.71428 z"
4831 style="display:inline;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6959);stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4079-1);enable-background:new" />
4832 </g>
4833 <circle
4834 r="19.704132"
4835 cy="398.07648"
4836 cx="310.71429"
4837 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4838 id="path8021-0"
4839 transform="translate(452.55663,72.581273)" />
4840 <circle
4841 r="19.704132"
4842 cy="398.07648"
4843 cx="310.71429"
4844 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4056-5);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6961);stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4083-9);enable-background:accumulate"
4845 id="path8023-4"
4846 transform="translate(450.55663,72.581273)" />
4847 <circle
4848 r="19.704132"
4849 cy="398.07648"
4850 cx="310.71429"
4851 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4119-7);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4852 id="path8025-2"
4853 transform="translate(450.55663,72.581273)" />
4854 <ellipse
4855 ry="44.547726"
4856 rx="72.079735"
4857 cy="377.42877"
4858 cx="429.56738"
4859 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4868-3);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4002-6);enable-background:accumulate"
4860 id="path8027-2"
4861 transform="matrix(0.9969564,-0.07796167,0.07796167,0.9969564,436.61877,125.29509)"
4862 inkscape:transform-center-x="-47.231976"
4863 inkscape:transform-center-y="-3.6935079" />
4864 <ellipse
4865 ry="22.627417"
4866 rx="36.611931"
4867 cy="391.21735"
4868 cx="437.6991"
4869 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient4876-9);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4010-1);enable-background:accumulate"
4870 id="path8029-2"
4871 transform="matrix(1.4357951,-0.06999104,0.06999104,1.4357951,235.18065,-63.86546)"
4872 inkscape:transform-center-x="-20.955902"
4873 inkscape:transform-center-y="-13.056625" />
4874 <g
4875 transform="translate(450.03125,73.843964)"
4876 id="g8031-0"
4877 style="display:inline;opacity:1;filter:url(#filter4053-9);enable-background:new">
4878 <circle
4879 r="3.2142856"
4880 cy="401.82648"
4881 cx="413.66071"
4882 id="path8033-5"
4883 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6963);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4884 <circle
4885 r="3.2142856"
4886 cy="401.82648"
4887 cx="413.66071"
4888 transform="translate(13.125009,8.1249913)"
4889 id="path8035-5"
4890 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6965);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4891 <circle
4892 r="3.2142856"
4893 cy="401.82648"
4894 cx="413.66071"
4895 transform="translate(32.946437,7.4999913)"
4896 id="path8037-2"
4897 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6967);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4898 <circle
4899 r="3.2142856"
4900 cy="401.82648"
4901 cx="413.66071"
4902 transform="translate(24.910723,-10.267866)"
4903 id="path8039-9"
4904 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6969);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4905 <circle
4906 r="3.2142856"
4907 cy="401.82648"
4908 cx="413.66071"
4909 transform="translate(47.589294,-0.6250087)"
4910 id="path8041-0"
4911 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient6971);stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
4912 </g>
4913 <path
4914 inkscape:connector-curvature="0"
4915 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4916 d="m 896.20301,482.92837 c 0.98509,4.35008 4.53707,6.17948 7.38673,7.89182 4.46068,2.51292 6.52016,1.52211 9.15451,-0.75761 1.60195,-1.92117 10.68311,-4.69865 15.59423,-7.07107 4.32961,-1.45891 8.9033,-5.35873 13.38452,-8.33376 3.39514,-1.62724 5.34664,0.35464 7.82868,1.01015 2.94412,0.71661 4.41117,2.17175 6.06092,3.53554 2.39616,1.17519 -0.9279,3.14313 3.283,4.29314 1.19091,0.21794 2.41695,0.57645 3.28299,-0.50507"
4917 id="path8043-2"
4918 sodipodi:nodetypes="ccccccccc" />
4919 <path
4920 inkscape:connector-curvature="0"
4921 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4922 d="m 910.85021,475.35223 c 2.31494,-0.032 3.17778,0.64253 5.49271,-0.82075 3.45564,-3.08113 5.40254,-3.14477 7.95495,-4.41942 3.02657,-1.31523 6.5357,8.15169 10.10153,9.84899 2.39509,-0.82142 1.28914,1.79379 1.45209,2.65165 0.0571,2.64684 2.80694,3.67806 4.35628,5.42957 3.31604,2.25549 7.37523,6.29546 11.11168,5.3033 6.44525,-2.93107 10.27922,-1.28146 16.28871,-7.38674 0.70405,-1.18134 -0.58425,-6.8946 3.09359,-7.19734 2.52399,0.25338 4.16667,0.0502 6.06092,0.56822 5.441,2.11719 7.73778,6.45 14.71034,7.95495 6.1829,0.96639 7.61264,3.79426 13.88959,5.05076"
4923 id="path8045-8"
4924 sodipodi:nodetypes="cccccccccccc" />
4925 <path
4926 inkscape:connector-curvature="0"
4927 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4928 d="m 876.98133,483.52197 c 2.39858,-0.7938 6.10613,4.1921 8.17313,7.04568 0.59281,2.67952 1.15377,5.48645 0.75761,12.12183 0.78513,2.41754 2.68049,3.03095 4.79823,3.283 3.11745,-0.53678 5.87669,-1.3243 7.3236,-3.03046 1.8716,-1.94167 5.31253,2.39394 8.08122,4.04061 3.61009,1.91209 7.77378,1.97886 11.8693,2.27284 1.70358,-0.23064 2.3704,4.51515 3.28299,8.08123 0.38414,4.37806 -0.88544,6.89569 -1.76776,9.84898 -0.2943,2.49655 2.9885,3.52974 6.31345,4.54569 3.18244,0.74124 6.54424,1.66184 9.09137,1.76777 5.14186,0.87491 8.08874,2.69052 12.12183,4.04061 2.23914,0.81655 3.26019,2.24216 4.54569,3.53553"
4929 id="path8047-3"
4930 sodipodi:nodetypes="ccccccccccccc" />
4931 <path
4932 inkscape:connector-curvature="0"
4933 style="display:inline;opacity:0.25;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter8814-5);enable-background:new"
4934 d="m 332,187.69519 c 0,0 57.5,-25.5 57.5,-28 0,-2.5 5.5,-52 5.5,-52 0,0 91,-48.500001 91.5,-50.500001 0.5,-2 86,-62.0000004 86,-62.0000004 L 386.5,17.195189 311,123.19519 l 21,64.5 z"
4935 id="path8049-8"
4936 clip-path="url(#clipPath8514-8)"
4937 transform="translate(276,136)" />
4938 <path
4939 inkscape:connector-curvature="0"
4940 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4941 d="m 1697.2846,722.5514 c 0,0 -115.9655,73.5391 -123.0365,77.78174 -7.0711,4.24264 -230.5169,137.17872 -230.5169,137.17872 l 4.2427,39.59798 216.3747,-100.40917 117.3797,-101.82337 15.5563,-52.3259 z"
4942 id="path8051-0" />
4943 <path
4944 inkscape:connector-curvature="0"
4945 style="display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8810-3);enable-background:accumulate"
4946 d="m 528.91587,556.85291 c -5.65685,-1.41421 -181.01933,74.95332 -181.01933,74.95332 l -33.94113,181.01934 51.09546,193.94823 257.2031,67.6813 c 0,0 206.47518,152.735 212.13203,148.4924 5.65686,-4.2426 168.2914,-193.7473 168.2914,-193.7473 L 842.87128,845.35248 796.20224,667.16157 528.91587,556.85291 Z"
4947 id="path8053-4"
4948 clip-path="url(#clipPath8610-9)"
4949 sodipodi:nodetypes="cccccscccc"
4950 transform="translate(276,136)" />
4951 <path
4952 inkscape:connector-curvature="0"
4953 style="display:inline;opacity:1;fill:#0c0c0c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
4954 d="m 1097.6433,613.88997 c 0,0 22.6195,-6.50681 35.7427,-5.87273 13.1233,0.63409 30.6416,1.93862 43.7089,12.18619 13.0673,10.24756 25.0677,27.14007 34.1124,58.36965 9.0446,31.22958 1.6983,99.25201 -6.1761,143.34735 -7.8743,44.09534 -28.2651,106.11298 -45,140 -16.7348,33.88702 -49.7977,77.49517 -60.5694,89.87617 -11.3642,13.062 -56.2059,36.4262 -79.4306,42.2667 5.3034,-10.6066 48.8998,-50.5889 35,-60.7143 -14.0189,-10.2123 -45.76,45.9824 -84.2931,29.0332 21.38231,-13.1321 41.7794,-51.1861 34.0406,-66.59448 -7.84024,-15.61039 -30.70492,48.75758 -93.53553,37.01288 30.05204,-27.5267 55.40706,-70.90401 41.2627,-82.9797 -14.41516,-12.30687 -60.46175,54.2932 -60.46175,54.2932 0,0 -2.8219,-41.70123 13.7732,-68.60737 16.63935,-26.97787 79.65297,-81.61527 99.55308,-111.70342 19.9002,-30.08814 33.6126,-66.00902 42.1355,-92.51794 8.5228,-26.50892 15.8009,-77.09954 15.8009,-77.09954"
4955 id="path8055-0"
4956 sodipodi:nodetypes="czzzzzzczczczczzzc" />
4957 <path
4958 inkscape:connector-curvature="0"
4959 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8818-1);enable-background:accumulate"
4960 d="m 770.74639,609.17881 -50.91169,97.58074 -79.90307,111.01576 34.64824,71.41778 42.42641,79.19597 72.12489,-45.25484 14.14214,-192.33305 21.2132,-138.59292 -14.14214,-90.15612 -39.59798,107.12668 z"
4961 id="path8057-9"
4962 clip-path="url(#clipPath8622-5)"
4963 sodipodi:nodetypes="cccccccccc"
4964 transform="translate(276,136)" />
4965 <path
4966 inkscape:connector-curvature="0"
4967 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter8810-3);enable-background:accumulate"
4968 d="m 295,846.19519 6.64488,-68.92285 c 0,0 90.31951,89.00457 162.35512,122.92285 72.03561,33.91828 308,62 308,62 l 154,-26 -36,162.00001 -286,26 -298,-89 -11,-189.00001 z"
4969 id="path8059-1"
4970 clip-path="url(#clipPath8906-9)"
4971 sodipodi:nodetypes="cczcccccc"
4972 transform="translate(276,136)" />
4973 <path
4974 inkscape:connector-curvature="0"
4975 transform="translate(450.03125,73.843964)"
4976 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter3587-1);enable-background:new"
4977 d="m 405.79629,845.99023 74.95332,65.05383 2.49963,16.8804 19.40336,10.15891 6.49204,23.05109 31.70905,-8.3711 14.84924,48.08324 c 12.25652,12.7279 89.79344,-113.1097 55.86143,38.1838 l -60.81118,16.2635 -89.20292,-94.69286 -62.82503,-53.79963 7.07106,-60.81118 z"
4978 id="path8061-9"
4979 sodipodi:nodetypes="cccccccccccc"
4980 clip-path="url(#clipPath3602-4)" />
4981 <path
4982 inkscape:connector-curvature="0"
4983 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#121212;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate"
4984 d="m 1159.317,918.349 c 54.2857,-1.42857 126.035,-15.05199 170,-26.78572 44.0527,-11.75714 125.8863,-36.34724 175.357,-57.85714 49.3393,-21.45272 113.6038,-59.2816 154.2859,-92.14285 40.5081,-32.72069 52.3899,-55.81981 60.7142,-33.57143 8.3691,22.36779 -16.4069,56.32562 -37.8571,81.07143 -21.6042,24.9234 -52.7314,52.70533 -98.9287,89.28571 -46.1973,36.58038 -156.0825,101.58463 -212.8571,128.5714 -57.066,27.1254 -128.2033,58.2385 -172.1428,72.5001 -43.9395,14.2616 -131.4286,31.0714 -131.4286,31.0714 L 1159.317,918.349 Z"
4985 id="path8063-6"
4986 sodipodi:nodetypes="czzzzzzzzcc" />
4987 <path
4988 inkscape:connector-curvature="0"
4989 transform="translate(450.03125,73.843964)"
4990 style="display:inline;overflow:visible;visibility:visible;opacity:0.5;fill:url(#linearGradient6973);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter3779-4);enable-background:accumulate"
4991 d="m 1241.5965,652.95007 c 0,0 -64.7215,54.33706 -145.6639,98.99494 -82.0244,45.25484 -284.25704,93.3381 -284.25704,93.3381 0,0 -15.10137,21.05196 45.25489,28.28428 60.35626,7.23232 224.08195,-53.30069 278.60015,-96.16654 54.5182,-42.86585 120.2081,-111.72286 120.2081,-111.72286 l -14.1422,-12.72792 z"
4992 id="path8065-2"
4993 sodipodi:nodetypes="czczzcc"
4994 clip-path="url(#clipPath3992-4)" />
4995 <g
4996 transform="translate(450.03125,73.843964)"
4997 style="display:inline;opacity:1;enable-background:new"
4998 id="g8067-5"
4999 clip-path="url(#clipPath3986-7)">
5000 <g
5001 transform="translate(-174.03125,62.156036)"
5002 style="filter:url(#filter3677-5)"
5003 id="g8069-4">
5004 <g
5005 style="filter:url(#filter3785-4)"
5006 id="g8071-4">
5007 <path
5008 inkscape:connector-curvature="0"
5009 sodipodi:nodetypes="czzccccc"
5010 id="path8073-9"
5011 d="m 1094.2857,725.93361 c 0,0 -0.2961,26.16091 4.6428,37.85715 4.9389,11.69624 20.0381,26.48665 28.5715,31.42857 8.5334,4.94192 18.9286,8.57142 18.9286,8.57142 l 117.8571,-115 17.8572,-75.71428 -96.4286,38.57143 -91.4286,74.28571 z"
5012 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
5013 transform="translate(174.03125,-62.156036)" />
5014 <rect
5015 y="486.14224"
5016 x="1197.8389"
5017 height="309.71277"
5018 width="333.75412"
5019 id="rect8075-9"
5020 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5021 </g>
5022 </g>
5023 <g
5024 transform="translate(-174.03125,62.156036)"
5025 style="display:inline;opacity:0.18000004;enable-background:new"
5026 id="g8077-3">
5027 <g
5028 style="filter:url(#filter3785-4)"
5029 id="g8079-6">
5030 <path
5031 inkscape:connector-curvature="0"
5032 sodipodi:nodetypes="czzccccc"
5033 id="path8081-0"
5034 d="m 1094.2857,725.93361 c 0,0 -0.2961,26.16091 4.6428,37.85715 4.9389,11.69624 20.0381,26.48665 28.5715,31.42857 8.5334,4.94192 18.9286,8.57142 18.9286,8.57142 l 117.8571,-115 17.8572,-75.71428 -96.4286,38.57143 -91.4286,74.28571 z"
5035 style="display:inline;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
5036 transform="translate(174.03125,-62.156036)" />
5037 <rect
5038 y="486.14224"
5039 x="1197.8389"
5040 height="309.71277"
5041 width="333.75412"
5042 id="rect8083-5"
5043 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5044 </g>
5045 </g>
5046 </g>
5047 <path
5048 inkscape:connector-curvature="0"
5049 transform="translate(450.03125,73.843964)"
5050 style="display:inline;overflow:visible;visibility:visible;opacity:0.83300003;fill:#050505;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:15;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;filter:url(#filter8225-7);enable-background:accumulate"
5051 d="m 1264.1875,605 c -4.4911,0.73268 -8.157,3.45509 -11.9375,6.40625 -10.0813,7.86976 -28.1695,34.42524 -48.0312,50.46875 -39.8674,32.20316 -103.996,69.97701 -152.5626,91.09375 -48.614,21.13738 -130.54122,45.81801 -174.31245,57.5 -43.39821,11.58246 -115.04403,25.13107 -168.25,26.53125 l -4.5625,0.125 -2,4.125 -92.84375,192.125 -6.5,13.4688 14.65625,-2.8438 c 0,0 87.26968,-16.6514 132.34375,-31.2812 44.7252,-14.51667 115.79086,-45.66683 173.03125,-72.87505 C 980.82199,912.46306 1090.1551,847.86412 1137.5,810.375 c 46.3608,-36.70982 77.8049,-64.71682 99.9375,-90.25 10.9011,-12.576 22.7448,-27.53144 31.0313,-42.75 8.2864,-15.21856 19.1597,-44.21808 13.6874,-58.84375 -1.2177,-3.25474 -2.5514,-6.0613 -4.5937,-8.5 -2.0423,-2.4387 -8.4747,-1.57199 -8.5625,-5.03125 -0.2098,-8.26482 -3.3155,-0.24423 -4.8125,0 z m 2.1563,15.21875 c 0.4148,0.58574 1.0311,1.55766 1.7812,3.5625 2.8968,7.74213 -1.4407,31.89875 -8.8125,45.4375 -7.3718,13.53875 -22.6384,28.92394 -33.1875,41.09375 -21.0754,24.31356 -51.9037,51.86156 -97.9375,88.3125 -45.0496,35.67159 -155.46033,101.09459 -211.40625,127.6875 -56.89173,27.04249 -128.09616,58.1184 -171.25,72.125 -36.36491,11.8031 -95.84471,23.8338 -115.71875,27.7813 L 714.09375,851.75 c 54.70691,-2.0493 123.79259,-15.21635 167.125,-26.78125 44.33422,-11.83225 126.07865,-36.33633 176.40625,-58.21875 50.112,-21.78871 112.5344,-61.16816 154.0312,-94.6875 20.6464,-16.67721 41.7449,-42.54588 49.8126,-48.84375 2.437,-1.90242 4.0806,-2.6358 4.875,-3 z"
5052 id="path8085-0"
5053 clip-path="url(#clipPath3722-3)"
5054 sodipodi:nodetypes="cssssccccccssssssssccssssssccssssc" />
5055 <g
5056 style="display:inline;opacity:1;enable-background:new"
5057 id="g8087-2"
5058 mask="url(#mask7704-9)"
5059 transform="matrix(0.9934486,0.1142802,-0.1142802,0.9934486,-9.24324,588.09054)"
5060 inkscape:transform-center-x="-185.09603"
5061 inkscape:transform-center-y="-12.859654">
5062 <path
5063 inkscape:connector-curvature="0"
5064 transform="translate(0.08004571,-0.03125)"
5065 style="display:inline;fill:#bcb786;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
5066 d="m 1111.4062,-285.9375 -3.9374,1.875 c -0.041,0.0102 -0.1,0.0205 -0.125,0.0312 -0.4188,0.21285 -0.1647,0.10058 -0.6563,0.3125 -0.4861,0.20956 -1.7376,0.58419 -4.0937,1.46875 -3.3312,1.25058 -5.8043,2.14984 -7,3.0625 -1.5362,0.0213 -3.7205,0.23331 -5.6563,0.71875 -2.9815,0.74767 -4.8552,1.17401 -6.75,1.59375 -1.8948,0.41973 -1.6755,0.64219 -2.875,0.875 -1.2966,0.25167 -1.7214,-0.009 -5.4375,0.78125 -3.4899,0.74215 -8.8948,1.93107 -10.1562,2.6875 -1.584,-0.18078 -3.8675,-0.32178 -5.8438,-0.0312 -3.0404,0.44696 -4.9162,0.67276 -6.8438,0.90625 -0.6554,0.0794 -1.041,0.20078 -1.3437,0.28125 -0.4262,0.13166 -0.6858,0.26002 -1.375,0.34375 -1.3116,0.15937 -1.7622,-0.15683 -5.5313,0.28125 -3.5539,0.41309 -9.0054,1.27282 -10.25,1.9375 -1.599,-0.29729 -3.8577,-0.53419 -5.8437,-0.34375 -3.0588,0.29332 -4.972,0.48399 -6.9063,0.65625 -1.9342,0.17227 -1.6886,0.42237 -2.9062,0.53125 -1.3162,0.1177 -1.7598,-0.16363 -5.5312,0.25 -3.5421,0.38845 -9.0079,1.20927 -10.2813,1.875 -1.5989,-0.29469 -3.8872,-0.50701 -5.875,-0.3125 -3.05829,0.29925 -4.9412,0.48024 -6.875,0.65625 -0.65749,0.0598 -1.04005,0.17856 -1.34375,0.25 -0.4277,0.11896 -0.6835,0.21807 -1.375,0.28125 -1.316,0.12026 -1.75975,-0.19488 -5.53125,0.21875 -3.55619,0.39002 -9.0056,1.23916 -10.25,1.90625 -1.59869,-0.29418 -3.85985,-0.52372 -5.84375,-0.3125 -3.0557,0.32533 -4.97405,0.52624 -6.90625,0.71875 -1.93219,0.19251 -1.68975,0.44088 -2.90625,0.5625 -1.31488,0.13147 -1.76305,-0.16454 -5.53125,0.28125 -3.53889,0.41866 -8.9777,1.29217 -10.25,1.96875 -1.59759,-0.28104 -3.85995,-0.42043 -5.84375,-0.1875 -3.05198,0.35837 -4.945,0.56786 -6.875,0.78125 -0.65618,0.0726 -1.04065,0.17269 -1.34375,0.25 -0.42679,0.12723 -0.6849,0.2672 -1.375,0.34375 -1.31339,0.14569 -1.76735,-0.17402 -5.53125,0.3125 -3.54888,0.45876 -8.97865,1.41902 -10.21875,2.125 -1.59309,-0.24424 -3.8338,-0.38135 -5.8125,-0.125 -3.04759,0.39482 -4.9507,0.64845 -6.875,0.90625 -1.92429,0.25779 -1.7261,0.49353 -2.9375,0.65625 -1.30949,0.1759 -1.7472,-0.10438 -5.5,0.46875 -3.52429,0.53824 -8.9232,1.69917 -10.1875,2.4375 -1.58749,-0.20354 -3.8455,-0.25473 -5.8125,0.0937 -3.02619,0.53612 -4.8989,0.86169 -6.8125,1.1875 -0.65059,0.11077 -1.0137,0.27094 -1.3125,0.375 -0.42069,0.16488 -0.66345,0.3313 -1.34375,0.46875 -1.2947,0.26159 -1.7271,-0.006 -5.4375,0.8125 -3.49848,0.77195 -8.8459,2.38293 -10.0625,3.21875 -1.5629,-0.0774 -3.7575,0.0853 -5.6875,0.59375 -2.97238,0.78313 -4.8177,1.23209 -6.6875,1.75 -1.87,0.5179 -1.66665,0.76728 -2.84375,1.09375 -1.27249,0.3529 -1.69705,0.10709 -5.34375,1.1875 -3.42468,1.01463 -8.6494,2.93317 -9.875,3.84375 -1.53878,0.0127 -3.7198,0.27222 -5.625,0.875 -2.93098,0.92734 -4.75035,1.45842 -6.59375,2.0625 -0.62679,0.20538 -0.99165,0.39258 -1.28125,0.53125 -0.40758,0.21361 -0.6533,0.40875 -1.3125,0.625 -1.2545,0.41154 -1.68615,0.18904 -5.28125,1.4375 -3.38989,1.17717 -8.59495,3.2137 -9.78125,4.15625 -1.52388,0.0597 -3.65005,0.39487 -5.53125,1.0625 -2.89739,1.02829 -4.69905,1.67548 -6.53125,2.3125 -1.8322,0.63701 -1.62785,0.84854 -2.78125,1.25 -1.24679,0.43396 -1.66355,0.19972 -5.21875,1.5625 -3.3387,1.2798 -8.4871,3.48255 -9.6875,4.46875 -1.50718,0.10769 -3.6357,0.4988 -5.5,1.21875 -2.86818,1.1076 -4.6239,1.78156 -6.4375,2.46875 -0.6167,0.23363 -0.99645,0.44203 -1.28125,0.59375 10e-6,0 0,0.0295 0,0.0312 l -8,3.1875 -12.4759,3.49189 7.92966,19.27772 c -0.59163,1.97357 12.54624,-4.73836 12.54624,-4.73836 0.22641,-0.14468 0.44895,-0.27261 0.71875,-0.375 1.08052,-0.40998 2.1716,-0.21577 6,-1.6875 3.82852,-1.47174 5.22405,-2.00498 5.90625,-2.40625 0.67961,-0.39978 1.61175,-0.87937 2.21875,-1.53125 1.82692,-0.13775 3.5708,-0.49323 4.9375,-1 2.968,-1.10052 4.87535,-1.80619 6.78125,-2.46875 1.90581,-0.66254 2.35415,-1.41487 3.40625,-1.78125 1.09162,-0.38011 2.1951,-0.16538 6.0625,-1.53125 3.8674,-1.36586 5.28315,-1.82708 5.96875,-2.21875 0.70111,-0.40052 1.7008,-0.93298 2.3125,-1.59375 1.97081,-0.0547 3.81695,-0.38463 5.28125,-0.875 3.00152,-1.00508 4.92615,-1.62171 6.84375,-2.25 1.53861,-0.5041 2.17415,-1.04677 2.90625,-1.4375 0.23022,-0.13431 0.4759,-0.25373 0.75,-0.34375 1.09832,-0.36048 2.18145,-0.0814 6.09375,-1.3125 3.91231,-1.23113 5.366,-1.67295 6.0625,-2.03125 0.69391,-0.35697 1.6301,-0.79261 2.25,-1.40625 1.86521,-0.0227 3.63585,-0.26683 5.03125,-0.6875 3.0304,-0.91354 4.9924,-1.4301 6.9375,-1.96875 1.94512,-0.53864 2.4262,-1.26452 3.5,-1.5625 1.11402,-0.30915 2.22,0.007 6.1875,-1.03125 3.9675,-1.03863 5.4175,-1.43273 6.125,-1.75 0.7348,-0.32959 1.8139,-0.75372 2.4375,-1.375 1.99782,0.116 3.85745,-0.0201 5.34375,-0.375 3.07811,-0.735 5.0834,-1.10094 7.0625,-1.5 1.58791,-0.32018 2.2443,-0.79055 3,-1.09375 0.23751,-0.1068 0.4669,-0.19276 0.75,-0.25 1.13341,-0.22919 2.30465,0.20893 6.34375,-0.5 4.03942,-0.70893 5.50025,-0.92709 6.21875,-1.1875 0.71581,-0.25944 1.70435,-0.56724 2.34375,-1.09375 1.9242,0.23949 3.7479,0.22453 5.1875,0 3.12642,-0.48762 5.15455,-0.70067 7.15625,-0.96875 2.00171,-0.26807 2.48875,-0.94514 3.59375,-1.09375 1.14642,-0.15418 2.27585,0.30157 6.34375,-0.21875 4.06781,-0.52032 5.56025,-0.69573 6.28125,-0.9375 0.73712,-0.24714 1.7981,-0.58623 2.4375,-1.125 2.05,0.33553 3.9737,0.39796 5.5,0.21875 3.1422,-0.36896 5.18,-0.55936 7.1875,-0.78125 1.61082,-0.17802 2.26465,-0.6082 3.03125,-0.84375 0.24091,-0.0855 0.49405,-0.1556 0.78125,-0.1875 1.1497,-0.12772 2.3013,0.34665 6.375,-0.125 4.0737,-0.47165 5.55905,-0.6106 6.28125,-0.84375 0.71941,-0.23227 1.70025,-0.47346 2.34375,-0.96875 1.9363,0.33346 3.77005,0.40424 5.21875,0.25 3.14601,-0.33495 5.1775,-0.51859 7.1875,-0.71875 2.00991,-0.20014 2.48415,-0.82639 3.59375,-0.9375 1.1511,-0.11528 2.2965,0.36506 6.375,-0.0625 4.0785,-0.42756 5.5889,-0.56209 6.3125,-0.78125 0.73922,-0.22386 1.7956,-0.51325 2.4375,-1.03125 2.057,0.39867 4.00185,0.4934 5.53125,0.34375 3.14871,-0.3081 5.1758,-0.47325 7.1875,-0.65625 1.61401,-0.14682 2.26305,-0.56055 3.03125,-0.78125 0.2413,-0.0809 0.49355,-0.12991 0.78125,-0.15625 1.15211,-0.10545 2.2929,0.39275 6.375,0 4.08211,-0.39275 5.5889,-0.53084 6.3125,-0.75 0.7209,-0.21833 1.6996,-0.4477 2.3437,-0.9375 1.9381,0.34999 3.7689,0.45438 5.2188,0.3125 3.1487,-0.3081 5.1758,-0.47325 7.1875,-0.65625 2.0116,-0.18299 2.5142,-0.83802 3.625,-0.9375 1.1523,-0.10323 2.2922,0.38483 6.375,0 4.0829,-0.38482 5.5887,-0.501 6.3125,-0.71875 0.7393,-0.22243 1.7956,-0.51449 2.4375,-1.03125 2.0574,0.40177 4.0029,0.50333 5.5313,0.34375 3.1465,-0.32852 5.177,-0.5227 7.1874,-0.71875 1.613,-0.15729 2.2657,-0.63148 3.0313,-0.875 0.2407,-0.088 0.4632,-0.12137 0.75,-0.15625 1.1483,-0.1397 2.3167,0.33991 6.375,-0.25 4.0583,-0.58992 5.5618,-0.77714 6.2813,-1.03125 0.7166,-0.25316 1.6746,-0.55807 2.3124,-1.09375 1.9197,0.21194 3.72,0.15141 5.1563,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0937,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5626,-1.28125 1.1287,-0.25066 2.2702,0.11629 6.25,-0.875 3.9795,-0.99127 5.4295,-1.4193 6.125,-1.78125 0.7222,-0.376 1.7617,-0.87058 2.375,-1.53125 1.9629,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.1446 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70652 2.3191,-1.70203 2.5312,-2 0.2123,-0.29795 0.099,-0.72855 0.125,-0.75 0.043,-0.0352 0.3404,-0.094 0.5,-0.4375 0.859,-1.84707 2.3232,-5.62764 2.4376,-6.3125 0.1137,-0.68214 0.168,-1.35277 0.2187,-1.75 0.029,-0.2295 -0.1471,-0.8789 -0.125,-0.9375 0.031,-0.082 0.2883,-0.25057 0.3437,-0.5 0.2663,-1.19831 0.089,-2.20736 -0.125,-3.625 -0.2139,-1.41763 -0.9716,-4.61463 -1.625,-5.46875 -0.6589,-0.86172 -1.2248,-1.01051 -1.75,-1 z"
5067 id="path8089-9"
5068 sodipodi:nodetypes="ccssscsssscssssscsssscssssscsssscssssscsssscssssscsssscssssscsssscssscccccssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsssssssssssc" />
5069 <g
5070 clip-path="url(#clipPath7421-7)"
5071 id="g8091-4">
5072 <path
5073 inkscape:connector-curvature="0"
5074 id="path8093-3"
5075 d="m 1107.409,-284.04961 c -0.4187,0.21283 -0.1556,0.0939 -0.6472,0.30581 -0.4861,0.20954 -1.7234,0.57439 -4.0796,1.45895 -3.3311,1.25057 -5.8302,2.15344 -7.0259,3.0661 -1.5361,0.0213 -3.7205,0.23331 -5.6563,0.71875 -2.9815,0.74766 -4.8552,1.17401 -6.75,1.59375 -1.8948,0.41972 -1.6755,0.64219 -2.875,0.875 -1.2966,0.25166 -1.7214,-0.009 -5.4375,0.78125 -3.4899,0.74214 -8.8948,1.93107 -10.1562,2.6875 -1.5839,-0.18079 -3.8675,-0.32178 -5.8438,-0.0312 -3.0404,0.44695 -4.9162,0.67276 -6.8437,0.90625 -0.6554,0.0794 -1.0411,0.20078 -1.3438,0.28125 -0.4262,0.13165 -0.6858,0.26002 -1.375,0.34375 -1.3116,0.15936 -1.7622,-0.15683 -5.5312,0.28125 -3.5539,0.41308 -9.0054,1.27282 -10.25,1.9375 -1.599,-0.2973 -3.8578,-0.53419 -5.8438,-0.34375 -3.0588,0.29331 -4.972,0.48399 -6.9062,0.65625 -1.9343,0.17226 -1.6887,0.42237 -2.9063,0.53125 -1.3162,0.11769 -1.7598,-0.16363 -5.5312,0.25 -3.5419,0.38844 -9.0079,1.20927 -10.2813,1.875 -1.5989,-0.2947 -3.88717,-0.50701 -5.875,-0.3125 -3.05824,0.29924 -4.94113,0.48024 -6.875,0.65625 -0.65749,0.0598 -1.04004,0.17856 -1.34375,0.25 -0.42765,0.11895 -0.68351,0.21807 -1.375,0.28125 -1.31596,0.12025 -1.75976,-0.19488 -5.53125,0.21875 -3.55614,0.39001 -9.00554,1.23916 -10.25,1.90625 -1.59863,-0.29419 -3.85984,-0.52372 -5.84375,-0.3125 -3.0556,0.32532 -4.97404,0.52624 -6.90625,0.71875 -1.93221,0.1925 -1.68987,0.44088 -2.90625,0.5625 -1.31488,0.13146 -1.76298,-0.16454 -5.53125,0.28125 -3.53887,0.41865 -8.97768,1.29217 -10.25,1.96875 -1.59755,-0.28105 -3.85996,-0.42043 -5.84375,-0.1875 -3.05198,0.35836 -4.94508,0.56786 -6.875,0.78125 -0.6562,0.0725 -1.04066,0.17269 -1.34375,0.25 -0.42677,0.12722 -0.68491,0.2672 -1.375,0.34375 -1.31333,0.14568 -1.76746,-0.17402 -5.53125,0.3125 -3.54889,0.45875 -8.97863,1.41902 -10.21875,2.125 -1.59305,-0.24424 -3.83381,-0.38135 -5.8125,-0.125 -3.04759,0.39481 -4.95071,0.64845 -6.875,0.90625 -1.92428,0.25779 -1.72611,0.49353 -2.9375,0.65625 -1.30946,0.1759 -1.74719,-0.10438 -5.5,0.46875 -3.52429,0.53824 -8.92315,1.69917 -10.1875,2.4375 -1.5875,-0.20354 -3.8455,-0.25473 -5.8125,0.0937 -3.02617,0.53612 -4.89889,0.86169 -6.8125,1.1875 -0.65061,0.11077 -1.01371,0.27094 -1.3125,0.375 -0.42067,0.16488 -0.66345,0.3313 -1.34375,0.46875 -1.29465,0.26159 -1.72712,-0.006 -5.4375,0.8125 -3.49853,0.77195 -8.84595,2.38293 -10.0625,3.21875 -1.56278,-0.0774 -3.75758,0.0853 -5.6875,0.59375 -2.97244,0.78313 -4.81761,1.23209 -6.6875,1.75 -1.86988,0.5179 -1.6666,0.76728 -2.84375,1.09375 -1.27246,0.3529 -1.69703,0.10709 -5.34375,1.1875 -3.4247,1.01463 -8.64944,2.93317 -9.875,3.84375 -1.53883,0.0127 -3.71983,0.27222 -5.625,0.875 -2.93106,0.92734 -4.75031,1.45842 -6.59375,2.0625 -0.62676,0.20538 -0.99173,0.39258 -1.28125,0.53125 -0.40763,0.21361 -0.65334,0.40875 -1.3125,0.625 -1.25446,0.41154 -1.68611,0.18904 -5.28125,1.4375 -3.38985,1.17717 -8.59498,3.2137 -9.78125,4.15625 -1.52389,0.0597 -3.65005,0.39487 -5.53125,1.0625 -2.89739,1.02829 -4.69908,1.67548 -6.53125,2.3125 -1.83217,0.63701 -1.62785,0.84854 -2.78125,1.25 -1.24678,0.43396 -1.66361,0.19972 -5.21875,1.5625 -3.33867,1.2798 -8.48715,3.48255 -9.6875,4.46875 -1.50718,0.10769 -3.63569,0.4988 -5.5,1.21875 -2.86818,1.1076 -4.6238,1.78156 -6.4375,2.46875 -0.61666,0.23363 -0.99641,0.44203 -1.28125,0.59375 0,0 0,1.09375 0,1.09375 0.11178,-0.22236 0.38599,-0.81743 0.90625,-1.09375 0.69797,-0.37072 4.81363,-1.99337 6.8125,-2.71875 1.65686,-0.60125 4.15389,-1.32868 5.96875,-1.3125 0.30162,0.003 0.58762,0.0509 0.84375,0.0937 1.84249,0.30825 7.46875,1.5625 7.46875,1.5625 -10e-6,0 -6.23349,-1.64675 -7.03125,-1.84375 -0.19079,-0.0471 -0.53572,-0.0687 -0.96875,-0.0625 1.14546,-0.86971 4.761,-2.39351 7.34375,-3.4375 2.83822,-1.14727 3.11681,-1.25182 5.0625,-1.65625 2.0083,-0.41744 3.15625,-0.5 3.15625,-0.5 0,10e-6 -0.0824,-0.60114 0.96875,-1.125 0.7051,-0.35141 4.88702,-1.8924 6.90625,-2.5625 1.9519,-0.64773 5.0574,-1.3585 6.875,-1 1.86323,0.3675 7.53125,1.8125 7.53125,1.8125 10e-6,0 -6.287,-1.87111 -7.09375,-2.09375 -0.19292,-0.0532 -0.53084,-0.086 -0.96875,-0.0937 1.15834,-0.83288 4.79444,-2.19532 7.40625,-3.15625 2.87016,-1.05601 3.16734,-1.1618 5.125,-1.53125 1.85349,-0.34979 2.85884,-0.42548 3.03125,-0.4375 0.1136,-0.21724 0.37745,-0.81002 0.90625,-1.0625 0.70944,-0.33874 4.92607,-1.71275 6.96875,-2.3125 1.69317,-0.49711 4.24077,-1.03677 6.09375,-0.90625 0.30795,0.0217 0.61349,0.0973 0.875,0.15625 1.88118,0.42432 7.59375,2.03125 7.59375,2.03125 10e-6,0 -6.34174,-2.06525 -7.15625,-2.3125 -0.19479,-0.0591 -0.55788,-0.10394 -1,-0.125 1.16949,-0.79755 4.86302,-2.05622 7.5,-2.9375 2.89781,-0.96847 3.23301,-1.00332 5.21875,-1.28125 2.04965,-0.28689 3.1875,-0.3125 3.1875,-0.3125 -2e-5,0 -0.0728,-0.60697 1,-1.0625 0.7196,-0.30557 4.99098,-1.50075 7.0625,-2 2.00244,-0.48258 5.19849,-0.92829 7.0625,-0.40625 1.91078,0.53515 7.71875,2.5 7.71875,2.5 0,0 -6.42266,-2.42351 -7.25,-2.71875 -0.19784,-0.0706 -0.58216,-0.14039 -1.03125,-0.1875 1.1879,-0.72865 4.91527,-1.77408 7.59375,-2.5 2.94342,-0.79775 3.29208,-0.77083 5.3125,-0.90625 1.91289,-0.12823 2.94705,-0.0711 3.125,-0.0625 0.11728,-0.20366 0.39176,-0.77948 0.9375,-0.96875 0.73219,-0.25394 5.07852,-1.04789 7.1875,-1.375 1.74813,-0.27111 4.40088,-0.4847 6.3125,-0.0937 0.31766,0.065 0.60522,0.18551 0.875,0.28125 1.94074,0.68873 7.84375,3.09375 7.84375,3.09375 10e-6,0 -6.53471,-2.95077 -7.375,-3.3125 -0.20097,-0.0865 -0.57513,-0.16679 -1.03125,-0.25 1.2065,-0.63318 5.02956,-1.3956 7.75,-1.90625 2.98953,-0.56119 3.30023,-0.52954 5.34375,-0.53125 2.10926,-0.002 3.3125,0.125 3.3125,0.125 0,1e-5 -0.0727,-0.63119 1.03125,-0.9375 0.74052,-0.20547 5.12612,-0.83387 7.25,-1.0625 2.05302,-0.22099 5.31863,-0.25222 7.21875,0.46875 1.94779,0.73907 7.84375,3.375 7.84375,3.375 2e-5,0 -6.56288,-3.17897 -7.40625,-3.5625 -0.20168,-0.0917 -0.54221,-0.18621 -1,-0.28125 1.21092,-0.60188 4.98442,-1.24884 7.71875,-1.65625 3.0048,-0.44772 3.32551,-0.4517 5.375,-0.40625 1.94045,0.043 3.00699,0.19423 3.1875,0.21875 0.11892,-0.19316 0.3839,-0.76583 0.9375,-0.90625 0.74271,-0.18838 5.15429,-0.73428 7.28125,-0.9375 1.76303,-0.16842 4.42009,-0.23429 6.34375,0.25 0.31968,0.0805 0.60351,0.20359 0.875,0.3125 1.95293,0.78349 7.90625,3.46875 7.90625,3.46875 -2e-5,0 -6.59191,-3.25348 -7.4375,-3.65625 -0.20222,-0.0963 -0.57226,-0.20703 -1.03125,-0.3125 1.21414,-0.57427 5.04366,-1.12219 7.78125,-1.5 3.00838,-0.4152 3.32307,-0.44263 5.375,-0.375 2.11798,0.0698 3.3125,0.25 3.3125,0.25 -2e-5,0 -0.0773,-0.63741 1.03125,-0.90625 0.74362,-0.18035 5.15176,-0.66355 7.28125,-0.84375 2.05847,-0.17417 5.34324,-0.12432 7.25,0.65625 1.95459,0.80016 7.875,3.53125 7.875,3.53125 -2e-5,0 -6.55993,-3.30876 -7.40625,-3.71875 -0.20237,-0.0981 -0.57186,-0.2031 -1.03125,-0.3125 1.21517,-0.5639 5.01008,-1.1143 7.75,-1.46875 3.01091,-0.38952 3.32131,-0.39765 5.375,-0.3125 1.94439,0.0806 3.00663,0.25324 3.1875,0.28125 0.11916,-0.19086 0.38277,-0.74531 0.9375,-0.875 0.74426,-0.174 5.14993,-0.65047 7.28125,-0.8125 1.76662,-0.13427 4.4497,-0.12571 6.375,0.375 0.32,0.0832 0.6033,0.20127 0.875,0.3125 1.9546,0.80016 7.9063,3.5625 7.9063,3.5625 -10e-5,0 -6.5912,-3.34001 -7.4375,-3.75 -0.2024,-0.0981 -0.5719,-0.20311 -1.0313,-0.3125 1.2151,-0.5639 5.0413,-1.08306 7.7813,-1.4375 3.0109,-0.38953 3.3525,-0.4289 5.4062,-0.34375 2.1197,0.0879 3.3125,0.3125 3.3125,0.3125 0,0 -0.078,-0.64902 1.0313,-0.90625 0.7443,-0.17256 5.1495,-0.62336 7.2812,-0.78125 2.0606,-0.1526 5.3429,-0.0968 7.25,0.6875 1.955,0.80395 7.875,3.5 7.875,3.5 0,0 -6.5598,-3.27587 -7.4062,-3.6875 -0.2025,-0.0984 -0.5718,-0.20222 -1.0313,-0.3125 1.2154,-0.56154 5.0119,-1.12778 7.75,-1.5 3.009,-0.40905 3.3227,-0.41558 5.375,-0.34375 1.9431,0.068 3.0072,0.16485 3.1875,0.1875 0.1188,-0.1944 0.3846,-0.72881 0.9375,-0.875 0.7418,-0.19612 5.1311,-0.82878 7.25,-1.09375 1.7564,-0.21961 4.4053,-0.33231 6.3125,0.0312 0.3169,0.0604 0.6058,0.18938 0.875,0.28125 1.9362,0.66092 7.8438,2.9375 7.8438,2.9375 -1e-4,0 -6.5367,-2.80655 -7.375,-3.15625 -0.2005,-0.0836 -0.5762,-0.17333 -1.0313,-0.25 1.2037,-0.65046 5.0191,-1.37195 7.7188,-2 2.9667,-0.6902 3.2889,-0.75507 5.3125,-0.875 2.0886,-0.1238 3.2812,-0.0312 3.2812,-0.0312 0,1e-5 -0.087,-0.63205 1,-1.03125 0.7292,-0.2678 5.0472,-1.33797 7.125,-1.8125 2.0085,-0.45869 5.1679,-1.0293 7,-0.625 1.8781,0.41446 13.5782,3.01563 13.5782,3.01563 0,0 -12.3275,-3.02266 -13.1407,-3.26563 -0.1945,-0.0581 -0.5586,-0.10626 -1,-0.125 1.1676,-0.80369 3.5142,-1.6873 6.1094,-2.70312 1.6814,-0.65818 0.9237,-0.37659 2.7759,-1.0036 1.7536,-0.59366 2.4854,-1.01071 2.6304,-1.11299 0.3461,-0.20651 -0.356,-0.12188 -0.5442,-0.0424 z"
5076 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7001-5);enable-background:new"
5077 sodipodi:nodetypes="czscsssscssssscsssscssssscsssscssssscsssscssssscsssscssssscsssscssccsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscc" />
5078 <path
5079 inkscape:connector-curvature="0"
5080 id="path8095-5"
5081 d="m 1082.625,-275.125 c 1.873,0.39348 4.4961,1.14555 6.0313,1.96875 1.5352,0.82319 2.8222,1.056 5.375,2.5 2.5266,1.42926 4.7958,2.00696 6.9687,2.53125 2.3476,0.56642 5.4354,0.71523 8.8438,1.1875 -1.0889,-0.83975 -6.6074,-1.17245 -8.4063,-1.5625 -1.7989,-0.39006 -3.8941,-1.01616 -6.5937,-2.3125 -2.6997,-1.29634 -3.4944,-1.79896 -5.8125,-2.6875 -2.3182,-0.88854 -4.0044,-1.38314 -6.4063,-1.625 z"
5082 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6949-4);enable-background:new" />
5083 <path
5084 inkscape:connector-curvature="0"
5085 id="path8097-1"
5086 d="m 1051.4688,-270 c 1.9053,0.57759 4.5281,1.61572 6.0937,2.59375 1.5656,0.97802 2.8802,1.35981 5.5,3.125 2.593,1.74716 4.9859,2.70927 7.25,3.59375 2.4461,0.95557 5.6826,1.65713 9.4063,3.0625 -1.1896,-1.13784 -7.0631,-2.68675 -8.9375,-3.375 -1.8745,-0.68825 -4.0818,-1.5662 -6.875,-3.28125 -2.7933,-1.71504 -3.5736,-2.2839 -5.9375,-3.40625 -2.3641,-1.12234 -4.0567,-1.83455 -6.5,-2.3125 z"
5087 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6961-8);enable-background:new" />
5088 <path
5089 inkscape:connector-curvature="0"
5090 id="path8099-7"
5091 d="m 1020.2188,-266.84375 c 1.9119,0.63811 4.5812,1.75536 6.1562,2.8125 1.5751,1.05715 2.8956,1.50867 5.5313,3.40625 2.6086,1.87821 5.0284,3.03003 7.3125,4.0625 2.4677,1.11545 5.7645,2.1733 9.5312,3.84375 -1.2033,-1.22253 -7.2028,-3.31423 -9.0937,-4.125 -1.891,-0.81077 -4.0649,-1.89379 -6.875,-3.75 -2.8102,-1.8562 -3.6218,-2.47693 -6,-3.71875 -2.3783,-1.2418 -4.1107,-1.97569 -6.5625,-2.53125 z"
5092 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6957-9);enable-background:new" />
5093 <path
5094 inkscape:connector-curvature="0"
5095 id="path8101-4"
5096 d="m 1110.1719,-266.89063 c 0.1508,0.0486 0.688,0.631 0.1094,1.48438 -0.8101,1.19459 -5.7049,3.32429 -8.5625,4.125 -2.8449,0.79712 -6.2901,0.97774 -10.5625,-0.375 -4.3016,-1.36195 -5.4697,-2.46872 -10.6563,-4.3125 4.664,2.11517 6.1953,3.95233 10.125,5.34375 1.6207,0.57387 3.3671,0.9396 5.0625,1.03125 -0.4451,0.32563 -1.5303,0.9833 -3.5625,1.59375 -2.7955,0.83969 -6.6491,1.53378 -8.25,1.625 -1.5146,0.0863 -3.142,-0.51249 -3.4375,-0.625 0.1667,0.10308 0.3732,0.37734 -0.25,1.03125 -0.8993,0.94363 -6.1474,1.923 -9.125,2.25 -2.9643,0.32555 -6.5216,-0.016 -10.9062,-1.90625 -3.978,-1.71497 -5.339,-2.91536 -9.4063,-4.75 0,0 0,0.15625 0,0.15625 3.6431,2.09529 5.284,3.88327 8.875,5.5625 1.7302,0.80909 3.5917,1.40876 5.4063,1.71875 -0.5349,0.28676 -1.5578,0.71151 -3.4375,1.03125 -2.869,0.48796 -6.809,0.81614 -8.4375,0.75 -0.8507,-0.0345 -1.7286,-0.18437 -2.4063,-0.40625 -0.6848,-0.21488 -1.1897,-0.44467 -1.3125,-0.5 0.1694,0.10721 0.4311,0.40288 -0.2187,1.03125 -0.9097,0.87962 -6.2461,1.33638 -9.25,1.46875 -2.9905,0.13179 -6.5889,-0.45063 -11,-2.5625 -4.4412,-2.12626 -5.6415,-3.4016 -10.9063,-5.78125 4.7343,2.59704 6.2865,4.6291 10.3438,6.71875 1.6733,0.86185 3.4852,1.49425 5.25,1.9375 -0.4633,0.23332 -1.5894,0.68814 -3.6875,0.9375 -2.8863,0.34298 -6.8346,0.49288 -8.4688,0.375 -1.5462,-0.1115 -3.2312,-0.85696 -3.5312,-1 0.1691,0.12029 0.4138,0.41048 -0.2188,1 -0.9128,0.85073 -6.2441,1.26212 -9.25,1.375 -2.9925,0.11237 -6.5897,-0.49043 -11,-2.59375 -4.00125,-1.90823 -5.38803,-3.13783 -9.46875,-5.09375 -3e-5,0 0,0.15625 0,0.15625 3.65506,2.20392 5.29421,4.05255 8.90625,5.90625 1.74029,0.89315 3.637,1.52827 5.4688,1.96875 -0.54,0.2483 -1.5781,0.61533 -3.4688,0.84375 -2.88568,0.34858 -6.86605,0.52095 -8.5,0.40625 -0.85345,-0.0599 -1.72631,-0.25791 -2.40625,-0.5 -0.6871,-0.2353 -1.18935,-0.47226 -1.3125,-0.53125 0.16998,0.11227 0.46448,0.42225 -0.1875,1.03125 -0.91265,0.8525 -6.27533,1.29337 -9.28125,1.40625 -2.99246,0.11237 -6.59346,-0.52805 -11,-2.59375 -4.43653,-2.07978 -5.64688,-3.33171 -10.90625,-5.65625 4.72938,2.54749 6.29074,4.5778 10.34375,6.625 1.67155,0.84433 3.48554,1.46643 5.25,1.90625 -0.46323,0.23422 -1.5897,0.68407 -3.6875,0.9375 -2.88569,0.34858 -6.8362,0.56952 -8.46875,0.46875 -1.54456,-0.0953 -3.20031,-0.82885 -3.5,-0.96875 0.16899,0.11853 0.38192,0.40385 -0.25,1 -0.91186,0.86028 -6.24665,1.33025 -9.25,1.46875 -2.98995,0.1379 -6.56745,-0.45068 -10.96875,-2.46875 -3.99308,-1.83089 -5.36511,-3.0292 -9.4375,-4.90625 -2e-5,0 0,0.15625 0,0.15625 3.64761,2.13327 5.27033,3.93487 8.875,5.71875 1.73675,0.85951 3.60727,1.45014 5.4375,1.875 -0.53947,0.2529 -1.55063,0.64129 -3.4375,0.90625 -2.87978,0.40436 -6.83813,0.64562 -8.46875,0.5625 -0.85172,-0.0434 -1.7277,-0.20855 -2.40625,-0.4375 -0.68569,-0.22201 -1.1896,-0.44339 -1.3125,-0.5 0.16959,0.10899 0.4319,0.40965 -0.21875,1.03125 -0.91079,0.87014 -6.25021,1.39152 -9.25,1.5625 -2.98633,0.17021 -6.57381,-0.31577 -10.96875,-2.28125 -4.42489,-1.97888 -5.60596,-3.22819 -10.84375,-5.375 4.70997,2.38767 6.27017,4.38873 10.3125,6.34375 1.66715,0.80631 3.46043,1.39658 5.21875,1.78125 -0.46163,0.2487 -1.597,0.71225 -3.6875,1.03125 -2.8756,0.43876 -6.7804,0.7331 -8.40625,0.6875 -1.53823,-0.0431 -3.2328,-0.74522 -3.53125,-0.875 0.16833,0.11282 0.41057,0.41375 -0.21875,1.03125 -0.90812,0.8911 -6.20295,1.52825 -9.1875,1.8125 -2.97118,0.28298 -6.57342,-0.1758 -10.9375,-1.9375 -3.95934,-1.59831 -5.32915,-2.79487 -9.34375,-4.3125 3e-5,0 0,0.15625 0,0.15625 3.5959,1.81135 5.23831,3.58233 8.8125,5.15625 1.72207,0.75835 3.58748,1.28895 5.40625,1.625 -0.53609,0.27908 -1.56658,0.68763 -3.4375,1.0625 -2.85539,0.5721 -6.78942,1.01939 -8.40625,1.03125 -0.84451,0.006 -1.70608,-0.0809 -2.375,-0.25 -0.67591,-0.16151 -1.16009,-0.32923 -1.28125,-0.375 0.16722,0.094 0.42267,0.38348 -0.21875,1.0625 -0.89787,0.95052 -6.18648,1.91708 -9.125,2.4375 -2.92534,0.51809 -6.43215,0.37424 -10.71875,-1.03125 -4.3158,-1.41507 -5.47277,-2.52994 -10.5625,-3.96875 4.57685,1.75101 6.08855,3.56006 10.03125,5 1.62608,0.59389 3.36885,0.95565 5.09375,1.15625 -0.45285,0.29702 -1.55478,0.88339 -3.59375,1.46875 -2.80472,0.80517 -6.63886,1.57583 -8.21875,1.75 -1.49475,0.1648 -3.11623,-0.31681 -3.40625,-0.40625 0.16356,0.0901 0.39278,0.35993 -0.21875,1.0625 -0.88247,1.01385 -6.04452,2.37165 -8.9375,3.0625 -2.88002,0.68778 -6.3356,0.76002 -10.5625,-0.4375 -3.83485,-1.08645 -5.17258,-2.07237 -9.0625,-3.125 -10e-6,0 0,0.15625 0,0.15625 3.48418,1.39485 5.06941,2.9194 8.53125,4.03125 1.66793,0.53572 3.45578,0.78674 5.21875,0.875 -0.51964,0.35212 -1.50039,0.91452 -3.3125,1.53125 -2.76566,0.94125 -6.59024,1.93537 -8.15625,2.15625 -0.81794,0.11539 -1.6331,0.12283 -2.28125,0.0312 -0.65496,-0.0832 -1.1326,-0.21827 -1.25,-0.25 0.16204,0.0746 0.43399,0.34044 -0.1875,1.09375 -0.87,1.05453 -6.00963,2.65925 -8.875,3.4375 -2.85253,0.77476 -6.25912,0.9582 -10.4375,-0.0937 -4.20683,-1.05913 -5.35669,-2.04166 -10.34375,-3.15625 4.48454,1.45946 5.96935,3.13523 9.8125,4.25 1.58504,0.45977 3.28679,0.63825 4.96875,0.6875 -0.44157,0.33676 -1.51251,1.02773 -3.5,1.78125 -2.73393,1.03649 -6.45198,2.16269 -8,2.4375 -1.46462,0.26002 -3.05958,-0.11654 -3.34375,-0.1875 0.16025,0.0796 0.38044,0.32098 -0.21875,1.0625 -0.86466,1.07006 -5.91652,2.81815 -8.75,3.6875 -2.8208,0.86547 -6.2075,1.15631 -10.34375,0.21875 -3.75259,-0.85061 -5.04785,-1.71647 -8.875,-2.59375 0,0 0,0.15625 0,0.15625 3.42796,1.23779 4.98741,2.6323 8.375,3.53125 1.63216,0.43314 3.36704,0.58301 5.09375,0.5625 -0.50893,0.38417 -1.47675,1.02182 -3.25,1.75 -2.70634,1.11134 -6.43633,2.30781 -7.96875,2.625 -0.8004,0.16569 -1.61231,0.21862 -2.25,0.15625 0,0 0,0.51552 0,0.92229 0,0.26507 0,0.48396 0,0.48396 0.22645,-0.14468 0.44891,-0.27261 0.71875,-0.375 1.08052,-0.40998 2.17161,-0.21577 6,-1.6875 3.82843,-1.47174 5.22412,-2.00498 5.90625,-2.40625 0.6796,-0.39978 1.61165,-0.87937 2.21875,-1.53125 1.82685,-0.13775 3.57075,-0.49323 4.9375,-1 2.96812,-1.10052 4.87537,-1.80619 6.78125,-2.46875 1.90586,-0.66254 2.35409,-1.41487 3.40625,-1.78125 1.09155,-0.38011 2.19511,-0.16538 6.0625,-1.53125 3.86745,-1.36586 5.28316,-1.82708 5.96875,-2.21875 0.70109,-0.40052 1.70081,-0.93298 2.3125,-1.59375 1.9708,-0.0547 3.81685,-0.38463 5.28125,-0.875 3.00148,-1.00508 4.92615,-1.62171 6.84375,-2.25 1.5386,-0.5041 2.17402,-1.04677 2.90625,-1.4375 0.23016,-0.13431 0.47574,-0.25373 0.75,-0.34375 1.09823,-0.36048 2.18145,-0.0814 6.09375,-1.3125 3.91233,-1.23113 5.36605,-1.67295 6.0625,-2.03125 0.69388,-0.35697 1.63015,-0.79261 2.25,-1.40625 1.86521,-0.0227 3.63581,-0.26683 5.03125,-0.6875 3.03043,-0.91354 4.99238,-1.4301 6.9375,-1.96875 1.94511,-0.53864 2.42618,-1.26452 3.5,-1.5625 1.11401,-0.30915 2.21994,0.007 6.1875,-1.03125 3.96761,-1.03863 5.41758,-1.43273 6.125,-1.75 0.73487,-0.32959 1.81383,-0.75372 2.4375,-1.375 1.99774,0.116 3.85743,-0.0201 5.34375,-0.375 3.07811,-0.735 5.08344,-1.10094 7.0625,-1.5 1.58792,-0.32018 2.24429,-0.79055 3,-1.09375 0.23757,-0.1068 0.46695,-0.19276 0.75,-0.25 1.13347,-0.22919 2.30448,0.20893 6.34375,-0.5 4.03933,-0.70893 5.50025,-0.92709 6.21875,-1.1875 0.71586,-0.25944 1.70428,-0.56724 2.34375,-1.09375 1.92427,0.23949 3.74788,0.22453 5.1875,0 3.12633,-0.48762 5.15455,-0.70067 7.15625,-0.96875 2.00171,-0.26807 2.48869,-0.94514 3.59375,-1.09375 1.14639,-0.15418 2.27592,0.30157 6.34375,-0.21875 4.06784,-0.52032 5.56013,-0.69573 6.28125,-0.9375 0.7371,-0.24714 1.79809,-0.58623 2.4375,-1.125 2.05007,0.33553 3.97378,0.39796 5.5,0.21875 3.14231,-0.36896 5.17994,-0.55936 7.1875,-0.78125 1.61076,-0.17802 2.26467,-0.6082 3.03125,-0.84375 0.24094,-0.0855 0.49412,-0.1556 0.78125,-0.1875 1.14978,-0.12772 2.30129,0.34665 6.375,-0.125 4.07374,-0.47165 5.55909,-0.6106 6.28125,-0.84375 0.71946,-0.23227 1.70024,-0.47346 2.34375,-0.96875 1.93637,0.33346 3.77006,0.40424 5.21875,0.25 3.14602,-0.33495 5.17756,-0.51859 7.1875,-0.71875 2.00996,-0.20014 2.48414,-0.82639 3.59375,-0.9375 1.15114,-0.11528 2.29643,0.36506 6.375,-0.0625 4.07861,-0.42756 5.58886,-0.56209 6.3125,-0.78125 0.73915,-0.22386 1.79572,-0.51325 2.4375,-1.03125 2.0571,0.39867 4.00187,0.4934 5.53125,0.34375 3.14873,-0.3081 5.17584,-0.47325 7.1875,-0.65625 1.61407,-0.14682 2.2631,-0.56055 3.03125,-0.78125 0.24142,-0.0809 0.49353,-0.12991 0.78125,-0.15625 1.15211,-0.10545 2.29296,0.39275 6.375,0 4.08208,-0.39275 5.5889,-0.53084 6.3125,-0.75 0.7209,-0.21833 1.6997,-0.4477 2.3438,-0.9375 1.938,0.34999 3.7688,0.45438 5.2187,0.3125 3.1487,-0.3081 5.1758,-0.47325 7.1875,-0.65625 2.0116,-0.18299 2.5142,-0.83802 3.625,-0.9375 1.1523,-0.10323 2.2922,0.38483 6.375,0 4.0829,-0.38482 5.5887,-0.501 6.3125,-0.71875 0.7393,-0.22243 1.7956,-0.51449 2.4375,-1.03125 2.0574,0.40177 4.0029,0.50333 5.5313,0.34375 3.1466,-0.32852 5.1771,-0.5227 7.1875,-0.71875 1.613,-0.15729 2.2656,-0.63148 3.0312,-0.875 0.2407,-0.088 0.4632,-0.12137 0.75,-0.15625 1.1483,-0.1397 2.3167,0.33991 6.375,-0.25 4.0583,-0.58992 5.5618,-0.77714 6.2813,-1.03125 0.7167,-0.25316 1.6745,-0.55807 2.3125,-1.09375 1.9197,0.21194 3.7199,0.15141 5.1562,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0938,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5625,-1.28125 1.1288,-0.25066 2.2703,0.11629 6.25,-0.875 3.9796,-0.99128 5.4296,-1.4193 6.125,-1.78125 0.7223,-0.37601 1.7619,-0.87058 2.375,-1.53125 1.963,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.14461 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70653 2.3348,-1.68641 2.5469,-1.98438 0.2122,-0.29796 0.1118,-0.7453 0.1379,-0.76675 0.043,-0.0352 0.3193,-0.085 0.479,-0.42844 0.8589,-1.84708 2.321,-5.64459 2.4352,-6.32945 0.1137,-0.68216 0.1638,-1.34774 0.2145,-1.74497 0.029,-0.22952 -0.1467,-0.86544 -0.1246,-0.92404 0.031,-0.0821 0.3045,-0.26528 0.3599,-0.51471 0.2663,-1.19833 0.089,-2.19129 -0.1251,-3.60893 -0.214,-1.41764 -0.9837,-4.62214 -1.6369,-5.47626 -0.6589,-0.86172 -1.2229,-1.01117 -1.7479,-1.00066 -0.2086,0.26976 0.1368,0.26309 0.1626,0.31261 0.6806,0.0508 0.934,0.36864 1.4192,0.89662 0.4852,0.52798 1.4428,3.93956 1.5794,5.38995 0.1366,1.45039 0.19,2.8602 -0.088,3.46864 -0.2781,0.60845 -0.9442,0.42864 -1.2366,0.49452 0.531,0.18589 0.8908,0.21322 0.9524,1.05768 0.059,0.81338 -0.1332,1.63969 -0.5198,2.80562 -0.3912,1.18001 -1.8452,4.34998 -2.2857,4.59877 -0.4523,0.25551 -0.9524,0.18199 -1.288,0.0511 z"
5097 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6997-5);enable-background:new"
5098 sodipodi:nodetypes="cssscscsscsssccscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssccscsscscssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsszsszssszzcczzzczzzc" />
5099 <path
5100 inkscape:connector-curvature="0"
5101 id="path8103-3"
5102 d="m 988.75,-263.84375 c 1.91161,0.6344 4.55027,1.75841 6.125,2.8125 1.57477,1.05409 2.8961,1.48252 5.5313,3.375 2.6082,1.87314 5.0269,3.01522 7.3125,4.0625 2.4693,1.13147 5.7521,2.15474 9.5312,3.9375 -1.2072,-1.2584 -7.139,-3.36445 -9.0312,-4.1875 -1.8922,-0.82304 -4.128,-1.93049 -6.9375,-3.78125 -2.80961,-1.85075 -3.62224,-2.48154 -6.00005,-3.71875 -2.37782,-1.23719 -4.07988,-1.9492 -6.53125,-2.5 z"
5103 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6953-8);enable-background:new" />
5104 <path
5105 inkscape:connector-curvature="0"
5106 id="path8105-1"
5107 d="m 957.5,-260.78125 c 1.91,0.6181 4.58288,1.70934 6.15625,2.75 1.57339,1.04066 2.89608,1.48252 5.53125,3.375 2.60823,1.87315 5.02692,3.01521 7.3125,4.0625 2.46931,1.13147 5.75213,2.15475 9.53125,3.9375 -1.20728,-1.2584 -7.20154,-3.3957 -9.09375,-4.21875 -1.89217,-0.82304 -4.09666,-1.9305 -6.90625,-3.78125 -2.80958,-1.85075 -3.59295,-2.43932 -5.96875,-3.65625 -2.37578,-1.21691 -4.11321,-1.93885 -6.5625,-2.46875 z"
5108 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6993-3);enable-background:new" />
5109 <path
5110 inkscape:connector-curvature="0"
5111 id="path8107-4"
5112 d="m 926.09375,-257.375 c 1.90772,0.59745 4.55348,1.66384 6.125,2.6875 1.5715,1.02365 2.87022,1.43971 5.5,3.28125 2.60291,1.82273 5.02887,2.9722 7.3125,4 2.4672,1.11041 5.75535,2.09323 9.53125,3.84375 -1.20623,-1.2481 -7.1719,-3.31809 -9.0625,-4.125 -1.89058,-0.8069 -4.10242,-1.89104 -6.90625,-3.6875 -2.80385,-1.79644 -3.62704,-2.40251 -6,-3.59375 -2.37297,-1.19124 -4.05362,-1.90283 -6.5,-2.40625 z"
5113 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6989-8);enable-background:new" />
5114 <path
5115 inkscape:connector-curvature="0"
5116 id="path8109-6"
5117 d="m 894.90625,-253.5625 c 1.90213,0.55355 4.58701,1.58887 6.15625,2.59375 1.56923,1.00487 2.87401,1.40864 5.5,3.21875 2.59912,1.79164 5.00034,2.87189 7.28125,3.875 2.46428,1.08374 5.75984,2.04029 9.53125,3.75 -1.2048,-1.23507 -7.17416,-3.24478 -9.0625,-4.03125 -1.88832,-0.78647 -4.0752,-1.8308 -6.875,-3.59375 -2.79977,-1.76294 -3.59919,-2.36836 -5.96875,-3.53125 -2.36957,-1.16288 -4.12325,-1.83412 -6.5625,-2.28125 z"
5118 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6985-6);enable-background:new" />
5119 <path
5120 inkscape:connector-curvature="0"
5121 id="path8111-9"
5122 d="m 863.71875,-248.65625 c 1.88062,0.42909 4.50427,1.38038 6.0625,2.3125 1.55823,0.93211 2.85233,1.25776 5.46875,3 2.58971,1.72444 4.98067,2.70802 7.25,3.625 2.45176,0.99069 5.73959,1.87707 9.5,3.5 -1.20131,-1.20734 -7.15249,-3.06609 -9.03125,-3.78125 -1.87875,-0.71517 -4.0854,-1.68442 -6.875,-3.375 -2.78963,-1.69057 -3.58461,-2.22822 -5.9375,-3.28125 -2.35292,-1.05301 -4.02584,-1.71248 -6.4375,-2 z"
5123 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6965-3);enable-background:new" />
5124 <path
5125 inkscape:connector-curvature="0"
5126 id="path8113-4"
5127 d="m 833.15625,-241.375 c 1.84836,0.29644 4.46945,0.97632 6,1.78125 1.53058,0.80493 2.81374,1.05573 5.375,2.53125 2.53504,1.46046 4.89068,2.32509 7.125,3.0625 2.41399,0.79668 5.65711,1.46689 9.375,2.84375 -1.18771,-1.12873 -7.08772,-2.58975 -8.9375,-3.15625 -1.84977,-0.5665 -4.00342,-1.37392 -6.75,-2.84375 -2.74657,-1.46983 -3.50136,-1.92028 -5.8125,-2.78125 -2.31115,-0.86095 -4.00471,-1.32009 -6.375,-1.4375 z"
5128 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6981-3);enable-background:new" />
5129 <path
5130 inkscape:connector-curvature="0"
5131 id="path8115-2"
5132 d="m 802.90625,-232.3125 c 1.8222,0.21127 4.36576,0.80057 5.875,1.53125 1.50925,0.73066 2.75568,0.92998 5.28125,2.28125 2.49976,1.33746 4.83154,2.04843 7.03125,2.65625 2.37653,0.65667 5.56464,1.07288 9.21875,2.1875 -1.16735,-1.04496 -6.92888,-2.10329 -8.75,-2.5625 -1.82111,-0.45921 -3.95225,-1.12696 -6.65625,-2.4375 -2.70403,-1.31052 -3.47106,-1.7199 -5.75,-2.46875 -2.27895,-0.74883 -3.91325,-1.17931 -6.25,-1.1875 z"
5133 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6977-6);enable-background:new" />
5134 <path
5135 inkscape:connector-curvature="0"
5136 id="path8117-2"
5137 d="m 773.1875,-222.1875 c 1.81109,0.1787 4.32059,0.66506 5.8125,1.34375 1.49194,0.67869 2.7534,0.79822 5.25,2.0625 2.47107,1.25138 4.79005,1.89614 6.96875,2.4375 2.35387,0.58488 5.49134,0.89752 9.09375,1.84375 -1.15084,-0.99116 -6.85251,-1.7833 -8.65625,-2.1875 -1.80372,-0.4042 -3.91553,-1.02116 -6.59375,-2.25 -2.67818,-1.22884 -3.40345,-1.61089 -5.65625,-2.28125 -2.25279,-0.67034 -3.89627,-1.00232 -6.21875,-0.96875 z"
5138 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6973-4);enable-background:new" />
5139 <path
5140 inkscape:connector-curvature="0"
5141 id="path8119-6"
5142 d="m 743.5625,-211.1875 c 1.79281,0.12911 4.27313,0.54965 5.75,1.1875 1.4769,0.63785 2.7161,0.74156 5.1875,1.9375 2.44618,1.18372 4.72054,1.74666 6.875,2.21875 2.32767,0.51003 5.4196,0.68064 9,1.5625 -1.14379,-0.9706 -6.74759,-1.59065 -8.53125,-1.9375 -1.78367,-0.34684 -3.88285,-0.88756 -6.53125,-2.03125 -2.64841,-1.14368 -3.39495,-1.51631 -5.625,-2.125 -2.23008,-0.60868 -3.82594,-0.90966 -6.125,-0.8125 z"
5143 style="display:inline;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter6969-8);enable-background:new" />
5144 <g
5145 id="g8121-4"
5146 style="fill:#ffffff;fill-opacity:1;filter:url(#filter7345-9)">
5147 <path
5148 inkscape:connector-curvature="0"
5149 sodipodi:nodetypes="czzzczzc"
5150 id="path8123-1"
5151 d="m 744.9375,-212.11731 c 0,0 7.22229,-3.22318 9.0625,-3.5 1.84021,-0.27682 3.35225,-0.003 6,0.5625 2.64775,0.56573 8.7357,2.21518 11.1875,3.375 2.4518,1.15982 5.3125,3.5625 5.3125,3.5625 0,0 -7.14644,-2.78019 -10.1875,-3.5625 -3.04106,-0.78231 -7.64461,-2.08374 -10.375,-2.3125 -2.73039,-0.22876 -11,1.875 -11,1.875 z"
5152 style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
5153 <path
5154 inkscape:connector-curvature="0"
5155 sodipodi:nodetypes="czzzczzc"
5156 id="path8125-2"
5157 d="m 735.46875,-206.95416 c 0,0 3.65979,-2.22318 5.5,-2.5 1.84021,-0.27682 3.66475,0.24677 6.3125,0.8125 2.64775,0.56573 8.7357,2.21518 11.1875,3.375 2.4518,1.15982 6.5625,2.125 6.5625,2.125 0,0 -8.39644,-1.34269 -11.4375,-2.125 -3.04106,-0.78231 -7.95711,-2.33374 -10.6875,-2.5625 -2.73039,-0.22876 -7.4375,0.875 -7.4375,0.875 z"
5158 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5159 <path
5160 inkscape:connector-curvature="0"
5161 sodipodi:nodetypes="czzzczzc"
5162 id="path8127-8"
5163 d="m 759.85042,-217.61116 c 0,0 8.5437,-3.29857 10.39778,-3.45786 1.85409,-0.1593 3.64166,0.4792 6.2481,1.21208 2.60644,0.73288 8.57724,2.76594 10.95036,4.07925 2.37312,1.31331 6.41417,2.53782 6.41417,2.53782 0,0 -8.29413,-1.87365 -11.27931,-2.84767 -2.98519,-0.97402 -7.79269,-2.83478 -10.50302,-3.23662 -2.71033,-0.40184 -12.22808,1.713 -12.22808,1.713 z"
5164 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5165 <path
5166 inkscape:connector-curvature="0"
5167 sodipodi:nodetypes="czzzczzc"
5168 id="path8129-8"
5169 d="m 775.19813,-223.2266 c 0,0 7.77133,-2.78244 9.62831,-2.90349 1.85697,-0.12104 3.631,0.55417 6.22178,1.34062 2.59077,0.78645 8.5184,2.94217 10.86394,4.30412 2.34555,1.36195 6.36049,2.6695 6.36049,2.6695 0,0 -8.25373,-2.04423 -11.21821,-3.07958 -2.96447,-1.03535 -7.73259,-2.99481 -10.43406,-3.45243 -2.70147,-0.45763 -11.42225,1.12126 -11.42225,1.12126 z"
5170 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5171 <path
5172 inkscape:connector-curvature="0"
5173 inkscape:transform-center-y="-4.3190906"
5174 inkscape:transform-center-x="13.852145"
5175 sodipodi:nodetypes="czzzczzc"
5176 id="path8131-9"
5177 d="m 789.64298,-227.95417 c 0,0 8.68256,-3.52031 10.54154,-3.60535 1.85897,-0.085 3.61958,0.62442 6.19463,1.46093 2.57505,0.83649 8.45979,3.10666 10.77851,4.5138 2.31872,1.40715 6.30757,2.79224 6.30757,2.79224 0,0 -8.21257,-2.20377 -11.15643,-3.29636 -2.94386,-1.09259 -7.67312,-3.14408 -10.36522,-3.65397 -2.69209,-0.50988 -12.3006,1.78871 -12.3006,1.78871 z"
5178 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5179 <path
5180 inkscape:connector-curvature="0"
5181 inkscape:transform-center-y="-4.3190906"
5182 inkscape:transform-center-x="13.852145"
5183 sodipodi:nodetypes="czzzczzc"
5184 id="path8133-2"
5185 d="m 804.49513,-233.32948 c 0,0 7.80756,-2.58281 9.66654,-2.66785 1.85897,-0.085 3.61958,0.62442 6.19463,1.46093 2.57505,0.83649 8.45979,3.10666 10.77851,4.5138 2.31872,1.40715 6.30757,2.79224 6.30757,2.79224 0,0 -8.21257,-2.20377 -11.15643,-3.29636 -2.94386,-1.09259 -7.67312,-3.14408 -10.36522,-3.65397 -2.69209,-0.50988 -11.4256,0.85121 -11.4256,0.85121 z"
5186 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5187 <path
5188 inkscape:connector-curvature="0"
5189 inkscape:transform-center-y="-4.3190906"
5190 inkscape:transform-center-x="13.852145"
5191 sodipodi:nodetypes="czzzczzc"
5192 id="path8135-8"
5193 d="m 819.55763,-237.57948 c 0,0 8.55756,-2.58281 10.41654,-2.66785 1.85897,-0.085 3.61958,0.62442 6.19463,1.46093 2.57505,0.83649 8.45979,3.10666 10.77851,4.5138 2.31872,1.40715 6.30757,2.79224 6.30757,2.79224 0,0 -8.21257,-2.20377 -11.15643,-3.29636 -2.94386,-1.09259 -7.67312,-3.14408 -10.36522,-3.65397 -2.69209,-0.50988 -12.1756,0.85121 -12.1756,0.85121 z"
5194 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5195 <path
5196 inkscape:connector-curvature="0"
5197 inkscape:transform-center-y="-4.9269042"
5198 inkscape:transform-center-x="13.64141"
5199 sodipodi:nodetypes="czzzczzc"
5200 id="path8137-8"
5201 d="m 836.23395,-242.60125 c 0,0 6.96702,-1.98723 8.82784,-1.96757 1.86081,0.0197 3.57873,0.82702 6.10265,1.80705 2.52393,0.98 8.27166,3.57758 10.50756,5.11291 2.2359,1.53535 6.14053,3.14261 6.14053,3.14261 0,0 -8.07561,-2.66222 -10.95336,-3.91866 -2.87774,-1.25645 -7.48412,-3.5707 -10.14328,-4.23121 -2.65915,-0.66049 -10.48194,0.0549 -10.48194,0.0549 z"
5202 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5203 <path
5204 inkscape:connector-curvature="0"
5205 inkscape:transform-center-y="-5.1542119"
5206 inkscape:transform-center-x="13.55068"
5207 sodipodi:nodetypes="czzzczzc"
5208 id="path8139-8"
5209 d="m 850.73028,-246.00461 c 0,0 7.68784,-2.02768 9.54782,-1.96854 1.85997,0.0592 3.56038,0.90279 6.06293,1.93616 2.50255,1.03334 8.19387,3.75232 10.39668,5.33475 2.20282,1.58245 6.07245,3.2722 6.07245,3.2722 0,0 -8.01729,-2.83298 -10.86772,-4.15022 -2.85043,-1.31723 -7.40666,-3.72872 -10.0512,-4.4455 -2.64454,-0.71678 -11.16096,0.0211 -11.16096,0.0211 z"
5210 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5211 <path
5212 inkscape:connector-curvature="0"
5213 inkscape:transform-center-y="-5.4740887"
5214 inkscape:transform-center-x="13.41151"
5215 sodipodi:nodetypes="czzzczzc"
5216 id="path8141-6"
5217 d="m 864.82496,-249.21081 c 0,0 8.16952,-1.96906 10.02688,-1.85396 1.85735,0.11512 3.53158,1.00956 6.0019,2.11779 2.47031,1.10821 8.0772,3.99727 10.23138,5.64531 2.15418,1.64804 5.9712,3.45352 5.9712,3.45352 0,0 -7.92839,-3.07306 -10.73787,-4.4755 -2.80949,-1.40244 -7.29106,-3.94999 -9.91283,-4.74606 -2.62176,-0.79606 -11.58066,-0.1411 -11.58066,-0.1411 z"
5218 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5219 <path
5220 inkscape:connector-curvature="0"
5221 inkscape:transform-center-y="-5.79376"
5222 inkscape:transform-center-x="13.258805"
5223 sodipodi:nodetypes="czzzczzc"
5224 id="path8143-8"
5225 d="m 881.38485,-251.60282 c 0,0 8.08536,-1.90809 9.93837,-1.73664 1.853,0.17147 3.4993,1.11633 5.93482,2.29908 2.43553,1.18271 7.95209,4.2407 10.05523,5.95339 2.10314,1.7127 5.86357,3.63326 5.86357,3.63326 0,0 -7.8314,-3.3124 -10.597,-4.7995 -2.76561,-1.48712 -7.16775,-4.16959 -9.76414,-5.04491 -2.59637,-0.87531 -11.43085,-0.30468 -11.43085,-0.30468 z"
5226 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5227 <path
5228 inkscape:connector-curvature="0"
5229 inkscape:transform-center-y="-5.7433893"
5230 inkscape:transform-center-x="13.28378"
5231 sodipodi:nodetypes="czzzczzc"
5232 id="path8145-3"
5233 d="m 896.58415,-254.34724 c 0,0 7.64166,-1.4277 9.49547,-1.26515 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -10.99774,-0.76897 -10.99774,-0.76897 z"
5234 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5235 <path
5236 inkscape:connector-curvature="0"
5237 inkscape:transform-center-y="-5.7433893"
5238 inkscape:transform-center-x="13.28378"
5239 sodipodi:nodetypes="czzzczzc"
5240 id="path8147-8"
5241 d="m 911.45328,-255.98544 c 0,0 8.64166,-1.5527 10.49547,-1.39015 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -11.99774,-0.64397 -11.99774,-0.64397 z"
5242 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5243 <path
5244 inkscape:connector-curvature="0"
5245 inkscape:transform-center-y="-5.7433893"
5246 inkscape:transform-center-x="13.28378"
5247 sodipodi:nodetypes="czzzczzc"
5248 id="path8149-3"
5249 d="m 927.70328,-258.29794 c 0,0 7.64166,-0.8652 9.49547,-0.70265 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -10.99774,-1.33147 -10.99774,-1.33147 z"
5250 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5251 <path
5252 inkscape:connector-curvature="0"
5253 inkscape:transform-center-y="-5.7433893"
5254 inkscape:transform-center-x="13.28378"
5255 sodipodi:nodetypes="czzzczzc"
5256 id="path8151-3"
5257 d="m 942.82828,-259.48544 c 0,0 8.57916,-1.4902 10.43297,-1.32765 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -11.93524,-0.70647 -11.93524,-0.70647 z"
5258 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5259 <path
5260 inkscape:connector-curvature="0"
5261 inkscape:transform-center-y="-5.7433893"
5262 inkscape:transform-center-x="13.28378"
5263 sodipodi:nodetypes="czzzczzc"
5264 id="path8153-3"
5265 d="m 959.07828,-261.54794 c 0,0 7.82916,-0.8027 9.68297,-0.64015 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08372,5.90502 2.11134,1.70258 5.88096,3.60505 5.88096,3.60505 0,0 -7.84723,-3.27474 -10.61995,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -11.18524,-1.39397 -11.18524,-1.39397 z"
5266 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5267 <path
5268 inkscape:connector-curvature="0"
5269 inkscape:transform-center-y="-5.7433893"
5270 inkscape:transform-center-x="13.28378"
5271 sodipodi:nodetypes="czzzczzc"
5272 id="path8155-8"
5273 d="m 974.45328,-262.79794 c 0,0 8.39166,-1.1777 10.24547,-1.01515 1.8538,0.16256 3.50462,1.0995 5.94579,2.27053 2.44118,1.171 7.97238,4.20246 10.08376,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.84721,-3.27474 -10.61993,-4.74855 -2.77271,-1.4738 -7.18769,-4.13509 -9.78825,-4.99793 -2.60055,-0.86282 -11.74774,-1.01897 -11.74774,-1.01897 z"
5274 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5275 <path
5276 inkscape:connector-curvature="0"
5277 inkscape:transform-center-y="-5.7433893"
5278 inkscape:transform-center-x="13.28378"
5279 sodipodi:nodetypes="czzzczzc"
5280 id="path8157-0"
5281 d="m 990.64078,-264.86044 c 0,0 6.89166,-0.9902 8.74547,-0.82765 1.85385,0.16256 3.50465,1.0995 5.94575,2.27053 2.4412,1.171 7.9724,4.20246 10.0838,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.8472,-3.27474 -10.6199,-4.74855 -2.7727,-1.4738 -7.1877,-4.13509 -9.7883,-4.99793 -2.60053,-0.86282 -10.24772,-1.20647 -10.24772,-1.20647 z"
5282 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5283 <path
5284 inkscape:connector-curvature="0"
5285 inkscape:transform-center-y="-5.7433893"
5286 inkscape:transform-center-x="13.28378"
5287 sodipodi:nodetypes="czzzczzc"
5288 id="path8159-4"
5289 d="m 1007.7658,-265.79794 c 0,0 6.8291,-1.1777 8.683,-1.01515 1.8538,0.16256 3.5046,1.0995 5.9457,2.27053 2.4412,1.171 7.9724,4.20246 10.0838,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.8472,-3.27474 -10.6199,-4.74855 -2.7727,-1.4738 -7.1877,-4.13509 -9.7883,-4.99793 -2.6005,-0.86282 -10.1852,-1.01897 -10.1852,-1.01897 z"
5290 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5291 <path
5292 inkscape:connector-curvature="0"
5293 inkscape:transform-center-y="-5.7433893"
5294 inkscape:transform-center-x="13.28378"
5295 sodipodi:nodetypes="czzzczzc"
5296 id="path8161-7"
5297 d="m 1023.8908,-267.79794 c 0,0 6.0791,-0.4277 7.933,-0.26515 1.8538,0.16256 3.5046,1.0995 5.9457,2.27053 2.4412,1.171 7.9724,4.20246 10.0838,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.8472,-3.27474 -10.6199,-4.74855 -2.7727,-1.4738 -7.1877,-4.13509 -9.7883,-4.99793 -2.6005,-0.86282 -9.4352,-1.76897 -9.4352,-1.76897 z"
5298 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5299 <path
5300 inkscape:connector-curvature="0"
5301 inkscape:transform-center-y="-5.7433893"
5302 inkscape:transform-center-x="13.28378"
5303 sodipodi:nodetypes="czzzczzc"
5304 id="path8163-6"
5305 d="m 1039.7033,-269.17294 c 0,0 6.4541,-0.6777 8.308,-0.51515 1.8538,0.16256 3.5046,1.0995 5.9457,2.27053 2.4412,1.171 7.9724,4.20246 10.0838,5.90502 2.1113,1.70258 5.8809,3.60505 5.8809,3.60505 0,0 -7.8472,-3.27474 -10.6199,-4.74855 -2.7727,-1.4738 -7.1877,-4.13509 -9.7883,-4.99793 -2.6005,-0.86282 -9.8102,-1.51897 -9.8102,-1.51897 z"
5306 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5307 <path
5308 inkscape:connector-curvature="0"
5309 inkscape:transform-center-y="-5.1360724"
5310 inkscape:transform-center-x="13.55813"
5311 sodipodi:nodetypes="czzzczzc"
5312 id="path8165-8"
5313 d="m 1055.2718,-271.03319 c 0,0 5.4976,-0.90945 7.3578,-0.85348 1.8601,0.056 3.5619,0.89674 6.0661,1.92586 2.5044,1.0291 8.2003,3.7384 10.4058,5.31709 2.2055,1.57871 6.078,3.2619 6.078,3.2619 0,0 -8.022,-2.81939 -10.8748,-4.13178 -2.8526,-1.31238 -7.4129,-3.71613 -10.0587,-4.42843 -2.6457,-0.71228 -8.9742,-1.09116 -8.9742,-1.09116 z"
5314 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5315 <path
5316 inkscape:connector-curvature="0"
5317 inkscape:transform-center-y="-4.6370147"
5318 inkscape:transform-center-x="13.74758"
5319 sodipodi:nodetypes="czzzczzc"
5320 id="path8167-9"
5321 d="m 1072.7007,-273.48537 c 0,0 4.5472,-1.15581 6.408,-1.18621 1.8607,-0.0304 3.5996,0.73049 6.1489,1.64231 2.5494,0.91177 8.3649,3.35386 10.6414,4.8285 2.2763,1.47468 6.2227,2.97636 6.2227,2.97636 0,0 -8.1442,-2.44411 -11.0547,-3.62272 -2.9105,-1.1786 -7.5774,-3.36815 -10.2534,-3.95691 -2.6759,-0.58875 -8.1129,-0.68133 -8.1129,-0.68133 z"
5322 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5323 <path
5324 inkscape:connector-curvature="0"
5325 inkscape:transform-center-y="-4.4842392"
5326 inkscape:transform-center-x="13.79933"
5327 sodipodi:nodetypes="czzzczzc"
5328 id="path8169-0"
5329 d="m 1087.1585,-276.5244 c 0,0 5.96,-1.77355 7.8202,-1.83024 1.86,-0.0567 3.6096,0.67955 6.1715,1.55525 2.562,0.87566 2.5226,0.85713 5.3335,1.49015 2.7969,0.62986 7.0767,1.51313 7.0767,1.51313 0,0 -3.6155,-0.0163 -6.7923,-0.46614 -3.1155,-0.44119 -7.3743,-1.69825 -10.0584,-2.24913 -2.6839,-0.55088 -9.5512,-0.013 -9.5512,-0.013 z"
5330 style="display:inline;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" />
5331 <path
5332 inkscape:connector-curvature="0"
5333 sodipodi:nodetypes="czczc"
5334 id="path8171-6"
5335 d="m 1099.25,-279.92981 c 0.1612,0.26862 11.2081,-4.60046 12.1875,-4.6875 0.9794,-0.087 2,3.125 2,3.125 0,0 -0.7751,-1.50434 -2.875,-1.0625 -2.0999,0.44184 -11.3009,2.67141 -11.3125,2.625 z"
5336 style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
5337 </g>
5338 <path
5339 inkscape:connector-curvature="0"
5340 id="path8173-8"
5341 d="m 1107.4532,-284.0938 c -0.4187,0.21283 -0.1556,0.0939 -0.6472,0.30581 -0.4861,0.20954 -1.7234,0.57439 -4.0796,1.45895 -3.3311,1.25057 -5.8302,2.15344 -7.0259,3.0661 -1.5361,0.0213 -3.7205,0.23331 -5.6563,0.71875 -2.9815,0.74766 -4.8552,1.17401 -6.75,1.59375 -1.8948,0.41972 -1.6755,0.64219 -2.875,0.875 -1.2966,0.25166 -1.7214,-0.009 -5.4375,0.78125 -3.4899,0.74214 -8.8948,1.93107 -10.1562,2.6875 -1.5839,-0.18079 -3.8675,-0.32178 -5.8438,-0.0312 -3.0404,0.44695 -4.9162,0.67276 -6.8437,0.90625 -0.6554,0.0794 -1.0411,0.20078 -1.3438,0.28125 -0.4262,0.13165 -0.6858,0.26002 -1.375,0.34375 -1.3116,0.15936 -1.7622,-0.15683 -5.5312,0.28125 -3.5539,0.41308 -9.0054,1.27282 -10.25,1.9375 -1.599,-0.2973 -3.8578,-0.53419 -5.8438,-0.34375 -3.0588,0.29331 -4.972,0.48399 -6.9062,0.65625 -1.9343,0.17226 -1.6887,0.42237 -2.9063,0.53125 -1.3162,0.11769 -1.7598,-0.16363 -5.5312,0.25 -3.5419,0.38844 -9.0079,1.20927 -10.2813,1.875 -1.5989,-0.2947 -3.88718,-0.50701 -5.87501,-0.3125 -3.05824,0.29924 -4.94113,0.48024 -6.875,0.65625 -0.65749,0.0598 -1.04004,0.17856 -1.34375,0.25 -0.42765,0.11895 -0.68351,0.21807 -1.375,0.28125 -1.31596,0.12025 -1.75976,-0.19488 -5.53125,0.21875 -3.55614,0.39001 -9.00554,1.23916 -10.25,1.90625 -1.59863,-0.29419 -3.85984,-0.52372 -5.84375,-0.3125 -3.0556,0.32532 -4.97404,0.52624 -6.90625,0.71875 -1.93221,0.1925 -1.68987,0.44088 -2.90625,0.5625 -1.31488,0.13146 -1.76298,-0.16454 -5.53125,0.28125 -3.53887,0.41865 -8.97768,1.29217 -10.25,1.96875 -1.59755,-0.28105 -3.85996,-0.42043 -5.84375,-0.1875 -3.05198,0.35836 -4.94508,0.56786 -6.875,0.78125 -0.6562,0.0726 -1.04066,0.17269 -1.34375,0.25 -0.42677,0.12722 -0.68491,0.2672 -1.375,0.34375 -1.31333,0.14568 -1.76746,-0.17402 -5.53125,0.3125 -3.54889,0.45875 -8.97863,1.41902 -10.21875,2.125 -1.59305,-0.24424 -3.83381,-0.38135 -5.8125,-0.125 -3.04759,0.39481 -4.95071,0.64845 -6.875,0.90625 -1.92428,0.25779 -1.72611,0.49353 -2.9375,0.65625 -1.30946,0.1759 -1.74719,-0.10438 -5.5,0.46875 -3.52429,0.53824 -8.92315,1.69917 -10.1875,2.4375 -1.5875,-0.20354 -3.8455,-0.25473 -5.8125,0.0937 -3.02617,0.53612 -4.89889,0.86169 -6.8125,1.1875 -0.65061,0.11077 -1.01371,0.27094 -1.3125,0.375 -0.42067,0.16488 -0.66345,0.3313 -1.34375,0.46875 -1.29465,0.26159 -1.72712,-0.006 -5.4375,0.8125 -3.49853,0.77195 -8.84595,2.38293 -10.0625,3.21875 -1.56278,-0.0775 -3.75758,0.0853 -5.6875,0.59375 -2.97244,0.78313 -4.81761,1.23209 -6.6875,1.75 -1.86988,0.5179 -1.6666,0.76728 -2.84375,1.09375 -1.27246,0.3529 -1.69703,0.10709 -5.34375,1.1875 -3.4247,1.01463 -8.64944,2.93317 -9.875,3.84375 -1.53883,0.0127 -3.71983,0.27222 -5.625,0.875 -2.93106,0.92734 -4.75031,1.45842 -6.59375,2.0625 -0.62676,0.20538 -0.99173,0.39258 -1.28125,0.53125 -0.40763,0.21361 -0.65334,0.40875 -1.3125,0.625 -1.25446,0.41154 -1.68611,0.18904 -5.28125,1.4375 -3.38985,1.17717 -8.59498,3.2137 -9.78125,4.15625 -1.52389,0.0597 -3.65005,0.39487 -5.53125,1.0625 -2.89739,1.02829 -4.69908,1.67548 -6.53125,2.3125 -1.83217,0.63701 -1.62785,0.84854 -2.78125,1.25 -1.24678,0.43396 -1.66361,0.19972 -5.21875,1.5625 -3.33867,1.2798 -8.48715,3.48255 -9.6875,4.46875 -1.50718,0.10769 -3.63569,0.4988 -5.5,1.21875 -2.86818,1.1076 -4.6238,1.78156 -6.4375,2.46875 -0.61666,0.23363 -0.99641,0.44203 -1.28125,0.59375 0,0 0,1.09375 0,1.09375 0.11178,-0.22236 0.38599,-0.81743 0.90625,-1.09375 0.69797,-0.37072 4.81363,-1.99337 6.8125,-2.71875 1.65686,-0.60125 4.15389,-1.32868 5.96875,-1.3125 0.30162,0.003 0.58762,0.0509 0.84375,0.0937 1.84249,0.30825 7.46875,1.5625 7.46875,1.5625 -10e-6,0 -6.23349,-1.64675 -7.03125,-1.84375 -0.19079,-0.0471 -0.53572,-0.0687 -0.96875,-0.0625 1.14546,-0.86971 4.761,-2.39351 7.34375,-3.4375 2.83822,-1.14727 3.11681,-1.25182 5.0625,-1.65625 2.0083,-0.41744 3.15625,-0.5 3.15625,-0.5 0,1e-5 -0.0824,-0.60114 0.96875,-1.125 0.7051,-0.35141 4.88702,-1.8924 6.90625,-2.5625 1.9519,-0.64773 5.0574,-1.3585 6.875,-1 1.86323,0.3675 7.53125,1.8125 7.53125,1.8125 1e-5,0 -6.287,-1.87111 -7.09375,-2.09375 -0.19292,-0.0533 -0.53084,-0.086 -0.96875,-0.0937 1.15834,-0.83288 4.79444,-2.19532 7.40625,-3.15625 2.87016,-1.05601 3.16734,-1.1618 5.125,-1.53125 1.85349,-0.34979 2.85884,-0.42548 3.03125,-0.4375 0.1136,-0.21724 0.37745,-0.81002 0.90625,-1.0625 0.70944,-0.33874 4.92607,-1.71275 6.96875,-2.3125 1.69317,-0.49711 4.24077,-1.03677 6.09375,-0.90625 0.30795,0.0217 0.61349,0.0973 0.875,0.15625 1.88118,0.42432 7.59375,2.03125 7.59375,2.03125 1e-5,0 -6.34174,-2.06525 -7.15625,-2.3125 -0.19479,-0.0591 -0.55788,-0.10394 -1,-0.125 1.16949,-0.79755 4.86302,-2.05622 7.5,-2.9375 2.89781,-0.96847 3.23301,-1.00332 5.21875,-1.28125 2.04965,-0.28689 3.1875,-0.3125 3.1875,-0.3125 -2e-5,0 -0.0727,-0.60697 1,-1.0625 0.7196,-0.30557 4.99098,-1.50075 7.0625,-2 2.00244,-0.48258 5.19849,-0.92829 7.0625,-0.40625 1.91078,0.53515 7.71875,2.5 7.71875,2.5 0,0 -6.42266,-2.42351 -7.25,-2.71875 -0.19784,-0.0706 -0.58216,-0.14039 -1.03125,-0.1875 1.1879,-0.72865 4.91527,-1.77408 7.59375,-2.5 2.94342,-0.79775 3.29208,-0.77083 5.3125,-0.90625 1.91289,-0.12823 2.94705,-0.0711 3.125,-0.0625 0.11728,-0.20366 0.39176,-0.77948 0.9375,-0.96875 0.73219,-0.25394 5.07852,-1.04789 7.1875,-1.375 1.74813,-0.27111 4.40088,-0.4847 6.3125,-0.0937 0.31766,0.065 0.60522,0.18551 0.875,0.28125 1.94074,0.68873 7.84375,3.09375 7.84375,3.09375 1e-5,0 -6.53471,-2.95077 -7.375,-3.3125 -0.20097,-0.0865 -0.57513,-0.16679 -1.03125,-0.25 1.2065,-0.63318 5.02956,-1.3956 7.75,-1.90625 2.98953,-0.56119 3.30023,-0.52954 5.34375,-0.53125 2.10926,-0.002 3.3125,0.125 3.3125,0.125 0,1e-5 -0.0727,-0.63119 1.03125,-0.9375 0.74052,-0.20547 5.12612,-0.83387 7.25,-1.0625 2.05302,-0.22099 5.31863,-0.25222 7.21875,0.46875 1.94779,0.73907 7.84375,3.375 7.84375,3.375 2e-5,0 -6.56288,-3.17897 -7.40625,-3.5625 -0.20168,-0.0917 -0.54221,-0.18621 -1,-0.28125 1.21092,-0.60188 4.98442,-1.24884 7.71875,-1.65625 3.0048,-0.44772 3.32551,-0.4517 5.375,-0.40625 1.94045,0.043 3.00699,0.19423 3.1875,0.21875 0.11892,-0.19316 0.3839,-0.76583 0.9375,-0.90625 0.74271,-0.18838 5.15429,-0.73428 7.28125,-0.9375 1.76303,-0.16842 4.42009,-0.23429 6.34375,0.25 0.31968,0.0805 0.60351,0.20359 0.875,0.3125 1.95293,0.78349 7.90625,3.46875 7.90625,3.46875 -2e-5,0 -6.59191,-3.25348 -7.4375,-3.65625 -0.20222,-0.0963 -0.57226,-0.20703 -1.03125,-0.3125 1.21414,-0.57427 5.04366,-1.12219 7.78125,-1.5 3.00838,-0.4152 3.32307,-0.44263 5.375,-0.375 2.11798,0.0698 3.3125,0.25 3.3125,0.25 -2e-5,0 -0.0772,-0.63741 1.03125,-0.90625 0.74362,-0.18035 5.15176,-0.66355 7.28125,-0.84375 2.05847,-0.17417 5.34324,-0.12432 7.25,0.65625 1.95459,0.80016 7.875,3.53125 7.875,3.53125 -2e-5,0 -6.55993,-3.30876 -7.40625,-3.71875 -0.20237,-0.0981 -0.57186,-0.2031 -1.03125,-0.3125 1.21517,-0.5639 5.01008,-1.1143 7.75,-1.46875 3.01091,-0.38952 3.32131,-0.39765 5.375,-0.3125 1.94439,0.0806 3.00663,0.25324 3.1875,0.28125 0.11916,-0.19086 0.38277,-0.74531 0.9375,-0.875 0.74426,-0.174 5.14993,-0.65047 7.28125,-0.8125 1.76662,-0.13427 4.44971,-0.12571 6.37501,0.375 0.32,0.0832 0.6033,0.20127 0.875,0.3125 1.9546,0.80016 7.9063,3.5625 7.9063,3.5625 -1e-4,0 -6.5912,-3.34001 -7.4375,-3.75 -0.2024,-0.0981 -0.5719,-0.20311 -1.0313,-0.3125 1.2151,-0.5639 5.0413,-1.08306 7.7813,-1.4375 3.0109,-0.38953 3.3525,-0.4289 5.4062,-0.34375 2.1197,0.0879 3.3125,0.3125 3.3125,0.3125 0,0 -0.078,-0.64902 1.0313,-0.90625 0.7443,-0.17256 5.1495,-0.62336 7.2812,-0.78125 2.0606,-0.1526 5.3429,-0.0968 7.25,0.6875 1.955,0.80395 7.875,3.5 7.875,3.5 0,0 -6.5598,-3.27587 -7.4062,-3.6875 -0.2025,-0.0984 -0.5718,-0.20222 -1.0313,-0.3125 1.2154,-0.56154 5.0119,-1.12778 7.75,-1.5 3.009,-0.40905 3.3227,-0.41558 5.375,-0.34375 1.9431,0.068 3.0072,0.16485 3.1875,0.1875 0.1188,-0.1944 0.3846,-0.72881 0.9375,-0.875 0.7418,-0.19612 5.1311,-0.82878 7.25,-1.09375 1.7564,-0.21961 4.4053,-0.33231 6.3125,0.0312 0.3169,0.0604 0.6058,0.18938 0.875,0.28125 1.9362,0.66092 7.8438,2.9375 7.8438,2.9375 -10e-5,0 -6.5367,-2.80655 -7.375,-3.15625 -0.2005,-0.0836 -0.5762,-0.17333 -1.0313,-0.25 1.2037,-0.65046 5.0191,-1.37195 7.7188,-2 2.9667,-0.6902 3.2889,-0.75507 5.3125,-0.875 2.0886,-0.1238 3.2812,-0.0312 3.2812,-0.0312 0,1e-5 -0.087,-0.63205 1,-1.03125 0.7292,-0.2678 5.0472,-1.33797 7.125,-1.8125 2.0085,-0.45869 5.1679,-1.0293 7,-0.625 1.8781,0.41446 13.5782,3.01563 13.5782,3.01563 0,0 -12.3275,-3.02266 -13.1407,-3.26563 -0.1945,-0.0581 -0.5586,-0.10626 -1,-0.125 1.1676,-0.80369 3.5142,-1.6873 6.1094,-2.70312 1.6814,-0.65818 0.9237,-0.37659 2.7759,-1.0036 1.7536,-0.59366 2.4854,-1.01071 2.6304,-1.11299 0.3461,-0.20651 -0.356,-0.12188 -0.5442,-0.0424 z"
5342 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7333-7);enable-background:new"
5343 sodipodi:nodetypes="czscsssscssssscsssscssssscsssscssssscsssscssssscsssscssssscsssscssccsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscsssscscsscssscscsscc" />
5344 <path
5345 inkscape:connector-curvature="0"
5346 id="path8175-7"
5347 d="m 1082.625,-275.125 c 1.873,0.39348 4.4961,1.14555 6.0313,1.96875 1.5352,0.82319 2.8222,1.056 5.375,2.5 2.5266,1.42926 4.7958,2.00696 6.9687,2.53125 2.3476,0.56642 5.4354,0.71523 8.8438,1.1875 -1.0889,-0.83975 -6.6074,-1.17245 -8.4063,-1.5625 -1.7989,-0.39006 -3.8941,-1.01616 -6.5937,-2.3125 -2.6997,-1.29634 -3.4944,-1.79896 -5.8125,-2.6875 -2.3182,-0.88854 -4.0044,-1.38314 -6.4063,-1.625 z"
5348 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7285-4);enable-background:new" />
5349 <path
5350 inkscape:connector-curvature="0"
5351 id="path8177-9"
5352 d="m 1051.4688,-270 c 1.9053,0.57759 4.5281,1.61572 6.0937,2.59375 1.5656,0.97802 2.8802,1.35981 5.5,3.125 2.593,1.74716 4.9859,2.70927 7.25,3.59375 2.4461,0.95557 5.6826,1.65713 9.4063,3.0625 -1.1896,-1.13784 -7.0631,-2.68675 -8.9375,-3.375 -1.8745,-0.68825 -4.0818,-1.5662 -6.875,-3.28125 -2.7933,-1.71504 -3.5736,-2.2839 -5.9375,-3.40625 -2.3641,-1.12234 -4.0567,-1.83455 -6.5,-2.3125 z"
5353 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7289-0);enable-background:new" />
5354 <path
5355 inkscape:connector-curvature="0"
5356 id="path8179-0"
5357 d="m 1020.2188,-266.84375 c 1.9119,0.63811 4.5812,1.75536 6.1562,2.8125 1.5751,1.05715 2.8956,1.50867 5.5313,3.40625 2.6086,1.87821 5.0284,3.03003 7.3125,4.0625 2.4677,1.11545 5.7645,2.1733 9.5312,3.84375 -1.2033,-1.22253 -7.2028,-3.31423 -9.0937,-4.125 -1.891,-0.81077 -4.0649,-1.89379 -6.875,-3.75 -2.8102,-1.8562 -3.6218,-2.47693 -6,-3.71875 -2.3783,-1.2418 -4.1107,-1.97569 -6.5625,-2.53125 z"
5358 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7293-0);enable-background:new" />
5359 <path
5360 inkscape:connector-curvature="0"
5361 id="path8181-3"
5362 d="m 1110.1719,-266.89063 c 0.1508,0.0486 0.688,0.631 0.1094,1.48438 -0.8101,1.19459 -5.7049,3.32429 -8.5625,4.125 -2.8449,0.79712 -6.2901,0.97774 -10.5625,-0.375 -4.3016,-1.36195 -5.4697,-2.46872 -10.6563,-4.3125 4.664,2.11517 6.1953,3.95233 10.125,5.34375 1.6207,0.57387 3.3671,0.9396 5.0625,1.03125 -0.4451,0.32563 -1.5303,0.9833 -3.5625,1.59375 -2.7955,0.83969 -6.6491,1.53378 -8.25,1.625 -1.5146,0.0863 -3.142,-0.51249 -3.4375,-0.625 0.1667,0.10308 0.3732,0.37734 -0.25,1.03125 -0.8993,0.94363 -6.1474,1.923 -9.125,2.25 -2.9643,0.32555 -6.5216,-0.016 -10.9062,-1.90625 -3.978,-1.71497 -5.339,-2.91536 -9.4063,-4.75 0,0 0,0.15625 0,0.15625 3.6431,2.09529 5.284,3.88327 8.875,5.5625 1.7302,0.80909 3.5917,1.40876 5.4063,1.71875 -0.5349,0.28676 -1.5578,0.71151 -3.4375,1.03125 -2.869,0.48796 -6.809,0.81614 -8.4375,0.75 -0.8507,-0.0345 -1.7286,-0.18437 -2.4063,-0.40625 -0.6848,-0.21488 -1.1897,-0.44467 -1.3125,-0.5 0.1694,0.10721 0.4311,0.40288 -0.2187,1.03125 -0.9097,0.87962 -6.2461,1.33638 -9.25,1.46875 -2.9905,0.13179 -6.5889,-0.45063 -11,-2.5625 -4.4412,-2.12626 -5.6415,-3.4016 -10.9063,-5.78125 4.7343,2.59704 6.2865,4.6291 10.3438,6.71875 1.6733,0.86185 3.4852,1.49425 5.25,1.9375 -0.4633,0.23332 -1.5894,0.68814 -3.6875,0.9375 -2.8863,0.34298 -6.8346,0.49288 -8.4688,0.375 -1.5462,-0.1115 -3.2312,-0.85696 -3.5312,-1 0.1691,0.12029 0.4138,0.41048 -0.2188,1 -0.9128,0.85073 -6.2441,1.26212 -9.25,1.375 -2.9925,0.11237 -6.5897,-0.49043 -11,-2.59375 -4.00125,-1.90823 -5.38803,-3.13783 -9.46875,-5.09375 -3e-5,0 0,0.15625 0,0.15625 3.65506,2.20392 5.29421,4.05255 8.90625,5.90625 1.74029,0.89315 3.637,1.52827 5.4688,1.96875 -0.54,0.2483 -1.5781,0.61533 -3.4688,0.84375 -2.88568,0.34858 -6.86605,0.52095 -8.5,0.40625 -0.85345,-0.0599 -1.72631,-0.25791 -2.40625,-0.5 -0.6871,-0.2353 -1.18935,-0.47226 -1.3125,-0.53125 0.16998,0.11227 0.46448,0.42225 -0.1875,1.03125 -0.91265,0.8525 -6.27533,1.29337 -9.28125,1.40625 -2.99246,0.11237 -6.59346,-0.52805 -11,-2.59375 -4.43653,-2.07978 -5.64688,-3.33171 -10.90625,-5.65625 4.72938,2.54749 6.29074,4.5778 10.34375,6.625 1.67155,0.84433 3.48554,1.46643 5.25,1.90625 -0.46323,0.23422 -1.5897,0.68407 -3.6875,0.9375 -2.88569,0.34858 -6.8362,0.56952 -8.46875,0.46875 -1.54456,-0.0953 -3.20031,-0.82885 -3.5,-0.96875 0.16899,0.11853 0.38192,0.40385 -0.25,1 -0.91186,0.86028 -6.24665,1.33025 -9.25,1.46875 -2.98995,0.1379 -6.56745,-0.45068 -10.96875,-2.46875 -3.99308,-1.83089 -5.36511,-3.0292 -9.4375,-4.90625 -2e-5,0 0,0.15625 0,0.15625 3.64761,2.13327 5.27033,3.93487 8.875,5.71875 1.73675,0.85951 3.60727,1.45014 5.4375,1.875 -0.53947,0.2529 -1.55063,0.64129 -3.4375,0.90625 -2.87978,0.40436 -6.83813,0.64562 -8.46875,0.5625 -0.85172,-0.0434 -1.7277,-0.20855 -2.40625,-0.4375 -0.68569,-0.22201 -1.1896,-0.44339 -1.3125,-0.5 0.16959,0.10899 0.4319,0.40965 -0.21875,1.03125 -0.91079,0.87014 -6.25021,1.39152 -9.25,1.5625 -2.98633,0.17021 -6.57381,-0.31577 -10.96875,-2.28125 -4.42489,-1.97888 -5.60596,-3.22819 -10.84375,-5.375 4.70997,2.38767 6.27017,4.38873 10.3125,6.34375 1.66715,0.80631 3.46043,1.39658 5.21875,1.78125 -0.46163,0.2487 -1.597,0.71225 -3.6875,1.03125 -2.8756,0.43876 -6.7804,0.7331 -8.40625,0.6875 -1.53823,-0.0431 -3.2328,-0.74522 -3.53125,-0.875 0.16833,0.11282 0.41057,0.41375 -0.21875,1.03125 -0.90812,0.8911 -6.20295,1.52825 -9.1875,1.8125 -2.97118,0.28298 -6.57342,-0.1758 -10.9375,-1.9375 -3.95934,-1.59831 -5.32915,-2.79487 -9.34375,-4.3125 3e-5,0 0,0.15625 0,0.15625 3.5959,1.81135 5.23831,3.58233 8.8125,5.15625 1.72207,0.75835 3.58748,1.28895 5.40625,1.625 -0.53609,0.27908 -1.56658,0.68763 -3.4375,1.0625 -2.85539,0.5721 -6.78942,1.01939 -8.40625,1.03125 -0.84451,0.006 -1.70608,-0.0809 -2.375,-0.25 -0.67591,-0.16151 -1.16009,-0.32923 -1.28125,-0.375 0.16722,0.094 0.42267,0.38348 -0.21875,1.0625 -0.89787,0.95052 -6.18648,1.91708 -9.125,2.4375 -2.92534,0.51809 -6.43215,0.37424 -10.71875,-1.03125 -4.3158,-1.41507 -5.47277,-2.52994 -10.5625,-3.96875 4.57685,1.75101 6.08855,3.56006 10.03125,5 1.62608,0.59389 3.36885,0.95565 5.09375,1.15625 -0.45285,0.29702 -1.55478,0.88339 -3.59375,1.46875 -2.80472,0.80517 -6.63886,1.57583 -8.21875,1.75 -1.49475,0.1648 -3.11623,-0.31681 -3.40625,-0.40625 0.16356,0.0901 0.39278,0.35993 -0.21875,1.0625 -0.88247,1.01385 -6.04452,2.37165 -8.9375,3.0625 -2.88002,0.68778 -6.3356,0.76002 -10.5625,-0.4375 -3.83485,-1.08645 -5.17258,-2.07237 -9.0625,-3.125 -10e-6,0 0,0.15625 0,0.15625 3.48418,1.39485 5.06941,2.9194 8.53125,4.03125 1.66793,0.53572 3.45578,0.78674 5.21875,0.875 -0.51964,0.35212 -1.50039,0.91452 -3.3125,1.53125 -2.76566,0.94125 -6.59024,1.93537 -8.15625,2.15625 -0.81794,0.11539 -1.6331,0.12283 -2.28125,0.0312 -0.65496,-0.0832 -1.1326,-0.21827 -1.25,-0.25 0.16204,0.0746 0.43399,0.34044 -0.1875,1.09375 -0.87,1.05453 -6.00963,2.65925 -8.875,3.4375 -2.85253,0.77476 -6.25912,0.9582 -10.4375,-0.0937 -4.20683,-1.05913 -5.35669,-2.04166 -10.34375,-3.15625 4.48454,1.45946 5.96935,3.13523 9.8125,4.25 1.58504,0.45977 3.28679,0.63825 4.96875,0.6875 -0.44157,0.33676 -1.51251,1.02773 -3.5,1.78125 -2.73393,1.03649 -6.45198,2.16269 -8,2.4375 -1.46462,0.26002 -3.05958,-0.11654 -3.34375,-0.1875 0.16025,0.0796 0.38044,0.32098 -0.21875,1.0625 -0.86466,1.07006 -5.91652,2.81815 -8.75,3.6875 -2.8208,0.86547 -6.2075,1.15631 -10.34375,0.21875 -3.75259,-0.85061 -5.04785,-1.71647 -8.875,-2.59375 0,0 0,0.15625 0,0.15625 3.42796,1.23779 4.98741,2.6323 8.375,3.53125 1.63216,0.43314 3.36704,0.58301 5.09375,0.5625 -0.50893,0.38417 -1.47675,1.02182 -3.25,1.75 -2.70634,1.11134 -6.43633,2.30781 -7.96875,2.625 -0.8004,0.16569 -1.61231,0.21862 -2.25,0.15625 0,0 0,0.51552 0,0.92229 0,0.26507 0,0.48396 0,0.48396 0.22645,-0.14468 0.44891,-0.27261 0.71875,-0.375 1.08052,-0.40998 2.17161,-0.21577 6,-1.6875 3.82843,-1.47174 5.22412,-2.00498 5.90625,-2.40625 0.6796,-0.39978 1.61165,-0.87937 2.21875,-1.53125 1.82685,-0.13775 3.57075,-0.49323 4.9375,-1 2.96812,-1.10052 4.87537,-1.80619 6.78125,-2.46875 1.90586,-0.66254 2.35409,-1.41487 3.40625,-1.78125 1.09155,-0.38011 2.19511,-0.16538 6.0625,-1.53125 3.86745,-1.36586 5.28316,-1.82708 5.96875,-2.21875 0.70109,-0.40052 1.70081,-0.93298 2.3125,-1.59375 1.9708,-0.0547 3.81685,-0.38463 5.28125,-0.875 3.00148,-1.00508 4.92615,-1.62171 6.84375,-2.25 1.5386,-0.5041 2.17402,-1.04677 2.90625,-1.4375 0.23016,-0.13431 0.47574,-0.25373 0.75,-0.34375 1.09823,-0.36048 2.18145,-0.0814 6.09375,-1.3125 3.91233,-1.23113 5.36605,-1.67295 6.0625,-2.03125 0.69388,-0.35697 1.63015,-0.79261 2.25,-1.40625 1.86521,-0.0227 3.63581,-0.26683 5.03125,-0.6875 3.03043,-0.91354 4.99238,-1.4301 6.9375,-1.96875 1.94511,-0.53864 2.42618,-1.26452 3.5,-1.5625 1.11401,-0.30915 2.21994,0.007 6.1875,-1.03125 3.96761,-1.03863 5.41758,-1.43273 6.125,-1.75 0.73487,-0.32959 1.81383,-0.75372 2.4375,-1.375 1.99774,0.116 3.85743,-0.0201 5.34375,-0.375 3.07811,-0.735 5.08344,-1.10094 7.0625,-1.5 1.58792,-0.32018 2.24429,-0.79055 3,-1.09375 0.23757,-0.1068 0.46695,-0.19276 0.75,-0.25 1.13347,-0.22919 2.30448,0.20893 6.34375,-0.5 4.03933,-0.70893 5.50025,-0.92709 6.21875,-1.1875 0.71586,-0.25944 1.70428,-0.56724 2.34375,-1.09375 1.92427,0.23949 3.74788,0.22453 5.1875,0 3.12633,-0.48762 5.15455,-0.70067 7.15625,-0.96875 2.00171,-0.26807 2.48869,-0.94514 3.59375,-1.09375 1.14639,-0.15418 2.27592,0.30157 6.34375,-0.21875 4.06784,-0.52032 5.56013,-0.69573 6.28125,-0.9375 0.7371,-0.24714 1.79809,-0.58623 2.4375,-1.125 2.05007,0.33553 3.97378,0.39796 5.5,0.21875 3.14231,-0.36896 5.17994,-0.55936 7.1875,-0.78125 1.61076,-0.17802 2.26467,-0.6082 3.03125,-0.84375 0.24094,-0.0855 0.49412,-0.1556 0.78125,-0.1875 1.14978,-0.12772 2.30129,0.34665 6.375,-0.125 4.07374,-0.47165 5.55909,-0.6106 6.28125,-0.84375 0.71946,-0.23227 1.70024,-0.47346 2.34375,-0.96875 1.93637,0.33346 3.77006,0.40424 5.21875,0.25 3.14602,-0.33495 5.17756,-0.51859 7.1875,-0.71875 2.00996,-0.20014 2.48414,-0.82639 3.59375,-0.9375 1.15114,-0.11528 2.29643,0.36506 6.375,-0.0625 4.07861,-0.42756 5.58886,-0.56209 6.3125,-0.78125 0.73915,-0.22386 1.79572,-0.51325 2.4375,-1.03125 2.0571,0.39867 4.00187,0.4934 5.53125,0.34375 3.14873,-0.3081 5.17584,-0.47325 7.1875,-0.65625 1.61407,-0.14682 2.2631,-0.56055 3.03125,-0.78125 0.24142,-0.0809 0.49353,-0.12991 0.78125,-0.15625 1.15211,-0.10545 2.29296,0.39275 6.375,0 4.08208,-0.39275 5.5889,-0.53084 6.3125,-0.75 0.7209,-0.21833 1.6997,-0.4477 2.3438,-0.9375 1.938,0.34999 3.7688,0.45438 5.2187,0.3125 3.1487,-0.3081 5.1758,-0.47325 7.1875,-0.65625 2.0116,-0.18299 2.5142,-0.83802 3.625,-0.9375 1.1523,-0.10323 2.2922,0.38483 6.375,0 4.0829,-0.38482 5.5887,-0.501 6.3125,-0.71875 0.7393,-0.22243 1.7956,-0.51449 2.4375,-1.03125 2.0574,0.40177 4.0029,0.50333 5.5313,0.34375 3.1466,-0.32852 5.1771,-0.5227 7.1875,-0.71875 1.613,-0.15729 2.2656,-0.63148 3.0312,-0.875 0.2407,-0.088 0.4632,-0.12137 0.75,-0.15625 1.1483,-0.1397 2.3167,0.33991 6.375,-0.25 4.0583,-0.58992 5.5618,-0.77714 6.2813,-1.03125 0.7167,-0.25316 1.6745,-0.55807 2.3125,-1.09375 1.9197,0.21194 3.7199,0.15141 5.1562,-0.0937 3.1191,-0.5324 5.1116,-0.92861 7.0938,-1.3125 1.9821,-0.38387 2.4743,-1.03965 3.5625,-1.28125 1.1288,-0.25066 2.2703,0.11629 6.25,-0.875 3.9796,-0.99128 5.4296,-1.4193 6.125,-1.78125 0.7223,-0.37601 1.7619,-0.87058 2.375,-1.53125 1.963,-0.012 3.7937,-0.29105 5.2187,-0.84375 2.9512,-1.14461 4.8732,-1.86942 6.6875,-2.75 1.4557,-0.70653 2.3348,-1.68641 2.5469,-1.98438 0.2122,-0.29796 0.1118,-0.7453 0.1379,-0.76675 0.043,-0.0352 0.3193,-0.085 0.479,-0.42844 0.8589,-1.84708 2.321,-5.64459 2.4352,-6.32945 0.1137,-0.68216 0.1638,-1.34774 0.2145,-1.74497 0.029,-0.22952 -0.1467,-0.86544 -0.1246,-0.92404 0.031,-0.0821 0.3045,-0.26528 0.3599,-0.51471 0.2663,-1.19833 0.089,-2.19129 -0.1251,-3.60893 -0.214,-1.41764 -0.9837,-4.62214 -1.6369,-5.47626 -0.6589,-0.86172 -1.2229,-1.01117 -1.7479,-1.00066 -0.2086,0.26976 0.1368,0.26309 0.1626,0.31261 0.6806,0.0508 0.934,0.36864 1.4192,0.89662 0.4852,0.52798 1.2218,3.85117 1.3584,5.30156 0.1366,1.45039 0.19,2.8602 -0.088,3.46864 -0.2781,0.60845 -0.7232,0.51703 -1.0156,0.58291 0.531,0.18589 0.6698,0.12483 0.7314,0.96929 0.059,0.81338 -0.1332,1.63969 -0.5198,2.80562 -0.3912,1.18001 -1.8452,4.34998 -2.2857,4.59877 -0.4523,0.25551 -0.7314,0.27038 -1.067,0.13944 z"
5363 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7337-2);enable-background:new"
5364 sodipodi:nodetypes="cssscscsscsssccscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssscscssssssscscsscsssccscsscscssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsssssscssssscsszsszssszzcczzzczzzc" />
5365 <path
5366 inkscape:connector-curvature="0"
5367 id="path8183-3"
5368 d="m 988.75,-263.84375 c 1.91161,0.6344 4.55027,1.75841 6.125,2.8125 1.57477,1.05409 2.8961,1.48252 5.5313,3.375 2.6082,1.87314 5.0269,3.01522 7.3125,4.0625 2.4693,1.13147 5.7521,2.15474 9.5312,3.9375 -1.2072,-1.2584 -7.139,-3.36445 -9.0312,-4.1875 -1.8922,-0.82304 -4.128,-1.93049 -6.9375,-3.78125 -2.80961,-1.85075 -3.62224,-2.48154 -6.00005,-3.71875 -2.37782,-1.23719 -4.07988,-1.9492 -6.53125,-2.5 z"
5369 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7297-4);enable-background:new" />
5370 <path
5371 inkscape:connector-curvature="0"
5372 id="path8185-3"
5373 d="m 957.5,-260.78125 c 1.91,0.6181 4.58288,1.70934 6.15625,2.75 1.57339,1.04066 2.89608,1.48252 5.53125,3.375 2.60823,1.87315 5.02692,3.01521 7.3125,4.0625 2.46931,1.13147 5.75213,2.15475 9.53125,3.9375 -1.20728,-1.2584 -7.20154,-3.3957 -9.09375,-4.21875 -1.89217,-0.82304 -4.09666,-1.9305 -6.90625,-3.78125 -2.80958,-1.85075 -3.59295,-2.43932 -5.96875,-3.65625 -2.37578,-1.21691 -4.11321,-1.93885 -6.5625,-2.46875 z"
5374 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7301-5);enable-background:new" />
5375 <path
5376 inkscape:connector-curvature="0"
5377 id="path8187-7"
5378 d="m 926.09375,-257.375 c 1.90772,0.59745 4.55348,1.66384 6.125,2.6875 1.5715,1.02365 2.87022,1.43971 5.5,3.28125 2.60291,1.82273 5.02887,2.9722 7.3125,4 2.4672,1.11041 5.75535,2.09323 9.53125,3.84375 -1.20623,-1.2481 -7.1719,-3.31809 -9.0625,-4.125 -1.89058,-0.8069 -4.10242,-1.89104 -6.90625,-3.6875 -2.80385,-1.79644 -3.62704,-2.40251 -6,-3.59375 -2.37297,-1.19124 -4.05362,-1.90283 -6.5,-2.40625 z"
5379 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7305-4);enable-background:new" />
5380 <path
5381 inkscape:connector-curvature="0"
5382 id="path8189-3"
5383 d="m 894.90625,-253.5625 c 1.90213,0.55355 4.58701,1.58887 6.15625,2.59375 1.56923,1.00487 2.87401,1.40864 5.5,3.21875 2.59912,1.79164 5.00034,2.87189 7.28125,3.875 2.46428,1.08374 5.75984,2.04029 9.53125,3.75 -1.2048,-1.23507 -7.17416,-3.24478 -9.0625,-4.03125 -1.88832,-0.78647 -4.0752,-1.8308 -6.875,-3.59375 -2.79977,-1.76294 -3.59919,-2.36836 -5.96875,-3.53125 -2.36957,-1.16288 -4.12325,-1.83412 -6.5625,-2.28125 z"
5384 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7309-9);enable-background:new" />
5385 <path
5386 inkscape:connector-curvature="0"
5387 id="path8191-2"
5388 d="m 863.71875,-248.65625 c 1.88062,0.42909 4.50427,1.38038 6.0625,2.3125 1.55823,0.93211 2.85233,1.25776 5.46875,3 2.58971,1.72444 4.98067,2.70802 7.25,3.625 2.45176,0.99069 5.73959,1.87707 9.5,3.5 -1.20131,-1.20734 -7.15249,-3.06609 -9.03125,-3.78125 -1.87875,-0.71517 -4.0854,-1.68442 -6.875,-3.375 -2.78963,-1.69057 -3.58461,-2.22822 -5.9375,-3.28125 -2.35292,-1.05301 -4.02584,-1.71248 -6.4375,-2 z"
5389 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7313-2);enable-background:new" />
5390 <path
5391 inkscape:connector-curvature="0"
5392 id="path8193-6"
5393 d="m 833.15625,-241.375 c 1.84836,0.29644 4.46945,0.97632 6,1.78125 1.53058,0.80493 2.81374,1.05573 5.375,2.53125 2.53504,1.46046 4.89068,2.32509 7.125,3.0625 2.41399,0.79668 5.65711,1.46689 9.375,2.84375 -1.18771,-1.12873 -7.08772,-2.58975 -8.9375,-3.15625 -1.84977,-0.5665 -4.00342,-1.37392 -6.75,-2.84375 -2.74657,-1.46983 -3.50136,-1.92028 -5.8125,-2.78125 -2.31115,-0.86095 -4.00471,-1.32009 -6.375,-1.4375 z"
5394 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7317-7);enable-background:new" />
5395 <path
5396 inkscape:connector-curvature="0"
5397 id="path8195-5"
5398 d="m 802.90625,-232.3125 c 1.8222,0.21127 4.36576,0.80057 5.875,1.53125 1.50925,0.73066 2.75568,0.92998 5.28125,2.28125 2.49976,1.33746 4.83154,2.04843 7.03125,2.65625 2.37653,0.65667 5.56464,1.07288 9.21875,2.1875 -1.16735,-1.04496 -6.92888,-2.10329 -8.75,-2.5625 -1.82111,-0.45921 -3.95225,-1.12696 -6.65625,-2.4375 -2.70403,-1.31052 -3.47106,-1.7199 -5.75,-2.46875 -2.27895,-0.74883 -3.91325,-1.17931 -6.25,-1.1875 z"
5399 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7321-5);enable-background:new" />
5400 <path
5401 inkscape:connector-curvature="0"
5402 id="path8197-2"
5403 d="m 773.1875,-222.1875 c 1.81109,0.1787 4.32059,0.66506 5.8125,1.34375 1.49194,0.67869 2.7534,0.79822 5.25,2.0625 2.47107,1.25138 4.79005,1.89614 6.96875,2.4375 2.35387,0.58488 5.49134,0.89752 9.09375,1.84375 -1.15084,-0.99116 -6.85251,-1.7833 -8.65625,-2.1875 -1.80372,-0.4042 -3.91553,-1.02116 -6.59375,-2.25 -2.67818,-1.22884 -3.40345,-1.61089 -5.65625,-2.28125 -2.25279,-0.67034 -3.89627,-1.00232 -6.21875,-0.96875 z"
5404 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7329-8);enable-background:new" />
5405 <path
5406 inkscape:connector-curvature="0"
5407 id="path8199-6"
5408 d="m 743.5625,-211.1875 c 1.79281,0.12911 4.27313,0.54965 5.75,1.1875 1.4769,0.63785 2.7161,0.74156 5.1875,1.9375 2.44618,1.18372 4.72054,1.74666 6.875,2.21875 2.32767,0.51003 5.4196,0.68064 9,1.5625 -1.14379,-0.9706 -6.74759,-1.59065 -8.53125,-1.9375 -1.78367,-0.34684 -3.88285,-0.88756 -6.53125,-2.03125 -2.64841,-1.14368 -3.39495,-1.51631 -5.625,-2.125 -2.23008,-0.60868 -3.82594,-0.90966 -6.125,-0.8125 z"
5409 style="display:inline;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;filter:url(#filter7325-2);enable-background:new" />
5410 </g>
5411 </g>
5412 <path
5413 inkscape:connector-curvature="0"
5414 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
5415 d="m 863.87812,475.6679 c 1.64212,-3.218 3.51781,-5.73529 4.86136,-9.84898 0.79872,-3.65789 3.31204,-2.03073 7.26047,-8.3969 1.40193,-2.2395 5.47653,0.39136 8.9651,-2.39911 1.27072,-0.80319 2.88488,-0.40431 4.48256,-0.0631 3.76539,1.31896 5.82576,3.70355 8.33376,5.80837 6.13906,5.97023 20.53414,7.94327 23.48604,6.31346 1.43405,-2.90474 7.88128,-5.40888 12.37437,-11.11168 0.74811,-1.12267 11.72936,-8.74446 14.64721,-6.56599"
5416 id="path8201-5"
5417 sodipodi:nodetypes="ccccccccc" />
5418 <path
5419 inkscape:connector-curvature="0"
5420 style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
5421 d="m 888.50059,465.25071 c 7.36341,-3.23297 13.8109,-8.9084 20.70813,-13.38452 3.31057,-1.96954 6.86983,3.21601 10.796,3.59866 2.29773,-0.21813 3.7129,1.20259 5.68211,1.6415 5.15636,1.31779 2.39793,3.86488 9.97526,6.43972 6.15561,1.7204 8.9074,-6.79847 14.89975,-7.3236 4.87739,-0.50299 8.09892,-0.31603 11.61675,-0.25254 3.92696,0.13889 4.07855,-3.4976 6.06092,-5.3033 2.98056,-2.80522 7.15561,-1.84972 10.14485,-4.7409 1.01754,-1.38468 1.95458,-3.01085 2.73459,-5.10809 0.88201,-2.00034 3.04006,0.30598 4.79823,1.26269"
5422 id="path8203-8"
5423 sodipodi:nodetypes="ccccccccccc" />
5424 <path
5425 inkscape:connector-curvature="0"
5426 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9048-9);enable-background:accumulate"
5427 d="m 403.27922,1056.3058 56.56854,-42.4264 72.12489,14.1421 -46.66904,52.3259 -53.74012,7.0711 -28.28427,-31.1127 z"
5428 id="path8994-7" />
5429 <path
5430 inkscape:connector-curvature="0"
5431 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
5432 d="m 542.27183,1060.5719 c -1.40727,18.8012 -1.1449,32.751 2.08174,49.3033 3.22666,16.5523 16.40609,45.9073 20.33441,63.1837 3.92621,17.2671 2.69413,38.3097 -12.45944,51.1483 -15.31761,12.9774 -42.05128,21.5989 -67.83231,15.7337 -25.78105,-5.8652 -69.54907,-49.2234 -88.59019,-70.2283 -19.11214,-21.0833 -63.76086,-93.8506 -77.93853,-124.2758 -14.17767,-30.4251 -12.65961,-36.7186 -8.11972,-45.52972 -9.36672,-24.5205 -12.41371,-50.06681 -33.71245,-75.57664 30.32547,3.11444 43.88028,26.95633 60.12568,47.13975 -5.52989,-48.07603 -18.05471,-64.4165 -28.37395,-90.7243 29.9943,6.08165 50.57936,31.87239 63.97979,72.7125 9.55415,-3.91791 18.23776,-9.37294 30.18741,-9.0612 -11.2975,-41.6958 -17.94946,-69.91584 -36.68725,-101.06994 53.44196,5.67033 83.65702,80.63932 78.97142,87.9608 9.97797,-2.24399 19.00565,-6.53038 30.43653,-5.65167 -11.24897,-38.34702 -21.04781,-76.8679 -3.65971,-118.64819 0,0 48.28678,65.43688 54.38966,85.80578 6.10287,20.3689 1.51881,38.70051 1.51881,38.70051 0,0 16.95957,31.0853 20.29392,51.09414 3.3731,20.24138 -3.53269,59.10328 -4.94582,77.98328 z"
5433 id="path4189-9"
5434 sodipodi:nodetypes="czzzzzzcccccccccczczz" />
5435 <path
5436 inkscape:connector-curvature="0"
5437 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter3587-1);enable-background:accumulate"
5438 d="m 719.5,738.69519 18.31177,15.43196 44.41103,-15.38821 23.2772,-25.54375 11.46397,19.22065 30.67161,12.78354 25.09737,5.72837 L 892,723.19519 908.02309,747.02126 947,752.19519 l 10.24541,-6.19852 6.75471,8.6982 25.49988,11.00032 2,-40.5 L 955.94866,710.6576 923.45591,689.1305 883.0038,677.66492 861.69668,662.13148 840,685.19519 755.02878,638.61208 722,676.69519 l -2.5,62 z"
5439 id="path4191-6"
5440 sodipodi:nodetypes="cccccccccccccccccccccc"
5441 clip-path="url(#clipPath3631-6)"
5442 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,995.28646,23.53493)" />
5443 <path
5444 inkscape:connector-curvature="0"
5445 style="display:inline;opacity:0.58775509;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3898-1);enable-background:new"
5446 d="m 584,696.5 -6.5625,17.15625 c 0,0 -7.81152,20.36488 -15.6875,43.65625 -3.93799,11.64568 -7.88302,24.04145 -10.9375,35.125 -3.05448,11.08355 -5.33586,20.37986 -5.5,28.28125 -0.39807,19.16196 5.74653,34.8883 8.9375,41.75 -0.77153,3.55523 -1.99137,9.45432 -3.34375,18.09375 -1.92042,12.26821 -3.71827,27.15441 -2.375,39.875 1.38209,13.08835 6.81222,28.18765 12.59375,43.03125 5.78153,14.8436 12.05435,29.22711 15.21875,38.03125 6.63206,18.4519 9.99296,31.5763 11.3125,48.5 0.58135,7.4561 -0.24227,20.336 -1.25,33.375 -1.00773,13.039 -2.18661,26.3014 -1.6875,36.9688 0.98911,21.1398 9.32798,46.8347 33.375,57.9374 22.77483,10.5154 55.32682,11.7022 83.4375,-3.4374 16.15992,-8.7034 30.07634,-27.0976 43.375,-46.9063 13.29866,-19.8087 24.96917,-41.0534 31.9375,-54.9063 15.35292,-30.5212 39.39353,-115.46418 45.625,-152.7187 3.01859,-18.04653 3.92166,-29.06555 2.625,-38.03125 -0.97853,-6.76604 -3.82819,-12.1474 -6.875,-16.21875 2.04274,-27.50791 -0.73207,-51.36878 11.96875,-79.40625 L 840.75,763.375 l -23.8125,9.3125 c -17.48975,6.83753 -28.90164,19.04536 -36.59375,32.0625 -0.32251,0.54577 -0.56314,1.10776 -0.875,1.65625 0.22203,-22.51521 4.40784,-37.63759 6.59375,-58.6875 l 1.96875,-19 L 771,737.375 c -30.59449,15.55571 -45.69489,48.19321 -49.71875,90.21875 -4.24532,-0.62547 -8.8314,-1.01965 -13.8125,-0.84375 -0.29149,-39.18036 -0.39629,-67.03685 8.59375,-99.375 l 5.59375,-20.125 -19.4375,7.65625 c -30.90937,12.20394 -47.85954,41.93073 -56.625,68.375 -4.38273,13.22214 -6.74582,25.80121 -7.59375,35.9375 -0.23203,2.77373 -0.31106,5.31132 -0.3125,7.71875 -3.24187,-0.0364 -6.42052,0.13589 -10.0625,0.5 0.0416,-39.00473 -3.48424,-79.75415 -32.28125,-116.5 L 584,696.5 Z m 5.8125,43.8125 c 16.80691,30.64383 17.47451,63.96728 16.9375,99.75 l -0.21875,15.0625 12.03493,-6.53921 c 8.66205,-3.13302 19.56058,-0.22752 31.93382,-0.83579 l 14.67465,9.3566 -6.3309,-25.7941 c -0.0897,-0.22997 -0.22046,-0.41669 -0.25,-0.71875 -0.19951,-2.03986 -0.22232,-5.47307 0.125,-9.625 0.69464,-8.30386 2.78957,-19.58524 6.625,-31.15625 5.15532,-15.55294 13.48801,-31.19248 25.125,-42.53125 -4.68381,28.63798 -3.21559,60.25934 -3.01164,95.80514 l -2.76593,13.26164 15.49632,-7.59803 c 9.0294,-2.75771 17.18897,-0.34996 29.28125,1.09375 l 13.24632,9.44423 L 741.09375,840 c 1.44793,-30.97177 8.22149,-53.67808 20.71875,-68.875 -2.98688,19.77884 -5.43043,41.7848 0.3125,78.34375 l 1.06552,6.37318 -2.93815,11.51685 10.61711,-8.16818 9.18973,10.22198 -1.54828,-10.4636 L 781.9375,852 c 5.70102,-13.21149 10.17282,-26.21337 16.34375,-36.65625 0.95986,-1.62434 2.03153,-3.06436 3.0625,-4.5625 -3.68066,21.15535 -2.42716,40.20815 -4.09375,57.78125 l -4.68014,7.80698 7.39889,0.22427 c 3.22005,3.48361 3.8675,3.85068 4.5625,8.65625 0.695,4.80557 0.31862,14.40035 -2.5625,31.625 -5.56799,33.28792 -31.84562,77.83981 -43.7404,101.4864 -6.60491,13.1304 -18.52833,57.4859 -31.12335,76.2465 -12.59502,18.7605 -28.53137,39.7673 -37.17204,44.4209 -21.49052,11.5742 -44.55594,25.5059 -60.61889,18.0895 -14.37486,-6.637 -23.03969,-21.1927 -23.81407,-37.7433 -0.38311,-8.188 0.61279,-21.3092 1.625,-34.4062 1.01221,-13.0971 11.28891,-22.5708 15.42339,-36.5626 5.37229,-18.1808 -1.44687,-36.5944 -12.5,-53.93745 -6.48655,-10.17778 -23.9768,-24.2579 -29.54839,-38.5625 -5.57159,-14.3046 -10.36751,-29.00315 -11.28125,-37.65625 -0.92621,-8.77113 0.4225,-23.02502 2.21875,-34.5 1.79625,-11.47497 3.84375,-20.28125 3.84375,-20.28125 l 9.42278,-3.6152 -10.48528,-3.8848 c 0,0 -8.49889,-15.3101 -8.09375,-34.8125 0.0711,-3.42316 1.83626,-12.72805 4.71875,-23.1875 2.88249,-10.45945 6.76466,-22.55271 10.625,-33.96875 3.04439,-9.00308 5.78063,-16.60345 8.34375,-23.6875 z"
5447 id="path4193-0"
5448 clip-path="url(#clipPath3677-0)"
5449 sodipodi:nodetypes="ccssscsssssssssssssccccscccccccccsscccccccccccssscccccccccccccccsccccssssssssssssscccsssc"
5450 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,822.28931,10.93589)" />
5451 <g
5452 style="display:inline;enable-background:new"
5453 id="g3617-4"
5454 clip-path="url(#clipPath3622-5)"
5455 transform="translate(276,136)">
5456 <path
5457 inkscape:connector-curvature="0"
5458 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,-52.200498,74.09707)"
5459 id="path4195-1"
5460 d="m -15.66751,843.48852 -49.49748,-15.55635 -26.87005,52.3259 41.01219,45.25484 49.49747,-38.18377 -14.14213,-43.84062 z"
5461 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9024-1);enable-background:accumulate" />
5462 <path
5463 inkscape:connector-curvature="0"
5464 sodipodi:nodetypes="ccccccccccccc"
5465 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,-46.92842,75.511284)"
5466 id="path4197-0"
5467 d="m 118.70648,859.93048 -55.154328,-46.66904 -43.84062,36.76955 33.94113,53.74011 -13.596814,85.46203 -39.44536579,28.29217 -41.01220021,11.3137 -2.82842,46.669 56.56854,25.4559 18.943987,-69.65 23.45655,-58.85663 46.347541,-72.61491 16.62,-39.91188 z"
5468 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9020-8);enable-background:accumulate" />
5469 </g>
5470 <path
5471 inkscape:connector-curvature="0"
5472 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9044-0);enable-background:accumulate"
5473 d="m -70.82184,932.58397 60.81118,-26.87005 100.40916,31.1127 -63.63961,31.11269 -82.02438,-16.97056 -15.55635,-18.38478 z"
5474 id="path4199-4"
5475 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,229.07158,211.51128)" />
5476 <path
5477 inkscape:connector-curvature="0"
5478 style="display:inline;opacity:0.58775509;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4105-2);enable-background:new"
5479 d="m 583.0625,715.75 c -12.10609,34.44974 -26.7145,68.53333 -31.75,104.84375 -0.83208,14.92867 4.58915,29.15943 8.84375,43.0625 -5.91624,27.20126 -10.13681,56.89995 1.15625,83.125 13.51717,38.16085 35.00147,75.68215 32.42279,117.46825 -0.9483,29.2942 -9.01444,60.9941 5.38971,88.2817 10.19864,19.3348 33.13956,27.3117 53.96785,27.6676 27.86219,1.1741 56.46261,-11.6216 72.0009,-35.2613 22.59549,-29.3717 41.80051,-61.4973 55.23865,-96.0598 16.89053,-45.506 29.6718,-92.56072 37.93402,-140.3989 1.8244,-12.94106 3.10108,-27.46985 -4.57892,-38.82255 -3.43115,-7.33632 0.0421,-15.56014 -0.68457,-23.30977 0.674,-24.99466 4.01232,-50.66376 16.65332,-72.59648 -17.73313,6.4446 -35.07268,16.55971 -44.00307,33.86425 -3.93508,6.70955 -7.60482,13.57413 -11.37193,20.38575 -3.54999,-30.01408 3.71963,-59.64828 6.78125,-89.28125 -20.16604,9.05463 -36.87672,25.65522 -44.17495,46.682 -6.30463,15.58003 -8.80222,32.31718 -10.26255,49.03675 -8.25334,-1.51925 -16.68447,-2.10155 -25.0625,-1.5 -0.96308,-38.69787 -0.46696,-79.40715 10.96875,-115.90625 -18.68113,6.21776 -35.16621,18.73551 -45.62803,35.38723 -13.85254,20.87979 -21.2614,45.75395 -23.05947,70.61277 0.58534,4.32454 -0.0613,11.84009 -6.34375,9.875 -5.33118,0.0176 -10.62908,0.67883 -15.9375,1.09375 1.14784,-39.38148 -3.34144,-81.6282 -27.0625,-114.21875 -3.06071,-3.63717 -5.63685,-7.68438 -8.625,-11.34375 -0.9375,2.4375 -1.875,4.875 -2.8125,7.3125 z m 7.75,13.84375 c 18.56527,29.29629 22.4825,64.82012 22.125,98.875 0.20409,5.17526 -0.51656,11.8292 0.125,16.0625 12.31856,-6.10275 26.73912,-2.4399 39.78125,-2.1875 2.31712,1.22325 3.1921,1.65243 1.90625,-1.40625 -4.16455,-13.95285 -1.84828,-28.613 1.80504,-42.40764 6.36687,-26.29064 20.62828,-51.08798 42.81996,-67.02986 -8.61709,37.23706 -5.71658,76.56161 -6.09375,113.96875 12.25344,-6.9099 27.27879,-3.44613 40.03125,-0.25 3.39222,3.5348 2.28935,-0.72948 2.1875,-3.8125 -0.48309,-21.37058 4.13133,-43.06963 13.6875,-62.15625 5.96266,-10.68727 14.24338,-19.80379 22.4375,-28.875 -7.87156,33.8381 -9.2029,69.33593 -2.71875,103.5 1.72485,-1.41118 4.60681,-0.45414 5.65625,-0.375 9.68369,-21.23682 16.35112,-45.38062 34.89016,-60.74185 1.87329,-0.37122 -1.44818,8.52495 -1.48391,11.8981 -3.53488,21.84581 -7.17516,44.14234 -8.78421,66.21911 -8.78379,2.34171 2.84835,2.32354 3.46875,4.0625 7.92311,10.5658 4.66299,24.40472 3.63165,36.35334 -7.06405,45.03355 -22.14231,87.36194 -35.95355,130.6798 -12.07476,32.9493 -27.3742,58.8525 -47.88808,87.2015 -10.95257,13.5514 -23.24472,27.8513 -40.84375,32.5 -20.15601,6.2413 -44.20676,10.8769 -62.59956,0.046 -17.28966,-12.3414 -21.02393,-35.7089 -19.26226,-55.6864 0.0488,-15.8262 4.93886,-28.5121 4.4106,-43.4918 -0.53824,-15.2629 -2.29135,-30.5647 -6.54261,-46.8663 -4.25126,-16.30162 -9.04325,-24.91794 -16.11906,-41.57338 -7.24111,-17.04456 -15.07015,-36.74863 -18.20542,-56.28842 -1.74948,-18.62714 2.89171,-37.12262 5.78125,-55.25 3.29623,-2.83696 -1.59799,-5.19659 -2.3125,-8.1875 -7.60113,-17.01508 -8.40747,-36.7749 -2.74234,-54.55998 7.1302,-25.0723 15.76087,-49.63241 24.67984,-74.12752 0.70833,1.30208 1.41667,2.60417 2.125,3.90625 z"
5480 id="path4201-8"
5481 sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccczzzcccccc"
5482 clip-path="url(#clipPath4177-4)"
5483 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,822.28931,10.93589)" />
5484 <path
5485 inkscape:connector-curvature="0"
5486 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4130-8);enable-background:accumulate"
5487 d="m 735.05635,733.03834 2.75542,21.08881 44.41103,-15.38821 4.85063,-22.38975 -3.93617,-22.05222 -22.45163,-36.59301 -8.28004,30.30494 -17.34924,45.02944 z"
5488 id="path4203-7"
5489 sodipodi:nodetypes="cccccccc"
5490 clip-path="url(#clipPath3631-6)"
5491 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,995.28646,23.53493)" />
5492 <path
5493 inkscape:connector-curvature="0"
5494 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4141-2);enable-background:accumulate"
5495 d="m 831.81321,730.29452 15.82237,14.90486 20.85473,2.89994 -1.59029,-39.92598 8.32561,-30.50842 -7.16499,-6.34106 -21.69669,20.9424 -14.55074,38.02826 z"
5496 id="path4205-0"
5497 sodipodi:nodetypes="cccccccc"
5498 clip-path="url(#clipPath3631-6)"
5499 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,995.28646,23.53493)" />
5500 <g
5501 id="g8317-8"
5502 style="display:inline;filter:url(#filter8333-2);enable-background:new"
5503 clip-path="url(#clipPath8338-4)"
5504 transform="translate(276,136)">
5505 <path
5506 inkscape:connector-curvature="0"
5507 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,719.28646,-112.46507)"
5508 clip-path="none"
5509 sodipodi:nodetypes="ccccc"
5510 id="path4209-6"
5511 d="m 964.00012,754.69487 18.42881,7.46479 9.07107,-36.96447 -14.87031,4.83886 -12.62957,24.66082 z"
5512 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5513 <rect
5514 y="757.19519"
5515 x="-55"
5516 height="177"
5517 width="182"
5518 id="rect8315-2"
5519 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5520 </g>
5521 <g
5522 id="g8346-4"
5523 style="display:inline;filter:url(#filter8354-2);enable-background:new"
5524 clip-path="url(#clipPath8359-0)"
5525 transform="translate(276,136)">
5526 <path
5527 inkscape:connector-curvature="0"
5528 transform="matrix(-0.9045327,0.2506626,0.2506626,0.9045327,719.28646,-112.46507)"
5529 clip-path="none"
5530 sodipodi:nodetypes="ccccccc"
5531 id="path4207-7"
5532 d="m 910.14441,746.31415 32.61295,5.17393 -0.36119,-23.87619 7.18853,-29.68221 -8.45112,-5.26365 -21.82194,26.51077 -9.16723,27.13735 z"
5533 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5534 <rect
5535 y="696.19519"
5536 x="-22"
5537 height="176"
5538 width="165"
5539 id="rect8344-9"
5540 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5541 </g>
5542 <path
5543 inkscape:connector-curvature="0"
5544 style="display:inline;opacity:1;fill:#ada469;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new"
5545 d="m 1036.164,1071.8338 c 6.7941,18.9028 10.4937,33.2997 11.8903,51.2119 1.3966,17.9123 -3.7827,51.8008 -2.9005,70.6561 0.8818,18.8452 8.1337,40.099 27.3446,48.9689 19.4189,8.9658 49.3193,10.2113 74.1199,-3.1456 24.8006,-13.357 57.401,-70.3255 70.9742,-97.3087 13.6239,-27.0839 38.7611,-114.4974 44.6608,-149.76859 5.8998,-35.27121 2.5506,-41.30077 -4.6174,-49.05549 2.6403,-27.84015 -1.4998,-54.93543 13.1096,-87.18618 -30.249,11.8257 -37.3823,40.1607 -48.3189,65.50508 -8.0009,-50.93293 0.2092,-71.27319 3.3189,-101.21936 -29.0647,14.77791 -42.8615,47.11402 -45,92.85714 -10.9239,-1.3042 -21.3914,-4.43423 -33.5714,-0.71429 -0.264,-46.02334 -1.4635,-76.88941 8.9106,-114.20649 -53.2554,21.02686 -62.9472,106.5941 -56.0535,112.77792 -10.8828,0.535 -21.371,-1.2973 -32.8571,2.85715 0.6389,-42.57135 -0.2605,-84.90861 -30,-122.85715 0,0 -30.958,80.92234 -31.4286,103.57143 -0.4705,22.64909 9.4516,40.16588 9.4516,40.16588 0,0 -8.568,36.74051 -6.2986,58.23223 2.2959,21.74142 20.4429,59.67622 27.2655,78.65812 z"
5546 id="path8848-3"
5547 sodipodi:nodetypes="czzzzzzcccccccccczczz" />
5548 <path
5549 inkscape:connector-curvature="0"
5550 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter3587-1);enable-background:accumulate"
5551 d="m 719.5,738.69519 18.31177,15.43196 44.41103,-15.38821 23.2772,-25.54375 11.46397,19.22065 30.67161,12.78354 25.09737,5.72837 L 892,723.19519 908.02309,747.02126 947,752.19519 l 10.24541,-6.19852 6.75471,8.6982 25.49988,11.00032 2,-40.5 L 955.94866,710.6576 923.45591,689.1305 883.0038,677.66492 861.69668,662.13148 840,685.19519 755.02878,638.61208 722,676.69519 l -2.5,62 z"
5552 id="path3635-9"
5553 sodipodi:nodetypes="cccccccccccccccccccccc"
5554 clip-path="url(#clipPath3631-6)"
5555 transform="translate(276,136)" />
5556 <path
5557 inkscape:connector-curvature="0"
5558 transform="translate(450.03125,73.843964)"
5559 style="display:inline;opacity:0.58775509;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter3898-1);enable-background:new"
5560 d="m 584,696.5 -6.5625,17.15625 c 0,0 -7.81152,20.36488 -15.6875,43.65625 -3.93799,11.64568 -7.88302,24.04145 -10.9375,35.125 -3.05448,11.08355 -5.33586,20.37986 -5.5,28.28125 -0.39807,19.16196 5.74653,34.8883 8.9375,41.75 -0.77153,3.55523 -1.99137,9.45432 -3.34375,18.09375 -1.92042,12.26821 -3.71827,27.15441 -2.375,39.875 1.38209,13.08835 6.81222,28.18765 12.59375,43.03125 5.78153,14.8436 12.05435,29.22711 15.21875,38.03125 6.63206,18.4519 9.99296,31.5763 11.3125,48.5 0.58135,7.4561 -0.24227,20.336 -1.25,33.375 -1.00773,13.039 -2.18661,26.3014 -1.6875,36.9688 0.98911,21.1398 9.32798,46.8347 33.375,57.9374 22.77483,10.5154 55.32682,11.7022 83.4375,-3.4374 16.15992,-8.7034 30.07634,-27.0976 43.375,-46.9063 13.29866,-19.8087 24.96917,-41.0534 31.9375,-54.9063 15.35292,-30.5212 39.39353,-115.46418 45.625,-152.7187 3.01859,-18.04653 3.92166,-29.06555 2.625,-38.03125 -0.97853,-6.76604 -3.82819,-12.1474 -6.875,-16.21875 2.04274,-27.50791 -0.73207,-51.36878 11.96875,-79.40625 L 840.75,763.375 l -23.8125,9.3125 c -17.48975,6.83753 -28.90164,19.04536 -36.59375,32.0625 -0.32251,0.54577 -0.56314,1.10776 -0.875,1.65625 0.22203,-22.51521 4.40784,-37.63759 6.59375,-58.6875 l 1.96875,-19 L 771,737.375 c -30.59449,15.55571 -45.69489,48.19321 -49.71875,90.21875 -4.24532,-0.62547 -8.8314,-1.01965 -13.8125,-0.84375 -0.29149,-39.18036 -0.39629,-67.03685 8.59375,-99.375 l 5.59375,-20.125 -19.4375,7.65625 c -30.90937,12.20394 -47.85954,41.93073 -56.625,68.375 -4.38273,13.22214 -6.74582,25.80121 -7.59375,35.9375 -0.23203,2.77373 -0.31106,5.31132 -0.3125,7.71875 -3.24187,-0.0364 -6.42052,0.13589 -10.0625,0.5 0.0416,-39.00473 -3.48424,-79.75415 -32.28125,-116.5 L 584,696.5 Z m 5.8125,43.8125 c 16.80691,30.64383 17.47451,63.96728 16.9375,99.75 l -0.21875,15.0625 12.03493,-6.53921 c 8.66205,-3.13302 19.56058,-0.22752 31.93382,-0.83579 l 14.67465,9.3566 -6.3309,-25.7941 c -0.0897,-0.22997 -0.22046,-0.41669 -0.25,-0.71875 -0.19951,-2.03986 -0.22232,-5.47307 0.125,-9.625 0.69464,-8.30386 2.78957,-19.58524 6.625,-31.15625 5.15532,-15.55294 13.48801,-31.19248 25.125,-42.53125 -4.68381,28.63798 -3.21559,60.25934 -3.01164,95.80514 l -2.76593,13.26164 15.49632,-7.59803 c 9.0294,-2.75771 17.18897,-0.34996 29.28125,1.09375 l 13.24632,9.44423 L 741.09375,840 c 1.44793,-30.97177 8.22149,-53.67808 20.71875,-68.875 -2.98688,19.77884 -5.43043,41.7848 0.3125,78.34375 l 1.06552,6.37318 -2.93815,11.51685 10.61711,-8.16818 9.18973,10.22198 -1.54828,-10.4636 L 781.9375,852 c 5.70102,-13.21149 10.17282,-26.21337 16.34375,-36.65625 0.95986,-1.62434 2.03153,-3.06436 3.0625,-4.5625 -3.68066,21.15535 -2.42716,40.20815 -4.09375,57.78125 l -4.68014,7.80698 7.39889,0.22427 c 3.22005,3.48361 3.8675,3.85068 4.5625,8.65625 0.695,4.80557 0.31862,14.40035 -2.5625,31.625 -5.56799,33.28792 -31.79272,123.1659 -43.6875,146.8125 -6.60491,13.1304 -18.02998,33.8957 -30.625,52.6563 -12.59502,18.7605 -27.35933,35.5338 -36,40.1874 -21.49052,11.5742 -48.7808,10.2602 -64.84375,2.8438 -14.37486,-6.637 -20.53812,-23.4494 -21.3125,-40 -0.38311,-8.188 0.61279,-21.3092 1.625,-34.4062 1.01221,-13.0971 11.28891,-22.5708 15.42339,-36.5626 5.37229,-18.1808 -1.44687,-36.5944 -12.5,-53.93745 -6.48655,-10.17778 -23.9768,-24.2579 -29.54839,-38.5625 -5.57159,-14.3046 -10.36751,-29.00315 -11.28125,-37.65625 -0.92621,-8.77113 0.4225,-23.02502 2.21875,-34.5 1.79625,-11.47497 3.84375,-20.28125 3.84375,-20.28125 l 9.42278,-3.6152 -10.48528,-3.8848 c 0,0 -8.49889,-15.3101 -8.09375,-34.8125 0.0711,-3.42316 1.83626,-12.72805 4.71875,-23.1875 2.88249,-10.45945 6.76466,-22.55271 10.625,-33.96875 3.04439,-9.00308 5.78063,-16.60345 8.34375,-23.6875 z"
5561 id="path3669-2"
5562 clip-path="url(#clipPath3677-0)"
5563 sodipodi:nodetypes="ccssscsssssssssssssccccscccccccccsscccccccccccssscccccccccccccccsccccssssssssssssscccsssc" />
5564 <g
5565 id="g3628-8"
5566 clip-path="url(#clipPath3636-90)"
5567 transform="translate(276,136)">
5568 <path
5569 inkscape:connector-curvature="0"
5570 id="path8988-3"
5571 d="m 824.48651,818.48242 -49.49748,-15.55635 -26.87005,52.3259 41.01219,45.25484 49.49747,-38.18377 -14.14213,-43.84062 z"
5572 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9024-1);enable-background:accumulate" />
5573 <path
5574 inkscape:connector-curvature="0"
5575 id="path8990-0"
5576 d="m 964.49365,855.25197 -55.15433,-46.66904 -43.84062,36.76955 33.94113,53.74011 7.07106,66.46804 -50.91168,35.35537 -41.0122,11.3137 -2.82842,46.669 56.56854,25.4559 63.63961,-76.3676 24.04163,-94.75227 8.48528,-57.98276 z"
5577 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9020-8);enable-background:accumulate" />
5578 </g>
5579 <path
5580 inkscape:connector-curvature="0"
5581 style="display:inline;overflow:visible;visibility:visible;opacity:0.25;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter9044-0);enable-background:accumulate"
5582 d="m 1045.3322,1043.5779 60.8112,-26.8701 100.4091,31.1127 -63.6396,31.1127 -82.0244,-16.9706 -15.5563,-18.3847 z"
5583 id="path8992-1" />
5584 <path
5585 inkscape:connector-curvature="0"
5586 transform="translate(450.03125,73.843964)"
5587 style="display:inline;opacity:0.58775509;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:20.79999924;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4185-1);enable-background:new"
5588 d="m 583.0625,715.75 c -12.10609,34.44974 -26.7145,68.53333 -31.75,104.84375 -0.83208,14.92867 4.58915,29.15943 8.84375,43.0625 -5.91624,27.20126 -10.13681,56.89995 1.15625,83.125 13.51717,38.16085 35.00147,75.68215 32.42279,117.46825 -0.9483,29.2942 -9.01444,60.9941 5.38971,88.2817 10.19864,19.3348 33.13956,27.3117 53.96785,27.6676 27.86219,1.1741 56.46261,-11.6216 72.0009,-35.2613 22.59549,-29.3717 41.80051,-61.4973 55.23865,-96.0598 16.89053,-45.506 29.6718,-92.56072 37.93402,-140.3989 1.8244,-12.94106 3.10108,-27.46985 -4.57892,-38.82255 -3.43115,-7.33632 0.0421,-15.56014 -0.68457,-23.30977 0.674,-24.99466 4.01232,-50.66376 16.65332,-72.59648 -17.73313,6.4446 -35.07268,16.55971 -44.00307,33.86425 -3.93508,6.70955 -7.60482,13.57413 -11.37193,20.38575 -3.54999,-30.01408 3.71963,-59.64828 6.78125,-89.28125 -20.16604,9.05463 -36.87672,25.65522 -44.17495,46.682 -6.30463,15.58003 -8.80222,32.31718 -10.26255,49.03675 -8.25334,-1.51925 -16.68447,-2.10155 -25.0625,-1.5 -0.96308,-38.69787 -0.46696,-79.40715 10.96875,-115.90625 -18.68113,6.21776 -35.16621,18.73551 -45.62803,35.38723 -13.85254,20.87979 -21.2614,45.75395 -23.05947,70.61277 0.58534,4.32454 -0.0613,11.84009 -6.34375,9.875 -5.33118,0.0176 -10.62908,0.67883 -15.9375,1.09375 1.14784,-39.38148 -3.34144,-81.6282 -27.0625,-114.21875 -3.06071,-3.63717 -5.63685,-7.68438 -8.625,-11.34375 -0.9375,2.4375 -1.875,4.875 -2.8125,7.3125 z m 7.75,13.84375 c 18.56527,29.29629 22.4825,64.82012 22.125,98.875 0.20409,5.17526 -0.51656,11.8292 0.125,16.0625 12.31856,-6.10275 26.73912,-2.4399 39.78125,-2.1875 2.31712,1.22325 3.1921,1.65243 1.90625,-1.40625 -4.16455,-13.95285 -1.84828,-28.613 1.80504,-42.40764 6.36687,-26.29064 20.62828,-51.08798 42.81996,-67.02986 -8.61709,37.23706 -5.71658,76.56161 -6.09375,113.96875 12.25344,-6.9099 27.27879,-3.44613 40.03125,-0.25 3.39222,3.5348 2.28935,-0.72948 2.1875,-3.8125 -0.48309,-21.37058 4.13133,-43.06963 13.6875,-62.15625 5.96266,-10.68727 14.24338,-19.80379 22.4375,-28.875 -7.87156,33.8381 -9.2029,69.33593 -2.71875,103.5 1.72485,-1.41118 4.60681,-0.45414 5.65625,-0.375 9.68369,-21.23682 16.35112,-45.38062 34.89016,-60.74185 1.87329,-0.37122 -1.44818,8.52495 -1.48391,11.8981 -3.53488,21.84581 -3.2972,44.17323 -4.90625,66.25 -1.31238,1.37679 2.84835,2.32354 3.46875,4.0625 7.92311,10.5658 3.12294,24.83149 2.0916,36.78011 -7.06405,45.03355 -21.76553,88.37934 -35.57677,131.69714 -12.07476,32.9493 -30.7197,63.08 -51.23358,91.429 -10.95257,13.5514 -23.24472,27.8513 -40.84375,32.5 -20.15601,6.2413 -43.57595,5.1744 -61.96875,-5.6562 -17.28966,-12.3414 -21.02393,-35.7089 -19.26226,-55.6864 0.0488,-15.8262 2.37211,-27.8008 7.91747,-42.8053 5.54535,-15.0045 2.47105,-31.3317 -1.78021,-47.6333 -4.25126,-16.3016 -12.17903,-26.26002 -21.82158,-42.20417 -9.64255,-15.94415 -17.6369,-36.03734 -20.77217,-55.57713 -1.74948,-18.62714 2.89171,-37.12262 5.78125,-55.25 3.29623,-2.83696 -1.59799,-5.19659 -2.3125,-8.1875 -7.60113,-17.01508 -8.40747,-36.7749 -2.74234,-54.55998 7.1302,-25.0723 15.76087,-49.63241 24.67984,-74.12752 0.70833,1.30208 1.41667,2.60417 2.125,3.90625 z"
5589 id="path4149-7"
5590 sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccczzzcccccc"
5591 clip-path="url(#clipPath4177-4)" />
5592 <path
5593 inkscape:connector-curvature="0"
5594 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4130-8);enable-background:accumulate"
5595 d="m 735.05635,733.03834 2.75542,21.08881 44.41103,-15.38821 4.85063,-22.38975 -3.93617,-22.05222 -22.45163,-36.59301 -8.28004,30.30494 -17.34924,45.02944 z"
5596 id="path3902-8"
5597 sodipodi:nodetypes="cccccccc"
5598 clip-path="url(#clipPath3631-6)"
5599 transform="translate(276,136)" />
5600 <path
5601 inkscape:connector-curvature="0"
5602 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;filter:url(#filter4141-2);enable-background:accumulate"
5603 d="m 831.81321,730.29452 15.82237,14.90486 20.85473,2.89994 -1.59029,-39.92598 8.32561,-30.50842 -7.16499,-6.34106 -21.69669,20.9424 -14.55074,38.02826 z"
5604 id="path4135-9"
5605 sodipodi:nodetypes="cccccccc"
5606 clip-path="url(#clipPath3631-6)"
5607 transform="translate(276,136)" />
5608 <g
5609 id="g8367-1"
5610 style="filter:url(#filter8379-0)"
5611 clip-path="url(#clipPath8392-1)"
5612 transform="translate(276,136)">
5613 <path
5614 inkscape:connector-curvature="0"
5615 clip-path="none"
5616 sodipodi:nodetypes="ccccccc"
5617 id="path4145-5"
5618 d="m 910.14441,746.31415 32.61295,5.17393 -0.36119,-23.87619 7.18853,-29.68221 -8.45112,-5.26365 -21.82194,26.51077 -9.16723,27.13735 z"
5619 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5620 <rect
5621 y="650.19098"
5622 x="877.51953"
5623 height="172.53406"
5624 width="123.03658"
5625 id="rect8365-4"
5626 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5627 </g>
5628 <g
5629 id="g8400-9"
5630 style="filter:url(#filter8404-9)"
5631 clip-path="url(#clipPath8417-4)"
5632 transform="translate(276,136)">
5633 <path
5634 inkscape:connector-curvature="0"
5635 clip-path="none"
5636 sodipodi:nodetypes="ccccc"
5637 id="path4147-2"
5638 d="m 964.00012,754.69487 18.42881,7.46479 9.07107,-36.96447 -14.87031,4.83886 -12.62957,24.66082 z"
5639 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5640 <rect
5641 y="677.06104"
5642 x="924.89569"
5643 height="125.1579"
5644 width="142.12846"
5645 id="rect8398-5"
5646 style="display:inline;overflow:visible;visibility:visible;opacity:1;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:25;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;enable-background:accumulate" />
5647 </g>
5648 </g>
5649 </g> 956 </g>
5650 <path 957 </g>
5651 style="fill:#f8d615;fill-opacity:1;fill-rule:evenodd;stroke:#f8d615;stroke-width:17.84425545;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send)" 958 <path d="M3603.7 633.68c-3.826-60.621-16.906-121.51-17.254-181.22-.187-32.048 3.291-63.757 13.834-94.91 36.554-156.68 117.6-203.23 186.99-219.47 87.416-26.435 185.96 43.047 234.7 228.91 54.432 181.72 56.997 414.01 81.07 622.74 29.605 305.05 55.09 614.78 60.735 928.25-3.08 187.6-8.474 396.35-60.847 547.4-48.299 120.83-123.49 120.1-188.13 141.58-91.07 11.17-185.4-38.742-263.27-154.04-65.144-91.037-96.274-272.3-97.832-446.36-8.437-191.66 26.542-369.07 51.914-545.07 7.513-198.58 9.466-398.92 9.708-598.39-.841-77.252-7.13-153.13-11.612-229.41z" enable-background="accumulate" fill="#101414"/>
5652 d="M 544.23337,203.09259 3443.746,100.92806" 959 <path transform="matrix(1.0057 0 0 2.3995 3249.4 125.01)" d="M311.83 415.43l9.9 121.62-60.105 136.47 15.556 174.66c15.613 61.879 32.185 98.669 74.376 117.05 4.32-36.24-38.612-142.96-39.243-189.12-.631-46.184 10.83-108.61 30.678-158.3 20.048-50.192 36.897-44.846 42.125-92.593s-17.426-149.39-17.426-149.39l-55.86 39.598z" clip-path="url(#y)" enable-background="accumulate" fill="#fff" filter="url(#fu)" opacity=".25"/>
5653 id="path7167" 960 <path d="m3987.6 1371.5s16.85 88.825 28.865 129.46c12.014 40.638 53.027 134.48 53.027 134.48l52.896-306.15" enable-background="accumulate" fill="url(#ft)"/>
5654 inkscape:connector-curvature="0" 961 <path transform="matrix(1.0057 0 0 2.3995 3249.4 125.01)" d="m730.32 536.57c0 8.485 42.548 58.468 42.548 58.468l12.607-28.77-55.154-29.698z" clip-path="url(#fs)" enable-background="accumulate" fill="#fff" filter="url(#fr)" opacity=".08"/>
5655 sodipodi:nodetypes="cc" /> 962 </g>
5656 <path 963 <g transform="matrix(1.0057 0 0 2.3995 3424.4 -24.137)" clip-path="url(#fq)" enable-background="new">
5657 style="display:inline;fill:#f8d615;fill-opacity:1;fill-rule:evenodd;stroke:#f8d615;stroke-width:18;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Send-4);enable-background:new" 964 <g transform="translate(-174.03 62.156)" filter="url(#aq)">
5658 d="M 527.91203,584.39421 3442.4188,1000.8355" 965 <g filter="url(#g)">
5659 id="path7167-9" 966 <path d="M425.88 476.99c10.805-1.479 24.744 3.354 44.643 3.214s57.453-16.91 82.143-17.143 62.752 12.284 79.286 15 22.848-.158 27.5 7.857 1.927 10.747-10.357 20.714-40.79 12.636-66.071 12.857c-25.282.221-70.381 7.079-95.357 3.93s-56.938-7.824-68.929-17.858-19.851-16.732-17.5-23.929 13.837-3.164 24.643-4.643z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
5660 inkscape:connector-curvature="0" 967 <path d="M343.65 412.6h381.84v181.02H343.65z" enable-background="accumulate" fill="none"/>
5661 sodipodi:nodetypes="cc" /> 968 </g>
5662 <text 969 <g filter="url(#g)">
5663 xml:space="preserve" 970 <path d="m861.17 390.2c-10.462 9.714-86.98 19.005-100.71 29.286s-14.753 12.888-12.143 20 6.545 9.406 25.714 8.571 98.571-27.622 98.571-21.429l-11.429-36.429z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
5664 style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#f83615;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" 971 <path d="M702.86 344.82h207.89v162.63H702.86z" enable-background="accumulate" fill="none"/>
5665 x="80.219048" 972 </g>
5666 y="107.38741" 973 </g>
5667 id="text8200" 974 <g enable-background="new" opacity=".18">
5668 sodipodi:linespacing="125%"><tspan 975 <g transform="translate(-174.03 62.156)" filter="url(#g)">
5669 sodipodi:role="line" 976 <path d="M425.88 476.99c10.805-1.479 24.744 3.354 44.643 3.214s57.453-16.91 82.143-17.143 62.752 12.284 79.286 15 22.848-.158 27.5 7.857 1.927 10.747-10.357 20.714-40.79 12.636-66.071 12.857c-25.282.221-70.381 7.079-95.357 3.93s-56.938-7.824-68.929-17.858-19.851-16.732-17.5-23.929 13.837-3.164 24.643-4.643z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
5670 id="tspan8202" 977 <path d="M343.65 412.6h381.84v181.02H343.65z" enable-background="accumulate" fill="none"/>
5671 x="80.219048" 978 </g>
5672 y="107.38741" 979 <g transform="translate(-174.03 62.156)" filter="url(#g)">
5673 style="font-size:50px;fill:#f83615;fill-opacity:1">CROP_DEFAULT</tspan></text> 980 <path d="m861.17 390.2c-10.462 9.714-86.98 19.005-100.71 29.286s-14.753 12.888-12.143 20 6.545 9.406 25.714 8.571 98.571-27.622 98.571-21.429l-11.429-36.429z" enable-background="new" fill="#fff" fill-rule="evenodd"/>
5674 <text 981 <path d="M702.86 344.82h207.89v162.63H702.86z" enable-background="accumulate" fill="none"/>
5675 xml:space="preserve" 982 </g>
5676 style="font-style:normal;font-weight:normal;font-size:45.31394196px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#f80000;fill-opacity:0;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 983 </g>
5677 x="3861.3669" 984 </g>
5678 y="1281.7198" 985 <g transform="matrix(1.0057 0 0 2.3995 2971.9 -201.33)" fill-rule="evenodd">
5679 id="text8200-4" 986 <path transform="translate(276 136)" d="m582.66-7.418l113.14 86.267 108.89 258.8 38.184 207.89 120.21 91.924s-12.728-287.09-19.799-313.96-149.91-393.15-149.91-393.15l-210.72 62.225z" clip-path="url(#fp)" enable-background="accumulate" filter="url(#fo)" opacity=".75"/>
5680 sodipodi:linespacing="125%" 987 <path d="m964.14 239.6s8.677 10.897 24.107 11.964c15.43 1.068 49.722-39.953 70.179-52.143 20.479-12.204 47.046-26.602 63.929-20.357 16.882 6.245 22.158 26.436 27.857 48.036 5.7 21.6 6.719 61.814-2.679 92.857-9.397 31.043-50.502 73.104-65.356 103.39s-11.607 39.821-11.607 39.821" enable-background="accumulate" fill="url(#el)"/>
5681 transform="scale(0.96105877,1.0405191)"><tspan 988 <path d="m1124.5 207.63c-15.893-0.893-49.719 12.106-66.071 24.286-16.439 12.244-29.221 24.114-29.286 52.143-0.065 28.206 13.119 39.076 29.107 46.964s33.686 7.12 51.964-11.786c18.278-18.905 14.286-111.61 14.286-111.61z" enable-background="new" fill="url(#ek)"/>
5682 sodipodi:role="line" 989 <ellipse transform="matrix(.94347 -.12399 .14401 1.0958 451.95 134.6)" cx="385" cy="237.01" rx="86.429" ry="73.929" clip-path="url(#fn)" enable-background="accumulate" fill="url(#ef)" filter="url(#fm)" opacity=".75"/>
5683 id="tspan8202-5" 990 <path transform="translate(450.03 73.844)" d="m527.61 407.45s-122.04 38.403-187.51 9.632c-65.473-28.772-74.377-124.72-74.377-124.72s73.382-80.504 129.92-83.615c55.827-3.072 90.574 20.143 114.87 65.852 24.352 45.813 17.101 132.85 17.101 132.85z" enable-background="accumulate" fill="url(#fl)" mask="url(#fk)"/>
5684 x="3861.3669" 991 <path d="m772.17 393.35s36.218-27.382 51.607-35.893c15.177-8.393 25.714-11.607 35.893-11.607l-15.536 66.964" enable-background="accumulate" fill="url(#ee)"/>
5685 y="1281.7198" 992 <circle transform="translate(449.5 74.915)" cx="409.29" cy="306.65" r="36.25" enable-background="accumulate" fill="url(#ed)"/>
5686 style="font-size:56.64243317px;fill:#f80000;fill-opacity:0">COMPOSE_PADDED</tspan></text> 993 <path transform="translate(276 136)" d="m311.83 415.43l9.9 121.62-60.105 136.47 15.556 174.66c15.613 61.879 32.185 98.669 74.376 117.05 4.32-36.24 8.682-72.368-31.243-223.12l17.678-69.296 72.125-138.59-42.426-158.39-55.86 39.598z" clip-path="url(#y)" enable-background="accumulate" fill="#fff" filter="url(#fj)" opacity=".3"/>
5687 <text 994 <path d="m635.21 581.13c-14.142 12.728 39.233 34.58 76.368 24.042s104.64-35.564 103.24-79.196c-1.407-43.632-76.368-128.69-76.368-128.69l-103.24 183.85z" enable-background="accumulate" filter="url(#fi)" opacity=".5"/>
5688 xml:space="preserve" 995 <circle transform="translate(449.67 74.915)" cx="410" cy="306.65" r="23.214" enable-background="accumulate" fill="url(#ec)"/>
5689 style="font-style:normal;font-weight:normal;font-size:45.31394196px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#f8d615;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 996 <circle transform="translate(452 73.487)" cx="414.29" cy="303.08" r="7.5" enable-background="accumulate" fill="#fff" filter="url(#fh)" stroke="#000" stroke-linejoin="bevel"/>
5690 x="3615.1545" 997 <path d="m789.32 478.35s7.023 19.569-1.071 35-42.323 38.988-67.5 50c-25.31 11.07-85.473 32.964-101.79 41.964-16.461 9.082-18.214 12.679-18.214 12.679s-7.147-19.064 28.75-51.786c36.172-32.972 142.03-48.05 159.82-87.857z" enable-background="accumulate" fill="url(#eb)"/>
5691 y="49.156631" 998 </g>
5692 id="text8200-4-9" 999 <g enable-background="new">
5693 sodipodi:linespacing="125%" 1000 <g transform="matrix(1.0057 0 0 2.3995 3757 -22.424)" fill-rule="evenodd">
5694 transform="scale(0.96105877,1.0405191)"><tspan 1001 <path transform="translate(-329.81)" d="M179.64 267.36c-22.41 39.703-60.616 115.78-69.286 149.64-8.647 33.775-8.772 66.417-.357 86.429 8.36 19.882 26.164 35.633 40.714 41.429-.597-14.376 14.373-43.286 72.857-72.5 58.626-29.285 78.382-27.131 103.57-47.143 25.63-20.362 8.206-79.647 3.214-93.929s-1.236-3.38-1.946-5.093c-10.689-25.816-34.214-54.43-64.483-64.55s-65.018-4.848-84.286 5.714z" clip-path="url(#x)" fill="url(#m)"/>
5695 sodipodi:role="line" 1002 <ellipse transform="rotate(28.068 -88.085 -332.1)" cx="183.57" cy="338.08" rx="64.716" ry="134.01" enable-background="accumulate" fill="url(#dz)"/>
5696 id="tspan8202-5-3" 1003 <ellipse transform="rotate(28.068 -43.578 -333.81)" cx="183.57" cy="338.08" rx="64.716" ry="134.01" enable-background="accumulate" fill="url(#fg)"/>
5697 x="3615.1545" 1004 </g>
5698 y="49.156631" 1005 <path transform="matrix(1.0057 0 0 2.3995 3425.3 -22.424)" d="M179.64 267.36c-22.41 39.703-60.616 115.78-69.286 149.64-8.647 33.775-8.772 66.417-.357 86.429 8.36 19.882 26.164 35.633 40.714 41.429-.597-14.376 14.373-43.286 72.857-72.5 58.626-29.285 78.382-27.131 103.57-47.143 25.63-20.362 8.206-79.647 3.214-93.929s-1.236-3.38-1.946-5.093c-10.689-25.816-34.214-54.43-64.483-64.55s-65.018-4.848-84.286 5.714z" clip-path="url(#x)" enable-background="new" fill="none" filter="url(#hd)" stroke="url(#l)" stroke-width="20.8"/>
5699 style="font-size:50px;fill:#f8d615;fill-opacity:1">COMPOSE_ACTIVE</tspan></text> 1006 </g>
5700 <text 1007 <g transform="matrix(1.0057 0 0 2.3995 2971.9 -201.33)" fill-rule="evenodd">
5701 xml:space="preserve" 1008 <circle transform="translate(452.56 72.581)" cx="310.71" cy="398.08" r="19.704" enable-background="accumulate" stroke="#000" stroke-linejoin="bevel"/>
5702 style="font-style:normal;font-weight:normal;font-size:45.31394196px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#f83615;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 1009 <circle transform="translate(450.56 72.581)" cx="310.71" cy="398.08" r="19.704" enable-background="accumulate" fill="url(#m)" filter="url(#hc)" stroke="url(#l)" stroke-width="20.8"/>
5703 x="2429.1526" 1010 <circle transform="translate(450.56 72.581)" cx="310.71" cy="398.08" r="19.704" enable-background="accumulate" fill="url(#dy)"/>
5704 y="-3.1657715" 1011 <ellipse transform="rotate(-4.471 1823.1 -5529.2)" cx="429.57" cy="377.43" rx="72.08" ry="44.548" enable-background="accumulate" fill="url(#dx)" filter="url(#hb)"/>
5705 id="text8200-4-5" 1012 <ellipse transform="matrix(1.4358 -.07 .07 1.4358 235.18 -63.865)" cx="437.7" cy="391.22" rx="36.612" ry="22.627" enable-background="accumulate" fill="url(#dw)" filter="url(#ha)"/>
5706 sodipodi:linespacing="125%" 1013 <g transform="translate(450.03 73.844)" enable-background="new" filter="url(#gz)">
5707 transform="scale(0.96105878,1.0405191)"><tspan 1014 <circle cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#dv)"/>
5708 sodipodi:role="line" 1015 <circle transform="translate(13.125 8.125)" cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#du)"/>
5709 id="tspan8202-5-7" 1016 <circle transform="translate(32.946 7.5)" cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#ej)"/>
5710 x="2429.1526" 1017 <circle transform="translate(24.911 -10.268)" cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#ei)"/>
5711 y="-3.1657715" 1018 <circle transform="translate(47.589 -.625)" cx="413.66" cy="401.83" r="3.214" enable-background="accumulate" stroke="url(#eh)"/>
5712 style="font-size:49.99999958px;fill:#f83615;fill-opacity:1">COMPOSE_DEFAULT</tspan></text> 1019 </g>
5713 <text 1020 </g>
5714 xml:space="preserve" 1021 <g fill="none" stroke="#000">
5715 style="font-style:normal;font-weight:normal;font-size:45.31394196px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#f815bb;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 1022 <path transform="matrix(1.0057 0 0 2.3995 2971.9 -201.33)" d="M896.2 482.93c.985 4.35 4.537 6.18 7.387 7.892 4.46 2.513 6.52 1.522 9.154-.758 1.602-1.921 10.683-4.698 15.594-7.07 4.33-1.46 8.904-5.36 13.385-8.335 3.395-1.627 5.347.355 7.829 1.01 2.944.717 4.411 2.172 6.06 3.536 2.397 1.175-.927 3.143 3.284 4.293 1.19.218 2.417.577 3.283-.505" enable-background="new"/>
5716 x="3681.5449" 1023 <path transform="matrix(1.0057 0 0 2.3995 2971.9 -201.33)" d="M910.85 475.35c2.315-.032 3.178.643 5.493-.82 3.455-3.082 5.402-3.146 7.955-4.42 3.026-1.315 6.535 8.152 10.102 9.849 2.395-.822 1.289 1.794 1.452 2.651.057 2.647 2.807 3.679 4.356 5.43 3.316 2.256 7.375 6.296 11.112 5.303 6.445-2.93 10.28-1.281 16.29-7.386.703-1.182-.585-6.895 3.093-7.198 2.524.254 4.166.05 6.06.569 5.442 2.117 7.738 6.45 14.71 7.955 6.184.966 7.613 3.794 13.89 5.05M876.98 483.52c2.399-.794 6.106 4.192 8.173 7.046.593 2.68 1.154 5.486.758 12.122.785 2.417 2.68 3.03 4.798 3.283 3.117-.537 5.877-1.325 7.324-3.03 1.871-1.942 5.312 2.393 8.08 4.04 3.61 1.912 7.775 1.979 11.87 2.273 1.703-.231 2.37 4.515 3.283 8.08.384 4.379-.886 6.897-1.768 9.85-.294 2.496 2.988 3.53 6.313 4.546 3.183.74 6.545 1.661 9.092 1.767 5.142.875 8.088 2.69 12.122 4.04 2.239.817 3.26 2.243 4.545 3.536" enable-background="new"/>
5717 y="1289.9539" 1024 </g>
5718 id="text8200-4-9-3" 1025 <g transform="matrix(.9991 .27421 -.11493 2.3838 2962.6 1209.8)" enable-background="new" fill-rule="evenodd" mask="url(#gy)">
5719 sodipodi:linespacing="125%" 1026 <path d="M1111.48-285.971l-3.937 1.875c-.041.01-.1.02-.125.031-.42.213-.165.1-.657.312-.486.21-1.737.585-4.093 1.47-3.332 1.25-5.805 2.15-7 3.062-1.537.021-3.72.233-5.657.719a227.677 227.677 0 0 1-6.75 1.593c-1.894.42-1.675.642-2.875.875-1.296.252-1.721-.009-5.437.782-3.49.742-8.895 1.93-10.156 2.687-1.584-.18-3.868-.322-5.844-.031-3.04.447-4.916.673-6.844.906-.655.08-1.04.2-1.343.281-.427.132-.686.26-1.375.344-1.312.16-1.763-.157-5.532.281-3.554.413-9.005 1.273-10.25 1.938-1.599-.297-3.857-.534-5.843-.344-3.06.293-4.972.484-6.907.656-1.934.173-1.688.423-2.906.532-1.316.117-1.76-.164-5.531.25-3.542.388-9.008 1.209-10.281 1.875-1.6-.295-3.887-.507-5.875-.313-3.058.3-4.941.48-6.875.656-.658.06-1.04.179-1.344.25-.428.12-.683.218-1.375.282-1.316.12-1.76-.195-5.531.218-3.556.39-9.006 1.24-10.25
5720 transform="scale(0.96105877,1.0405191)"><tspan 10271.907-1.599-.295-3.86-.524-5.844-.313-3.056.325-4.974.526-6.906.719s-1.69.44-2.906.562c-1.315.132-1.763-.164-5.532.282-3.538.418-8.977 1.292-10.25 1.968-1.597-.28-3.86-.42-5.843-.187-3.052.358-4.945.568-6.875.781-.657.073-1.041.173-1.344.25-.427.127-.685.267-1.375.344-1.314.146-1.768-.174-5.531.312-3.55.46-8.979 1.42-10.22 2.125-1.592-.244-3.833-.381-5.812-.125-3.047.395-4.95.649-6.875.907-1.924.257-1.726.493-2.937.656-1.31.176-1.748-.105-5.5.469-3.525.538-8.924 1.699-10.188 2.437-1.588-.203-3.846-.255-5.813.094-3.026.536-4.899.861-6.812 1.187-.65.111-1.014.271-1.313.375-.42.165-.663.332-1.344.469-1.294.262-1.727-.006-5.437.813-3.499.771-8.846 2.382-10.062 3.218-1.563-.077-3.758.086-5.688.594-2.972.783-4.817 1.232-6.687 1.75s-1.667.767-2.844 1.094c-1.272.353-1.697.107-5.344 1.187-3.424 1.015-8.65 2.934-9.875 3.844-1.539.013-3.72.272-5.625.875-2.93.928-4.75 1.459-6.594
5721 sodipodi:role="line" 10282.063-.626.205-.991.392-1.28.53-.408.215-.654.41-1.313.626-1.255.411-1.686.189-5.281 1.437-3.39 1.178-8.595 3.214-9.782 4.157-1.524.06-3.65.395-5.53 1.062-2.898 1.028-4.7 1.676-6.532 2.313-1.832.637-1.628.848-2.781 1.25-1.247.434-1.664.2-5.22 1.562-3.338 1.28-8.486 3.483-9.687 4.469-1.507.108-3.635.499-5.5 1.219a1047.26 1047.26 0 0 1-6.437 2.469c-.617.233-.997.442-1.281.593v.031l-8 3.188-12.476 3.492 7.93 19.278c-.592 1.973 12.545-4.739 12.545-4.739.227-.144.45-.272.72-.375 1.08-.41 2.17-.215 6-1.687 3.828-1.472 5.223-2.005 5.905-2.406.68-.4 1.612-.88 2.22-1.531 1.826-.138 3.57-.494 4.937-1 2.968-1.1 4.875-1.807 6.78-2.47 1.907-.662 2.355-1.414 3.407-1.78 1.092-.38 2.195-.166 6.063-1.532 3.867-1.366 5.283-1.827 5.968-2.218.702-.4 1.701-.933 2.313-1.594 1.97-.055 3.817-.385 5.281-.875 3.002-1.005 4.926-1.622 6.844-2.25 1.538-.504 2.174-1.047 2.906-1.438.23-.134.476-.253.75-.343 1.098-.36
5722 id="tspan8202-5-3-6" 10292.181-.082 6.094-1.313 3.912-1.231 5.366-1.673 6.062-2.031.694-.357 1.63-.793 2.25-1.406 1.866-.023 3.636-.267 5.032-.688 3.03-.913 4.992-1.43 6.937-1.969 1.945-.538 2.426-1.264 3.5-1.562 1.114-.31 2.22.007 6.188-1.031 3.967-1.039 5.417-1.433 6.125-1.75.734-.33 1.813-.754 2.437-1.375 1.998.116 3.857-.02 5.344-.375 3.078-.735 5.083-1.101 7.062-1.5 1.588-.32 2.245-.79 3-1.094a3.4 3.4 0 0 1 .75-.25c1.134-.23 2.305.209 6.344-.5 4.04-.71 5.5-.927 6.219-1.188.716-.26 1.704-.567 2.344-1.093 1.924.239 3.748.224 5.187 0 3.127-.488 5.155-.701 7.156-.97 2.002-.267 2.49-.944 3.594-1.093 1.147-.154 2.276.302 6.344-.219 4.068-.52 5.56-.695 6.281-.937.737-.247 1.798-.586 2.438-1.125 2.05.335 3.973.398 5.5.218 3.142-.368 5.18-.559 7.187-.78 1.611-.179 2.265-.609 3.031-.845.241-.085.495-.155.782-.187 1.15-.128 2.301.347 6.375-.125s5.559-.61 6.28-.844c.72-.232 1.701-.473 2.345-.969 1.936.334 3.77.405
5723 x="3681.5449" 10305.219.25 3.146-.334 5.177-.518 7.187-.718 2.01-.2 2.484-.827 3.594-.938 1.15-.115 2.296.365 6.375-.062s5.589-.562 6.312-.782c.74-.223 1.796-.513 2.438-1.03 2.057.398 4.002.493 5.531.343 3.149-.308 5.176-.473 7.188-.656 1.614-.147 2.263-.56 3.03-.781.242-.081.494-.13.782-.157 1.152-.105 2.293.393 6.375 0s5.589-.53 6.312-.75c.721-.218 1.7-.447 2.344-.937 1.938.35 3.769.454 5.219.312 3.149-.308 5.176-.473 7.187-.656 2.012-.183 2.515-.838 3.625-.937 1.153-.104 2.293.384 6.375 0 4.083-.385 5.59-.501 6.313-.72.74-.222 1.796-.514 2.437-1.03 2.058.401 4.003.503 5.532.343 3.146-.328 5.177-.522 7.187-.718 1.613-.158 2.266-.632 3.031-.875.241-.088.464-.122.75-.157 1.149-.14 2.317.34 6.375-.25 4.059-.59 5.562-.777 6.282-1.03.716-.254 1.674-.559 2.312-1.095 1.92.212 3.72.152 5.156-.093 3.12-.533 5.112-.929 7.094-1.313 1.982-.384 2.474-1.04 3.563-1.281 1.128-.25 2.27.116 6.25-.875s5.43-1.42
5724 y="1289.9539" 10316.125-1.781c.722-.376 1.761-.87 2.375-1.531 1.963-.012 3.793-.292 5.218-.844 2.952-1.145 4.874-1.87 6.688-2.75 1.456-.707 2.32-1.702 2.531-2 .212-.298.1-.729.125-.75.043-.035.34-.094.5-.438.86-1.847 2.323-5.627 2.438-6.312.113-.682.168-1.353.218-1.75.03-.23-.147-.88-.125-.938.031-.082.289-.25.344-.5.266-1.198.09-2.207-.125-3.625-.214-1.417-.972-4.614-1.625-5.469-.659-.861-1.225-1.01-1.75-1z" enable-background="new" fill="#bcb786"/>
5725 style="font-size:50px;fill:#f815bb;fill-opacity:1">COMPOSE_PADDED</tspan></text> 1032 <g clip-path="url(#gx)">
5726 <text 1033 <path d="M1107.4-284.05c-.419.213-.156.094-.647.306-.486.21-1.724.574-4.08 1.459-3.33 1.25-5.83 2.153-7.026 3.066-1.536.021-3.72.233-5.656.719a227.709 227.709 0 0 1-6.75 1.593c-1.895.42-1.676.643-2.875.875-1.297.252-1.721-.009-5.438.782-3.49.742-8.894 1.93-10.156 2.687-1.583-.18-3.867-.322-5.843-.031-3.04.447-4.917.673-6.844.906-.655.08-1.041.201-1.344.282-.426.131-.686.26-1.375.343-1.311.16-1.762-.157-5.531.282-3.554.413-9.005 1.272-10.25 1.937-1.599-.297-3.858-.534-5.844-.344-3.059.294-4.972.484-6.906.657-1.934.172-1.689.422-2.906.53-1.317.118-1.76-.163-5.532.25-3.541.39-9.007 1.21-10.28 1.876-1.6-.295-3.888-.507-5.876-.313-3.058.3-4.94.48-6.875.657-.657.06-1.04.178-1.343.25-.428.118-.684.218-1.375.28-1.316.121-1.76-.194-5.532.22-3.556.39-9.005 1.239-10.25
5727 xml:space="preserve" 10341.906-1.598-.294-3.86-.524-5.843-.313-3.056.326-4.974.526-6.907.719-1.932.192-1.69.44-2.906.562-1.315.132-1.763-.164-5.53.282-3.54.418-8.979 1.292-10.25 1.969-1.599-.282-3.86-.42-5.845-.188-3.052.358-4.945.568-6.875.781-.656.073-1.04.173-1.344.25-.426.127-.684.267-1.375.344-1.313.146-1.767-.174-5.53.313-3.55.458-8.98 1.419-10.22 2.125-1.593-.245-3.834-.382-5.812-.125-3.048.394-4.95.648-6.875.906-1.925.258-1.726.493-2.938.656-1.31.176-1.747-.104-5.5.469-3.524.538-8.923 1.699-10.188 2.437-1.587-.203-3.845-.254-5.812.094-3.026.536-4.9.862-6.813 1.187-.65.111-1.013.271-1.312.375-.42.165-.664.332-1.344.47-1.295.26-1.727-.007-5.438.812-3.498.772-8.846 2.383-10.062 3.219-1.562-.078-3.757.085-5.687.593-2.972.783-4.818 1.232-6.688 1.75s-1.666.768-2.843 1.094c-1.273.353-1.697.107-5.344 1.188-3.425 1.014-8.65 2.933-9.875 3.843-1.539.013-3.72.273-5.625.875-2.931.928-4.75 1.459-6.594
5728 style="font-style:normal;font-weight:normal;font-size:50px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new;" 10352.063-.627.205-.992.392-1.281.531-.408.214-.653.409-1.313.625-1.254.412-1.686.19-5.28 1.438-3.39 1.177-8.596 3.213-9.782 4.156-1.524.06-3.65.395-5.531 1.062-2.898 1.029-4.7 1.676-6.531 2.313-1.833.637-1.628.848-2.782 1.25-1.246.434-1.663.2-5.218 1.562-3.34 1.28-8.488 3.483-9.688 4.47-1.507.107-3.636.498-5.5 1.218a1044.752 1044.752 0 0 1-6.437 2.469c-.617.233-.997.442-1.282.593v1.094c.112-.222.386-.817.907-1.094.698-.37 4.813-1.993 6.812-2.718 1.657-.602 4.154-1.329 5.969-1.313.302.003.588.051.844.094 1.842.308 7.468 1.562 7.468 1.562s-6.233-1.646-7.03-1.843c-.191-.048-.536-.07-.97-.063 1.146-.87 4.762-2.393 7.344-3.437 2.839-1.148 3.117-1.252 5.063-1.657 2.008-.417 3.156-.5 3.156-.5s-.082-.6.969-1.125c.705-.351 4.887-1.892 6.906-2.562 1.952-.648 5.057-1.359 6.875-1 1.863.367 7.531 1.812 7.531 1.812s-6.287-1.87-7.094-2.093c-.193-.054-.53-.086-.968-.094 1.158-.833 4.794-2.195 7.406-3.156
5729 x="2438.0618" 10362.87-1.056 3.167-1.162 5.125-1.532 1.853-.35 2.859-.425 3.031-.437.114-.217.377-.81.906-1.063.71-.338 4.926-1.712 6.97-2.312 1.692-.497 4.24-1.037 6.093-.906.308.021.613.097.875.156 1.881.424 7.594 2.031 7.594 2.031s-6.342-2.065-7.157-2.312c-.194-.06-.557-.104-1-.125 1.17-.798 4.863-2.057 7.5-2.938 2.898-.968 3.233-1.003 5.22-1.281 2.049-.287 3.187-.313 3.187-.313s-.073-.607 1-1.062c.72-.306 4.99-1.5 7.062-2 2.003-.483 5.199-.928 7.063-.406 1.91.535 7.719 2.5 7.719 2.5s-6.423-2.424-7.25-2.72c-.198-.07-.583-.14-1.032-.187 1.188-.728 4.916-1.774 7.594-2.5 2.944-.797 3.292-.77 5.313-.906 1.913-.128 2.947-.07 3.125-.062.117-.204.391-.78.937-.97.732-.253 5.079-1.047 7.188-1.374 1.748-.271 4.4-.485 6.312-.094.318.065.605.186.875.281 1.94.69 7.844 3.094 7.844 3.094s-6.535-2.95-7.375-3.312c-.201-.087-.575-.167-1.031-.25 1.206-.633 5.03-1.396 7.75-1.906 2.99-.562 3.3-.53 5.344-.532 2.109-.002
5730 y="1368.4291" 10373.312.125 3.312.125s-.073-.63 1.031-.937c.74-.206 5.126-.834 7.25-1.063 2.053-.22 5.319-.252 7.22.47 1.947.738 7.843 3.374 7.843 3.374s-6.563-3.179-7.406-3.562c-.202-.092-.543-.187-1-.282 1.21-.602 4.984-1.248 7.718-1.656 3.005-.448 3.326-.452 5.375-.406 1.94.043 3.007.194 3.188.219.119-.194.384-.766.937-.907.743-.188 5.155-.734 7.282-.937 1.763-.169 4.42-.234 6.343.25.32.08.604.203.875.312 1.953.784 7.907 3.47 7.907 3.47s-6.592-3.254-7.438-3.657c-.202-.096-.572-.207-1.031-.313 1.214-.574 5.044-1.122 7.781-1.5 3.009-.415 3.323-.442 5.375-.375 2.118.07 3.313.25 3.313.25s-.078-.637 1.03-.906c.745-.18 5.153-.663 7.282-.844 2.059-.174 5.343-.124 7.25.657 1.955.8 7.875 3.53 7.875 3.53s-6.56-3.308-7.406-3.718c-.202-.098-.572-.203-1.031-.312 1.215-.564 5.01-1.115 7.75-1.47 3.01-.389 3.321-.397 5.375-.312 1.944.08 3.006.254 3.187.282.12-.191.383-.746.938-.875.744-.174 5.15-.65 7.28-.813
5731 id="text8200-4-9-3-5" 10381.767-.134 4.45-.126 6.376.375.32.083.603.201.875.313 1.954.8 7.906 3.562 7.906 3.562s-6.591-3.34-7.437-3.75c-.203-.098-.572-.203-1.032-.312 1.215-.564 5.042-1.084 7.782-1.438 3.01-.39 3.352-.429 5.406-.344 2.12.088 3.312.313 3.312.313s-.078-.65 1.032-.906c.744-.173 5.15-.624 7.28-.782 2.061-.152 5.344-.096 7.25.688 1.956.804 7.876 3.5 7.876 3.5s-6.56-3.276-7.406-3.688c-.203-.098-.572-.202-1.032-.312 1.216-.562 5.012-1.128 7.75-1.5 3.01-.41 3.323-.416 5.375-.344 1.943.068 3.008.165 3.188.188.119-.195.384-.73.937-.875.742-.197 5.131-.83 7.25-1.094 1.757-.22 4.406-.333 6.313.031.317.06.606.19.875.281 1.936.661 7.844 2.938 7.844 2.938s-6.537-2.807-7.375-3.156c-.2-.084-.577-.174-1.032-.25 1.204-.651 5.02-1.372 7.72-2 2.966-.69 3.288-.756 5.312-.875 2.088-.124 3.28-.032 3.28-.032s-.086-.632 1-1.03c.73-.269 5.048-1.339 7.126-1.813 2.008-.46 5.168-1.03 7-.625 1.878.414 13.578 3.015 13.578
5732 sodipodi:linespacing="125%" 10393.015s-12.328-3.022-13.141-3.265c-.195-.058-.559-.107-1-.125 1.167-.804 3.514-1.688 6.11-2.703 1.68-.659.923-.377 2.775-1.004 1.754-.594 2.486-1.01 2.63-1.113.347-.207-.355-.122-.544-.042z" enable-background="new" filter="url(#gw)"/>
5733 transform="scale(0.96105877,1.0405191)"><tspan 1040 <path d="m1082.6-275.12c1.873 0.393 4.496 1.146 6.031 1.969s2.822 1.056 5.375 2.5c2.527 1.43 4.796 2.007 6.969 2.531 2.348 0.566 5.435 0.715 8.844 1.188-1.09-0.84-6.608-1.173-8.406-1.563-1.8-0.39-3.895-1.016-6.594-2.313-2.7-1.296-3.495-1.799-5.813-2.687-2.318-0.889-4.004-1.383-6.406-1.625z" enable-background="new" filter="url(#gv)"/>
5734 sodipodi:role="line" 1041 <path d="M1051.5-270c1.905.578 4.528 1.616 6.094 2.594 1.565.978 2.88 1.36 5.5 3.125 2.593 1.747 4.986 2.71 7.25 3.594 2.446.955 5.682 1.657 9.406 3.062-1.19-1.138-7.063-2.687-8.938-3.375-1.874-.688-4.081-1.566-6.874-3.281-2.794-1.715-3.574-2.284-5.938-3.406-2.364-1.123-4.057-1.835-6.5-2.313z" enable-background="new" filter="url(#gu)"/>
5735 id="tspan8202-5-3-6-3" 1042 <path d="m1020.2-266.84c1.912 0.638 4.581 1.755 6.156 2.813 1.575 1.057 2.896 1.508 5.531 3.406 2.61 1.878 5.029 3.03 7.313 4.062 2.468 1.116 5.764 2.174 9.531 3.844-1.203-1.222-7.203-3.314-9.094-4.125-1.89-0.81-4.064-1.894-6.874-3.75s-3.622-2.477-6-3.719c-2.379-1.242-4.111-1.975-6.563-2.531z" enable-background="new" filter="url(#gt)"/>
5736 x="2438.0618" 1043 <path d="M1110.2-266.89c.15.049.688.631.11 1.484-.81 1.195-5.705 3.325-8.563 4.125-2.845.798-6.29.978-10.562-.375-4.302-1.362-5.47-2.468-10.656-4.312 4.664 2.115 6.195 3.952 10.125 5.344 1.62.574 3.367.94 5.062 1.03-.445.327-1.53.984-3.562 1.595-2.796.84-6.65 1.534-8.25 1.625-1.515.086-3.142-.513-3.438-.625.167.103.374.377-.25 1.03-.899.945-6.147 1.924-9.125 2.25-2.964.326-6.521-.015-10.906-1.905-3.978-1.715-5.339-2.916-9.406-4.75v.156c3.643 2.095 5.284 3.883 8.875 5.562 1.73.81 3.592 1.41 5.406 1.72-.534.286-1.557.71-3.437 1.03-2.87.488-6.81.817-8.438.75-.85-.034-1.728-.184-2.406-.406-.685-.215-1.19-.444-1.312-.5.169.107.43.403-.22 1.031-.909.88-6.245 1.337-9.25 1.47-2.99.131-6.588-.451-11-2.563-4.44-2.127-5.64-3.402-10.905-5.782 4.734 2.597 6.286 4.63 10.344 6.72 1.673.861 3.485 1.493 5.25
5737 y="1368.4291" 10441.937-.463.233-1.59.688-3.688.937-2.886.343-6.834.493-8.468.375-1.547-.111-3.232-.857-3.532-1 .17.12.414.41-.218 1-.913.851-6.244 1.262-9.25 1.375-2.993.113-6.59-.49-11-2.594-4.002-1.908-5.388-3.137-9.47-5.093v.156c3.656 2.204 5.295 4.053 8.907 5.906 1.74.893 3.637 1.528 5.469 1.969-.54.248-1.578.615-3.469.844-2.886.348-6.866.52-8.5.406a9.446 9.446 0 0 1-2.406-.5 12.532 12.532 0 0 1-1.313-.531c.17.112.465.422-.187 1.03-.913.853-6.275 1.294-9.281 1.407-2.993.112-6.594-.528-11-2.594-4.437-2.08-5.647-3.331-10.906-5.656 4.729 2.548 6.29 4.578 10.344 6.625 1.671.844 3.485 1.467 5.25 1.906-.464.235-1.59.684-3.688.938-2.886.348-6.836.57-8.469.469-1.544-.096-3.2-.83-3.5-.97.17.12.382.405-.25 1-.912.861-6.246 1.331-9.25 1.47-2.99.138-6.567-.451-10.969-2.47-3.993-1.83-5.365-3.028-9.437-4.905v.156c3.647 2.133 5.27 3.935 8.875 5.719 1.737.86 3.607 1.45 5.437
5738 style="font-size:50px;fill:#000000;fill-opacity:1;">COMPOSE_BONDS</tspan></text> 10451.875-.54.253-1.55.64-3.437.906-2.88.404-6.838.646-8.469.562a9.36 9.36 0 0 1-2.406-.437 12.971 12.971 0 0 1-1.313-.5c.17.109.432.41-.218 1.031-.911.87-6.25 1.392-9.25 1.563-2.987.17-6.574-.316-10.97-2.282-4.424-1.978-5.605-3.228-10.843-5.375 4.71 2.388 6.27 4.39 10.312 6.344a23.73 23.73 0 0 0 5.218 1.781c-.461.25-1.597.713-3.687 1.032-2.876.438-6.78.733-8.406.687-1.539-.043-3.233-.745-3.532-.875.169.113.411.414-.218 1.031-.908.891-6.203 1.529-9.188 1.813-2.971.283-6.573-.176-10.938-1.938-3.96-1.598-5.329-2.795-9.344-4.312v.156c3.596 1.811 5.239 3.582 8.813 5.156 1.722.759 3.587 1.29 5.406 1.625-.536.28-1.566.688-3.437 1.063-2.856.572-6.79 1.02-8.407 1.031-.844.006-1.706-.08-2.375-.25-.676-.162-1.16-.33-1.28-.375.166.094.422.383-.22 1.062-.897.951-6.186 1.918-9.125 2.438-2.925.518-6.432.374-10.719-1.031-4.315-1.415-5.472-2.53-10.562-3.969 4.577 1.751 6.09 3.56 10.031 5 1.627.594 3.37.956
5739 <text 10465.094 1.156-.453.297-1.555.884-3.594 1.469-2.804.805-6.638 1.576-8.218 1.75-1.495.165-3.117-.317-3.407-.406.164.09.393.36-.218 1.062-.883 1.014-6.045 2.372-8.938 3.063-2.88.687-6.335.76-10.562-.438-3.835-1.086-5.172-2.072-9.062-3.125v.156c3.484 1.395 5.07 2.92 8.53 4.032 1.669.535 3.457.786 5.22.875-.52.352-1.5.914-3.313 1.53-2.765.942-6.59 1.936-8.156 2.157-.818.115-1.633.123-2.281.031-.655-.083-1.133-.218-1.25-.25.162.075.434.34-.188 1.094-.87 1.055-6.01 2.66-8.875 3.438-2.852.774-6.259.958-10.438-.094-4.206-1.06-5.356-2.042-10.344-3.156 4.485 1.46 5.97 3.135 9.813 4.25 1.585.46 3.287.638 4.969.687-.442.337-1.513 1.028-3.5 1.781-2.734 1.037-6.452 2.163-8 2.438-1.465.26-3.06-.117-3.344-.188.16.08.38.321-.219 1.063-.865 1.07-5.916 2.818-8.75 3.687-2.82.866-6.207 1.157-10.344.22-3.753-.852-5.048-1.717-8.875-2.595v.157c3.428 1.237 4.987 2.632 8.375 3.53 1.632.434 3.367.584
5740 xml:space="preserve" 10475.094.563-.51.384-1.477 1.022-3.25 1.75-2.706 1.112-6.436 2.308-7.969 2.625-.8.166-1.612.219-2.25.157v1.406c.227-.145.449-.273.719-.375 1.08-.41 2.171-.216 6-1.688 3.828-1.471 5.224-2.005 5.906-2.406.68-.4 1.612-.88 2.219-1.531 1.827-.138 3.57-.493 4.937-1 2.968-1.1 4.876-1.806 6.782-2.469 1.905-.663 2.354-1.415 3.406-1.781 1.091-.38 2.195-.166 6.062-1.531 3.868-1.366 5.283-1.827 5.969-2.22.701-.4 1.7-.932 2.313-1.593 1.97-.055 3.816-.385 5.28-.875 3.002-1.005 4.927-1.622 6.845-2.25 1.538-.504 2.174-1.047 2.906-1.437.23-.135.475-.254.75-.344 1.098-.36 2.181-.082 6.094-1.313 3.912-1.23 5.366-1.673 6.062-2.03.694-.358 1.63-.794 2.25-1.407 1.865-.023 3.636-.267 5.031-.688 3.03-.913 4.993-1.43 6.938-1.968 1.945-.54 2.426-1.265 3.5-1.563 1.114-.31 2.22.007 6.187-1.031 3.968-1.039 5.418-1.433 6.125-1.75.735-.33 1.814-.754 2.438-1.375 1.997.116 3.857-.02 5.344-.375 3.078-.735 5.083-1.101
5741 style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 10487.062-1.5 1.588-.32 2.244-.79 3-1.094.238-.107.467-.193.75-.25 1.134-.23 2.305.209 6.344-.5s5.5-.927 6.219-1.187c.715-.26 1.704-.568 2.343-1.094 1.925.24 3.748.224 5.188 0 3.126-.488 5.155-.7 7.156-.969 2.002-.268 2.489-.945 3.594-1.094 1.146-.154 2.276.302 6.344-.219 4.068-.52 5.56-.695 6.28-.937.738-.247 1.799-.586 2.438-1.125 2.05.335 3.974.398 5.5.219 3.143-.37 5.18-.56 7.188-.782 1.61-.178 2.265-.608 3.031-.843a3.43 3.43 0 0 1 .781-.188c1.15-.128 2.302.347 6.375-.125s5.56-.61 6.282-.844c.719-.232 1.7-.473 2.343-.968 1.937.333 3.77.404 5.22.25 3.145-.335 5.177-.519 7.187-.719 2.01-.2 2.484-.826 3.593-.938 1.152-.115 2.297.366 6.375-.062s5.59-.562 6.313-.781c.74-.224 1.796-.514 2.437-1.031 2.058.398 4.002.493 5.532.343 3.148-.308 5.175-.473 7.187-.656 1.614-.147 2.263-.56 3.031-.781.242-.081.494-.13.782-.156 1.152-.106 2.293.392 6.375 0 4.082-.393 5.589-.531 6.312-.75.721-.219
5742 x="8.0815096" 10491.7-.448 2.344-.938 1.938.35 3.769.454 5.219.313 3.148-.309 5.175-.474 7.187-.657 2.012-.183 2.514-.838 3.625-.937 1.152-.103 2.292.385 6.375 0s5.589-.501 6.313-.719c.739-.222 1.795-.514 2.437-1.031 2.057.402 4.003.503 5.531.344 3.147-.329 5.178-.523 7.188-.72 1.613-.156 2.266-.63 3.031-.874.24-.088.463-.122.75-.156 1.148-.14 2.317.34 6.375-.25 4.058-.59 5.562-.778 6.281-1.032.717-.253 1.675-.558 2.313-1.093 1.92.211 3.72.151 5.156-.094 3.12-.533 5.112-.929 7.094-1.313 1.982-.384 2.474-1.04 3.562-1.28 1.13-.252 2.27.115 6.25-.876s5.43-1.42 6.125-1.781c.723-.376 1.762-.87 2.375-1.531 1.963-.012 3.794-.291 5.22-.844 2.95-1.145 4.872-1.87 6.687-2.75 1.455-.707 2.334-1.686 2.547-1.984.212-.298.111-.746.137-.767.043-.035.32-.085.48-.429.858-1.847 2.32-5.644
5743 y="1438.8961" 10502.435-6.329.113-.682.163-1.348.214-1.745.03-.23-.147-.865-.125-.924.031-.082.305-.265.36-.515.267-1.198.09-2.191-.125-3.609-.214-1.417-.983-4.622-1.637-5.476-.659-.862-1.223-1.011-1.748-1-.208.27.137.262.163.312.68.05.934.369 1.42.897s1.442 3.94 1.579 5.39.19 2.86-.088 3.468c-.278.609-.944.429-1.237.495.531.186.89.213.953 1.057.058.814-.134 1.64-.52 2.806-.391 1.18-1.845 4.35-2.286 4.599-.452.255-.952.182-1.288.05z" enable-background="new" filter="url(#gs)"/>
5744 id="text8200-4-9-3-5-6" 1051 <path d="m988.75-263.84c1.912 0.634 4.55 1.758 6.125 2.813 1.575 1.054 2.896 1.482 5.531 3.375 2.609 1.873 5.027 3.015 7.313 4.062 2.47 1.132 5.752 2.155 9.531 3.938-1.207-1.259-7.139-3.365-9.031-4.188s-4.128-1.93-6.938-3.781-3.622-2.482-6-3.719c-2.377-1.237-4.08-1.95-6.53-2.5z" enable-background="new" filter="url(#gr)"/>
5745 sodipodi:linespacing="125%"><tspan 1052 <path d="M957.5-260.78c1.91.618 4.583 1.71 6.156 2.75 1.574 1.04 2.896 1.482 5.531 3.375 2.609 1.873 5.027 3.015 7.313 4.063 2.47 1.131 5.752 2.154 9.531 3.937-1.207-1.258-7.201-3.396-9.094-4.219-1.892-.823-4.096-1.93-6.906-3.781-2.81-1.85-3.593-2.44-5.969-3.656s-4.113-1.939-6.562-2.469z" enable-background="new" filter="url(#gq)"/>
5746 sodipodi:role="line" 1053 <path d="M926.09-257.38c1.908.597 4.553 1.664 6.125 2.688 1.571 1.023 2.87 1.44 5.5 3.28 2.603 1.823 5.029 2.973 7.313 4 2.467 1.111 5.755 2.094 9.53 3.845-1.205-1.249-7.171-3.319-9.062-4.125s-4.102-1.891-6.906-3.688c-2.804-1.796-3.627-2.402-6-3.594-2.373-1.191-4.054-1.903-6.5-2.406z" enable-background="new" filter="url(#gp)"/>
5747 id="tspan8202-5-3-6-3-2" 1054 <path d="M894.91-253.56c1.902.554 4.587 1.589 6.156 2.594s2.874 1.408 5.5 3.219c2.6 1.791 5 2.871 7.281 3.875 2.465 1.083 5.76 2.04 9.532 3.75-1.205-1.236-7.175-3.245-9.063-4.032-1.888-.786-4.075-1.83-6.875-3.593s-3.6-2.369-5.969-3.532c-2.37-1.163-4.123-1.834-6.562-2.28z" enable-background="new" filter="url(#go)"/>
5748 x="8.0815096" 1055 <path d="M863.72-248.66c1.88.43 4.504 1.38 6.063 2.313 1.558.932 2.852 1.257 5.468 3 2.59 1.724 4.981 2.708 7.25 3.625 2.452.99 5.74 1.877 9.5 3.5-1.201-1.208-7.152-3.067-9.03-3.782-1.88-.715-4.086-1.684-6.876-3.375s-3.585-2.228-5.937-3.28-4.026-1.713-6.438-2z" enable-background="new" filter="url(#gn)"/>
5749 y="1438.8961" 1056 <path d="m833.16-241.38c1.848 0.296 4.47 0.976 6 1.781s2.814 1.056 5.375 2.531c2.535 1.46 4.89 2.326 7.125 3.063 2.414 0.797 5.657 1.467 9.375 2.844-1.188-1.129-7.088-2.59-8.938-3.156-1.85-0.567-4.003-1.374-6.75-2.844-2.746-1.47-3.5-1.92-5.812-2.781-2.311-0.861-4.005-1.32-6.375-1.438z" enable-background="new" filter="url(#gm)"/>
5750 style="font-size:50px;fill:#000000;fill-opacity:1">CROP_BONDS</tspan></text> 1057 <path d="m802.91-232.31c1.822 0.211 4.366 0.8 5.875 1.531 1.51 0.73 2.756 0.93 5.281 2.281 2.5 1.338 4.832 2.049 7.031 2.657 2.377 0.656 5.565 1.073 9.22 2.187-1.168-1.045-6.93-2.103-8.75-2.562-1.822-0.46-3.953-1.127-6.657-2.438s-3.471-1.72-5.75-2.469-3.913-1.179-6.25-1.187z" enable-background="new" filter="url(#gl)"/>
5751 <text 1058 <path d="M773.19-222.19c1.811.179 4.32.665 5.813 1.344 1.491.678 2.753.798 5.25 2.062 2.47 1.252 4.79 1.896 6.968 2.438 2.354.585 5.492.897 9.094 1.844-1.15-.992-6.852-1.784-8.656-2.188s-3.916-1.021-6.594-2.25c-2.678-1.229-3.403-1.61-5.656-2.281-2.253-.67-3.896-1.002-6.219-.969z" enable-background="new" filter="url(#gk)"/>
5752 xml:space="preserve" 1059 <path d="M743.56-211.19c1.793.13 4.273.55 5.75 1.188s2.716.741 5.188 1.937c2.446 1.184 4.72 1.747 6.874 2.219 2.328.51 5.42.68 9 1.562-1.143-.97-6.747-1.59-8.53-1.937-1.784-.347-3.884-.888-6.532-2.031-2.648-1.144-3.395-1.517-5.625-2.125-2.23-.61-3.826-.91-6.125-.813z" enable-background="new" filter="url(#gj)"/>
5753 style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 1060 <g fill="#fff" filter="url(#gi)">
5754 x="1455.4426" 1061 <path d="M744.94-212.12s7.222-3.223 9.063-3.5 3.352-.003 6 .563c2.647.565 8.735 2.215 11.188 3.374s5.312 3.563 5.312 3.563-7.146-2.78-10.188-3.563-7.645-2.083-10.375-2.312-11 1.875-11 1.875z"/>
5755 y="-26.808125" 1062 <path d="m735.47-206.95s3.66-2.223 5.5-2.5 3.665 0.247 6.313 0.813 8.735 2.215 11.188 3.375 6.562 2.125 6.562 2.125-8.396-1.343-11.438-2.125-7.957-2.334-10.688-2.563-7.438 0.875-7.438 0.875zm24.38-10.66s8.544-3.299 10.398-3.458c1.854-0.16 3.642 0.48 6.248 1.212s8.577 2.766 10.95 4.08 6.414 2.537 6.414 2.537-8.294-1.873-11.279-2.848c-2.985-0.974-7.792-2.834-10.503-3.236s-12.228 1.713-12.228 1.713zm15.35-5.62s7.771-2.782 9.628-2.904c1.857-0.12 3.631 0.555 6.222 1.341 2.59 0.787 8.519 2.942 10.864 4.304 2.346 1.362 6.36 2.67 6.36 2.67s-8.253-2.045-11.217-3.08c-2.965-1.035-7.733-2.995-10.434-3.452-2.702-0.458-11.422 1.121-11.422 1.121zm14.44-4.72s8.683-3.52 10.542-3.605 3.62 0.624 6.195 1.46c2.575 0.837 8.46 3.107 10.779 4.514 2.318 1.408 6.307 2.793 6.307 2.793s-8.212-2.204-11.156-3.297-7.673-3.144-10.365-3.654-12.3 1.789-12.3 1.789zm14.86-5.38s7.808-2.583 9.666-2.668c1.86-0.085 3.62
5756 id="text8200-4-9-3-5-6-9" 10630.625 6.195 1.461 2.575 0.837 8.46 3.107 10.78 4.514 2.318 1.407 6.307 2.792 6.307 2.792s-8.213-2.204-11.156-3.296-7.673-3.144-10.365-3.654-11.426 0.85-11.426 0.85zm15.06-4.25s8.558-2.583 10.417-2.668 3.62 0.625 6.195 1.461c2.575 0.837 8.46 3.107 10.779 4.514 2.318 1.407 6.307 2.792 6.307 2.792s-8.212-2.204-11.156-3.296-7.673-3.144-10.365-3.654-12.176 0.85-12.176 0.85zm16.67-5.02s6.967-1.987 8.828-1.968c1.86 0.02 3.579 0.827 6.102 1.807 2.524 0.98 8.272 3.578 10.508 5.113 2.236 1.536 6.14 3.143 6.14 3.143s-8.075-2.662-10.952-3.919c-2.878-1.256-7.484-3.57-10.143-4.231-2.66-0.66-10.482 0.055-10.482 0.055zm14.5-3.4s7.688-2.028 9.548-1.968 3.56 0.902 6.063 1.936c2.502 1.033 8.194 3.752 10.397 5.335 2.203 1.582 6.072 3.272 6.072 3.272s-8.017-2.833-10.868-4.15c-2.85-1.318-7.407-3.73-10.05-4.446s-11.162 0.021-11.162 0.021zm14.09-3.21s8.17-1.97 10.027-1.854c1.857 0.115 3.532 1.01 6.002
5757 sodipodi:linespacing="125%"><tspan 10642.118s8.077 3.997 10.23 5.645 5.972 3.454 5.972 3.454-7.928-3.074-10.738-4.476-7.291-3.95-9.913-4.746c-2.621-0.796-11.58-0.141-11.58-0.141zm16.56-2.39s8.085-1.908 9.938-1.737c1.853 0.172 3.5 1.117 5.935 2.3 2.436 1.182 7.952 4.24 10.055 5.953s5.864 3.633 5.864 3.633-7.832-3.312-10.597-4.8-7.168-4.169-9.764-5.044c-2.597-0.876-11.431-0.305-11.431-0.305zm15.2-2.75s7.642-1.428 9.495-1.265c1.854 0.162 3.505 1.1 5.946 2.27s7.973 4.203 10.084 5.905c2.112 1.703 5.881 3.605 5.881 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-10.998-0.77-10.998-0.77zm14.87-1.64s8.642-1.553 10.495-1.39c1.854 0.162 3.505 1.1 5.946 2.27s7.972 4.203 10.084 5.905c2.111 1.703 5.88 3.605 5.88 3.605s-7.846-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.787-4.998-2.601-0.863-11.998-0.644-11.998-0.644zm16.25-2.31s7.642-0.865 9.495-0.703c1.854 0.163 3.505 1.1 5.946 2.27s7.973 4.203 10.084
5758 sodipodi:role="line" 10655.906c2.112 1.702 5.881 3.605 5.881 3.605s-7.847-3.275-10.62-4.749c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.862-10.998-1.331-10.998-1.331zm15.13-1.19s8.58-1.49 10.433-1.328c1.854 0.163 3.505 1.1 5.946 2.27s7.972 4.203 10.084 5.906c2.111 1.702 5.88 3.605 5.88 3.605s-7.846-3.275-10.62-4.749c-2.772-1.474-7.187-4.135-9.787-4.998-2.601-0.862-11.935-0.706-11.935-0.706zm16.25-2.06s7.83-0.803 9.683-0.64c1.854 0.162 3.505 1.1 5.946 2.27s7.972 4.203 10.084 5.905c2.111 1.703 5.88 3.605 5.88 3.605s-7.846-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.787-4.998-2.601-0.863-11.185-1.394-11.185-1.394zm15.37-1.25s8.392-1.178 10.245-1.015c1.854 0.162 3.505 1.1 5.946 2.27s7.972 4.203 10.084 5.905c2.111 1.703 5.88 3.605 5.88 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-11.748-1.02-11.748-1.02zm16.19-2.06s6.892-0.99 8.745-0.828c1.854 0.163 3.505 1.1 5.946 2.27s7.973 4.203
5759 id="tspan8202-5-3-6-3-2-1" 106610.084 5.906c2.112 1.702 5.881 3.605 5.881 3.605s-7.847-3.275-10.62-4.749-7.188-4.135-9.788-4.998c-2.6-0.862-10.248-1.206-10.248-1.206zm17.16-0.94s6.83-1.178 8.683-1.015c1.854 0.162 3.505 1.1 5.946 2.27 2.44 1.171 7.972 4.203 10.084 5.905 2.111 1.703 5.88 3.605 5.88 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-10.185-1.02-10.185-1.02zm16.1-2s6.08-0.428 7.933-0.265c1.854 0.162 3.505 1.1 5.946 2.27 2.44 1.171 7.972 4.203 10.084 5.905 2.111 1.703 5.88 3.605 5.88 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-9.435-1.77-9.435-1.77zm15.8-1.37s6.454-0.678 8.308-0.515c1.854 0.162 3.505 1.1 5.946 2.27 2.44 1.171 7.972 4.203 10.084 5.905 2.111 1.703 5.88 3.605 5.88 3.605s-7.847-3.274-10.62-4.748c-2.772-1.474-7.187-4.135-9.788-4.998-2.6-0.863-9.81-1.52-9.81-1.52zm15.6-1.86s5.498-0.91 7.358-0.853c1.86 0.056 3.562 0.896 6.066 1.925
5760 x="1455.4426" 10672.504 1.03 8.2 3.739 10.406 5.318 2.205 1.578 6.078 3.261 6.078 3.261s-8.022-2.819-10.875-4.131c-2.853-1.313-7.413-3.716-10.06-4.429-2.645-0.712-8.973-1.091-8.973-1.091zm17.4-2.46s4.547-1.156 6.408-1.186c1.86-0.03 3.6 0.73 6.149 1.642 2.55 0.912 8.365 3.354 10.64 4.829 2.277 1.474 6.224 2.976 6.224 2.976s-8.145-2.444-11.055-3.623c-2.91-1.178-7.578-3.368-10.253-3.957-2.676-0.588-8.113-0.68-8.113-0.68zm14.5-3.03s5.96-1.774 7.82-1.83c1.86-0.057 3.61 0.68 6.172 1.555 2.562 0.876 2.522 0.857 5.333 1.49 2.797 0.63 7.077 1.513 7.077 1.513s-3.616-0.016-6.792-0.466c-3.116-0.441-7.375-1.698-10.058-2.249-2.684-0.55-9.552-0.013-9.552-0.013z" enable-background="new"/>
5761 y="-26.808125" 1068 <path d="M1099.2-279.93c.161.269 11.208-4.6 12.188-4.688.98-.087 2 3.125 2 3.125s-.775-1.504-2.875-1.062-11.301 2.671-11.312 2.625z"/>
5762 style="font-size:50px;fill:#000000;fill-opacity:1">overscan area</tspan></text> 1069 </g>
5763 <text 1070 <path d="M1107.5-284.09c-.419.213-.156.094-.647.306-.486.21-1.724.574-4.08 1.459-3.33 1.25-5.83 2.153-7.026 3.066-1.536.021-3.72.233-5.656.719a227.709 227.709 0 0 1-6.75 1.593c-1.895.42-1.676.643-2.875.875-1.297.252-1.721-.009-5.438.782-3.49.742-8.894 1.93-10.156 2.687-1.583-.18-3.867-.322-5.843-.031-3.04.447-4.917.673-6.844.906-.655.08-1.041.201-1.344.282-.426.131-.686.26-1.375.343-1.311.16-1.762-.157-5.531.282-3.554.413-9.005 1.272-10.25 1.937-1.599-.297-3.858-.534-5.844-.344-3.059.294-4.972.484-6.906.657-1.934.172-1.689.422-2.906.53-1.317.118-1.76-.163-5.532.25-3.541.39-9.007 1.21-10.28 1.876-1.6-.295-3.888-.507-5.876-.313-3.058.3-4.94.48-6.875.657-.657.06-1.04.178-1.343.25-.428.118-.684.218-1.375.28-1.316.121-1.76-.194-5.532.22-3.556.39-9.005 1.239-10.25
5764 xml:space="preserve" 10711.906-1.598-.294-3.86-.524-5.843-.313-3.056.326-4.974.526-6.907.719-1.932.192-1.69.44-2.906.562-1.315.132-1.763-.164-5.53.282-3.54.418-8.979 1.292-10.25 1.969-1.599-.282-3.86-.42-5.845-.188-3.052.358-4.945.568-6.875.781-.656.073-1.04.173-1.344.25-.426.127-.684.267-1.375.344-1.313.146-1.767-.174-5.53.313-3.55.458-8.98 1.419-10.22 2.125-1.593-.245-3.834-.382-5.812-.125-3.048.394-4.95.648-6.875.906-1.925.258-1.726.493-2.938.656-1.31.176-1.747-.104-5.5.469-3.524.538-8.923 1.699-10.188 2.437-1.587-.203-3.845-.254-5.812.094-3.026.536-4.9.862-6.813 1.187-.65.111-1.013.271-1.312.375-.42.165-.664.332-1.344.47-1.295.26-1.727-.007-5.438.812-3.498.772-8.846 2.383-10.062 3.219-1.562-.078-3.757.085-5.687.593-2.972.783-4.818 1.232-6.688 1.75s-1.666.768-2.843 1.094c-1.273.353-1.697.107-5.344 1.188-3.425 1.014-8.65 2.933-9.875 3.843-1.539.013-3.72.273-5.625.875-2.931.928-4.75 1.459-6.594
5765 style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#f8d615;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 10722.063-.627.205-.992.392-1.281.531-.408.214-.653.409-1.313.625-1.254.412-1.686.19-5.28 1.438-3.39 1.177-8.596 3.213-9.782 4.156-1.524.06-3.65.395-5.531 1.062-2.898 1.029-4.7 1.676-6.531 2.313-1.833.637-1.628.848-2.782 1.25-1.246.434-1.663.2-5.218 1.562-3.34 1.28-8.488 3.483-9.688 4.47-1.507.107-3.636.498-5.5 1.218a1044.752 1044.752 0 0 1-6.437 2.469c-.617.233-.997.442-1.282.593v1.094c.112-.222.386-.817.907-1.094.698-.37 4.813-1.993 6.812-2.718 1.657-.602 4.154-1.329 5.969-1.313.302.003.588.051.844.094 1.842.308 7.468 1.562 7.468 1.562s-6.233-1.646-7.03-1.843c-.191-.048-.536-.07-.97-.063 1.146-.87 4.762-2.393 7.344-3.437 2.839-1.148 3.117-1.252 5.063-1.657 2.008-.417 3.156-.5 3.156-.5s-.082-.6.969-1.125c.705-.351 4.887-1.892 6.906-2.562 1.952-.648 5.057-1.359 6.875-1 1.863.367 7.531 1.812 7.531 1.812s-6.287-1.87-7.094-2.093c-.193-.054-.53-.086-.968-.094 1.158-.833 4.794-2.195 7.406-3.156
5766 x="179.63055" 10732.87-1.056 3.167-1.162 5.125-1.532 1.853-.35 2.859-.425 3.031-.437.114-.217.377-.81.906-1.063.71-.338 4.926-1.712 6.97-2.312 1.692-.497 4.24-1.037 6.093-.906.308.021.613.097.875.156 1.881.424 7.594 2.031 7.594 2.031s-6.342-2.065-7.157-2.312c-.194-.06-.557-.104-1-.125 1.17-.798 4.863-2.057 7.5-2.938 2.898-.968 3.233-1.003 5.22-1.281 2.049-.287 3.187-.313 3.187-.313s-.073-.607 1-1.062c.72-.306 4.99-1.5 7.062-2 2.003-.483 5.199-.928 7.063-.406 1.91.535 7.719 2.5 7.719 2.5s-6.423-2.424-7.25-2.72c-.198-.07-.583-.14-1.032-.187 1.188-.728 4.916-1.774 7.594-2.5 2.944-.797 3.292-.77 5.313-.906 1.913-.128 2.947-.07 3.125-.062.117-.204.391-.78.937-.97.732-.253 5.079-1.047 7.188-1.374 1.748-.271 4.4-.485 6.312-.094.318.065.605.186.875.281 1.94.69 7.844 3.094 7.844 3.094s-6.535-2.95-7.375-3.312c-.201-.087-.575-.167-1.031-.25 1.206-.633 5.03-1.396 7.75-1.906 2.99-.562 3.3-.53 5.344-.532 2.109-.002
5767 y="385.38785" 10743.312.125 3.312.125s-.073-.63 1.031-.937c.74-.206 5.126-.834 7.25-1.063 2.053-.22 5.319-.252 7.22.47 1.947.738 7.843 3.374 7.843 3.374s-6.563-3.179-7.406-3.562c-.202-.092-.543-.187-1-.282 1.21-.602 4.984-1.248 7.718-1.656 3.005-.448 3.326-.452 5.375-.406 1.94.043 3.007.194 3.188.219.119-.194.384-.766.937-.907.743-.188 5.155-.734 7.282-.937 1.763-.169 4.42-.234 6.343.25.32.08.604.203.875.312 1.953.784 7.907 3.47 7.907 3.47s-6.592-3.254-7.438-3.657c-.202-.096-.572-.207-1.031-.313 1.214-.574 5.044-1.122 7.781-1.5 3.009-.415 3.323-.442 5.375-.375 2.118.07 3.313.25 3.313.25s-.078-.637 1.03-.906c.745-.18 5.153-.663 7.282-.844 2.059-.174 5.343-.124 7.25.657 1.955.8 7.875 3.53 7.875 3.53s-6.56-3.308-7.406-3.718c-.202-.098-.572-.203-1.031-.312 1.215-.564 5.01-1.115 7.75-1.47 3.01-.389 3.321-.397 5.375-.312 1.944.08 3.006.254 3.187.282.12-.191.383-.746.938-.875.744-.174 5.15-.65 7.28-.813
5768 id="text8200-4-9-2" 10751.767-.134 4.45-.126 6.376.375.32.083.603.201.875.313 1.954.8 7.906 3.562 7.906 3.562s-6.591-3.34-7.437-3.75c-.203-.098-.572-.203-1.032-.312 1.215-.564 5.042-1.084 7.782-1.438 3.01-.39 3.352-.429 5.406-.344 2.12.088 3.312.313 3.312.313s-.078-.65 1.032-.906c.744-.173 5.15-.624 7.28-.782 2.061-.152 5.344-.096 7.25.688 1.956.804 7.876 3.5 7.876 3.5s-6.56-3.276-7.406-3.688c-.203-.098-.572-.202-1.032-.312 1.216-.562 5.012-1.128 7.75-1.5 3.01-.41 3.323-.416 5.375-.344 1.943.068 3.008.165 3.188.188.119-.195.384-.73.937-.875.742-.197 5.131-.83 7.25-1.094 1.757-.22 4.406-.333 6.313.031.317.06.606.19.875.281 1.936.661 7.844 2.938 7.844 2.938s-6.537-2.807-7.375-3.156c-.2-.084-.577-.174-1.032-.25 1.204-.651 5.02-1.372 7.72-2 2.966-.69 3.288-.756 5.312-.875 2.088-.124 3.28-.032 3.28-.032s-.086-.632 1-1.03c.73-.269 5.048-1.339 7.126-1.813 2.008-.46 5.168-1.03 7-.625 1.878.414 13.578 3.015 13.578
5769 sodipodi:linespacing="125%"><tspan 10763.015s-12.328-3.022-13.141-3.265c-.195-.058-.559-.107-1-.125 1.167-.804 3.514-1.688 6.11-2.703 1.68-.659.923-.377 2.775-1.004 1.754-.594 2.486-1.01 2.63-1.113.347-.207-.355-.122-.544-.042z" enable-background="new" filter="url(#gh)" opacity=".25"/>
5770 sodipodi:role="line" 1077 <path d="m1082.6-275.12c1.873 0.393 4.496 1.146 6.031 1.969s2.822 1.056 5.375 2.5c2.527 1.43 4.796 2.007 6.969 2.531 2.348 0.566 5.435 0.715 8.844 1.188-1.09-0.84-6.608-1.173-8.406-1.563-1.8-0.39-3.895-1.016-6.594-2.313-2.7-1.296-3.495-1.799-5.813-2.687-2.318-0.889-4.004-1.383-6.406-1.625z" enable-background="new" filter="url(#gg)" opacity=".25"/>
5771 id="tspan8202-5-3-7" 1078 <path d="M1051.5-270c1.905.578 4.528 1.616 6.094 2.594 1.565.978 2.88 1.36 5.5 3.125 2.593 1.747 4.986 2.71 7.25 3.594 2.446.955 5.682 1.657 9.406 3.062-1.19-1.138-7.063-2.687-8.938-3.375-1.874-.688-4.081-1.566-6.874-3.281-2.794-1.715-3.574-2.284-5.938-3.406-2.364-1.123-4.057-1.835-6.5-2.313z" enable-background="new" filter="url(#gf)" opacity=".25"/>
5772 x="179.63055" 1079 <path d="m1020.2-266.84c1.912 0.638 4.581 1.755 6.156 2.813 1.575 1.057 2.896 1.508 5.531 3.406 2.61 1.878 5.029 3.03 7.313 4.062 2.468 1.116 5.764 2.174 9.531 3.844-1.203-1.222-7.203-3.314-9.094-4.125-1.89-0.81-4.064-1.894-6.874-3.75s-3.622-2.477-6-3.719c-2.379-1.242-4.111-1.975-6.563-2.531z" enable-background="new" filter="url(#ge)" opacity=".25"/>
5773 y="385.38785" 1080 <path d="M1110.2-266.89c.15.049.688.631.11 1.484-.81 1.195-5.705 3.325-8.563 4.125-2.845.798-6.29.978-10.562-.375-4.302-1.362-5.47-2.468-10.656-4.312 4.664 2.115 6.195 3.952 10.125 5.344 1.62.574 3.367.94 5.062 1.03-.445.327-1.53.984-3.562 1.595-2.796.84-6.65 1.534-8.25 1.625-1.515.086-3.142-.513-3.438-.625.167.103.374.377-.25 1.03-.899.945-6.147 1.924-9.125 2.25-2.964.326-6.521-.015-10.906-1.905-3.978-1.715-5.339-2.916-9.406-4.75v.156c3.643 2.095 5.284 3.883 8.875 5.562 1.73.81 3.592 1.41 5.406 1.72-.534.286-1.557.71-3.437 1.03-2.87.488-6.81.817-8.438.75-.85-.034-1.728-.184-2.406-.406-.685-.215-1.19-.444-1.312-.5.169.107.43.403-.22 1.031-.909.88-6.245 1.337-9.25 1.47-2.99.131-6.588-.451-11-2.563-4.44-2.127-5.64-3.402-10.905-5.782 4.734 2.597 6.286 4.63 10.344 6.72 1.673.861 3.485 1.493 5.25
5774 style="font-size:50px;fill:#f8d615;fill-opacity:1">CROP_ACTIVE</tspan></text> 10811.937-.463.233-1.59.688-3.688.937-2.886.343-6.834.493-8.468.375-1.547-.111-3.232-.857-3.532-1 .17.12.414.41-.218 1-.913.851-6.244 1.262-9.25 1.375-2.993.113-6.59-.49-11-2.594-4.002-1.908-5.388-3.137-9.47-5.093v.156c3.656 2.204 5.295 4.053 8.907 5.906 1.74.893 3.637 1.528 5.469 1.969-.54.248-1.578.615-3.469.844-2.886.348-6.866.52-8.5.406a9.446 9.446 0 0 1-2.406-.5 12.532 12.532 0 0 1-1.313-.531c.17.112.465.422-.187 1.03-.913.853-6.275 1.294-9.281 1.407-2.993.112-6.594-.528-11-2.594-4.437-2.08-5.647-3.331-10.906-5.656 4.729 2.548 6.29 4.578 10.344 6.625 1.671.844 3.485 1.467 5.25 1.906-.464.235-1.59.684-3.688.938-2.886.348-6.836.57-8.469.469-1.544-.096-3.2-.83-3.5-.97.17.12.382.405-.25 1-.912.861-6.246 1.331-9.25 1.47-2.99.138-6.567-.451-10.969-2.47-3.993-1.83-5.365-3.028-9.437-4.905v.156c3.647 2.133 5.27 3.935 8.875 5.719 1.737.86 3.607 1.45 5.437
5775 <text 10821.875-.54.253-1.55.64-3.437.906-2.88.404-6.838.646-8.469.562a9.36 9.36 0 0 1-2.406-.437 12.971 12.971 0 0 1-1.313-.5c.17.109.432.41-.218 1.031-.911.87-6.25 1.392-9.25 1.563-2.987.17-6.574-.316-10.97-2.282-4.424-1.978-5.605-3.228-10.843-5.375 4.71 2.388 6.27 4.39 10.312 6.344a23.73 23.73 0 0 0 5.218 1.781c-.461.25-1.597.713-3.687 1.032-2.876.438-6.78.733-8.406.687-1.539-.043-3.233-.745-3.532-.875.169.113.411.414-.218 1.031-.908.891-6.203 1.529-9.188 1.813-2.971.283-6.573-.176-10.938-1.938-3.96-1.598-5.329-2.795-9.344-4.312v.156c3.596 1.811 5.239 3.582 8.813 5.156 1.722.759 3.587 1.29 5.406 1.625-.536.28-1.566.688-3.437 1.063-2.856.572-6.79 1.02-8.407 1.031-.844.006-1.706-.08-2.375-.25-.676-.162-1.16-.33-1.28-.375.166.094.422.383-.22 1.062-.897.951-6.186 1.918-9.125 2.438-2.925.518-6.432.374-10.719-1.031-4.315-1.415-5.472-2.53-10.562-3.969 4.577 1.751 6.09 3.56 10.031 5 1.627.594 3.37.956
5776 xml:space="preserve" 10835.094 1.156-.453.297-1.555.884-3.594 1.469-2.804.805-6.638 1.576-8.218 1.75-1.495.165-3.117-.317-3.407-.406.164.09.393.36-.218 1.062-.883 1.014-6.045 2.372-8.938 3.063-2.88.687-6.335.76-10.562-.438-3.835-1.086-5.172-2.072-9.062-3.125v.156c3.484 1.395 5.07 2.92 8.53 4.032 1.669.535 3.457.786 5.22.875-.52.352-1.5.914-3.313 1.53-2.765.942-6.59 1.936-8.156 2.157-.818.115-1.633.123-2.281.031-.655-.083-1.133-.218-1.25-.25.162.075.434.34-.188 1.094-.87 1.055-6.01 2.66-8.875 3.438-2.852.774-6.259.958-10.438-.094-4.206-1.06-5.356-2.042-10.344-3.156 4.485 1.46 5.97 3.135 9.813 4.25 1.585.46 3.287.638 4.969.687-.442.337-1.513 1.028-3.5 1.781-2.734 1.037-6.452 2.163-8 2.438-1.465.26-3.06-.117-3.344-.188.16.08.38.321-.219 1.063-.865 1.07-5.916 2.818-8.75 3.687-2.82.866-6.207 1.157-10.344.22-3.753-.852-5.048-1.717-8.875-2.595v.157c3.428 1.237 4.987 2.632 8.375 3.53 1.632.434 3.367.584
5777 style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 10845.094.563-.51.384-1.477 1.022-3.25 1.75-2.706 1.112-6.436 2.308-7.969 2.625-.8.166-1.612.219-2.25.157v1.406c.227-.145.449-.273.719-.375 1.08-.41 2.171-.216 6-1.688 3.828-1.471 5.224-2.005 5.906-2.406.68-.4 1.612-.88 2.219-1.531 1.827-.138 3.57-.493 4.937-1 2.968-1.1 4.876-1.806 6.782-2.469 1.905-.663 2.354-1.415 3.406-1.781 1.091-.38 2.195-.166 6.062-1.531 3.868-1.366 5.283-1.827 5.969-2.22.701-.4 1.7-.932 2.313-1.593 1.97-.055 3.816-.385 5.28-.875 3.002-1.005 4.927-1.622 6.845-2.25 1.538-.504 2.174-1.047 2.906-1.437.23-.135.475-.254.75-.344 1.098-.36 2.181-.082 6.094-1.313 3.912-1.23 5.366-1.673 6.062-2.03.694-.358 1.63-.794 2.25-1.407 1.865-.023 3.636-.267 5.031-.688 3.03-.913 4.993-1.43 6.938-1.968 1.945-.54 2.426-1.265 3.5-1.563 1.114-.31 2.22.007 6.187-1.031 3.968-1.039 5.418-1.433 6.125-1.75.735-.33 1.814-.754 2.438-1.375 1.997.116 3.857-.02 5.344-.375 3.078-.735 5.083-1.101
5778 x="636.67419" 10857.062-1.5 1.588-.32 2.244-.79 3-1.094.238-.107.467-.193.75-.25 1.134-.23 2.305.209 6.344-.5s5.5-.927 6.219-1.187c.715-.26 1.704-.568 2.343-1.094 1.925.24 3.748.224 5.188 0 3.126-.488 5.155-.7 7.156-.969 2.002-.268 2.489-.945 3.594-1.094 1.146-.154 2.276.302 6.344-.219 4.068-.52 5.56-.695 6.28-.937.738-.247 1.799-.586 2.438-1.125 2.05.335 3.974.398 5.5.219 3.143-.37 5.18-.56 7.188-.782 1.61-.178 2.265-.608 3.031-.843a3.43 3.43 0 0 1 .781-.188c1.15-.128 2.302.347 6.375-.125s5.56-.61 6.282-.844c.719-.232 1.7-.473 2.343-.968 1.937.333 3.77.404 5.22.25 3.145-.335 5.177-.519 7.187-.719 2.01-.2 2.484-.826 3.593-.938 1.152-.115 2.297.366 6.375-.062s5.59-.562 6.313-.781c.74-.224 1.796-.514 2.437-1.031 2.058.398 4.002.493 5.532.343 3.148-.308 5.175-.473 7.187-.656 1.614-.147 2.263-.56 3.031-.781.242-.081.494-.13.782-.156 1.152-.106 2.293.392 6.375 0 4.082-.393 5.589-.531 6.312-.75.721-.219
5779 y="-138.84549" 10861.7-.448 2.344-.938 1.938.35 3.769.454 5.219.313 3.148-.309 5.175-.474 7.187-.657 2.012-.183 2.514-.838 3.625-.937 1.152-.103 2.292.385 6.375 0s5.589-.501 6.313-.719c.739-.222 1.795-.514 2.437-1.031 2.057.402 4.003.503 5.531.344 3.147-.329 5.178-.523 7.188-.72 1.613-.156 2.266-.63 3.031-.874.24-.088.463-.122.75-.156 1.148-.14 2.317.34 6.375-.25 4.058-.59 5.562-.778 6.281-1.032.717-.253 1.675-.558 2.313-1.093 1.92.211 3.72.151 5.156-.094 3.12-.533 5.112-.929 7.094-1.313 1.982-.384 2.474-1.04 3.562-1.28 1.13-.252 2.27.115 6.25-.876s5.43-1.42 6.125-1.781c.723-.376 1.762-.87 2.375-1.531 1.963-.012 3.794-.291 5.22-.844 2.95-1.145 4.872-1.87 6.687-2.75 1.455-.707 2.334-1.686 2.547-1.984.212-.298.111-.746.137-.767.043-.035.32-.085.48-.429.858-1.847 2.32-5.644
5780 id="text8200-4-9-3-5-6-0" 10872.435-6.329.113-.682.163-1.348.214-1.745.03-.23-.147-.865-.125-.924.031-.082.305-.265.36-.515.267-1.198.09-2.191-.125-3.609-.214-1.417-.983-4.622-1.637-5.476-.659-.862-1.223-1.011-1.748-1-.208.27.137.262.163.312.68.05.934.369 1.42.897s1.221 3.85 1.358 5.301.19 2.86-.088 3.469c-.278.608-.723.517-1.016.583.531.186.67.125.732.969.058.813-.134 1.64-.52 2.806-.392 1.18-1.846 4.35-2.286 4.598-.452.256-.731.27-1.067.14z" enable-background="new" filter="url(#ff)" opacity=".25"/>
5781 sodipodi:linespacing="125%"><tspan 1088 <path d="m988.75-263.84c1.912 0.634 4.55 1.758 6.125 2.813 1.575 1.054 2.896 1.482 5.531 3.375 2.609 1.873 5.027 3.015 7.313 4.062 2.47 1.132 5.752 2.155 9.531 3.938-1.207-1.259-7.139-3.365-9.031-4.188s-4.128-1.93-6.938-3.781-3.622-2.482-6-3.719c-2.377-1.237-4.08-1.95-6.53-2.5z" enable-background="new" filter="url(#fe)" opacity=".25"/>
5782 sodipodi:role="line" 1089 <path d="M957.5-260.78c1.91.618 4.583 1.71 6.156 2.75 1.574 1.04 2.896 1.482 5.531 3.375 2.609 1.873 5.027 3.015 7.313 4.063 2.47 1.131 5.752 2.154 9.531 3.937-1.207-1.258-7.201-3.396-9.094-4.219-1.892-.823-4.096-1.93-6.906-3.781-2.81-1.85-3.593-2.44-5.969-3.656s-4.113-1.939-6.562-2.469z" enable-background="new" filter="url(#fd)" opacity=".25"/>
5783 id="tspan8202-5-3-6-3-2-9" 1090 <path d="M926.09-257.38c1.908.597 4.553 1.664 6.125 2.688 1.571 1.023 2.87 1.44 5.5 3.28 2.603 1.823 5.029 2.973 7.313 4 2.467 1.111 5.755 2.094 9.53 3.845-1.205-1.249-7.171-3.319-9.062-4.125s-4.102-1.891-6.906-3.688c-2.804-1.796-3.627-2.402-6-3.594-2.373-1.191-4.054-1.903-6.5-2.406z" enable-background="new" filter="url(#fc)" opacity=".25"/>
5784 x="636.67419" 1091 <path d="M894.91-253.56c1.902.554 4.587 1.589 6.156 2.594s2.874 1.408 5.5 3.219c2.6 1.791 5 2.871 7.281 3.875 2.465 1.083 5.76 2.04 9.532 3.75-1.205-1.236-7.175-3.245-9.063-4.032-1.888-.786-4.075-1.83-6.875-3.593s-3.6-2.369-5.969-3.532c-2.37-1.163-4.123-1.834-6.562-2.28z" enable-background="new" filter="url(#fb)" opacity=".25"/>
5785 y="-138.84549" 1092 <path d="M863.72-248.66c1.88.43 4.504 1.38 6.063 2.313 1.558.932 2.852 1.257 5.468 3 2.59 1.724 4.981 2.708 7.25 3.625 2.452.99 5.74 1.877 9.5 3.5-1.201-1.208-7.152-3.067-9.03-3.782-1.88-.715-4.086-1.684-6.876-3.375s-3.585-2.228-5.937-3.28-4.026-1.713-6.438-2z" enable-background="new" filter="url(#fa)" opacity=".25"/>
5786 style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:70px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;fill-opacity:1">DATA SOURCE</tspan></text> 1093 <path d="m833.16-241.38c1.848 0.296 4.47 0.976 6 1.781s2.814 1.056 5.375 2.531c2.535 1.46 4.89 2.326 7.125 3.063 2.414 0.797 5.657 1.467 9.375 2.844-1.188-1.129-7.088-2.59-8.938-3.156-1.85-0.567-4.003-1.374-6.75-2.844-2.746-1.47-3.5-1.92-5.812-2.781-2.311-0.861-4.005-1.32-6.375-1.438z" enable-background="new" filter="url(#ez)" opacity=".25"/>
5787 <text 1094 <path d="m802.91-232.31c1.822 0.211 4.366 0.8 5.875 1.531 1.51 0.73 2.756 0.93 5.281 2.281 2.5 1.338 4.832 2.049 7.031 2.657 2.377 0.656 5.565 1.073 9.22 2.187-1.168-1.045-6.93-2.103-8.75-2.562-1.822-0.46-3.953-1.127-6.657-2.438s-3.471-1.72-5.75-2.469-3.913-1.179-6.25-1.187z" enable-background="new" filter="url(#ey)" opacity=".25"/>
5788 xml:space="preserve" 1095 <path d="M773.19-222.19c1.811.179 4.32.665 5.813 1.344 1.491.678 2.753.798 5.25 2.062 2.47 1.252 4.79 1.896 6.968 2.438 2.354.585 5.492.897 9.094 1.844-1.15-.992-6.852-1.784-8.656-2.188s-3.916-1.021-6.594-2.25c-2.678-1.229-3.403-1.61-5.656-2.281-2.253-.67-3.896-1.002-6.219-.969z" enable-background="new" filter="url(#ex)" opacity=".25"/>
5789 style="font-style:normal;font-weight:normal;font-size:45.31394196px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;enable-background:new" 1096 <path d="M743.56-211.19c1.793.13 4.273.55 5.75 1.188s2.716.741 5.188 1.937c2.446 1.184 4.72 1.747 6.874 2.219 2.328.51 5.42.68 9 1.562-1.143-.97-6.747-1.59-8.53-1.937-1.784-.347-3.884-.888-6.532-2.031-2.648-1.144-3.395-1.517-5.625-2.125-2.23-.61-3.826-.91-6.125-.813z" enable-background="new" filter="url(#ew)" opacity=".25"/>
5790 x="3178.7151" 1097 </g>
5791 y="-129.06131" 1098 </g>
5792 id="text8200-4-9-3-5-6-0-3" 1099 <path d="M3840.7 940.04c1.651-7.722 3.538-13.762 4.889-23.633.803-8.777 3.33-4.873 7.302-20.148 1.41-5.374 5.507.94 9.016-5.757 1.278-1.927 2.901-.97 4.508-.151 3.787 3.165 5.859 8.887 8.381 13.937 6.174 14.326 20.651 19.06 23.62 15.149 1.442-6.97 7.926-12.979 12.444-26.663.752-2.694 11.796-20.982 14.73-15.755" enable-background="new" fill="none" stroke="#000"/>
5793 sodipodi:linespacing="125%" 1100 <path d="M3865.4 915.04c7.405-7.758 13.89-21.376 20.826-32.117 3.33-4.726 6.909 7.717 10.857 8.635 2.31-.523 3.734 2.886 5.714 3.939 5.186 3.162 2.412 9.274 10.032 15.452 6.191 4.128 8.958-16.313 14.985-17.573 4.906-1.207 8.145-.758 11.683-.606 3.95.333 4.102-8.393 6.096-12.725 2.997-6.731 7.196-4.438 10.203-11.376 1.023-3.323 1.965-7.224 2.75-12.257.887-4.8 3.057.734 4.825 3.03" enable-background="new" fill="none" stroke="#000"/>
5794 transform="scale(0.96105877,1.0405191)"><tspan 1101 <g transform="matrix(1.0057 0 0 2.3995 3249.4 125.01)" clip-path="url(#ev)" filter="url(#eu)">
5795 sodipodi:role="line" 1102 <path d="M910.14 746.31l32.613 5.174-.361-23.876 7.188-29.682-8.45-5.264-21.823 26.511-9.167 27.137z" enable-background="accumulate" fill="#fff" fill-rule="evenodd"/>
5796 id="tspan8202-5-3-6-3-2-9-6" 1103 <path d="M877.52 650.19h123.04v172.53H877.52z" enable-background="accumulate" fill="none"/>
5797 x="3178.7151" 1104 </g>
5798 y="-129.06131" 1105 <g transform="matrix(1.0057 0 0 2.3995 3249.4 125.01)" clip-path="url(#et)" filter="url(#es)">
5799 style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:69.99999978px;font-family:sans-serif;-inkscape-font-specification:'sans-serif Bold';fill:#000000;fill-opacity:1">DATA SINK</tspan></text> 1106 <path d="M964 754.69l18.429 7.465 9.071-36.964-14.87 4.839L964 754.69z" enable-background="accumulate" fill="#fff" fill-rule="evenodd"/>
5800 <flowRoot 1107 <path d="M924.9 677.06h142.13v125.16H924.9z" enable-background="accumulate" fill="none"/>
5801 xml:space="preserve" 1108 </g>
5802 id="flowRoot7469" 1109 </g>
5803 style="fill:black;stroke:none;stroke-opacity:1;stroke-width:1px;stroke-linejoin:miter;stroke-linecap:butt;fill-opacity:1;font-family:sans-serif;font-style:normal;font-weight:normal;font-size:57.5px;line-height:125%;letter-spacing:0px;word-spacing:0px;"><flowRegion 1110 <path d="m592.8 398.62l2899.5-102.16" fill="#f8d615" fill-rule="evenodd" marker-end="url(#er)" stroke="#f8d615" stroke-width="17.844"/>
5804 id="flowRegion7471"><rect 1111 <path d="m576.48 779.92l2914.5 416.44" enable-background="new" fill="#f8d615" fill-rule="evenodd" marker-end="url(#eq)" stroke="#f8d615" stroke-width="18"/>
5805 id="rect7473" 1112 <g font-family="sans-serif" letter-spacing="0" word-spacing="0">
5806 width="4297.5474" 1113 <text transform="translate(48.571 195.53)" x="80.219" y="107.387" fill="#f83615" font-size="40" style="line-height:125%">
5807 height="1851.537" 1114 <tspan x="80.219" y="107.387" font-size="50">CROP_DEFAULT</tspan>
5808 x="-52.635666" 1115 </text>
5809 y="70.623535" 1116 <g font-size="45.314">
5810 style="font-size:57.5px;" /></flowRegion><flowPara 1117 <text transform="matrix(.96106 0 0 1.0405 48.571 195.53)" x="3861.367" y="1281.72" enable-background="new" fill="#f80000" fill-opacity="0" style="line-height:125%">
5811 id="flowPara7475"></flowPara></flowRoot> </g> 1118 <tspan x="3861.367" y="1281.72" font-size="56.642">COMPOSE_PADDED</tspan>
1119 </text>
1120 <text transform="matrix(.96106 0 0 1.0405 48.571 195.53)" x="3615.155" y="49.157" enable-background="new" fill="#f8d615" style="line-height:125%">
1121 <tspan x="3615.155" y="49.157" font-size="50">COMPOSE_ACTIVE</tspan>
1122 </text>
1123 <text transform="matrix(.96106 0 0 1.0405 48.571 195.53)" x="2429.153" y="-3.166" enable-background="new" fill="#f83615" style="line-height:125%">
1124 <tspan x="2429.153" y="-3.166" font-size="50">COMPOSE_DEFAULT</tspan>
1125 </text>
1126 <text transform="matrix(.96106 0 0 1.0405 48.571 195.53)" x="3681.545" y="1289.954" enable-background="new" fill="#f815bb" style="line-height:125%">
1127 <tspan x="3681.545" y="1289.954" font-size="50">COMPOSE_PADDED</tspan>
1128 </text>
1129 </g>
1130 <text transform="matrix(.96106 0 0 1.0405 48.571 195.53)" x="2438.062" y="1368.429" enable-background="new" font-size="50" style="line-height:125%">
1131 <tspan x="2438.062" y="1368.429">COMPOSE_BONDS</tspan>
1132 </text>
1133 <g font-size="40">
1134 <text transform="translate(48.571 195.53)" x="8.082" y="1438.896" enable-background="new" style="line-height:125%">
1135 <tspan x="8.082" y="1438.896" font-size="50">CROP_BONDS</tspan>
1136 </text>
1137 <text transform="translate(48.571 195.53)" x="1455.443" y="-26.808" enable-background="new" style="line-height:125%">
1138 <tspan x="1455.443" y="-26.808" font-size="50">overscan area</tspan>
1139 </text>
1140 <text transform="translate(48.571 195.53)" x="179.631" y="385.388" enable-background="new" fill="#f8d615" style="line-height:125%">
1141 <tspan x="179.631" y="385.388" font-size="50">CROP_ACTIVE</tspan>
1142 </text>
1143 <text transform="translate(48.571 195.53)" x="636.674" y="-138.845" enable-background="new" style="line-height:125%">
1144 <tspan x="636.674" y="-138.845" font-size="70" font-weight="bold">DATA SOURCE</tspan>
1145 </text>
1146 </g>
1147 <text transform="matrix(.96106 0 0 1.0405 48.571 195.53)" x="3178.715" y="-129.061" enable-background="new" font-size="45.314" style="line-height:125%">
1148 <tspan x="3178.715" y="-129.061" font-size="70" font-weight="bold">DATA SINK</tspan>
1149 </text>
1150 </g>
5812</svg> 1151</svg>
diff --git a/Documentation/media/uapi/v4l/subdev-image-processing-crop.svg b/Documentation/media/uapi/v4l/subdev-image-processing-crop.svg
index 1903dd3846c2..ee1df49f83e8 100644
--- a/Documentation/media/uapi/v4l/subdev-image-processing-crop.svg
+++ b/Documentation/media/uapi/v4l/subdev-image-processing-crop.svg
@@ -18,11 +18,11 @@
18 id="metadata100"> 18 id="metadata100">
19 <rdf:RDF> 19 <rdf:RDF>
20 <cc:Work 20 <cc:Work
21 rdf:about=""> 21 rdf:about="">
22 <dc:format>image/svg+xml</dc:format> 22 <dc:format>image/svg+xml</dc:format>
23 <dc:type 23 <dc:type
24 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> 24 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25 <dc:title /> 25 <dc:title />
26 </cc:Work> 26 </cc:Work>
27 </rdf:RDF> 27 </rdf:RDF>
28 </metadata> 28 </metadata>
diff --git a/Documentation/media/uapi/v4l/subdev-image-processing-full.svg b/Documentation/media/uapi/v4l/subdev-image-processing-full.svg
index 91cf51832c12..c10d222b9ea9 100644
--- a/Documentation/media/uapi/v4l/subdev-image-processing-full.svg
+++ b/Documentation/media/uapi/v4l/subdev-image-processing-full.svg
@@ -18,11 +18,11 @@
18 id="metadata260"> 18 id="metadata260">
19 <rdf:RDF> 19 <rdf:RDF>
20 <cc:Work 20 <cc:Work
21 rdf:about=""> 21 rdf:about="">
22 <dc:format>image/svg+xml</dc:format> 22 <dc:format>image/svg+xml</dc:format>
23 <dc:type 23 <dc:type
24 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> 24 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25 <dc:title /> 25 <dc:title />
26 </cc:Work> 26 </cc:Work>
27 </rdf:RDF> 27 </rdf:RDF>
28 </metadata> 28 </metadata>
diff --git a/Documentation/media/uapi/v4l/subdev-image-processing-scaling-multi-source.svg b/Documentation/media/uapi/v4l/subdev-image-processing-scaling-multi-source.svg
index cedcbf598923..3cb68bf9fc04 100644
--- a/Documentation/media/uapi/v4l/subdev-image-processing-scaling-multi-source.svg
+++ b/Documentation/media/uapi/v4l/subdev-image-processing-scaling-multi-source.svg
@@ -18,11 +18,11 @@
18 id="metadata186"> 18 id="metadata186">
19 <rdf:RDF> 19 <rdf:RDF>
20 <cc:Work 20 <cc:Work
21 rdf:about=""> 21 rdf:about="">
22 <dc:format>image/svg+xml</dc:format> 22 <dc:format>image/svg+xml</dc:format>
23 <dc:type 23 <dc:type
24 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> 24 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25 <dc:title /> 25 <dc:title />
26 </cc:Work> 26 </cc:Work>
27 </rdf:RDF> 27 </rdf:RDF>
28 </metadata> 28 </metadata>
diff --git a/Documentation/media/uapi/v4l/vbi_525.svg b/Documentation/media/uapi/v4l/vbi_525.svg
index b05f7777ccf8..643aec8d0ba2 100644
--- a/Documentation/media/uapi/v4l/vbi_525.svg
+++ b/Documentation/media/uapi/v4l/vbi_525.svg
@@ -42,19 +42,21 @@
42 inkscape:current-layer="g10" 42 inkscape:current-layer="g10"
43 units="mm" /><metadata 43 units="mm" /><metadata
44 id="metadata8"><rdf:RDF><cc:Work 44 id="metadata8"><rdf:RDF><cc:Work
45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs 46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
47 id="defs6"><clipPath 47 id="defs6"><clipPath
48 id="clipPath20" 48 id="clipPath20"
49 clipPathUnits="userSpaceOnUse"><path 49 clipPathUnits="userSpaceOnUse"><path
50 inkscape:connector-curvature="0" 50 inkscape:connector-curvature="0"
51 id="path22" 51 id="path22"
52 d="m 0,0 5950,0 0,3922 L 0,3922 0,0 Z m 0,3922 5950,0 0,1 -5950,0 0,-1 z m 0,1 1359,0 0,1 -1359,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1363,0 0,1 -1363,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1367,0 0,1 -1367,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1371,0 0,1 -1371,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1375,0 0,1 -1375,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1379,0 0,1 -1379,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1383,0 0,1 -1383,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1387,0 0,1 -1387,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1391,0 0,1 -1391,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1390,0 0,1 -1390,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1386,0 0,1 -1386,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1382,0 0,1 -1382,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1378,0 0,1 -1378,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1374,0 0,1 -1374,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1370,0 0,1 -1370,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1366,0 0,1 -1366,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1362,0 0,1 -1362,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1358,0 0,1 -1358,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 5950,0 0,1 -5950,0 0,-1 z m 0,1 5950,0 0,4478 -5950,0 0,-4478 z" /></clipPath><clipPath 52 d="m 0,0 5950,0 0,3922 L 0,3922 0,0 Z m 0,3922 5950,0 0,1 -5950,0 0,-1 z m 0,1 1359,0 0,1 -1359,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1363,0 0,1 -1363,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1367,0 0,1 -1367,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1371,0 0,1 -1371,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1375,0 0,1 -1375,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1379,0 0,1 -1379,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1383,0 0,1 -1383,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1387,0 0,1 -1387,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1391,0 0,1 -1391,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1390,0 0,1 -1390,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1386,0 0,1 -1386,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1382,0 0,1 -1382,0 0,-1 z m
531399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1378,0 0,1 -1378,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1374,0 0,1 -1374,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1370,0 0,1 -1370,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1366,0 0,1 -1366,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1362,0 0,1 -1362,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1358,0 0,1 -1358,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 5950,0 0,1 -5950,0 0,-1 z m 0,1 5950,0 0,4478 -5950,0 0,-4478 z" /></clipPath><clipPath
53 id="clipPath98" 54 id="clipPath98"
54 clipPathUnits="userSpaceOnUse"><path 55 clipPathUnits="userSpaceOnUse"><path
55 inkscape:connector-curvature="0" 56 inkscape:connector-curvature="0"
56 id="path100" 57 id="path100"
57 d="m 0,0 5950,0 0,4546 L 0,4546 0,0 Z m 0,4546 5950,0 0,1 -5950,0 0,-1 z m 0,1 1360,0 0,1 -1360,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1364,0 0,1 -1364,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1368,0 0,1 -1368,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1372,0 0,1 -1372,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1376,0 0,1 -1376,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1380,0 0,1 -1380,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1384,0 0,1 -1384,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1388,0 0,1 -1388,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1391,0 0,1 -1391,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1389,0 0,1 -1389,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1385,0 0,1 -1385,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1381,0 0,1 -1381,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1377,0 0,1 -1377,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1373,0 0,1 -1373,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1369,0 0,1 -1369,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1365,0 0,1 -1365,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1361,0 0,1 -1361,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1357,0 0,1 -1357,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 5950,0 0,1 -5950,0 0,-1 z m 0,1 5950,0 0,3854 -5950,0 0,-3854 z" /></clipPath></defs><g 58 d="m 0,0 5950,0 0,4546 L 0,4546 0,0 Z m 0,4546 5950,0 0,1 -5950,0 0,-1 z m 0,1 1360,0 0,1 -1360,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1364,0 0,1 -1364,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1368,0 0,1 -1368,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1372,0 0,1 -1372,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1376,0 0,1 -1376,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1380,0 0,1 -1380,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1384,0 0,1 -1384,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1388,0 0,1 -1388,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1391,0 0,1 -1391,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1389,0 0,1 -1389,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1385,0 0,1 -1385,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1381,0 0,1 -1381,0 0,-1 z m
591399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1377,0 0,1 -1377,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1373,0 0,1 -1373,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1369,0 0,1 -1369,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1365,0 0,1 -1365,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1361,0 0,1 -1361,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 1357,0 0,1 -1357,0 0,-1 z m 1399,0 4551,0 0,1 -4551,0 0,-1 z m -1399,1 5950,0 0,1 -5950,0 0,-1 z m 0,1 5950,0 0,3854 -5950,0 0,-3854 z" /></clipPath></defs><g
58 transform="matrix(0.125,0,0,-0.125,-87.571875,638.05691)" 60 transform="matrix(0.125,0,0,-0.125,-87.571875,638.05691)"
59 inkscape:label="vbi_525" 61 inkscape:label="vbi_525"
60 inkscape:groupmode="layer" 62 inkscape:groupmode="layer"
@@ -62,165 +64,165 @@
62 transform="matrix(1.3000026,0,0,1.3000026,-210.17435,-1094.2823)" 64 transform="matrix(1.3000026,0,0,1.3000026,-210.17435,-1094.2823)"
63 id="g12" 65 id="g12"
64 style=""><path 66 style=""><path
65 inkscape:connector-curvature="0" 67 inkscape:connector-curvature="0"
66 id="path14" 68 id="path14"
67 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 69 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
68 d="m 1281.75,3974.45 0,-85.05" /></g><g 70 d="m 1281.75,3974.45 0,-85.05" /></g><g
69 transform="matrix(1.3000026,0,0,1.3000026,-210.17435,-1094.2823)" 71 transform="matrix(1.3000026,0,0,1.3000026,-210.17435,-1094.2823)"
70 id="g16" 72 id="g16"
71 style=""><g 73 style=""><g
72 clip-path="url(#clipPath20)" 74 clip-path="url(#clipPath20)"
73 id="g18" 75 id="g18"
74 style=""><path 76 style=""><path
75 inkscape:connector-curvature="0" 77 inkscape:connector-curvature="0"
76 id="path24" 78 id="path24"
77 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 79 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
78 d="m 1281.75,3931.93 113.4,0" /></g></g><g 80 d="m 1281.75,3931.93 113.4,0" /></g></g><g
79 transform="matrix(1.3000026,0,0,1.3000026,-210.17435,-1094.2823)" 81 transform="matrix(1.3000026,0,0,1.3000026,-210.17435,-1094.2823)"
80 id="g26" 82 id="g26"
81 style=""><path 83 style=""><path
82 inkscape:connector-curvature="0" 84 inkscape:connector-curvature="0"
83 id="path28" 85 id="path28"
84 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 86 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
85 d="m 1352.31,3922.48 37.8,9.45 -37.8,9.45 0,-18.9" /><path 87 d="m 1352.31,3922.48 37.8,9.45 -37.8,9.45 0,-18.9" /><path
86 inkscape:connector-curvature="0" 88 inkscape:connector-curvature="0"
87 id="path30" 89 id="path30"
88 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 90 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
89 d="m 1352.31,3922.48 37.8,9.45 -37.8,9.45 0,-18.9 z" /><path 91 d="m 1352.31,3922.48 37.8,9.45 -37.8,9.45 0,-18.9 z" /><path
90 inkscape:connector-curvature="0" 92 inkscape:connector-curvature="0"
91 id="path32" 93 id="path32"
92 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 94 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
93 d="m 4683.75,4059.5 0,-56.7" /><path 95 d="m 4683.75,4059.5 0,-56.7" /><path
94 inkscape:connector-curvature="0" 96 inkscape:connector-curvature="0"
95 id="path34" 97 id="path34"
96 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 98 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
97 d="m 4400.25,4059.5 0,-56.7" /><path 99 d="m 4400.25,4059.5 0,-56.7" /><path
98 inkscape:connector-curvature="0" 100 inkscape:connector-curvature="0"
99 id="path36" 101 id="path36"
100 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 102 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
101 d="m 4116.75,4059.5 0,-56.7" /><path 103 d="m 4116.75,4059.5 0,-56.7" /><path
102 inkscape:connector-curvature="0" 104 inkscape:connector-curvature="0"
103 id="path38" 105 id="path38"
104 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 106 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
105 d="m 3833.25,4059.5 0,-56.7" /><path 107 d="m 3833.25,4059.5 0,-56.7" /><path
106 inkscape:connector-curvature="0" 108 inkscape:connector-curvature="0"
107 id="path40" 109 id="path40"
108 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 110 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
109 d="m 3549.75,4059.5 0,-56.7" /><path 111 d="m 3549.75,4059.5 0,-56.7" /><path
110 inkscape:connector-curvature="0" 112 inkscape:connector-curvature="0"
111 id="path42" 113 id="path42"
112 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 114 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
113 d="m 3266.25,4059.5 0,-56.7" /><path 115 d="m 3266.25,4059.5 0,-56.7" /><path
114 inkscape:connector-curvature="0" 116 inkscape:connector-curvature="0"
115 id="path44" 117 id="path44"
116 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 118 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
117 d="m 2982.75,4059.5 0,-56.7" /><path 119 d="m 2982.75,4059.5 0,-56.7" /><path
118 inkscape:connector-curvature="0" 120 inkscape:connector-curvature="0"
119 id="path46" 121 id="path46"
120 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 122 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
121 d="m 2699.25,4059.5 0,-56.7" /><path 123 d="m 2699.25,4059.5 0,-56.7" /><path
122 inkscape:connector-curvature="0" 124 inkscape:connector-curvature="0"
123 id="path48" 125 id="path48"
124 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 126 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
125 d="m 2415.75,4059.5 0,-56.7" /><path 127 d="m 2415.75,4059.5 0,-56.7" /><path
126 inkscape:connector-curvature="0" 128 inkscape:connector-curvature="0"
127 id="path50" 129 id="path50"
128 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 130 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
129 d="m 2132.25,4059.5 0,-56.7" /><path 131 d="m 2132.25,4059.5 0,-56.7" /><path
130 inkscape:connector-curvature="0" 132 inkscape:connector-curvature="0"
131 id="path52" 133 id="path52"
132 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 134 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
133 d="m 1848.75,4059.5 0,-56.7" /><path 135 d="m 1848.75,4059.5 0,-56.7" /><path
134 inkscape:connector-curvature="0" 136 inkscape:connector-curvature="0"
135 id="path54" 137 id="path54"
136 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 138 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
137 d="m 1565.25,4059.5 0,-56.7" /><path 139 d="m 1565.25,4059.5 0,-56.7" /><path
138 inkscape:connector-curvature="0" 140 inkscape:connector-curvature="0"
139 id="path56" 141 id="path56"
140 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 142 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
141 d="m 1281.75,4059.5 0,-56.7" /><path 143 d="m 1281.75,4059.5 0,-56.7" /><path
142 inkscape:connector-curvature="0" 144 inkscape:connector-curvature="0"
143 id="path58" 145 id="path58"
144 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 146 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
145 d="m 998.25,4059.5 0,-56.7" /><path 147 d="m 998.25,4059.5 0,-56.7" /><path
146 inkscape:connector-curvature="0" 148 inkscape:connector-curvature="0"
147 id="path60" 149 id="path60"
148 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 150 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
149 d="m 714.75,4059.5 0,-56.7" /><path 151 d="m 714.75,4059.5 0,-56.7" /><path
150 inkscape:connector-curvature="0" 152 inkscape:connector-curvature="0"
151 id="path62" 153 id="path62"
152 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 154 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
153 d="m 4683.75,4144.55 0,-56.7" /><path 155 d="m 4683.75,4144.55 0,-56.7" /><path
154 inkscape:connector-curvature="0" 156 inkscape:connector-curvature="0"
155 id="path64" 157 id="path64"
156 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 158 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
157 d="m 4400.25,4144.55 0,-56.7" /><path 159 d="m 4400.25,4144.55 0,-56.7" /><path
158 inkscape:connector-curvature="0" 160 inkscape:connector-curvature="0"
159 id="path66" 161 id="path66"
160 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 162 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
161 d="m 4116.75,4144.55 0,-56.7" /><path 163 d="m 4116.75,4144.55 0,-56.7" /><path
162 inkscape:connector-curvature="0" 164 inkscape:connector-curvature="0"
163 id="path68" 165 id="path68"
164 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 166 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
165 d="m 3833.25,4144.55 0,-56.7" /><path 167 d="m 3833.25,4144.55 0,-56.7" /><path
166 inkscape:connector-curvature="0" 168 inkscape:connector-curvature="0"
167 id="path70" 169 id="path70"
168 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 170 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
169 d="m 3549.75,4144.55 0,-56.7" /><path 171 d="m 3549.75,4144.55 0,-56.7" /><path
170 inkscape:connector-curvature="0" 172 inkscape:connector-curvature="0"
171 id="path72" 173 id="path72"
172 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 174 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
173 d="m 3266.25,4144.55 0,-56.7" /><path 175 d="m 3266.25,4144.55 0,-56.7" /><path
174 inkscape:connector-curvature="0" 176 inkscape:connector-curvature="0"
175 id="path74" 177 id="path74"
176 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 178 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
177 d="m 2982.75,4144.55 0,-56.7" /><path 179 d="m 2982.75,4144.55 0,-56.7" /><path
178 inkscape:connector-curvature="0" 180 inkscape:connector-curvature="0"
179 id="path76" 181 id="path76"
180 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 182 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
181 d="m 2699.25,4144.55 0,-56.7" /><path 183 d="m 2699.25,4144.55 0,-56.7" /><path
182 inkscape:connector-curvature="0" 184 inkscape:connector-curvature="0"
183 id="path78" 185 id="path78"
184 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 186 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
185 d="m 2415.75,4144.55 0,-56.7" /><path 187 d="m 2415.75,4144.55 0,-56.7" /><path
186 inkscape:connector-curvature="0" 188 inkscape:connector-curvature="0"
187 id="path80" 189 id="path80"
188 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 190 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
189 d="m 2132.25,4144.55 0,-56.7" /><path 191 d="m 2132.25,4144.55 0,-56.7" /><path
190 inkscape:connector-curvature="0" 192 inkscape:connector-curvature="0"
191 id="path82" 193 id="path82"
192 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 194 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
193 d="m 1848.75,4144.55 0,-56.7" /><path 195 d="m 1848.75,4144.55 0,-56.7" /><path
194 inkscape:connector-curvature="0" 196 inkscape:connector-curvature="0"
195 id="path84" 197 id="path84"
196 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 198 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
197 d="m 1565.25,4144.55 0,-56.7" /><path 199 d="m 1565.25,4144.55 0,-56.7" /><path
198 inkscape:connector-curvature="0" 200 inkscape:connector-curvature="0"
199 id="path86" 201 id="path86"
200 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 202 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
201 d="m 1281.75,4144.55 0,-56.7" /><path 203 d="m 1281.75,4144.55 0,-56.7" /><path
202 inkscape:connector-curvature="0" 204 inkscape:connector-curvature="0"
203 id="path88" 205 id="path88"
204 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 206 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
205 d="m 998.25,4144.55 0,-56.7" /><path 207 d="m 998.25,4144.55 0,-56.7" /><path
206 inkscape:connector-curvature="0" 208 inkscape:connector-curvature="0"
207 id="path90" 209 id="path90"
208 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 210 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
209 d="m 714.75,4144.55 0,-56.7" /><path 211 d="m 714.75,4144.55 0,-56.7" /><path
210 inkscape:connector-curvature="0" 212 inkscape:connector-curvature="0"
211 id="path92" 213 id="path92"
212 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 214 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
213 d="m 1281.75,4598.15 0,-85.05" /></g><g 215 d="m 1281.75,4598.15 0,-85.05" /></g><g
214 transform="matrix(1.3000026,0,0,1.3000026,-210.17435,-1094.2823)" 216 transform="matrix(1.3000026,0,0,1.3000026,-210.17435,-1094.2823)"
215 id="g94" 217 id="g94"
216 style=""><g 218 style=""><g
217 clip-path="url(#clipPath98)" 219 clip-path="url(#clipPath98)"
218 id="g96" 220 id="g96"
219 style=""><path 221 style=""><path
220 inkscape:connector-curvature="0" 222 inkscape:connector-curvature="0"
221 id="path102" 223 id="path102"
222 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 224 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
223 d="m 1281.75,4555.63 113.4,0" /></g></g><path 225 d="m 1281.75,4555.63 113.4,0" /></g></g><path
224 d="m 1547.8322,4815.7637 49.1401,12.2851 -49.1401,12.285 0,-24.5701" 226 d="m 1547.8322,4815.7637 49.1401,12.2851 -49.1401,12.285 0,-24.5701"
225 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 227 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
226 id="path106" 228 id="path106"
@@ -546,266 +548,266 @@
546 id="text268" 548 id="text268"
547 style="font-variant:normal;font-weight:normal;font-size:61.42512512px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 549 style="font-variant:normal;font-weight:normal;font-size:61.42512512px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
548 transform="scale(1,-1)"><tspan 550 transform="scale(1,-1)"><tspan
549 id="tspan270" 551 id="tspan270"
550 sodipodi:role="line" 552 sodipodi:role="line"
551 y="-4035.6582" 553 y="-4035.6582"
552 x="1621.9453 1642.3999 1676.5522">(1)</tspan></text> 554 x="1621.9453 1642.3999 1676.5522">(1)</tspan></text>
553<text 555<text
554 y="-4127.7959" 556 y="-4127.7959"
555 x="4199.7334" 557 x="4199.7334"
556 id="text272" 558 id="text272"
557 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 559 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
558 transform="scale(1,-1)"><tspan 560 transform="scale(1,-1)"><tspan
559 id="tspan274" 561 id="tspan274"
560 sodipodi:role="line" 562 sodipodi:role="line"
561 y="-4127.7959" 563 y="-4127.7959"
562 x="4199.7334 3831.1829 2725.5305 3112.509 3462.6321 4568.2842 4916.3442 4957.3271 5653.4458 5694.4287 5284.895 5325.8779 2356.9773 1988.4264 1210.3424 1251.3252 1292.3081 1619.8759 841.79163 882.77454 923.75732">874569101211322631262</tspan><tspan 564 x="4199.7334 3831.1829 2725.5305 3112.509 3462.6321 4568.2842 4916.3442 4957.3271 5653.4458 5694.4287 5284.895 5325.8779 2356.9773 1988.4264 1210.3424 1251.3252 1292.3081 1619.8759 841.79163 882.77454 923.75732">874569101211322631262</tspan><tspan
563 id="tspan276" 565 id="tspan276"
564 sodipodi:role="line" 566 sodipodi:role="line"
565 y="-4238.3613" 567 y="-4238.3613"
566 x="4158.748 4199.7314 4240.7144 3790.1975 3831.1807 3872.1633 2684.5457 2725.5283 2766.5112 3071.5237 3112.5063 3153.4895 3421.647 3462.6299 3503.6125 4527.2988 4568.2822 4609.2646 4895.8496 4936.833 4977.8154 5632.9517 5673.9341 5714.917 5264.4009 5305.3833 5346.3662 2315.9946 2356.9775 2397.9604 1947.444 1988.4269 2029.4097 1210.3424 1251.3252 1292.3081 1578.8931 1619.876 1660.8589 841.79163 882.77454 923.75732">271270267268269272273275274266265263264262</tspan><tspan 568 x="4158.748 4199.7314 4240.7144 3790.1975 3831.1807 3872.1633 2684.5457 2725.5283 2766.5112 3071.5237 3112.5063 3153.4895 3421.647 3462.6299 3503.6125 4527.2988 4568.2822 4609.2646 4895.8496 4936.833 4977.8154 5632.9517 5673.9341 5714.917 5264.4009 5305.3833 5346.3662 2315.9946 2356.9775 2397.9604 1947.444 1988.4269 2029.4097 1210.3424 1251.3252 1292.3081 1578.8931 1619.876 1660.8589 841.79163 882.77454 923.75732">271270267268269272273275274266265263264262</tspan><tspan
567 id="tspan278" 569 id="tspan278"
568 sodipodi:role="line" 570 sodipodi:role="line"
569 y="-5049.1729" 571 y="-5049.1729"
570 x="2725.5347 4568.2881 1988.4331 2356.9839 1619.8822 3094.0852 3462.636 4916.3506 4957.334 5284.9019 5325.8843 5653.4526 5694.4351 3812.7656 4181.3164">492315610111278</tspan><tspan 572 x="2725.5347 4568.2881 1988.4331 2356.9839 1619.8822 3094.0852 3462.636 4916.3506 4957.334 5284.9019 5325.8843 5653.4526 5694.4351 3812.7656 4181.3164">492315610111278</tspan><tspan
571 id="tspan280" 573 id="tspan280"
572 sodipodi:role="line" 574 sodipodi:role="line"
573 y="-4938.6074" 575 y="-4938.6074"
574 x="2725.5474 4568.3013 1988.446 2356.9966 1619.8953 3094.0981 3462.6489 4916.3638 4957.3472 5284.9146 5325.8975 5653.4653 5694.4482 3812.7788 4181.3296">492315610111278</tspan><tspan 576 x="2725.5474 4568.3013 1988.446 2356.9966 1619.8953 3094.0981 3462.6489 4916.3638 4957.3472 5284.9146 5325.8975 5653.4653 5694.4482 3812.7788 4181.3296">492315610111278</tspan><tspan
575 id="tspan282" 577 id="tspan282"
576 sodipodi:role="line" 578 sodipodi:role="line"
577 y="-5049.1729" 579 y="-5049.1729"
578 x="841.81781 882.8006 923.78326">524</tspan><tspan 580 x="841.81781 882.8006 923.78326">524</tspan><tspan
579 id="tspan284" 581 id="tspan284"
580 sodipodi:role="line" 582 sodipodi:role="line"
581 y="-4938.6074" 583 y="-4938.6074"
582 x="841.81781 882.8006 923.78326">261</tspan><tspan 584 x="841.81781 882.8006 923.78326">261</tspan><tspan
583 id="tspan286" 585 id="tspan286"
584 sodipodi:role="line" 586 sodipodi:role="line"
585 y="-5049.1729" 587 y="-5049.1729"
586 x="1210.3684 1251.3512 1292.3342">525</tspan><tspan 588 x="1210.3684 1251.3512 1292.3342">525</tspan><tspan
587 id="tspan288" 589 id="tspan288"
588 sodipodi:role="line" 590 sodipodi:role="line"
589 y="-4938.6074" 591 y="-4938.6074"
590 x="1210.3684 1251.3512 1292.3342">262</tspan><tspan 592 x="1210.3684 1251.3512 1292.3342">262</tspan><tspan
591 id="tspan290" 593 id="tspan290"
592 sodipodi:role="line" 594 sodipodi:role="line"
593 y="-5049.1729" 595 y="-5049.1729"
594 x="6022.0161 6062.999">22</tspan><tspan 596 x="6022.0161 6062.999">22</tspan><tspan
595 id="tspan292" 597 id="tspan292"
596 sodipodi:role="line" 598 sodipodi:role="line"
597 y="-4938.6074" 599 y="-4938.6074"
598 x="6022.0161 6062.999">22</tspan><tspan 600 x="6022.0161 6062.999">22</tspan><tspan
599 id="tspan294" 601 id="tspan294"
600 sodipodi:role="line" 602 sodipodi:role="line"
601 y="-5049.1729" 603 y="-5049.1729"
602 x="6390.5669 6431.5498">23</tspan><tspan 604 x="6390.5669 6431.5498">23</tspan><tspan
603 id="tspan296" 605 id="tspan296"
604 sodipodi:role="line" 606 sodipodi:role="line"
605 y="-4938.6074" 607 y="-4938.6074"
606 x="6390.5669 6431.5498">23</tspan><tspan 608 x="6390.5669 6431.5498">23</tspan><tspan
607 id="tspan298" 609 id="tspan298"
608 sodipodi:role="line" 610 sodipodi:role="line"
609 y="-4238.3623" 611 y="-4238.3623"
610 x="6001.5244 6042.5068 6083.4902">285</tspan><tspan 612 x="6001.5244 6042.5068 6083.4902">285</tspan><tspan
611 id="tspan300" 613 id="tspan300"
612 sodipodi:role="line" 614 sodipodi:role="line"
613 y="-4127.7964" 615 y="-4127.7964"
614 x="6022.0156 6062.9985">22</tspan><tspan 616 x="6022.0156 6062.9985">22</tspan><tspan
615 id="tspan302" 617 id="tspan302"
616 sodipodi:role="line" 618 sodipodi:role="line"
617 y="-4238.3623" 619 y="-4238.3623"
618 x="6370.0747 6411.0571 6452.04">286</tspan><tspan 620 x="6370.0747 6411.0571 6452.04">286</tspan><tspan
619 id="tspan304" 621 id="tspan304"
620 sodipodi:role="line" 622 sodipodi:role="line"
621 y="-4127.7964" 623 y="-4127.7964"
622 x="6390.5664 6431.5493">23</tspan><tspan 624 x="6390.5664 6431.5493">23</tspan><tspan
623 id="tspan306" 625 id="tspan306"
624 sodipodi:role="line" 626 sodipodi:role="line"
625 y="-4459.4922" 627 y="-4459.4922"
626 x="3540.4146 3581.3972 3618.2522 3638.7437 3659.2354 3679.7266 3696.0901 3737.073 3753.4365">1st field</tspan><tspan 628 x="3540.4146 3581.3972 3618.2522 3638.7437 3659.2354 3679.7266 3696.0901 3737.073 3753.4365">1st field</tspan><tspan
627 id="tspan308" 629 id="tspan308"
628 sodipodi:role="line" 630 sodipodi:role="line"
629 y="-3648.6809" 631 y="-3648.6809"
630 x="3528.1047 3569.0876 3610.0703 3651.0532 3671.5447 3692.0361 3708.3999 3749.3826 3765.7463">2nd field</tspan></text> 632 x="3528.1047 3569.0876 3610.0703 3651.0532 3671.5447 3692.0361 3708.3999 3749.3826 3765.7463">2nd field</tspan></text>
631<text 633<text
632 y="-4127.7959" 634 y="-4127.7959"
633 x="4199.7334 3831.1829 2725.5305 3112.509 3462.6321 4568.2842 4916.3442 4957.3271 5653.4458 5694.4287 5284.895 5325.8779 2356.9773 1988.4264 1210.3424 1251.3252 1292.3081 1619.8759 841.79163 882.77454 923.75732" 635 x="4199.7334 3831.1829 2725.5305 3112.509 3462.6321 4568.2842 4916.3442 4957.3271 5653.4458 5694.4287 5284.895 5325.8779 2356.9773 1988.4264 1210.3424 1251.3252 1292.3081 1619.8759 841.79163 882.77454 923.75732"
634 id="text3632" 636 id="text3632"
635 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 637 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
636 transform="scale(1,-1)"><tspan 638 transform="scale(1,-1)"><tspan
637 id="tspan3634" 639 id="tspan3634"
638 sodipodi:role="line" 640 sodipodi:role="line"
639 y="-4127.7959" 641 y="-4127.7959"
640 x="4199.7334 3831.1829 2725.5305 3112.509 3462.6321 4568.2842 4916.3442 4957.3271 5653.4458 5694.4287 5284.895 5325.8779 2356.9773 1988.4264 1210.3424 1251.3252 1292.3081 1619.8759 841.79163 882.77454 923.75732">874569101211322631262</tspan></text> 642 x="4199.7334 3831.1829 2725.5305 3112.509 3462.6321 4568.2842 4916.3442 4957.3271 5653.4458 5694.4287 5284.895 5325.8779 2356.9773 1988.4264 1210.3424 1251.3252 1292.3081 1619.8759 841.79163 882.77454 923.75732">874569101211322631262</tspan></text>
641<text 643<text
642 y="-4238.3613" 644 y="-4238.3613"
643 x="4158.748 4199.7314 4240.7144 3790.1975 3831.1807 3872.1633 2684.5457 2725.5283 2766.5112 3071.5237 3112.5063 3153.4895 3421.647 3462.6299 3503.6125 4527.2988 4568.2822 4609.2646 4895.8496 4936.833 4977.8154 5632.9517 5673.9341 5714.917 5264.4009 5305.3833 5346.3662 2315.9946 2356.9775 2397.9604 1947.444 1988.4269 2029.4097 1210.3424 1251.3252 1292.3081 1578.8931 1619.876 1660.8589 841.79163 882.77454 923.75732" 645 x="4158.748 4199.7314 4240.7144 3790.1975 3831.1807 3872.1633 2684.5457 2725.5283 2766.5112 3071.5237 3112.5063 3153.4895 3421.647 3462.6299 3503.6125 4527.2988 4568.2822 4609.2646 4895.8496 4936.833 4977.8154 5632.9517 5673.9341 5714.917 5264.4009 5305.3833 5346.3662 2315.9946 2356.9775 2397.9604 1947.444 1988.4269 2029.4097 1210.3424 1251.3252 1292.3081 1578.8931 1619.876 1660.8589 841.79163 882.77454 923.75732"
644 id="text3636" 646 id="text3636"
645 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 647 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
646 transform="scale(1,-1)"><tspan 648 transform="scale(1,-1)"><tspan
647 id="tspan3638" 649 id="tspan3638"
648 sodipodi:role="line" 650 sodipodi:role="line"
649 y="-4238.3613" 651 y="-4238.3613"
650 x="4158.748 4199.7314 4240.7144 3790.1975 3831.1807 3872.1633 2684.5457 2725.5283 2766.5112 3071.5237 3112.5063 3153.4895 3421.647 3462.6299 3503.6125 4527.2988 4568.2822 4609.2646 4895.8496 4936.833 4977.8154 5632.9517 5673.9341 5714.917 5264.4009 5305.3833 5346.3662 2315.9946 2356.9775 2397.9604 1947.444 1988.4269 2029.4097 1210.3424 1251.3252 1292.3081 1578.8931 1619.876 1660.8589 841.79163 882.77454 923.75732">271270267268269272273275274266265263264262</tspan></text> 652 x="4158.748 4199.7314 4240.7144 3790.1975 3831.1807 3872.1633 2684.5457 2725.5283 2766.5112 3071.5237 3112.5063 3153.4895 3421.647 3462.6299 3503.6125 4527.2988 4568.2822 4609.2646 4895.8496 4936.833 4977.8154 5632.9517 5673.9341 5714.917 5264.4009 5305.3833 5346.3662 2315.9946 2356.9775 2397.9604 1947.444 1988.4269 2029.4097 1210.3424 1251.3252 1292.3081 1578.8931 1619.876 1660.8589 841.79163 882.77454 923.75732">271270267268269272273275274266265263264262</tspan></text>
651<text 653<text
652 y="-5049.1729" 654 y="-5049.1729"
653 x="2725.5347 4568.2881 1988.4331 2356.9839 1619.8822 3094.0852 3462.636 4916.3506 4957.334 5284.9019 5325.8843 5653.4526 5694.4351 3812.7656 4181.3164" 655 x="2725.5347 4568.2881 1988.4331 2356.9839 1619.8822 3094.0852 3462.636 4916.3506 4957.334 5284.9019 5325.8843 5653.4526 5694.4351 3812.7656 4181.3164"
654 id="text3640" 656 id="text3640"
655 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 657 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
656 transform="scale(1,-1)"><tspan 658 transform="scale(1,-1)"><tspan
657 id="tspan3642" 659 id="tspan3642"
658 sodipodi:role="line" 660 sodipodi:role="line"
659 y="-5049.1729" 661 y="-5049.1729"
660 x="2725.5347 4568.2881 1988.4331 2356.9839 1619.8822 3094.0852 3462.636 4916.3506 4957.334 5284.9019 5325.8843 5653.4526 5694.4351 3812.7656 4181.3164">492315610111278</tspan></text> 662 x="2725.5347 4568.2881 1988.4331 2356.9839 1619.8822 3094.0852 3462.636 4916.3506 4957.334 5284.9019 5325.8843 5653.4526 5694.4351 3812.7656 4181.3164">492315610111278</tspan></text>
661<text 663<text
662 y="-4938.6074" 664 y="-4938.6074"
663 x="2725.5474 4568.3013 1988.446 2356.9966 1619.8953 3094.0981 3462.6489 4916.3638 4957.3472 5284.9146 5325.8975 5653.4653 5694.4482 3812.7788 4181.3296" 665 x="2725.5474 4568.3013 1988.446 2356.9966 1619.8953 3094.0981 3462.6489 4916.3638 4957.3472 5284.9146 5325.8975 5653.4653 5694.4482 3812.7788 4181.3296"
664 id="text3644" 666 id="text3644"
665 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 667 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
666 transform="scale(1,-1)"><tspan 668 transform="scale(1,-1)"><tspan
667 id="tspan3646" 669 id="tspan3646"
668 sodipodi:role="line" 670 sodipodi:role="line"
669 y="-4938.6074" 671 y="-4938.6074"
670 x="2725.5474 4568.3013 1988.446 2356.9966 1619.8953 3094.0981 3462.6489 4916.3638 4957.3472 5284.9146 5325.8975 5653.4653 5694.4482 3812.7788 4181.3296">492315610111278</tspan></text> 672 x="2725.5474 4568.3013 1988.446 2356.9966 1619.8953 3094.0981 3462.6489 4916.3638 4957.3472 5284.9146 5325.8975 5653.4653 5694.4482 3812.7788 4181.3296">492315610111278</tspan></text>
671<text 673<text
672 y="-5049.1729" 674 y="-5049.1729"
673 x="841.81781 882.8006 923.78326" 675 x="841.81781 882.8006 923.78326"
674 id="text3648" 676 id="text3648"
675 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 677 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
676 transform="scale(1,-1)"><tspan 678 transform="scale(1,-1)"><tspan
677 id="tspan3650" 679 id="tspan3650"
678 sodipodi:role="line" 680 sodipodi:role="line"
679 y="-5049.1729" 681 y="-5049.1729"
680 x="841.81781 882.8006 923.78326">524</tspan></text> 682 x="841.81781 882.8006 923.78326">524</tspan></text>
681<text 683<text
682 y="-4938.6074" 684 y="-4938.6074"
683 x="841.81781 882.8006 923.78326" 685 x="841.81781 882.8006 923.78326"
684 id="text3652" 686 id="text3652"
685 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 687 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
686 transform="scale(1,-1)"><tspan 688 transform="scale(1,-1)"><tspan
687 id="tspan3654" 689 id="tspan3654"
688 sodipodi:role="line" 690 sodipodi:role="line"
689 y="-4938.6074" 691 y="-4938.6074"
690 x="841.81781 882.8006 923.78326">261</tspan></text> 692 x="841.81781 882.8006 923.78326">261</tspan></text>
691<text 693<text
692 y="-5049.1729" 694 y="-5049.1729"
693 x="1210.3684 1251.3512 1292.3342" 695 x="1210.3684 1251.3512 1292.3342"
694 id="text3656" 696 id="text3656"
695 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 697 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
696 transform="scale(1,-1)"><tspan 698 transform="scale(1,-1)"><tspan
697 id="tspan3658" 699 id="tspan3658"
698 sodipodi:role="line" 700 sodipodi:role="line"
699 y="-5049.1729" 701 y="-5049.1729"
700 x="1210.3684 1251.3512 1292.3342">525</tspan></text> 702 x="1210.3684 1251.3512 1292.3342">525</tspan></text>
701<text 703<text
702 y="-4938.6074" 704 y="-4938.6074"
703 x="1210.3684 1251.3512 1292.3342" 705 x="1210.3684 1251.3512 1292.3342"
704 id="text3660" 706 id="text3660"
705 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 707 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
706 transform="scale(1,-1)"><tspan 708 transform="scale(1,-1)"><tspan
707 id="tspan3662" 709 id="tspan3662"
708 sodipodi:role="line" 710 sodipodi:role="line"
709 y="-4938.6074" 711 y="-4938.6074"
710 x="1210.3684 1251.3512 1292.3342">262</tspan></text> 712 x="1210.3684 1251.3512 1292.3342">262</tspan></text>
711<text 713<text
712 y="-5049.1729" 714 y="-5049.1729"
713 x="6022.0161 6062.999" 715 x="6022.0161 6062.999"
714 id="text3664" 716 id="text3664"
715 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 717 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
716 transform="scale(1,-1)"><tspan 718 transform="scale(1,-1)"><tspan
717 id="tspan3666" 719 id="tspan3666"
718 sodipodi:role="line" 720 sodipodi:role="line"
719 y="-5049.1729" 721 y="-5049.1729"
720 x="6022.0161 6062.999">22</tspan></text> 722 x="6022.0161 6062.999">22</tspan></text>
721<text 723<text
722 y="-4938.6074" 724 y="-4938.6074"
723 x="6022.0161 6062.999" 725 x="6022.0161 6062.999"
724 id="text3668" 726 id="text3668"
725 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 727 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
726 transform="scale(1,-1)"><tspan 728 transform="scale(1,-1)"><tspan
727 id="tspan3670" 729 id="tspan3670"
728 sodipodi:role="line" 730 sodipodi:role="line"
729 y="-4938.6074" 731 y="-4938.6074"
730 x="6022.0161 6062.999">22</tspan></text> 732 x="6022.0161 6062.999">22</tspan></text>
731<text 733<text
732 y="-5049.1729" 734 y="-5049.1729"
733 x="6390.5669 6431.5498" 735 x="6390.5669 6431.5498"
734 id="text3672" 736 id="text3672"
735 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 737 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
736 transform="scale(1,-1)"><tspan 738 transform="scale(1,-1)"><tspan
737 id="tspan3674" 739 id="tspan3674"
738 sodipodi:role="line" 740 sodipodi:role="line"
739 y="-5049.1729" 741 y="-5049.1729"
740 x="6390.5669 6431.5498">23</tspan></text> 742 x="6390.5669 6431.5498">23</tspan></text>
741<text 743<text
742 y="-4938.6074" 744 y="-4938.6074"
743 x="6390.5669 6431.5498" 745 x="6390.5669 6431.5498"
744 id="text3676" 746 id="text3676"
745 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 747 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
746 transform="scale(1,-1)"><tspan 748 transform="scale(1,-1)"><tspan
747 id="tspan3678" 749 id="tspan3678"
748 sodipodi:role="line" 750 sodipodi:role="line"
749 y="-4938.6074" 751 y="-4938.6074"
750 x="6390.5669 6431.5498">23</tspan></text> 752 x="6390.5669 6431.5498">23</tspan></text>
751<text 753<text
752 y="-4238.3623" 754 y="-4238.3623"
753 x="6001.5244 6042.5068 6083.4902" 755 x="6001.5244 6042.5068 6083.4902"
754 id="text3680" 756 id="text3680"
755 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 757 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
756 transform="scale(1,-1)"><tspan 758 transform="scale(1,-1)"><tspan
757 id="tspan3682" 759 id="tspan3682"
758 sodipodi:role="line" 760 sodipodi:role="line"
759 y="-4238.3623" 761 y="-4238.3623"
760 x="6001.5244 6042.5068 6083.4902">285</tspan></text> 762 x="6001.5244 6042.5068 6083.4902">285</tspan></text>
761<text 763<text
762 y="-4127.7964" 764 y="-4127.7964"
763 x="6022.0156 6062.9985" 765 x="6022.0156 6062.9985"
764 id="text3684" 766 id="text3684"
765 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 767 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
766 transform="scale(1,-1)"><tspan 768 transform="scale(1,-1)"><tspan
767 id="tspan3686" 769 id="tspan3686"
768 sodipodi:role="line" 770 sodipodi:role="line"
769 y="-4127.7964" 771 y="-4127.7964"
770 x="6022.0156 6062.9985">22</tspan></text> 772 x="6022.0156 6062.9985">22</tspan></text>
771<text 773<text
772 y="-4238.3623" 774 y="-4238.3623"
773 x="6370.0747 6411.0571 6452.04" 775 x="6370.0747 6411.0571 6452.04"
774 id="text3688" 776 id="text3688"
775 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 777 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
776 transform="scale(1,-1)"><tspan 778 transform="scale(1,-1)"><tspan
777 id="tspan3690" 779 id="tspan3690"
778 sodipodi:role="line" 780 sodipodi:role="line"
779 y="-4238.3623" 781 y="-4238.3623"
780 x="6370.0747 6411.0571 6452.04">286</tspan></text> 782 x="6370.0747 6411.0571 6452.04">286</tspan></text>
781<text 783<text
782 y="-4127.7964" 784 y="-4127.7964"
783 x="6390.5664 6431.5493" 785 x="6390.5664 6431.5493"
784 id="text3692" 786 id="text3692"
785 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 787 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
786 transform="scale(1,-1)"><tspan 788 transform="scale(1,-1)"><tspan
787 id="tspan3694" 789 id="tspan3694"
788 sodipodi:role="line" 790 sodipodi:role="line"
789 y="-4127.7964" 791 y="-4127.7964"
790 x="6390.5664 6431.5493">23</tspan></text> 792 x="6390.5664 6431.5493">23</tspan></text>
791<text 793<text
792 y="-4459.4922" 794 y="-4459.4922"
793 x="3540.4146 3581.3972 3618.2522 3638.7437 3659.2354 3679.7266 3696.0901 3737.073 3753.4365" 795 x="3540.4146 3581.3972 3618.2522 3638.7437 3659.2354 3679.7266 3696.0901 3737.073 3753.4365"
794 id="text3696" 796 id="text3696"
795 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 797 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
796 transform="scale(1,-1)"><tspan 798 transform="scale(1,-1)"><tspan
797 id="tspan3698" 799 id="tspan3698"
798 sodipodi:role="line" 800 sodipodi:role="line"
799 y="-4459.4922" 801 y="-4459.4922"
800 x="3540.4146 3581.3972 3618.2522 3638.7437 3659.2354 3679.7266 3696.0901 3737.073 3753.4365">1st field</tspan></text> 802 x="3540.4146 3581.3972 3618.2522 3638.7437 3659.2354 3679.7266 3696.0901 3737.073 3753.4365">1st field</tspan></text>
801<text 803<text
802 y="-3648.6809" 804 y="-3648.6809"
803 x="3528.1047 3569.0876 3610.0703 3651.0532 3671.5447 3692.0361 3708.3999 3749.3826 3765.7463" 805 x="3528.1047 3569.0876 3610.0703 3651.0532 3671.5447 3692.0361 3708.3999 3749.3826 3765.7463"
804 id="text3700" 806 id="text3700"
805 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 807 style="font-variant:normal;font-weight:normal;font-size:73.71015167px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
806 transform="scale(1,-1)"><tspan 808 transform="scale(1,-1)"><tspan
807 id="tspan3702" 809 id="tspan3702"
808 sodipodi:role="line" 810 sodipodi:role="line"
809 y="-3648.6809" 811 y="-3648.6809"
810 x="3528.1047 3569.0876 3610.0703 3651.0532 3671.5447 3692.0361 3708.3999 3749.3826 3765.7463">2nd field</tspan></text> 812 x="3528.1047 3569.0876 3610.0703 3651.0532 3671.5447 3692.0361 3708.3999 3749.3826 3765.7463">2nd field</tspan></text>
811</g></svg> \ No newline at end of file 813</g></svg> \ No newline at end of file
diff --git a/Documentation/media/uapi/v4l/vbi_625.svg b/Documentation/media/uapi/v4l/vbi_625.svg
index c117ddb7bf7e..9b18243c0a06 100644
--- a/Documentation/media/uapi/v4l/vbi_625.svg
+++ b/Documentation/media/uapi/v4l/vbi_625.svg
@@ -42,19 +42,21 @@
42 inkscape:current-layer="g10" 42 inkscape:current-layer="g10"
43 units="mm" /><metadata 43 units="mm" /><metadata
44 id="metadata8"><rdf:RDF><cc:Work 44 id="metadata8"><rdf:RDF><cc:Work
45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs 46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
47 id="defs6"><clipPath 47 id="defs6"><clipPath
48 clipPathUnits="userSpaceOnUse" 48 clipPathUnits="userSpaceOnUse"
49 id="clipPath20"><path 49 id="clipPath20"><path
50 d="m 0,0 5950,0 0,4546 L 0,4546 0,0 Z m 0,4546 5950,0 0,1 -5950,0 0,-1 z m 0,1 2211,0 0,1 -2211,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2215,0 0,1 -2215,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2219,0 0,1 -2219,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2223,0 0,1 -2223,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2227,0 0,1 -2227,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2231,0 0,1 -2231,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2235,0 0,1 -2235,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2239,0 0,1 -2239,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2241,0 0,1 -2241,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2240,0 0,1 -2240,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2236,0 0,1 -2236,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2232,0 0,1 -2232,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2228,0 0,1 -2228,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2224,0 0,1 -2224,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2220,0 0,1 -2220,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2216,0 0,1 -2216,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2212,0 0,1 -2212,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2208,0 0,1 -2208,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 5950,0 0,1 -5950,0 0,-1 z m 0,1 5950,0 0,3854 -5950,0 0,-3854 z" 50 d="m 0,0 5950,0 0,4546 L 0,4546 0,0 Z m 0,4546 5950,0 0,1 -5950,0 0,-1 z m 0,1 2211,0 0,1 -2211,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2215,0 0,1 -2215,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2219,0 0,1 -2219,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2223,0 0,1 -2223,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2227,0 0,1 -2227,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2231,0 0,1 -2231,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2235,0 0,1 -2235,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2239,0 0,1 -2239,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2241,0 0,1 -2241,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2240,0 0,1 -2240,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2236,0 0,1 -2236,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2232,0 0,1 -2232,0 0,-1 z m
51 id="path22" 512250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2228,0 0,1 -2228,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2224,0 0,1 -2224,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2220,0 0,1 -2220,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2216,0 0,1 -2216,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2212,0 0,1 -2212,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2208,0 0,1 -2208,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 5950,0 0,1 -5950,0 0,-1 z m 0,1 5950,0 0,3854 -5950,0 0,-3854 z"
52 inkscape:connector-curvature="0" /></clipPath><clipPath 52 id="path22"
53 inkscape:connector-curvature="0" /></clipPath><clipPath
53 clipPathUnits="userSpaceOnUse" 54 clipPathUnits="userSpaceOnUse"
54 id="clipPath98"><path 55 id="clipPath98"><path
55 d="m 0,0 5950,0 0,3922 L 0,3922 0,0 Z m 0,3922 5950,0 0,1 -5950,0 0,-1 z m 0,1 2209,0 0,1 -2209,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2213,0 0,1 -2213,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2217,0 0,1 -2217,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2221,0 0,1 -2221,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2225,0 0,1 -2225,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2229,0 0,1 -2229,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2233,0 0,1 -2233,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2237,0 0,1 -2237,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2241,0 0,1 -2241,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2241,0 0,1 -2241,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2237,0 0,1 -2237,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2233,0 0,1 -2233,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2229,0 0,1 -2229,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2225,0 0,1 -2225,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2221,0 0,1 -2221,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2217,0 0,1 -2217,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2213,0 0,1 -2213,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2209,0 0,1 -2209,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 5950,0 0,1 -5950,0 0,-1 z m 0,1 5950,0 0,4478 -5950,0 0,-4478 z" 56 d="m 0,0 5950,0 0,3922 L 0,3922 0,0 Z m 0,3922 5950,0 0,1 -5950,0 0,-1 z m 0,1 2209,0 0,1 -2209,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2213,0 0,1 -2213,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2217,0 0,1 -2217,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2221,0 0,1 -2221,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2225,0 0,1 -2225,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2229,0 0,1 -2229,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2233,0 0,1 -2233,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2237,0 0,1 -2237,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2241,0 0,1 -2241,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2241,0 0,1 -2241,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2237,0 0,1 -2237,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2233,0 0,1 -2233,0 0,-1 z m
56 id="path100" 572250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2229,0 0,1 -2229,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2225,0 0,1 -2225,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2221,0 0,1 -2221,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2217,0 0,1 -2217,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2213,0 0,1 -2213,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 2209,0 0,1 -2209,0 0,-1 z m 2250,0 3700,0 0,1 -3700,0 0,-1 z m -2250,1 5950,0 0,1 -5950,0 0,-1 z m 0,1 5950,0 0,4478 -5950,0 0,-4478 z"
57 inkscape:connector-curvature="0" /></clipPath></defs><g 58 id="path100"
59 inkscape:connector-curvature="0" /></clipPath></defs><g
58 id="g10" 60 id="g10"
59 inkscape:groupmode="layer" 61 inkscape:groupmode="layer"
60 inkscape:label="vbi_625" 62 inkscape:label="vbi_625"
@@ -62,20 +64,20 @@
62 id="g12" 64 id="g12"
63 transform="matrix(1.3045828,0,0,1.3045828,-213.38312,-1110.9872)" 65 transform="matrix(1.3045828,0,0,1.3045828,-213.38312,-1110.9872)"
64 style=""><path 66 style=""><path
65 d="m 2132.25,4598.15 0,-85.05" 67 d="m 2132.25,4598.15 0,-85.05"
66 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 68 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
67 id="path14" 69 id="path14"
68 inkscape:connector-curvature="0" /></g><g 70 inkscape:connector-curvature="0" /></g><g
69 id="g16" 71 id="g16"
70 transform="matrix(1.3045828,0,0,1.3045828,-213.38312,-1110.9872)" 72 transform="matrix(1.3045828,0,0,1.3045828,-213.38312,-1110.9872)"
71 style=""><g 73 style=""><g
72 id="g18" 74 id="g18"
73 clip-path="url(#clipPath20)" 75 clip-path="url(#clipPath20)"
74 style=""><path 76 style=""><path
75 d="m 2132.25,4555.63 113.4,0" 77 d="m 2132.25,4555.63 113.4,0"
76 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 78 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
77 id="path24" 79 id="path24"
78 inkscape:connector-curvature="0" /></g></g><path 80 inkscape:connector-curvature="0" /></g></g><path
79 inkscape:connector-curvature="0" 81 inkscape:connector-curvature="0"
80 id="path28" 82 id="path28"
81 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 83 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
@@ -211,13 +213,13 @@
211 id="g94" 213 id="g94"
212 transform="matrix(1.3045828,0,0,1.3045828,-213.38312,-1110.9872)" 214 transform="matrix(1.3045828,0,0,1.3045828,-213.38312,-1110.9872)"
213 style=""><g 215 style=""><g
214 id="g96" 216 id="g96"
215 clip-path="url(#clipPath98)" 217 clip-path="url(#clipPath98)"
216 style=""><path 218 style=""><path
217 d="m 2132.25,3931.93 113.4,0" 219 d="m 2132.25,3931.93 113.4,0"
218 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 220 style="fill:none;stroke:#000000;stroke-width:2.36249995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
219 id="path102" 221 id="path102"
220 inkscape:connector-curvature="0" /></g></g><path 222 inkscape:connector-curvature="0" /></g></g><path
221 inkscape:connector-curvature="0" 223 inkscape:connector-curvature="0"
222 id="path106" 224 id="path106"
223 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 225 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
@@ -385,7 +387,8 @@
385 inkscape:connector-curvature="0" 387 inkscape:connector-curvature="0"
386 id="path188" 388 id="path188"
387 style="fill:none;stroke:#000000;stroke-width:3.08207679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 389 style="fill:none;stroke:#000000;stroke-width:3.08207679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
388 d="m 1162.8865,4739.7407 18.486,0 0,92.4688 18.499,-18.499 18.4859,36.9849 18.499,-36.9849 18.4859,36.9849 18.499,-55.4708 18.4859,55.4708 18.499,-18.4859 18.486,55.4708 18.499,-55.4708 18.4859,18.4859 18.499,36.9849 18.4859,-73.9698 18.499,36.9849 18.4859,-55.4708 0,-55.4839 18.499,0 0,-110.9548 36.985,0 0,110.9548 18.4859,0 0,55.4839 18.499,36.9849 18.4859,-36.9849 18.499,55.4708 18.4859,-18.4859 18.499,55.4708 18.486,-18.4859 0,-129.4537 18.4989,0 0,-110.9548 18.486,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 147.9397,0 0,110.9548 36.9849,0 0,-110.9548 147.9397,0 0,110.9548 36.985,0 0,-110.9548 147.9397,0 0,110.9548 36.9849,0 0,-110.9548 147.9397,0 0,110.9548 36.9849,0 0,-110.9548 147.9397,0 0,110.9548 36.9849,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.486,0 0,110.9548 166.4386,0 0,-110.9548 18.486,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 36.9849,0 0,110.9548 332.8643,0 0,-110.9548 36.9849,0 0,110.9548 18.486,0" /><path 390 d="m 1162.8865,4739.7407 18.486,0 0,92.4688 18.499,-18.499 18.4859,36.9849 18.499,-36.9849 18.4859,36.9849 18.499,-55.4708 18.4859,55.4708 18.499,-18.4859 18.486,55.4708 18.499,-55.4708 18.4859,18.4859 18.499,36.9849 18.4859,-73.9698 18.499,36.9849 18.4859,-55.4708 0,-55.4839 18.499,0 0,-110.9548 36.985,0 0,110.9548 18.4859,0 0,55.4839 18.499,36.9849 18.4859,-36.9849 18.499,55.4708 18.4859,-18.4859 18.499,55.4708 18.486,-18.4859 0,-129.4537 18.4989,0 0,-110.9548 18.486,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 147.9397,0 0,110.9548 36.9849,0 0,-110.9548 147.9397,0 0,110.9548 36.985,0 0,-110.9548 147.9397,0 0,110.9548 36.9849,0 0,-110.9548 147.9397,0 0,110.9548 36.9849,0 0,-110.9548 147.9397,0 0,110.9548 36.9849,0
3910,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.486,0 0,110.9548 166.4386,0 0,-110.9548 18.486,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 18.4859,0 0,110.9548 166.4387,0 0,-110.9548 36.9849,0 0,110.9548 332.8643,0 0,-110.9548 36.9849,0 0,110.9548 18.486,0" /><path
389 inkscape:connector-curvature="0" 392 inkscape:connector-curvature="0"
390 id="path190" 393 id="path190"
391 style="fill:none;stroke:#000000;stroke-width:3.08207679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 394 style="fill:none;stroke:#000000;stroke-width:3.08207679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
@@ -409,7 +412,8 @@
409 inkscape:connector-curvature="0" 412 inkscape:connector-curvature="0"
410 id="path200" 413 id="path200"
411 style="fill:none;stroke:#000000;stroke-width:3.08207679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 414 style="fill:none;stroke:#000000;stroke-width:3.08207679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
412 d="m 1162.8865,3926.0723 18.486,0 0,55.4839 18.499,92.4558 18.4859,-55.4708 36.9849,36.9849 18.499,-55.4839 18.4859,18.499 18.499,-36.985 18.486,55.4709 18.499,-18.4859 18.4859,-36.985 18.499,18.486 18.4859,36.9849 18.499,-36.9849 18.4859,36.9849 0,-110.9548 18.499,0 0,-110.9547 18.486,0 0,110.9547 166.4386,0 0,-110.9547 18.486,0 0,110.9547 166.4387,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 147.9397,0 0,110.9547 36.9849,0 0,-110.9547 147.9397,0 0,110.9547 36.9849,0 0,-110.9547 147.9397,0 0,110.9547 36.985,0 0,-110.9547 147.9397,0 0,110.9547 36.9849,0 0,-110.9547 147.9397,0 0,110.9547 36.9849,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 18.486,0 0,110.9547 166.4386,0 0,-110.9547 18.486,0 0,110.9547 166.4387,0 0,-110.9547 18.4859,0 0,110.9547 351.3633,0 0,-110.9547 36.9849,0 0,110.9547 18.486,0" /><path 415 d="m 1162.8865,3926.0723 18.486,0 0,55.4839 18.499,92.4558 18.4859,-55.4708 36.9849,36.9849 18.499,-55.4839 18.4859,18.499 18.499,-36.985 18.486,55.4709 18.499,-18.4859 18.4859,-36.985 18.499,18.486 18.4859,36.9849 18.499,-36.9849 18.4859,36.9849 0,-110.9548 18.499,0 0,-110.9547 18.486,0 0,110.9547 166.4386,0 0,-110.9547 18.486,0 0,110.9547 166.4387,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 147.9397,0 0,110.9547 36.9849,0 0,-110.9547 147.9397,0 0,110.9547 36.9849,0 0,-110.9547 147.9397,0 0,110.9547 36.985,0 0,-110.9547 147.9397,0 0,110.9547 36.9849,0 0,-110.9547 147.9397,0 0,110.9547 36.9849,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 18.4859,0 0,110.9547 166.4387,0 0,-110.9547 18.486,0 0,110.9547 166.4386,0 0,-110.9547 18.486,0 0,110.9547 166.4387,0 0,-110.9547
41618.4859,0 0,110.9547 351.3633,0 0,-110.9547 36.9849,0 0,110.9547 18.486,0" /><path
413 inkscape:connector-curvature="0" 417 inkscape:connector-curvature="0"
414 id="path202" 418 id="path202"
415 style="fill:none;stroke:#000000;stroke-width:3.08207679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 419 style="fill:none;stroke:#000000;stroke-width:3.08207679;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
@@ -559,300 +563,300 @@
559 id="text276" 563 id="text276"
560 x="3550.4165" 564 x="3550.4165"
561 y="-4462.3472"><tspan 565 y="-4462.3472"><tspan
562 x="3550.4165 3591.5437 3628.5286 3649.0923 3669.656 3690.2195 3706.6409 3747.7681 3764.1895" 566 x="3550.4165 3591.5437 3628.5286 3649.0923 3669.656 3690.2195 3706.6409 3747.7681 3764.1895"
563 y="-4462.3472" 567 y="-4462.3472"
564 sodipodi:role="line" 568 sodipodi:role="line"
565 id="tspan278">1st field</tspan><tspan 569 id="tspan278">1st field</tspan><tspan
566 x="2732.6792 3823.7344 4193.5835 4581.9253 4951.7744 5321.6235 3472.3777 3102.5283 2321.7029 2362.8303 2403.9575 1951.8538 1992.981 2034.1083 1582.0045 1623.132 1664.259 5670.9062 5712.0337" 570 x="2732.6792 3823.7344 4193.5835 4581.9253 4951.7744 5321.6235 3472.3777 3102.5283 2321.7029 2362.8303 2403.9575 1951.8538 1992.981 2034.1083 1582.0045 1623.132 1664.259 5670.9062 5712.0337"
567 y="-4943.1509" 571 y="-4943.1509"
568 sodipodi:role="line" 572 sodipodi:role="line"
569 id="tspan280">1456783231231131022</tspan><tspan 573 id="tspan280">1456783231231131022</tspan><tspan
570 x="2732.6726 3823.7278 4193.5771 4581.9189 4951.7681 5321.6172 3472.3711 3102.522 2321.6965 2362.8237 2403.9509 1951.8473 1992.9745 2034.1018 1581.998 1623.1254 1664.2524 5670.8999 5712.0269" 574 x="2732.6726 3823.7278 4193.5771 4581.9189 4951.7681 5321.6172 3472.3711 3102.522 2321.6965 2362.8237 2403.9509 1951.8473 1992.9745 2034.1018 1581.998 1623.1254 1664.2524 5670.8999 5712.0269"
571 y="-5054.1064" 575 y="-5054.1064"
572 sodipodi:role="line" 576 sodipodi:role="line"
573 id="tspan282">1456783262562462322</tspan><tspan 577 id="tspan282">1456783262562462322</tspan><tspan
574 x="842.29962 883.42694 924.55408" 578 x="842.29962 883.42694 924.55408"
575 y="-4943.1509" 579 y="-4943.1509"
576 sodipodi:role="line" 580 sodipodi:role="line"
577 id="tspan284">308</tspan><tspan 581 id="tspan284">308</tspan><tspan
578 x="842.29962 883.42694 924.55408" 582 x="842.29962 883.42694 924.55408"
579 y="-5054.1064" 583 y="-5054.1064"
580 sodipodi:role="line" 584 sodipodi:role="line"
581 id="tspan286">621</tspan><tspan 585 id="tspan286">621</tspan><tspan
582 x="1212.1489 1253.276 1294.4033" 586 x="1212.1489 1253.276 1294.4033"
583 y="-4943.1509" 587 y="-4943.1509"
584 sodipodi:role="line" 588 sodipodi:role="line"
585 id="tspan288">309</tspan><tspan 589 id="tspan288">309</tspan><tspan
586 x="1212.1489 1253.276 1294.4033" 590 x="1212.1489 1253.276 1294.4033"
587 y="-5054.1064" 591 y="-5054.1064"
588 sodipodi:role="line" 592 sodipodi:role="line"
589 id="tspan290">622</tspan><tspan 593 id="tspan290">622</tspan><tspan
590 x="3538.0635 3579.1907 3620.3179 3661.4451 3682.0088 3702.5723 3718.9937 3760.1208 3776.5422" 594 x="3538.0635 3579.1907 3620.3179 3661.4451 3682.0088 3702.5723 3718.9937 3760.1208 3776.5422"
591 y="-3648.6792" 595 y="-3648.6792"
592 sodipodi:role="line" 596 sodipodi:role="line"
593 id="tspan292">2nd field</tspan></text> 597 id="tspan292">2nd field</tspan></text>
594<text 598<text
595 transform="scale(1,-1)" 599 transform="scale(1,-1)"
596 style="font-variant:normal;font-weight:normal;font-size:61.64153671px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 600 style="font-variant:normal;font-weight:normal;font-size:61.64153671px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
597 id="text294" 601 id="text294"
598 x="2734.751" 602 x="2734.751"
599 y="-4037.021"><tspan 603 y="-4037.021"><tspan
600 x="2734.751 2755.2776 2789.5503" 604 x="2734.751 2755.2776 2789.5503"
601 y="-4037.021" 605 y="-4037.021"
602 sodipodi:role="line" 606 sodipodi:role="line"
603 id="tspan296">(1)</tspan></text> 607 id="tspan296">(1)</tspan></text>
604<text 608<text
605 transform="scale(1,-1)" 609 transform="scale(1,-1)"
606 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 610 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
607 id="text298" 611 id="text298"
608 x="4951.772" 612 x="4951.772"
609 y="-4129.4834"><tspan 613 y="-4129.4834"><tspan
610 x="4951.772 4581.9229 4212.0737 3842.2244 3490.8677 3102.5259 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563" 614 x="4951.772 4581.9229 4212.0737 3842.2244 3490.8677 3102.5259 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563"
611 y="-4129.4834" 615 y="-4129.4834"
612 sodipodi:role="line" 616 sodipodi:role="line"
613 id="tspan300">765432313312311</tspan><tspan 617 id="tspan300">765432313312311</tspan><tspan
614 x="6020.1929 6061.3198 6102.4473 5650.3433 5691.4707 5732.5981 5280.4941 5321.6216 5362.7485 4910.645 4951.7725 4992.8994 4540.7959 4581.9229 4623.0503 4170.9468 4212.0737 4253.2012 3801.0974 3842.2246 3883.3518 3449.7405 3490.8677 3531.9951 3061.3989 3102.5261 3143.6533 2691.5496 2732.677 2773.8042 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563" 618 x="6020.1929 6061.3198 6102.4473 5650.3433 5691.4707 5732.5981 5280.4941 5321.6216 5362.7485 4910.645 4951.7725 4992.8994 4540.7959 4581.9229 4623.0503 4170.9468 4212.0737 4253.2012 3801.0974 3842.2246 3883.3518 3449.7405 3490.8677 3531.9951 3061.3989 3102.5261 3143.6533 2691.5496 2732.677 2773.8042 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563"
615 y="-4240.4385" 619 y="-4240.4385"
616 sodipodi:role="line" 620 sodipodi:role="line"
617 id="tspan302">336335321320319318317316315314313312311</tspan><tspan 621 id="tspan302">336335321320319318317316315314313312311</tspan><tspan
618 x="2732.6765 5321.6211 5670.9062 5712.0337 6040.7554 6081.8828 842.30634 883.43323 924.56055" 622 x="2732.6765 5321.6211 5670.9062 5712.0337 6040.7554 6081.8828 842.30634 883.43323 924.56055"
619 y="-4129.4834" 623 y="-4129.4834"
620 sodipodi:role="line" 624 sodipodi:role="line"
621 id="tspan304">182223309</tspan><tspan 625 id="tspan304">182223309</tspan><tspan
622 x="842.30634 883.43323 924.56055" 626 x="842.30634 883.43323 924.56055"
623 y="-4240.4385" 627 y="-4240.4385"
624 sodipodi:role="line" 628 sodipodi:role="line"
625 id="tspan306">309</tspan><tspan 629 id="tspan306">309</tspan><tspan
626 x="1212.1553 1253.2826 1294.4099" 630 x="1212.1553 1253.2826 1294.4099"
627 y="-4129.4834" 631 y="-4129.4834"
628 sodipodi:role="line" 632 sodipodi:role="line"
629 id="tspan308">310</tspan><tspan 633 id="tspan308">310</tspan><tspan
630 x="1212.1553 1253.2826 1294.4099" 634 x="1212.1553 1253.2826 1294.4099"
631 y="-4240.4385" 635 y="-4240.4385"
632 sodipodi:role="line" 636 sodipodi:role="line"
633 id="tspan310">310</tspan><tspan 637 id="tspan310">310</tspan><tspan
634 x="6410.605 6451.7319" 638 x="6410.605 6451.7319"
635 y="-4129.4834" 639 y="-4129.4834"
636 sodipodi:role="line" 640 sodipodi:role="line"
637 id="tspan312">24</tspan><tspan 641 id="tspan312">24</tspan><tspan
638 x="6390.041 6431.1685 6472.2954" 642 x="6390.041 6431.1685 6472.2954"
639 y="-4240.4385" 643 y="-4240.4385"
640 sodipodi:role="line" 644 sodipodi:role="line"
641 id="tspan314">337</tspan><tspan 645 id="tspan314">337</tspan><tspan
642 x="6040.7559 6081.8833" 646 x="6040.7559 6081.8833"
643 y="-4943.1504" 647 y="-4943.1504"
644 sodipodi:role="line" 648 sodipodi:role="line"
645 id="tspan316">23</tspan><tspan 649 id="tspan316">23</tspan><tspan
646 x="6040.7559 6081.8833" 650 x="6040.7559 6081.8833"
647 y="-5054.106" 651 y="-5054.106"
648 sodipodi:role="line" 652 sodipodi:role="line"
649 id="tspan318">23</tspan><tspan 653 id="tspan318">23</tspan><tspan
650 x="6410.605 6451.7324" 654 x="6410.605 6451.7324"
651 y="-4943.1504" 655 y="-4943.1504"
652 sodipodi:role="line" 656 sodipodi:role="line"
653 id="tspan320">24</tspan><tspan 657 id="tspan320">24</tspan><tspan
654 x="6410.605 6451.7324" 658 x="6410.605 6451.7324"
655 y="-5054.106" 659 y="-5054.106"
656 sodipodi:role="line" 660 sodipodi:role="line"
657 id="tspan322">24</tspan></text> 661 id="tspan322">24</tspan></text>
658<text 662<text
659 transform="scale(1,-1)" 663 transform="scale(1,-1)"
660 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 664 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
661 id="text3671" 665 id="text3671"
662 x="3550.4165 3591.5437 3628.5286 3649.0923 3669.656 3690.2195 3706.6409 3747.7681 3764.1895" 666 x="3550.4165 3591.5437 3628.5286 3649.0923 3669.656 3690.2195 3706.6409 3747.7681 3764.1895"
663 y="-4462.3472"><tspan 667 y="-4462.3472"><tspan
664 x="3550.4165 3591.5437 3628.5286 3649.0923 3669.656 3690.2195 3706.6409 3747.7681 3764.1895" 668 x="3550.4165 3591.5437 3628.5286 3649.0923 3669.656 3690.2195 3706.6409 3747.7681 3764.1895"
665 y="-4462.3472" 669 y="-4462.3472"
666 sodipodi:role="line" 670 sodipodi:role="line"
667 id="tspan3673">1st field</tspan></text> 671 id="tspan3673">1st field</tspan></text>
668<text 672<text
669 transform="scale(1,-1)" 673 transform="scale(1,-1)"
670 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 674 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
671 id="text3675" 675 id="text3675"
672 x="2732.6792 3823.7344 4193.5835 4581.9253 4951.7744 5321.6235 3472.3777 3102.5283 2321.7029 2362.8303 2403.9575 1951.8538 1992.981 2034.1083 1582.0045 1623.132 1664.259 5670.9062 5712.0337" 676 x="2732.6792 3823.7344 4193.5835 4581.9253 4951.7744 5321.6235 3472.3777 3102.5283 2321.7029 2362.8303 2403.9575 1951.8538 1992.981 2034.1083 1582.0045 1623.132 1664.259 5670.9062 5712.0337"
673 y="-4943.1509"><tspan 677 y="-4943.1509"><tspan
674 x="2732.6792 3823.7344 4193.5835 4581.9253 4951.7744 5321.6235 3472.3777 3102.5283 2321.7029 2362.8303 2403.9575 1951.8538 1992.981 2034.1083 1582.0045 1623.132 1664.259 5670.9062 5712.0337" 678 x="2732.6792 3823.7344 4193.5835 4581.9253 4951.7744 5321.6235 3472.3777 3102.5283 2321.7029 2362.8303 2403.9575 1951.8538 1992.981 2034.1083 1582.0045 1623.132 1664.259 5670.9062 5712.0337"
675 y="-4943.1509" 679 y="-4943.1509"
676 sodipodi:role="line" 680 sodipodi:role="line"
677 id="tspan3677">1456783231231131022</tspan></text> 681 id="tspan3677">1456783231231131022</tspan></text>
678<text 682<text
679 transform="scale(1,-1)" 683 transform="scale(1,-1)"
680 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 684 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
681 id="text3679" 685 id="text3679"
682 x="2732.6726 3823.7278 4193.5771 4581.9189 4951.7681 5321.6172 3472.3711 3102.522 2321.6965 2362.8237 2403.9509 1951.8473 1992.9745 2034.1018 1581.998 1623.1254 1664.2524 5670.8999 5712.0269" 686 x="2732.6726 3823.7278 4193.5771 4581.9189 4951.7681 5321.6172 3472.3711 3102.522 2321.6965 2362.8237 2403.9509 1951.8473 1992.9745 2034.1018 1581.998 1623.1254 1664.2524 5670.8999 5712.0269"
683 y="-5054.1064"><tspan 687 y="-5054.1064"><tspan
684 x="2732.6726 3823.7278 4193.5771 4581.9189 4951.7681 5321.6172 3472.3711 3102.522 2321.6965 2362.8237 2403.9509 1951.8473 1992.9745 2034.1018 1581.998 1623.1254 1664.2524 5670.8999 5712.0269" 688 x="2732.6726 3823.7278 4193.5771 4581.9189 4951.7681 5321.6172 3472.3711 3102.522 2321.6965 2362.8237 2403.9509 1951.8473 1992.9745 2034.1018 1581.998 1623.1254 1664.2524 5670.8999 5712.0269"
685 y="-5054.1064" 689 y="-5054.1064"
686 sodipodi:role="line" 690 sodipodi:role="line"
687 id="tspan3681">1456783262562462322</tspan></text> 691 id="tspan3681">1456783262562462322</tspan></text>
688<text 692<text
689 transform="scale(1,-1)" 693 transform="scale(1,-1)"
690 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 694 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
691 id="text3683" 695 id="text3683"
692 x="842.29962 883.42694 924.55408" 696 x="842.29962 883.42694 924.55408"
693 y="-4943.1509"><tspan 697 y="-4943.1509"><tspan
694 x="842.29962 883.42694 924.55408" 698 x="842.29962 883.42694 924.55408"
695 y="-4943.1509" 699 y="-4943.1509"
696 sodipodi:role="line" 700 sodipodi:role="line"
697 id="tspan3685">308</tspan></text> 701 id="tspan3685">308</tspan></text>
698<text 702<text
699 transform="scale(1,-1)" 703 transform="scale(1,-1)"
700 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 704 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
701 id="text3687" 705 id="text3687"
702 x="842.29962 883.42694 924.55408" 706 x="842.29962 883.42694 924.55408"
703 y="-5054.1064"><tspan 707 y="-5054.1064"><tspan
704 x="842.29962 883.42694 924.55408" 708 x="842.29962 883.42694 924.55408"
705 y="-5054.1064" 709 y="-5054.1064"
706 sodipodi:role="line" 710 sodipodi:role="line"
707 id="tspan3689">621</tspan></text> 711 id="tspan3689">621</tspan></text>
708<text 712<text
709 transform="scale(1,-1)" 713 transform="scale(1,-1)"
710 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 714 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
711 id="text3691" 715 id="text3691"
712 x="1212.1489 1253.276 1294.4033" 716 x="1212.1489 1253.276 1294.4033"
713 y="-4943.1509"><tspan 717 y="-4943.1509"><tspan
714 x="1212.1489 1253.276 1294.4033" 718 x="1212.1489 1253.276 1294.4033"
715 y="-4943.1509" 719 y="-4943.1509"
716 sodipodi:role="line" 720 sodipodi:role="line"
717 id="tspan3693">309</tspan></text> 721 id="tspan3693">309</tspan></text>
718<text 722<text
719 transform="scale(1,-1)" 723 transform="scale(1,-1)"
720 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 724 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
721 id="text3695" 725 id="text3695"
722 x="1212.1489 1253.276 1294.4033" 726 x="1212.1489 1253.276 1294.4033"
723 y="-5054.1064"><tspan 727 y="-5054.1064"><tspan
724 x="1212.1489 1253.276 1294.4033" 728 x="1212.1489 1253.276 1294.4033"
725 y="-5054.1064" 729 y="-5054.1064"
726 sodipodi:role="line" 730 sodipodi:role="line"
727 id="tspan3697">622</tspan></text> 731 id="tspan3697">622</tspan></text>
728<text 732<text
729 transform="scale(1,-1)" 733 transform="scale(1,-1)"
730 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 734 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
731 id="text3699" 735 id="text3699"
732 x="3538.0635 3579.1907 3620.3179 3661.4451 3682.0088 3702.5723 3718.9937 3760.1208 3776.5422" 736 x="3538.0635 3579.1907 3620.3179 3661.4451 3682.0088 3702.5723 3718.9937 3760.1208 3776.5422"
733 y="-3648.6792"><tspan 737 y="-3648.6792"><tspan
734 x="3538.0635 3579.1907 3620.3179 3661.4451 3682.0088 3702.5723 3718.9937 3760.1208 3776.5422" 738 x="3538.0635 3579.1907 3620.3179 3661.4451 3682.0088 3702.5723 3718.9937 3760.1208 3776.5422"
735 y="-3648.6792" 739 y="-3648.6792"
736 sodipodi:role="line" 740 sodipodi:role="line"
737 id="tspan3701">2nd field</tspan></text> 741 id="tspan3701">2nd field</tspan></text>
738<text 742<text
739 transform="scale(1,-1)" 743 transform="scale(1,-1)"
740 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 744 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
741 id="text4083" 745 id="text4083"
742 x="4951.772 4581.9229 4212.0737 3842.2244 3490.8677 3102.5259 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563" 746 x="4951.772 4581.9229 4212.0737 3842.2244 3490.8677 3102.5259 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563"
743 y="-4129.4834"><tspan 747 y="-4129.4834"><tspan
744 x="4951.772 4581.9229 4212.0737 3842.2244 3490.8677 3102.5259 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563" 748 x="4951.772 4581.9229 4212.0737 3842.2244 3490.8677 3102.5259 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563"
745 y="-4129.4834" 749 y="-4129.4834"
746 sodipodi:role="line" 750 sodipodi:role="line"
747 id="tspan4085">765432313312311</tspan></text> 751 id="tspan4085">765432313312311</tspan></text>
748<text 752<text
749 transform="scale(1,-1)" 753 transform="scale(1,-1)"
750 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 754 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
751 id="text4087" 755 id="text4087"
752 x="6020.1929 6061.3198 6102.4473 5650.3433 5691.4707 5732.5981 5280.4941 5321.6216 5362.7485 4910.645 4951.7725 4992.8994 4540.7959 4581.9229 4623.0503 4170.9468 4212.0737 4253.2012 3801.0974 3842.2246 3883.3518 3449.7405 3490.8677 3531.9951 3061.3989 3102.5261 3143.6533 2691.5496 2732.677 2773.8042 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563" 756 x="6020.1929 6061.3198 6102.4473 5650.3433 5691.4707 5732.5981 5280.4941 5321.6216 5362.7485 4910.645 4951.7725 4992.8994 4540.7959 4581.9229 4623.0503 4170.9468 4212.0737 4253.2012 3801.0974 3842.2246 3883.3518 3449.7405 3490.8677 3531.9951 3061.3989 3102.5261 3143.6533 2691.5496 2732.677 2773.8042 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563"
753 y="-4240.4385"><tspan 757 y="-4240.4385"><tspan
754 x="6020.1929 6061.3198 6102.4473 5650.3433 5691.4707 5732.5981 5280.4941 5321.6216 5362.7485 4910.645 4951.7725 4992.8994 4540.7959 4581.9229 4623.0503 4170.9468 4212.0737 4253.2012 3801.0974 3842.2246 3883.3518 3449.7405 3490.8677 3531.9951 3061.3989 3102.5261 3143.6533 2691.5496 2732.677 2773.8042 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563" 758 x="6020.1929 6061.3198 6102.4473 5650.3433 5691.4707 5732.5981 5280.4941 5321.6216 5362.7485 4910.645 4951.7725 4992.8994 4540.7959 4581.9229 4623.0503 4170.9468 4212.0737 4253.2012 3801.0974 3842.2246 3883.3518 3449.7405 3490.8677 3531.9951 3061.3989 3102.5261 3143.6533 2691.5496 2732.677 2773.8042 2321.7004 2362.8276 2403.9551 1951.8512 1992.9785 2034.1057 1582.0022 1623.1293 1664.2563"
755 y="-4240.4385" 759 y="-4240.4385"
756 sodipodi:role="line" 760 sodipodi:role="line"
757 id="tspan4089">336335321320319318317316315314313312311</tspan></text> 761 id="tspan4089">336335321320319318317316315314313312311</tspan></text>
758<text 762<text
759 transform="scale(1,-1)" 763 transform="scale(1,-1)"
760 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 764 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
761 id="text4091" 765 id="text4091"
762 x="2732.6765 5321.6211 5670.9062 5712.0337 6040.7554 6081.8828 842.30634 883.43323 924.56055" 766 x="2732.6765 5321.6211 5670.9062 5712.0337 6040.7554 6081.8828 842.30634 883.43323 924.56055"
763 y="-4129.4834"><tspan 767 y="-4129.4834"><tspan
764 x="2732.6765 5321.6211 5670.9062 5712.0337 6040.7554 6081.8828 842.30634 883.43323 924.56055" 768 x="2732.6765 5321.6211 5670.9062 5712.0337 6040.7554 6081.8828 842.30634 883.43323 924.56055"
765 y="-4129.4834" 769 y="-4129.4834"
766 sodipodi:role="line" 770 sodipodi:role="line"
767 id="tspan4093">182223309</tspan></text> 771 id="tspan4093">182223309</tspan></text>
768<text 772<text
769 transform="scale(1,-1)" 773 transform="scale(1,-1)"
770 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 774 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
771 id="text4095" 775 id="text4095"
772 x="842.30634 883.43323 924.56055" 776 x="842.30634 883.43323 924.56055"
773 y="-4240.4385"><tspan 777 y="-4240.4385"><tspan
774 x="842.30634 883.43323 924.56055" 778 x="842.30634 883.43323 924.56055"
775 y="-4240.4385" 779 y="-4240.4385"
776 sodipodi:role="line" 780 sodipodi:role="line"
777 id="tspan4097">309</tspan></text> 781 id="tspan4097">309</tspan></text>
778<text 782<text
779 transform="scale(1,-1)" 783 transform="scale(1,-1)"
780 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 784 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
781 id="text4099" 785 id="text4099"
782 x="1212.1553 1253.2826 1294.4099" 786 x="1212.1553 1253.2826 1294.4099"
783 y="-4129.4834"><tspan 787 y="-4129.4834"><tspan
784 x="1212.1553 1253.2826 1294.4099" 788 x="1212.1553 1253.2826 1294.4099"
785 y="-4129.4834" 789 y="-4129.4834"
786 sodipodi:role="line" 790 sodipodi:role="line"
787 id="tspan4101">310</tspan></text> 791 id="tspan4101">310</tspan></text>
788<text 792<text
789 transform="scale(1,-1)" 793 transform="scale(1,-1)"
790 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 794 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
791 id="text4103" 795 id="text4103"
792 x="1212.1553 1253.2826 1294.4099" 796 x="1212.1553 1253.2826 1294.4099"
793 y="-4240.4385"><tspan 797 y="-4240.4385"><tspan
794 x="1212.1553 1253.2826 1294.4099" 798 x="1212.1553 1253.2826 1294.4099"
795 y="-4240.4385" 799 y="-4240.4385"
796 sodipodi:role="line" 800 sodipodi:role="line"
797 id="tspan4105">310</tspan></text> 801 id="tspan4105">310</tspan></text>
798<text 802<text
799 transform="scale(1,-1)" 803 transform="scale(1,-1)"
800 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 804 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
801 id="text4107" 805 id="text4107"
802 x="6410.605 6451.7319" 806 x="6410.605 6451.7319"
803 y="-4129.4834"><tspan 807 y="-4129.4834"><tspan
804 x="6410.605 6451.7319" 808 x="6410.605 6451.7319"
805 y="-4129.4834" 809 y="-4129.4834"
806 sodipodi:role="line" 810 sodipodi:role="line"
807 id="tspan4109">24</tspan></text> 811 id="tspan4109">24</tspan></text>
808<text 812<text
809 transform="scale(1,-1)" 813 transform="scale(1,-1)"
810 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 814 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
811 id="text4111" 815 id="text4111"
812 x="6390.041 6431.1685 6472.2954" 816 x="6390.041 6431.1685 6472.2954"
813 y="-4240.4385"><tspan 817 y="-4240.4385"><tspan
814 x="6390.041 6431.1685 6472.2954" 818 x="6390.041 6431.1685 6472.2954"
815 y="-4240.4385" 819 y="-4240.4385"
816 sodipodi:role="line" 820 sodipodi:role="line"
817 id="tspan4113">337</tspan></text> 821 id="tspan4113">337</tspan></text>
818<text 822<text
819 transform="scale(1,-1)" 823 transform="scale(1,-1)"
820 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 824 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
821 id="text4115" 825 id="text4115"
822 x="6040.7559 6081.8833" 826 x="6040.7559 6081.8833"
823 y="-4943.1504"><tspan 827 y="-4943.1504"><tspan
824 x="6040.7559 6081.8833" 828 x="6040.7559 6081.8833"
825 y="-4943.1504" 829 y="-4943.1504"
826 sodipodi:role="line" 830 sodipodi:role="line"
827 id="tspan4117">23</tspan></text> 831 id="tspan4117">23</tspan></text>
828<text 832<text
829 transform="scale(1,-1)" 833 transform="scale(1,-1)"
830 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 834 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
831 id="text4119" 835 id="text4119"
832 x="6040.7559 6081.8833" 836 x="6040.7559 6081.8833"
833 y="-5054.106"><tspan 837 y="-5054.106"><tspan
834 x="6040.7559 6081.8833" 838 x="6040.7559 6081.8833"
835 y="-5054.106" 839 y="-5054.106"
836 sodipodi:role="line" 840 sodipodi:role="line"
837 id="tspan4121">23</tspan></text> 841 id="tspan4121">23</tspan></text>
838<text 842<text
839 transform="scale(1,-1)" 843 transform="scale(1,-1)"
840 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 844 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
841 id="text4123" 845 id="text4123"
842 x="6410.605 6451.7324" 846 x="6410.605 6451.7324"
843 y="-4943.1504"><tspan 847 y="-4943.1504"><tspan
844 x="6410.605 6451.7324" 848 x="6410.605 6451.7324"
845 y="-4943.1504" 849 y="-4943.1504"
846 sodipodi:role="line" 850 sodipodi:role="line"
847 id="tspan4125">24</tspan></text> 851 id="tspan4125">24</tspan></text>
848<text 852<text
849 transform="scale(1,-1)" 853 transform="scale(1,-1)"
850 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 854 style="font-variant:normal;font-weight:normal;font-size:73.96984863px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
851 id="text4127" 855 id="text4127"
852 x="6410.605 6451.7324" 856 x="6410.605 6451.7324"
853 y="-5054.106"><tspan 857 y="-5054.106"><tspan
854 x="6410.605 6451.7324" 858 x="6410.605 6451.7324"
855 y="-5054.106" 859 y="-5054.106"
856 sodipodi:role="line" 860 sodipodi:role="line"
857 id="tspan4129">24</tspan></text> 861 id="tspan4129">24</tspan></text>
858</g></svg> \ No newline at end of file 862</g></svg> \ No newline at end of file
diff --git a/Documentation/media/uapi/v4l/vbi_hsync.svg b/Documentation/media/uapi/v4l/vbi_hsync.svg
index 4d5c0b4f146e..e17ff8314e7b 100644
--- a/Documentation/media/uapi/v4l/vbi_hsync.svg
+++ b/Documentation/media/uapi/v4l/vbi_hsync.svg
@@ -42,27 +42,27 @@
42 fit-margin-right="0" 42 fit-margin-right="0"
43 fit-margin-bottom="0" /><metadata 43 fit-margin-bottom="0" /><metadata
44 id="metadata8"><rdf:RDF><cc:Work 44 id="metadata8"><rdf:RDF><cc:Work
45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type 45 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs 46 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
47 id="defs6"><clipPath 47 id="defs6"><clipPath
48 clipPathUnits="userSpaceOnUse" 48 clipPathUnits="userSpaceOnUse"
49 id="clipPath30"><path 49 id="clipPath30"><path
50 d="m 0,0 0,1163 1544,0 L 1544,0 0,0 Z m 187.184,836.05 0,-19.278 48.517,0 -38.556,9.639 38.556,9.639 -48.517,0 z m 689.189,-19.278 0,19.278 -48.516,0 38.556,-9.639 -38.556,-9.639 48.516,0 z" 50 d="m 0,0 0,1163 1544,0 L 1544,0 0,0 Z m 187.184,836.05 0,-19.278 48.517,0 -38.556,9.639 38.556,9.639 -48.517,0 z m 689.189,-19.278 0,19.278 -48.516,0 38.556,-9.639 -38.556,-9.639 48.516,0 z"
51 id="path32" 51 id="path32"
52 inkscape:connector-curvature="0" 52 inkscape:connector-curvature="0"
53 style="clip-rule:evenodd" /></clipPath><clipPath 53 style="clip-rule:evenodd" /></clipPath><clipPath
54 clipPathUnits="userSpaceOnUse" 54 clipPathUnits="userSpaceOnUse"
55 id="clipPath52"><path 55 id="clipPath52"><path
56 d="m 0,0 0,1163 1544,0 L 1544,0 0,0 Z m 804.08,79.3887 0,19.2778 -48.516,0 38.556,-9.6389 -38.556,-9.6389 48.516,0 z m -703.647,19.2778 0,-19.2778 48.517,0 -38.556,9.6389 38.556,9.6389 -48.517,0 z" 56 d="m 0,0 0,1163 1544,0 L 1544,0 0,0 Z m 804.08,79.3887 0,19.2778 -48.516,0 38.556,-9.6389 -38.556,-9.6389 48.516,0 z m -703.647,19.2778 0,-19.2778 48.517,0 -38.556,9.6389 38.556,9.6389 -48.517,0 z"
57 id="path54" 57 id="path54"
58 inkscape:connector-curvature="0" 58 inkscape:connector-curvature="0"
59 style="clip-rule:evenodd" /></clipPath><clipPath 59 style="clip-rule:evenodd" /></clipPath><clipPath
60 clipPathUnits="userSpaceOnUse" 60 clipPathUnits="userSpaceOnUse"
61 id="clipPath94"><path 61 id="clipPath94"><path
62 d="m 0,0 0,1163 1544,0 L 1544,0 0,0 Z m 471.535,195.057 0,19.278 -48.516,0 38.555,-9.639 -38.555,-9.639 48.516,0 z m -284.351,19.278 0,-19.278 48.517,0 -38.556,9.639 38.556,9.639 -48.517,0 z" 62 d="m 0,0 0,1163 1544,0 L 1544,0 0,0 Z m 471.535,195.057 0,19.278 -48.516,0 38.555,-9.639 -38.555,-9.639 48.516,0 z m -284.351,19.278 0,-19.278 48.517,0 -38.556,9.639 38.556,9.639 -48.517,0 z"
63 id="path96" 63 id="path96"
64 inkscape:connector-curvature="0" 64 inkscape:connector-curvature="0"
65 style="clip-rule:evenodd" /></clipPath></defs><g 65 style="clip-rule:evenodd" /></clipPath></defs><g
66 id="g10" 66 id="g10"
67 inkscape:groupmode="layer" 67 inkscape:groupmode="layer"
68 inkscape:label="vbi_hsync" 68 inkscape:label="vbi_hsync"
@@ -70,69 +70,69 @@
70 id="g14" 70 id="g14"
71 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)" 71 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)"
72 style=""><path 72 style=""><path
73 inkscape:connector-curvature="0" 73 inkscape:connector-curvature="0"
74 id="path16" 74 id="path16"
75 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 75 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
76 d="M 32.9604,580.617 4.04346,493.866" /><path 76 d="M 32.9604,580.617 4.04346,493.866" /><path
77 inkscape:connector-curvature="0" 77 inkscape:connector-curvature="0"
78 id="path18" 78 id="path18"
79 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 79 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
80 d="m 192.004,855.328 0,-665.091" /><path 80 d="m 192.004,855.328 0,-665.091" /><path
81 inkscape:connector-curvature="0" 81 inkscape:connector-curvature="0"
82 id="path20" 82 id="path20"
83 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 83 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
84 d="m 466.715,392.656 0,-202.419" /><path 84 d="m 466.715,392.656 0,-202.419" /><path
85 inkscape:connector-curvature="0" 85 inkscape:connector-curvature="0"
86 id="path22" 86 id="path22"
87 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 87 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
88 d="m 799.261,508.324 0,-433.7549" /><path 88 d="m 799.261,508.324 0,-433.7549" /><path
89 inkscape:connector-curvature="0" 89 inkscape:connector-curvature="0"
90 id="path24" 90 id="path24"
91 style="fill:none;stroke:#000000;stroke-width:4.81949997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 91 style="fill:none;stroke:#000000;stroke-width:4.81949997;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
92 d="m 857.095,537.241 231.335,0" /></g><g 92 d="m 857.095,537.241 231.335,0" /></g><g
93 id="g26" 93 id="g26"
94 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)" 94 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)"
95 style=""><g 95 style=""><g
96 clip-path="url(#clipPath30)" 96 clip-path="url(#clipPath30)"
97 id="g28" 97 id="g28"
98 style=""><path 98 style=""><path
99 inkscape:connector-curvature="0" 99 inkscape:connector-curvature="0"
100 id="path34" 100 id="path34"
101 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 101 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
102 d="m 871.553,826.411 -679.549,0" /></g></g><g 102 d="m 871.553,826.411 -679.549,0" /></g></g><g
103 id="g36" 103 id="g36"
104 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)" 104 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)"
105 style=""><path 105 style=""><path
106 inkscape:connector-curvature="0" 106 inkscape:connector-curvature="0"
107 id="path38" 107 id="path38"
108 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 108 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
109 d="m 827.857,816.772 38.556,9.639 -38.556,9.639 0,-19.278" /><path 109 d="m 827.857,816.772 38.556,9.639 -38.556,9.639 0,-19.278" /><path
110 inkscape:connector-curvature="0" 110 inkscape:connector-curvature="0"
111 id="path40" 111 id="path40"
112 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 112 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
113 d="m 827.857,816.772 38.556,9.639 -38.556,9.639 0,-19.278 z" /><path 113 d="m 827.857,816.772 38.556,9.639 -38.556,9.639 0,-19.278 z" /><path
114 inkscape:connector-curvature="0" 114 inkscape:connector-curvature="0"
115 id="path42" 115 id="path42"
116 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 116 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
117 d="m 235.701,836.05 -38.556,-9.639 38.556,-9.639 0,19.278" /><path 117 d="m 235.701,836.05 -38.556,-9.639 38.556,-9.639 0,19.278" /><path
118 inkscape:connector-curvature="0" 118 inkscape:connector-curvature="0"
119 id="path44" 119 id="path44"
120 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 120 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
121 d="m 235.701,836.05 -38.556,-9.639 38.556,-9.639 0,19.278 z" /><path 121 d="m 235.701,836.05 -38.556,-9.639 38.556,-9.639 0,19.278 z" /><path
122 inkscape:connector-curvature="0" 122 inkscape:connector-curvature="0"
123 id="path46" 123 id="path46"
124 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 124 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
125 d="m 1073.97,493.866 28.92,86.751" /></g><g 125 d="m 1073.97,493.866 28.92,86.751" /></g><g
126 id="g48" 126 id="g48"
127 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)" 127 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)"
128 style=""><g 128 style=""><g
129 clip-path="url(#clipPath52)" 129 clip-path="url(#clipPath52)"
130 id="g50" 130 id="g50"
131 style=""><path 131 style=""><path
132 inkscape:connector-curvature="0" 132 inkscape:connector-curvature="0"
133 id="path56" 133 id="path56"
134 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 134 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
135 d="m 105.253,89.0276 694.008,0" /></g></g><path 135 d="m 105.253,89.0276 694.008,0" /></g></g><path
136 d="m 52.91205,34.475403 -13.891817,-3.472918 13.891817,-3.472918 0,6.945836" 136 d="m 52.91205,34.475403 -13.891817,-3.472918 13.891817,-3.472918 0,6.945836"
137 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 137 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
138 id="path60" 138 id="path60"
@@ -196,13 +196,13 @@
196 id="g90" 196 id="g90"
197 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)" 197 transform="matrix(0.36030235,0,0,0.36030235,-0.75498483,-1.0743684)"
198 style=""><g 198 style=""><g
199 clip-path="url(#clipPath94)" 199 clip-path="url(#clipPath94)"
200 id="g92" 200 id="g92"
201 style=""><path 201 style=""><path
202 inkscape:connector-curvature="0" 202 inkscape:connector-curvature="0"
203 id="path98" 203 id="path98"
204 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1" 204 style="fill:none;stroke:#000000;stroke-width:2.40974998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
205 d="m 192.004,204.696 274.711,0" /></g></g><path 205 d="m 192.004,204.696 274.711,0" /></g></g><path
206 d="m 84.168639,76.151036 -13.891817,-3.472955 13.891817,-3.472954 0,6.945909" 206 d="m 84.168639,76.151036 -13.891817,-3.472955 13.891817,-3.472954 0,6.945909"
207 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" 207 style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none"
208 id="path102" 208 id="path102"
@@ -224,90 +224,90 @@
224 transform="scale(1,-1)" 224 transform="scale(1,-1)"
225 x="438.29504" 225 x="438.29504"
226 y="-187.28558"><tspan 226 y="-187.28558"><tspan
227 id="tspan114" 227 id="tspan114"
228 sodipodi:role="line" 228 sodipodi:role="line"
229 y="-187.28558" 229 y="-187.28558"
230 x="438.29504 452.19382 456.81979 468.40555 478.82443 489.24329 495.03619 506.62195 518.2077 528.62659 540.21234">Black Level</tspan><tspan 230 x="438.29504 452.19382 456.81979 468.40555 478.82443 489.24329 495.03619 506.62195 518.2077 528.62659 540.21234">Black Level</tspan><tspan
231 id="tspan116" 231 id="tspan116"
232 sodipodi:role="line" 232 sodipodi:role="line"
233 y="-83.096947" 233 y="-83.096947"
234 x="438.29504 452.19382 462.61267 474.19846 484.61731 490.41019 501.99597 513.58173 524.00061 535.58636">Sync Level</tspan><tspan 234 x="438.29504 452.19382 462.61267 474.19846 484.61731 490.41019 501.99597 513.58173 524.00061 535.58636">Sync Level</tspan><tspan
235 id="tspan118" 235 id="tspan118"
236 sodipodi:role="line" 236 sodipodi:role="line"
237 y="-395.66284" 237 y="-395.66284"
238 x="438.29504 457.96585 469.55164 474.17761 479.97049 491.55627 497.34915 508.93494 520.52069 530.93958 542.52533">White Level</tspan></text> 238 x="438.29504 457.96585 469.55164 474.17761 479.97049 491.55627 497.34915 508.93494 520.52069 530.93958 542.52533">White Level</tspan></text>
239<text 239<text
240 id="text120" 240 id="text120"
241 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 241 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
242 transform="scale(1,-1)" 242 transform="scale(1,-1)"
243 x="159.88258" 243 x="159.88258"
244 y="-270.63647"><tspan 244 y="-270.63647"><tspan
245 id="tspan122" 245 id="tspan122"
246 sodipodi:role="line" 246 sodipodi:role="line"
247 y="-270.63647" 247 y="-270.63647"
248 x="159.88258 172.61443 179.55339 186.49236 198.07812 209.66391">offset</tspan></text> 248 x="159.88258 172.61443 179.55339 186.49236 198.07812 209.66391">offset</tspan></text>
249<text 249<text
250 id="text124" 250 id="text124"
251 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 251 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
252 transform="scale(1,-1)" 252 transform="scale(1,-1)"
253 x="46.973549" 253 x="46.973549"
254 y="-46.630745"><tspan 254 y="-46.630745"><tspan
255 id="tspan126" 255 id="tspan126"
256 sodipodi:role="line" 256 sodipodi:role="line"
257 y="-46.630745" 257 y="-46.630745"
258 x="46.973549 58.559322 63.185299 74.771072 86.35685 92.149734 102.5686 112.98746 124.57324 134.9921 146.57788 153.51685 159.30972 165.10262 176.68839 188.27417 192.90015 203.319">Line synchr. pulse</tspan><tspan 258 x="46.973549 58.559322 63.185299 74.771072 86.35685 92.149734 102.5686 112.98746 124.57324 134.9921 146.57788 153.51685 159.30972 165.10262 176.68839 188.27417 192.90015 203.319">Line synchr. pulse</tspan><tspan
259 id="tspan128" 259 id="tspan128"
260 sodipodi:role="line" 260 sodipodi:role="line"
261 y="-4.9552913" 261 y="-4.9552913"
262 x="100.80776 112.39354 117.01952 128.60529 140.19107 145.98395 157.56973 162.19569 173.78148 185.36726 195.78612 200.41209 211.99788">Line blanking</tspan></text> 262 x="100.80776 112.39354 117.01952 128.60529 140.19107 145.98395 157.56973 162.19569 173.78148 185.36726 195.78612 200.41209 211.99788">Line blanking</tspan></text>
263<text 263<text
264 id="text3473" 264 id="text3473"
265 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 265 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
266 transform="scale(1,-1)" 266 transform="scale(1,-1)"
267 x="46.973549 58.559322 63.185299 74.771072 86.35685 92.149734 102.5686 112.98746 124.57324 134.9921 146.57788 153.51685 159.30972 165.10262 176.68839 188.27417 192.90015 203.319" 267 x="46.973549 58.559322 63.185299 74.771072 86.35685 92.149734 102.5686 112.98746 124.57324 134.9921 146.57788 153.51685 159.30972 165.10262 176.68839 188.27417 192.90015 203.319"
268 y="-46.630745"><tspan 268 y="-46.630745"><tspan
269 id="tspan3475" 269 id="tspan3475"
270 sodipodi:role="line" 270 sodipodi:role="line"
271 y="-46.630745" 271 y="-46.630745"
272 x="46.973549 58.559322 63.185299 74.771072 86.35685 92.149734 102.5686 112.98746 124.57324 134.9921 146.57788 153.51685 159.30972 165.10262 176.68839 188.27417 192.90015 203.319">Line synchr. pulse</tspan></text> 272 x="46.973549 58.559322 63.185299 74.771072 86.35685 92.149734 102.5686 112.98746 124.57324 134.9921 146.57788 153.51685 159.30972 165.10262 176.68839 188.27417 192.90015 203.319">Line synchr. pulse</tspan></text>
273<text 273<text
274 id="text3477" 274 id="text3477"
275 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 275 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
276 transform="scale(1,-1)" 276 transform="scale(1,-1)"
277 x="100.80776 112.39354 117.01952 128.60529 140.19107 145.98395 157.56973 162.19569 173.78148 185.36726 195.78612 200.41209 211.99788" 277 x="100.80776 112.39354 117.01952 128.60529 140.19107 145.98395 157.56973 162.19569 173.78148 185.36726 195.78612 200.41209 211.99788"
278 y="-4.9552913"><tspan 278 y="-4.9552913"><tspan
279 id="tspan3479" 279 id="tspan3479"
280 sodipodi:role="line" 280 sodipodi:role="line"
281 y="-4.9552913" 281 y="-4.9552913"
282 x="100.80776 112.39354 117.01952 128.60529 140.19107 145.98395 157.56973 162.19569 173.78148 185.36726 195.78612 200.41209 211.99788">Line blanking</tspan></text> 282 x="100.80776 112.39354 117.01952 128.60529 140.19107 145.98395 157.56973 162.19569 173.78148 185.36726 195.78612 200.41209 211.99788">Line blanking</tspan></text>
283<text 283<text
284 id="text3607" 284 id="text3607"
285 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 285 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
286 transform="scale(1,-1)" 286 transform="scale(1,-1)"
287 x="438.29504 452.19382 456.81979 468.40555 478.82443 489.24329 495.03619 506.62195 518.2077 528.62659 540.21234" 287 x="438.29504 452.19382 456.81979 468.40555 478.82443 489.24329 495.03619 506.62195 518.2077 528.62659 540.21234"
288 y="-187.28558"><tspan 288 y="-187.28558"><tspan
289 id="tspan3609" 289 id="tspan3609"
290 sodipodi:role="line" 290 sodipodi:role="line"
291 y="-187.28558" 291 y="-187.28558"
292 x="438.29504 452.19382 456.81979 468.40555 478.82443 489.24329 495.03619 506.62195 518.2077 528.62659 540.21234">Black Level</tspan></text> 292 x="438.29504 452.19382 456.81979 468.40555 478.82443 489.24329 495.03619 506.62195 518.2077 528.62659 540.21234">Black Level</tspan></text>
293<text 293<text
294 id="text3611" 294 id="text3611"
295 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 295 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
296 transform="scale(1,-1)" 296 transform="scale(1,-1)"
297 x="438.29504 452.19382 462.61267 474.19846 484.61731 490.41019 501.99597 513.58173 524.00061 535.58636" 297 x="438.29504 452.19382 462.61267 474.19846 484.61731 490.41019 501.99597 513.58173 524.00061 535.58636"
298 y="-83.096947"><tspan 298 y="-83.096947"><tspan
299 id="tspan3613" 299 id="tspan3613"
300 sodipodi:role="line" 300 sodipodi:role="line"
301 y="-83.096947" 301 y="-83.096947"
302 x="438.29504 452.19382 462.61267 474.19846 484.61731 490.41019 501.99597 513.58173 524.00061 535.58636">Sync Level</tspan></text> 302 x="438.29504 452.19382 462.61267 474.19846 484.61731 490.41019 501.99597 513.58173 524.00061 535.58636">Sync Level</tspan></text>
303<text 303<text
304 id="text3615" 304 id="text3615"
305 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;" 305 style="font-variant:normal;font-weight:normal;font-size:20.83772659px;font-family:sans-serif;-inkscape-font-specification:sans-serif;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-style:normal;font-stretch:normal;"
306 transform="scale(1,-1)" 306 transform="scale(1,-1)"
307 x="438.29504 457.96585 469.55164 474.17761 479.97049 491.55627 497.34915 508.93494 520.52069 530.93958 542.52533" 307 x="438.29504 457.96585 469.55164 474.17761 479.97049 491.55627 497.34915 508.93494 520.52069 530.93958 542.52533"
308 y="-395.66284"><tspan 308 y="-395.66284"><tspan
309 id="tspan3617" 309 id="tspan3617"
310 sodipodi:role="line" 310 sodipodi:role="line"
311 y="-395.66284" 311 y="-395.66284"
312 x="438.29504 457.96585 469.55164 474.17761 479.97049 491.55627 497.34915 508.93494 520.52069 530.93958 542.52533">White Level</tspan></text> 312 x="438.29504 457.96585 469.55164 474.17761 479.97049 491.55627 497.34915 508.93494 520.52069 530.93958 542.52533">White Level</tspan></text>
313</g></svg> \ No newline at end of file 313</g></svg> \ No newline at end of file
diff --git a/Documentation/media/uapi/v4l/vidioc-g-fmt.rst b/Documentation/media/uapi/v4l/vidioc-g-fmt.rst
index b853e48312e2..d082f9a21548 100644
--- a/Documentation/media/uapi/v4l/vidioc-g-fmt.rst
+++ b/Documentation/media/uapi/v4l/vidioc-g-fmt.rst
@@ -147,3 +147,9 @@ appropriately. The generic error codes are described at the
147EINVAL 147EINVAL
148 The struct :c:type:`v4l2_format` ``type`` field is 148 The struct :c:type:`v4l2_format` ``type`` field is
149 invalid or the requested buffer type not supported. 149 invalid or the requested buffer type not supported.
150
151EBUSY
152 The device is busy and cannot change the format. This could be
153 because or the device is streaming or buffers are allocated or
154 queued to the driver. Relevant for :ref:`VIDIOC_S_FMT
155 <VIDIOC_G_FMT>` only.
diff --git a/Documentation/media/v4l-drivers/imx.rst b/Documentation/media/v4l-drivers/imx.rst
index e0ee0f1aeb05..3c4f58bda178 100644
--- a/Documentation/media/v4l-drivers/imx.rst
+++ b/Documentation/media/v4l-drivers/imx.rst
@@ -607,8 +607,9 @@ References
607 607
608Authors 608Authors
609------- 609-------
610Steve Longerbeam <steve_longerbeam@mentor.com> 610
611Philipp Zabel <kernel@pengutronix.de> 611- Steve Longerbeam <steve_longerbeam@mentor.com>
612Russell King <linux@armlinux.org.uk> 612- Philipp Zabel <kernel@pengutronix.de>
613- Russell King <linux@armlinux.org.uk>
613 614
614Copyright (C) 2012-2017 Mentor Graphics Inc. 615Copyright (C) 2012-2017 Mentor Graphics Inc.
diff --git a/Documentation/media/v4l-drivers/index.rst b/Documentation/media/v4l-drivers/index.rst
index 2e24d6806052..10f2ce42ece2 100644
--- a/Documentation/media/v4l-drivers/index.rst
+++ b/Documentation/media/v4l-drivers/index.rst
@@ -41,6 +41,7 @@ For more details see the file COPYING in the source distribution of Linux.
41 cx88 41 cx88
42 davinci-vpbe 42 davinci-vpbe
43 fimc 43 fimc
44 imx
44 ivtv 45 ivtv
45 max2175 46 max2175
46 meye 47 meye
diff --git a/Documentation/networking/switchdev.txt b/Documentation/networking/switchdev.txt
index 3e7b946dea27..5e40e1f68873 100644
--- a/Documentation/networking/switchdev.txt
+++ b/Documentation/networking/switchdev.txt
@@ -228,7 +228,7 @@ Learning on the device port should be enabled, as well as learning_sync:
228 bridge link set dev DEV learning on self 228 bridge link set dev DEV learning on self
229 bridge link set dev DEV learning_sync on self 229 bridge link set dev DEV learning_sync on self
230 230
231Learning_sync attribute enables syncing of the learned/forgotton FDB entry to 231Learning_sync attribute enables syncing of the learned/forgotten FDB entry to
232the bridge's FDB. It's possible, but not optimal, to enable learning on the 232the bridge's FDB. It's possible, but not optimal, to enable learning on the
233device port and on the bridge port, and disable learning_sync. 233device port and on the bridge port, and disable learning_sync.
234 234
@@ -245,7 +245,7 @@ the responsibility of the port driver/device to age out these entries. If the
245port device supports ageing, when the FDB entry expires, it will notify the 245port device supports ageing, when the FDB entry expires, it will notify the
246driver which in turn will notify the bridge with SWITCHDEV_FDB_DEL. If the 246driver which in turn will notify the bridge with SWITCHDEV_FDB_DEL. If the
247device does not support ageing, the driver can simulate ageing using a 247device does not support ageing, the driver can simulate ageing using a
248garbage collection timer to monitor FBD entries. Expired entries will be 248garbage collection timer to monitor FDB entries. Expired entries will be
249notified to the bridge using SWITCHDEV_FDB_DEL. See rocker driver for 249notified to the bridge using SWITCHDEV_FDB_DEL. See rocker driver for
250example of driver running ageing timer. 250example of driver running ageing timer.
251 251
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 0fde3dcf077a..625549d4c74a 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -435,7 +435,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
435 PM status to 'suspended' and update its parent's counter of 'active' 435 PM status to 'suspended' and update its parent's counter of 'active'
436 children as appropriate (it is only valid to use this function if 436 children as appropriate (it is only valid to use this function if
437 'power.runtime_error' is set or 'power.disable_depth' is greater than 437 'power.runtime_error' is set or 'power.disable_depth' is greater than
438 zero) 438 zero); it will fail and return an error code if the device has a child
439 which is active and the 'power.ignore_children' flag is unset
439 440
440 bool pm_runtime_active(struct device *dev); 441 bool pm_runtime_active(struct device *dev);
441 - return true if the device's runtime PM status is 'active' or its 442 - return true if the device's runtime PM status is 'active' or its
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
index 65ea5915178b..074670b98bac 100644
--- a/Documentation/printk-formats.txt
+++ b/Documentation/printk-formats.txt
@@ -58,20 +58,23 @@ Symbols/Function Pointers
58 %ps versatile_init 58 %ps versatile_init
59 %pB prev_fn_of_versatile_init+0x88/0x88 59 %pB prev_fn_of_versatile_init+0x88/0x88
60 60
61For printing symbols and function pointers. The ``S`` and ``s`` specifiers 61The ``F`` and ``f`` specifiers are for printing function pointers,
62result in the symbol name with (``S``) or without (``s``) offsets. Where 62for example, f->func, &gettimeofday. They have the same result as
63this is used on a kernel without KALLSYMS - the symbol address is 63``S`` and ``s`` specifiers. But they do an extra conversion on
64printed instead. 64ia64, ppc64 and parisc64 architectures where the function pointers
65are actually function descriptors.
66
67The ``S`` and ``s`` specifiers can be used for printing symbols
68from direct addresses, for example, __builtin_return_address(0),
69(void *)regs->ip. They result in the symbol name with (``S``) or
70without (``s``) offsets. If KALLSYMS are disabled then the symbol
71address is printed instead.
65 72
66The ``B`` specifier results in the symbol name with offsets and should be 73The ``B`` specifier results in the symbol name with offsets and should be
67used when printing stack backtraces. The specifier takes into 74used when printing stack backtraces. The specifier takes into
68consideration the effect of compiler optimisations which may occur 75consideration the effect of compiler optimisations which may occur
69when tail-call``s are used and marked with the noreturn GCC attribute. 76when tail-call``s are used and marked with the noreturn GCC attribute.
70 77
71On ia64, ppc64 and parisc64 architectures function pointers are
72actually function descriptors which must first be resolved. The ``F`` and
73``f`` specifiers perform this resolution and then provide the same
74functionality as the ``S`` and ``s`` specifiers.
75 78
76Kernel Pointers 79Kernel Pointers
77=============== 80===============
diff --git a/Documentation/sysctl/net.txt b/Documentation/sysctl/net.txt
index 14db18c970b1..28596e03220b 100644
--- a/Documentation/sysctl/net.txt
+++ b/Documentation/sysctl/net.txt
@@ -35,9 +35,34 @@ Table : Subdirectories in /proc/sys/net
35bpf_jit_enable 35bpf_jit_enable
36-------------- 36--------------
37 37
38This enables Berkeley Packet Filter Just in Time compiler. 38This enables the BPF Just in Time (JIT) compiler. BPF is a flexible
39Currently supported on x86_64 architecture, bpf_jit provides a framework 39and efficient infrastructure allowing to execute bytecode at various
40to speed packet filtering, the one used by tcpdump/libpcap for example. 40hook points. It is used in a number of Linux kernel subsystems such
41as networking (e.g. XDP, tc), tracing (e.g. kprobes, uprobes, tracepoints)
42and security (e.g. seccomp). LLVM has a BPF back end that can compile
43restricted C into a sequence of BPF instructions. After program load
44through bpf(2) and passing a verifier in the kernel, a JIT will then
45translate these BPF proglets into native CPU instructions. There are
46two flavors of JITs, the newer eBPF JIT currently supported on:
47 - x86_64
48 - arm64
49 - ppc64
50 - sparc64
51 - mips64
52 - s390x
53
54And the older cBPF JIT supported on the following archs:
55 - arm
56 - mips
57 - ppc
58 - sparc
59
60eBPF JITs are a superset of cBPF JITs, meaning the kernel will
61migrate cBPF instructions into eBPF instructions and then JIT
62compile them transparently. Older cBPF JITs can only translate
63tcpdump filters, seccomp rules, etc, but not mentioned eBPF
64programs loaded through bpf(2).
65
41Values : 66Values :
42 0 - disable the JIT (default value) 67 0 - disable the JIT (default value)
43 1 - enable the JIT 68 1 - enable the JIT
@@ -46,9 +71,9 @@ Values :
46bpf_jit_harden 71bpf_jit_harden
47-------------- 72--------------
48 73
49This enables hardening for the Berkeley Packet Filter Just in Time compiler. 74This enables hardening for the BPF JIT compiler. Supported are eBPF
50Supported are eBPF JIT backends. Enabling hardening trades off performance, 75JIT backends. Enabling hardening trades off performance, but can
51but can mitigate JIT spraying. 76mitigate JIT spraying.
52Values : 77Values :
53 0 - disable JIT hardening (default value) 78 0 - disable JIT hardening (default value)
54 1 - enable JIT hardening for unprivileged users only 79 1 - enable JIT hardening for unprivileged users only
@@ -57,11 +82,11 @@ Values :
57bpf_jit_kallsyms 82bpf_jit_kallsyms
58---------------- 83----------------
59 84
60When Berkeley Packet Filter Just in Time compiler is enabled, then compiled 85When BPF JIT compiler is enabled, then compiled images are unknown
61images are unknown addresses to the kernel, meaning they neither show up in 86addresses to the kernel, meaning they neither show up in traces nor
62traces nor in /proc/kallsyms. This enables export of these addresses, which 87in /proc/kallsyms. This enables export of these addresses, which can
63can be used for debugging/tracing. If bpf_jit_harden is enabled, this feature 88be used for debugging/tracing. If bpf_jit_harden is enabled, this
64is disabled. 89feature is disabled.
65Values : 90Values :
66 0 - disable JIT kallsyms export (default value) 91 0 - disable JIT kallsyms export (default value)
67 1 - enable JIT kallsyms export for privileged users only 92 1 - enable JIT kallsyms export for privileged users only
diff --git a/MAINTAINERS b/MAINTAINERS
index f66488dfdbc9..1c3feffb1c1c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1161,7 +1161,7 @@ M: Brendan Higgins <brendanhiggins@google.com>
1161R: Benjamin Herrenschmidt <benh@kernel.crashing.org> 1161R: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1162R: Joel Stanley <joel@jms.id.au> 1162R: Joel Stanley <joel@jms.id.au>
1163L: linux-i2c@vger.kernel.org 1163L: linux-i2c@vger.kernel.org
1164L: openbmc@lists.ozlabs.org 1164L: openbmc@lists.ozlabs.org (moderated for non-subscribers)
1165S: Maintained 1165S: Maintained
1166F: drivers/irqchip/irq-aspeed-i2c-ic.c 1166F: drivers/irqchip/irq-aspeed-i2c-ic.c
1167F: drivers/i2c/busses/i2c-aspeed.c 1167F: drivers/i2c/busses/i2c-aspeed.c
@@ -5090,12 +5090,20 @@ M: Andrew Lunn <andrew@lunn.ch>
5090M: Florian Fainelli <f.fainelli@gmail.com> 5090M: Florian Fainelli <f.fainelli@gmail.com>
5091L: netdev@vger.kernel.org 5091L: netdev@vger.kernel.org
5092S: Maintained 5092S: Maintained
5093F: include/linux/phy.h 5093F: Documentation/ABI/testing/sysfs-bus-mdio
5094F: include/linux/phy_fixed.h 5094F: Documentation/devicetree/bindings/net/mdio*
5095F: drivers/net/phy/
5096F: Documentation/networking/phy.txt 5095F: Documentation/networking/phy.txt
5096F: drivers/net/phy/
5097F: drivers/of/of_mdio.c 5097F: drivers/of/of_mdio.c
5098F: drivers/of/of_net.c 5098F: drivers/of/of_net.c
5099F: include/linux/*mdio*.h
5100F: include/linux/of_net.h
5101F: include/linux/phy.h
5102F: include/linux/phy_fixed.h
5103F: include/linux/platform_data/mdio-gpio.h
5104F: include/trace/events/mdio.h
5105F: include/uapi/linux/mdio.h
5106F: include/uapi/linux/mii.h
5099 5107
5100EXT2 FILE SYSTEM 5108EXT2 FILE SYSTEM
5101M: Jan Kara <jack@suse.com> 5109M: Jan Kara <jack@suse.com>
@@ -5826,7 +5834,7 @@ F: drivers/staging/greybus/spi.c
5826F: drivers/staging/greybus/spilib.c 5834F: drivers/staging/greybus/spilib.c
5827F: drivers/staging/greybus/spilib.h 5835F: drivers/staging/greybus/spilib.h
5828 5836
5829GREYBUS LOOBACK/TIME PROTOCOLS DRIVERS 5837GREYBUS LOOPBACK/TIME PROTOCOLS DRIVERS
5830M: Bryan O'Donoghue <pure.logic@nexus-software.ie> 5838M: Bryan O'Donoghue <pure.logic@nexus-software.ie>
5831S: Maintained 5839S: Maintained
5832F: drivers/staging/greybus/loopback.c 5840F: drivers/staging/greybus/loopback.c
@@ -7102,7 +7110,6 @@ M: Marc Zyngier <marc.zyngier@arm.com>
7102L: linux-kernel@vger.kernel.org 7110L: linux-kernel@vger.kernel.org
7103S: Maintained 7111S: Maintained
7104T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core 7112T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
7105T: git git://git.infradead.org/users/jcooper/linux.git irqchip/core
7106F: Documentation/devicetree/bindings/interrupt-controller/ 7113F: Documentation/devicetree/bindings/interrupt-controller/
7107F: drivers/irqchip/ 7114F: drivers/irqchip/
7108 7115
@@ -10375,7 +10382,7 @@ L: linux-gpio@vger.kernel.org
10375T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git 10382T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git
10376S: Maintained 10383S: Maintained
10377F: Documentation/devicetree/bindings/pinctrl/ 10384F: Documentation/devicetree/bindings/pinctrl/
10378F: Documentation/pinctrl.txt 10385F: Documentation/driver-api/pinctl.rst
10379F: drivers/pinctrl/ 10386F: drivers/pinctrl/
10380F: include/linux/pinctrl/ 10387F: include/linux/pinctrl/
10381 10388
@@ -13996,6 +14003,7 @@ F: drivers/block/virtio_blk.c
13996F: include/linux/virtio*.h 14003F: include/linux/virtio*.h
13997F: include/uapi/linux/virtio_*.h 14004F: include/uapi/linux/virtio_*.h
13998F: drivers/crypto/virtio/ 14005F: drivers/crypto/virtio/
14006F: mm/balloon_compaction.c
13999 14007
14000VIRTIO CRYPTO DRIVER 14008VIRTIO CRYPTO DRIVER
14001M: Gonglei <arei.gonglei@huawei.com> 14009M: Gonglei <arei.gonglei@huawei.com>
@@ -14210,6 +14218,12 @@ F: drivers/watchdog/
14210F: include/linux/watchdog.h 14218F: include/linux/watchdog.h
14211F: include/uapi/linux/watchdog.h 14219F: include/uapi/linux/watchdog.h
14212 14220
14221WHISKEYCOVE PMIC GPIO DRIVER
14222M: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
14223L: linux-gpio@vger.kernel.org
14224S: Maintained
14225F: drivers/gpio/gpio-wcove.c
14226
14213WIIMOTE HID DRIVER 14227WIIMOTE HID DRIVER
14214M: David Herrmann <dh.herrmann@googlemail.com> 14228M: David Herrmann <dh.herrmann@googlemail.com>
14215L: linux-input@vger.kernel.org 14229L: linux-input@vger.kernel.org
diff --git a/Makefile b/Makefile
index 37087b4657b7..8db6be7dca73 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 4 1VERSION = 4
2PATCHLEVEL = 13 2PATCHLEVEL = 13
3SUBLEVEL = 0 3SUBLEVEL = 0
4EXTRAVERSION = -rc3 4EXTRAVERSION = -rc7
5NAME = Fearless Coyote 5NAME = Fearless Coyote
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
@@ -396,7 +396,7 @@ LINUXINCLUDE := \
396KBUILD_CPPFLAGS := -D__KERNEL__ 396KBUILD_CPPFLAGS := -D__KERNEL__
397 397
398KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 398KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
399 -fno-strict-aliasing -fno-common \ 399 -fno-strict-aliasing -fno-common -fshort-wchar \
400 -Werror-implicit-function-declaration \ 400 -Werror-implicit-function-declaration \
401 -Wno-format-security \ 401 -Wno-format-security \
402 -std=gnu89 $(call cc-option,-fno-PIE) 402 -std=gnu89 $(call cc-option,-fno-PIE)
@@ -442,7 +442,7 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
442# =========================================================================== 442# ===========================================================================
443# Rules shared between *config targets and build targets 443# Rules shared between *config targets and build targets
444 444
445# Basic helpers built in scripts/ 445# Basic helpers built in scripts/basic/
446PHONY += scripts_basic 446PHONY += scripts_basic
447scripts_basic: 447scripts_basic:
448 $(Q)$(MAKE) $(build)=scripts/basic 448 $(Q)$(MAKE) $(build)=scripts/basic
@@ -505,7 +505,7 @@ ifeq ($(KBUILD_EXTMOD),)
505 endif 505 endif
506 endif 506 endif
507endif 507endif
508# install and module_install need also be processed one by one 508# install and modules_install need also be processed one by one
509ifneq ($(filter install,$(MAKECMDGOALS)),) 509ifneq ($(filter install,$(MAKECMDGOALS)),)
510 ifneq ($(filter modules_install,$(MAKECMDGOALS)),) 510 ifneq ($(filter modules_install,$(MAKECMDGOALS)),)
511 mixed-targets := 1 511 mixed-targets := 1
@@ -964,7 +964,7 @@ export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(net-y) $(virt-
964export KBUILD_VMLINUX_LIBS := $(libs-y1) 964export KBUILD_VMLINUX_LIBS := $(libs-y1)
965export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds 965export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
966export LDFLAGS_vmlinux 966export LDFLAGS_vmlinux
967# used by scripts/pacmage/Makefile 967# used by scripts/package/Makefile
968export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools) 968export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools)
969 969
970vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) $(KBUILD_VMLINUX_LIBS) 970vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN) $(KBUILD_VMLINUX_LIBS)
@@ -992,8 +992,8 @@ include/generated/autoksyms.h: FORCE
992ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink) 992ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
993 993
994# Final link of vmlinux with optional arch pass after final link 994# Final link of vmlinux with optional arch pass after final link
995 cmd_link-vmlinux = \ 995cmd_link-vmlinux = \
996 $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ; \ 996 $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) ; \
997 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true) 997 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
998 998
999vmlinux: scripts/link-vmlinux.sh vmlinux_prereq $(vmlinux-deps) FORCE 999vmlinux: scripts/link-vmlinux.sh vmlinux_prereq $(vmlinux-deps) FORCE
@@ -1184,6 +1184,7 @@ PHONY += kselftest
1184kselftest: 1184kselftest:
1185 $(Q)$(MAKE) -C tools/testing/selftests run_tests 1185 $(Q)$(MAKE) -C tools/testing/selftests run_tests
1186 1186
1187PHONY += kselftest-clean
1187kselftest-clean: 1188kselftest-clean:
1188 $(Q)$(MAKE) -C tools/testing/selftests clean 1189 $(Q)$(MAKE) -C tools/testing/selftests clean
1189 1190
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index a5459698f0ee..7db85ab00c52 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -96,7 +96,6 @@ menu "ARC Architecture Configuration"
96 96
97menu "ARC Platform/SoC/Board" 97menu "ARC Platform/SoC/Board"
98 98
99source "arch/arc/plat-sim/Kconfig"
100source "arch/arc/plat-tb10x/Kconfig" 99source "arch/arc/plat-tb10x/Kconfig"
101source "arch/arc/plat-axs10x/Kconfig" 100source "arch/arc/plat-axs10x/Kconfig"
102#New platform adds here 101#New platform adds here
diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 44ef35d33956..3a61cfcc38c0 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -107,7 +107,7 @@ core-y += arch/arc/
107# w/o this dtb won't embed into kernel binary 107# w/o this dtb won't embed into kernel binary
108core-y += arch/arc/boot/dts/ 108core-y += arch/arc/boot/dts/
109 109
110core-$(CONFIG_ARC_PLAT_SIM) += arch/arc/plat-sim/ 110core-y += arch/arc/plat-sim/
111core-$(CONFIG_ARC_PLAT_TB10X) += arch/arc/plat-tb10x/ 111core-$(CONFIG_ARC_PLAT_TB10X) += arch/arc/plat-tb10x/
112core-$(CONFIG_ARC_PLAT_AXS10X) += arch/arc/plat-axs10x/ 112core-$(CONFIG_ARC_PLAT_AXS10X) += arch/arc/plat-axs10x/
113core-$(CONFIG_ARC_PLAT_EZNPS) += arch/arc/plat-eznps/ 113core-$(CONFIG_ARC_PLAT_EZNPS) += arch/arc/plat-eznps/
diff --git a/arch/arc/boot/dts/axc001.dtsi b/arch/arc/boot/dts/axc001.dtsi
index 53ce226f77a5..a380ffa1a458 100644
--- a/arch/arc/boot/dts/axc001.dtsi
+++ b/arch/arc/boot/dts/axc001.dtsi
@@ -15,15 +15,15 @@
15 15
16/ { 16/ {
17 compatible = "snps,arc"; 17 compatible = "snps,arc";
18 #address-cells = <1>; 18 #address-cells = <2>;
19 #size-cells = <1>; 19 #size-cells = <2>;
20 20
21 cpu_card { 21 cpu_card {
22 compatible = "simple-bus"; 22 compatible = "simple-bus";
23 #address-cells = <1>; 23 #address-cells = <1>;
24 #size-cells = <1>; 24 #size-cells = <1>;
25 25
26 ranges = <0x00000000 0xf0000000 0x10000000>; 26 ranges = <0x00000000 0x0 0xf0000000 0x10000000>;
27 27
28 core_clk: core_clk { 28 core_clk: core_clk {
29 #clock-cells = <0>; 29 #clock-cells = <0>;
@@ -91,23 +91,21 @@
91 mb_intc: dw-apb-ictl@0xe0012000 { 91 mb_intc: dw-apb-ictl@0xe0012000 {
92 #interrupt-cells = <1>; 92 #interrupt-cells = <1>;
93 compatible = "snps,dw-apb-ictl"; 93 compatible = "snps,dw-apb-ictl";
94 reg = < 0xe0012000 0x200 >; 94 reg = < 0x0 0xe0012000 0x0 0x200 >;
95 interrupt-controller; 95 interrupt-controller;
96 interrupt-parent = <&core_intc>; 96 interrupt-parent = <&core_intc>;
97 interrupts = < 7 >; 97 interrupts = < 7 >;
98 }; 98 };
99 99
100 memory { 100 memory {
101 #address-cells = <1>;
102 #size-cells = <1>;
103 ranges = <0x00000000 0x80000000 0x20000000>;
104 device_type = "memory"; 101 device_type = "memory";
105 reg = <0x80000000 0x1b000000>; /* (512 - 32) MiB */ 102 /* CONFIG_KERNEL_RAM_BASE_ADDRESS needs to match low mem start */
103 reg = <0x0 0x80000000 0x0 0x1b000000>; /* (512 - 32) MiB */
106 }; 104 };
107 105
108 reserved-memory { 106 reserved-memory {
109 #address-cells = <1>; 107 #address-cells = <2>;
110 #size-cells = <1>; 108 #size-cells = <2>;
111 ranges; 109 ranges;
112 /* 110 /*
113 * We just move frame buffer area to the very end of 111 * We just move frame buffer area to the very end of
@@ -118,7 +116,7 @@
118 */ 116 */
119 frame_buffer: frame_buffer@9e000000 { 117 frame_buffer: frame_buffer@9e000000 {
120 compatible = "shared-dma-pool"; 118 compatible = "shared-dma-pool";
121 reg = <0x9e000000 0x2000000>; 119 reg = <0x0 0x9e000000 0x0 0x2000000>;
122 no-map; 120 no-map;
123 }; 121 };
124 }; 122 };
diff --git a/arch/arc/boot/dts/axc003.dtsi b/arch/arc/boot/dts/axc003.dtsi
index 14df46f141bf..cc9239ef8d08 100644
--- a/arch/arc/boot/dts/axc003.dtsi
+++ b/arch/arc/boot/dts/axc003.dtsi
@@ -14,15 +14,15 @@
14 14
15/ { 15/ {
16 compatible = "snps,arc"; 16 compatible = "snps,arc";
17 #address-cells = <1>; 17 #address-cells = <2>;
18 #size-cells = <1>; 18 #size-cells = <2>;
19 19
20 cpu_card { 20 cpu_card {
21 compatible = "simple-bus"; 21 compatible = "simple-bus";
22 #address-cells = <1>; 22 #address-cells = <1>;
23 #size-cells = <1>; 23 #size-cells = <1>;
24 24
25 ranges = <0x00000000 0xf0000000 0x10000000>; 25 ranges = <0x00000000 0x0 0xf0000000 0x10000000>;
26 26
27 core_clk: core_clk { 27 core_clk: core_clk {
28 #clock-cells = <0>; 28 #clock-cells = <0>;
@@ -94,30 +94,29 @@
94 mb_intc: dw-apb-ictl@0xe0012000 { 94 mb_intc: dw-apb-ictl@0xe0012000 {
95 #interrupt-cells = <1>; 95 #interrupt-cells = <1>;
96 compatible = "snps,dw-apb-ictl"; 96 compatible = "snps,dw-apb-ictl";
97 reg = < 0xe0012000 0x200 >; 97 reg = < 0x0 0xe0012000 0x0 0x200 >;
98 interrupt-controller; 98 interrupt-controller;
99 interrupt-parent = <&core_intc>; 99 interrupt-parent = <&core_intc>;
100 interrupts = < 24 >; 100 interrupts = < 24 >;
101 }; 101 };
102 102
103 memory { 103 memory {
104 #address-cells = <1>;
105 #size-cells = <1>;
106 ranges = <0x00000000 0x80000000 0x40000000>;
107 device_type = "memory"; 104 device_type = "memory";
108 reg = <0x80000000 0x20000000>; /* 512MiB */ 105 /* CONFIG_KERNEL_RAM_BASE_ADDRESS needs to match low mem start */
106 reg = <0x0 0x80000000 0x0 0x20000000 /* 512 MiB low mem */
107 0x1 0xc0000000 0x0 0x40000000>; /* 1 GiB highmem */
109 }; 108 };
110 109
111 reserved-memory { 110 reserved-memory {
112 #address-cells = <1>; 111 #address-cells = <2>;
113 #size-cells = <1>; 112 #size-cells = <2>;
114 ranges; 113 ranges;
115 /* 114 /*
116 * Move frame buffer out of IOC aperture (0x8z-0xAz). 115 * Move frame buffer out of IOC aperture (0x8z-0xAz).
117 */ 116 */
118 frame_buffer: frame_buffer@be000000 { 117 frame_buffer: frame_buffer@be000000 {
119 compatible = "shared-dma-pool"; 118 compatible = "shared-dma-pool";
120 reg = <0xbe000000 0x2000000>; 119 reg = <0x0 0xbe000000 0x0 0x2000000>;
121 no-map; 120 no-map;
122 }; 121 };
123 }; 122 };
diff --git a/arch/arc/boot/dts/axc003_idu.dtsi b/arch/arc/boot/dts/axc003_idu.dtsi
index 695f9fa1996b..4ebb2170abec 100644
--- a/arch/arc/boot/dts/axc003_idu.dtsi
+++ b/arch/arc/boot/dts/axc003_idu.dtsi
@@ -14,15 +14,15 @@
14 14
15/ { 15/ {
16 compatible = "snps,arc"; 16 compatible = "snps,arc";
17 #address-cells = <1>; 17 #address-cells = <2>;
18 #size-cells = <1>; 18 #size-cells = <2>;
19 19
20 cpu_card { 20 cpu_card {
21 compatible = "simple-bus"; 21 compatible = "simple-bus";
22 #address-cells = <1>; 22 #address-cells = <1>;
23 #size-cells = <1>; 23 #size-cells = <1>;
24 24
25 ranges = <0x00000000 0xf0000000 0x10000000>; 25 ranges = <0x00000000 0x0 0xf0000000 0x10000000>;
26 26
27 core_clk: core_clk { 27 core_clk: core_clk {
28 #clock-cells = <0>; 28 #clock-cells = <0>;
@@ -100,30 +100,29 @@
100 mb_intc: dw-apb-ictl@0xe0012000 { 100 mb_intc: dw-apb-ictl@0xe0012000 {
101 #interrupt-cells = <1>; 101 #interrupt-cells = <1>;
102 compatible = "snps,dw-apb-ictl"; 102 compatible = "snps,dw-apb-ictl";
103 reg = < 0xe0012000 0x200 >; 103 reg = < 0x0 0xe0012000 0x0 0x200 >;
104 interrupt-controller; 104 interrupt-controller;
105 interrupt-parent = <&idu_intc>; 105 interrupt-parent = <&idu_intc>;
106 interrupts = <0>; 106 interrupts = <0>;
107 }; 107 };
108 108
109 memory { 109 memory {
110 #address-cells = <1>;
111 #size-cells = <1>;
112 ranges = <0x00000000 0x80000000 0x40000000>;
113 device_type = "memory"; 110 device_type = "memory";
114 reg = <0x80000000 0x20000000>; /* 512MiB */ 111 /* CONFIG_KERNEL_RAM_BASE_ADDRESS needs to match low mem start */
112 reg = <0x0 0x80000000 0x0 0x20000000 /* 512 MiB low mem */
113 0x1 0xc0000000 0x0 0x40000000>; /* 1 GiB highmem */
115 }; 114 };
116 115
117 reserved-memory { 116 reserved-memory {
118 #address-cells = <1>; 117 #address-cells = <2>;
119 #size-cells = <1>; 118 #size-cells = <2>;
120 ranges; 119 ranges;
121 /* 120 /*
122 * Move frame buffer out of IOC aperture (0x8z-0xAz). 121 * Move frame buffer out of IOC aperture (0x8z-0xAz).
123 */ 122 */
124 frame_buffer: frame_buffer@be000000 { 123 frame_buffer: frame_buffer@be000000 {
125 compatible = "shared-dma-pool"; 124 compatible = "shared-dma-pool";
126 reg = <0xbe000000 0x2000000>; 125 reg = <0x0 0xbe000000 0x0 0x2000000>;
127 no-map; 126 no-map;
128 }; 127 };
129 }; 128 };
diff --git a/arch/arc/boot/dts/axs10x_mb.dtsi b/arch/arc/boot/dts/axs10x_mb.dtsi
index 41cfb29b62c1..0ff7e07edcd4 100644
--- a/arch/arc/boot/dts/axs10x_mb.dtsi
+++ b/arch/arc/boot/dts/axs10x_mb.dtsi
@@ -13,7 +13,7 @@
13 compatible = "simple-bus"; 13 compatible = "simple-bus";
14 #address-cells = <1>; 14 #address-cells = <1>;
15 #size-cells = <1>; 15 #size-cells = <1>;
16 ranges = <0x00000000 0xe0000000 0x10000000>; 16 ranges = <0x00000000 0x0 0xe0000000 0x10000000>;
17 interrupt-parent = <&mb_intc>; 17 interrupt-parent = <&mb_intc>;
18 18
19 i2sclk: i2sclk@100a0 { 19 i2sclk: i2sclk@100a0 {
diff --git a/arch/arc/configs/haps_hs_defconfig b/arch/arc/configs/haps_hs_defconfig
index 57b3e599322f..db04ea4dd2d9 100644
--- a/arch/arc/configs/haps_hs_defconfig
+++ b/arch/arc/configs/haps_hs_defconfig
@@ -21,7 +21,6 @@ CONFIG_MODULES=y
21# CONFIG_BLK_DEV_BSG is not set 21# CONFIG_BLK_DEV_BSG is not set
22# CONFIG_IOSCHED_DEADLINE is not set 22# CONFIG_IOSCHED_DEADLINE is not set
23# CONFIG_IOSCHED_CFQ is not set 23# CONFIG_IOSCHED_CFQ is not set
24CONFIG_ARC_PLAT_SIM=y
25CONFIG_ISA_ARCV2=y 24CONFIG_ISA_ARCV2=y
26CONFIG_ARC_BUILTIN_DTB_NAME="haps_hs" 25CONFIG_ARC_BUILTIN_DTB_NAME="haps_hs"
27CONFIG_PREEMPT=y 26CONFIG_PREEMPT=y
diff --git a/arch/arc/configs/haps_hs_smp_defconfig b/arch/arc/configs/haps_hs_smp_defconfig
index f85985adebb2..821a2e562f3f 100644
--- a/arch/arc/configs/haps_hs_smp_defconfig
+++ b/arch/arc/configs/haps_hs_smp_defconfig
@@ -23,7 +23,6 @@ CONFIG_MODULES=y
23# CONFIG_BLK_DEV_BSG is not set 23# CONFIG_BLK_DEV_BSG is not set
24# CONFIG_IOSCHED_DEADLINE is not set 24# CONFIG_IOSCHED_DEADLINE is not set
25# CONFIG_IOSCHED_CFQ is not set 25# CONFIG_IOSCHED_CFQ is not set
26CONFIG_ARC_PLAT_SIM=y
27CONFIG_ISA_ARCV2=y 26CONFIG_ISA_ARCV2=y
28CONFIG_SMP=y 27CONFIG_SMP=y
29CONFIG_ARC_BUILTIN_DTB_NAME="haps_hs_idu" 28CONFIG_ARC_BUILTIN_DTB_NAME="haps_hs_idu"
diff --git a/arch/arc/configs/nps_defconfig b/arch/arc/configs/nps_defconfig
index ede625c76216..7c9c706ae7f6 100644
--- a/arch/arc/configs/nps_defconfig
+++ b/arch/arc/configs/nps_defconfig
@@ -39,7 +39,6 @@ CONFIG_IP_PNP=y
39# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 39# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
40# CONFIG_INET_XFRM_MODE_TUNNEL is not set 40# CONFIG_INET_XFRM_MODE_TUNNEL is not set
41# CONFIG_INET_XFRM_MODE_BEET is not set 41# CONFIG_INET_XFRM_MODE_BEET is not set
42# CONFIG_INET_LRO is not set
43# CONFIG_INET_DIAG is not set 42# CONFIG_INET_DIAG is not set
44# CONFIG_IPV6 is not set 43# CONFIG_IPV6 is not set
45# CONFIG_WIRELESS is not set 44# CONFIG_WIRELESS is not set
diff --git a/arch/arc/configs/nsim_700_defconfig b/arch/arc/configs/nsim_700_defconfig
index b0066a749d4c..6dff83a238b8 100644
--- a/arch/arc/configs/nsim_700_defconfig
+++ b/arch/arc/configs/nsim_700_defconfig
@@ -23,7 +23,6 @@ CONFIG_MODULES=y
23# CONFIG_BLK_DEV_BSG is not set 23# CONFIG_BLK_DEV_BSG is not set
24# CONFIG_IOSCHED_DEADLINE is not set 24# CONFIG_IOSCHED_DEADLINE is not set
25# CONFIG_IOSCHED_CFQ is not set 25# CONFIG_IOSCHED_CFQ is not set
26CONFIG_ARC_PLAT_SIM=y
27CONFIG_ARC_BUILTIN_DTB_NAME="nsim_700" 26CONFIG_ARC_BUILTIN_DTB_NAME="nsim_700"
28CONFIG_PREEMPT=y 27CONFIG_PREEMPT=y
29# CONFIG_COMPACTION is not set 28# CONFIG_COMPACTION is not set
diff --git a/arch/arc/configs/nsim_hs_defconfig b/arch/arc/configs/nsim_hs_defconfig
index ebe9ebb92933..31ee51b987e7 100644
--- a/arch/arc/configs/nsim_hs_defconfig
+++ b/arch/arc/configs/nsim_hs_defconfig
@@ -26,7 +26,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
26# CONFIG_BLK_DEV_BSG is not set 26# CONFIG_BLK_DEV_BSG is not set
27# CONFIG_IOSCHED_DEADLINE is not set 27# CONFIG_IOSCHED_DEADLINE is not set
28# CONFIG_IOSCHED_CFQ is not set 28# CONFIG_IOSCHED_CFQ is not set
29CONFIG_ARC_PLAT_SIM=y
30CONFIG_ISA_ARCV2=y 29CONFIG_ISA_ARCV2=y
31CONFIG_ARC_BUILTIN_DTB_NAME="nsim_hs" 30CONFIG_ARC_BUILTIN_DTB_NAME="nsim_hs"
32CONFIG_PREEMPT=y 31CONFIG_PREEMPT=y
diff --git a/arch/arc/configs/nsim_hs_smp_defconfig b/arch/arc/configs/nsim_hs_smp_defconfig
index 4bde43278be6..8d3b1f67cae4 100644
--- a/arch/arc/configs/nsim_hs_smp_defconfig
+++ b/arch/arc/configs/nsim_hs_smp_defconfig
@@ -24,7 +24,6 @@ CONFIG_MODULE_FORCE_UNLOAD=y
24# CONFIG_BLK_DEV_BSG is not set 24# CONFIG_BLK_DEV_BSG is not set
25# CONFIG_IOSCHED_DEADLINE is not set 25# CONFIG_IOSCHED_DEADLINE is not set
26# CONFIG_IOSCHED_CFQ is not set 26# CONFIG_IOSCHED_CFQ is not set
27CONFIG_ARC_PLAT_SIM=y
28CONFIG_ISA_ARCV2=y 27CONFIG_ISA_ARCV2=y
29CONFIG_SMP=y 28CONFIG_SMP=y
30CONFIG_ARC_BUILTIN_DTB_NAME="nsim_hs_idu" 29CONFIG_ARC_BUILTIN_DTB_NAME="nsim_hs_idu"
diff --git a/arch/arc/configs/nsimosci_defconfig b/arch/arc/configs/nsimosci_defconfig
index f6fb3d26557e..6168ce2ac2ef 100644
--- a/arch/arc/configs/nsimosci_defconfig
+++ b/arch/arc/configs/nsimosci_defconfig
@@ -23,7 +23,6 @@ CONFIG_MODULES=y
23# CONFIG_BLK_DEV_BSG is not set 23# CONFIG_BLK_DEV_BSG is not set
24# CONFIG_IOSCHED_DEADLINE is not set 24# CONFIG_IOSCHED_DEADLINE is not set
25# CONFIG_IOSCHED_CFQ is not set 25# CONFIG_IOSCHED_CFQ is not set
26CONFIG_ARC_PLAT_SIM=y
27CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci" 26CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci"
28# CONFIG_COMPACTION is not set 27# CONFIG_COMPACTION is not set
29CONFIG_NET=y 28CONFIG_NET=y
diff --git a/arch/arc/configs/nsimosci_hs_defconfig b/arch/arc/configs/nsimosci_hs_defconfig
index b9f0fe00044b..a70bdeb2b3fd 100644
--- a/arch/arc/configs/nsimosci_hs_defconfig
+++ b/arch/arc/configs/nsimosci_hs_defconfig
@@ -23,7 +23,6 @@ CONFIG_MODULES=y
23# CONFIG_BLK_DEV_BSG is not set 23# CONFIG_BLK_DEV_BSG is not set
24# CONFIG_IOSCHED_DEADLINE is not set 24# CONFIG_IOSCHED_DEADLINE is not set
25# CONFIG_IOSCHED_CFQ is not set 25# CONFIG_IOSCHED_CFQ is not set
26CONFIG_ARC_PLAT_SIM=y
27CONFIG_ISA_ARCV2=y 26CONFIG_ISA_ARCV2=y
28CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci_hs" 27CONFIG_ARC_BUILTIN_DTB_NAME="nsimosci_hs"
29# CONFIG_COMPACTION is not set 28# CONFIG_COMPACTION is not set
diff --git a/arch/arc/configs/nsimosci_hs_smp_defconfig b/arch/arc/configs/nsimosci_hs_smp_defconfig
index 155add7761ed..ef96406c446e 100644
--- a/arch/arc/configs/nsimosci_hs_smp_defconfig
+++ b/arch/arc/configs/nsimosci_hs_smp_defconfig
@@ -18,7 +18,6 @@ CONFIG_MODULES=y
18# CONFIG_BLK_DEV_BSG is not set 18# CONFIG_BLK_DEV_BSG is not set
19# CONFIG_IOSCHED_DEADLINE is not set 19# CONFIG_IOSCHED_DEADLINE is not set
20# CONFIG_IOSCHED_CFQ is not set 20# CONFIG_IOSCHED_CFQ is not set
21CONFIG_ARC_PLAT_SIM=y
22CONFIG_ISA_ARCV2=y 21CONFIG_ISA_ARCV2=y
23CONFIG_SMP=y 22CONFIG_SMP=y
24# CONFIG_ARC_TIMERS_64BIT is not set 23# CONFIG_ARC_TIMERS_64BIT is not set
diff --git a/arch/arc/configs/tb10x_defconfig b/arch/arc/configs/tb10x_defconfig
index 4c5118384eb5..f30182549395 100644
--- a/arch/arc/configs/tb10x_defconfig
+++ b/arch/arc/configs/tb10x_defconfig
@@ -38,7 +38,6 @@ CONFIG_IP_MULTICAST=y
38# CONFIG_INET_XFRM_MODE_TRANSPORT is not set 38# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
39# CONFIG_INET_XFRM_MODE_TUNNEL is not set 39# CONFIG_INET_XFRM_MODE_TUNNEL is not set
40# CONFIG_INET_XFRM_MODE_BEET is not set 40# CONFIG_INET_XFRM_MODE_BEET is not set
41# CONFIG_INET_LRO is not set
42# CONFIG_INET_DIAG is not set 41# CONFIG_INET_DIAG is not set
43# CONFIG_IPV6 is not set 42# CONFIG_IPV6 is not set
44# CONFIG_WIRELESS is not set 43# CONFIG_WIRELESS is not set
diff --git a/arch/arc/include/asm/cache.h b/arch/arc/include/asm/cache.h
index 19ebddffb279..02fd1cece6ef 100644
--- a/arch/arc/include/asm/cache.h
+++ b/arch/arc/include/asm/cache.h
@@ -96,7 +96,9 @@ extern unsigned long perip_base, perip_end;
96#define ARC_REG_SLC_FLUSH 0x904 96#define ARC_REG_SLC_FLUSH 0x904
97#define ARC_REG_SLC_INVALIDATE 0x905 97#define ARC_REG_SLC_INVALIDATE 0x905
98#define ARC_REG_SLC_RGN_START 0x914 98#define ARC_REG_SLC_RGN_START 0x914
99#define ARC_REG_SLC_RGN_START1 0x915
99#define ARC_REG_SLC_RGN_END 0x916 100#define ARC_REG_SLC_RGN_END 0x916
101#define ARC_REG_SLC_RGN_END1 0x917
100 102
101/* Bit val in SLC_CONTROL */ 103/* Bit val in SLC_CONTROL */
102#define SLC_CTRL_DIS 0x001 104#define SLC_CTRL_DIS 0x001
diff --git a/arch/arc/include/asm/mmu.h b/arch/arc/include/asm/mmu.h
index db7319e9b506..efb79fafff1d 100644
--- a/arch/arc/include/asm/mmu.h
+++ b/arch/arc/include/asm/mmu.h
@@ -94,6 +94,8 @@ static inline int is_pae40_enabled(void)
94 return IS_ENABLED(CONFIG_ARC_HAS_PAE40); 94 return IS_ENABLED(CONFIG_ARC_HAS_PAE40);
95} 95}
96 96
97extern int pae40_exist_but_not_enab(void);
98
97#endif /* !__ASSEMBLY__ */ 99#endif /* !__ASSEMBLY__ */
98 100
99#endif 101#endif
diff --git a/arch/arc/kernel/intc-arcv2.c b/arch/arc/kernel/intc-arcv2.c
index f928795fd07a..cf90714a676d 100644
--- a/arch/arc/kernel/intc-arcv2.c
+++ b/arch/arc/kernel/intc-arcv2.c
@@ -75,10 +75,13 @@ void arc_init_IRQ(void)
75 * Set a default priority for all available interrupts to prevent 75 * Set a default priority for all available interrupts to prevent
76 * switching of register banks if Fast IRQ and multiple register banks 76 * switching of register banks if Fast IRQ and multiple register banks
77 * are supported by CPU. 77 * are supported by CPU.
78 * Also disable all IRQ lines so faulty external hardware won't
79 * trigger interrupt that kernel is not ready to handle.
78 */ 80 */
79 for (i = NR_EXCEPTIONS; i < irq_bcr.irqs + NR_EXCEPTIONS; i++) { 81 for (i = NR_EXCEPTIONS; i < irq_bcr.irqs + NR_EXCEPTIONS; i++) {
80 write_aux_reg(AUX_IRQ_SELECT, i); 82 write_aux_reg(AUX_IRQ_SELECT, i);
81 write_aux_reg(AUX_IRQ_PRIORITY, ARCV2_IRQ_DEF_PRIO); 83 write_aux_reg(AUX_IRQ_PRIORITY, ARCV2_IRQ_DEF_PRIO);
84 write_aux_reg(AUX_IRQ_ENABLE, 0);
82 } 85 }
83 86
84 /* setup status32, don't enable intr yet as kernel doesn't want */ 87 /* setup status32, don't enable intr yet as kernel doesn't want */
diff --git a/arch/arc/kernel/intc-compact.c b/arch/arc/kernel/intc-compact.c
index 7e608c6b0a01..cef388025adf 100644
--- a/arch/arc/kernel/intc-compact.c
+++ b/arch/arc/kernel/intc-compact.c
@@ -27,7 +27,7 @@
27 */ 27 */
28void arc_init_IRQ(void) 28void arc_init_IRQ(void)
29{ 29{
30 int level_mask = 0; 30 int level_mask = 0, i;
31 31
32 /* Is timer high priority Interrupt (Level2 in ARCompact jargon) */ 32 /* Is timer high priority Interrupt (Level2 in ARCompact jargon) */
33 level_mask |= IS_ENABLED(CONFIG_ARC_COMPACT_IRQ_LEVELS) << TIMER0_IRQ; 33 level_mask |= IS_ENABLED(CONFIG_ARC_COMPACT_IRQ_LEVELS) << TIMER0_IRQ;
@@ -40,6 +40,18 @@ void arc_init_IRQ(void)
40 40
41 if (level_mask) 41 if (level_mask)
42 pr_info("Level-2 interrupts bitset %x\n", level_mask); 42 pr_info("Level-2 interrupts bitset %x\n", level_mask);
43
44 /*
45 * Disable all IRQ lines so faulty external hardware won't
46 * trigger interrupt that kernel is not ready to handle.
47 */
48 for (i = TIMER0_IRQ; i < NR_CPU_IRQS; i++) {
49 unsigned int ienb;
50
51 ienb = read_aux_reg(AUX_IENABLE);
52 ienb &= ~(1 << i);
53 write_aux_reg(AUX_IENABLE, ienb);
54 }
43} 55}
44 56
45/* 57/*
diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
index a867575a758b..7db283b46ebd 100644
--- a/arch/arc/mm/cache.c
+++ b/arch/arc/mm/cache.c
@@ -665,6 +665,7 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
665 static DEFINE_SPINLOCK(lock); 665 static DEFINE_SPINLOCK(lock);
666 unsigned long flags; 666 unsigned long flags;
667 unsigned int ctrl; 667 unsigned int ctrl;
668 phys_addr_t end;
668 669
669 spin_lock_irqsave(&lock, flags); 670 spin_lock_irqsave(&lock, flags);
670 671
@@ -694,8 +695,19 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
694 * END needs to be setup before START (latter triggers the operation) 695 * END needs to be setup before START (latter triggers the operation)
695 * END can't be same as START, so add (l2_line_sz - 1) to sz 696 * END can't be same as START, so add (l2_line_sz - 1) to sz
696 */ 697 */
697 write_aux_reg(ARC_REG_SLC_RGN_END, (paddr + sz + l2_line_sz - 1)); 698 end = paddr + sz + l2_line_sz - 1;
698 write_aux_reg(ARC_REG_SLC_RGN_START, paddr); 699 if (is_pae40_enabled())
700 write_aux_reg(ARC_REG_SLC_RGN_END1, upper_32_bits(end));
701
702 write_aux_reg(ARC_REG_SLC_RGN_END, lower_32_bits(end));
703
704 if (is_pae40_enabled())
705 write_aux_reg(ARC_REG_SLC_RGN_START1, upper_32_bits(paddr));
706
707 write_aux_reg(ARC_REG_SLC_RGN_START, lower_32_bits(paddr));
708
709 /* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
710 read_aux_reg(ARC_REG_SLC_CTRL);
699 711
700 while (read_aux_reg(ARC_REG_SLC_CTRL) & SLC_CTRL_BUSY); 712 while (read_aux_reg(ARC_REG_SLC_CTRL) & SLC_CTRL_BUSY);
701 713
@@ -1111,6 +1123,13 @@ noinline void __init arc_ioc_setup(void)
1111 __dc_enable(); 1123 __dc_enable();
1112} 1124}
1113 1125
1126/*
1127 * Cache related boot time checks/setups only needed on master CPU:
1128 * - Geometry checks (kernel build and hardware agree: e.g. L1_CACHE_BYTES)
1129 * Assume SMP only, so all cores will have same cache config. A check on
1130 * one core suffices for all
1131 * - IOC setup / dma callbacks only need to be done once
1132 */
1114void __init arc_cache_init_master(void) 1133void __init arc_cache_init_master(void)
1115{ 1134{
1116 unsigned int __maybe_unused cpu = smp_processor_id(); 1135 unsigned int __maybe_unused cpu = smp_processor_id();
@@ -1190,12 +1209,27 @@ void __ref arc_cache_init(void)
1190 1209
1191 printk(arc_cache_mumbojumbo(0, str, sizeof(str))); 1210 printk(arc_cache_mumbojumbo(0, str, sizeof(str)));
1192 1211
1193 /*
1194 * Only master CPU needs to execute rest of function:
1195 * - Assume SMP so all cores will have same cache config so
1196 * any geomtry checks will be same for all
1197 * - IOC setup / dma callbacks only need to be setup once
1198 */
1199 if (!cpu) 1212 if (!cpu)
1200 arc_cache_init_master(); 1213 arc_cache_init_master();
1214
1215 /*
1216 * In PAE regime, TLB and cache maintenance ops take wider addresses
1217 * And even if PAE is not enabled in kernel, the upper 32-bits still need
1218 * to be zeroed to keep the ops sane.
1219 * As an optimization for more common !PAE enabled case, zero them out
1220 * once at init, rather than checking/setting to 0 for every runtime op
1221 */
1222 if (is_isa_arcv2() && pae40_exist_but_not_enab()) {
1223
1224 if (IS_ENABLED(CONFIG_ARC_HAS_ICACHE))
1225 write_aux_reg(ARC_REG_IC_PTAG_HI, 0);
1226
1227 if (IS_ENABLED(CONFIG_ARC_HAS_DCACHE))
1228 write_aux_reg(ARC_REG_DC_PTAG_HI, 0);
1229
1230 if (l2_line_sz) {
1231 write_aux_reg(ARC_REG_SLC_RGN_END1, 0);
1232 write_aux_reg(ARC_REG_SLC_RGN_START1, 0);
1233 }
1234 }
1201} 1235}
diff --git a/arch/arc/mm/dma.c b/arch/arc/mm/dma.c
index 71d3efff99d3..e9d93604ad0f 100644
--- a/arch/arc/mm/dma.c
+++ b/arch/arc/mm/dma.c
@@ -153,6 +153,19 @@ static void _dma_cache_sync(phys_addr_t paddr, size_t size,
153 } 153 }
154} 154}
155 155
156/*
157 * arc_dma_map_page - map a portion of a page for streaming DMA
158 *
159 * Ensure that any data held in the cache is appropriately discarded
160 * or written back.
161 *
162 * The device owns this memory once this call has completed. The CPU
163 * can regain ownership by calling dma_unmap_page().
164 *
165 * Note: while it takes struct page as arg, caller can "abuse" it to pass
166 * a region larger than PAGE_SIZE, provided it is physically contiguous
167 * and this still works correctly
168 */
156static dma_addr_t arc_dma_map_page(struct device *dev, struct page *page, 169static dma_addr_t arc_dma_map_page(struct device *dev, struct page *page,
157 unsigned long offset, size_t size, enum dma_data_direction dir, 170 unsigned long offset, size_t size, enum dma_data_direction dir,
158 unsigned long attrs) 171 unsigned long attrs)
@@ -165,6 +178,24 @@ static dma_addr_t arc_dma_map_page(struct device *dev, struct page *page,
165 return plat_phys_to_dma(dev, paddr); 178 return plat_phys_to_dma(dev, paddr);
166} 179}
167 180
181/*
182 * arc_dma_unmap_page - unmap a buffer previously mapped through dma_map_page()
183 *
184 * After this call, reads by the CPU to the buffer are guaranteed to see
185 * whatever the device wrote there.
186 *
187 * Note: historically this routine was not implemented for ARC
188 */
189static void arc_dma_unmap_page(struct device *dev, dma_addr_t handle,
190 size_t size, enum dma_data_direction dir,
191 unsigned long attrs)
192{
193 phys_addr_t paddr = plat_dma_to_phys(dev, handle);
194
195 if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC))
196 _dma_cache_sync(paddr, size, dir);
197}
198
168static int arc_dma_map_sg(struct device *dev, struct scatterlist *sg, 199static int arc_dma_map_sg(struct device *dev, struct scatterlist *sg,
169 int nents, enum dma_data_direction dir, unsigned long attrs) 200 int nents, enum dma_data_direction dir, unsigned long attrs)
170{ 201{
@@ -178,6 +209,18 @@ static int arc_dma_map_sg(struct device *dev, struct scatterlist *sg,
178 return nents; 209 return nents;
179} 210}
180 211
212static void arc_dma_unmap_sg(struct device *dev, struct scatterlist *sg,
213 int nents, enum dma_data_direction dir,
214 unsigned long attrs)
215{
216 struct scatterlist *s;
217 int i;
218
219 for_each_sg(sg, s, nents, i)
220 arc_dma_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir,
221 attrs);
222}
223
181static void arc_dma_sync_single_for_cpu(struct device *dev, 224static void arc_dma_sync_single_for_cpu(struct device *dev,
182 dma_addr_t dma_handle, size_t size, enum dma_data_direction dir) 225 dma_addr_t dma_handle, size_t size, enum dma_data_direction dir)
183{ 226{
@@ -223,7 +266,9 @@ const struct dma_map_ops arc_dma_ops = {
223 .free = arc_dma_free, 266 .free = arc_dma_free,
224 .mmap = arc_dma_mmap, 267 .mmap = arc_dma_mmap,
225 .map_page = arc_dma_map_page, 268 .map_page = arc_dma_map_page,
269 .unmap_page = arc_dma_unmap_page,
226 .map_sg = arc_dma_map_sg, 270 .map_sg = arc_dma_map_sg,
271 .unmap_sg = arc_dma_unmap_sg,
227 .sync_single_for_device = arc_dma_sync_single_for_device, 272 .sync_single_for_device = arc_dma_sync_single_for_device,
228 .sync_single_for_cpu = arc_dma_sync_single_for_cpu, 273 .sync_single_for_cpu = arc_dma_sync_single_for_cpu,
229 .sync_sg_for_cpu = arc_dma_sync_sg_for_cpu, 274 .sync_sg_for_cpu = arc_dma_sync_sg_for_cpu,
diff --git a/arch/arc/mm/tlb.c b/arch/arc/mm/tlb.c
index d0126fdfe2d8..b181f3ee38aa 100644
--- a/arch/arc/mm/tlb.c
+++ b/arch/arc/mm/tlb.c
@@ -104,6 +104,8 @@
104/* A copy of the ASID from the PID reg is kept in asid_cache */ 104/* A copy of the ASID from the PID reg is kept in asid_cache */
105DEFINE_PER_CPU(unsigned int, asid_cache) = MM_CTXT_FIRST_CYCLE; 105DEFINE_PER_CPU(unsigned int, asid_cache) = MM_CTXT_FIRST_CYCLE;
106 106
107static int __read_mostly pae_exists;
108
107/* 109/*
108 * Utility Routine to erase a J-TLB entry 110 * Utility Routine to erase a J-TLB entry
109 * Caller needs to setup Index Reg (manually or via getIndex) 111 * Caller needs to setup Index Reg (manually or via getIndex)
@@ -784,7 +786,7 @@ void read_decode_mmu_bcr(void)
784 mmu->u_dtlb = mmu4->u_dtlb * 4; 786 mmu->u_dtlb = mmu4->u_dtlb * 4;
785 mmu->u_itlb = mmu4->u_itlb * 4; 787 mmu->u_itlb = mmu4->u_itlb * 4;
786 mmu->sasid = mmu4->sasid; 788 mmu->sasid = mmu4->sasid;
787 mmu->pae = mmu4->pae; 789 pae_exists = mmu->pae = mmu4->pae;
788 } 790 }
789} 791}
790 792
@@ -809,6 +811,11 @@ char *arc_mmu_mumbojumbo(int cpu_id, char *buf, int len)
809 return buf; 811 return buf;
810} 812}
811 813
814int pae40_exist_but_not_enab(void)
815{
816 return pae_exists && !is_pae40_enabled();
817}
818
812void arc_mmu_init(void) 819void arc_mmu_init(void)
813{ 820{
814 char str[256]; 821 char str[256];
@@ -859,6 +866,9 @@ void arc_mmu_init(void)
859 /* swapper_pg_dir is the pgd for the kernel, used by vmalloc */ 866 /* swapper_pg_dir is the pgd for the kernel, used by vmalloc */
860 write_aux_reg(ARC_REG_SCRATCH_DATA0, swapper_pg_dir); 867 write_aux_reg(ARC_REG_SCRATCH_DATA0, swapper_pg_dir);
861#endif 868#endif
869
870 if (pae40_exist_but_not_enab())
871 write_aux_reg(ARC_REG_TLBPD1HI, 0);
862} 872}
863 873
864/* 874/*
diff --git a/arch/arc/plat-sim/Kconfig b/arch/arc/plat-sim/Kconfig
deleted file mode 100644
index ac6af96a82f3..000000000000
--- a/arch/arc/plat-sim/Kconfig
+++ /dev/null
@@ -1,13 +0,0 @@
1#
2# Copyright (C) 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License version 2 as
6# published by the Free Software Foundation.
7#
8
9menuconfig ARC_PLAT_SIM
10 bool "ARC nSIM based simulation virtual platforms"
11 help
12 Support for nSIM based ARC simulation platforms
13 This includes the standalone nSIM (uart only) vs. System C OSCI VP
diff --git a/arch/arc/plat-sim/platform.c b/arch/arc/plat-sim/platform.c
index aea87389e44b..5cda56b1a2ea 100644
--- a/arch/arc/plat-sim/platform.c
+++ b/arch/arc/plat-sim/platform.c
@@ -20,11 +20,14 @@
20 */ 20 */
21 21
22static const char *simulation_compat[] __initconst = { 22static const char *simulation_compat[] __initconst = {
23#ifdef CONFIG_ISA_ARCOMPACT
23 "snps,nsim", 24 "snps,nsim",
24 "snps,nsim_hs",
25 "snps,nsimosci", 25 "snps,nsimosci",
26#else
27 "snps,nsim_hs",
26 "snps,nsimosci_hs", 28 "snps,nsimosci_hs",
27 "snps,zebu_hs", 29 "snps,zebu_hs",
30#endif
28 NULL, 31 NULL,
29}; 32};
30 33
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a208bfe367b5..61a0cb15067e 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -380,7 +380,7 @@ config ARCH_EP93XX
380 bool "EP93xx-based" 380 bool "EP93xx-based"
381 select ARCH_HAS_HOLES_MEMORYMODEL 381 select ARCH_HAS_HOLES_MEMORYMODEL
382 select ARM_AMBA 382 select ARM_AMBA
383 select ARM_PATCH_PHYS_VIRT 383 imply ARM_PATCH_PHYS_VIRT
384 select ARM_VIC 384 select ARM_VIC
385 select AUTO_ZRELADDR 385 select AUTO_ZRELADDR
386 select CLKDEV_LOOKUP 386 select CLKDEV_LOOKUP
diff --git a/arch/arm/boot/dts/armada-388-gp.dts b/arch/arm/boot/dts/armada-388-gp.dts
index 895fa6cfa15a..563901e0ec07 100644
--- a/arch/arm/boot/dts/armada-388-gp.dts
+++ b/arch/arm/boot/dts/armada-388-gp.dts
@@ -75,7 +75,7 @@
75 pinctrl-names = "default"; 75 pinctrl-names = "default";
76 pinctrl-0 = <&pca0_pins>; 76 pinctrl-0 = <&pca0_pins>;
77 interrupt-parent = <&gpio0>; 77 interrupt-parent = <&gpio0>;
78 interrupts = <18 IRQ_TYPE_EDGE_FALLING>; 78 interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
79 gpio-controller; 79 gpio-controller;
80 #gpio-cells = <2>; 80 #gpio-cells = <2>;
81 interrupt-controller; 81 interrupt-controller;
@@ -87,7 +87,7 @@
87 compatible = "nxp,pca9555"; 87 compatible = "nxp,pca9555";
88 pinctrl-names = "default"; 88 pinctrl-names = "default";
89 interrupt-parent = <&gpio0>; 89 interrupt-parent = <&gpio0>;
90 interrupts = <18 IRQ_TYPE_EDGE_FALLING>; 90 interrupts = <18 IRQ_TYPE_LEVEL_LOW>;
91 gpio-controller; 91 gpio-controller;
92 #gpio-cells = <2>; 92 #gpio-cells = <2>;
93 interrupt-controller; 93 interrupt-controller;
diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts
index a423e8ebfb37..67e72bc72e80 100644
--- a/arch/arm/boot/dts/da850-evm.dts
+++ b/arch/arm/boot/dts/da850-evm.dts
@@ -301,25 +301,4 @@
301 pinctrl-names = "default"; 301 pinctrl-names = "default";
302 pinctrl-0 = <&vpif_capture_pins>, <&vpif_display_pins>; 302 pinctrl-0 = <&vpif_capture_pins>, <&vpif_display_pins>;
303 status = "okay"; 303 status = "okay";
304
305 /* VPIF capture port */
306 port@0 {
307 vpif_input_ch0: endpoint@0 {
308 reg = <0>;
309 bus-width = <8>;
310 };
311
312 vpif_input_ch1: endpoint@1 {
313 reg = <1>;
314 bus-width = <8>;
315 data-shift = <8>;
316 };
317 };
318
319 /* VPIF display port */
320 port@1 {
321 vpif_output_ch0: endpoint {
322 bus-width = <8>;
323 };
324 };
325}; 304};
diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts
index b837fec70eec..a0f0916156e6 100644
--- a/arch/arm/boot/dts/da850-lcdk.dts
+++ b/arch/arm/boot/dts/da850-lcdk.dts
@@ -318,11 +318,4 @@
318 pinctrl-names = "default"; 318 pinctrl-names = "default";
319 pinctrl-0 = <&vpif_capture_pins>; 319 pinctrl-0 = <&vpif_capture_pins>;
320 status = "okay"; 320 status = "okay";
321
322 /* VPIF capture port */
323 port {
324 vpif_ch0: endpoint {
325 bus-width = <8>;
326 };
327 };
328}; 321};
diff --git a/arch/arm/boot/dts/dm8168-evm.dts b/arch/arm/boot/dts/dm8168-evm.dts
index 1865976db5f9..c72a2132aa82 100644
--- a/arch/arm/boot/dts/dm8168-evm.dts
+++ b/arch/arm/boot/dts/dm8168-evm.dts
@@ -68,6 +68,34 @@
68 DM816X_IOPAD(0x0d08, MUX_MODE0) /* USB1_DRVVBUS */ 68 DM816X_IOPAD(0x0d08, MUX_MODE0) /* USB1_DRVVBUS */
69 >; 69 >;
70 }; 70 };
71
72 nandflash_pins: nandflash_pins {
73 pinctrl-single,pins = <
74 DM816X_IOPAD(0x0b38, PULL_UP | MUX_MODE0) /* PINCTRL207 GPMC_CS0*/
75 DM816X_IOPAD(0x0b60, PULL_ENA | MUX_MODE0) /* PINCTRL217 GPMC_ADV_ALE */
76 DM816X_IOPAD(0x0b54, PULL_UP | PULL_ENA | MUX_MODE0) /* PINCTRL214 GPMC_OE_RE */
77 DM816X_IOPAD(0x0b58, PULL_ENA | MUX_MODE0) /* PINCTRL215 GPMC_BE0_CLE */
78 DM816X_IOPAD(0x0b50, PULL_UP | MUX_MODE0) /* PINCTRL213 GPMC_WE */
79 DM816X_IOPAD(0x0b6c, MUX_MODE0) /* PINCTRL220 GPMC_WAIT */
80 DM816X_IOPAD(0x0be4, PULL_ENA | MUX_MODE0) /* PINCTRL250 GPMC_CLK */
81 DM816X_IOPAD(0x0ba4, MUX_MODE0) /* PINCTRL234 GPMC_D0 */
82 DM816X_IOPAD(0x0ba8, MUX_MODE0) /* PINCTRL234 GPMC_D1 */
83 DM816X_IOPAD(0x0bac, MUX_MODE0) /* PINCTRL234 GPMC_D2 */
84 DM816X_IOPAD(0x0bb0, MUX_MODE0) /* PINCTRL234 GPMC_D3 */
85 DM816X_IOPAD(0x0bb4, MUX_MODE0) /* PINCTRL234 GPMC_D4 */
86 DM816X_IOPAD(0x0bb8, MUX_MODE0) /* PINCTRL234 GPMC_D5 */
87 DM816X_IOPAD(0x0bbc, MUX_MODE0) /* PINCTRL234 GPMC_D6 */
88 DM816X_IOPAD(0x0bc0, MUX_MODE0) /* PINCTRL234 GPMC_D7 */
89 DM816X_IOPAD(0x0bc4, MUX_MODE0) /* PINCTRL234 GPMC_D8 */
90 DM816X_IOPAD(0x0bc8, MUX_MODE0) /* PINCTRL234 GPMC_D9 */
91 DM816X_IOPAD(0x0bcc, MUX_MODE0) /* PINCTRL234 GPMC_D10 */
92 DM816X_IOPAD(0x0bd0, MUX_MODE0) /* PINCTRL234 GPMC_D11 */
93 DM816X_IOPAD(0x0bd4, MUX_MODE0) /* PINCTRL234 GPMC_D12 */
94 DM816X_IOPAD(0x0bd8, MUX_MODE0) /* PINCTRL234 GPMC_D13 */
95 DM816X_IOPAD(0x0bdc, MUX_MODE0) /* PINCTRL234 GPMC_D14 */
96 DM816X_IOPAD(0x0be0, MUX_MODE0) /* PINCTRL234 GPMC_D15 */
97 >;
98 };
71}; 99};
72 100
73&i2c1 { 101&i2c1 {
@@ -90,6 +118,8 @@
90 118
91&gpmc { 119&gpmc {
92 ranges = <0 0 0x04000000 0x01000000>; /* CS0: 16MB for NAND */ 120 ranges = <0 0 0x04000000 0x01000000>; /* CS0: 16MB for NAND */
121 pinctrl-names = "default";
122 pinctrl-0 = <&nandflash_pins>;
93 123
94 nand@0,0 { 124 nand@0,0 {
95 compatible = "ti,omap2-nand"; 125 compatible = "ti,omap2-nand";
@@ -98,9 +128,11 @@
98 interrupt-parent = <&gpmc>; 128 interrupt-parent = <&gpmc>;
99 interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */ 129 interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
100 <1 IRQ_TYPE_NONE>; /* termcount */ 130 <1 IRQ_TYPE_NONE>; /* termcount */
131 rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 */
101 #address-cells = <1>; 132 #address-cells = <1>;
102 #size-cells = <1>; 133 #size-cells = <1>;
103 ti,nand-ecc-opt = "bch8"; 134 ti,nand-ecc-opt = "bch8";
135 ti,elm-id = <&elm>;
104 nand-bus-width = <16>; 136 nand-bus-width = <16>;
105 gpmc,device-width = <2>; 137 gpmc,device-width = <2>;
106 gpmc,sync-clk-ps = <0>; 138 gpmc,sync-clk-ps = <0>;
@@ -164,7 +196,7 @@
164 vmmc-supply = <&vmmcsd_fixed>; 196 vmmc-supply = <&vmmcsd_fixed>;
165 bus-width = <4>; 197 bus-width = <4>;
166 cd-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>; 198 cd-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
167 wp-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>; 199 wp-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>;
168}; 200};
169 201
170/* At least dm8168-evm rev c won't support multipoint, later may */ 202/* At least dm8168-evm rev c won't support multipoint, later may */
diff --git a/arch/arm/boot/dts/dm816x.dtsi b/arch/arm/boot/dts/dm816x.dtsi
index 59cbf958fcc3..566b2a8c8b96 100644
--- a/arch/arm/boot/dts/dm816x.dtsi
+++ b/arch/arm/boot/dts/dm816x.dtsi
@@ -145,7 +145,7 @@
145 }; 145 };
146 146
147 elm: elm@48080000 { 147 elm: elm@48080000 {
148 compatible = "ti,816-elm"; 148 compatible = "ti,am3352-elm";
149 ti,hwmods = "elm"; 149 ti,hwmods = "elm";
150 reg = <0x48080000 0x2000>; 150 reg = <0x48080000 0x2000>;
151 interrupts = <4>; 151 interrupts = <4>;
diff --git a/arch/arm/boot/dts/dra71-evm.dts b/arch/arm/boot/dts/dra71-evm.dts
index 4d57a55473af..a6298eb56978 100644
--- a/arch/arm/boot/dts/dra71-evm.dts
+++ b/arch/arm/boot/dts/dra71-evm.dts
@@ -190,7 +190,7 @@
190 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>; 190 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
191 ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>; 191 ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
192 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>; 192 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
193 ti,impedance-control = <0x1f>; 193 ti,min-output-impedance;
194 }; 194 };
195 195
196 dp83867_1: ethernet-phy@3 { 196 dp83867_1: ethernet-phy@3 {
@@ -198,7 +198,7 @@
198 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>; 198 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
199 ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>; 199 ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
200 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>; 200 ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
201 ti,impedance-control = <0x1f>; 201 ti,min-output-impedance;
202 }; 202 };
203}; 203};
204 204
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 497a9470c888..5739389f5bb8 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -59,6 +59,9 @@
59 compatible = "samsung,exynos4210-audss-clock"; 59 compatible = "samsung,exynos4210-audss-clock";
60 reg = <0x03810000 0x0C>; 60 reg = <0x03810000 0x0C>;
61 #clock-cells = <1>; 61 #clock-cells = <1>;
62 clocks = <&clock CLK_FIN_PLL>, <&clock CLK_FOUT_EPLL>,
63 <&clock CLK_SCLK_AUDIO0>, <&clock CLK_SCLK_AUDIO0>;
64 clock-names = "pll_ref", "pll_in", "sclk_audio", "sclk_pcm_in";
62 }; 65 };
63 66
64 i2s0: i2s@03830000 { 67 i2s0: i2s@03830000 {
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
index f92f95741207..a183b56283f8 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
@@ -266,6 +266,7 @@
266 266
267&hdmicec { 267&hdmicec {
268 status = "okay"; 268 status = "okay";
269 needs-hpd;
269}; 270};
270 271
271&hsi2c_4 { 272&hsi2c_4 {
diff --git a/arch/arm/boot/dts/imx25.dtsi b/arch/arm/boot/dts/imx25.dtsi
index dfcc8e00cf1c..0ade3619f3c3 100644
--- a/arch/arm/boot/dts/imx25.dtsi
+++ b/arch/arm/boot/dts/imx25.dtsi
@@ -297,6 +297,7 @@
297 #address-cells = <1>; 297 #address-cells = <1>;
298 #size-cells = <1>; 298 #size-cells = <1>;
299 status = "disabled"; 299 status = "disabled";
300 ranges;
300 301
301 adc: adc@50030800 { 302 adc: adc@50030800 {
302 compatible = "fsl,imx25-gcq"; 303 compatible = "fsl,imx25-gcq";
diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi
index aeaa5a6e4fcf..a24e4f1911ab 100644
--- a/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-nitrogen6_som2.dtsi
@@ -507,7 +507,7 @@
507 pinctrl_pcie: pciegrp { 507 pinctrl_pcie: pciegrp {
508 fsl,pins = < 508 fsl,pins = <
509 /* PCIe reset */ 509 /* PCIe reset */
510 MX6QDL_PAD_EIM_BCLK__GPIO6_IO31 0x030b0 510 MX6QDL_PAD_EIM_DA0__GPIO3_IO00 0x030b0
511 MX6QDL_PAD_EIM_DA4__GPIO3_IO04 0x030b0 511 MX6QDL_PAD_EIM_DA4__GPIO3_IO04 0x030b0
512 >; 512 >;
513 }; 513 };
@@ -668,7 +668,7 @@
668&pcie { 668&pcie {
669 pinctrl-names = "default"; 669 pinctrl-names = "default";
670 pinctrl-0 = <&pinctrl_pcie>; 670 pinctrl-0 = <&pinctrl_pcie>;
671 reset-gpio = <&gpio6 31 GPIO_ACTIVE_LOW>; 671 reset-gpio = <&gpio3 0 GPIO_ACTIVE_LOW>;
672 status = "okay"; 672 status = "okay";
673}; 673};
674 674
diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts
index 54c45402286b..0a24d1bf3c39 100644
--- a/arch/arm/boot/dts/imx7d-sdb.dts
+++ b/arch/arm/boot/dts/imx7d-sdb.dts
@@ -557,6 +557,14 @@
557 >; 557 >;
558 }; 558 };
559 559
560 pinctrl_spi4: spi4grp {
561 fsl,pins = <
562 MX7D_PAD_GPIO1_IO09__GPIO1_IO9 0x59
563 MX7D_PAD_GPIO1_IO12__GPIO1_IO12 0x59
564 MX7D_PAD_GPIO1_IO13__GPIO1_IO13 0x59
565 >;
566 };
567
560 pinctrl_tsc2046_pendown: tsc2046_pendown { 568 pinctrl_tsc2046_pendown: tsc2046_pendown {
561 fsl,pins = < 569 fsl,pins = <
562 MX7D_PAD_EPDC_BDR1__GPIO2_IO29 0x59 570 MX7D_PAD_EPDC_BDR1__GPIO2_IO29 0x59
@@ -697,13 +705,5 @@
697 fsl,pins = < 705 fsl,pins = <
698 MX7D_PAD_LPSR_GPIO1_IO01__PWM1_OUT 0x110b0 706 MX7D_PAD_LPSR_GPIO1_IO01__PWM1_OUT 0x110b0
699 >; 707 >;
700
701 pinctrl_spi4: spi4grp {
702 fsl,pins = <
703 MX7D_PAD_GPIO1_IO09__GPIO1_IO9 0x59
704 MX7D_PAD_GPIO1_IO12__GPIO1_IO12 0x59
705 MX7D_PAD_GPIO1_IO13__GPIO1_IO13 0x59
706 >;
707 };
708 }; 708 };
709}; 709};
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 2484f11761ea..858e1fed762a 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -1126,8 +1126,8 @@
1126 }; 1126 };
1127 }; 1127 };
1128 1128
1129 gpu: mali@ffa30000 { 1129 gpu: gpu@ffa30000 {
1130 compatible = "rockchip,rk3288-mali", "arm,mali-t760", "arm,mali-midgard"; 1130 compatible = "rockchip,rk3288-mali", "arm,mali-t760";
1131 reg = <0xffa30000 0x10000>; 1131 reg = <0xffa30000 0x10000>;
1132 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>, 1132 interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>,
1133 <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, 1133 <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/arch/arm/boot/dts/sama5d2.dtsi b/arch/arm/boot/dts/sama5d2.dtsi
index cc06da394366..60e69aeacbdb 100644
--- a/arch/arm/boot/dts/sama5d2.dtsi
+++ b/arch/arm/boot/dts/sama5d2.dtsi
@@ -303,7 +303,7 @@
303 #size-cells = <1>; 303 #size-cells = <1>;
304 atmel,smc = <&hsmc>; 304 atmel,smc = <&hsmc>;
305 reg = <0x10000000 0x10000000 305 reg = <0x10000000 0x10000000
306 0x40000000 0x30000000>; 306 0x60000000 0x30000000>;
307 ranges = <0x0 0x0 0x10000000 0x10000000 307 ranges = <0x0 0x0 0x10000000 0x10000000
308 0x1 0x0 0x60000000 0x10000000 308 0x1 0x0 0x60000000 0x10000000
309 0x2 0x0 0x70000000 0x10000000 309 0x2 0x0 0x70000000 0x10000000
@@ -1048,18 +1048,18 @@
1048 }; 1048 };
1049 1049
1050 hsmc: hsmc@f8014000 { 1050 hsmc: hsmc@f8014000 {
1051 compatible = "atmel,sama5d3-smc", "syscon", "simple-mfd"; 1051 compatible = "atmel,sama5d2-smc", "syscon", "simple-mfd";
1052 reg = <0xf8014000 0x1000>; 1052 reg = <0xf8014000 0x1000>;
1053 interrupts = <5 IRQ_TYPE_LEVEL_HIGH 6>; 1053 interrupts = <17 IRQ_TYPE_LEVEL_HIGH 6>;
1054 clocks = <&hsmc_clk>; 1054 clocks = <&hsmc_clk>;
1055 #address-cells = <1>; 1055 #address-cells = <1>;
1056 #size-cells = <1>; 1056 #size-cells = <1>;
1057 ranges; 1057 ranges;
1058 1058
1059 pmecc: ecc-engine@ffffc070 { 1059 pmecc: ecc-engine@f8014070 {
1060 compatible = "atmel,sama5d2-pmecc"; 1060 compatible = "atmel,sama5d2-pmecc";
1061 reg = <0xffffc070 0x490>, 1061 reg = <0xf8014070 0x490>,
1062 <0xffffc500 0x100>; 1062 <0xf8014500 0x100>;
1063 }; 1063 };
1064 }; 1064 };
1065 1065
diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi
index 8923ba625b76..19a8f4fcfab5 100644
--- a/arch/arm/boot/dts/sun8i-a83t.dtsi
+++ b/arch/arm/boot/dts/sun8i-a83t.dtsi
@@ -44,7 +44,9 @@
44 44
45#include <dt-bindings/interrupt-controller/arm-gic.h> 45#include <dt-bindings/interrupt-controller/arm-gic.h>
46 46
47#include <dt-bindings/clock/sun8i-a83t-ccu.h>
47#include <dt-bindings/clock/sun8i-r-ccu.h> 48#include <dt-bindings/clock/sun8i-r-ccu.h>
49#include <dt-bindings/reset/sun8i-a83t-ccu.h>
48 50
49/ { 51/ {
50 interrupt-parent = <&gic>; 52 interrupt-parent = <&gic>;
@@ -175,8 +177,8 @@
175 compatible = "allwinner,sun8i-a83t-dma"; 177 compatible = "allwinner,sun8i-a83t-dma";
176 reg = <0x01c02000 0x1000>; 178 reg = <0x01c02000 0x1000>;
177 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; 179 interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
178 clocks = <&ccu 21>; 180 clocks = <&ccu CLK_BUS_DMA>;
179 resets = <&ccu 7>; 181 resets = <&ccu RST_BUS_DMA>;
180 #dma-cells = <1>; 182 #dma-cells = <1>;
181 }; 183 };
182 184
@@ -195,7 +197,7 @@
195 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>, 197 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
196 <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>; 198 <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
197 reg = <0x01c20800 0x400>; 199 reg = <0x01c20800 0x400>;
198 clocks = <&ccu 45>, <&osc24M>, <&osc16Md512>; 200 clocks = <&ccu CLK_BUS_PIO>, <&osc24M>, <&osc16Md512>;
199 clock-names = "apb", "hosc", "losc"; 201 clock-names = "apb", "hosc", "losc";
200 gpio-controller; 202 gpio-controller;
201 interrupt-controller; 203 interrupt-controller;
@@ -247,8 +249,8 @@
247 "allwinner,sun8i-h3-spdif"; 249 "allwinner,sun8i-h3-spdif";
248 reg = <0x01c21000 0x400>; 250 reg = <0x01c21000 0x400>;
249 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; 251 interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>;
250 clocks = <&ccu 44>, <&ccu 76>; 252 clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
251 resets = <&ccu 32>; 253 resets = <&ccu RST_BUS_SPDIF>;
252 clock-names = "apb", "spdif"; 254 clock-names = "apb", "spdif";
253 dmas = <&dma 2>; 255 dmas = <&dma 2>;
254 dma-names = "tx"; 256 dma-names = "tx";
@@ -263,8 +265,8 @@
263 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>; 265 interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
264 reg-shift = <2>; 266 reg-shift = <2>;
265 reg-io-width = <4>; 267 reg-io-width = <4>;
266 clocks = <&ccu 53>; 268 clocks = <&ccu CLK_BUS_UART0>;
267 resets = <&ccu 40>; 269 resets = <&ccu RST_BUS_UART0>;
268 status = "disabled"; 270 status = "disabled";
269 }; 271 };
270 272
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index 6f2162608006..d38282b9e5d4 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -394,7 +394,7 @@
394 emac: ethernet@1c30000 { 394 emac: ethernet@1c30000 {
395 compatible = "allwinner,sun8i-h3-emac"; 395 compatible = "allwinner,sun8i-h3-emac";
396 syscon = <&syscon>; 396 syscon = <&syscon>;
397 reg = <0x01c30000 0x104>; 397 reg = <0x01c30000 0x10000>;
398 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 398 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
399 interrupt-names = "macirq"; 399 interrupt-names = "macirq";
400 resets = <&ccu RST_BUS_EMAC>; 400 resets = <&ccu RST_BUS_EMAC>;
diff --git a/arch/arm/boot/dts/tango4-vantage-1172.dts b/arch/arm/boot/dts/tango4-vantage-1172.dts
index 86d8df98802f..13bcc460bcb2 100644
--- a/arch/arm/boot/dts/tango4-vantage-1172.dts
+++ b/arch/arm/boot/dts/tango4-vantage-1172.dts
@@ -22,7 +22,7 @@
22}; 22};
23 23
24&eth0 { 24&eth0 {
25 phy-connection-type = "rgmii"; 25 phy-connection-type = "rgmii-id";
26 phy-handle = <&eth0_phy>; 26 phy-handle = <&eth0_phy>;
27 #address-cells = <1>; 27 #address-cells = <1>;
28 #size-cells = <0>; 28 #size-cells = <0>;
diff --git a/arch/arm/include/asm/tlb.h b/arch/arm/include/asm/tlb.h
index 3f2eb76243e3..d5562f9ce600 100644
--- a/arch/arm/include/asm/tlb.h
+++ b/arch/arm/include/asm/tlb.h
@@ -148,7 +148,8 @@ static inline void tlb_flush_mmu(struct mmu_gather *tlb)
148} 148}
149 149
150static inline void 150static inline void
151tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) 151arch_tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
152 unsigned long start, unsigned long end)
152{ 153{
153 tlb->mm = mm; 154 tlb->mm = mm;
154 tlb->fullmm = !(start | (end+1)); 155 tlb->fullmm = !(start | (end+1));
@@ -166,8 +167,14 @@ tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start
166} 167}
167 168
168static inline void 169static inline void
169tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) 170arch_tlb_finish_mmu(struct mmu_gather *tlb,
171 unsigned long start, unsigned long end, bool force)
170{ 172{
173 if (force) {
174 tlb->range_start = start;
175 tlb->range_end = end;
176 }
177
171 tlb_flush_mmu(tlb); 178 tlb_flush_mmu(tlb);
172 179
173 /* keep the page table cache within bounds */ 180 /* keep the page table cache within bounds */
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index d735e5fc4772..195da38cb9a2 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -1,7 +1,7 @@
1menuconfig ARCH_AT91 1menuconfig ARCH_AT91
2 bool "Atmel SoCs" 2 bool "Atmel SoCs"
3 depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M 3 depends on ARCH_MULTI_V4T || ARCH_MULTI_V5 || ARCH_MULTI_V7 || ARM_SINGLE_ARMV7M
4 select ARM_CPU_SUSPEND if PM 4 select ARM_CPU_SUSPEND if PM && ARCH_MULTI_V7
5 select COMMON_CLK_AT91 5 select COMMON_CLK_AT91
6 select GPIOLIB 6 select GPIOLIB
7 select PINCTRL 7 select PINCTRL
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 667fddac3856..5036f996e694 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -608,6 +608,9 @@ static void __init at91_pm_init(void (*pm_idle)(void))
608 608
609void __init at91rm9200_pm_init(void) 609void __init at91rm9200_pm_init(void)
610{ 610{
611 if (!IS_ENABLED(CONFIG_SOC_AT91RM9200))
612 return;
613
611 at91_dt_ramc(); 614 at91_dt_ramc();
612 615
613 /* 616 /*
@@ -620,18 +623,27 @@ void __init at91rm9200_pm_init(void)
620 623
621void __init at91sam9_pm_init(void) 624void __init at91sam9_pm_init(void)
622{ 625{
626 if (!IS_ENABLED(CONFIG_SOC_AT91SAM9))
627 return;
628
623 at91_dt_ramc(); 629 at91_dt_ramc();
624 at91_pm_init(at91sam9_idle); 630 at91_pm_init(at91sam9_idle);
625} 631}
626 632
627void __init sama5_pm_init(void) 633void __init sama5_pm_init(void)
628{ 634{
635 if (!IS_ENABLED(CONFIG_SOC_SAMA5))
636 return;
637
629 at91_dt_ramc(); 638 at91_dt_ramc();
630 at91_pm_init(NULL); 639 at91_pm_init(NULL);
631} 640}
632 641
633void __init sama5d2_pm_init(void) 642void __init sama5d2_pm_init(void)
634{ 643{
644 if (!IS_ENABLED(CONFIG_SOC_SAMA5D2))
645 return;
646
635 at91_pm_backup_init(); 647 at91_pm_backup_init();
636 sama5_pm_init(); 648 sama5_pm_init();
637} 649}
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index b5625d009288..e568c8c6f69c 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1166,7 +1166,7 @@ static struct tvp514x_platform_data tvp5146_pdata = {
1166 1166
1167#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL) 1167#define TVP514X_STD_ALL (V4L2_STD_NTSC | V4L2_STD_PAL)
1168 1168
1169static const struct vpif_input da850_ch0_inputs[] = { 1169static struct vpif_input da850_ch0_inputs[] = {
1170 { 1170 {
1171 .input = { 1171 .input = {
1172 .index = 0, 1172 .index = 0,
@@ -1181,7 +1181,7 @@ static const struct vpif_input da850_ch0_inputs[] = {
1181 }, 1181 },
1182}; 1182};
1183 1183
1184static const struct vpif_input da850_ch1_inputs[] = { 1184static struct vpif_input da850_ch1_inputs[] = {
1185 { 1185 {
1186 .input = { 1186 .input = {
1187 .index = 0, 1187 .index = 0,
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index f5dce9b4e617..f77a4f766050 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -218,6 +218,15 @@ int clk_set_parent(struct clk *clk, struct clk *parent)
218} 218}
219EXPORT_SYMBOL(clk_set_parent); 219EXPORT_SYMBOL(clk_set_parent);
220 220
221struct clk *clk_get_parent(struct clk *clk)
222{
223 if (!clk)
224 return NULL;
225
226 return clk->parent;
227}
228EXPORT_SYMBOL(clk_get_parent);
229
221int clk_register(struct clk *clk) 230int clk_register(struct clk *clk)
222{ 231{
223 if (clk == NULL || IS_ERR(clk)) 232 if (clk == NULL || IS_ERR(clk))
diff --git a/arch/arm/mach-ep93xx/clock.c b/arch/arm/mach-ep93xx/clock.c
index 39ef3b613912..beec5f16443a 100644
--- a/arch/arm/mach-ep93xx/clock.c
+++ b/arch/arm/mach-ep93xx/clock.c
@@ -475,6 +475,26 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
475} 475}
476EXPORT_SYMBOL(clk_set_rate); 476EXPORT_SYMBOL(clk_set_rate);
477 477
478long clk_round_rate(struct clk *clk, unsigned long rate)
479{
480 WARN_ON(clk);
481 return 0;
482}
483EXPORT_SYMBOL(clk_round_rate);
484
485int clk_set_parent(struct clk *clk, struct clk *parent)
486{
487 WARN_ON(clk);
488 return 0;
489}
490EXPORT_SYMBOL(clk_set_parent);
491
492struct clk *clk_get_parent(struct clk *clk)
493{
494 return clk->parent;
495}
496EXPORT_SYMBOL(clk_get_parent);
497
478 498
479static char fclk_divisors[] = { 1, 2, 4, 8, 16, 1, 1, 1 }; 499static char fclk_divisors[] = { 1, 2, 4, 8, 16, 1, 1, 1 };
480static char hclk_divisors[] = { 1, 2, 4, 5, 6, 8, 16, 32 }; 500static char hclk_divisors[] = { 1, 2, 4, 5, 6, 8, 16, 32 };
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h
index 7a0c13bf4269..844e8ac593e2 100644
--- a/arch/arm/mach-ixp4xx/include/mach/io.h
+++ b/arch/arm/mach-ixp4xx/include/mach/io.h
@@ -95,8 +95,10 @@ static inline void __indirect_writeb(u8 value, volatile void __iomem *p)
95} 95}
96 96
97static inline void __indirect_writesb(volatile void __iomem *bus_addr, 97static inline void __indirect_writesb(volatile void __iomem *bus_addr,
98 const u8 *vaddr, int count) 98 const void *p, int count)
99{ 99{
100 const u8 *vaddr = p;
101
100 while (count--) 102 while (count--)
101 writeb(*vaddr++, bus_addr); 103 writeb(*vaddr++, bus_addr);
102} 104}
@@ -118,8 +120,10 @@ static inline void __indirect_writew(u16 value, volatile void __iomem *p)
118} 120}
119 121
120static inline void __indirect_writesw(volatile void __iomem *bus_addr, 122static inline void __indirect_writesw(volatile void __iomem *bus_addr,
121 const u16 *vaddr, int count) 123 const void *p, int count)
122{ 124{
125 const u16 *vaddr = p;
126
123 while (count--) 127 while (count--)
124 writew(*vaddr++, bus_addr); 128 writew(*vaddr++, bus_addr);
125} 129}
@@ -137,8 +141,9 @@ static inline void __indirect_writel(u32 value, volatile void __iomem *p)
137} 141}
138 142
139static inline void __indirect_writesl(volatile void __iomem *bus_addr, 143static inline void __indirect_writesl(volatile void __iomem *bus_addr,
140 const u32 *vaddr, int count) 144 const void *p, int count)
141{ 145{
146 const u32 *vaddr = p;
142 while (count--) 147 while (count--)
143 writel(*vaddr++, bus_addr); 148 writel(*vaddr++, bus_addr);
144} 149}
@@ -160,8 +165,10 @@ static inline u8 __indirect_readb(const volatile void __iomem *p)
160} 165}
161 166
162static inline void __indirect_readsb(const volatile void __iomem *bus_addr, 167static inline void __indirect_readsb(const volatile void __iomem *bus_addr,
163 u8 *vaddr, u32 count) 168 void *p, u32 count)
164{ 169{
170 u8 *vaddr = p;
171
165 while (count--) 172 while (count--)
166 *vaddr++ = readb(bus_addr); 173 *vaddr++ = readb(bus_addr);
167} 174}
@@ -183,8 +190,10 @@ static inline u16 __indirect_readw(const volatile void __iomem *p)
183} 190}
184 191
185static inline void __indirect_readsw(const volatile void __iomem *bus_addr, 192static inline void __indirect_readsw(const volatile void __iomem *bus_addr,
186 u16 *vaddr, u32 count) 193 void *p, u32 count)
187{ 194{
195 u16 *vaddr = p;
196
188 while (count--) 197 while (count--)
189 *vaddr++ = readw(bus_addr); 198 *vaddr++ = readw(bus_addr);
190} 199}
@@ -204,8 +213,10 @@ static inline u32 __indirect_readl(const volatile void __iomem *p)
204} 213}
205 214
206static inline void __indirect_readsl(const volatile void __iomem *bus_addr, 215static inline void __indirect_readsl(const volatile void __iomem *bus_addr,
207 u32 *vaddr, u32 count) 216 void *p, u32 count)
208{ 217{
218 u32 *vaddr = p;
219
209 while (count--) 220 while (count--)
210 *vaddr++ = readl(bus_addr); 221 *vaddr++ = readl(bus_addr);
211} 222}
@@ -523,8 +534,15 @@ static inline void iowrite32_rep(void __iomem *addr, const void *vaddr,
523#endif 534#endif
524} 535}
525 536
526#define ioport_map(port, nr) ((void __iomem*)(port + PIO_OFFSET)) 537#define ioport_map(port, nr) ioport_map(port, nr)
527#define ioport_unmap(addr) 538static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
539{
540 return ((void __iomem*)((port) + PIO_OFFSET));
541}
542#define ioport_unmap(addr) ioport_unmap(addr)
543static inline void ioport_unmap(void __iomem *addr)
544{
545}
528#endif /* CONFIG_PCI */ 546#endif /* CONFIG_PCI */
529 547
530#endif /* __ASM_ARM_ARCH_IO_H */ 548#endif /* __ASM_ARM_ARCH_IO_H */
diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c
index 3330ac7cfbef..671c7a09ab3d 100644
--- a/arch/arm/mach-mmp/devices.c
+++ b/arch/arm/mach-mmp/devices.c
@@ -238,7 +238,7 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg)
238#endif 238#endif
239 239
240#if IS_ENABLED(CONFIG_USB_SUPPORT) 240#if IS_ENABLED(CONFIG_USB_SUPPORT)
241static u64 usb_dma_mask = ~(u32)0; 241static u64 __maybe_unused usb_dma_mask = ~(u32)0;
242 242
243#if IS_ENABLED(CONFIG_USB_MV_UDC) 243#if IS_ENABLED(CONFIG_USB_MV_UDC)
244struct resource pxa168_u2o_resources[] = { 244struct resource pxa168_u2o_resources[] = {
diff --git a/arch/arm/mach-mvebu/platsmp.c b/arch/arm/mach-mvebu/platsmp.c
index e62273aacb43..4ffbbd217e82 100644
--- a/arch/arm/mach-mvebu/platsmp.c
+++ b/arch/arm/mach-mvebu/platsmp.c
@@ -211,7 +211,7 @@ static int mv98dx3236_resume_set_cpu_boot_addr(int hw_cpu, void *boot_addr)
211 return PTR_ERR(base); 211 return PTR_ERR(base);
212 212
213 writel(0, base + MV98DX3236_CPU_RESUME_CTRL_REG); 213 writel(0, base + MV98DX3236_CPU_RESUME_CTRL_REG);
214 writel(virt_to_phys(boot_addr), base + MV98DX3236_CPU_RESUME_ADDR_REG); 214 writel(__pa_symbol(boot_addr), base + MV98DX3236_CPU_RESUME_ADDR_REG);
215 215
216 iounmap(base); 216 iounmap(base);
217 217
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 6613a6ff5dbc..6cbc69c92913 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -510,6 +510,7 @@ static void __init ams_delta_init(void)
510static void modem_pm(struct uart_port *port, unsigned int state, unsigned old) 510static void modem_pm(struct uart_port *port, unsigned int state, unsigned old)
511{ 511{
512 struct modem_private_data *priv = port->private_data; 512 struct modem_private_data *priv = port->private_data;
513 int ret;
513 514
514 if (IS_ERR(priv->regulator)) 515 if (IS_ERR(priv->regulator))
515 return; 516 return;
@@ -518,9 +519,16 @@ static void modem_pm(struct uart_port *port, unsigned int state, unsigned old)
518 return; 519 return;
519 520
520 if (state == 0) 521 if (state == 0)
521 regulator_enable(priv->regulator); 522 ret = regulator_enable(priv->regulator);
522 else if (old == 0) 523 else if (old == 0)
523 regulator_disable(priv->regulator); 524 ret = regulator_disable(priv->regulator);
525 else
526 ret = 0;
527
528 if (ret)
529 dev_warn(port->dev,
530 "ams_delta modem_pm: failed to %sable regulator: %d\n",
531 state ? "dis" : "en", ret);
524} 532}
525 533
526static struct plat_serial8250_port ams_delta_modem_ports[] = { 534static struct plat_serial8250_port ams_delta_modem_ports[] = {
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 4dfb99504810..95ac1929aede 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -441,13 +441,11 @@ static struct spi_board_info __initdata mistral_boardinfo[] = { {
441 .chip_select = 0, 441 .chip_select = 0,
442} }; 442} };
443 443
444#ifdef CONFIG_PM
445static irqreturn_t 444static irqreturn_t
446osk_mistral_wake_interrupt(int irq, void *ignored) 445osk_mistral_wake_interrupt(int irq, void *ignored)
447{ 446{
448 return IRQ_HANDLED; 447 return IRQ_HANDLED;
449} 448}
450#endif
451 449
452static void __init osk_mistral_init(void) 450static void __init osk_mistral_init(void)
453{ 451{
@@ -515,7 +513,6 @@ static void __init osk_mistral_init(void)
515 513
516 gpio_direction_input(OMAP_MPUIO(2)); 514 gpio_direction_input(OMAP_MPUIO(2));
517 irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING); 515 irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
518#ifdef CONFIG_PM
519 /* share the IRQ in case someone wants to use the 516 /* share the IRQ in case someone wants to use the
520 * button for more than wakeup from system sleep. 517 * button for more than wakeup from system sleep.
521 */ 518 */
@@ -529,7 +526,6 @@ static void __init osk_mistral_init(void)
529 ret); 526 ret);
530 } else 527 } else
531 enable_irq_wake(irq); 528 enable_irq_wake(irq);
532#endif
533 } else 529 } else
534 printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); 530 printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");
535 531
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index dc9e34e670a2..b1e661bb5521 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -28,7 +28,7 @@ static const struct of_device_id omap_dt_match_table[] __initconst = {
28 { } 28 { }
29}; 29};
30 30
31static void __init omap_generic_init(void) 31static void __init __maybe_unused omap_generic_init(void)
32{ 32{
33 pdata_quirks_init(omap_dt_match_table); 33 pdata_quirks_init(omap_dt_match_table);
34 34
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 1d739d1a0a65..1cd20e4d56b0 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -410,7 +410,7 @@ static int _set_hwmod_postsetup_state(struct omap_hwmod *oh, void *data)
410 return omap_hwmod_set_postsetup_state(oh, *(u8 *)data); 410 return omap_hwmod_set_postsetup_state(oh, *(u8 *)data);
411} 411}
412 412
413static void __init omap_hwmod_init_postsetup(void) 413static void __init __maybe_unused omap_hwmod_init_postsetup(void)
414{ 414{
415 u8 postsetup_state; 415 u8 postsetup_state;
416 416
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index d44e0e2f1106..841ba19d64a6 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -486,7 +486,6 @@ int __init omap3_pm_init(void)
486 ret = request_irq(omap_prcm_event_to_irq("io"), 486 ret = request_irq(omap_prcm_event_to_irq("io"),
487 _prcm_int_handle_io, IRQF_SHARED | IRQF_NO_SUSPEND, "pm_io", 487 _prcm_int_handle_io, IRQF_SHARED | IRQF_NO_SUSPEND, "pm_io",
488 omap3_pm_init); 488 omap3_pm_init);
489 enable_irq(omap_prcm_event_to_irq("io"));
490 489
491 if (ret) { 490 if (ret) {
492 pr_err("pm: Failed to request pm_io irq\n"); 491 pr_err("pm: Failed to request pm_io irq\n");
diff --git a/arch/arm/mach-omap2/prm3xxx.c b/arch/arm/mach-omap2/prm3xxx.c
index 382e236fbfd9..64f6451499a7 100644
--- a/arch/arm/mach-omap2/prm3xxx.c
+++ b/arch/arm/mach-omap2/prm3xxx.c
@@ -692,7 +692,6 @@ static int omap3xxx_prm_late_init(void)
692{ 692{
693 struct device_node *np; 693 struct device_node *np;
694 int irq_num; 694 int irq_num;
695 int ret;
696 695
697 if (!(prm_features & PRM_HAS_IO_WAKEUP)) 696 if (!(prm_features & PRM_HAS_IO_WAKEUP))
698 return 0; 697 return 0;
@@ -712,12 +711,8 @@ static int omap3xxx_prm_late_init(void)
712 } 711 }
713 712
714 omap3xxx_prm_enable_io_wakeup(); 713 omap3xxx_prm_enable_io_wakeup();
715 ret = omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
716 if (!ret)
717 irq_set_status_flags(omap_prcm_event_to_irq("io"),
718 IRQ_NOAUTOEN);
719 714
720 return ret; 715 return omap_prcm_register_chain_handler(&omap3_prcm_irq_setup);
721} 716}
722 717
723static void __exit omap3xxx_prm_exit(void) 718static void __exit omap3xxx_prm_exit(void)
diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
index 87e86a4a9ead..3ab5df1ce900 100644
--- a/arch/arm/mach-omap2/prm44xx.c
+++ b/arch/arm/mach-omap2/prm44xx.c
@@ -337,6 +337,27 @@ static void omap44xx_prm_reconfigure_io_chain(void)
337} 337}
338 338
339/** 339/**
340 * omap44xx_prm_enable_io_wakeup - enable wakeup events from I/O wakeup latches
341 *
342 * Activates the I/O wakeup event latches and allows events logged by
343 * those latches to signal a wakeup event to the PRCM. For I/O wakeups
344 * to occur, WAKEUPENABLE bits must be set in the pad mux registers, and
345 * omap44xx_prm_reconfigure_io_chain() must be called. No return value.
346 */
347static void __init omap44xx_prm_enable_io_wakeup(void)
348{
349 s32 inst = omap4_prmst_get_prm_dev_inst();
350
351 if (inst == PRM_INSTANCE_UNKNOWN)
352 return;
353
354 omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK,
355 OMAP4430_GLOBAL_WUEN_MASK,
356 inst,
357 omap4_prcm_irq_setup.pm_ctrl);
358}
359
360/**
340 * omap44xx_prm_read_reset_sources - return the last SoC reset source 361 * omap44xx_prm_read_reset_sources - return the last SoC reset source
341 * 362 *
342 * Return a u32 representing the last reset sources of the SoC. The 363 * Return a u32 representing the last reset sources of the SoC. The
@@ -668,6 +689,8 @@ struct pwrdm_ops omap4_pwrdm_operations = {
668 .pwrdm_has_voltdm = omap4_check_vcvp, 689 .pwrdm_has_voltdm = omap4_check_vcvp,
669}; 690};
670 691
692static int omap44xx_prm_late_init(void);
693
671/* 694/*
672 * XXX document 695 * XXX document
673 */ 696 */
@@ -675,6 +698,7 @@ static struct prm_ll_data omap44xx_prm_ll_data = {
675 .read_reset_sources = &omap44xx_prm_read_reset_sources, 698 .read_reset_sources = &omap44xx_prm_read_reset_sources,
676 .was_any_context_lost_old = &omap44xx_prm_was_any_context_lost_old, 699 .was_any_context_lost_old = &omap44xx_prm_was_any_context_lost_old,
677 .clear_context_loss_flags_old = &omap44xx_prm_clear_context_loss_flags_old, 700 .clear_context_loss_flags_old = &omap44xx_prm_clear_context_loss_flags_old,
701 .late_init = &omap44xx_prm_late_init,
678 .assert_hardreset = omap4_prminst_assert_hardreset, 702 .assert_hardreset = omap4_prminst_assert_hardreset,
679 .deassert_hardreset = omap4_prminst_deassert_hardreset, 703 .deassert_hardreset = omap4_prminst_deassert_hardreset,
680 .is_hardreset_asserted = omap4_prminst_is_hardreset_asserted, 704 .is_hardreset_asserted = omap4_prminst_is_hardreset_asserted,
@@ -711,6 +735,37 @@ int __init omap44xx_prm_init(const struct omap_prcm_init_data *data)
711 return prm_register(&omap44xx_prm_ll_data); 735 return prm_register(&omap44xx_prm_ll_data);
712} 736}
713 737
738static int omap44xx_prm_late_init(void)
739{
740 int irq_num;
741
742 if (!(prm_features & PRM_HAS_IO_WAKEUP))
743 return 0;
744
745 irq_num = of_irq_get(prm_init_data->np, 0);
746 /*
747 * Already have OMAP4 IRQ num. For all other platforms, we need
748 * IRQ numbers from DT
749 */
750 if (irq_num < 0 && !(prm_init_data->flags & PRM_IRQ_DEFAULT)) {
751 if (irq_num == -EPROBE_DEFER)
752 return irq_num;
753
754 /* Have nothing to do */
755 return 0;
756 }
757
758 /* Once OMAP4 DT is filled as well */
759 if (irq_num >= 0) {
760 omap4_prcm_irq_setup.irq = irq_num;
761 omap4_prcm_irq_setup.xlate_irq = NULL;
762 }
763
764 omap44xx_prm_enable_io_wakeup();
765
766 return omap_prcm_register_chain_handler(&omap4_prcm_irq_setup);
767}
768
714static void __exit omap44xx_prm_exit(void) 769static void __exit omap44xx_prm_exit(void)
715{ 770{
716 prm_unregister(&omap44xx_prm_ll_data); 771 prm_unregister(&omap44xx_prm_ll_data);
diff --git a/arch/arm/mach-prima2/common.c b/arch/arm/mach-prima2/common.c
index 8cadb302a7d2..ffe05c27087e 100644
--- a/arch/arm/mach-prima2/common.c
+++ b/arch/arm/mach-prima2/common.c
@@ -15,7 +15,7 @@
15#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16#include "common.h" 16#include "common.h"
17 17
18static void __init sirfsoc_init_late(void) 18static void __init __maybe_unused sirfsoc_init_late(void)
19{ 19{
20 sirfsoc_pm_init(); 20 sirfsoc_pm_init();
21} 21}
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 76fbc115ec33..ce7d97babb0f 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -566,6 +566,7 @@ config MACH_ICONTROL
566config ARCH_PXA_ESERIES 566config ARCH_PXA_ESERIES
567 bool "PXA based Toshiba e-series PDAs" 567 bool "PXA based Toshiba e-series PDAs"
568 select FB_W100 568 select FB_W100
569 select FB
569 select PXA25x 570 select PXA25x
570 571
571config MACH_E330 572config MACH_E330
diff --git a/arch/arm/mach-pxa/include/mach/mtd-xip.h b/arch/arm/mach-pxa/include/mach/mtd-xip.h
index 990d2bf2fb45..9bf4ea6a6f74 100644
--- a/arch/arm/mach-pxa/include/mach/mtd-xip.h
+++ b/arch/arm/mach-pxa/include/mach/mtd-xip.h
@@ -17,11 +17,15 @@
17 17
18#include <mach/regs-ost.h> 18#include <mach/regs-ost.h>
19 19
20#define xip_irqpending() (ICIP & ICMR) 20/* restored July 2017, this did not build since 2011! */
21
22#define ICIP io_p2v(0x40d00000)
23#define ICMR io_p2v(0x40d00004)
24#define xip_irqpending() (readl(ICIP) & readl(ICMR))
21 25
22/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */ 26/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
23#define xip_currtime() (OSCR) 27#define xip_currtime() readl(OSCR)
24#define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4) 28#define xip_elapsed_since(x) (signed)((readl(OSCR) - (x)) / 4)
25 29
26/* 30/*
27 * xip_cpu_idle() is used when waiting for a delay equal or larger than 31 * xip_cpu_idle() is used when waiting for a delay equal or larger than
diff --git a/arch/arm/mach-rpc/include/mach/hardware.h b/arch/arm/mach-rpc/include/mach/hardware.h
index aa79fa47373a..622d4e5df029 100644
--- a/arch/arm/mach-rpc/include/mach/hardware.h
+++ b/arch/arm/mach-rpc/include/mach/hardware.h
@@ -25,8 +25,8 @@
25 * *_SIZE is the size of the region 25 * *_SIZE is the size of the region
26 * *_BASE is the virtual address 26 * *_BASE is the virtual address
27 */ 27 */
28#define RAM_SIZE 0x10000000 28#define RPC_RAM_SIZE 0x10000000
29#define RAM_START 0x10000000 29#define RPC_RAM_START 0x10000000
30 30
31#define EASI_SIZE 0x08000000 /* EASI I/O */ 31#define EASI_SIZE 0x08000000 /* EASI I/O */
32#define EASI_START 0x08000000 32#define EASI_START 0x08000000
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
index 0db46895c82a..7d52cd97d96e 100644
--- a/arch/arm/mach-sa1100/clock.c
+++ b/arch/arm/mach-sa1100/clock.c
@@ -35,6 +35,31 @@ struct clk clk_##_name = { \
35 35
36static DEFINE_SPINLOCK(clocks_lock); 36static DEFINE_SPINLOCK(clocks_lock);
37 37
38/* Dummy clk routine to build generic kernel parts that may be using them */
39long clk_round_rate(struct clk *clk, unsigned long rate)
40{
41 return clk_get_rate(clk);
42}
43EXPORT_SYMBOL(clk_round_rate);
44
45int clk_set_rate(struct clk *clk, unsigned long rate)
46{
47 return 0;
48}
49EXPORT_SYMBOL(clk_set_rate);
50
51int clk_set_parent(struct clk *clk, struct clk *parent)
52{
53 return 0;
54}
55EXPORT_SYMBOL(clk_set_parent);
56
57struct clk *clk_get_parent(struct clk *clk)
58{
59 return NULL;
60}
61EXPORT_SYMBOL(clk_get_parent);
62
38static void clk_gpio27_enable(struct clk *clk) 63static void clk_gpio27_enable(struct clk *clk)
39{ 64{
40 /* 65 /*
diff --git a/arch/arm/mach-sa1100/include/mach/mtd-xip.h b/arch/arm/mach-sa1100/include/mach/mtd-xip.h
index b3d684098fbf..cb76096a2e36 100644
--- a/arch/arm/mach-sa1100/include/mach/mtd-xip.h
+++ b/arch/arm/mach-sa1100/include/mach/mtd-xip.h
@@ -20,7 +20,7 @@
20#define xip_irqpending() (ICIP & ICMR) 20#define xip_irqpending() (ICIP & ICMR)
21 21
22/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */ 22/* we sample OSCR and convert desired delta to usec (1/4 ~= 1000000/3686400) */
23#define xip_currtime() (OSCR) 23#define xip_currtime() readl_relaxed(OSCR)
24#define xip_elapsed_since(x) (signed)((OSCR - (x)) / 4) 24#define xip_elapsed_since(x) (signed)((readl_relaxed(OSCR) - (x)) / 4)
25 25
26#endif /* __ARCH_SA1100_MTD_XIP_H__ */ 26#endif /* __ARCH_SA1100_MTD_XIP_H__ */
diff --git a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
index 73e3adbc1330..44438f344dc8 100644
--- a/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
+++ b/arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c
@@ -67,8 +67,12 @@ static int regulator_quirk_notify(struct notifier_block *nb,
67{ 67{
68 struct device *dev = data; 68 struct device *dev = data;
69 struct i2c_client *client; 69 struct i2c_client *client;
70 static bool done;
70 u32 mon; 71 u32 mon;
71 72
73 if (done)
74 return 0;
75
72 mon = ioread32(irqc + IRQC_MONITOR); 76 mon = ioread32(irqc + IRQC_MONITOR);
73 dev_dbg(dev, "%s: %ld, IRQC_MONITOR = 0x%x\n", __func__, action, mon); 77 dev_dbg(dev, "%s: %ld, IRQC_MONITOR = 0x%x\n", __func__, action, mon);
74 if (mon & REGULATOR_IRQ_MASK) 78 if (mon & REGULATOR_IRQ_MASK)
@@ -99,7 +103,7 @@ static int regulator_quirk_notify(struct notifier_block *nb,
99remove: 103remove:
100 dev_info(dev, "IRQ2 is not asserted, removing quirk\n"); 104 dev_info(dev, "IRQ2 is not asserted, removing quirk\n");
101 105
102 bus_unregister_notifier(&i2c_bus_type, nb); 106 done = true;
103 iounmap(irqc); 107 iounmap(irqc);
104 return 0; 108 return 0;
105} 109}
diff --git a/arch/arm/mach-w90x900/clock.c b/arch/arm/mach-w90x900/clock.c
index ac6fd1a2cb59..3f93fac98d97 100644
--- a/arch/arm/mach-w90x900/clock.c
+++ b/arch/arm/mach-w90x900/clock.c
@@ -93,3 +93,32 @@ void nuc900_subclk_enable(struct clk *clk, int enable)
93 93
94 __raw_writel(clken, W90X900_VA_CLKPWR + SUBCLK); 94 __raw_writel(clken, W90X900_VA_CLKPWR + SUBCLK);
95} 95}
96
97/* dummy functions, should not be called */
98long clk_round_rate(struct clk *clk, unsigned long rate)
99{
100 WARN_ON(clk);
101 return 0;
102}
103EXPORT_SYMBOL(clk_round_rate);
104
105int clk_set_rate(struct clk *clk, unsigned long rate)
106{
107 WARN_ON(clk);
108 return 0;
109}
110EXPORT_SYMBOL(clk_set_rate);
111
112int clk_set_parent(struct clk *clk, struct clk *parent)
113{
114 WARN_ON(clk);
115 return 0;
116}
117EXPORT_SYMBOL(clk_set_parent);
118
119struct clk *clk_get_parent(struct clk *clk)
120{
121 WARN_ON(clk);
122 return NULL;
123}
124EXPORT_SYMBOL(clk_get_parent);
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 0d1f026d831a..ba2fde2909f9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -51,6 +51,7 @@
51 compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64"; 51 compatible = "sinovoip,bananapi-m64", "allwinner,sun50i-a64";
52 52
53 aliases { 53 aliases {
54 ethernet0 = &emac;
54 serial0 = &uart0; 55 serial0 = &uart0;
55 serial1 = &uart1; 56 serial1 = &uart1;
56 }; 57 };
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
index 08cda24ea194..827168bc22ed 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
@@ -51,6 +51,7 @@
51 compatible = "pine64,pine64", "allwinner,sun50i-a64"; 51 compatible = "pine64,pine64", "allwinner,sun50i-a64";
52 52
53 aliases { 53 aliases {
54 ethernet0 = &emac;
54 serial0 = &uart0; 55 serial0 = &uart0;
55 serial1 = &uart1; 56 serial1 = &uart1;
56 serial2 = &uart2; 57 serial2 = &uart2;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index 17eb1cc5bf6b..216e3a5dafae 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -53,6 +53,7 @@
53 "allwinner,sun50i-a64"; 53 "allwinner,sun50i-a64";
54 54
55 aliases { 55 aliases {
56 ethernet0 = &emac;
56 serial0 = &uart0; 57 serial0 = &uart0;
57 }; 58 };
58 59
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 9d00622ce845..bd0f33b77f57 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -452,7 +452,7 @@
452 emac: ethernet@1c30000 { 452 emac: ethernet@1c30000 {
453 compatible = "allwinner,sun50i-a64-emac"; 453 compatible = "allwinner,sun50i-a64-emac";
454 syscon = <&syscon>; 454 syscon = <&syscon>;
455 reg = <0x01c30000 0x100>; 455 reg = <0x01c30000 0x10000>;
456 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; 456 interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
457 interrupt-names = "macirq"; 457 interrupt-names = "macirq";
458 resets = <&ccu RST_BUS_EMAC>; 458 resets = <&ccu RST_BUS_EMAC>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
index 732e2e06f503..d9a720bff05d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5.dtsi
@@ -120,5 +120,8 @@
120}; 120};
121 121
122&pio { 122&pio {
123 interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
124 <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
125 <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
123 compatible = "allwinner,sun50i-h5-pinctrl"; 126 compatible = "allwinner,sun50i-h5-pinctrl";
124}; 127};
diff --git a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
index 35b8c88c3220..738ed689ff69 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gx.dtsi
@@ -400,7 +400,7 @@
400 }; 400 };
401 401
402 pwm_AO_ab: pwm@550 { 402 pwm_AO_ab: pwm@550 {
403 compatible = "amlogic,meson-gx-pwm", "amlogic,meson-gxbb-pwm"; 403 compatible = "amlogic,meson-gx-ao-pwm", "amlogic,meson-gxbb-ao-pwm";
404 reg = <0x0 0x00550 0x0 0x10>; 404 reg = <0x0 0x00550 0x0 0x10>;
405 #pwm-cells = <3>; 405 #pwm-cells = <3>;
406 status = "disabled"; 406 status = "disabled";
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 72c5a9f64ca8..94567eb17875 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -109,8 +109,8 @@
109 status = "okay"; 109 status = "okay";
110 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>; 110 pinctrl-0 = <&pwm_ao_a_3_pins>, <&pwm_ao_b_pins>;
111 pinctrl-names = "default"; 111 pinctrl-names = "default";
112 clocks = <&clkc CLKID_FCLK_DIV4>; 112 clocks = <&xtal> , <&xtal>;
113 clock-names = "clkin0"; 113 clock-names = "clkin0", "clkin1" ;
114}; 114};
115 115
116&pwm_ef { 116&pwm_ef {
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
index 890821d6e52b..266fbcf3e47f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
@@ -10,12 +10,20 @@
10 10
11#include <dt-bindings/input/input.h> 11#include <dt-bindings/input/input.h>
12 12
13#include "meson-gxl-s905x-p212.dtsi" 13#include "meson-gxl-s905x.dtsi"
14 14
15/ { 15/ {
16 compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl"; 16 compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
17 model = "Libre Technology CC"; 17 model = "Libre Technology CC";
18 18
19 aliases {
20 serial0 = &uart_AO;
21 };
22
23 chosen {
24 stdout-path = "serial0:115200n8";
25 };
26
19 cvbs-connector { 27 cvbs-connector {
20 compatible = "composite-video-connector"; 28 compatible = "composite-video-connector";
21 29
@@ -26,6 +34,11 @@
26 }; 34 };
27 }; 35 };
28 36
37 emmc_pwrseq: emmc-pwrseq {
38 compatible = "mmc-pwrseq-emmc";
39 reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
40 };
41
29 hdmi-connector { 42 hdmi-connector {
30 compatible = "hdmi-connector"; 43 compatible = "hdmi-connector";
31 type = "a"; 44 type = "a";
@@ -53,6 +66,39 @@
53 linux,default-trigger = "heartbeat"; 66 linux,default-trigger = "heartbeat";
54 }; 67 };
55 }; 68 };
69
70 memory@0 {
71 device_type = "memory";
72 reg = <0x0 0x0 0x0 0x80000000>;
73 };
74
75 vcc_3v3: regulator-vcc_3v3 {
76 compatible = "regulator-fixed";
77 regulator-name = "VCC_3V3";
78 regulator-min-microvolt = <3300000>;
79 regulator-max-microvolt = <3300000>;
80 };
81
82 vcc_card: regulator-vcc-card {
83 compatible = "regulator-gpio";
84
85 regulator-name = "VCC_CARD";
86 regulator-min-microvolt = <1800000>;
87 regulator-max-microvolt = <3300000>;
88
89 gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
90 gpios-states = <0>;
91
92 states = <3300000 0>,
93 <1800000 1>;
94 };
95
96 vddio_boot: regulator-vddio_boot {
97 compatible = "regulator-fixed";
98 regulator-name = "VDDIO_BOOT";
99 regulator-min-microvolt = <3300000>;
100 regulator-max-microvolt = <3300000>;
101 };
56}; 102};
57 103
58&cvbs_vdac_port { 104&cvbs_vdac_port {
@@ -61,6 +107,16 @@
61 }; 107 };
62}; 108};
63 109
110&ethmac {
111 status = "okay";
112};
113
114&ir {
115 status = "okay";
116 pinctrl-0 = <&remote_input_ao_pins>;
117 pinctrl-names = "default";
118};
119
64&hdmi_tx { 120&hdmi_tx {
65 status = "okay"; 121 status = "okay";
66 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>; 122 pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
@@ -73,20 +129,43 @@
73 }; 129 };
74}; 130};
75 131
76/* 132/* SD card */
77 * The following devices exists but are exposed on the general 133&sd_emmc_b {
78 * purpose GPIO header. End user may well decide to use those pins 134 status = "okay";
79 * for another purpose 135 pinctrl-0 = <&sdcard_pins>;
80 */ 136 pinctrl-names = "default";
137
138 bus-width = <4>;
139 cap-sd-highspeed;
140 max-frequency = <100000000>;
141 disable-wp;
142
143 cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
144 cd-inverted;
81 145
82&sd_emmc_a { 146 vmmc-supply = <&vcc_3v3>;
83 status = "disabled"; 147 vqmmc-supply = <&vcc_card>;
84}; 148};
85 149
86&uart_A { 150/* eMMC */
87 status = "disabled"; 151&sd_emmc_c {
152 status = "okay";
153 pinctrl-0 = <&emmc_pins>;
154 pinctrl-names = "default";
155
156 bus-width = <8>;
157 cap-mmc-highspeed;
158 max-frequency = <50000000>;
159 non-removable;
160 disable-wp;
161
162 mmc-pwrseq = <&emmc_pwrseq>;
163 vmmc-supply = <&vcc_3v3>;
164 vqmmc-supply = <&vddio_boot>;
88}; 165};
89 166
90&wifi32k { 167&uart_AO {
91 status = "disabled"; 168 status = "okay";
169 pinctrl-0 = <&uart_ao_a_pins>;
170 pinctrl-names = "default";
92}; 171};
diff --git a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
index dbcc3d4e2ed5..51763d674050 100644
--- a/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-37xx.dtsi
@@ -219,7 +219,7 @@
219 reg = <0x18800 0x100>, <0x18C00 0x20>; 219 reg = <0x18800 0x100>, <0x18C00 0x20>;
220 gpiosb: gpio { 220 gpiosb: gpio {
221 #gpio-cells = <2>; 221 #gpio-cells = <2>;
222 gpio-ranges = <&pinctrl_sb 0 0 29>; 222 gpio-ranges = <&pinctrl_sb 0 0 30>;
223 gpio-controller; 223 gpio-controller;
224 interrupts = 224 interrupts =
225 <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>, 225 <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
index 726528ce54e9..4c68605675a8 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-master.dtsi
@@ -270,6 +270,7 @@
270 interrupt-names = "mem", "ring0", "ring1", 270 interrupt-names = "mem", "ring0", "ring1",
271 "ring2", "ring3", "eip"; 271 "ring2", "ring3", "eip";
272 clocks = <&cpm_clk 1 26>; 272 clocks = <&cpm_clk 1 26>;
273 dma-coherent;
273 }; 274 };
274 }; 275 };
275 276
diff --git a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
index 95f8e5f607f6..923f354b02f0 100644
--- a/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-cp110-slave.dtsi
@@ -64,7 +64,7 @@
64 compatible = "marvell,armada-8k-rtc"; 64 compatible = "marvell,armada-8k-rtc";
65 reg = <0x284000 0x20>, <0x284080 0x24>; 65 reg = <0x284000 0x20>, <0x284080 0x24>;
66 reg-names = "rtc", "rtc-soc"; 66 reg-names = "rtc", "rtc-soc";
67 interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>; 67 interrupts = <ICU_GRP_NSR 77 IRQ_TYPE_LEVEL_HIGH>;
68 }; 68 };
69 69
70 cps_ethernet: ethernet@0 { 70 cps_ethernet: ethernet@0 {
@@ -261,6 +261,7 @@
261 interrupt-names = "mem", "ring0", "ring1", 261 interrupt-names = "mem", "ring0", "ring1",
262 "ring2", "ring3", "eip"; 262 "ring2", "ring3", "eip";
263 clocks = <&cps_clk 1 26>; 263 clocks = <&cps_clk 1 26>;
264 dma-coherent;
264 /* 265 /*
265 * The cryptographic engine found on the cp110 266 * The cryptographic engine found on the cp110
266 * master is enabled by default at the SoC 267 * master is enabled by default at the SoC
diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
index aef35e0b685a..f903957da504 100644
--- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi
@@ -45,7 +45,7 @@
45 stdout-path = "serial0:115200n8"; 45 stdout-path = "serial0:115200n8";
46 }; 46 };
47 47
48 audio_clkout: audio_clkout { 48 audio_clkout: audio-clkout {
49 /* 49 /*
50 * This is same as <&rcar_sound 0> 50 * This is same as <&rcar_sound 0>
51 * but needed to avoid cs2000/rcar_sound probe dead-lock 51 * but needed to avoid cs2000/rcar_sound probe dead-lock
@@ -508,7 +508,7 @@
508 508
509 /* audio_clkout0/1/2/3 */ 509 /* audio_clkout0/1/2/3 */
510 #clock-cells = <1>; 510 #clock-cells = <1>;
511 clock-frequency = <11289600 12288000>; 511 clock-frequency = <12288000 11289600>;
512 512
513 status = "okay"; 513 status = "okay";
514 514
diff --git a/arch/arm64/boot/dts/renesas/ulcb.dtsi b/arch/arm64/boot/dts/renesas/ulcb.dtsi
index b5c6ee07d7f9..d1a3f3b7a0ab 100644
--- a/arch/arm64/boot/dts/renesas/ulcb.dtsi
+++ b/arch/arm64/boot/dts/renesas/ulcb.dtsi
@@ -281,7 +281,7 @@
281 281
282 /* audio_clkout0/1/2/3 */ 282 /* audio_clkout0/1/2/3 */
283 #clock-cells = <1>; 283 #clock-cells = <1>;
284 clock-frequency = <11289600 12288000>; 284 clock-frequency = <12288000 11289600>;
285 285
286 status = "okay"; 286 status = "okay";
287 287
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 6c7d147eed54..b4ca115b3be1 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -476,6 +476,7 @@ CONFIG_QCOM_CLK_SMD_RPM=y
476CONFIG_MSM_GCC_8916=y 476CONFIG_MSM_GCC_8916=y
477CONFIG_MSM_GCC_8994=y 477CONFIG_MSM_GCC_8994=y
478CONFIG_MSM_MMCC_8996=y 478CONFIG_MSM_MMCC_8996=y
479CONFIG_HWSPINLOCK=y
479CONFIG_HWSPINLOCK_QCOM=y 480CONFIG_HWSPINLOCK_QCOM=y
480CONFIG_ARM_MHU=y 481CONFIG_ARM_MHU=y
481CONFIG_PLATFORM_MHU=y 482CONFIG_PLATFORM_MHU=y
diff --git a/arch/arm64/include/asm/arch_timer.h b/arch/arm64/include/asm/arch_timer.h
index 74d08e44a651..a652ce0a5cb2 100644
--- a/arch/arm64/include/asm/arch_timer.h
+++ b/arch/arm64/include/asm/arch_timer.h
@@ -65,13 +65,13 @@ DECLARE_PER_CPU(const struct arch_timer_erratum_workaround *,
65 u64 _val; \ 65 u64 _val; \
66 if (needs_unstable_timer_counter_workaround()) { \ 66 if (needs_unstable_timer_counter_workaround()) { \
67 const struct arch_timer_erratum_workaround *wa; \ 67 const struct arch_timer_erratum_workaround *wa; \
68 preempt_disable(); \ 68 preempt_disable_notrace(); \
69 wa = __this_cpu_read(timer_unstable_counter_workaround); \ 69 wa = __this_cpu_read(timer_unstable_counter_workaround); \
70 if (wa && wa->read_##reg) \ 70 if (wa && wa->read_##reg) \
71 _val = wa->read_##reg(); \ 71 _val = wa->read_##reg(); \
72 else \ 72 else \
73 _val = read_sysreg(reg); \ 73 _val = read_sysreg(reg); \
74 preempt_enable(); \ 74 preempt_enable_notrace(); \
75 } else { \ 75 } else { \
76 _val = read_sysreg(reg); \ 76 _val = read_sysreg(reg); \
77 } \ 77 } \
diff --git a/arch/arm64/include/asm/elf.h b/arch/arm64/include/asm/elf.h
index acae781f7359..3288c2b36731 100644
--- a/arch/arm64/include/asm/elf.h
+++ b/arch/arm64/include/asm/elf.h
@@ -114,10 +114,10 @@
114 114
115/* 115/*
116 * This is the base location for PIE (ET_DYN with INTERP) loads. On 116 * This is the base location for PIE (ET_DYN with INTERP) loads. On
117 * 64-bit, this is raised to 4GB to leave the entire 32-bit address 117 * 64-bit, this is above 4GB to leave the entire 32-bit address
118 * space open for things that want to use the area for 32-bit pointers. 118 * space open for things that want to use the area for 32-bit pointers.
119 */ 119 */
120#define ELF_ET_DYN_BASE 0x100000000UL 120#define ELF_ET_DYN_BASE (2 * TASK_SIZE_64 / 3)
121 121
122#ifndef __ASSEMBLY__ 122#ifndef __ASSEMBLY__
123 123
diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h
index 32f82723338a..ef39dcb9ca6a 100644
--- a/arch/arm64/include/asm/memory.h
+++ b/arch/arm64/include/asm/memory.h
@@ -64,8 +64,10 @@
64 * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area. 64 * TASK_UNMAPPED_BASE - the lower boundary of the mmap VM area.
65 */ 65 */
66#define VA_BITS (CONFIG_ARM64_VA_BITS) 66#define VA_BITS (CONFIG_ARM64_VA_BITS)
67#define VA_START (UL(0xffffffffffffffff) << VA_BITS) 67#define VA_START (UL(0xffffffffffffffff) - \
68#define PAGE_OFFSET (UL(0xffffffffffffffff) << (VA_BITS - 1)) 68 (UL(1) << VA_BITS) + 1)
69#define PAGE_OFFSET (UL(0xffffffffffffffff) - \
70 (UL(1) << (VA_BITS - 1)) + 1)
69#define KIMAGE_VADDR (MODULES_END) 71#define KIMAGE_VADDR (MODULES_END)
70#define MODULES_END (MODULES_VADDR + MODULES_VSIZE) 72#define MODULES_END (MODULES_VADDR + MODULES_VSIZE)
71#define MODULES_VADDR (VA_START + KASAN_SHADOW_SIZE) 73#define MODULES_VADDR (VA_START + KASAN_SHADOW_SIZE)
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
index 06da8ea16bbe..c7b4995868e1 100644
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -161,9 +161,11 @@ void fpsimd_flush_thread(void)
161{ 161{
162 if (!system_supports_fpsimd()) 162 if (!system_supports_fpsimd())
163 return; 163 return;
164 preempt_disable();
164 memset(&current->thread.fpsimd_state, 0, sizeof(struct fpsimd_state)); 165 memset(&current->thread.fpsimd_state, 0, sizeof(struct fpsimd_state));
165 fpsimd_flush_task_state(current); 166 fpsimd_flush_task_state(current);
166 set_thread_flag(TIF_FOREIGN_FPSTATE); 167 set_thread_flag(TIF_FOREIGN_FPSTATE);
168 preempt_enable();
167} 169}
168 170
169/* 171/*
diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S
index 973df7de7bf8..adb0910b88f5 100644
--- a/arch/arm64/kernel/head.S
+++ b/arch/arm64/kernel/head.S
@@ -354,7 +354,6 @@ __primary_switched:
354 tst x23, ~(MIN_KIMG_ALIGN - 1) // already running randomized? 354 tst x23, ~(MIN_KIMG_ALIGN - 1) // already running randomized?
355 b.ne 0f 355 b.ne 0f
356 mov x0, x21 // pass FDT address in x0 356 mov x0, x21 // pass FDT address in x0
357 mov x1, x23 // pass modulo offset in x1
358 bl kaslr_early_init // parse FDT for KASLR options 357 bl kaslr_early_init // parse FDT for KASLR options
359 cbz x0, 0f // KASLR disabled? just proceed 358 cbz x0, 0f // KASLR disabled? just proceed
360 orr x23, x23, x0 // record KASLR offset 359 orr x23, x23, x0 // record KASLR offset
diff --git a/arch/arm64/kernel/kaslr.c b/arch/arm64/kernel/kaslr.c
index a9710efb8c01..47080c49cc7e 100644
--- a/arch/arm64/kernel/kaslr.c
+++ b/arch/arm64/kernel/kaslr.c
@@ -75,7 +75,7 @@ extern void *__init __fixmap_remap_fdt(phys_addr_t dt_phys, int *size,
75 * containing function pointers) to be reinitialized, and zero-initialized 75 * containing function pointers) to be reinitialized, and zero-initialized
76 * .bss variables will be reset to 0. 76 * .bss variables will be reset to 0.
77 */ 77 */
78u64 __init kaslr_early_init(u64 dt_phys, u64 modulo_offset) 78u64 __init kaslr_early_init(u64 dt_phys)
79{ 79{
80 void *fdt; 80 void *fdt;
81 u64 seed, offset, mask, module_range; 81 u64 seed, offset, mask, module_range;
@@ -131,15 +131,17 @@ u64 __init kaslr_early_init(u64 dt_phys, u64 modulo_offset)
131 /* 131 /*
132 * The kernel Image should not extend across a 1GB/32MB/512MB alignment 132 * The kernel Image should not extend across a 1GB/32MB/512MB alignment
133 * boundary (for 4KB/16KB/64KB granule kernels, respectively). If this 133 * boundary (for 4KB/16KB/64KB granule kernels, respectively). If this
134 * happens, increase the KASLR offset by the size of the kernel image 134 * happens, round down the KASLR offset by (1 << SWAPPER_TABLE_SHIFT).
135 * rounded up by SWAPPER_BLOCK_SIZE. 135 *
136 * NOTE: The references to _text and _end below will already take the
137 * modulo offset (the physical displacement modulo 2 MB) into
138 * account, given that the physical placement is controlled by
139 * the loader, and will not change as a result of the virtual
140 * mapping we choose.
136 */ 141 */
137 if ((((u64)_text + offset + modulo_offset) >> SWAPPER_TABLE_SHIFT) != 142 if ((((u64)_text + offset) >> SWAPPER_TABLE_SHIFT) !=
138 (((u64)_end + offset + modulo_offset) >> SWAPPER_TABLE_SHIFT)) { 143 (((u64)_end + offset) >> SWAPPER_TABLE_SHIFT))
139 u64 kimg_sz = _end - _text; 144 offset = round_down(offset, 1 << SWAPPER_TABLE_SHIFT);
140 offset = (offset + round_up(kimg_sz, SWAPPER_BLOCK_SIZE))
141 & mask;
142 }
143 145
144 if (IS_ENABLED(CONFIG_KASAN)) 146 if (IS_ENABLED(CONFIG_KASAN))
145 /* 147 /*
diff --git a/arch/arm64/kernel/traps.c b/arch/arm64/kernel/traps.c
index d48f47080213..8a62648848e5 100644
--- a/arch/arm64/kernel/traps.c
+++ b/arch/arm64/kernel/traps.c
@@ -523,7 +523,7 @@ static void cntfrq_read_handler(unsigned int esr, struct pt_regs *regs)
523{ 523{
524 int rt = (esr & ESR_ELx_SYS64_ISS_RT_MASK) >> ESR_ELx_SYS64_ISS_RT_SHIFT; 524 int rt = (esr & ESR_ELx_SYS64_ISS_RT_MASK) >> ESR_ELx_SYS64_ISS_RT_SHIFT;
525 525
526 pt_regs_write_reg(regs, rt, read_sysreg(cntfrq_el0)); 526 pt_regs_write_reg(regs, rt, arch_timer_get_rate());
527 regs->pc += 4; 527 regs->pc += 4;
528} 528}
529 529
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index 77862881ae86..2e070d3baf9f 100644
--- a/arch/arm64/kvm/sys_regs.c
+++ b/arch/arm64/kvm/sys_regs.c
@@ -764,7 +764,7 @@ static bool access_pmovs(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
764 if (p->is_write) { 764 if (p->is_write) {
765 if (r->CRm & 0x2) 765 if (r->CRm & 0x2)
766 /* accessing PMOVSSET_EL0 */ 766 /* accessing PMOVSSET_EL0 */
767 kvm_pmu_overflow_set(vcpu, p->regval & mask); 767 vcpu_sys_reg(vcpu, PMOVSSET_EL0) |= (p->regval & mask);
768 else 768 else
769 /* accessing PMOVSCLR_EL0 */ 769 /* accessing PMOVSCLR_EL0 */
770 vcpu_sys_reg(vcpu, PMOVSSET_EL0) &= ~(p->regval & mask); 770 vcpu_sys_reg(vcpu, PMOVSSET_EL0) &= ~(p->regval & mask);
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index c7861c9864e6..1f22a41565a3 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -163,26 +163,27 @@ int ptep_set_access_flags(struct vm_area_struct *vma,
163 /* only preserve the access flags and write permission */ 163 /* only preserve the access flags and write permission */
164 pte_val(entry) &= PTE_AF | PTE_WRITE | PTE_DIRTY; 164 pte_val(entry) &= PTE_AF | PTE_WRITE | PTE_DIRTY;
165 165
166 /* 166 /* set PTE_RDONLY if actual read-only or clean PTE */
167 * PTE_RDONLY is cleared by default in the asm below, so set it in
168 * back if necessary (read-only or clean PTE).
169 */
170 if (!pte_write(entry) || !pte_sw_dirty(entry)) 167 if (!pte_write(entry) || !pte_sw_dirty(entry))
171 pte_val(entry) |= PTE_RDONLY; 168 pte_val(entry) |= PTE_RDONLY;
172 169
173 /* 170 /*
174 * Setting the flags must be done atomically to avoid racing with the 171 * Setting the flags must be done atomically to avoid racing with the
175 * hardware update of the access/dirty state. 172 * hardware update of the access/dirty state. The PTE_RDONLY bit must
173 * be set to the most permissive (lowest value) of *ptep and entry
174 * (calculated as: a & b == ~(~a | ~b)).
176 */ 175 */
176 pte_val(entry) ^= PTE_RDONLY;
177 asm volatile("// ptep_set_access_flags\n" 177 asm volatile("// ptep_set_access_flags\n"
178 " prfm pstl1strm, %2\n" 178 " prfm pstl1strm, %2\n"
179 "1: ldxr %0, %2\n" 179 "1: ldxr %0, %2\n"
180 " and %0, %0, %3 // clear PTE_RDONLY\n" 180 " eor %0, %0, %3 // negate PTE_RDONLY in *ptep\n"
181 " orr %0, %0, %4 // set flags\n" 181 " orr %0, %0, %4 // set flags\n"
182 " eor %0, %0, %3 // negate final PTE_RDONLY\n"
182 " stxr %w1, %0, %2\n" 183 " stxr %w1, %0, %2\n"
183 " cbnz %w1, 1b\n" 184 " cbnz %w1, 1b\n"
184 : "=&r" (old_pteval), "=&r" (tmp), "+Q" (pte_val(*ptep)) 185 : "=&r" (old_pteval), "=&r" (tmp), "+Q" (pte_val(*ptep))
185 : "L" (~PTE_RDONLY), "r" (pte_val(entry))); 186 : "L" (PTE_RDONLY), "r" (pte_val(entry)));
186 187
187 flush_tlb_fix_spurious_fault(vma, address); 188 flush_tlb_fix_spurious_fault(vma, address);
188 return 1; 189 return 1;
@@ -434,8 +435,11 @@ retry:
434 * the mmap_sem because it would already be released 435 * the mmap_sem because it would already be released
435 * in __lock_page_or_retry in mm/filemap.c. 436 * in __lock_page_or_retry in mm/filemap.c.
436 */ 437 */
437 if (fatal_signal_pending(current)) 438 if (fatal_signal_pending(current)) {
439 if (!user_mode(regs))
440 goto no_context;
438 return 0; 441 return 0;
442 }
439 443
440 /* 444 /*
441 * Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk of 445 * Clear FAULT_FLAG_ALLOW_RETRY to avoid any risk of
diff --git a/arch/ia64/include/asm/tlb.h b/arch/ia64/include/asm/tlb.h
index fced197b9626..cbe5ac3699bf 100644
--- a/arch/ia64/include/asm/tlb.h
+++ b/arch/ia64/include/asm/tlb.h
@@ -168,7 +168,8 @@ static inline void __tlb_alloc_page(struct mmu_gather *tlb)
168 168
169 169
170static inline void 170static inline void
171tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) 171arch_tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
172 unsigned long start, unsigned long end)
172{ 173{
173 tlb->mm = mm; 174 tlb->mm = mm;
174 tlb->max = ARRAY_SIZE(tlb->local); 175 tlb->max = ARRAY_SIZE(tlb->local);
@@ -185,8 +186,11 @@ tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start
185 * collected. 186 * collected.
186 */ 187 */
187static inline void 188static inline void
188tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) 189arch_tlb_finish_mmu(struct mmu_gather *tlb,
190 unsigned long start, unsigned long end, bool force)
189{ 191{
192 if (force)
193 tlb->need_flush = 1;
190 /* 194 /*
191 * Note: tlb->nr may be 0 at this point, so we can't rely on tlb->start_addr and 195 * Note: tlb->nr may be 0 at this point, so we can't rely on tlb->start_addr and
192 * tlb->end_addr. 196 * tlb->end_addr.
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8dd20358464f..48d91d5be4e9 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -2260,7 +2260,7 @@ config CPU_R4K_CACHE_TLB
2260 2260
2261config MIPS_MT_SMP 2261config MIPS_MT_SMP
2262 bool "MIPS MT SMP support (1 TC on each available VPE)" 2262 bool "MIPS MT SMP support (1 TC on each available VPE)"
2263 depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MIPSR6 2263 depends on SYS_SUPPORTS_MULTITHREADING && !CPU_MIPSR6 && !CPU_MICROMIPS
2264 select CPU_MIPSR2_IRQ_VI 2264 select CPU_MIPSR2_IRQ_VI
2265 select CPU_MIPSR2_IRQ_EI 2265 select CPU_MIPSR2_IRQ_EI
2266 select SYNC_R4K 2266 select SYNC_R4K
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 04343625b929..bc2708c9ada4 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -243,8 +243,21 @@ include arch/mips/Kbuild.platforms
243ifdef CONFIG_PHYSICAL_START 243ifdef CONFIG_PHYSICAL_START
244load-y = $(CONFIG_PHYSICAL_START) 244load-y = $(CONFIG_PHYSICAL_START)
245endif 245endif
246entry-y = 0x$(shell $(NM) vmlinux 2>/dev/null \ 246
247entry-noisa-y = 0x$(shell $(NM) vmlinux 2>/dev/null \
247 | grep "\bkernel_entry\b" | cut -f1 -d \ ) 248 | grep "\bkernel_entry\b" | cut -f1 -d \ )
249ifdef CONFIG_CPU_MICROMIPS
250 #
251 # Set the ISA bit, since the kernel_entry symbol in the ELF will have it
252 # clear which would lead to images containing addresses which bootloaders may
253 # jump to as MIPS32 code.
254 #
255 entry-y = $(patsubst %0,%1,$(patsubst %2,%3,$(patsubst %4,%5, \
256 $(patsubst %6,%7,$(patsubst %8,%9,$(patsubst %a,%b, \
257 $(patsubst %c,%d,$(patsubst %e,%f,$(entry-noisa-y)))))))))
258else
259 entry-y = $(entry-noisa-y)
260endif
248 261
249cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic 262cflags-y += -I$(srctree)/arch/mips/include/asm/mach-generic
250drivers-$(CONFIG_PCI) += arch/mips/pci/ 263drivers-$(CONFIG_PCI) += arch/mips/pci/
diff --git a/arch/mips/boot/compressed/.gitignore b/arch/mips/boot/compressed/.gitignore
new file mode 100644
index 000000000000..ebae133f1d00
--- /dev/null
+++ b/arch/mips/boot/compressed/.gitignore
@@ -0,0 +1,2 @@
1ashldi3.c
2bswapsi.c
diff --git a/arch/mips/cavium-octeon/octeon-usb.c b/arch/mips/cavium-octeon/octeon-usb.c
index 542be1cd0f32..bfdfaf32d2c4 100644
--- a/arch/mips/cavium-octeon/octeon-usb.c
+++ b/arch/mips/cavium-octeon/octeon-usb.c
@@ -13,9 +13,9 @@
13#include <linux/mutex.h> 13#include <linux/mutex.h>
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/of_platform.h> 15#include <linux/of_platform.h>
16#include <linux/io.h>
16 17
17#include <asm/octeon/octeon.h> 18#include <asm/octeon/octeon.h>
18#include <asm/octeon/cvmx-gpio-defs.h>
19 19
20/* USB Control Register */ 20/* USB Control Register */
21union cvm_usbdrd_uctl_ctl { 21union cvm_usbdrd_uctl_ctl {
diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S
index 1910223a9c02..cea2bb1621e6 100644
--- a/arch/mips/dec/int-handler.S
+++ b/arch/mips/dec/int-handler.S
@@ -147,23 +147,12 @@
147 * Find irq with highest priority 147 * Find irq with highest priority
148 */ 148 */
149 # open coded PTR_LA t1, cpu_mask_nr_tbl 149 # open coded PTR_LA t1, cpu_mask_nr_tbl
150#if (_MIPS_SZPTR == 32) 150#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
151 # open coded la t1, cpu_mask_nr_tbl 151 # open coded la t1, cpu_mask_nr_tbl
152 lui t1, %hi(cpu_mask_nr_tbl) 152 lui t1, %hi(cpu_mask_nr_tbl)
153 addiu t1, %lo(cpu_mask_nr_tbl) 153 addiu t1, %lo(cpu_mask_nr_tbl)
154 154#else
155#endif 155#error GCC `-msym32' option required for 64-bit DECstation builds
156#if (_MIPS_SZPTR == 64)
157 # open coded dla t1, cpu_mask_nr_tbl
158 .set push
159 .set noat
160 lui t1, %highest(cpu_mask_nr_tbl)
161 lui AT, %hi(cpu_mask_nr_tbl)
162 daddiu t1, t1, %higher(cpu_mask_nr_tbl)
163 daddiu AT, AT, %lo(cpu_mask_nr_tbl)
164 dsll t1, 32
165 daddu t1, t1, AT
166 .set pop
167#endif 156#endif
1681: lw t2,(t1) 1571: lw t2,(t1)
169 nop 158 nop
@@ -214,23 +203,12 @@
214 * Find irq with highest priority 203 * Find irq with highest priority
215 */ 204 */
216 # open coded PTR_LA t1,asic_mask_nr_tbl 205 # open coded PTR_LA t1,asic_mask_nr_tbl
217#if (_MIPS_SZPTR == 32) 206#if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32)
218 # open coded la t1, asic_mask_nr_tbl 207 # open coded la t1, asic_mask_nr_tbl
219 lui t1, %hi(asic_mask_nr_tbl) 208 lui t1, %hi(asic_mask_nr_tbl)
220 addiu t1, %lo(asic_mask_nr_tbl) 209 addiu t1, %lo(asic_mask_nr_tbl)
221 210#else
222#endif 211#error GCC `-msym32' option required for 64-bit DECstation builds
223#if (_MIPS_SZPTR == 64)
224 # open coded dla t1, asic_mask_nr_tbl
225 .set push
226 .set noat
227 lui t1, %highest(asic_mask_nr_tbl)
228 lui AT, %hi(asic_mask_nr_tbl)
229 daddiu t1, t1, %higher(asic_mask_nr_tbl)
230 daddiu AT, AT, %lo(asic_mask_nr_tbl)
231 dsll t1, 32
232 daddu t1, t1, AT
233 .set pop
234#endif 212#endif
2352: lw t2,(t1) 2132: lw t2,(t1)
236 nop 214 nop
diff --git a/arch/mips/include/asm/cache.h b/arch/mips/include/asm/cache.h
index fc67947ed658..8b14c2706aa5 100644
--- a/arch/mips/include/asm/cache.h
+++ b/arch/mips/include/asm/cache.h
@@ -9,6 +9,8 @@
9#ifndef _ASM_CACHE_H 9#ifndef _ASM_CACHE_H
10#define _ASM_CACHE_H 10#define _ASM_CACHE_H
11 11
12#include <kmalloc.h>
13
12#define L1_CACHE_SHIFT CONFIG_MIPS_L1_CACHE_SHIFT 14#define L1_CACHE_SHIFT CONFIG_MIPS_L1_CACHE_SHIFT
13#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 15#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
14 16
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h
index 8baa9033b181..721b698bfe3c 100644
--- a/arch/mips/include/asm/cpu-features.h
+++ b/arch/mips/include/asm/cpu-features.h
@@ -428,6 +428,9 @@
428#ifndef cpu_scache_line_size 428#ifndef cpu_scache_line_size
429#define cpu_scache_line_size() cpu_data[0].scache.linesz 429#define cpu_scache_line_size() cpu_data[0].scache.linesz
430#endif 430#endif
431#ifndef cpu_tcache_line_size
432#define cpu_tcache_line_size() cpu_data[0].tcache.linesz
433#endif
431 434
432#ifndef cpu_hwrena_impl_bits 435#ifndef cpu_hwrena_impl_bits
433#define cpu_hwrena_impl_bits 0 436#define cpu_hwrena_impl_bits 0
diff --git a/arch/mips/include/asm/mach-ralink/ralink_regs.h b/arch/mips/include/asm/mach-ralink/ralink_regs.h
index 9df1a53bcb36..b4e7dfa214eb 100644
--- a/arch/mips/include/asm/mach-ralink/ralink_regs.h
+++ b/arch/mips/include/asm/mach-ralink/ralink_regs.h
@@ -13,6 +13,8 @@
13#ifndef _RALINK_REGS_H_ 13#ifndef _RALINK_REGS_H_
14#define _RALINK_REGS_H_ 14#define _RALINK_REGS_H_
15 15
16#include <linux/io.h>
17
16enum ralink_soc_type { 18enum ralink_soc_type {
17 RALINK_UNKNOWN = 0, 19 RALINK_UNKNOWN = 0,
18 RT2880_SOC, 20 RT2880_SOC,
diff --git a/arch/mips/include/asm/octeon/cvmx-l2c-defs.h b/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
index d045973ddb33..3ea84acf1814 100644
--- a/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
+++ b/arch/mips/include/asm/octeon/cvmx-l2c-defs.h
@@ -33,6 +33,10 @@
33#define CVMX_L2C_DBG (CVMX_ADD_IO_SEG(0x0001180080000030ull)) 33#define CVMX_L2C_DBG (CVMX_ADD_IO_SEG(0x0001180080000030ull))
34#define CVMX_L2C_CFG (CVMX_ADD_IO_SEG(0x0001180080000000ull)) 34#define CVMX_L2C_CFG (CVMX_ADD_IO_SEG(0x0001180080000000ull))
35#define CVMX_L2C_CTL (CVMX_ADD_IO_SEG(0x0001180080800000ull)) 35#define CVMX_L2C_CTL (CVMX_ADD_IO_SEG(0x0001180080800000ull))
36#define CVMX_L2C_ERR_TDTX(block_id) \
37 (CVMX_ADD_IO_SEG(0x0001180080A007E0ull) + ((block_id) & 3) * 0x40000ull)
38#define CVMX_L2C_ERR_TTGX(block_id) \
39 (CVMX_ADD_IO_SEG(0x0001180080A007E8ull) + ((block_id) & 3) * 0x40000ull)
36#define CVMX_L2C_LCKBASE (CVMX_ADD_IO_SEG(0x0001180080000058ull)) 40#define CVMX_L2C_LCKBASE (CVMX_ADD_IO_SEG(0x0001180080000058ull))
37#define CVMX_L2C_LCKOFF (CVMX_ADD_IO_SEG(0x0001180080000060ull)) 41#define CVMX_L2C_LCKOFF (CVMX_ADD_IO_SEG(0x0001180080000060ull))
38#define CVMX_L2C_PFCTL (CVMX_ADD_IO_SEG(0x0001180080000090ull)) 42#define CVMX_L2C_PFCTL (CVMX_ADD_IO_SEG(0x0001180080000090ull))
@@ -66,9 +70,40 @@
66 ((offset) & 1) * 8) 70 ((offset) & 1) * 8)
67#define CVMX_L2C_WPAR_PPX(offset) (CVMX_ADD_IO_SEG(0x0001180080840000ull) + \ 71#define CVMX_L2C_WPAR_PPX(offset) (CVMX_ADD_IO_SEG(0x0001180080840000ull) + \
68 ((offset) & 31) * 8) 72 ((offset) & 31) * 8)
69#define CVMX_L2D_FUS3 (CVMX_ADD_IO_SEG(0x00011800800007B8ull))
70 73
71 74
75union cvmx_l2c_err_tdtx {
76 uint64_t u64;
77 struct cvmx_l2c_err_tdtx_s {
78 __BITFIELD_FIELD(uint64_t dbe:1,
79 __BITFIELD_FIELD(uint64_t sbe:1,
80 __BITFIELD_FIELD(uint64_t vdbe:1,
81 __BITFIELD_FIELD(uint64_t vsbe:1,
82 __BITFIELD_FIELD(uint64_t syn:10,
83 __BITFIELD_FIELD(uint64_t reserved_22_49:28,
84 __BITFIELD_FIELD(uint64_t wayidx:18,
85 __BITFIELD_FIELD(uint64_t reserved_2_3:2,
86 __BITFIELD_FIELD(uint64_t type:2,
87 ;)))))))))
88 } s;
89};
90
91union cvmx_l2c_err_ttgx {
92 uint64_t u64;
93 struct cvmx_l2c_err_ttgx_s {
94 __BITFIELD_FIELD(uint64_t dbe:1,
95 __BITFIELD_FIELD(uint64_t sbe:1,
96 __BITFIELD_FIELD(uint64_t noway:1,
97 __BITFIELD_FIELD(uint64_t reserved_56_60:5,
98 __BITFIELD_FIELD(uint64_t syn:6,
99 __BITFIELD_FIELD(uint64_t reserved_22_49:28,
100 __BITFIELD_FIELD(uint64_t wayidx:15,
101 __BITFIELD_FIELD(uint64_t reserved_2_6:5,
102 __BITFIELD_FIELD(uint64_t type:2,
103 ;)))))))))
104 } s;
105};
106
72union cvmx_l2c_cfg { 107union cvmx_l2c_cfg {
73 uint64_t u64; 108 uint64_t u64;
74 struct cvmx_l2c_cfg_s { 109 struct cvmx_l2c_cfg_s {
diff --git a/arch/mips/include/asm/octeon/cvmx-l2d-defs.h b/arch/mips/include/asm/octeon/cvmx-l2d-defs.h
new file mode 100644
index 000000000000..a951ad5d65ad
--- /dev/null
+++ b/arch/mips/include/asm/octeon/cvmx-l2d-defs.h
@@ -0,0 +1,60 @@
1/***********************license start***************
2 * Author: Cavium Networks
3 *
4 * Contact: support@caviumnetworks.com
5 * This file is part of the OCTEON SDK
6 *
7 * Copyright (c) 2003-2017 Cavium, Inc.
8 *
9 * This file is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License, Version 2, as
11 * published by the Free Software Foundation.
12 *
13 * This file is distributed in the hope that it will be useful, but
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
15 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, TITLE, or
16 * NONINFRINGEMENT. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this file; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 * or visit http://www.gnu.org/licenses/.
23 *
24 * This file may also be available under a different license from Cavium.
25 * Contact Cavium Networks for more information
26 ***********************license end**************************************/
27
28#ifndef __CVMX_L2D_DEFS_H__
29#define __CVMX_L2D_DEFS_H__
30
31#define CVMX_L2D_ERR (CVMX_ADD_IO_SEG(0x0001180080000010ull))
32#define CVMX_L2D_FUS3 (CVMX_ADD_IO_SEG(0x00011800800007B8ull))
33
34
35union cvmx_l2d_err {
36 uint64_t u64;
37 struct cvmx_l2d_err_s {
38 __BITFIELD_FIELD(uint64_t reserved_6_63:58,
39 __BITFIELD_FIELD(uint64_t bmhclsel:1,
40 __BITFIELD_FIELD(uint64_t ded_err:1,
41 __BITFIELD_FIELD(uint64_t sec_err:1,
42 __BITFIELD_FIELD(uint64_t ded_intena:1,
43 __BITFIELD_FIELD(uint64_t sec_intena:1,
44 __BITFIELD_FIELD(uint64_t ecc_ena:1,
45 ;)))))))
46 } s;
47};
48
49union cvmx_l2d_fus3 {
50 uint64_t u64;
51 struct cvmx_l2d_fus3_s {
52 __BITFIELD_FIELD(uint64_t reserved_40_63:24,
53 __BITFIELD_FIELD(uint64_t ema_ctl:3,
54 __BITFIELD_FIELD(uint64_t reserved_34_36:3,
55 __BITFIELD_FIELD(uint64_t q3fus:34,
56 ;))))
57 } s;
58};
59
60#endif
diff --git a/arch/mips/include/asm/octeon/cvmx.h b/arch/mips/include/asm/octeon/cvmx.h
index 9742202f2a32..e638735cc3ac 100644
--- a/arch/mips/include/asm/octeon/cvmx.h
+++ b/arch/mips/include/asm/octeon/cvmx.h
@@ -62,6 +62,7 @@ enum cvmx_mips_space {
62#include <asm/octeon/cvmx-iob-defs.h> 62#include <asm/octeon/cvmx-iob-defs.h>
63#include <asm/octeon/cvmx-ipd-defs.h> 63#include <asm/octeon/cvmx-ipd-defs.h>
64#include <asm/octeon/cvmx-l2c-defs.h> 64#include <asm/octeon/cvmx-l2c-defs.h>
65#include <asm/octeon/cvmx-l2d-defs.h>
65#include <asm/octeon/cvmx-l2t-defs.h> 66#include <asm/octeon/cvmx-l2t-defs.h>
66#include <asm/octeon/cvmx-led-defs.h> 67#include <asm/octeon/cvmx-led-defs.h>
67#include <asm/octeon/cvmx-mio-defs.h> 68#include <asm/octeon/cvmx-mio-defs.h>
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 770d4d1516cb..6bace7695788 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -376,9 +376,6 @@ asmlinkage void start_secondary(void)
376 cpumask_set_cpu(cpu, &cpu_coherent_mask); 376 cpumask_set_cpu(cpu, &cpu_coherent_mask);
377 notify_cpu_starting(cpu); 377 notify_cpu_starting(cpu);
378 378
379 complete(&cpu_running);
380 synchronise_count_slave(cpu);
381
382 set_cpu_online(cpu, true); 379 set_cpu_online(cpu, true);
383 380
384 set_cpu_sibling_map(cpu); 381 set_cpu_sibling_map(cpu);
@@ -386,6 +383,9 @@ asmlinkage void start_secondary(void)
386 383
387 calculate_cpu_foreign_map(); 384 calculate_cpu_foreign_map();
388 385
386 complete(&cpu_running);
387 synchronise_count_slave(cpu);
388
389 /* 389 /*
390 * irq will be enabled in ->smp_finish(), enabling it too early 390 * irq will be enabled in ->smp_finish(), enabling it too early
391 * is dangerous. 391 * is dangerous.
diff --git a/arch/mips/mm/uasm-mips.c b/arch/mips/mm/uasm-mips.c
index 3f74f6c1f065..9fea6c6bbf49 100644
--- a/arch/mips/mm/uasm-mips.c
+++ b/arch/mips/mm/uasm-mips.c
@@ -48,7 +48,7 @@
48 48
49#include "uasm.c" 49#include "uasm.c"
50 50
51static const struct insn const insn_table[insn_invalid] = { 51static const struct insn insn_table[insn_invalid] = {
52 [insn_addiu] = {M(addiu_op, 0, 0, 0, 0, 0), RS | RT | SIMM}, 52 [insn_addiu] = {M(addiu_op, 0, 0, 0, 0, 0), RS | RT | SIMM},
53 [insn_addu] = {M(spec_op, 0, 0, 0, 0, addu_op), RS | RT | RD}, 53 [insn_addu] = {M(spec_op, 0, 0, 0, 0, addu_op), RS | RT | RD},
54 [insn_and] = {M(spec_op, 0, 0, 0, 0, and_op), RS | RT | RD}, 54 [insn_and] = {M(spec_op, 0, 0, 0, 0, and_op), RS | RT | RD},
diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c
new file mode 100644
index 000000000000..3f87b96da5c4
--- /dev/null
+++ b/arch/mips/net/ebpf_jit.c
@@ -0,0 +1,1950 @@
1/*
2 * Just-In-Time compiler for eBPF filters on MIPS
3 *
4 * Copyright (c) 2017 Cavium, Inc.
5 *
6 * Based on code from:
7 *
8 * Copyright (c) 2014 Imagination Technologies Ltd.
9 * Author: Markos Chandras <markos.chandras@imgtec.com>
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; version 2 of the License.
14 */
15
16#include <linux/bitops.h>
17#include <linux/errno.h>
18#include <linux/filter.h>
19#include <linux/bpf.h>
20#include <linux/slab.h>
21#include <asm/bitops.h>
22#include <asm/byteorder.h>
23#include <asm/cacheflush.h>
24#include <asm/cpu-features.h>
25#include <asm/uasm.h>
26
27/* Registers used by JIT */
28#define MIPS_R_ZERO 0
29#define MIPS_R_AT 1
30#define MIPS_R_V0 2 /* BPF_R0 */
31#define MIPS_R_V1 3
32#define MIPS_R_A0 4 /* BPF_R1 */
33#define MIPS_R_A1 5 /* BPF_R2 */
34#define MIPS_R_A2 6 /* BPF_R3 */
35#define MIPS_R_A3 7 /* BPF_R4 */
36#define MIPS_R_A4 8 /* BPF_R5 */
37#define MIPS_R_T4 12 /* BPF_AX */
38#define MIPS_R_T5 13
39#define MIPS_R_T6 14
40#define MIPS_R_T7 15
41#define MIPS_R_S0 16 /* BPF_R6 */
42#define MIPS_R_S1 17 /* BPF_R7 */
43#define MIPS_R_S2 18 /* BPF_R8 */
44#define MIPS_R_S3 19 /* BPF_R9 */
45#define MIPS_R_S4 20 /* BPF_TCC */
46#define MIPS_R_S5 21
47#define MIPS_R_S6 22
48#define MIPS_R_S7 23
49#define MIPS_R_T8 24
50#define MIPS_R_T9 25
51#define MIPS_R_SP 29
52#define MIPS_R_RA 31
53
54/* eBPF flags */
55#define EBPF_SAVE_S0 BIT(0)
56#define EBPF_SAVE_S1 BIT(1)
57#define EBPF_SAVE_S2 BIT(2)
58#define EBPF_SAVE_S3 BIT(3)
59#define EBPF_SAVE_S4 BIT(4)
60#define EBPF_SAVE_RA BIT(5)
61#define EBPF_SEEN_FP BIT(6)
62#define EBPF_SEEN_TC BIT(7)
63#define EBPF_TCC_IN_V1 BIT(8)
64
65/*
66 * For the mips64 ISA, we need to track the value range or type for
67 * each JIT register. The BPF machine requires zero extended 32-bit
68 * values, but the mips64 ISA requires sign extended 32-bit values.
69 * At each point in the BPF program we track the state of every
70 * register so that we can zero extend or sign extend as the BPF
71 * semantics require.
72 */
73enum reg_val_type {
74 /* uninitialized */
75 REG_UNKNOWN,
76 /* not known to be 32-bit compatible. */
77 REG_64BIT,
78 /* 32-bit compatible, no truncation needed for 64-bit ops. */
79 REG_64BIT_32BIT,
80 /* 32-bit compatible, need truncation for 64-bit ops. */
81 REG_32BIT,
82 /* 32-bit zero extended. */
83 REG_32BIT_ZERO_EX,
84 /* 32-bit no sign/zero extension needed. */
85 REG_32BIT_POS
86};
87
88/*
89 * high bit of offsets indicates if long branch conversion done at
90 * this insn.
91 */
92#define OFFSETS_B_CONV BIT(31)
93
94/**
95 * struct jit_ctx - JIT context
96 * @skf: The sk_filter
97 * @stack_size: eBPF stack size
98 * @tmp_offset: eBPF $sp offset to 8-byte temporary memory
99 * @idx: Instruction index
100 * @flags: JIT flags
101 * @offsets: Instruction offsets
102 * @target: Memory location for the compiled filter
103 * @reg_val_types Packed enum reg_val_type for each register.
104 */
105struct jit_ctx {
106 const struct bpf_prog *skf;
107 int stack_size;
108 int tmp_offset;
109 u32 idx;
110 u32 flags;
111 u32 *offsets;
112 u32 *target;
113 u64 *reg_val_types;
114 unsigned int long_b_conversion:1;
115 unsigned int gen_b_offsets:1;
116};
117
118static void set_reg_val_type(u64 *rvt, int reg, enum reg_val_type type)
119{
120 *rvt &= ~(7ull << (reg * 3));
121 *rvt |= ((u64)type << (reg * 3));
122}
123
124static enum reg_val_type get_reg_val_type(const struct jit_ctx *ctx,
125 int index, int reg)
126{
127 return (ctx->reg_val_types[index] >> (reg * 3)) & 7;
128}
129
130/* Simply emit the instruction if the JIT memory space has been allocated */
131#define emit_instr(ctx, func, ...) \
132do { \
133 if ((ctx)->target != NULL) { \
134 u32 *p = &(ctx)->target[ctx->idx]; \
135 uasm_i_##func(&p, ##__VA_ARGS__); \
136 } \
137 (ctx)->idx++; \
138} while (0)
139
140static unsigned int j_target(struct jit_ctx *ctx, int target_idx)
141{
142 unsigned long target_va, base_va;
143 unsigned int r;
144
145 if (!ctx->target)
146 return 0;
147
148 base_va = (unsigned long)ctx->target;
149 target_va = base_va + (ctx->offsets[target_idx] & ~OFFSETS_B_CONV);
150
151 if ((base_va & ~0x0ffffffful) != (target_va & ~0x0ffffffful))
152 return (unsigned int)-1;
153 r = target_va & 0x0ffffffful;
154 return r;
155}
156
157/* Compute the immediate value for PC-relative branches. */
158static u32 b_imm(unsigned int tgt, struct jit_ctx *ctx)
159{
160 if (!ctx->gen_b_offsets)
161 return 0;
162
163 /*
164 * We want a pc-relative branch. tgt is the instruction offset
165 * we want to jump to.
166
167 * Branch on MIPS:
168 * I: target_offset <- sign_extend(offset)
169 * I+1: PC += target_offset (delay slot)
170 *
171 * ctx->idx currently points to the branch instruction
172 * but the offset is added to the delay slot so we need
173 * to subtract 4.
174 */
175 return (ctx->offsets[tgt] & ~OFFSETS_B_CONV) -
176 (ctx->idx * 4) - 4;
177}
178
179int bpf_jit_enable __read_mostly;
180
181enum which_ebpf_reg {
182 src_reg,
183 src_reg_no_fp,
184 dst_reg,
185 dst_reg_fp_ok
186};
187
188/*
189 * For eBPF, the register mapping naturally falls out of the
190 * requirements of eBPF and the MIPS n64 ABI. We don't maintain a
191 * separate frame pointer, so BPF_REG_10 relative accesses are
192 * adjusted to be $sp relative.
193 */
194int ebpf_to_mips_reg(struct jit_ctx *ctx, const struct bpf_insn *insn,
195 enum which_ebpf_reg w)
196{
197 int ebpf_reg = (w == src_reg || w == src_reg_no_fp) ?
198 insn->src_reg : insn->dst_reg;
199
200 switch (ebpf_reg) {
201 case BPF_REG_0:
202 return MIPS_R_V0;
203 case BPF_REG_1:
204 return MIPS_R_A0;
205 case BPF_REG_2:
206 return MIPS_R_A1;
207 case BPF_REG_3:
208 return MIPS_R_A2;
209 case BPF_REG_4:
210 return MIPS_R_A3;
211 case BPF_REG_5:
212 return MIPS_R_A4;
213 case BPF_REG_6:
214 ctx->flags |= EBPF_SAVE_S0;
215 return MIPS_R_S0;
216 case BPF_REG_7:
217 ctx->flags |= EBPF_SAVE_S1;
218 return MIPS_R_S1;
219 case BPF_REG_8:
220 ctx->flags |= EBPF_SAVE_S2;
221 return MIPS_R_S2;
222 case BPF_REG_9:
223 ctx->flags |= EBPF_SAVE_S3;
224 return MIPS_R_S3;
225 case BPF_REG_10:
226 if (w == dst_reg || w == src_reg_no_fp)
227 goto bad_reg;
228 ctx->flags |= EBPF_SEEN_FP;
229 /*
230 * Needs special handling, return something that
231 * cannot be clobbered just in case.
232 */
233 return MIPS_R_ZERO;
234 case BPF_REG_AX:
235 return MIPS_R_T4;
236 default:
237bad_reg:
238 WARN(1, "Illegal bpf reg: %d\n", ebpf_reg);
239 return -EINVAL;
240 }
241}
242/*
243 * eBPF stack frame will be something like:
244 *
245 * Entry $sp ------> +--------------------------------+
246 * | $ra (optional) |
247 * +--------------------------------+
248 * | $s0 (optional) |
249 * +--------------------------------+
250 * | $s1 (optional) |
251 * +--------------------------------+
252 * | $s2 (optional) |
253 * +--------------------------------+
254 * | $s3 (optional) |
255 * +--------------------------------+
256 * | $s4 (optional) |
257 * +--------------------------------+
258 * | tmp-storage (if $ra saved) |
259 * $sp + tmp_offset --> +--------------------------------+ <--BPF_REG_10
260 * | BPF_REG_10 relative storage |
261 * | MAX_BPF_STACK (optional) |
262 * | . |
263 * | . |
264 * | . |
265 * $sp --------> +--------------------------------+
266 *
267 * If BPF_REG_10 is never referenced, then the MAX_BPF_STACK sized
268 * area is not allocated.
269 */
270static int gen_int_prologue(struct jit_ctx *ctx)
271{
272 int stack_adjust = 0;
273 int store_offset;
274 int locals_size;
275
276 if (ctx->flags & EBPF_SAVE_RA)
277 /*
278 * If RA we are doing a function call and may need
279 * extra 8-byte tmp area.
280 */
281 stack_adjust += 16;
282 if (ctx->flags & EBPF_SAVE_S0)
283 stack_adjust += 8;
284 if (ctx->flags & EBPF_SAVE_S1)
285 stack_adjust += 8;
286 if (ctx->flags & EBPF_SAVE_S2)
287 stack_adjust += 8;
288 if (ctx->flags & EBPF_SAVE_S3)
289 stack_adjust += 8;
290 if (ctx->flags & EBPF_SAVE_S4)
291 stack_adjust += 8;
292
293 BUILD_BUG_ON(MAX_BPF_STACK & 7);
294 locals_size = (ctx->flags & EBPF_SEEN_FP) ? MAX_BPF_STACK : 0;
295
296 stack_adjust += locals_size;
297 ctx->tmp_offset = locals_size;
298
299 ctx->stack_size = stack_adjust;
300
301 /*
302 * First instruction initializes the tail call count (TCC).
303 * On tail call we skip this instruction, and the TCC is
304 * passed in $v1 from the caller.
305 */
306 emit_instr(ctx, daddiu, MIPS_R_V1, MIPS_R_ZERO, MAX_TAIL_CALL_CNT);
307 if (stack_adjust)
308 emit_instr(ctx, daddiu, MIPS_R_SP, MIPS_R_SP, -stack_adjust);
309 else
310 return 0;
311
312 store_offset = stack_adjust - 8;
313
314 if (ctx->flags & EBPF_SAVE_RA) {
315 emit_instr(ctx, sd, MIPS_R_RA, store_offset, MIPS_R_SP);
316 store_offset -= 8;
317 }
318 if (ctx->flags & EBPF_SAVE_S0) {
319 emit_instr(ctx, sd, MIPS_R_S0, store_offset, MIPS_R_SP);
320 store_offset -= 8;
321 }
322 if (ctx->flags & EBPF_SAVE_S1) {
323 emit_instr(ctx, sd, MIPS_R_S1, store_offset, MIPS_R_SP);
324 store_offset -= 8;
325 }
326 if (ctx->flags & EBPF_SAVE_S2) {
327 emit_instr(ctx, sd, MIPS_R_S2, store_offset, MIPS_R_SP);
328 store_offset -= 8;
329 }
330 if (ctx->flags & EBPF_SAVE_S3) {
331 emit_instr(ctx, sd, MIPS_R_S3, store_offset, MIPS_R_SP);
332 store_offset -= 8;
333 }
334 if (ctx->flags & EBPF_SAVE_S4) {
335 emit_instr(ctx, sd, MIPS_R_S4, store_offset, MIPS_R_SP);
336 store_offset -= 8;
337 }
338
339 if ((ctx->flags & EBPF_SEEN_TC) && !(ctx->flags & EBPF_TCC_IN_V1))
340 emit_instr(ctx, daddu, MIPS_R_S4, MIPS_R_V1, MIPS_R_ZERO);
341
342 return 0;
343}
344
345static int build_int_epilogue(struct jit_ctx *ctx, int dest_reg)
346{
347 const struct bpf_prog *prog = ctx->skf;
348 int stack_adjust = ctx->stack_size;
349 int store_offset = stack_adjust - 8;
350 int r0 = MIPS_R_V0;
351
352 if (dest_reg == MIPS_R_RA &&
353 get_reg_val_type(ctx, prog->len, BPF_REG_0) == REG_32BIT_ZERO_EX)
354 /* Don't let zero extended value escape. */
355 emit_instr(ctx, sll, r0, r0, 0);
356
357 if (ctx->flags & EBPF_SAVE_RA) {
358 emit_instr(ctx, ld, MIPS_R_RA, store_offset, MIPS_R_SP);
359 store_offset -= 8;
360 }
361 if (ctx->flags & EBPF_SAVE_S0) {
362 emit_instr(ctx, ld, MIPS_R_S0, store_offset, MIPS_R_SP);
363 store_offset -= 8;
364 }
365 if (ctx->flags & EBPF_SAVE_S1) {
366 emit_instr(ctx, ld, MIPS_R_S1, store_offset, MIPS_R_SP);
367 store_offset -= 8;
368 }
369 if (ctx->flags & EBPF_SAVE_S2) {
370 emit_instr(ctx, ld, MIPS_R_S2, store_offset, MIPS_R_SP);
371 store_offset -= 8;
372 }
373 if (ctx->flags & EBPF_SAVE_S3) {
374 emit_instr(ctx, ld, MIPS_R_S3, store_offset, MIPS_R_SP);
375 store_offset -= 8;
376 }
377 if (ctx->flags & EBPF_SAVE_S4) {
378 emit_instr(ctx, ld, MIPS_R_S4, store_offset, MIPS_R_SP);
379 store_offset -= 8;
380 }
381 emit_instr(ctx, jr, dest_reg);
382
383 if (stack_adjust)
384 emit_instr(ctx, daddiu, MIPS_R_SP, MIPS_R_SP, stack_adjust);
385 else
386 emit_instr(ctx, nop);
387
388 return 0;
389}
390
391static void gen_imm_to_reg(const struct bpf_insn *insn, int reg,
392 struct jit_ctx *ctx)
393{
394 if (insn->imm >= S16_MIN && insn->imm <= S16_MAX) {
395 emit_instr(ctx, addiu, reg, MIPS_R_ZERO, insn->imm);
396 } else {
397 int lower = (s16)(insn->imm & 0xffff);
398 int upper = insn->imm - lower;
399
400 emit_instr(ctx, lui, reg, upper >> 16);
401 emit_instr(ctx, addiu, reg, reg, lower);
402 }
403
404}
405
406static int gen_imm_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
407 int idx)
408{
409 int upper_bound, lower_bound;
410 int dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
411
412 if (dst < 0)
413 return dst;
414
415 switch (BPF_OP(insn->code)) {
416 case BPF_MOV:
417 case BPF_ADD:
418 upper_bound = S16_MAX;
419 lower_bound = S16_MIN;
420 break;
421 case BPF_SUB:
422 upper_bound = -(int)S16_MIN;
423 lower_bound = -(int)S16_MAX;
424 break;
425 case BPF_AND:
426 case BPF_OR:
427 case BPF_XOR:
428 upper_bound = 0xffff;
429 lower_bound = 0;
430 break;
431 case BPF_RSH:
432 case BPF_LSH:
433 case BPF_ARSH:
434 /* Shift amounts are truncated, no need for bounds */
435 upper_bound = S32_MAX;
436 lower_bound = S32_MIN;
437 break;
438 default:
439 return -EINVAL;
440 }
441
442 /*
443 * Immediate move clobbers the register, so no sign/zero
444 * extension needed.
445 */
446 if (BPF_CLASS(insn->code) == BPF_ALU64 &&
447 BPF_OP(insn->code) != BPF_MOV &&
448 get_reg_val_type(ctx, idx, insn->dst_reg) == REG_32BIT)
449 emit_instr(ctx, dinsu, dst, MIPS_R_ZERO, 32, 32);
450 /* BPF_ALU | BPF_LSH doesn't need separate sign extension */
451 if (BPF_CLASS(insn->code) == BPF_ALU &&
452 BPF_OP(insn->code) != BPF_LSH &&
453 BPF_OP(insn->code) != BPF_MOV &&
454 get_reg_val_type(ctx, idx, insn->dst_reg) != REG_32BIT)
455 emit_instr(ctx, sll, dst, dst, 0);
456
457 if (insn->imm >= lower_bound && insn->imm <= upper_bound) {
458 /* single insn immediate case */
459 switch (BPF_OP(insn->code) | BPF_CLASS(insn->code)) {
460 case BPF_ALU64 | BPF_MOV:
461 emit_instr(ctx, daddiu, dst, MIPS_R_ZERO, insn->imm);
462 break;
463 case BPF_ALU64 | BPF_AND:
464 case BPF_ALU | BPF_AND:
465 emit_instr(ctx, andi, dst, dst, insn->imm);
466 break;
467 case BPF_ALU64 | BPF_OR:
468 case BPF_ALU | BPF_OR:
469 emit_instr(ctx, ori, dst, dst, insn->imm);
470 break;
471 case BPF_ALU64 | BPF_XOR:
472 case BPF_ALU | BPF_XOR:
473 emit_instr(ctx, xori, dst, dst, insn->imm);
474 break;
475 case BPF_ALU64 | BPF_ADD:
476 emit_instr(ctx, daddiu, dst, dst, insn->imm);
477 break;
478 case BPF_ALU64 | BPF_SUB:
479 emit_instr(ctx, daddiu, dst, dst, -insn->imm);
480 break;
481 case BPF_ALU64 | BPF_RSH:
482 emit_instr(ctx, dsrl_safe, dst, dst, insn->imm & 0x3f);
483 break;
484 case BPF_ALU | BPF_RSH:
485 emit_instr(ctx, srl, dst, dst, insn->imm & 0x1f);
486 break;
487 case BPF_ALU64 | BPF_LSH:
488 emit_instr(ctx, dsll_safe, dst, dst, insn->imm & 0x3f);
489 break;
490 case BPF_ALU | BPF_LSH:
491 emit_instr(ctx, sll, dst, dst, insn->imm & 0x1f);
492 break;
493 case BPF_ALU64 | BPF_ARSH:
494 emit_instr(ctx, dsra_safe, dst, dst, insn->imm & 0x3f);
495 break;
496 case BPF_ALU | BPF_ARSH:
497 emit_instr(ctx, sra, dst, dst, insn->imm & 0x1f);
498 break;
499 case BPF_ALU | BPF_MOV:
500 emit_instr(ctx, addiu, dst, MIPS_R_ZERO, insn->imm);
501 break;
502 case BPF_ALU | BPF_ADD:
503 emit_instr(ctx, addiu, dst, dst, insn->imm);
504 break;
505 case BPF_ALU | BPF_SUB:
506 emit_instr(ctx, addiu, dst, dst, -insn->imm);
507 break;
508 default:
509 return -EINVAL;
510 }
511 } else {
512 /* multi insn immediate case */
513 if (BPF_OP(insn->code) == BPF_MOV) {
514 gen_imm_to_reg(insn, dst, ctx);
515 } else {
516 gen_imm_to_reg(insn, MIPS_R_AT, ctx);
517 switch (BPF_OP(insn->code) | BPF_CLASS(insn->code)) {
518 case BPF_ALU64 | BPF_AND:
519 case BPF_ALU | BPF_AND:
520 emit_instr(ctx, and, dst, dst, MIPS_R_AT);
521 break;
522 case BPF_ALU64 | BPF_OR:
523 case BPF_ALU | BPF_OR:
524 emit_instr(ctx, or, dst, dst, MIPS_R_AT);
525 break;
526 case BPF_ALU64 | BPF_XOR:
527 case BPF_ALU | BPF_XOR:
528 emit_instr(ctx, xor, dst, dst, MIPS_R_AT);
529 break;
530 case BPF_ALU64 | BPF_ADD:
531 emit_instr(ctx, daddu, dst, dst, MIPS_R_AT);
532 break;
533 case BPF_ALU64 | BPF_SUB:
534 emit_instr(ctx, dsubu, dst, dst, MIPS_R_AT);
535 break;
536 case BPF_ALU | BPF_ADD:
537 emit_instr(ctx, addu, dst, dst, MIPS_R_AT);
538 break;
539 case BPF_ALU | BPF_SUB:
540 emit_instr(ctx, subu, dst, dst, MIPS_R_AT);
541 break;
542 default:
543 return -EINVAL;
544 }
545 }
546 }
547
548 return 0;
549}
550
551static void * __must_check
552ool_skb_header_pointer(const struct sk_buff *skb, int offset,
553 int len, void *buffer)
554{
555 return skb_header_pointer(skb, offset, len, buffer);
556}
557
558static int size_to_len(const struct bpf_insn *insn)
559{
560 switch (BPF_SIZE(insn->code)) {
561 case BPF_B:
562 return 1;
563 case BPF_H:
564 return 2;
565 case BPF_W:
566 return 4;
567 case BPF_DW:
568 return 8;
569 }
570 return 0;
571}
572
573static void emit_const_to_reg(struct jit_ctx *ctx, int dst, u64 value)
574{
575 if (value >= 0xffffffffffff8000ull || value < 0x8000ull) {
576 emit_instr(ctx, daddiu, dst, MIPS_R_ZERO, (int)value);
577 } else if (value >= 0xffffffff80000000ull ||
578 (value < 0x80000000 && value > 0xffff)) {
579 emit_instr(ctx, lui, dst, (s32)(s16)(value >> 16));
580 emit_instr(ctx, ori, dst, dst, (unsigned int)(value & 0xffff));
581 } else {
582 int i;
583 bool seen_part = false;
584 int needed_shift = 0;
585
586 for (i = 0; i < 4; i++) {
587 u64 part = (value >> (16 * (3 - i))) & 0xffff;
588
589 if (seen_part && needed_shift > 0 && (part || i == 3)) {
590 emit_instr(ctx, dsll_safe, dst, dst, needed_shift);
591 needed_shift = 0;
592 }
593 if (part) {
594 if (i == 0 || (!seen_part && i < 3 && part < 0x8000)) {
595 emit_instr(ctx, lui, dst, (s32)(s16)part);
596 needed_shift = -16;
597 } else {
598 emit_instr(ctx, ori, dst,
599 seen_part ? dst : MIPS_R_ZERO,
600 (unsigned int)part);
601 }
602 seen_part = true;
603 }
604 if (seen_part)
605 needed_shift += 16;
606 }
607 }
608}
609
610static int emit_bpf_tail_call(struct jit_ctx *ctx, int this_idx)
611{
612 int off, b_off;
613
614 ctx->flags |= EBPF_SEEN_TC;
615 /*
616 * if (index >= array->map.max_entries)
617 * goto out;
618 */
619 off = offsetof(struct bpf_array, map.max_entries);
620 emit_instr(ctx, lwu, MIPS_R_T5, off, MIPS_R_A1);
621 emit_instr(ctx, sltu, MIPS_R_AT, MIPS_R_T5, MIPS_R_A2);
622 b_off = b_imm(this_idx + 1, ctx);
623 emit_instr(ctx, bne, MIPS_R_AT, MIPS_R_ZERO, b_off);
624 /*
625 * if (--TCC < 0)
626 * goto out;
627 */
628 /* Delay slot */
629 emit_instr(ctx, daddiu, MIPS_R_T5,
630 (ctx->flags & EBPF_TCC_IN_V1) ? MIPS_R_V1 : MIPS_R_S4, -1);
631 b_off = b_imm(this_idx + 1, ctx);
632 emit_instr(ctx, bltz, MIPS_R_T5, b_off);
633 /*
634 * prog = array->ptrs[index];
635 * if (prog == NULL)
636 * goto out;
637 */
638 /* Delay slot */
639 emit_instr(ctx, dsll, MIPS_R_T8, MIPS_R_A2, 3);
640 emit_instr(ctx, daddu, MIPS_R_T8, MIPS_R_T8, MIPS_R_A1);
641 off = offsetof(struct bpf_array, ptrs);
642 emit_instr(ctx, ld, MIPS_R_AT, off, MIPS_R_T8);
643 b_off = b_imm(this_idx + 1, ctx);
644 emit_instr(ctx, beq, MIPS_R_AT, MIPS_R_ZERO, b_off);
645 /* Delay slot */
646 emit_instr(ctx, nop);
647
648 /* goto *(prog->bpf_func + 4); */
649 off = offsetof(struct bpf_prog, bpf_func);
650 emit_instr(ctx, ld, MIPS_R_T9, off, MIPS_R_AT);
651 /* All systems are go... propagate TCC */
652 emit_instr(ctx, daddu, MIPS_R_V1, MIPS_R_T5, MIPS_R_ZERO);
653 /* Skip first instruction (TCC initialization) */
654 emit_instr(ctx, daddiu, MIPS_R_T9, MIPS_R_T9, 4);
655 return build_int_epilogue(ctx, MIPS_R_T9);
656}
657
658static bool use_bbit_insns(void)
659{
660 switch (current_cpu_type()) {
661 case CPU_CAVIUM_OCTEON:
662 case CPU_CAVIUM_OCTEON_PLUS:
663 case CPU_CAVIUM_OCTEON2:
664 case CPU_CAVIUM_OCTEON3:
665 return true;
666 default:
667 return false;
668 }
669}
670
671static bool is_bad_offset(int b_off)
672{
673 return b_off > 0x1ffff || b_off < -0x20000;
674}
675
676/* Returns the number of insn slots consumed. */
677static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
678 int this_idx, int exit_idx)
679{
680 int src, dst, r, td, ts, mem_off, b_off;
681 bool need_swap, did_move, cmp_eq;
682 unsigned int target;
683 u64 t64;
684 s64 t64s;
685
686 switch (insn->code) {
687 case BPF_ALU64 | BPF_ADD | BPF_K: /* ALU64_IMM */
688 case BPF_ALU64 | BPF_SUB | BPF_K: /* ALU64_IMM */
689 case BPF_ALU64 | BPF_OR | BPF_K: /* ALU64_IMM */
690 case BPF_ALU64 | BPF_AND | BPF_K: /* ALU64_IMM */
691 case BPF_ALU64 | BPF_LSH | BPF_K: /* ALU64_IMM */
692 case BPF_ALU64 | BPF_RSH | BPF_K: /* ALU64_IMM */
693 case BPF_ALU64 | BPF_XOR | BPF_K: /* ALU64_IMM */
694 case BPF_ALU64 | BPF_ARSH | BPF_K: /* ALU64_IMM */
695 case BPF_ALU64 | BPF_MOV | BPF_K: /* ALU64_IMM */
696 case BPF_ALU | BPF_MOV | BPF_K: /* ALU32_IMM */
697 case BPF_ALU | BPF_ADD | BPF_K: /* ALU32_IMM */
698 case BPF_ALU | BPF_SUB | BPF_K: /* ALU32_IMM */
699 case BPF_ALU | BPF_OR | BPF_K: /* ALU64_IMM */
700 case BPF_ALU | BPF_AND | BPF_K: /* ALU64_IMM */
701 case BPF_ALU | BPF_LSH | BPF_K: /* ALU64_IMM */
702 case BPF_ALU | BPF_RSH | BPF_K: /* ALU64_IMM */
703 case BPF_ALU | BPF_XOR | BPF_K: /* ALU64_IMM */
704 case BPF_ALU | BPF_ARSH | BPF_K: /* ALU64_IMM */
705 r = gen_imm_insn(insn, ctx, this_idx);
706 if (r < 0)
707 return r;
708 break;
709 case BPF_ALU64 | BPF_MUL | BPF_K: /* ALU64_IMM */
710 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
711 if (dst < 0)
712 return dst;
713 if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT)
714 emit_instr(ctx, dinsu, dst, MIPS_R_ZERO, 32, 32);
715 if (insn->imm == 1) /* Mult by 1 is a nop */
716 break;
717 gen_imm_to_reg(insn, MIPS_R_AT, ctx);
718 emit_instr(ctx, dmultu, MIPS_R_AT, dst);
719 emit_instr(ctx, mflo, dst);
720 break;
721 case BPF_ALU64 | BPF_NEG | BPF_K: /* ALU64_IMM */
722 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
723 if (dst < 0)
724 return dst;
725 if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT)
726 emit_instr(ctx, dinsu, dst, MIPS_R_ZERO, 32, 32);
727 emit_instr(ctx, dsubu, dst, MIPS_R_ZERO, dst);
728 break;
729 case BPF_ALU | BPF_MUL | BPF_K: /* ALU_IMM */
730 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
731 if (dst < 0)
732 return dst;
733 td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
734 if (td == REG_64BIT || td == REG_32BIT_ZERO_EX) {
735 /* sign extend */
736 emit_instr(ctx, sll, dst, dst, 0);
737 }
738 if (insn->imm == 1) /* Mult by 1 is a nop */
739 break;
740 gen_imm_to_reg(insn, MIPS_R_AT, ctx);
741 emit_instr(ctx, multu, dst, MIPS_R_AT);
742 emit_instr(ctx, mflo, dst);
743 break;
744 case BPF_ALU | BPF_NEG | BPF_K: /* ALU_IMM */
745 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
746 if (dst < 0)
747 return dst;
748 td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
749 if (td == REG_64BIT || td == REG_32BIT_ZERO_EX) {
750 /* sign extend */
751 emit_instr(ctx, sll, dst, dst, 0);
752 }
753 emit_instr(ctx, subu, dst, MIPS_R_ZERO, dst);
754 break;
755 case BPF_ALU | BPF_DIV | BPF_K: /* ALU_IMM */
756 case BPF_ALU | BPF_MOD | BPF_K: /* ALU_IMM */
757 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
758 if (dst < 0)
759 return dst;
760 if (insn->imm == 0) { /* Div by zero */
761 b_off = b_imm(exit_idx, ctx);
762 if (is_bad_offset(b_off))
763 return -E2BIG;
764 emit_instr(ctx, beq, MIPS_R_ZERO, MIPS_R_ZERO, b_off);
765 emit_instr(ctx, addu, MIPS_R_V0, MIPS_R_ZERO, MIPS_R_ZERO);
766 }
767 td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
768 if (td == REG_64BIT || td == REG_32BIT_ZERO_EX)
769 /* sign extend */
770 emit_instr(ctx, sll, dst, dst, 0);
771 if (insn->imm == 1) {
772 /* div by 1 is a nop, mod by 1 is zero */
773 if (BPF_OP(insn->code) == BPF_MOD)
774 emit_instr(ctx, addu, dst, MIPS_R_ZERO, MIPS_R_ZERO);
775 break;
776 }
777 gen_imm_to_reg(insn, MIPS_R_AT, ctx);
778 emit_instr(ctx, divu, dst, MIPS_R_AT);
779 if (BPF_OP(insn->code) == BPF_DIV)
780 emit_instr(ctx, mflo, dst);
781 else
782 emit_instr(ctx, mfhi, dst);
783 break;
784 case BPF_ALU64 | BPF_DIV | BPF_K: /* ALU_IMM */
785 case BPF_ALU64 | BPF_MOD | BPF_K: /* ALU_IMM */
786 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
787 if (dst < 0)
788 return dst;
789 if (insn->imm == 0) { /* Div by zero */
790 b_off = b_imm(exit_idx, ctx);
791 if (is_bad_offset(b_off))
792 return -E2BIG;
793 emit_instr(ctx, beq, MIPS_R_ZERO, MIPS_R_ZERO, b_off);
794 emit_instr(ctx, addu, MIPS_R_V0, MIPS_R_ZERO, MIPS_R_ZERO);
795 }
796 if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT)
797 emit_instr(ctx, dinsu, dst, MIPS_R_ZERO, 32, 32);
798
799 if (insn->imm == 1) {
800 /* div by 1 is a nop, mod by 1 is zero */
801 if (BPF_OP(insn->code) == BPF_MOD)
802 emit_instr(ctx, addu, dst, MIPS_R_ZERO, MIPS_R_ZERO);
803 break;
804 }
805 gen_imm_to_reg(insn, MIPS_R_AT, ctx);
806 emit_instr(ctx, ddivu, dst, MIPS_R_AT);
807 if (BPF_OP(insn->code) == BPF_DIV)
808 emit_instr(ctx, mflo, dst);
809 else
810 emit_instr(ctx, mfhi, dst);
811 break;
812 case BPF_ALU64 | BPF_MOV | BPF_X: /* ALU64_REG */
813 case BPF_ALU64 | BPF_ADD | BPF_X: /* ALU64_REG */
814 case BPF_ALU64 | BPF_SUB | BPF_X: /* ALU64_REG */
815 case BPF_ALU64 | BPF_XOR | BPF_X: /* ALU64_REG */
816 case BPF_ALU64 | BPF_OR | BPF_X: /* ALU64_REG */
817 case BPF_ALU64 | BPF_AND | BPF_X: /* ALU64_REG */
818 case BPF_ALU64 | BPF_MUL | BPF_X: /* ALU64_REG */
819 case BPF_ALU64 | BPF_DIV | BPF_X: /* ALU64_REG */
820 case BPF_ALU64 | BPF_MOD | BPF_X: /* ALU64_REG */
821 case BPF_ALU64 | BPF_LSH | BPF_X: /* ALU64_REG */
822 case BPF_ALU64 | BPF_RSH | BPF_X: /* ALU64_REG */
823 case BPF_ALU64 | BPF_ARSH | BPF_X: /* ALU64_REG */
824 src = ebpf_to_mips_reg(ctx, insn, src_reg);
825 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
826 if (src < 0 || dst < 0)
827 return -EINVAL;
828 if (get_reg_val_type(ctx, this_idx, insn->dst_reg) == REG_32BIT)
829 emit_instr(ctx, dinsu, dst, MIPS_R_ZERO, 32, 32);
830 did_move = false;
831 if (insn->src_reg == BPF_REG_10) {
832 if (BPF_OP(insn->code) == BPF_MOV) {
833 emit_instr(ctx, daddiu, dst, MIPS_R_SP, MAX_BPF_STACK);
834 did_move = true;
835 } else {
836 emit_instr(ctx, daddiu, MIPS_R_AT, MIPS_R_SP, MAX_BPF_STACK);
837 src = MIPS_R_AT;
838 }
839 } else if (get_reg_val_type(ctx, this_idx, insn->src_reg) == REG_32BIT) {
840 int tmp_reg = MIPS_R_AT;
841
842 if (BPF_OP(insn->code) == BPF_MOV) {
843 tmp_reg = dst;
844 did_move = true;
845 }
846 emit_instr(ctx, daddu, tmp_reg, src, MIPS_R_ZERO);
847 emit_instr(ctx, dinsu, tmp_reg, MIPS_R_ZERO, 32, 32);
848 src = MIPS_R_AT;
849 }
850 switch (BPF_OP(insn->code)) {
851 case BPF_MOV:
852 if (!did_move)
853 emit_instr(ctx, daddu, dst, src, MIPS_R_ZERO);
854 break;
855 case BPF_ADD:
856 emit_instr(ctx, daddu, dst, dst, src);
857 break;
858 case BPF_SUB:
859 emit_instr(ctx, dsubu, dst, dst, src);
860 break;
861 case BPF_XOR:
862 emit_instr(ctx, xor, dst, dst, src);
863 break;
864 case BPF_OR:
865 emit_instr(ctx, or, dst, dst, src);
866 break;
867 case BPF_AND:
868 emit_instr(ctx, and, dst, dst, src);
869 break;
870 case BPF_MUL:
871 emit_instr(ctx, dmultu, dst, src);
872 emit_instr(ctx, mflo, dst);
873 break;
874 case BPF_DIV:
875 case BPF_MOD:
876 b_off = b_imm(exit_idx, ctx);
877 if (is_bad_offset(b_off))
878 return -E2BIG;
879 emit_instr(ctx, beq, src, MIPS_R_ZERO, b_off);
880 emit_instr(ctx, movz, MIPS_R_V0, MIPS_R_ZERO, src);
881 emit_instr(ctx, ddivu, dst, src);
882 if (BPF_OP(insn->code) == BPF_DIV)
883 emit_instr(ctx, mflo, dst);
884 else
885 emit_instr(ctx, mfhi, dst);
886 break;
887 case BPF_LSH:
888 emit_instr(ctx, dsllv, dst, dst, src);
889 break;
890 case BPF_RSH:
891 emit_instr(ctx, dsrlv, dst, dst, src);
892 break;
893 case BPF_ARSH:
894 emit_instr(ctx, dsrav, dst, dst, src);
895 break;
896 default:
897 pr_err("ALU64_REG NOT HANDLED\n");
898 return -EINVAL;
899 }
900 break;
901 case BPF_ALU | BPF_MOV | BPF_X: /* ALU_REG */
902 case BPF_ALU | BPF_ADD | BPF_X: /* ALU_REG */
903 case BPF_ALU | BPF_SUB | BPF_X: /* ALU_REG */
904 case BPF_ALU | BPF_XOR | BPF_X: /* ALU_REG */
905 case BPF_ALU | BPF_OR | BPF_X: /* ALU_REG */
906 case BPF_ALU | BPF_AND | BPF_X: /* ALU_REG */
907 case BPF_ALU | BPF_MUL | BPF_X: /* ALU_REG */
908 case BPF_ALU | BPF_DIV | BPF_X: /* ALU_REG */
909 case BPF_ALU | BPF_MOD | BPF_X: /* ALU_REG */
910 case BPF_ALU | BPF_LSH | BPF_X: /* ALU_REG */
911 case BPF_ALU | BPF_RSH | BPF_X: /* ALU_REG */
912 src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp);
913 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
914 if (src < 0 || dst < 0)
915 return -EINVAL;
916 td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
917 if (td == REG_64BIT || td == REG_32BIT_ZERO_EX) {
918 /* sign extend */
919 emit_instr(ctx, sll, dst, dst, 0);
920 }
921 did_move = false;
922 ts = get_reg_val_type(ctx, this_idx, insn->src_reg);
923 if (ts == REG_64BIT || ts == REG_32BIT_ZERO_EX) {
924 int tmp_reg = MIPS_R_AT;
925
926 if (BPF_OP(insn->code) == BPF_MOV) {
927 tmp_reg = dst;
928 did_move = true;
929 }
930 /* sign extend */
931 emit_instr(ctx, sll, tmp_reg, src, 0);
932 src = MIPS_R_AT;
933 }
934 switch (BPF_OP(insn->code)) {
935 case BPF_MOV:
936 if (!did_move)
937 emit_instr(ctx, addu, dst, src, MIPS_R_ZERO);
938 break;
939 case BPF_ADD:
940 emit_instr(ctx, addu, dst, dst, src);
941 break;
942 case BPF_SUB:
943 emit_instr(ctx, subu, dst, dst, src);
944 break;
945 case BPF_XOR:
946 emit_instr(ctx, xor, dst, dst, src);
947 break;
948 case BPF_OR:
949 emit_instr(ctx, or, dst, dst, src);
950 break;
951 case BPF_AND:
952 emit_instr(ctx, and, dst, dst, src);
953 break;
954 case BPF_MUL:
955 emit_instr(ctx, mul, dst, dst, src);
956 break;
957 case BPF_DIV:
958 case BPF_MOD:
959 b_off = b_imm(exit_idx, ctx);
960 if (is_bad_offset(b_off))
961 return -E2BIG;
962 emit_instr(ctx, beq, src, MIPS_R_ZERO, b_off);
963 emit_instr(ctx, movz, MIPS_R_V0, MIPS_R_ZERO, src);
964 emit_instr(ctx, divu, dst, src);
965 if (BPF_OP(insn->code) == BPF_DIV)
966 emit_instr(ctx, mflo, dst);
967 else
968 emit_instr(ctx, mfhi, dst);
969 break;
970 case BPF_LSH:
971 emit_instr(ctx, sllv, dst, dst, src);
972 break;
973 case BPF_RSH:
974 emit_instr(ctx, srlv, dst, dst, src);
975 break;
976 default:
977 pr_err("ALU_REG NOT HANDLED\n");
978 return -EINVAL;
979 }
980 break;
981 case BPF_JMP | BPF_EXIT:
982 if (this_idx + 1 < exit_idx) {
983 b_off = b_imm(exit_idx, ctx);
984 if (is_bad_offset(b_off))
985 return -E2BIG;
986 emit_instr(ctx, beq, MIPS_R_ZERO, MIPS_R_ZERO, b_off);
987 emit_instr(ctx, nop);
988 }
989 break;
990 case BPF_JMP | BPF_JEQ | BPF_K: /* JMP_IMM */
991 case BPF_JMP | BPF_JNE | BPF_K: /* JMP_IMM */
992 cmp_eq = (BPF_OP(insn->code) == BPF_JEQ);
993 dst = ebpf_to_mips_reg(ctx, insn, dst_reg_fp_ok);
994 if (dst < 0)
995 return dst;
996 if (insn->imm == 0) {
997 src = MIPS_R_ZERO;
998 } else {
999 gen_imm_to_reg(insn, MIPS_R_AT, ctx);
1000 src = MIPS_R_AT;
1001 }
1002 goto jeq_common;
1003 case BPF_JMP | BPF_JEQ | BPF_X: /* JMP_REG */
1004 case BPF_JMP | BPF_JNE | BPF_X:
1005 case BPF_JMP | BPF_JSGT | BPF_X:
1006 case BPF_JMP | BPF_JSGE | BPF_X:
1007 case BPF_JMP | BPF_JGT | BPF_X:
1008 case BPF_JMP | BPF_JGE | BPF_X:
1009 case BPF_JMP | BPF_JSET | BPF_X:
1010 src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp);
1011 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
1012 if (src < 0 || dst < 0)
1013 return -EINVAL;
1014 td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
1015 ts = get_reg_val_type(ctx, this_idx, insn->src_reg);
1016 if (td == REG_32BIT && ts != REG_32BIT) {
1017 emit_instr(ctx, sll, MIPS_R_AT, src, 0);
1018 src = MIPS_R_AT;
1019 } else if (ts == REG_32BIT && td != REG_32BIT) {
1020 emit_instr(ctx, sll, MIPS_R_AT, dst, 0);
1021 dst = MIPS_R_AT;
1022 }
1023 if (BPF_OP(insn->code) == BPF_JSET) {
1024 emit_instr(ctx, and, MIPS_R_AT, dst, src);
1025 cmp_eq = false;
1026 dst = MIPS_R_AT;
1027 src = MIPS_R_ZERO;
1028 } else if (BPF_OP(insn->code) == BPF_JSGT) {
1029 emit_instr(ctx, dsubu, MIPS_R_AT, dst, src);
1030 if ((insn + 1)->code == (BPF_JMP | BPF_EXIT) && insn->off == 1) {
1031 b_off = b_imm(exit_idx, ctx);
1032 if (is_bad_offset(b_off))
1033 return -E2BIG;
1034 emit_instr(ctx, blez, MIPS_R_AT, b_off);
1035 emit_instr(ctx, nop);
1036 return 2; /* We consumed the exit. */
1037 }
1038 b_off = b_imm(this_idx + insn->off + 1, ctx);
1039 if (is_bad_offset(b_off))
1040 return -E2BIG;
1041 emit_instr(ctx, bgtz, MIPS_R_AT, b_off);
1042 emit_instr(ctx, nop);
1043 break;
1044 } else if (BPF_OP(insn->code) == BPF_JSGE) {
1045 emit_instr(ctx, slt, MIPS_R_AT, dst, src);
1046 cmp_eq = true;
1047 dst = MIPS_R_AT;
1048 src = MIPS_R_ZERO;
1049 } else if (BPF_OP(insn->code) == BPF_JGT) {
1050 /* dst or src could be AT */
1051 emit_instr(ctx, dsubu, MIPS_R_T8, dst, src);
1052 emit_instr(ctx, sltu, MIPS_R_AT, dst, src);
1053 /* SP known to be non-zero, movz becomes boolean not */
1054 emit_instr(ctx, movz, MIPS_R_T9, MIPS_R_SP, MIPS_R_T8);
1055 emit_instr(ctx, movn, MIPS_R_T9, MIPS_R_ZERO, MIPS_R_T8);
1056 emit_instr(ctx, or, MIPS_R_AT, MIPS_R_T9, MIPS_R_AT);
1057 cmp_eq = true;
1058 dst = MIPS_R_AT;
1059 src = MIPS_R_ZERO;
1060 } else if (BPF_OP(insn->code) == BPF_JGE) {
1061 emit_instr(ctx, sltu, MIPS_R_AT, dst, src);
1062 cmp_eq = true;
1063 dst = MIPS_R_AT;
1064 src = MIPS_R_ZERO;
1065 } else { /* JNE/JEQ case */
1066 cmp_eq = (BPF_OP(insn->code) == BPF_JEQ);
1067 }
1068jeq_common:
1069 /*
1070 * If the next insn is EXIT and we are jumping arround
1071 * only it, invert the sense of the compare and
1072 * conditionally jump to the exit. Poor man's branch
1073 * chaining.
1074 */
1075 if ((insn + 1)->code == (BPF_JMP | BPF_EXIT) && insn->off == 1) {
1076 b_off = b_imm(exit_idx, ctx);
1077 if (is_bad_offset(b_off)) {
1078 target = j_target(ctx, exit_idx);
1079 if (target == (unsigned int)-1)
1080 return -E2BIG;
1081 cmp_eq = !cmp_eq;
1082 b_off = 4 * 3;
1083 if (!(ctx->offsets[this_idx] & OFFSETS_B_CONV)) {
1084 ctx->offsets[this_idx] |= OFFSETS_B_CONV;
1085 ctx->long_b_conversion = 1;
1086 }
1087 }
1088
1089 if (cmp_eq)
1090 emit_instr(ctx, bne, dst, src, b_off);
1091 else
1092 emit_instr(ctx, beq, dst, src, b_off);
1093 emit_instr(ctx, nop);
1094 if (ctx->offsets[this_idx] & OFFSETS_B_CONV) {
1095 emit_instr(ctx, j, target);
1096 emit_instr(ctx, nop);
1097 }
1098 return 2; /* We consumed the exit. */
1099 }
1100 b_off = b_imm(this_idx + insn->off + 1, ctx);
1101 if (is_bad_offset(b_off)) {
1102 target = j_target(ctx, this_idx + insn->off + 1);
1103 if (target == (unsigned int)-1)
1104 return -E2BIG;
1105 cmp_eq = !cmp_eq;
1106 b_off = 4 * 3;
1107 if (!(ctx->offsets[this_idx] & OFFSETS_B_CONV)) {
1108 ctx->offsets[this_idx] |= OFFSETS_B_CONV;
1109 ctx->long_b_conversion = 1;
1110 }
1111 }
1112
1113 if (cmp_eq)
1114 emit_instr(ctx, beq, dst, src, b_off);
1115 else
1116 emit_instr(ctx, bne, dst, src, b_off);
1117 emit_instr(ctx, nop);
1118 if (ctx->offsets[this_idx] & OFFSETS_B_CONV) {
1119 emit_instr(ctx, j, target);
1120 emit_instr(ctx, nop);
1121 }
1122 break;
1123 case BPF_JMP | BPF_JSGT | BPF_K: /* JMP_IMM */
1124 case BPF_JMP | BPF_JSGE | BPF_K: /* JMP_IMM */
1125 cmp_eq = (BPF_OP(insn->code) == BPF_JSGE);
1126 dst = ebpf_to_mips_reg(ctx, insn, dst_reg_fp_ok);
1127 if (dst < 0)
1128 return dst;
1129
1130 if (insn->imm == 0) {
1131 if ((insn + 1)->code == (BPF_JMP | BPF_EXIT) && insn->off == 1) {
1132 b_off = b_imm(exit_idx, ctx);
1133 if (is_bad_offset(b_off))
1134 return -E2BIG;
1135 if (cmp_eq)
1136 emit_instr(ctx, bltz, dst, b_off);
1137 else
1138 emit_instr(ctx, blez, dst, b_off);
1139 emit_instr(ctx, nop);
1140 return 2; /* We consumed the exit. */
1141 }
1142 b_off = b_imm(this_idx + insn->off + 1, ctx);
1143 if (is_bad_offset(b_off))
1144 return -E2BIG;
1145 if (cmp_eq)
1146 emit_instr(ctx, bgez, dst, b_off);
1147 else
1148 emit_instr(ctx, bgtz, dst, b_off);
1149 emit_instr(ctx, nop);
1150 break;
1151 }
1152 /*
1153 * only "LT" compare available, so we must use imm + 1
1154 * to generate "GT"
1155 */
1156 t64s = insn->imm + (cmp_eq ? 0 : 1);
1157 if (t64s >= S16_MIN && t64s <= S16_MAX) {
1158 emit_instr(ctx, slti, MIPS_R_AT, dst, (int)t64s);
1159 src = MIPS_R_AT;
1160 dst = MIPS_R_ZERO;
1161 cmp_eq = true;
1162 goto jeq_common;
1163 }
1164 emit_const_to_reg(ctx, MIPS_R_AT, (u64)t64s);
1165 emit_instr(ctx, slt, MIPS_R_AT, dst, MIPS_R_AT);
1166 src = MIPS_R_AT;
1167 dst = MIPS_R_ZERO;
1168 cmp_eq = true;
1169 goto jeq_common;
1170
1171 case BPF_JMP | BPF_JGT | BPF_K:
1172 case BPF_JMP | BPF_JGE | BPF_K:
1173 cmp_eq = (BPF_OP(insn->code) == BPF_JGE);
1174 dst = ebpf_to_mips_reg(ctx, insn, dst_reg_fp_ok);
1175 if (dst < 0)
1176 return dst;
1177 /*
1178 * only "LT" compare available, so we must use imm + 1
1179 * to generate "GT"
1180 */
1181 t64s = (u64)(u32)(insn->imm) + (cmp_eq ? 0 : 1);
1182 if (t64s >= 0 && t64s <= S16_MAX) {
1183 emit_instr(ctx, sltiu, MIPS_R_AT, dst, (int)t64s);
1184 src = MIPS_R_AT;
1185 dst = MIPS_R_ZERO;
1186 cmp_eq = true;
1187 goto jeq_common;
1188 }
1189 emit_const_to_reg(ctx, MIPS_R_AT, (u64)t64s);
1190 emit_instr(ctx, sltu, MIPS_R_AT, dst, MIPS_R_AT);
1191 src = MIPS_R_AT;
1192 dst = MIPS_R_ZERO;
1193 cmp_eq = true;
1194 goto jeq_common;
1195
1196 case BPF_JMP | BPF_JSET | BPF_K: /* JMP_IMM */
1197 dst = ebpf_to_mips_reg(ctx, insn, dst_reg_fp_ok);
1198 if (dst < 0)
1199 return dst;
1200
1201 if (use_bbit_insns() && hweight32((u32)insn->imm) == 1) {
1202 if ((insn + 1)->code == (BPF_JMP | BPF_EXIT) && insn->off == 1) {
1203 b_off = b_imm(exit_idx, ctx);
1204 if (is_bad_offset(b_off))
1205 return -E2BIG;
1206 emit_instr(ctx, bbit0, dst, ffs((u32)insn->imm) - 1, b_off);
1207 emit_instr(ctx, nop);
1208 return 2; /* We consumed the exit. */
1209 }
1210 b_off = b_imm(this_idx + insn->off + 1, ctx);
1211 if (is_bad_offset(b_off))
1212 return -E2BIG;
1213 emit_instr(ctx, bbit1, dst, ffs((u32)insn->imm) - 1, b_off);
1214 emit_instr(ctx, nop);
1215 break;
1216 }
1217 t64 = (u32)insn->imm;
1218 emit_const_to_reg(ctx, MIPS_R_AT, t64);
1219 emit_instr(ctx, and, MIPS_R_AT, dst, MIPS_R_AT);
1220 src = MIPS_R_AT;
1221 dst = MIPS_R_ZERO;
1222 cmp_eq = false;
1223 goto jeq_common;
1224
1225 case BPF_JMP | BPF_JA:
1226 /*
1227 * Prefer relative branch for easier debugging, but
1228 * fall back if needed.
1229 */
1230 b_off = b_imm(this_idx + insn->off + 1, ctx);
1231 if (is_bad_offset(b_off)) {
1232 target = j_target(ctx, this_idx + insn->off + 1);
1233 if (target == (unsigned int)-1)
1234 return -E2BIG;
1235 emit_instr(ctx, j, target);
1236 } else {
1237 emit_instr(ctx, b, b_off);
1238 }
1239 emit_instr(ctx, nop);
1240 break;
1241 case BPF_LD | BPF_DW | BPF_IMM:
1242 if (insn->src_reg != 0)
1243 return -EINVAL;
1244 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
1245 if (dst < 0)
1246 return dst;
1247 t64 = ((u64)(u32)insn->imm) | ((u64)(insn + 1)->imm << 32);
1248 emit_const_to_reg(ctx, dst, t64);
1249 return 2; /* Double slot insn */
1250
1251 case BPF_JMP | BPF_CALL:
1252 ctx->flags |= EBPF_SAVE_RA;
1253 t64s = (s64)insn->imm + (s64)__bpf_call_base;
1254 emit_const_to_reg(ctx, MIPS_R_T9, (u64)t64s);
1255 emit_instr(ctx, jalr, MIPS_R_RA, MIPS_R_T9);
1256 /* delay slot */
1257 emit_instr(ctx, nop);
1258 break;
1259
1260 case BPF_JMP | BPF_TAIL_CALL:
1261 if (emit_bpf_tail_call(ctx, this_idx))
1262 return -EINVAL;
1263 break;
1264
1265 case BPF_LD | BPF_B | BPF_ABS:
1266 case BPF_LD | BPF_H | BPF_ABS:
1267 case BPF_LD | BPF_W | BPF_ABS:
1268 case BPF_LD | BPF_DW | BPF_ABS:
1269 ctx->flags |= EBPF_SAVE_RA;
1270
1271 gen_imm_to_reg(insn, MIPS_R_A1, ctx);
1272 emit_instr(ctx, addiu, MIPS_R_A2, MIPS_R_ZERO, size_to_len(insn));
1273
1274 if (insn->imm < 0) {
1275 emit_const_to_reg(ctx, MIPS_R_T9, (u64)bpf_internal_load_pointer_neg_helper);
1276 } else {
1277 emit_const_to_reg(ctx, MIPS_R_T9, (u64)ool_skb_header_pointer);
1278 emit_instr(ctx, daddiu, MIPS_R_A3, MIPS_R_SP, ctx->tmp_offset);
1279 }
1280 goto ld_skb_common;
1281
1282 case BPF_LD | BPF_B | BPF_IND:
1283 case BPF_LD | BPF_H | BPF_IND:
1284 case BPF_LD | BPF_W | BPF_IND:
1285 case BPF_LD | BPF_DW | BPF_IND:
1286 ctx->flags |= EBPF_SAVE_RA;
1287 src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp);
1288 if (src < 0)
1289 return src;
1290 ts = get_reg_val_type(ctx, this_idx, insn->src_reg);
1291 if (ts == REG_32BIT_ZERO_EX) {
1292 /* sign extend */
1293 emit_instr(ctx, sll, MIPS_R_A1, src, 0);
1294 src = MIPS_R_A1;
1295 }
1296 if (insn->imm >= S16_MIN && insn->imm <= S16_MAX) {
1297 emit_instr(ctx, daddiu, MIPS_R_A1, src, insn->imm);
1298 } else {
1299 gen_imm_to_reg(insn, MIPS_R_AT, ctx);
1300 emit_instr(ctx, daddu, MIPS_R_A1, MIPS_R_AT, src);
1301 }
1302 /* truncate to 32-bit int */
1303 emit_instr(ctx, sll, MIPS_R_A1, MIPS_R_A1, 0);
1304 emit_instr(ctx, daddiu, MIPS_R_A3, MIPS_R_SP, ctx->tmp_offset);
1305 emit_instr(ctx, slt, MIPS_R_AT, MIPS_R_A1, MIPS_R_ZERO);
1306
1307 emit_const_to_reg(ctx, MIPS_R_T8, (u64)bpf_internal_load_pointer_neg_helper);
1308 emit_const_to_reg(ctx, MIPS_R_T9, (u64)ool_skb_header_pointer);
1309 emit_instr(ctx, addiu, MIPS_R_A2, MIPS_R_ZERO, size_to_len(insn));
1310 emit_instr(ctx, movn, MIPS_R_T9, MIPS_R_T8, MIPS_R_AT);
1311
1312ld_skb_common:
1313 emit_instr(ctx, jalr, MIPS_R_RA, MIPS_R_T9);
1314 /* delay slot move */
1315 emit_instr(ctx, daddu, MIPS_R_A0, MIPS_R_S0, MIPS_R_ZERO);
1316
1317 /* Check the error value */
1318 b_off = b_imm(exit_idx, ctx);
1319 if (is_bad_offset(b_off)) {
1320 target = j_target(ctx, exit_idx);
1321 if (target == (unsigned int)-1)
1322 return -E2BIG;
1323
1324 if (!(ctx->offsets[this_idx] & OFFSETS_B_CONV)) {
1325 ctx->offsets[this_idx] |= OFFSETS_B_CONV;
1326 ctx->long_b_conversion = 1;
1327 }
1328 emit_instr(ctx, bne, MIPS_R_V0, MIPS_R_ZERO, 4 * 3);
1329 emit_instr(ctx, nop);
1330 emit_instr(ctx, j, target);
1331 emit_instr(ctx, nop);
1332 } else {
1333 emit_instr(ctx, beq, MIPS_R_V0, MIPS_R_ZERO, b_off);
1334 emit_instr(ctx, nop);
1335 }
1336
1337#ifdef __BIG_ENDIAN
1338 need_swap = false;
1339#else
1340 need_swap = true;
1341#endif
1342 dst = MIPS_R_V0;
1343 switch (BPF_SIZE(insn->code)) {
1344 case BPF_B:
1345 emit_instr(ctx, lbu, dst, 0, MIPS_R_V0);
1346 break;
1347 case BPF_H:
1348 emit_instr(ctx, lhu, dst, 0, MIPS_R_V0);
1349 if (need_swap)
1350 emit_instr(ctx, wsbh, dst, dst);
1351 break;
1352 case BPF_W:
1353 emit_instr(ctx, lw, dst, 0, MIPS_R_V0);
1354 if (need_swap) {
1355 emit_instr(ctx, wsbh, dst, dst);
1356 emit_instr(ctx, rotr, dst, dst, 16);
1357 }
1358 break;
1359 case BPF_DW:
1360 emit_instr(ctx, ld, dst, 0, MIPS_R_V0);
1361 if (need_swap) {
1362 emit_instr(ctx, dsbh, dst, dst);
1363 emit_instr(ctx, dshd, dst, dst);
1364 }
1365 break;
1366 }
1367
1368 break;
1369 case BPF_ALU | BPF_END | BPF_FROM_BE:
1370 case BPF_ALU | BPF_END | BPF_FROM_LE:
1371 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
1372 if (dst < 0)
1373 return dst;
1374 td = get_reg_val_type(ctx, this_idx, insn->dst_reg);
1375 if (insn->imm == 64 && td == REG_32BIT)
1376 emit_instr(ctx, dinsu, dst, MIPS_R_ZERO, 32, 32);
1377
1378 if (insn->imm != 64 &&
1379 (td == REG_64BIT || td == REG_32BIT_ZERO_EX)) {
1380 /* sign extend */
1381 emit_instr(ctx, sll, dst, dst, 0);
1382 }
1383
1384#ifdef __BIG_ENDIAN
1385 need_swap = (BPF_SRC(insn->code) == BPF_FROM_LE);
1386#else
1387 need_swap = (BPF_SRC(insn->code) == BPF_FROM_BE);
1388#endif
1389 if (insn->imm == 16) {
1390 if (need_swap)
1391 emit_instr(ctx, wsbh, dst, dst);
1392 emit_instr(ctx, andi, dst, dst, 0xffff);
1393 } else if (insn->imm == 32) {
1394 if (need_swap) {
1395 emit_instr(ctx, wsbh, dst, dst);
1396 emit_instr(ctx, rotr, dst, dst, 16);
1397 }
1398 } else { /* 64-bit*/
1399 if (need_swap) {
1400 emit_instr(ctx, dsbh, dst, dst);
1401 emit_instr(ctx, dshd, dst, dst);
1402 }
1403 }
1404 break;
1405
1406 case BPF_ST | BPF_B | BPF_MEM:
1407 case BPF_ST | BPF_H | BPF_MEM:
1408 case BPF_ST | BPF_W | BPF_MEM:
1409 case BPF_ST | BPF_DW | BPF_MEM:
1410 if (insn->dst_reg == BPF_REG_10) {
1411 ctx->flags |= EBPF_SEEN_FP;
1412 dst = MIPS_R_SP;
1413 mem_off = insn->off + MAX_BPF_STACK;
1414 } else {
1415 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
1416 if (dst < 0)
1417 return dst;
1418 mem_off = insn->off;
1419 }
1420 gen_imm_to_reg(insn, MIPS_R_AT, ctx);
1421 switch (BPF_SIZE(insn->code)) {
1422 case BPF_B:
1423 emit_instr(ctx, sb, MIPS_R_AT, mem_off, dst);
1424 break;
1425 case BPF_H:
1426 emit_instr(ctx, sh, MIPS_R_AT, mem_off, dst);
1427 break;
1428 case BPF_W:
1429 emit_instr(ctx, sw, MIPS_R_AT, mem_off, dst);
1430 break;
1431 case BPF_DW:
1432 emit_instr(ctx, sd, MIPS_R_AT, mem_off, dst);
1433 break;
1434 }
1435 break;
1436
1437 case BPF_LDX | BPF_B | BPF_MEM:
1438 case BPF_LDX | BPF_H | BPF_MEM:
1439 case BPF_LDX | BPF_W | BPF_MEM:
1440 case BPF_LDX | BPF_DW | BPF_MEM:
1441 if (insn->src_reg == BPF_REG_10) {
1442 ctx->flags |= EBPF_SEEN_FP;
1443 src = MIPS_R_SP;
1444 mem_off = insn->off + MAX_BPF_STACK;
1445 } else {
1446 src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp);
1447 if (src < 0)
1448 return src;
1449 mem_off = insn->off;
1450 }
1451 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
1452 if (dst < 0)
1453 return dst;
1454 switch (BPF_SIZE(insn->code)) {
1455 case BPF_B:
1456 emit_instr(ctx, lbu, dst, mem_off, src);
1457 break;
1458 case BPF_H:
1459 emit_instr(ctx, lhu, dst, mem_off, src);
1460 break;
1461 case BPF_W:
1462 emit_instr(ctx, lw, dst, mem_off, src);
1463 break;
1464 case BPF_DW:
1465 emit_instr(ctx, ld, dst, mem_off, src);
1466 break;
1467 }
1468 break;
1469
1470 case BPF_STX | BPF_B | BPF_MEM:
1471 case BPF_STX | BPF_H | BPF_MEM:
1472 case BPF_STX | BPF_W | BPF_MEM:
1473 case BPF_STX | BPF_DW | BPF_MEM:
1474 case BPF_STX | BPF_W | BPF_XADD:
1475 case BPF_STX | BPF_DW | BPF_XADD:
1476 if (insn->dst_reg == BPF_REG_10) {
1477 ctx->flags |= EBPF_SEEN_FP;
1478 dst = MIPS_R_SP;
1479 mem_off = insn->off + MAX_BPF_STACK;
1480 } else {
1481 dst = ebpf_to_mips_reg(ctx, insn, dst_reg);
1482 if (dst < 0)
1483 return dst;
1484 mem_off = insn->off;
1485 }
1486 src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp);
1487 if (src < 0)
1488 return dst;
1489 if (BPF_MODE(insn->code) == BPF_XADD) {
1490 switch (BPF_SIZE(insn->code)) {
1491 case BPF_W:
1492 if (get_reg_val_type(ctx, this_idx, insn->src_reg) == REG_32BIT) {
1493 emit_instr(ctx, sll, MIPS_R_AT, src, 0);
1494 src = MIPS_R_AT;
1495 }
1496 emit_instr(ctx, ll, MIPS_R_T8, mem_off, dst);
1497 emit_instr(ctx, addu, MIPS_R_T8, MIPS_R_T8, src);
1498 emit_instr(ctx, sc, MIPS_R_T8, mem_off, dst);
1499 /*
1500 * On failure back up to LL (-4
1501 * instructions of 4 bytes each
1502 */
1503 emit_instr(ctx, beq, MIPS_R_T8, MIPS_R_ZERO, -4 * 4);
1504 emit_instr(ctx, nop);
1505 break;
1506 case BPF_DW:
1507 if (get_reg_val_type(ctx, this_idx, insn->src_reg) == REG_32BIT) {
1508 emit_instr(ctx, daddu, MIPS_R_AT, src, MIPS_R_ZERO);
1509 emit_instr(ctx, dinsu, MIPS_R_AT, MIPS_R_ZERO, 32, 32);
1510 src = MIPS_R_AT;
1511 }
1512 emit_instr(ctx, lld, MIPS_R_T8, mem_off, dst);
1513 emit_instr(ctx, daddu, MIPS_R_T8, MIPS_R_T8, src);
1514 emit_instr(ctx, scd, MIPS_R_T8, mem_off, dst);
1515 emit_instr(ctx, beq, MIPS_R_T8, MIPS_R_ZERO, -4 * 4);
1516 emit_instr(ctx, nop);
1517 break;
1518 }
1519 } else { /* BPF_MEM */
1520 switch (BPF_SIZE(insn->code)) {
1521 case BPF_B:
1522 emit_instr(ctx, sb, src, mem_off, dst);
1523 break;
1524 case BPF_H:
1525 emit_instr(ctx, sh, src, mem_off, dst);
1526 break;
1527 case BPF_W:
1528 emit_instr(ctx, sw, src, mem_off, dst);
1529 break;
1530 case BPF_DW:
1531 if (get_reg_val_type(ctx, this_idx, insn->src_reg) == REG_32BIT) {
1532 emit_instr(ctx, daddu, MIPS_R_AT, src, MIPS_R_ZERO);
1533 emit_instr(ctx, dinsu, MIPS_R_AT, MIPS_R_ZERO, 32, 32);
1534 src = MIPS_R_AT;
1535 }
1536 emit_instr(ctx, sd, src, mem_off, dst);
1537 break;
1538 }
1539 }
1540 break;
1541
1542 default:
1543 pr_err("NOT HANDLED %d - (%02x)\n",
1544 this_idx, (unsigned int)insn->code);
1545 return -EINVAL;
1546 }
1547 return 1;
1548}
1549
1550#define RVT_VISITED_MASK 0xc000000000000000ull
1551#define RVT_FALL_THROUGH 0x4000000000000000ull
1552#define RVT_BRANCH_TAKEN 0x8000000000000000ull
1553#define RVT_DONE (RVT_FALL_THROUGH | RVT_BRANCH_TAKEN)
1554
1555static int build_int_body(struct jit_ctx *ctx)
1556{
1557 const struct bpf_prog *prog = ctx->skf;
1558 const struct bpf_insn *insn;
1559 int i, r;
1560
1561 for (i = 0; i < prog->len; ) {
1562 insn = prog->insnsi + i;
1563 if ((ctx->reg_val_types[i] & RVT_VISITED_MASK) == 0) {
1564 /* dead instruction, don't emit it. */
1565 i++;
1566 continue;
1567 }
1568
1569 if (ctx->target == NULL)
1570 ctx->offsets[i] = (ctx->offsets[i] & OFFSETS_B_CONV) | (ctx->idx * 4);
1571
1572 r = build_one_insn(insn, ctx, i, prog->len);
1573 if (r < 0)
1574 return r;
1575 i += r;
1576 }
1577 /* epilogue offset */
1578 if (ctx->target == NULL)
1579 ctx->offsets[i] = ctx->idx * 4;
1580
1581 /*
1582 * All exits have an offset of the epilogue, some offsets may
1583 * not have been set due to banch-around threading, so set
1584 * them now.
1585 */
1586 if (ctx->target == NULL)
1587 for (i = 0; i < prog->len; i++) {
1588 insn = prog->insnsi + i;
1589 if (insn->code == (BPF_JMP | BPF_EXIT))
1590 ctx->offsets[i] = ctx->idx * 4;
1591 }
1592 return 0;
1593}
1594
1595/* return the last idx processed, or negative for error */
1596static int reg_val_propagate_range(struct jit_ctx *ctx, u64 initial_rvt,
1597 int start_idx, bool follow_taken)
1598{
1599 const struct bpf_prog *prog = ctx->skf;
1600 const struct bpf_insn *insn;
1601 u64 exit_rvt = initial_rvt;
1602 u64 *rvt = ctx->reg_val_types;
1603 int idx;
1604 int reg;
1605
1606 for (idx = start_idx; idx < prog->len; idx++) {
1607 rvt[idx] = (rvt[idx] & RVT_VISITED_MASK) | exit_rvt;
1608 insn = prog->insnsi + idx;
1609 switch (BPF_CLASS(insn->code)) {
1610 case BPF_ALU:
1611 switch (BPF_OP(insn->code)) {
1612 case BPF_ADD:
1613 case BPF_SUB:
1614 case BPF_MUL:
1615 case BPF_DIV:
1616 case BPF_OR:
1617 case BPF_AND:
1618 case BPF_LSH:
1619 case BPF_RSH:
1620 case BPF_NEG:
1621 case BPF_MOD:
1622 case BPF_XOR:
1623 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT);
1624 break;
1625 case BPF_MOV:
1626 if (BPF_SRC(insn->code)) {
1627 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT);
1628 } else {
1629 /* IMM to REG move*/
1630 if (insn->imm >= 0)
1631 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS);
1632 else
1633 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT);
1634 }
1635 break;
1636 case BPF_END:
1637 if (insn->imm == 64)
1638 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT);
1639 else if (insn->imm == 32)
1640 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT);
1641 else /* insn->imm == 16 */
1642 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS);
1643 break;
1644 }
1645 rvt[idx] |= RVT_DONE;
1646 break;
1647 case BPF_ALU64:
1648 switch (BPF_OP(insn->code)) {
1649 case BPF_MOV:
1650 if (BPF_SRC(insn->code)) {
1651 /* REG to REG move*/
1652 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT);
1653 } else {
1654 /* IMM to REG move*/
1655 if (insn->imm >= 0)
1656 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS);
1657 else
1658 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT_32BIT);
1659 }
1660 break;
1661 default:
1662 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT);
1663 }
1664 rvt[idx] |= RVT_DONE;
1665 break;
1666 case BPF_LD:
1667 switch (BPF_SIZE(insn->code)) {
1668 case BPF_DW:
1669 if (BPF_MODE(insn->code) == BPF_IMM) {
1670 s64 val;
1671
1672 val = (s64)((u32)insn->imm | ((u64)(insn + 1)->imm << 32));
1673 if (val > 0 && val <= S32_MAX)
1674 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS);
1675 else if (val >= S32_MIN && val <= S32_MAX)
1676 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT_32BIT);
1677 else
1678 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT);
1679 rvt[idx] |= RVT_DONE;
1680 idx++;
1681 } else {
1682 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT);
1683 }
1684 break;
1685 case BPF_B:
1686 case BPF_H:
1687 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS);
1688 break;
1689 case BPF_W:
1690 if (BPF_MODE(insn->code) == BPF_IMM)
1691 set_reg_val_type(&exit_rvt, insn->dst_reg,
1692 insn->imm >= 0 ? REG_32BIT_POS : REG_32BIT);
1693 else
1694 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT);
1695 break;
1696 }
1697 rvt[idx] |= RVT_DONE;
1698 break;
1699 case BPF_LDX:
1700 switch (BPF_SIZE(insn->code)) {
1701 case BPF_DW:
1702 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_64BIT);
1703 break;
1704 case BPF_B:
1705 case BPF_H:
1706 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT_POS);
1707 break;
1708 case BPF_W:
1709 set_reg_val_type(&exit_rvt, insn->dst_reg, REG_32BIT);
1710 break;
1711 }
1712 rvt[idx] |= RVT_DONE;
1713 break;
1714 case BPF_JMP:
1715 switch (BPF_OP(insn->code)) {
1716 case BPF_EXIT:
1717 rvt[idx] = RVT_DONE | exit_rvt;
1718 rvt[prog->len] = exit_rvt;
1719 return idx;
1720 case BPF_JA:
1721 rvt[idx] |= RVT_DONE;
1722 idx += insn->off;
1723 break;
1724 case BPF_JEQ:
1725 case BPF_JGT:
1726 case BPF_JGE:
1727 case BPF_JSET:
1728 case BPF_JNE:
1729 case BPF_JSGT:
1730 case BPF_JSGE:
1731 if (follow_taken) {
1732 rvt[idx] |= RVT_BRANCH_TAKEN;
1733 idx += insn->off;
1734 follow_taken = false;
1735 } else {
1736 rvt[idx] |= RVT_FALL_THROUGH;
1737 }
1738 break;
1739 case BPF_CALL:
1740 set_reg_val_type(&exit_rvt, BPF_REG_0, REG_64BIT);
1741 /* Upon call return, argument registers are clobbered. */
1742 for (reg = BPF_REG_0; reg <= BPF_REG_5; reg++)
1743 set_reg_val_type(&exit_rvt, reg, REG_64BIT);
1744
1745 rvt[idx] |= RVT_DONE;
1746 break;
1747 default:
1748 WARN(1, "Unhandled BPF_JMP case.\n");
1749 rvt[idx] |= RVT_DONE;
1750 break;
1751 }
1752 break;
1753 default:
1754 rvt[idx] |= RVT_DONE;
1755 break;
1756 }
1757 }
1758 return idx;
1759}
1760
1761/*
1762 * Track the value range (i.e. 32-bit vs. 64-bit) of each register at
1763 * each eBPF insn. This allows unneeded sign and zero extension
1764 * operations to be omitted.
1765 *
1766 * Doesn't handle yet confluence of control paths with conflicting
1767 * ranges, but it is good enough for most sane code.
1768 */
1769static int reg_val_propagate(struct jit_ctx *ctx)
1770{
1771 const struct bpf_prog *prog = ctx->skf;
1772 u64 exit_rvt;
1773 int reg;
1774 int i;
1775
1776 /*
1777 * 11 registers * 3 bits/reg leaves top bits free for other
1778 * uses. Bit-62..63 used to see if we have visited an insn.
1779 */
1780 exit_rvt = 0;
1781
1782 /* Upon entry, argument registers are 64-bit. */
1783 for (reg = BPF_REG_1; reg <= BPF_REG_5; reg++)
1784 set_reg_val_type(&exit_rvt, reg, REG_64BIT);
1785
1786 /*
1787 * First follow all conditional branches on the fall-through
1788 * edge of control flow..
1789 */
1790 reg_val_propagate_range(ctx, exit_rvt, 0, false);
1791restart_search:
1792 /*
1793 * Then repeatedly find the first conditional branch where
1794 * both edges of control flow have not been taken, and follow
1795 * the branch taken edge. We will end up restarting the
1796 * search once per conditional branch insn.
1797 */
1798 for (i = 0; i < prog->len; i++) {
1799 u64 rvt = ctx->reg_val_types[i];
1800
1801 if ((rvt & RVT_VISITED_MASK) == RVT_DONE ||
1802 (rvt & RVT_VISITED_MASK) == 0)
1803 continue;
1804 if ((rvt & RVT_VISITED_MASK) == RVT_FALL_THROUGH) {
1805 reg_val_propagate_range(ctx, rvt & ~RVT_VISITED_MASK, i, true);
1806 } else { /* RVT_BRANCH_TAKEN */
1807 WARN(1, "Unexpected RVT_BRANCH_TAKEN case.\n");
1808 reg_val_propagate_range(ctx, rvt & ~RVT_VISITED_MASK, i, false);
1809 }
1810 goto restart_search;
1811 }
1812 /*
1813 * Eventually all conditional branches have been followed on
1814 * both branches and we are done. Any insn that has not been
1815 * visited at this point is dead.
1816 */
1817
1818 return 0;
1819}
1820
1821static void jit_fill_hole(void *area, unsigned int size)
1822{
1823 u32 *p;
1824
1825 /* We are guaranteed to have aligned memory. */
1826 for (p = area; size >= sizeof(u32); size -= sizeof(u32))
1827 uasm_i_break(&p, BRK_BUG); /* Increments p */
1828}
1829
1830struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *prog)
1831{
1832 struct bpf_prog *orig_prog = prog;
1833 bool tmp_blinded = false;
1834 struct bpf_prog *tmp;
1835 struct bpf_binary_header *header = NULL;
1836 struct jit_ctx ctx;
1837 unsigned int image_size;
1838 u8 *image_ptr;
1839
1840 if (!bpf_jit_enable || !cpu_has_mips64r2)
1841 return prog;
1842
1843 tmp = bpf_jit_blind_constants(prog);
1844 /* If blinding was requested and we failed during blinding,
1845 * we must fall back to the interpreter.
1846 */
1847 if (IS_ERR(tmp))
1848 return orig_prog;
1849 if (tmp != prog) {
1850 tmp_blinded = true;
1851 prog = tmp;
1852 }
1853
1854 memset(&ctx, 0, sizeof(ctx));
1855
1856 ctx.offsets = kcalloc(prog->len + 1, sizeof(*ctx.offsets), GFP_KERNEL);
1857 if (ctx.offsets == NULL)
1858 goto out_err;
1859
1860 ctx.reg_val_types = kcalloc(prog->len + 1, sizeof(*ctx.reg_val_types), GFP_KERNEL);
1861 if (ctx.reg_val_types == NULL)
1862 goto out_err;
1863
1864 ctx.skf = prog;
1865
1866 if (reg_val_propagate(&ctx))
1867 goto out_err;
1868
1869 /*
1870 * First pass discovers used resources and instruction offsets
1871 * assuming short branches are used.
1872 */
1873 if (build_int_body(&ctx))
1874 goto out_err;
1875
1876 /*
1877 * If no calls are made (EBPF_SAVE_RA), then tail call count
1878 * in $v1, else we must save in n$s4.
1879 */
1880 if (ctx.flags & EBPF_SEEN_TC) {
1881 if (ctx.flags & EBPF_SAVE_RA)
1882 ctx.flags |= EBPF_SAVE_S4;
1883 else
1884 ctx.flags |= EBPF_TCC_IN_V1;
1885 }
1886
1887 /*
1888 * Second pass generates offsets, if any branches are out of
1889 * range a jump-around long sequence is generated, and we have
1890 * to try again from the beginning to generate the new
1891 * offsets. This is done until no additional conversions are
1892 * necessary.
1893 */
1894 do {
1895 ctx.idx = 0;
1896 ctx.gen_b_offsets = 1;
1897 ctx.long_b_conversion = 0;
1898 if (gen_int_prologue(&ctx))
1899 goto out_err;
1900 if (build_int_body(&ctx))
1901 goto out_err;
1902 if (build_int_epilogue(&ctx, MIPS_R_RA))
1903 goto out_err;
1904 } while (ctx.long_b_conversion);
1905
1906 image_size = 4 * ctx.idx;
1907
1908 header = bpf_jit_binary_alloc(image_size, &image_ptr,
1909 sizeof(u32), jit_fill_hole);
1910 if (header == NULL)
1911 goto out_err;
1912
1913 ctx.target = (u32 *)image_ptr;
1914
1915 /* Third pass generates the code */
1916 ctx.idx = 0;
1917 if (gen_int_prologue(&ctx))
1918 goto out_err;
1919 if (build_int_body(&ctx))
1920 goto out_err;
1921 if (build_int_epilogue(&ctx, MIPS_R_RA))
1922 goto out_err;
1923
1924 /* Update the icache */
1925 flush_icache_range((unsigned long)ctx.target,
1926 (unsigned long)(ctx.target + ctx.idx * sizeof(u32)));
1927
1928 if (bpf_jit_enable > 1)
1929 /* Dump JIT code */
1930 bpf_jit_dump(prog->len, image_size, 2, ctx.target);
1931
1932 bpf_jit_binary_lock_ro(header);
1933 prog->bpf_func = (void *)ctx.target;
1934 prog->jited = 1;
1935 prog->jited_len = image_size;
1936out_normal:
1937 if (tmp_blinded)
1938 bpf_jit_prog_release_other(prog, prog == orig_prog ?
1939 tmp : orig_prog);
1940 kfree(ctx.offsets);
1941 kfree(ctx.reg_val_types);
1942
1943 return prog;
1944
1945out_err:
1946 prog = orig_prog;
1947 if (header)
1948 bpf_jit_binary_free(header);
1949 goto out_normal;
1950}
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index bd67ac74fe2d..9632436d74d7 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -28,16 +28,15 @@ EXPORT_SYMBOL(PCIBIOS_MIN_MEM);
28 28
29static int __init pcibios_set_cache_line_size(void) 29static int __init pcibios_set_cache_line_size(void)
30{ 30{
31 struct cpuinfo_mips *c = &current_cpu_data;
32 unsigned int lsize; 31 unsigned int lsize;
33 32
34 /* 33 /*
35 * Set PCI cacheline size to that of the highest level in the 34 * Set PCI cacheline size to that of the highest level in the
36 * cache hierarchy. 35 * cache hierarchy.
37 */ 36 */
38 lsize = c->dcache.linesz; 37 lsize = cpu_dcache_line_size();
39 lsize = c->scache.linesz ? : lsize; 38 lsize = cpu_scache_line_size() ? : lsize;
40 lsize = c->tcache.linesz ? : lsize; 39 lsize = cpu_tcache_line_size() ? : lsize;
41 40
42 BUG_ON(!lsize); 41 BUG_ON(!lsize);
43 42
diff --git a/arch/mips/ralink/mt7620.c b/arch/mips/ralink/mt7620.c
index 094a0ee4af46..9be8b08ae46b 100644
--- a/arch/mips/ralink/mt7620.c
+++ b/arch/mips/ralink/mt7620.c
@@ -12,6 +12,7 @@
12 12
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/bug.h>
15 16
16#include <asm/mipsregs.h> 17#include <asm/mipsregs.h>
17#include <asm/mach-ralink/ralink_regs.h> 18#include <asm/mach-ralink/ralink_regs.h>
diff --git a/arch/mips/vdso/gettimeofday.c b/arch/mips/vdso/gettimeofday.c
index 974276e828b2..e2690d7ca4dd 100644
--- a/arch/mips/vdso/gettimeofday.c
+++ b/arch/mips/vdso/gettimeofday.c
@@ -35,7 +35,8 @@ static __always_inline long gettimeofday_fallback(struct timeval *_tv,
35 " syscall\n" 35 " syscall\n"
36 : "=r" (ret), "=r" (error) 36 : "=r" (ret), "=r" (error)
37 : "r" (tv), "r" (tz), "r" (nr) 37 : "r" (tv), "r" (tz), "r" (nr)
38 : "memory"); 38 : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
39 "$14", "$15", "$24", "$25", "hi", "lo", "memory");
39 40
40 return error ? -ret : ret; 41 return error ? -ret : ret;
41} 42}
@@ -55,7 +56,8 @@ static __always_inline long clock_gettime_fallback(clockid_t _clkid,
55 " syscall\n" 56 " syscall\n"
56 : "=r" (ret), "=r" (error) 57 : "=r" (ret), "=r" (error)
57 : "r" (clkid), "r" (ts), "r" (nr) 58 : "r" (clkid), "r" (ts), "r" (nr)
58 : "memory"); 59 : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
60 "$14", "$15", "$24", "$25", "hi", "lo", "memory");
59 61
60 return error ? -ret : ret; 62 return error ? -ret : ret;
61} 63}
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 531da9eb8f43..dda1f558ef35 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -47,6 +47,9 @@ config PARISC
47 and later HP3000 series). The PA-RISC Linux project home page is 47 and later HP3000 series). The PA-RISC Linux project home page is
48 at <http://www.parisc-linux.org/>. 48 at <http://www.parisc-linux.org/>.
49 49
50config CPU_BIG_ENDIAN
51 def_bool y
52
50config MMU 53config MMU
51 def_bool y 54 def_bool y
52 55
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h
index 88fe0aad4390..bc208136bbb2 100644
--- a/arch/parisc/include/asm/thread_info.h
+++ b/arch/parisc/include/asm/thread_info.h
@@ -34,7 +34,7 @@ struct thread_info {
34 34
35/* thread information allocation */ 35/* thread information allocation */
36 36
37#define THREAD_SIZE_ORDER 2 /* PA-RISC requires at least 16k stack */ 37#define THREAD_SIZE_ORDER 3 /* PA-RISC requires at least 32k stack */
38/* Be sure to hunt all references to this down when you change the size of 38/* Be sure to hunt all references to this down when you change the size of
39 * the kernel stack */ 39 * the kernel stack */
40#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) 40#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 85a92db70afc..19c0c141bc3f 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -587,13 +587,12 @@ void flush_cache_range(struct vm_area_struct *vma,
587 if (parisc_requires_coherency()) 587 if (parisc_requires_coherency())
588 flush_tlb_range(vma, start, end); 588 flush_tlb_range(vma, start, end);
589 589
590 if ((end - start) >= parisc_cache_flush_threshold) { 590 if ((end - start) >= parisc_cache_flush_threshold
591 || vma->vm_mm->context != mfsp(3)) {
591 flush_cache_all(); 592 flush_cache_all();
592 return; 593 return;
593 } 594 }
594 595
595 BUG_ON(vma->vm_mm->context != mfsp(3));
596
597 flush_user_dcache_range_asm(start, end); 596 flush_user_dcache_range_asm(start, end);
598 if (vma->vm_flags & VM_EXEC) 597 if (vma->vm_flags & VM_EXEC)
599 flush_user_icache_range_asm(start, end); 598 flush_user_icache_range_asm(start, end);
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 5404e4086cb9..0ca254085a66 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -380,7 +380,7 @@ static inline int eirr_to_irq(unsigned long eirr)
380/* 380/*
381 * IRQ STACK - used for irq handler 381 * IRQ STACK - used for irq handler
382 */ 382 */
383#define IRQ_STACK_SIZE (4096 << 2) /* 16k irq stack size */ 383#define IRQ_STACK_SIZE (4096 << 3) /* 32k irq stack size */
384 384
385union irq_stack_union { 385union irq_stack_union {
386 unsigned long stack[IRQ_STACK_SIZE/sizeof(unsigned long)]; 386 unsigned long stack[IRQ_STACK_SIZE/sizeof(unsigned long)];
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 36f858c37ca7..81b0031f909f 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -199,7 +199,7 @@ config PPC
199 select HAVE_OPTPROBES if PPC64 199 select HAVE_OPTPROBES if PPC64
200 select HAVE_PERF_EVENTS 200 select HAVE_PERF_EVENTS
201 select HAVE_PERF_EVENTS_NMI if PPC64 201 select HAVE_PERF_EVENTS_NMI if PPC64
202 select HAVE_HARDLOCKUP_DETECTOR_PERF if HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH 202 select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
203 select HAVE_PERF_REGS 203 select HAVE_PERF_REGS
204 select HAVE_PERF_USER_STACK_DUMP 204 select HAVE_PERF_USER_STACK_DUMP
205 select HAVE_RCU_TABLE_FREE if SMP 205 select HAVE_RCU_TABLE_FREE if SMP
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index a7814a7b1523..6f952fe1f084 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -25,12 +25,20 @@ compress-$(CONFIG_KERNEL_XZ) := CONFIG_KERNEL_XZ
25BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ 25BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
26 -fno-strict-aliasing -Os -msoft-float -pipe \ 26 -fno-strict-aliasing -Os -msoft-float -pipe \
27 -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ 27 -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
28 -isystem $(shell $(CROSS32CC) -print-file-name=include) \
29 -D$(compress-y) 28 -D$(compress-y)
30 29
30BOOTCC := $(CC)
31ifdef CONFIG_PPC64_BOOT_WRAPPER 31ifdef CONFIG_PPC64_BOOT_WRAPPER
32BOOTCFLAGS += -m64 32BOOTCFLAGS += -m64
33else
34BOOTCFLAGS += -m32
35ifdef CROSS32_COMPILE
36 BOOTCC := $(CROSS32_COMPILE)gcc
37endif
33endif 38endif
39
40BOOTCFLAGS += -isystem $(shell $(BOOTCC) -print-file-name=include)
41
34ifdef CONFIG_CPU_BIG_ENDIAN 42ifdef CONFIG_CPU_BIG_ENDIAN
35BOOTCFLAGS += -mbig-endian 43BOOTCFLAGS += -mbig-endian
36else 44else
@@ -183,10 +191,10 @@ clean-files := $(zlib-) $(zlibheader-) $(zliblinuxheader-) \
183 empty.c zImage.coff.lds zImage.ps3.lds zImage.lds 191 empty.c zImage.coff.lds zImage.ps3.lds zImage.lds
184 192
185quiet_cmd_bootcc = BOOTCC $@ 193quiet_cmd_bootcc = BOOTCC $@
186 cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $< 194 cmd_bootcc = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
187 195
188quiet_cmd_bootas = BOOTAS $@ 196quiet_cmd_bootas = BOOTAS $@
189 cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< 197 cmd_bootas = $(BOOTCC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<
190 198
191quiet_cmd_bootar = BOOTAR $@ 199quiet_cmd_bootar = BOOTAR $@
192 cmd_bootar = $(CROSS32AR) -cr$(KBUILD_ARFLAGS) $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@ 200 cmd_bootar = $(CROSS32AR) -cr$(KBUILD_ARFLAGS) $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@
diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/powernv_defconfig
index 0695ce047d56..34fc9bbfca9e 100644
--- a/arch/powerpc/configs/powernv_defconfig
+++ b/arch/powerpc/configs/powernv_defconfig
@@ -293,7 +293,8 @@ CONFIG_MAGIC_SYSRQ=y
293CONFIG_DEBUG_KERNEL=y 293CONFIG_DEBUG_KERNEL=y
294CONFIG_DEBUG_STACK_USAGE=y 294CONFIG_DEBUG_STACK_USAGE=y
295CONFIG_DEBUG_STACKOVERFLOW=y 295CONFIG_DEBUG_STACKOVERFLOW=y
296CONFIG_LOCKUP_DETECTOR=y 296CONFIG_SOFTLOCKUP_DETECTOR=y
297CONFIG_HARDLOCKUP_DETECTOR=y
297CONFIG_LATENCYTOP=y 298CONFIG_LATENCYTOP=y
298CONFIG_SCHED_TRACER=y 299CONFIG_SCHED_TRACER=y
299CONFIG_BLK_DEV_IO_TRACE=y 300CONFIG_BLK_DEV_IO_TRACE=y
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 5175028c56ce..c5246d29f385 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -324,7 +324,8 @@ CONFIG_MAGIC_SYSRQ=y
324CONFIG_DEBUG_KERNEL=y 324CONFIG_DEBUG_KERNEL=y
325CONFIG_DEBUG_STACK_USAGE=y 325CONFIG_DEBUG_STACK_USAGE=y
326CONFIG_DEBUG_STACKOVERFLOW=y 326CONFIG_DEBUG_STACKOVERFLOW=y
327CONFIG_LOCKUP_DETECTOR=y 327CONFIG_SOFTLOCKUP_DETECTOR=y
328CONFIG_HARDLOCKUP_DETECTOR=y
328CONFIG_DEBUG_MUTEXES=y 329CONFIG_DEBUG_MUTEXES=y
329CONFIG_LATENCYTOP=y 330CONFIG_LATENCYTOP=y
330CONFIG_SCHED_TRACER=y 331CONFIG_SCHED_TRACER=y
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 1a61aa20dfba..fd5d98a0b95c 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -291,7 +291,8 @@ CONFIG_MAGIC_SYSRQ=y
291CONFIG_DEBUG_KERNEL=y 291CONFIG_DEBUG_KERNEL=y
292CONFIG_DEBUG_STACK_USAGE=y 292CONFIG_DEBUG_STACK_USAGE=y
293CONFIG_DEBUG_STACKOVERFLOW=y 293CONFIG_DEBUG_STACKOVERFLOW=y
294CONFIG_LOCKUP_DETECTOR=y 294CONFIG_SOFTLOCKUP_DETECTOR=y
295CONFIG_HARDLOCKUP_DETECTOR=y
295CONFIG_LATENCYTOP=y 296CONFIG_LATENCYTOP=y
296CONFIG_SCHED_TRACER=y 297CONFIG_SCHED_TRACER=y
297CONFIG_BLK_DEV_IO_TRACE=y 298CONFIG_BLK_DEV_IO_TRACE=y
diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h
index d1da415e283c..818a58fc3f4f 100644
--- a/arch/powerpc/include/asm/book3s/64/pgtable.h
+++ b/arch/powerpc/include/asm/book3s/64/pgtable.h
@@ -608,9 +608,17 @@ static inline pte_t pte_mkdevmap(pte_t pte)
608 return __pte(pte_val(pte) | _PAGE_SPECIAL|_PAGE_DEVMAP); 608 return __pte(pte_val(pte) | _PAGE_SPECIAL|_PAGE_DEVMAP);
609} 609}
610 610
611/*
612 * This is potentially called with a pmd as the argument, in which case it's not
613 * safe to check _PAGE_DEVMAP unless we also confirm that _PAGE_PTE is set.
614 * That's because the bit we use for _PAGE_DEVMAP is not reserved for software
615 * use in page directory entries (ie. non-ptes).
616 */
611static inline int pte_devmap(pte_t pte) 617static inline int pte_devmap(pte_t pte)
612{ 618{
613 return !!(pte_raw(pte) & cpu_to_be64(_PAGE_DEVMAP)); 619 u64 mask = cpu_to_be64(_PAGE_DEVMAP | _PAGE_PTE);
620
621 return (pte_raw(pte) & mask) == mask;
614} 622}
615 623
616static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) 624static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
diff --git a/arch/powerpc/include/asm/mmu_context.h b/arch/powerpc/include/asm/mmu_context.h
index 0c76675394c5..35bec1c5bd5a 100644
--- a/arch/powerpc/include/asm/mmu_context.h
+++ b/arch/powerpc/include/asm/mmu_context.h
@@ -90,6 +90,24 @@ static inline void switch_mm_irqs_off(struct mm_struct *prev,
90 /* Mark this context has been used on the new CPU */ 90 /* Mark this context has been used on the new CPU */
91 if (!cpumask_test_cpu(smp_processor_id(), mm_cpumask(next))) { 91 if (!cpumask_test_cpu(smp_processor_id(), mm_cpumask(next))) {
92 cpumask_set_cpu(smp_processor_id(), mm_cpumask(next)); 92 cpumask_set_cpu(smp_processor_id(), mm_cpumask(next));
93
94 /*
95 * This full barrier orders the store to the cpumask above vs
96 * a subsequent operation which allows this CPU to begin loading
97 * translations for next.
98 *
99 * When using the radix MMU that operation is the load of the
100 * MMU context id, which is then moved to SPRN_PID.
101 *
102 * For the hash MMU it is either the first load from slb_cache
103 * in switch_slb(), and/or the store of paca->mm_ctx_id in
104 * copy_mm_to_paca().
105 *
106 * On the read side the barrier is in pte_xchg(), which orders
107 * the store to the PTE vs the load of mm_cpumask.
108 */
109 smp_mb();
110
93 new_on_cpu = true; 111 new_on_cpu = true;
94 } 112 }
95 113
diff --git a/arch/powerpc/include/asm/pgtable-be-types.h b/arch/powerpc/include/asm/pgtable-be-types.h
index 9c0f5db5cf46..67e7e3d990f4 100644
--- a/arch/powerpc/include/asm/pgtable-be-types.h
+++ b/arch/powerpc/include/asm/pgtable-be-types.h
@@ -87,6 +87,7 @@ static inline bool pte_xchg(pte_t *ptep, pte_t old, pte_t new)
87 unsigned long *p = (unsigned long *)ptep; 87 unsigned long *p = (unsigned long *)ptep;
88 __be64 prev; 88 __be64 prev;
89 89
90 /* See comment in switch_mm_irqs_off() */
90 prev = (__force __be64)__cmpxchg_u64(p, (__force unsigned long)pte_raw(old), 91 prev = (__force __be64)__cmpxchg_u64(p, (__force unsigned long)pte_raw(old),
91 (__force unsigned long)pte_raw(new)); 92 (__force unsigned long)pte_raw(new));
92 93
diff --git a/arch/powerpc/include/asm/pgtable-types.h b/arch/powerpc/include/asm/pgtable-types.h
index 8bd3b13fe2fb..369a164b545c 100644
--- a/arch/powerpc/include/asm/pgtable-types.h
+++ b/arch/powerpc/include/asm/pgtable-types.h
@@ -62,6 +62,7 @@ static inline bool pte_xchg(pte_t *ptep, pte_t old, pte_t new)
62{ 62{
63 unsigned long *p = (unsigned long *)ptep; 63 unsigned long *p = (unsigned long *)ptep;
64 64
65 /* See comment in switch_mm_irqs_off() */
65 return pte_val(old) == __cmpxchg_u64(p, pte_val(old), pte_val(new)); 66 return pte_val(old) == __cmpxchg_u64(p, pte_val(old), pte_val(new));
66} 67}
67#endif 68#endif
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 49d8422767b4..e925c1c99c71 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -223,17 +223,27 @@ system_call_exit:
223 andi. r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK) 223 andi. r0,r9,(_TIF_SYSCALL_DOTRACE|_TIF_SINGLESTEP|_TIF_USER_WORK_MASK|_TIF_PERSYSCALL_MASK)
224 bne- .Lsyscall_exit_work 224 bne- .Lsyscall_exit_work
225 225
226 /* If MSR_FP and MSR_VEC are set in user msr, then no need to restore */ 226 andi. r0,r8,MSR_FP
227 li r7,MSR_FP 227 beq 2f
228#ifdef CONFIG_ALTIVEC 228#ifdef CONFIG_ALTIVEC
229 oris r7,r7,MSR_VEC@h 229 andis. r0,r8,MSR_VEC@h
230 bne 3f
230#endif 231#endif
231 and r0,r8,r7 2322: addi r3,r1,STACK_FRAME_OVERHEAD
232 cmpd r0,r7 233#ifdef CONFIG_PPC_BOOK3S
233 bne .Lsyscall_restore_math 234 li r10,MSR_RI
234.Lsyscall_restore_math_cont: 235 mtmsrd r10,1 /* Restore RI */
236#endif
237 bl restore_math
238#ifdef CONFIG_PPC_BOOK3S
239 li r11,0
240 mtmsrd r11,1
241#endif
242 ld r8,_MSR(r1)
243 ld r3,RESULT(r1)
244 li r11,-MAX_ERRNO
235 245
236 cmpld r3,r11 2463: cmpld r3,r11
237 ld r5,_CCR(r1) 247 ld r5,_CCR(r1)
238 bge- .Lsyscall_error 248 bge- .Lsyscall_error
239.Lsyscall_error_cont: 249.Lsyscall_error_cont:
@@ -267,40 +277,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
267 std r5,_CCR(r1) 277 std r5,_CCR(r1)
268 b .Lsyscall_error_cont 278 b .Lsyscall_error_cont
269 279
270.Lsyscall_restore_math:
271 /*
272 * Some initial tests from restore_math to avoid the heavyweight
273 * C code entry and MSR manipulations.
274 */
275 LOAD_REG_IMMEDIATE(r0, MSR_TS_MASK)
276 and. r0,r0,r8
277 bne 1f
278
279 ld r7,PACACURRENT(r13)
280 lbz r0,THREAD+THREAD_LOAD_FP(r7)
281#ifdef CONFIG_ALTIVEC
282 lbz r6,THREAD+THREAD_LOAD_VEC(r7)
283 add r0,r0,r6
284#endif
285 cmpdi r0,0
286 beq .Lsyscall_restore_math_cont
287
2881: addi r3,r1,STACK_FRAME_OVERHEAD
289#ifdef CONFIG_PPC_BOOK3S
290 li r10,MSR_RI
291 mtmsrd r10,1 /* Restore RI */
292#endif
293 bl restore_math
294#ifdef CONFIG_PPC_BOOK3S
295 li r11,0
296 mtmsrd r11,1
297#endif
298 /* Restore volatiles, reload MSR from updated one */
299 ld r8,_MSR(r1)
300 ld r3,RESULT(r1)
301 li r11,-MAX_ERRNO
302 b .Lsyscall_restore_math_cont
303
304/* Traced system call support */ 280/* Traced system call support */
305.Lsyscall_dotrace: 281.Lsyscall_dotrace:
306 bl save_nvgprs 282 bl save_nvgprs
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 9029afd1fa2a..f14f3c04ec7e 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -1325,10 +1325,18 @@ EXC_VIRT_NONE(0x5800, 0x100)
1325 std r10,PACA_EXGEN+EX_R13(r13); \ 1325 std r10,PACA_EXGEN+EX_R13(r13); \
1326 EXCEPTION_PROLOG_PSERIES_1(soft_nmi_common, _H) 1326 EXCEPTION_PROLOG_PSERIES_1(soft_nmi_common, _H)
1327 1327
1328/*
1329 * Branch to soft_nmi_interrupt using the emergency stack. The emergency
1330 * stack is one that is usable by maskable interrupts so long as MSR_EE
1331 * remains off. It is used for recovery when something has corrupted the
1332 * normal kernel stack, for example. The "soft NMI" must not use the process
1333 * stack because we want irq disabled sections to avoid touching the stack
1334 * at all (other than PMU interrupts), so use the emergency stack for this,
1335 * and run it entirely with interrupts hard disabled.
1336 */
1328EXC_COMMON_BEGIN(soft_nmi_common) 1337EXC_COMMON_BEGIN(soft_nmi_common)
1329 mr r10,r1 1338 mr r10,r1
1330 ld r1,PACAEMERGSP(r13) 1339 ld r1,PACAEMERGSP(r13)
1331 ld r1,PACA_NMI_EMERG_SP(r13)
1332 subi r1,r1,INT_FRAME_SIZE 1340 subi r1,r1,INT_FRAME_SIZE
1333 EXCEPTION_COMMON_NORET_STACK(PACA_EXGEN, 0x900, 1341 EXCEPTION_COMMON_NORET_STACK(PACA_EXGEN, 0x900,
1334 system_reset, soft_nmi_interrupt, 1342 system_reset, soft_nmi_interrupt,
diff --git a/arch/powerpc/kernel/idle_book3s.S b/arch/powerpc/kernel/idle_book3s.S
index 516ebef905c0..e6252c5a57a4 100644
--- a/arch/powerpc/kernel/idle_book3s.S
+++ b/arch/powerpc/kernel/idle_book3s.S
@@ -460,11 +460,17 @@ pnv_restore_hyp_resource_arch300:
460 /* 460 /*
461 * Workaround for POWER9, if we lost resources, the ERAT 461 * Workaround for POWER9, if we lost resources, the ERAT
462 * might have been mixed up and needs flushing. We also need 462 * might have been mixed up and needs flushing. We also need
463 * to reload MMCR0 (see comment above). 463 * to reload MMCR0 (see comment above). We also need to set
464 * then clear bit 60 in MMCRA to ensure the PMU starts running.
464 */ 465 */
465 blt cr3,1f 466 blt cr3,1f
466 PPC_INVALIDATE_ERAT 467 PPC_INVALIDATE_ERAT
467 ld r1,PACAR1(r13) 468 ld r1,PACAR1(r13)
469 mfspr r4,SPRN_MMCRA
470 ori r4,r4,(1 << (63-60))
471 mtspr SPRN_MMCRA,r4
472 xori r4,r4,(1 << (63-60))
473 mtspr SPRN_MMCRA,r4
468 ld r4,_MMCR0(r1) 474 ld r4,_MMCR0(r1)
469 mtspr SPRN_MMCR0,r4 475 mtspr SPRN_MMCR0,r4
4701: 4761:
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 0bcec745a672..f291f7826abc 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -145,6 +145,19 @@ notrace unsigned int __check_irq_replay(void)
145 145
146 /* Clear bit 0 which we wouldn't clear otherwise */ 146 /* Clear bit 0 which we wouldn't clear otherwise */
147 local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS; 147 local_paca->irq_happened &= ~PACA_IRQ_HARD_DIS;
148 if (happened & PACA_IRQ_HARD_DIS) {
149 /*
150 * We may have missed a decrementer interrupt if hard disabled.
151 * Check the decrementer register in case we had a rollover
152 * while hard disabled.
153 */
154 if (!(happened & PACA_IRQ_DEC)) {
155 if (decrementer_check_overflow()) {
156 local_paca->irq_happened |= PACA_IRQ_DEC;
157 happened |= PACA_IRQ_DEC;
158 }
159 }
160 }
148 161
149 /* 162 /*
150 * Force the delivery of pending soft-disabled interrupts on PS3. 163 * Force the delivery of pending soft-disabled interrupts on PS3.
@@ -170,7 +183,7 @@ notrace unsigned int __check_irq_replay(void)
170 * in case we also had a rollover while hard disabled 183 * in case we also had a rollover while hard disabled
171 */ 184 */
172 local_paca->irq_happened &= ~PACA_IRQ_DEC; 185 local_paca->irq_happened &= ~PACA_IRQ_DEC;
173 if ((happened & PACA_IRQ_DEC) || decrementer_check_overflow()) 186 if (happened & PACA_IRQ_DEC)
174 return 0x900; 187 return 0x900;
175 188
176 /* Finally check if an external interrupt happened */ 189 /* Finally check if an external interrupt happened */
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 9f3e2c932dcc..1f0fd361e09b 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -362,7 +362,8 @@ void enable_kernel_vsx(void)
362 362
363 cpumsr = msr_check_and_set(MSR_FP|MSR_VEC|MSR_VSX); 363 cpumsr = msr_check_and_set(MSR_FP|MSR_VEC|MSR_VSX);
364 364
365 if (current->thread.regs && (current->thread.regs->msr & MSR_VSX)) { 365 if (current->thread.regs &&
366 (current->thread.regs->msr & (MSR_VSX|MSR_VEC|MSR_FP))) {
366 check_if_tm_restore_required(current); 367 check_if_tm_restore_required(current);
367 /* 368 /*
368 * If a thread has already been reclaimed then the 369 * If a thread has already been reclaimed then the
@@ -386,7 +387,7 @@ void flush_vsx_to_thread(struct task_struct *tsk)
386{ 387{
387 if (tsk->thread.regs) { 388 if (tsk->thread.regs) {
388 preempt_disable(); 389 preempt_disable();
389 if (tsk->thread.regs->msr & MSR_VSX) { 390 if (tsk->thread.regs->msr & (MSR_VSX|MSR_VEC|MSR_FP)) {
390 BUG_ON(tsk != current); 391 BUG_ON(tsk != current);
391 giveup_vsx(tsk); 392 giveup_vsx(tsk);
392 } 393 }
@@ -511,10 +512,6 @@ void restore_math(struct pt_regs *regs)
511{ 512{
512 unsigned long msr; 513 unsigned long msr;
513 514
514 /*
515 * Syscall exit makes a similar initial check before branching
516 * to restore_math. Keep them in synch.
517 */
518 if (!msr_tm_active(regs->msr) && 515 if (!msr_tm_active(regs->msr) &&
519 !current->thread.load_fp && !loadvec(current->thread)) 516 !current->thread.load_fp && !loadvec(current->thread))
520 return; 517 return;
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 925a4ef90559..660ed39e9c9a 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -127,12 +127,19 @@ static void flush_tmregs_to_thread(struct task_struct *tsk)
127 * If task is not current, it will have been flushed already to 127 * If task is not current, it will have been flushed already to
128 * it's thread_struct during __switch_to(). 128 * it's thread_struct during __switch_to().
129 * 129 *
130 * A reclaim flushes ALL the state. 130 * A reclaim flushes ALL the state or if not in TM save TM SPRs
131 * in the appropriate thread structures from live.
131 */ 132 */
132 133
133 if (tsk == current && MSR_TM_SUSPENDED(mfmsr())) 134 if (tsk != current)
134 tm_reclaim_current(TM_CAUSE_SIGNAL); 135 return;
135 136
137 if (MSR_TM_SUSPENDED(mfmsr())) {
138 tm_reclaim_current(TM_CAUSE_SIGNAL);
139 } else {
140 tm_enable();
141 tm_save_sprs(&(tsk->thread));
142 }
136} 143}
137#else 144#else
138static inline void flush_tmregs_to_thread(struct task_struct *tsk) { } 145static inline void flush_tmregs_to_thread(struct task_struct *tsk) { }
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 997c88d54acf..8d3320562c70 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -351,7 +351,7 @@ static void nmi_ipi_lock_start(unsigned long *flags)
351 hard_irq_disable(); 351 hard_irq_disable();
352 while (atomic_cmpxchg(&__nmi_ipi_lock, 0, 1) == 1) { 352 while (atomic_cmpxchg(&__nmi_ipi_lock, 0, 1) == 1) {
353 raw_local_irq_restore(*flags); 353 raw_local_irq_restore(*flags);
354 cpu_relax(); 354 spin_until_cond(atomic_read(&__nmi_ipi_lock) == 0);
355 raw_local_irq_save(*flags); 355 raw_local_irq_save(*flags);
356 hard_irq_disable(); 356 hard_irq_disable();
357 } 357 }
@@ -360,7 +360,7 @@ static void nmi_ipi_lock_start(unsigned long *flags)
360static void nmi_ipi_lock(void) 360static void nmi_ipi_lock(void)
361{ 361{
362 while (atomic_cmpxchg(&__nmi_ipi_lock, 0, 1) == 1) 362 while (atomic_cmpxchg(&__nmi_ipi_lock, 0, 1) == 1)
363 cpu_relax(); 363 spin_until_cond(atomic_read(&__nmi_ipi_lock) == 0);
364} 364}
365 365
366static void nmi_ipi_unlock(void) 366static void nmi_ipi_unlock(void)
@@ -475,7 +475,7 @@ int smp_send_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us)
475 nmi_ipi_lock_start(&flags); 475 nmi_ipi_lock_start(&flags);
476 while (nmi_ipi_busy_count) { 476 while (nmi_ipi_busy_count) {
477 nmi_ipi_unlock_end(&flags); 477 nmi_ipi_unlock_end(&flags);
478 cpu_relax(); 478 spin_until_cond(nmi_ipi_busy_count == 0);
479 nmi_ipi_lock_start(&flags); 479 nmi_ipi_lock_start(&flags);
480 } 480 }
481 481
@@ -1003,21 +1003,13 @@ static struct sched_domain_topology_level powerpc_topology[] = {
1003 { NULL, }, 1003 { NULL, },
1004}; 1004};
1005 1005
1006static __init long smp_setup_cpu_workfn(void *data __always_unused)
1007{
1008 smp_ops->setup_cpu(boot_cpuid);
1009 return 0;
1010}
1011
1012void __init smp_cpus_done(unsigned int max_cpus) 1006void __init smp_cpus_done(unsigned int max_cpus)
1013{ 1007{
1014 /* 1008 /*
1015 * We want the setup_cpu() here to be called on the boot CPU, but 1009 * We are running pinned to the boot CPU, see rest_init().
1016 * init might run on any CPU, so make sure it's invoked on the boot
1017 * CPU.
1018 */ 1010 */
1019 if (smp_ops && smp_ops->setup_cpu) 1011 if (smp_ops && smp_ops->setup_cpu)
1020 work_on_cpu_safe(boot_cpuid, smp_setup_cpu_workfn, NULL); 1012 smp_ops->setup_cpu(boot_cpuid);
1021 1013
1022 if (smp_ops && smp_ops->bringup_done) 1014 if (smp_ops && smp_ops->bringup_done)
1023 smp_ops->bringup_done(); 1015 smp_ops->bringup_done();
diff --git a/arch/powerpc/kernel/watchdog.c b/arch/powerpc/kernel/watchdog.c
index b67f8b03a32d..34721a257a77 100644
--- a/arch/powerpc/kernel/watchdog.c
+++ b/arch/powerpc/kernel/watchdog.c
@@ -71,15 +71,20 @@ static inline void wd_smp_lock(unsigned long *flags)
71 * This may be called from low level interrupt handlers at some 71 * This may be called from low level interrupt handlers at some
72 * point in future. 72 * point in future.
73 */ 73 */
74 local_irq_save(*flags); 74 raw_local_irq_save(*flags);
75 while (unlikely(test_and_set_bit_lock(0, &__wd_smp_lock))) 75 hard_irq_disable(); /* Make it soft-NMI safe */
76 cpu_relax(); 76 while (unlikely(test_and_set_bit_lock(0, &__wd_smp_lock))) {
77 raw_local_irq_restore(*flags);
78 spin_until_cond(!test_bit(0, &__wd_smp_lock));
79 raw_local_irq_save(*flags);
80 hard_irq_disable();
81 }
77} 82}
78 83
79static inline void wd_smp_unlock(unsigned long *flags) 84static inline void wd_smp_unlock(unsigned long *flags)
80{ 85{
81 clear_bit_unlock(0, &__wd_smp_lock); 86 clear_bit_unlock(0, &__wd_smp_lock);
82 local_irq_restore(*flags); 87 raw_local_irq_restore(*flags);
83} 88}
84 89
85static void wd_lockup_ipi(struct pt_regs *regs) 90static void wd_lockup_ipi(struct pt_regs *regs)
@@ -96,10 +101,10 @@ static void wd_lockup_ipi(struct pt_regs *regs)
96 nmi_panic(regs, "Hard LOCKUP"); 101 nmi_panic(regs, "Hard LOCKUP");
97} 102}
98 103
99static void set_cpu_stuck(int cpu, u64 tb) 104static void set_cpumask_stuck(const struct cpumask *cpumask, u64 tb)
100{ 105{
101 cpumask_set_cpu(cpu, &wd_smp_cpus_stuck); 106 cpumask_or(&wd_smp_cpus_stuck, &wd_smp_cpus_stuck, cpumask);
102 cpumask_clear_cpu(cpu, &wd_smp_cpus_pending); 107 cpumask_andnot(&wd_smp_cpus_pending, &wd_smp_cpus_pending, cpumask);
103 if (cpumask_empty(&wd_smp_cpus_pending)) { 108 if (cpumask_empty(&wd_smp_cpus_pending)) {
104 wd_smp_last_reset_tb = tb; 109 wd_smp_last_reset_tb = tb;
105 cpumask_andnot(&wd_smp_cpus_pending, 110 cpumask_andnot(&wd_smp_cpus_pending,
@@ -107,6 +112,10 @@ static void set_cpu_stuck(int cpu, u64 tb)
107 &wd_smp_cpus_stuck); 112 &wd_smp_cpus_stuck);
108 } 113 }
109} 114}
115static void set_cpu_stuck(int cpu, u64 tb)
116{
117 set_cpumask_stuck(cpumask_of(cpu), tb);
118}
110 119
111static void watchdog_smp_panic(int cpu, u64 tb) 120static void watchdog_smp_panic(int cpu, u64 tb)
112{ 121{
@@ -135,11 +144,9 @@ static void watchdog_smp_panic(int cpu, u64 tb)
135 } 144 }
136 smp_flush_nmi_ipi(1000000); 145 smp_flush_nmi_ipi(1000000);
137 146
138 /* Take the stuck CPU out of the watch group */ 147 /* Take the stuck CPUs out of the watch group */
139 for_each_cpu(c, &wd_smp_cpus_pending) 148 set_cpumask_stuck(&wd_smp_cpus_pending, tb);
140 set_cpu_stuck(c, tb);
141 149
142out:
143 wd_smp_unlock(&flags); 150 wd_smp_unlock(&flags);
144 151
145 printk_safe_flush(); 152 printk_safe_flush();
@@ -152,6 +159,11 @@ out:
152 159
153 if (hardlockup_panic) 160 if (hardlockup_panic)
154 nmi_panic(NULL, "Hard LOCKUP"); 161 nmi_panic(NULL, "Hard LOCKUP");
162
163 return;
164
165out:
166 wd_smp_unlock(&flags);
155} 167}
156 168
157static void wd_smp_clear_cpu_pending(int cpu, u64 tb) 169static void wd_smp_clear_cpu_pending(int cpu, u64 tb)
@@ -258,9 +270,11 @@ static void wd_timer_fn(unsigned long data)
258 270
259void arch_touch_nmi_watchdog(void) 271void arch_touch_nmi_watchdog(void)
260{ 272{
273 unsigned long ticks = tb_ticks_per_usec * wd_timer_period_ms * 1000;
261 int cpu = smp_processor_id(); 274 int cpu = smp_processor_id();
262 275
263 watchdog_timer_interrupt(cpu); 276 if (get_tb() - per_cpu(wd_timer_tb, cpu) >= ticks)
277 watchdog_timer_interrupt(cpu);
264} 278}
265EXPORT_SYMBOL(arch_touch_nmi_watchdog); 279EXPORT_SYMBOL(arch_touch_nmi_watchdog);
266 280
@@ -283,6 +297,8 @@ static void stop_watchdog_timer_on(unsigned int cpu)
283 297
284static int start_wd_on_cpu(unsigned int cpu) 298static int start_wd_on_cpu(unsigned int cpu)
285{ 299{
300 unsigned long flags;
301
286 if (cpumask_test_cpu(cpu, &wd_cpus_enabled)) { 302 if (cpumask_test_cpu(cpu, &wd_cpus_enabled)) {
287 WARN_ON(1); 303 WARN_ON(1);
288 return 0; 304 return 0;
@@ -297,12 +313,14 @@ static int start_wd_on_cpu(unsigned int cpu)
297 if (!cpumask_test_cpu(cpu, &watchdog_cpumask)) 313 if (!cpumask_test_cpu(cpu, &watchdog_cpumask))
298 return 0; 314 return 0;
299 315
316 wd_smp_lock(&flags);
300 cpumask_set_cpu(cpu, &wd_cpus_enabled); 317 cpumask_set_cpu(cpu, &wd_cpus_enabled);
301 if (cpumask_weight(&wd_cpus_enabled) == 1) { 318 if (cpumask_weight(&wd_cpus_enabled) == 1) {
302 cpumask_set_cpu(cpu, &wd_smp_cpus_pending); 319 cpumask_set_cpu(cpu, &wd_smp_cpus_pending);
303 wd_smp_last_reset_tb = get_tb(); 320 wd_smp_last_reset_tb = get_tb();
304 } 321 }
305 smp_wmb(); 322 wd_smp_unlock(&flags);
323
306 start_watchdog_timer_on(cpu); 324 start_watchdog_timer_on(cpu);
307 325
308 return 0; 326 return 0;
@@ -310,12 +328,17 @@ static int start_wd_on_cpu(unsigned int cpu)
310 328
311static int stop_wd_on_cpu(unsigned int cpu) 329static int stop_wd_on_cpu(unsigned int cpu)
312{ 330{
331 unsigned long flags;
332
313 if (!cpumask_test_cpu(cpu, &wd_cpus_enabled)) 333 if (!cpumask_test_cpu(cpu, &wd_cpus_enabled))
314 return 0; /* Can happen in CPU unplug case */ 334 return 0; /* Can happen in CPU unplug case */
315 335
316 stop_watchdog_timer_on(cpu); 336 stop_watchdog_timer_on(cpu);
317 337
338 wd_smp_lock(&flags);
318 cpumask_clear_cpu(cpu, &wd_cpus_enabled); 339 cpumask_clear_cpu(cpu, &wd_cpus_enabled);
340 wd_smp_unlock(&flags);
341
319 wd_smp_clear_cpu_pending(cpu, get_tb()); 342 wd_smp_clear_cpu_pending(cpu, get_tb());
320 343
321 return 0; 344 return 0;
diff --git a/arch/powerpc/kvm/book3s_64_vio.c b/arch/powerpc/kvm/book3s_64_vio.c
index a160c14304eb..53766e2bc029 100644
--- a/arch/powerpc/kvm/book3s_64_vio.c
+++ b/arch/powerpc/kvm/book3s_64_vio.c
@@ -294,32 +294,26 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
294 struct kvm_create_spapr_tce_64 *args) 294 struct kvm_create_spapr_tce_64 *args)
295{ 295{
296 struct kvmppc_spapr_tce_table *stt = NULL; 296 struct kvmppc_spapr_tce_table *stt = NULL;
297 struct kvmppc_spapr_tce_table *siter;
297 unsigned long npages, size; 298 unsigned long npages, size;
298 int ret = -ENOMEM; 299 int ret = -ENOMEM;
299 int i; 300 int i;
301 int fd = -1;
300 302
301 if (!args->size) 303 if (!args->size)
302 return -EINVAL; 304 return -EINVAL;
303 305
304 /* Check this LIOBN hasn't been previously allocated */
305 list_for_each_entry(stt, &kvm->arch.spapr_tce_tables, list) {
306 if (stt->liobn == args->liobn)
307 return -EBUSY;
308 }
309
310 size = _ALIGN_UP(args->size, PAGE_SIZE >> 3); 306 size = _ALIGN_UP(args->size, PAGE_SIZE >> 3);
311 npages = kvmppc_tce_pages(size); 307 npages = kvmppc_tce_pages(size);
312 ret = kvmppc_account_memlimit(kvmppc_stt_pages(npages), true); 308 ret = kvmppc_account_memlimit(kvmppc_stt_pages(npages), true);
313 if (ret) { 309 if (ret)
314 stt = NULL; 310 return ret;
315 goto fail;
316 }
317 311
318 ret = -ENOMEM; 312 ret = -ENOMEM;
319 stt = kzalloc(sizeof(*stt) + npages * sizeof(struct page *), 313 stt = kzalloc(sizeof(*stt) + npages * sizeof(struct page *),
320 GFP_KERNEL); 314 GFP_KERNEL);
321 if (!stt) 315 if (!stt)
322 goto fail; 316 goto fail_acct;
323 317
324 stt->liobn = args->liobn; 318 stt->liobn = args->liobn;
325 stt->page_shift = args->page_shift; 319 stt->page_shift = args->page_shift;
@@ -334,24 +328,42 @@ long kvm_vm_ioctl_create_spapr_tce(struct kvm *kvm,
334 goto fail; 328 goto fail;
335 } 329 }
336 330
337 kvm_get_kvm(kvm); 331 ret = fd = anon_inode_getfd("kvm-spapr-tce", &kvm_spapr_tce_fops,
332 stt, O_RDWR | O_CLOEXEC);
333 if (ret < 0)
334 goto fail;
338 335
339 mutex_lock(&kvm->lock); 336 mutex_lock(&kvm->lock);
340 list_add_rcu(&stt->list, &kvm->arch.spapr_tce_tables); 337
338 /* Check this LIOBN hasn't been previously allocated */
339 ret = 0;
340 list_for_each_entry(siter, &kvm->arch.spapr_tce_tables, list) {
341 if (siter->liobn == args->liobn) {
342 ret = -EBUSY;
343 break;
344 }
345 }
346
347 if (!ret) {
348 list_add_rcu(&stt->list, &kvm->arch.spapr_tce_tables);
349 kvm_get_kvm(kvm);
350 }
341 351
342 mutex_unlock(&kvm->lock); 352 mutex_unlock(&kvm->lock);
343 353
344 return anon_inode_getfd("kvm-spapr-tce", &kvm_spapr_tce_fops, 354 if (!ret)
345 stt, O_RDWR | O_CLOEXEC); 355 return fd;
346 356
347fail: 357 put_unused_fd(fd);
348 if (stt) {
349 for (i = 0; i < npages; i++)
350 if (stt->pages[i])
351 __free_page(stt->pages[i]);
352 358
353 kfree(stt); 359 fail:
354 } 360 for (i = 0; i < npages; i++)
361 if (stt->pages[i])
362 __free_page(stt->pages[i]);
363
364 kfree(stt);
365 fail_acct:
366 kvmppc_account_memlimit(kvmppc_stt_pages(npages), false);
355 return ret; 367 return ret;
356} 368}
357 369
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index c52184a8efdf..9c9c983b864f 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -1291,6 +1291,9 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
1291 /* Hypervisor doorbell - exit only if host IPI flag set */ 1291 /* Hypervisor doorbell - exit only if host IPI flag set */
1292 cmpwi r12, BOOK3S_INTERRUPT_H_DOORBELL 1292 cmpwi r12, BOOK3S_INTERRUPT_H_DOORBELL
1293 bne 3f 1293 bne 3f
1294BEGIN_FTR_SECTION
1295 PPC_MSGSYNC
1296END_FTR_SECTION_IFSET(CPU_FTR_ARCH_300)
1294 lbz r0, HSTATE_HOST_IPI(r13) 1297 lbz r0, HSTATE_HOST_IPI(r13)
1295 cmpwi r0, 0 1298 cmpwi r0, 0
1296 beq 4f 1299 beq 4f
diff --git a/arch/powerpc/kvm/book3s_xive_template.c b/arch/powerpc/kvm/book3s_xive_template.c
index 4636ca6e7d38..d1ed2c41b5d2 100644
--- a/arch/powerpc/kvm/book3s_xive_template.c
+++ b/arch/powerpc/kvm/book3s_xive_template.c
@@ -16,7 +16,22 @@ static void GLUE(X_PFX,ack_pending)(struct kvmppc_xive_vcpu *xc)
16 u8 cppr; 16 u8 cppr;
17 u16 ack; 17 u16 ack;
18 18
19 /* XXX DD1 bug workaround: Check PIPR vs. CPPR first ! */ 19 /*
20 * Ensure any previous store to CPPR is ordered vs.
21 * the subsequent loads from PIPR or ACK.
22 */
23 eieio();
24
25 /*
26 * DD1 bug workaround: If PIPR is less favored than CPPR
27 * ignore the interrupt or we might incorrectly lose an IPB
28 * bit.
29 */
30 if (cpu_has_feature(CPU_FTR_POWER9_DD1)) {
31 u8 pipr = __x_readb(__x_tima + TM_QW1_OS + TM_PIPR);
32 if (pipr >= xc->hw_cppr)
33 return;
34 }
20 35
21 /* Perform the acknowledge OS to register cycle. */ 36 /* Perform the acknowledge OS to register cycle. */
22 ack = be16_to_cpu(__x_readw(__x_tima + TM_SPC_ACK_OS_REG)); 37 ack = be16_to_cpu(__x_readw(__x_tima + TM_SPC_ACK_OS_REG));
@@ -235,6 +250,11 @@ skip_ipi:
235 /* 250 /*
236 * If we found an interrupt, adjust what the guest CPPR should 251 * If we found an interrupt, adjust what the guest CPPR should
237 * be as if we had just fetched that interrupt from HW. 252 * be as if we had just fetched that interrupt from HW.
253 *
254 * Note: This can only make xc->cppr smaller as the previous
255 * loop will only exit with hirq != 0 if prio is lower than
256 * the current xc->cppr. Thus we don't need to re-check xc->mfrr
257 * for pending IPIs.
238 */ 258 */
239 if (hirq) 259 if (hirq)
240 xc->cppr = prio; 260 xc->cppr = prio;
@@ -381,6 +401,12 @@ X_STATIC int GLUE(X_PFX,h_cppr)(struct kvm_vcpu *vcpu, unsigned long cppr)
381 xc->cppr = cppr; 401 xc->cppr = cppr;
382 402
383 /* 403 /*
404 * Order the above update of xc->cppr with the subsequent
405 * read of xc->mfrr inside push_pending_to_hw()
406 */
407 smp_mb();
408
409 /*
384 * We are masking less, we need to look for pending things 410 * We are masking less, we need to look for pending things
385 * to deliver and set VP pending bits accordingly to trigger 411 * to deliver and set VP pending bits accordingly to trigger
386 * a new interrupt otherwise we might miss MFRR changes for 412 * a new interrupt otherwise we might miss MFRR changes for
@@ -420,21 +446,37 @@ X_STATIC int GLUE(X_PFX,h_eoi)(struct kvm_vcpu *vcpu, unsigned long xirr)
420 * used to signal MFRR changes is EOId when fetched from 446 * used to signal MFRR changes is EOId when fetched from
421 * the queue. 447 * the queue.
422 */ 448 */
423 if (irq == XICS_IPI || irq == 0) 449 if (irq == XICS_IPI || irq == 0) {
450 /*
451 * This barrier orders the setting of xc->cppr vs.
452 * subsquent test of xc->mfrr done inside
453 * scan_interrupts and push_pending_to_hw
454 */
455 smp_mb();
424 goto bail; 456 goto bail;
457 }
425 458
426 /* Find interrupt source */ 459 /* Find interrupt source */
427 sb = kvmppc_xive_find_source(xive, irq, &src); 460 sb = kvmppc_xive_find_source(xive, irq, &src);
428 if (!sb) { 461 if (!sb) {
429 pr_devel(" source not found !\n"); 462 pr_devel(" source not found !\n");
430 rc = H_PARAMETER; 463 rc = H_PARAMETER;
464 /* Same as above */
465 smp_mb();
431 goto bail; 466 goto bail;
432 } 467 }
433 state = &sb->irq_state[src]; 468 state = &sb->irq_state[src];
434 kvmppc_xive_select_irq(state, &hw_num, &xd); 469 kvmppc_xive_select_irq(state, &hw_num, &xd);
435 470
436 state->in_eoi = true; 471 state->in_eoi = true;
437 mb(); 472
473 /*
474 * This barrier orders both setting of in_eoi above vs,
475 * subsequent test of guest_priority, and the setting
476 * of xc->cppr vs. subsquent test of xc->mfrr done inside
477 * scan_interrupts and push_pending_to_hw
478 */
479 smp_mb();
438 480
439again: 481again:
440 if (state->guest_priority == MASKED) { 482 if (state->guest_priority == MASKED) {
@@ -461,6 +503,14 @@ again:
461 503
462 } 504 }
463 505
506 /*
507 * This barrier orders the above guest_priority check
508 * and spin_lock/unlock with clearing in_eoi below.
509 *
510 * It also has to be a full mb() as it must ensure
511 * the MMIOs done in source_eoi() are completed before
512 * state->in_eoi is visible.
513 */
464 mb(); 514 mb();
465 state->in_eoi = false; 515 state->in_eoi = false;
466bail: 516bail:
@@ -495,6 +545,18 @@ X_STATIC int GLUE(X_PFX,h_ipi)(struct kvm_vcpu *vcpu, unsigned long server,
495 /* Locklessly write over MFRR */ 545 /* Locklessly write over MFRR */
496 xc->mfrr = mfrr; 546 xc->mfrr = mfrr;
497 547
548 /*
549 * The load of xc->cppr below and the subsequent MMIO store
550 * to the IPI must happen after the above mfrr update is
551 * globally visible so that:
552 *
553 * - Synchronize with another CPU doing an H_EOI or a H_CPPR
554 * updating xc->cppr then reading xc->mfrr.
555 *
556 * - The target of the IPI sees the xc->mfrr update
557 */
558 mb();
559
498 /* Shoot the IPI if most favored than target cppr */ 560 /* Shoot the IPI if most favored than target cppr */
499 if (mfrr < xc->cppr) 561 if (mfrr < xc->cppr)
500 __x_writeq(0, __x_trig_page(&xc->vp_ipi_data)); 562 __x_writeq(0, __x_trig_page(&xc->vp_ipi_data));
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
index d7c9b186954d..763ffca9628d 100644
--- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c
+++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c
@@ -89,7 +89,7 @@ static int __init of_fsl_spi_probe(char *type, char *compatible, u32 sysclk,
89 goto err; 89 goto err;
90 90
91 ret = of_irq_to_resource(np, 0, &res[1]); 91 ret = of_irq_to_resource(np, 0, &res[1]);
92 if (!ret) 92 if (ret <= 0)
93 goto err; 93 goto err;
94 94
95 pdev = platform_device_alloc("mpc83xx_spi", i); 95 pdev = platform_device_alloc("mpc83xx_spi", i);
diff --git a/arch/powerpc/platforms/powernv/idle.c b/arch/powerpc/platforms/powernv/idle.c
index 2abee070373f..a553aeea7af6 100644
--- a/arch/powerpc/platforms/powernv/idle.c
+++ b/arch/powerpc/platforms/powernv/idle.c
@@ -56,6 +56,7 @@ u64 pnv_first_deep_stop_state = MAX_STOP_STATE;
56 */ 56 */
57static u64 pnv_deepest_stop_psscr_val; 57static u64 pnv_deepest_stop_psscr_val;
58static u64 pnv_deepest_stop_psscr_mask; 58static u64 pnv_deepest_stop_psscr_mask;
59static u64 pnv_deepest_stop_flag;
59static bool deepest_stop_found; 60static bool deepest_stop_found;
60 61
61static int pnv_save_sprs_for_deep_states(void) 62static int pnv_save_sprs_for_deep_states(void)
@@ -185,8 +186,40 @@ static void pnv_alloc_idle_core_states(void)
185 186
186 update_subcore_sibling_mask(); 187 update_subcore_sibling_mask();
187 188
188 if (supported_cpuidle_states & OPAL_PM_LOSE_FULL_CONTEXT) 189 if (supported_cpuidle_states & OPAL_PM_LOSE_FULL_CONTEXT) {
189 pnv_save_sprs_for_deep_states(); 190 int rc = pnv_save_sprs_for_deep_states();
191
192 if (likely(!rc))
193 return;
194
195 /*
196 * The stop-api is unable to restore hypervisor
197 * resources on wakeup from platform idle states which
198 * lose full context. So disable such states.
199 */
200 supported_cpuidle_states &= ~OPAL_PM_LOSE_FULL_CONTEXT;
201 pr_warn("cpuidle-powernv: Disabling idle states that lose full context\n");
202 pr_warn("cpuidle-powernv: Idle power-savings, CPU-Hotplug affected\n");
203
204 if (cpu_has_feature(CPU_FTR_ARCH_300) &&
205 (pnv_deepest_stop_flag & OPAL_PM_LOSE_FULL_CONTEXT)) {
206 /*
207 * Use the default stop state for CPU-Hotplug
208 * if available.
209 */
210 if (default_stop_found) {
211 pnv_deepest_stop_psscr_val =
212 pnv_default_stop_val;
213 pnv_deepest_stop_psscr_mask =
214 pnv_default_stop_mask;
215 pr_warn("cpuidle-powernv: Offlined CPUs will stop with psscr = 0x%016llx\n",
216 pnv_deepest_stop_psscr_val);
217 } else { /* Fallback to snooze loop for CPU-Hotplug */
218 deepest_stop_found = false;
219 pr_warn("cpuidle-powernv: Offlined CPUs will busy wait\n");
220 }
221 }
222 }
190} 223}
191 224
192u32 pnv_get_supported_cpuidle_states(void) 225u32 pnv_get_supported_cpuidle_states(void)
@@ -375,7 +408,8 @@ unsigned long pnv_cpu_offline(unsigned int cpu)
375 pnv_deepest_stop_psscr_val; 408 pnv_deepest_stop_psscr_val;
376 srr1 = power9_idle_stop(psscr); 409 srr1 = power9_idle_stop(psscr);
377 410
378 } else if (idle_states & OPAL_PM_WINKLE_ENABLED) { 411 } else if ((idle_states & OPAL_PM_WINKLE_ENABLED) &&
412 (idle_states & OPAL_PM_LOSE_FULL_CONTEXT)) {
379 srr1 = power7_idle_insn(PNV_THREAD_WINKLE); 413 srr1 = power7_idle_insn(PNV_THREAD_WINKLE);
380 } else if ((idle_states & OPAL_PM_SLEEP_ENABLED) || 414 } else if ((idle_states & OPAL_PM_SLEEP_ENABLED) ||
381 (idle_states & OPAL_PM_SLEEP_ENABLED_ER1)) { 415 (idle_states & OPAL_PM_SLEEP_ENABLED_ER1)) {
@@ -553,6 +587,7 @@ static int __init pnv_power9_idle_init(struct device_node *np, u32 *flags,
553 max_residency_ns = residency_ns[i]; 587 max_residency_ns = residency_ns[i];
554 pnv_deepest_stop_psscr_val = psscr_val[i]; 588 pnv_deepest_stop_psscr_val = psscr_val[i];
555 pnv_deepest_stop_psscr_mask = psscr_mask[i]; 589 pnv_deepest_stop_psscr_mask = psscr_mask[i];
590 pnv_deepest_stop_flag = flags[i];
556 deepest_stop_found = true; 591 deepest_stop_found = true;
557 } 592 }
558 593
diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
index 437613588df1..b900eb1d5e17 100644
--- a/arch/powerpc/platforms/powernv/pci-ioda.c
+++ b/arch/powerpc/platforms/powernv/pci-ioda.c
@@ -1852,6 +1852,14 @@ static int pnv_pci_ioda_dma_set_mask(struct pci_dev *pdev, u64 dma_mask)
1852 /* 4GB offset bypasses 32-bit space */ 1852 /* 4GB offset bypasses 32-bit space */
1853 set_dma_offset(&pdev->dev, (1ULL << 32)); 1853 set_dma_offset(&pdev->dev, (1ULL << 32));
1854 set_dma_ops(&pdev->dev, &dma_direct_ops); 1854 set_dma_ops(&pdev->dev, &dma_direct_ops);
1855 } else if (dma_mask >> 32 && dma_mask != DMA_BIT_MASK(64)) {
1856 /*
1857 * Fail the request if a DMA mask between 32 and 64 bits
1858 * was requested but couldn't be fulfilled. Ideally we
1859 * would do this for 64-bits but historically we have
1860 * always fallen back to 32-bits.
1861 */
1862 return -ENOMEM;
1855 } else { 1863 } else {
1856 dev_info(&pdev->dev, "Using 32-bit DMA via iommu\n"); 1864 dev_info(&pdev->dev, "Using 32-bit DMA via iommu\n");
1857 set_dma_ops(&pdev->dev, &dma_iommu_ops); 1865 set_dma_ops(&pdev->dev, &dma_iommu_ops);
diff --git a/arch/s390/include/asm/tlb.h b/arch/s390/include/asm/tlb.h
index 7317b3108a88..2eb8ff0d6fca 100644
--- a/arch/s390/include/asm/tlb.h
+++ b/arch/s390/include/asm/tlb.h
@@ -47,10 +47,9 @@ struct mmu_table_batch {
47extern void tlb_table_flush(struct mmu_gather *tlb); 47extern void tlb_table_flush(struct mmu_gather *tlb);
48extern void tlb_remove_table(struct mmu_gather *tlb, void *table); 48extern void tlb_remove_table(struct mmu_gather *tlb, void *table);
49 49
50static inline void tlb_gather_mmu(struct mmu_gather *tlb, 50static inline void
51 struct mm_struct *mm, 51arch_tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
52 unsigned long start, 52 unsigned long start, unsigned long end)
53 unsigned long end)
54{ 53{
55 tlb->mm = mm; 54 tlb->mm = mm;
56 tlb->start = start; 55 tlb->start = start;
@@ -76,9 +75,15 @@ static inline void tlb_flush_mmu(struct mmu_gather *tlb)
76 tlb_flush_mmu_free(tlb); 75 tlb_flush_mmu_free(tlb);
77} 76}
78 77
79static inline void tlb_finish_mmu(struct mmu_gather *tlb, 78static inline void
80 unsigned long start, unsigned long end) 79arch_tlb_finish_mmu(struct mmu_gather *tlb,
80 unsigned long start, unsigned long end, bool force)
81{ 81{
82 if (force) {
83 tlb->start = start;
84 tlb->end = end;
85 }
86
82 tlb_flush_mmu(tlb); 87 tlb_flush_mmu(tlb);
83} 88}
84 89
diff --git a/arch/s390/kvm/sthyi.c b/arch/s390/kvm/sthyi.c
index 926b5244263e..a2e5c24f47a7 100644
--- a/arch/s390/kvm/sthyi.c
+++ b/arch/s390/kvm/sthyi.c
@@ -394,7 +394,7 @@ static int sthyi(u64 vaddr)
394 "srl %[cc],28\n" 394 "srl %[cc],28\n"
395 : [cc] "=d" (cc) 395 : [cc] "=d" (cc)
396 : [code] "d" (code), [addr] "a" (addr) 396 : [code] "d" (code), [addr] "a" (addr)
397 : "memory", "cc"); 397 : "3", "memory", "cc");
398 return cc; 398 return cc;
399} 399}
400 400
@@ -425,7 +425,7 @@ int handle_sthyi(struct kvm_vcpu *vcpu)
425 VCPU_EVENT(vcpu, 3, "STHYI: fc: %llu addr: 0x%016llx", code, addr); 425 VCPU_EVENT(vcpu, 3, "STHYI: fc: %llu addr: 0x%016llx", code, addr);
426 trace_kvm_s390_handle_sthyi(vcpu, code, addr); 426 trace_kvm_s390_handle_sthyi(vcpu, code, addr);
427 427
428 if (reg1 == reg2 || reg1 & 1 || reg2 & 1 || addr & ~PAGE_MASK) 428 if (reg1 == reg2 || reg1 & 1 || reg2 & 1)
429 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); 429 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
430 430
431 if (code & 0xffff) { 431 if (code & 0xffff) {
@@ -433,6 +433,9 @@ int handle_sthyi(struct kvm_vcpu *vcpu)
433 goto out; 433 goto out;
434 } 434 }
435 435
436 if (addr & ~PAGE_MASK)
437 return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION);
438
436 /* 439 /*
437 * If the page has not yet been faulted in, we want to do that 440 * If the page has not yet been faulted in, we want to do that
438 * now and not after all the expensive calculations. 441 * now and not after all the expensive calculations.
diff --git a/arch/s390/net/bpf_jit_comp.c b/arch/s390/net/bpf_jit_comp.c
index 01c6fbc3e85b..1803797fc885 100644
--- a/arch/s390/net/bpf_jit_comp.c
+++ b/arch/s390/net/bpf_jit_comp.c
@@ -1253,7 +1253,8 @@ static int bpf_jit_prog(struct bpf_jit *jit, struct bpf_prog *fp)
1253 insn_count = bpf_jit_insn(jit, fp, i); 1253 insn_count = bpf_jit_insn(jit, fp, i);
1254 if (insn_count < 0) 1254 if (insn_count < 0)
1255 return -1; 1255 return -1;
1256 jit->addrs[i + 1] = jit->prg; /* Next instruction address */ 1256 /* Next instruction address */
1257 jit->addrs[i + insn_count] = jit->prg;
1257 } 1258 }
1258 bpf_jit_epilogue(jit); 1259 bpf_jit_epilogue(jit);
1259 1260
diff --git a/arch/sh/include/asm/tlb.h b/arch/sh/include/asm/tlb.h
index 46e0d635e36f..51a8bc967e75 100644
--- a/arch/sh/include/asm/tlb.h
+++ b/arch/sh/include/asm/tlb.h
@@ -36,7 +36,8 @@ static inline void init_tlb_gather(struct mmu_gather *tlb)
36} 36}
37 37
38static inline void 38static inline void
39tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) 39arch_tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
40 unsigned long start, unsigned long end)
40{ 41{
41 tlb->mm = mm; 42 tlb->mm = mm;
42 tlb->start = start; 43 tlb->start = start;
@@ -47,9 +48,10 @@ tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start
47} 48}
48 49
49static inline void 50static inline void
50tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) 51arch_tlb_finish_mmu(struct mmu_gather *tlb,
52 unsigned long start, unsigned long end, bool force)
51{ 53{
52 if (tlb->fullmm) 54 if (tlb->fullmm || force)
53 flush_tlb_mm(tlb->mm); 55 flush_tlb_mm(tlb->mm);
54 56
55 /* keep the page table cache within bounds */ 57 /* keep the page table cache within bounds */
diff --git a/arch/sparc/configs/sparc32_defconfig b/arch/sparc/configs/sparc32_defconfig
index c74d3701ad68..207a43a2d8b3 100644
--- a/arch/sparc/configs/sparc32_defconfig
+++ b/arch/sparc/configs/sparc32_defconfig
@@ -1,4 +1,3 @@
1CONFIG_EXPERIMENTAL=y
2CONFIG_SYSVIPC=y 1CONFIG_SYSVIPC=y
3CONFIG_POSIX_MQUEUE=y 2CONFIG_POSIX_MQUEUE=y
4CONFIG_LOG_BUF_SHIFT=14 3CONFIG_LOG_BUF_SHIFT=14
@@ -23,7 +22,6 @@ CONFIG_IP_PNP_DHCP=y
23CONFIG_INET_AH=y 22CONFIG_INET_AH=y
24CONFIG_INET_ESP=y 23CONFIG_INET_ESP=y
25CONFIG_INET_IPCOMP=y 24CONFIG_INET_IPCOMP=y
26# CONFIG_INET_LRO is not set
27CONFIG_INET6_AH=m 25CONFIG_INET6_AH=m
28CONFIG_INET6_ESP=m 26CONFIG_INET6_ESP=m
29CONFIG_INET6_IPCOMP=m 27CONFIG_INET6_IPCOMP=m
@@ -69,7 +67,6 @@ CONFIG_EXT2_FS=y
69CONFIG_EXT2_FS_XATTR=y 67CONFIG_EXT2_FS_XATTR=y
70CONFIG_EXT2_FS_POSIX_ACL=y 68CONFIG_EXT2_FS_POSIX_ACL=y
71CONFIG_EXT2_FS_SECURITY=y 69CONFIG_EXT2_FS_SECURITY=y
72CONFIG_AUTOFS_FS=m
73CONFIG_AUTOFS4_FS=m 70CONFIG_AUTOFS4_FS=m
74CONFIG_ISO9660_FS=m 71CONFIG_ISO9660_FS=m
75CONFIG_PROC_KCORE=y 72CONFIG_PROC_KCORE=y
@@ -82,7 +79,6 @@ CONFIG_NLS=y
82CONFIG_DEBUG_KERNEL=y 79CONFIG_DEBUG_KERNEL=y
83CONFIG_DETECT_HUNG_TASK=y 80CONFIG_DETECT_HUNG_TASK=y
84# CONFIG_SCHED_DEBUG is not set 81# CONFIG_SCHED_DEBUG is not set
85# CONFIG_RCU_CPU_STALL_DETECTOR is not set
86CONFIG_KGDB=y 82CONFIG_KGDB=y
87CONFIG_KGDB_TESTS=y 83CONFIG_KGDB_TESTS=y
88CONFIG_CRYPTO_NULL=m 84CONFIG_CRYPTO_NULL=m
diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/sparc64_defconfig
index b2e650d1764f..ca8609d7292f 100644
--- a/arch/sparc/configs/sparc64_defconfig
+++ b/arch/sparc/configs/sparc64_defconfig
@@ -1,5 +1,4 @@
1CONFIG_64BIT=y 1CONFIG_64BIT=y
2CONFIG_EXPERIMENTAL=y
3# CONFIG_LOCALVERSION_AUTO is not set 2# CONFIG_LOCALVERSION_AUTO is not set
4CONFIG_SYSVIPC=y 3CONFIG_SYSVIPC=y
5CONFIG_POSIX_MQUEUE=y 4CONFIG_POSIX_MQUEUE=y
@@ -184,7 +183,6 @@ CONFIG_HID_TOPSEED=y
184CONFIG_HID_THRUSTMASTER=y 183CONFIG_HID_THRUSTMASTER=y
185CONFIG_HID_ZEROPLUS=y 184CONFIG_HID_ZEROPLUS=y
186CONFIG_USB=y 185CONFIG_USB=y
187# CONFIG_USB_DEVICE_CLASS is not set
188CONFIG_USB_EHCI_HCD=m 186CONFIG_USB_EHCI_HCD=m
189# CONFIG_USB_EHCI_TT_NEWSCHED is not set 187# CONFIG_USB_EHCI_TT_NEWSCHED is not set
190CONFIG_USB_OHCI_HCD=y 188CONFIG_USB_OHCI_HCD=y
@@ -210,8 +208,6 @@ CONFIG_LOCKUP_DETECTOR=y
210CONFIG_DETECT_HUNG_TASK=y 208CONFIG_DETECT_HUNG_TASK=y
211# CONFIG_SCHED_DEBUG is not set 209# CONFIG_SCHED_DEBUG is not set
212CONFIG_SCHEDSTATS=y 210CONFIG_SCHEDSTATS=y
213# CONFIG_RCU_CPU_STALL_DETECTOR is not set
214CONFIG_SYSCTL_SYSCALL_CHECK=y
215CONFIG_BLK_DEV_IO_TRACE=y 211CONFIG_BLK_DEV_IO_TRACE=y
216CONFIG_UPROBE_EVENTS=y 212CONFIG_UPROBE_EVENTS=y
217CONFIG_KEYS=y 213CONFIG_KEYS=y
diff --git a/arch/sparc/include/asm/mmu_context_64.h b/arch/sparc/include/asm/mmu_context_64.h
index 2cddcda4f85f..87841d687f8d 100644
--- a/arch/sparc/include/asm/mmu_context_64.h
+++ b/arch/sparc/include/asm/mmu_context_64.h
@@ -27,9 +27,11 @@ void destroy_context(struct mm_struct *mm);
27void __tsb_context_switch(unsigned long pgd_pa, 27void __tsb_context_switch(unsigned long pgd_pa,
28 struct tsb_config *tsb_base, 28 struct tsb_config *tsb_base,
29 struct tsb_config *tsb_huge, 29 struct tsb_config *tsb_huge,
30 unsigned long tsb_descr_pa); 30 unsigned long tsb_descr_pa,
31 unsigned long secondary_ctx);
31 32
32static inline void tsb_context_switch(struct mm_struct *mm) 33static inline void tsb_context_switch_ctx(struct mm_struct *mm,
34 unsigned long ctx)
33{ 35{
34 __tsb_context_switch(__pa(mm->pgd), 36 __tsb_context_switch(__pa(mm->pgd),
35 &mm->context.tsb_block[MM_TSB_BASE], 37 &mm->context.tsb_block[MM_TSB_BASE],
@@ -40,9 +42,12 @@ static inline void tsb_context_switch(struct mm_struct *mm)
40#else 42#else
41 NULL 43 NULL
42#endif 44#endif
43 , __pa(&mm->context.tsb_descr[MM_TSB_BASE])); 45 , __pa(&mm->context.tsb_descr[MM_TSB_BASE]),
46 ctx);
44} 47}
45 48
49#define tsb_context_switch(X) tsb_context_switch_ctx(X, 0)
50
46void tsb_grow(struct mm_struct *mm, 51void tsb_grow(struct mm_struct *mm,
47 unsigned long tsb_index, 52 unsigned long tsb_index,
48 unsigned long mm_rss); 53 unsigned long mm_rss);
@@ -112,8 +117,7 @@ static inline void switch_mm(struct mm_struct *old_mm, struct mm_struct *mm, str
112 * cpu0 to update it's TSB because at that point the cpu_vm_mask 117 * cpu0 to update it's TSB because at that point the cpu_vm_mask
113 * only had cpu1 set in it. 118 * only had cpu1 set in it.
114 */ 119 */
115 load_secondary_context(mm); 120 tsb_context_switch_ctx(mm, CTX_HWBITS(mm->context));
116 tsb_context_switch(mm);
117 121
118 /* Any time a processor runs a context on an address space 122 /* Any time a processor runs a context on an address space
119 * for the first time, we must flush that context out of the 123 * for the first time, we must flush that context out of the
diff --git a/arch/sparc/include/asm/page_32.h b/arch/sparc/include/asm/page_32.h
index 0efd0583a8c9..6249214148c2 100644
--- a/arch/sparc/include/asm/page_32.h
+++ b/arch/sparc/include/asm/page_32.h
@@ -68,6 +68,7 @@ typedef struct { unsigned long iopgprot; } iopgprot_t;
68#define iopgprot_val(x) ((x).iopgprot) 68#define iopgprot_val(x) ((x).iopgprot)
69 69
70#define __pte(x) ((pte_t) { (x) } ) 70#define __pte(x) ((pte_t) { (x) } )
71#define __pmd(x) ((pmd_t) { { (x) }, })
71#define __iopte(x) ((iopte_t) { (x) } ) 72#define __iopte(x) ((iopte_t) { (x) } )
72#define __pgd(x) ((pgd_t) { (x) } ) 73#define __pgd(x) ((pgd_t) { (x) } )
73#define __ctxd(x) ((ctxd_t) { (x) } ) 74#define __ctxd(x) ((ctxd_t) { (x) } )
@@ -95,6 +96,7 @@ typedef unsigned long iopgprot_t;
95#define iopgprot_val(x) (x) 96#define iopgprot_val(x) (x)
96 97
97#define __pte(x) (x) 98#define __pte(x) (x)
99#define __pmd(x) ((pmd_t) { { (x) }, })
98#define __iopte(x) (x) 100#define __iopte(x) (x)
99#define __pgd(x) (x) 101#define __pgd(x) (x)
100#define __ctxd(x) (x) 102#define __ctxd(x) (x)
diff --git a/arch/sparc/include/asm/spitfire.h b/arch/sparc/include/asm/spitfire.h
index 1d8321c827a8..1b1286d05069 100644
--- a/arch/sparc/include/asm/spitfire.h
+++ b/arch/sparc/include/asm/spitfire.h
@@ -47,10 +47,26 @@
47#define SUN4V_CHIP_NIAGARA5 0x05 47#define SUN4V_CHIP_NIAGARA5 0x05
48#define SUN4V_CHIP_SPARC_M6 0x06 48#define SUN4V_CHIP_SPARC_M6 0x06
49#define SUN4V_CHIP_SPARC_M7 0x07 49#define SUN4V_CHIP_SPARC_M7 0x07
50#define SUN4V_CHIP_SPARC_M8 0x08
50#define SUN4V_CHIP_SPARC64X 0x8a 51#define SUN4V_CHIP_SPARC64X 0x8a
51#define SUN4V_CHIP_SPARC_SN 0x8b 52#define SUN4V_CHIP_SPARC_SN 0x8b
52#define SUN4V_CHIP_UNKNOWN 0xff 53#define SUN4V_CHIP_UNKNOWN 0xff
53 54
55/*
56 * The following CPU_ID_xxx constants are used
57 * to identify the CPU type in the setup phase
58 * (see head_64.S)
59 */
60#define CPU_ID_NIAGARA1 ('1')
61#define CPU_ID_NIAGARA2 ('2')
62#define CPU_ID_NIAGARA3 ('3')
63#define CPU_ID_NIAGARA4 ('4')
64#define CPU_ID_NIAGARA5 ('5')
65#define CPU_ID_M6 ('6')
66#define CPU_ID_M7 ('7')
67#define CPU_ID_M8 ('8')
68#define CPU_ID_SONOMA1 ('N')
69
54#ifndef __ASSEMBLY__ 70#ifndef __ASSEMBLY__
55 71
56enum ultra_tlb_layout { 72enum ultra_tlb_layout {
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c
index 493e023a468a..ef4f18f7a674 100644
--- a/arch/sparc/kernel/cpu.c
+++ b/arch/sparc/kernel/cpu.c
@@ -506,6 +506,12 @@ static void __init sun4v_cpu_probe(void)
506 sparc_pmu_type = "sparc-m7"; 506 sparc_pmu_type = "sparc-m7";
507 break; 507 break;
508 508
509 case SUN4V_CHIP_SPARC_M8:
510 sparc_cpu_type = "SPARC-M8";
511 sparc_fpu_type = "SPARC-M8 integrated FPU";
512 sparc_pmu_type = "sparc-m8";
513 break;
514
509 case SUN4V_CHIP_SPARC_SN: 515 case SUN4V_CHIP_SPARC_SN:
510 sparc_cpu_type = "SPARC-SN"; 516 sparc_cpu_type = "SPARC-SN";
511 sparc_fpu_type = "SPARC-SN integrated FPU"; 517 sparc_fpu_type = "SPARC-SN integrated FPU";
diff --git a/arch/sparc/kernel/cpumap.c b/arch/sparc/kernel/cpumap.c
index 45c820e1cba5..90d550bbfeef 100644
--- a/arch/sparc/kernel/cpumap.c
+++ b/arch/sparc/kernel/cpumap.c
@@ -328,6 +328,7 @@ static int iterate_cpu(struct cpuinfo_tree *t, unsigned int root_index)
328 case SUN4V_CHIP_NIAGARA5: 328 case SUN4V_CHIP_NIAGARA5:
329 case SUN4V_CHIP_SPARC_M6: 329 case SUN4V_CHIP_SPARC_M6:
330 case SUN4V_CHIP_SPARC_M7: 330 case SUN4V_CHIP_SPARC_M7:
331 case SUN4V_CHIP_SPARC_M8:
331 case SUN4V_CHIP_SPARC_SN: 332 case SUN4V_CHIP_SPARC_SN:
332 case SUN4V_CHIP_SPARC64X: 333 case SUN4V_CHIP_SPARC64X:
333 rover_inc_table = niagara_iterate_method; 334 rover_inc_table = niagara_iterate_method;
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
index 41a407328667..78e0211753d2 100644
--- a/arch/sparc/kernel/head_64.S
+++ b/arch/sparc/kernel/head_64.S
@@ -424,22 +424,25 @@ EXPORT_SYMBOL(sun4v_chip_type)
424 nop 424 nop
425 425
42670: ldub [%g1 + 7], %g2 42670: ldub [%g1 + 7], %g2
427 cmp %g2, '3' 427 cmp %g2, CPU_ID_NIAGARA3
428 be,pt %xcc, 5f 428 be,pt %xcc, 5f
429 mov SUN4V_CHIP_NIAGARA3, %g4 429 mov SUN4V_CHIP_NIAGARA3, %g4
430 cmp %g2, '4' 430 cmp %g2, CPU_ID_NIAGARA4
431 be,pt %xcc, 5f 431 be,pt %xcc, 5f
432 mov SUN4V_CHIP_NIAGARA4, %g4 432 mov SUN4V_CHIP_NIAGARA4, %g4
433 cmp %g2, '5' 433 cmp %g2, CPU_ID_NIAGARA5
434 be,pt %xcc, 5f 434 be,pt %xcc, 5f
435 mov SUN4V_CHIP_NIAGARA5, %g4 435 mov SUN4V_CHIP_NIAGARA5, %g4
436 cmp %g2, '6' 436 cmp %g2, CPU_ID_M6
437 be,pt %xcc, 5f 437 be,pt %xcc, 5f
438 mov SUN4V_CHIP_SPARC_M6, %g4 438 mov SUN4V_CHIP_SPARC_M6, %g4
439 cmp %g2, '7' 439 cmp %g2, CPU_ID_M7
440 be,pt %xcc, 5f 440 be,pt %xcc, 5f
441 mov SUN4V_CHIP_SPARC_M7, %g4 441 mov SUN4V_CHIP_SPARC_M7, %g4
442 cmp %g2, 'N' 442 cmp %g2, CPU_ID_M8
443 be,pt %xcc, 5f
444 mov SUN4V_CHIP_SPARC_M8, %g4
445 cmp %g2, CPU_ID_SONOMA1
443 be,pt %xcc, 5f 446 be,pt %xcc, 5f
444 mov SUN4V_CHIP_SPARC_SN, %g4 447 mov SUN4V_CHIP_SPARC_SN, %g4
445 ba,pt %xcc, 49f 448 ba,pt %xcc, 49f
@@ -448,10 +451,10 @@ EXPORT_SYMBOL(sun4v_chip_type)
44891: sethi %hi(prom_cpu_compatible), %g1 45191: sethi %hi(prom_cpu_compatible), %g1
449 or %g1, %lo(prom_cpu_compatible), %g1 452 or %g1, %lo(prom_cpu_compatible), %g1
450 ldub [%g1 + 17], %g2 453 ldub [%g1 + 17], %g2
451 cmp %g2, '1' 454 cmp %g2, CPU_ID_NIAGARA1
452 be,pt %xcc, 5f 455 be,pt %xcc, 5f
453 mov SUN4V_CHIP_NIAGARA1, %g4 456 mov SUN4V_CHIP_NIAGARA1, %g4
454 cmp %g2, '2' 457 cmp %g2, CPU_ID_NIAGARA2
455 be,pt %xcc, 5f 458 be,pt %xcc, 5f
456 mov SUN4V_CHIP_NIAGARA2, %g4 459 mov SUN4V_CHIP_NIAGARA2, %g4
457 460
@@ -602,6 +605,9 @@ niagara_tlb_fixup:
602 cmp %g1, SUN4V_CHIP_SPARC_M7 605 cmp %g1, SUN4V_CHIP_SPARC_M7
603 be,pt %xcc, niagara4_patch 606 be,pt %xcc, niagara4_patch
604 nop 607 nop
608 cmp %g1, SUN4V_CHIP_SPARC_M8
609 be,pt %xcc, niagara4_patch
610 nop
605 cmp %g1, SUN4V_CHIP_SPARC_SN 611 cmp %g1, SUN4V_CHIP_SPARC_SN
606 be,pt %xcc, niagara4_patch 612 be,pt %xcc, niagara4_patch
607 nop 613 nop
diff --git a/arch/sparc/kernel/pci_sun4v.c b/arch/sparc/kernel/pci_sun4v.c
index f10e2f712394..9ebebf1fd93d 100644
--- a/arch/sparc/kernel/pci_sun4v.c
+++ b/arch/sparc/kernel/pci_sun4v.c
@@ -1266,8 +1266,6 @@ static int pci_sun4v_probe(struct platform_device *op)
1266 * ATU group, but ATU hcalls won't be available. 1266 * ATU group, but ATU hcalls won't be available.
1267 */ 1267 */
1268 hv_atu = false; 1268 hv_atu = false;
1269 pr_err(PFX "Could not register hvapi ATU err=%d\n",
1270 err);
1271 } else { 1269 } else {
1272 pr_info(PFX "Registered hvapi ATU major[%lu] minor[%lu]\n", 1270 pr_info(PFX "Registered hvapi ATU major[%lu] minor[%lu]\n",
1273 vatu_major, vatu_minor); 1271 vatu_major, vatu_minor);
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index a38787b84322..732af9a9f6dd 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -602,7 +602,7 @@ void pcibios_fixup_bus(struct pci_bus *bus)
602{ 602{
603 struct pci_dev *dev; 603 struct pci_dev *dev;
604 int i, has_io, has_mem; 604 int i, has_io, has_mem;
605 unsigned int cmd; 605 unsigned int cmd = 0;
606 struct linux_pcic *pcic; 606 struct linux_pcic *pcic;
607 /* struct linux_pbm_info* pbm = &pcic->pbm; */ 607 /* struct linux_pbm_info* pbm = &pcic->pbm; */
608 int node; 608 int node;
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c
index 4d9c3e13c150..150ee7d4b059 100644
--- a/arch/sparc/kernel/setup_64.c
+++ b/arch/sparc/kernel/setup_64.c
@@ -288,10 +288,17 @@ static void __init sun4v_patch(void)
288 288
289 sun4v_patch_2insn_range(&__sun4v_2insn_patch, 289 sun4v_patch_2insn_range(&__sun4v_2insn_patch,
290 &__sun4v_2insn_patch_end); 290 &__sun4v_2insn_patch_end);
291 if (sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || 291
292 sun4v_chip_type == SUN4V_CHIP_SPARC_SN) 292 switch (sun4v_chip_type) {
293 case SUN4V_CHIP_SPARC_M7:
294 case SUN4V_CHIP_SPARC_M8:
295 case SUN4V_CHIP_SPARC_SN:
293 sun_m7_patch_2insn_range(&__sun_m7_2insn_patch, 296 sun_m7_patch_2insn_range(&__sun_m7_2insn_patch,
294 &__sun_m7_2insn_patch_end); 297 &__sun_m7_2insn_patch_end);
298 break;
299 default:
300 break;
301 }
295 302
296 sun4v_hvapi_init(); 303 sun4v_hvapi_init();
297} 304}
@@ -529,6 +536,7 @@ static void __init init_sparc64_elf_hwcap(void)
529 sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || 536 sun4v_chip_type == SUN4V_CHIP_NIAGARA5 ||
530 sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || 537 sun4v_chip_type == SUN4V_CHIP_SPARC_M6 ||
531 sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || 538 sun4v_chip_type == SUN4V_CHIP_SPARC_M7 ||
539 sun4v_chip_type == SUN4V_CHIP_SPARC_M8 ||
532 sun4v_chip_type == SUN4V_CHIP_SPARC_SN || 540 sun4v_chip_type == SUN4V_CHIP_SPARC_SN ||
533 sun4v_chip_type == SUN4V_CHIP_SPARC64X) 541 sun4v_chip_type == SUN4V_CHIP_SPARC64X)
534 cap |= HWCAP_SPARC_BLKINIT; 542 cap |= HWCAP_SPARC_BLKINIT;
@@ -538,6 +546,7 @@ static void __init init_sparc64_elf_hwcap(void)
538 sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || 546 sun4v_chip_type == SUN4V_CHIP_NIAGARA5 ||
539 sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || 547 sun4v_chip_type == SUN4V_CHIP_SPARC_M6 ||
540 sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || 548 sun4v_chip_type == SUN4V_CHIP_SPARC_M7 ||
549 sun4v_chip_type == SUN4V_CHIP_SPARC_M8 ||
541 sun4v_chip_type == SUN4V_CHIP_SPARC_SN || 550 sun4v_chip_type == SUN4V_CHIP_SPARC_SN ||
542 sun4v_chip_type == SUN4V_CHIP_SPARC64X) 551 sun4v_chip_type == SUN4V_CHIP_SPARC64X)
543 cap |= HWCAP_SPARC_N2; 552 cap |= HWCAP_SPARC_N2;
@@ -568,6 +577,7 @@ static void __init init_sparc64_elf_hwcap(void)
568 sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || 577 sun4v_chip_type == SUN4V_CHIP_NIAGARA5 ||
569 sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || 578 sun4v_chip_type == SUN4V_CHIP_SPARC_M6 ||
570 sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || 579 sun4v_chip_type == SUN4V_CHIP_SPARC_M7 ||
580 sun4v_chip_type == SUN4V_CHIP_SPARC_M8 ||
571 sun4v_chip_type == SUN4V_CHIP_SPARC_SN || 581 sun4v_chip_type == SUN4V_CHIP_SPARC_SN ||
572 sun4v_chip_type == SUN4V_CHIP_SPARC64X) 582 sun4v_chip_type == SUN4V_CHIP_SPARC64X)
573 cap |= (AV_SPARC_VIS | AV_SPARC_VIS2 | 583 cap |= (AV_SPARC_VIS | AV_SPARC_VIS2 |
@@ -578,6 +588,7 @@ static void __init init_sparc64_elf_hwcap(void)
578 sun4v_chip_type == SUN4V_CHIP_NIAGARA5 || 588 sun4v_chip_type == SUN4V_CHIP_NIAGARA5 ||
579 sun4v_chip_type == SUN4V_CHIP_SPARC_M6 || 589 sun4v_chip_type == SUN4V_CHIP_SPARC_M6 ||
580 sun4v_chip_type == SUN4V_CHIP_SPARC_M7 || 590 sun4v_chip_type == SUN4V_CHIP_SPARC_M7 ||
591 sun4v_chip_type == SUN4V_CHIP_SPARC_M8 ||
581 sun4v_chip_type == SUN4V_CHIP_SPARC_SN || 592 sun4v_chip_type == SUN4V_CHIP_SPARC_SN ||
582 sun4v_chip_type == SUN4V_CHIP_SPARC64X) 593 sun4v_chip_type == SUN4V_CHIP_SPARC64X)
583 cap |= (AV_SPARC_VIS3 | AV_SPARC_HPC | 594 cap |= (AV_SPARC_VIS3 | AV_SPARC_HPC |
diff --git a/arch/sparc/kernel/tsb.S b/arch/sparc/kernel/tsb.S
index 07c0df924960..db872dbfafe9 100644
--- a/arch/sparc/kernel/tsb.S
+++ b/arch/sparc/kernel/tsb.S
@@ -360,6 +360,7 @@ tsb_flush:
360 * %o1: TSB base config pointer 360 * %o1: TSB base config pointer
361 * %o2: TSB huge config pointer, or NULL if none 361 * %o2: TSB huge config pointer, or NULL if none
362 * %o3: Hypervisor TSB descriptor physical address 362 * %o3: Hypervisor TSB descriptor physical address
363 * %o4: Secondary context to load, if non-zero
363 * 364 *
364 * We have to run this whole thing with interrupts 365 * We have to run this whole thing with interrupts
365 * disabled so that the current cpu doesn't change 366 * disabled so that the current cpu doesn't change
@@ -372,6 +373,17 @@ __tsb_context_switch:
372 rdpr %pstate, %g1 373 rdpr %pstate, %g1
373 wrpr %g1, PSTATE_IE, %pstate 374 wrpr %g1, PSTATE_IE, %pstate
374 375
376 brz,pn %o4, 1f
377 mov SECONDARY_CONTEXT, %o5
378
379661: stxa %o4, [%o5] ASI_DMMU
380 .section .sun4v_1insn_patch, "ax"
381 .word 661b
382 stxa %o4, [%o5] ASI_MMU
383 .previous
384 flush %g6
385
3861:
375 TRAP_LOAD_TRAP_BLOCK(%g2, %g3) 387 TRAP_LOAD_TRAP_BLOCK(%g2, %g3)
376 388
377 stx %o0, [%g2 + TRAP_PER_CPU_PGD_PADDR] 389 stx %o0, [%g2 + TRAP_PER_CPU_PGD_PADDR]
diff --git a/arch/sparc/lib/U3memcpy.S b/arch/sparc/lib/U3memcpy.S
index 54f98706b03b..5a8cb37f0a3b 100644
--- a/arch/sparc/lib/U3memcpy.S
+++ b/arch/sparc/lib/U3memcpy.S
@@ -145,13 +145,13 @@ ENDPROC(U3_retl_o2_plus_GS_plus_0x08)
145ENTRY(U3_retl_o2_and_7_plus_GS) 145ENTRY(U3_retl_o2_and_7_plus_GS)
146 and %o2, 7, %o2 146 and %o2, 7, %o2
147 retl 147 retl
148 add %o2, GLOBAL_SPARE, %o2 148 add %o2, GLOBAL_SPARE, %o0
149ENDPROC(U3_retl_o2_and_7_plus_GS) 149ENDPROC(U3_retl_o2_and_7_plus_GS)
150ENTRY(U3_retl_o2_and_7_plus_GS_plus_8) 150ENTRY(U3_retl_o2_and_7_plus_GS_plus_8)
151 add GLOBAL_SPARE, 8, GLOBAL_SPARE 151 add GLOBAL_SPARE, 8, GLOBAL_SPARE
152 and %o2, 7, %o2 152 and %o2, 7, %o2
153 retl 153 retl
154 add %o2, GLOBAL_SPARE, %o2 154 add %o2, GLOBAL_SPARE, %o0
155ENDPROC(U3_retl_o2_and_7_plus_GS_plus_8) 155ENDPROC(U3_retl_o2_and_7_plus_GS_plus_8)
156#endif 156#endif
157 157
diff --git a/arch/sparc/lib/multi3.S b/arch/sparc/lib/multi3.S
index d6b6c97fe3c7..703127aaf4a5 100644
--- a/arch/sparc/lib/multi3.S
+++ b/arch/sparc/lib/multi3.S
@@ -5,26 +5,26 @@
5 .align 4 5 .align 4
6ENTRY(__multi3) /* %o0 = u, %o1 = v */ 6ENTRY(__multi3) /* %o0 = u, %o1 = v */
7 mov %o1, %g1 7 mov %o1, %g1
8 srl %o3, 0, %g4 8 srl %o3, 0, %o4
9 mulx %g4, %g1, %o1 9 mulx %o4, %g1, %o1
10 srlx %g1, 0x20, %g3 10 srlx %g1, 0x20, %g3
11 mulx %g3, %g4, %g5 11 mulx %g3, %o4, %g7
12 sllx %g5, 0x20, %o5 12 sllx %g7, 0x20, %o5
13 srl %g1, 0, %g4 13 srl %g1, 0, %o4
14 sub %o1, %o5, %o5 14 sub %o1, %o5, %o5
15 srlx %o5, 0x20, %o5 15 srlx %o5, 0x20, %o5
16 addcc %g5, %o5, %g5 16 addcc %g7, %o5, %g7
17 srlx %o3, 0x20, %o5 17 srlx %o3, 0x20, %o5
18 mulx %g4, %o5, %g4 18 mulx %o4, %o5, %o4
19 mulx %g3, %o5, %o5 19 mulx %g3, %o5, %o5
20 sethi %hi(0x80000000), %g3 20 sethi %hi(0x80000000), %g3
21 addcc %g5, %g4, %g5 21 addcc %g7, %o4, %g7
22 srlx %g5, 0x20, %g5 22 srlx %g7, 0x20, %g7
23 add %g3, %g3, %g3 23 add %g3, %g3, %g3
24 movcc %xcc, %g0, %g3 24 movcc %xcc, %g0, %g3
25 addcc %o5, %g5, %o5 25 addcc %o5, %g7, %o5
26 sllx %g4, 0x20, %g4 26 sllx %o4, 0x20, %o4
27 add %o1, %g4, %o1 27 add %o1, %o4, %o1
28 add %o5, %g3, %g2 28 add %o5, %g3, %g2
29 mulx %g1, %o2, %g1 29 mulx %g1, %o2, %g1
30 add %g1, %g2, %g1 30 add %g1, %g2, %g1
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 3c40ebd50f92..afa0099f3748 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -325,6 +325,29 @@ static void __update_mmu_tsb_insert(struct mm_struct *mm, unsigned long tsb_inde
325} 325}
326 326
327#ifdef CONFIG_HUGETLB_PAGE 327#ifdef CONFIG_HUGETLB_PAGE
328static void __init add_huge_page_size(unsigned long size)
329{
330 unsigned int order;
331
332 if (size_to_hstate(size))
333 return;
334
335 order = ilog2(size) - PAGE_SHIFT;
336 hugetlb_add_hstate(order);
337}
338
339static int __init hugetlbpage_init(void)
340{
341 add_huge_page_size(1UL << HPAGE_64K_SHIFT);
342 add_huge_page_size(1UL << HPAGE_SHIFT);
343 add_huge_page_size(1UL << HPAGE_256MB_SHIFT);
344 add_huge_page_size(1UL << HPAGE_2GB_SHIFT);
345
346 return 0;
347}
348
349arch_initcall(hugetlbpage_init);
350
328static int __init setup_hugepagesz(char *string) 351static int __init setup_hugepagesz(char *string)
329{ 352{
330 unsigned long long hugepage_size; 353 unsigned long long hugepage_size;
@@ -364,7 +387,7 @@ static int __init setup_hugepagesz(char *string)
364 goto out; 387 goto out;
365 } 388 }
366 389
367 hugetlb_add_hstate(hugepage_shift - PAGE_SHIFT); 390 add_huge_page_size(hugepage_size);
368 rc = 1; 391 rc = 1;
369 392
370out: 393out:
@@ -1921,12 +1944,22 @@ static void __init setup_page_offset(void)
1921 break; 1944 break;
1922 case SUN4V_CHIP_SPARC_M7: 1945 case SUN4V_CHIP_SPARC_M7:
1923 case SUN4V_CHIP_SPARC_SN: 1946 case SUN4V_CHIP_SPARC_SN:
1924 default:
1925 /* M7 and later support 52-bit virtual addresses. */ 1947 /* M7 and later support 52-bit virtual addresses. */
1926 sparc64_va_hole_top = 0xfff8000000000000UL; 1948 sparc64_va_hole_top = 0xfff8000000000000UL;
1927 sparc64_va_hole_bottom = 0x0008000000000000UL; 1949 sparc64_va_hole_bottom = 0x0008000000000000UL;
1928 max_phys_bits = 49; 1950 max_phys_bits = 49;
1929 break; 1951 break;
1952 case SUN4V_CHIP_SPARC_M8:
1953 default:
1954 /* M8 and later support 54-bit virtual addresses.
1955 * However, restricting M8 and above VA bits to 53
1956 * as 4-level page table cannot support more than
1957 * 53 VA bits.
1958 */
1959 sparc64_va_hole_top = 0xfff0000000000000UL;
1960 sparc64_va_hole_bottom = 0x0010000000000000UL;
1961 max_phys_bits = 51;
1962 break;
1930 } 1963 }
1931 } 1964 }
1932 1965
@@ -2138,6 +2171,7 @@ static void __init sun4v_linear_pte_xor_finalize(void)
2138 */ 2171 */
2139 switch (sun4v_chip_type) { 2172 switch (sun4v_chip_type) {
2140 case SUN4V_CHIP_SPARC_M7: 2173 case SUN4V_CHIP_SPARC_M7:
2174 case SUN4V_CHIP_SPARC_M8:
2141 case SUN4V_CHIP_SPARC_SN: 2175 case SUN4V_CHIP_SPARC_SN:
2142 pagecv_flag = 0x00; 2176 pagecv_flag = 0x00;
2143 break; 2177 break;
@@ -2290,6 +2324,7 @@ void __init paging_init(void)
2290 */ 2324 */
2291 switch (sun4v_chip_type) { 2325 switch (sun4v_chip_type) {
2292 case SUN4V_CHIP_SPARC_M7: 2326 case SUN4V_CHIP_SPARC_M7:
2327 case SUN4V_CHIP_SPARC_M8:
2293 case SUN4V_CHIP_SPARC_SN: 2328 case SUN4V_CHIP_SPARC_SN:
2294 page_cache4v_flag = _PAGE_CP_4V; 2329 page_cache4v_flag = _PAGE_CP_4V;
2295 break; 2330 break;
diff --git a/arch/sparc/power/hibernate.c b/arch/sparc/power/hibernate.c
index 17bd2e167e07..df707a8ad311 100644
--- a/arch/sparc/power/hibernate.c
+++ b/arch/sparc/power/hibernate.c
@@ -35,6 +35,5 @@ void restore_processor_state(void)
35{ 35{
36 struct mm_struct *mm = current->active_mm; 36 struct mm_struct *mm = current->active_mm;
37 37
38 load_secondary_context(mm); 38 tsb_context_switch_ctx(mm, CTX_HWBITS(mm->context));
39 tsb_context_switch(mm);
40} 39}
diff --git a/arch/um/include/asm/tlb.h b/arch/um/include/asm/tlb.h
index 600a2e9bfee2..344d95619d03 100644
--- a/arch/um/include/asm/tlb.h
+++ b/arch/um/include/asm/tlb.h
@@ -45,7 +45,8 @@ static inline void init_tlb_gather(struct mmu_gather *tlb)
45} 45}
46 46
47static inline void 47static inline void
48tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end) 48arch_tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
49 unsigned long start, unsigned long end)
49{ 50{
50 tlb->mm = mm; 51 tlb->mm = mm;
51 tlb->start = start; 52 tlb->start = start;
@@ -80,13 +81,19 @@ tlb_flush_mmu(struct mmu_gather *tlb)
80 tlb_flush_mmu_free(tlb); 81 tlb_flush_mmu_free(tlb);
81} 82}
82 83
83/* tlb_finish_mmu 84/* arch_tlb_finish_mmu
84 * Called at the end of the shootdown operation to free up any resources 85 * Called at the end of the shootdown operation to free up any resources
85 * that were required. 86 * that were required.
86 */ 87 */
87static inline void 88static inline void
88tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) 89arch_tlb_finish_mmu(struct mmu_gather *tlb,
90 unsigned long start, unsigned long end, bool force)
89{ 91{
92 if (force) {
93 tlb->start = start;
94 tlb->end = end;
95 tlb->need_flush = 1;
96 }
90 tlb_flush_mmu(tlb); 97 tlb_flush_mmu(tlb);
91 98
92 /* keep the page table cache within bounds */ 99 /* keep the page table cache within bounds */
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 781521b7cf9e..323cb065be5e 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -100,6 +100,7 @@ config X86
100 select GENERIC_STRNCPY_FROM_USER 100 select GENERIC_STRNCPY_FROM_USER
101 select GENERIC_STRNLEN_USER 101 select GENERIC_STRNLEN_USER
102 select GENERIC_TIME_VSYSCALL 102 select GENERIC_TIME_VSYSCALL
103 select HARDLOCKUP_CHECK_TIMESTAMP if X86_64
103 select HAVE_ACPI_APEI if ACPI 104 select HAVE_ACPI_APEI if ACPI
104 select HAVE_ACPI_APEI_NMI if ACPI 105 select HAVE_ACPI_APEI_NMI if ACPI
105 select HAVE_ALIGNED_STRUCT_PAGE if SLUB 106 select HAVE_ALIGNED_STRUCT_PAGE if SLUB
@@ -163,7 +164,7 @@ config X86
163 select HAVE_PCSPKR_PLATFORM 164 select HAVE_PCSPKR_PLATFORM
164 select HAVE_PERF_EVENTS 165 select HAVE_PERF_EVENTS
165 select HAVE_PERF_EVENTS_NMI 166 select HAVE_PERF_EVENTS_NMI
166 select HAVE_HARDLOCKUP_DETECTOR_PERF if HAVE_PERF_EVENTS_NMI 167 select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
167 select HAVE_PERF_REGS 168 select HAVE_PERF_REGS
168 select HAVE_PERF_USER_STACK_DUMP 169 select HAVE_PERF_USER_STACK_DUMP
169 select HAVE_REGS_AND_STACK_ACCESS_API 170 select HAVE_REGS_AND_STACK_ACCESS_API
diff --git a/arch/x86/crypto/sha1_avx2_x86_64_asm.S b/arch/x86/crypto/sha1_avx2_x86_64_asm.S
index 1cd792db15ef..1eab79c9ac48 100644
--- a/arch/x86/crypto/sha1_avx2_x86_64_asm.S
+++ b/arch/x86/crypto/sha1_avx2_x86_64_asm.S
@@ -117,11 +117,10 @@
117 .set T1, REG_T1 117 .set T1, REG_T1
118.endm 118.endm
119 119
120#define K_BASE %r8
121#define HASH_PTR %r9 120#define HASH_PTR %r9
121#define BLOCKS_CTR %r8
122#define BUFFER_PTR %r10 122#define BUFFER_PTR %r10
123#define BUFFER_PTR2 %r13 123#define BUFFER_PTR2 %r13
124#define BUFFER_END %r11
125 124
126#define PRECALC_BUF %r14 125#define PRECALC_BUF %r14
127#define WK_BUF %r15 126#define WK_BUF %r15
@@ -205,14 +204,14 @@
205 * blended AVX2 and ALU instruction scheduling 204 * blended AVX2 and ALU instruction scheduling
206 * 1 vector iteration per 8 rounds 205 * 1 vector iteration per 8 rounds
207 */ 206 */
208 vmovdqu ((i * 2) + PRECALC_OFFSET)(BUFFER_PTR), W_TMP 207 vmovdqu (i * 2)(BUFFER_PTR), W_TMP
209 .elseif ((i & 7) == 1) 208 .elseif ((i & 7) == 1)
210 vinsertf128 $1, (((i-1) * 2)+PRECALC_OFFSET)(BUFFER_PTR2),\ 209 vinsertf128 $1, ((i-1) * 2)(BUFFER_PTR2),\
211 WY_TMP, WY_TMP 210 WY_TMP, WY_TMP
212 .elseif ((i & 7) == 2) 211 .elseif ((i & 7) == 2)
213 vpshufb YMM_SHUFB_BSWAP, WY_TMP, WY 212 vpshufb YMM_SHUFB_BSWAP, WY_TMP, WY
214 .elseif ((i & 7) == 4) 213 .elseif ((i & 7) == 4)
215 vpaddd K_XMM(K_BASE), WY, WY_TMP 214 vpaddd K_XMM + K_XMM_AR(%rip), WY, WY_TMP
216 .elseif ((i & 7) == 7) 215 .elseif ((i & 7) == 7)
217 vmovdqu WY_TMP, PRECALC_WK(i&~7) 216 vmovdqu WY_TMP, PRECALC_WK(i&~7)
218 217
@@ -255,7 +254,7 @@
255 vpxor WY, WY_TMP, WY_TMP 254 vpxor WY, WY_TMP, WY_TMP
256 .elseif ((i & 7) == 7) 255 .elseif ((i & 7) == 7)
257 vpxor WY_TMP2, WY_TMP, WY 256 vpxor WY_TMP2, WY_TMP, WY
258 vpaddd K_XMM(K_BASE), WY, WY_TMP 257 vpaddd K_XMM + K_XMM_AR(%rip), WY, WY_TMP
259 vmovdqu WY_TMP, PRECALC_WK(i&~7) 258 vmovdqu WY_TMP, PRECALC_WK(i&~7)
260 259
261 PRECALC_ROTATE_WY 260 PRECALC_ROTATE_WY
@@ -291,7 +290,7 @@
291 vpsrld $30, WY, WY 290 vpsrld $30, WY, WY
292 vpor WY, WY_TMP, WY 291 vpor WY, WY_TMP, WY
293 .elseif ((i & 7) == 7) 292 .elseif ((i & 7) == 7)
294 vpaddd K_XMM(K_BASE), WY, WY_TMP 293 vpaddd K_XMM + K_XMM_AR(%rip), WY, WY_TMP
295 vmovdqu WY_TMP, PRECALC_WK(i&~7) 294 vmovdqu WY_TMP, PRECALC_WK(i&~7)
296 295
297 PRECALC_ROTATE_WY 296 PRECALC_ROTATE_WY
@@ -446,6 +445,16 @@
446 445
447.endm 446.endm
448 447
448/* Add constant only if (%2 > %3) condition met (uses RTA as temp)
449 * %1 + %2 >= %3 ? %4 : 0
450 */
451.macro ADD_IF_GE a, b, c, d
452 mov \a, RTA
453 add $\d, RTA
454 cmp $\c, \b
455 cmovge RTA, \a
456.endm
457
449/* 458/*
450 * macro implements 80 rounds of SHA-1, for multiple blocks with s/w pipelining 459 * macro implements 80 rounds of SHA-1, for multiple blocks with s/w pipelining
451 */ 460 */
@@ -463,13 +472,16 @@
463 lea (2*4*80+32)(%rsp), WK_BUF 472 lea (2*4*80+32)(%rsp), WK_BUF
464 473
465 # Precalc WK for first 2 blocks 474 # Precalc WK for first 2 blocks
466 PRECALC_OFFSET = 0 475 ADD_IF_GE BUFFER_PTR2, BLOCKS_CTR, 2, 64
467 .set i, 0 476 .set i, 0
468 .rept 160 477 .rept 160
469 PRECALC i 478 PRECALC i
470 .set i, i + 1 479 .set i, i + 1
471 .endr 480 .endr
472 PRECALC_OFFSET = 128 481
482 /* Go to next block if needed */
483 ADD_IF_GE BUFFER_PTR, BLOCKS_CTR, 3, 128
484 ADD_IF_GE BUFFER_PTR2, BLOCKS_CTR, 4, 128
473 xchg WK_BUF, PRECALC_BUF 485 xchg WK_BUF, PRECALC_BUF
474 486
475 .align 32 487 .align 32
@@ -479,8 +491,8 @@ _loop:
479 * we use K_BASE value as a signal of a last block, 491 * we use K_BASE value as a signal of a last block,
480 * it is set below by: cmovae BUFFER_PTR, K_BASE 492 * it is set below by: cmovae BUFFER_PTR, K_BASE
481 */ 493 */
482 cmp K_BASE, BUFFER_PTR 494 test BLOCKS_CTR, BLOCKS_CTR
483 jne _begin 495 jnz _begin
484 .align 32 496 .align 32
485 jmp _end 497 jmp _end
486 .align 32 498 .align 32
@@ -512,10 +524,10 @@ _loop0:
512 .set j, j+2 524 .set j, j+2
513 .endr 525 .endr
514 526
515 add $(2*64), BUFFER_PTR /* move to next odd-64-byte block */ 527 /* Update Counter */
516 cmp BUFFER_END, BUFFER_PTR /* is current block the last one? */ 528 sub $1, BLOCKS_CTR
517 cmovae K_BASE, BUFFER_PTR /* signal the last iteration smartly */ 529 /* Move to the next block only if needed*/
518 530 ADD_IF_GE BUFFER_PTR, BLOCKS_CTR, 4, 128
519 /* 531 /*
520 * rounds 532 * rounds
521 * 60,62,64,66,68 533 * 60,62,64,66,68
@@ -532,8 +544,8 @@ _loop0:
532 UPDATE_HASH 12(HASH_PTR), D 544 UPDATE_HASH 12(HASH_PTR), D
533 UPDATE_HASH 16(HASH_PTR), E 545 UPDATE_HASH 16(HASH_PTR), E
534 546
535 cmp K_BASE, BUFFER_PTR /* is current block the last one? */ 547 test BLOCKS_CTR, BLOCKS_CTR
536 je _loop 548 jz _loop
537 549
538 mov TB, B 550 mov TB, B
539 551
@@ -575,10 +587,10 @@ _loop2:
575 .set j, j+2 587 .set j, j+2
576 .endr 588 .endr
577 589
578 add $(2*64), BUFFER_PTR2 /* move to next even-64-byte block */ 590 /* update counter */
579 591 sub $1, BLOCKS_CTR
580 cmp BUFFER_END, BUFFER_PTR2 /* is current block the last one */ 592 /* Move to the next block only if needed*/
581 cmovae K_BASE, BUFFER_PTR /* signal the last iteration smartly */ 593 ADD_IF_GE BUFFER_PTR2, BLOCKS_CTR, 4, 128
582 594
583 jmp _loop3 595 jmp _loop3
584_loop3: 596_loop3:
@@ -641,19 +653,12 @@ _loop3:
641 653
642 avx2_zeroupper 654 avx2_zeroupper
643 655
644 lea K_XMM_AR(%rip), K_BASE 656 /* Setup initial values */
645
646 mov CTX, HASH_PTR 657 mov CTX, HASH_PTR
647 mov BUF, BUFFER_PTR 658 mov BUF, BUFFER_PTR
648 lea 64(BUF), BUFFER_PTR2
649
650 shl $6, CNT /* mul by 64 */
651 add BUF, CNT
652 add $64, CNT
653 mov CNT, BUFFER_END
654 659
655 cmp BUFFER_END, BUFFER_PTR2 660 mov BUF, BUFFER_PTR2
656 cmovae K_BASE, BUFFER_PTR2 661 mov CNT, BLOCKS_CTR
657 662
658 xmm_mov BSWAP_SHUFB_CTL(%rip), YMM_SHUFB_BSWAP 663 xmm_mov BSWAP_SHUFB_CTL(%rip), YMM_SHUFB_BSWAP
659 664
diff --git a/arch/x86/crypto/sha1_ssse3_glue.c b/arch/x86/crypto/sha1_ssse3_glue.c
index f960a043cdeb..fc61739150e7 100644
--- a/arch/x86/crypto/sha1_ssse3_glue.c
+++ b/arch/x86/crypto/sha1_ssse3_glue.c
@@ -201,7 +201,7 @@ asmlinkage void sha1_transform_avx2(u32 *digest, const char *data,
201 201
202static bool avx2_usable(void) 202static bool avx2_usable(void)
203{ 203{
204 if (false && avx_usable() && boot_cpu_has(X86_FEATURE_AVX2) 204 if (avx_usable() && boot_cpu_has(X86_FEATURE_AVX2)
205 && boot_cpu_has(X86_FEATURE_BMI1) 205 && boot_cpu_has(X86_FEATURE_BMI1)
206 && boot_cpu_has(X86_FEATURE_BMI2)) 206 && boot_cpu_has(X86_FEATURE_BMI2))
207 return true; 207 return true;
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index d271fb79248f..6d078b89a5e8 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -1211,6 +1211,8 @@ ENTRY(nmi)
1211 * other IST entries. 1211 * other IST entries.
1212 */ 1212 */
1213 1213
1214 ASM_CLAC
1215
1214 /* Use %rdx as our temp variable throughout */ 1216 /* Use %rdx as our temp variable throughout */
1215 pushq %rdx 1217 pushq %rdx
1216 1218
diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c
index 8e3db8f642a7..af12e294caed 100644
--- a/arch/x86/events/core.c
+++ b/arch/x86/events/core.c
@@ -2114,7 +2114,7 @@ static void refresh_pce(void *ignored)
2114 load_mm_cr4(this_cpu_read(cpu_tlbstate.loaded_mm)); 2114 load_mm_cr4(this_cpu_read(cpu_tlbstate.loaded_mm));
2115} 2115}
2116 2116
2117static void x86_pmu_event_mapped(struct perf_event *event) 2117static void x86_pmu_event_mapped(struct perf_event *event, struct mm_struct *mm)
2118{ 2118{
2119 if (!(event->hw.flags & PERF_X86_EVENT_RDPMC_ALLOWED)) 2119 if (!(event->hw.flags & PERF_X86_EVENT_RDPMC_ALLOWED))
2120 return; 2120 return;
@@ -2129,22 +2129,20 @@ static void x86_pmu_event_mapped(struct perf_event *event)
2129 * For now, this can't happen because all callers hold mmap_sem 2129 * For now, this can't happen because all callers hold mmap_sem
2130 * for write. If this changes, we'll need a different solution. 2130 * for write. If this changes, we'll need a different solution.
2131 */ 2131 */
2132 lockdep_assert_held_exclusive(&current->mm->mmap_sem); 2132 lockdep_assert_held_exclusive(&mm->mmap_sem);
2133 2133
2134 if (atomic_inc_return(&current->mm->context.perf_rdpmc_allowed) == 1) 2134 if (atomic_inc_return(&mm->context.perf_rdpmc_allowed) == 1)
2135 on_each_cpu_mask(mm_cpumask(current->mm), refresh_pce, NULL, 1); 2135 on_each_cpu_mask(mm_cpumask(mm), refresh_pce, NULL, 1);
2136} 2136}
2137 2137
2138static void x86_pmu_event_unmapped(struct perf_event *event) 2138static void x86_pmu_event_unmapped(struct perf_event *event, struct mm_struct *mm)
2139{ 2139{
2140 if (!current->mm)
2141 return;
2142 2140
2143 if (!(event->hw.flags & PERF_X86_EVENT_RDPMC_ALLOWED)) 2141 if (!(event->hw.flags & PERF_X86_EVENT_RDPMC_ALLOWED))
2144 return; 2142 return;
2145 2143
2146 if (atomic_dec_and_test(&current->mm->context.perf_rdpmc_allowed)) 2144 if (atomic_dec_and_test(&mm->context.perf_rdpmc_allowed))
2147 on_each_cpu_mask(mm_cpumask(current->mm), refresh_pce, NULL, 1); 2145 on_each_cpu_mask(mm_cpumask(mm), refresh_pce, NULL, 1);
2148} 2146}
2149 2147
2150static int x86_pmu_event_idx(struct perf_event *event) 2148static int x86_pmu_event_idx(struct perf_event *event)
diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c
index 8ae8c5ce3a1f..ddd8d3516bfc 100644
--- a/arch/x86/events/intel/bts.c
+++ b/arch/x86/events/intel/bts.c
@@ -69,7 +69,7 @@ struct bts_buffer {
69 struct bts_phys buf[0]; 69 struct bts_phys buf[0];
70}; 70};
71 71
72struct pmu bts_pmu; 72static struct pmu bts_pmu;
73 73
74static size_t buf_size(struct page *page) 74static size_t buf_size(struct page *page)
75{ 75{
diff --git a/arch/x86/events/intel/p4.c b/arch/x86/events/intel/p4.c
index eb0533558c2b..d32c0eed38ca 100644
--- a/arch/x86/events/intel/p4.c
+++ b/arch/x86/events/intel/p4.c
@@ -587,7 +587,7 @@ static __initconst const u64 p4_hw_cache_event_ids
587 * P4_CONFIG_ALIASABLE or bits for P4_PEBS_METRIC, they are 587 * P4_CONFIG_ALIASABLE or bits for P4_PEBS_METRIC, they are
588 * either up to date automatically or not applicable at all. 588 * either up to date automatically or not applicable at all.
589 */ 589 */
590struct p4_event_alias { 590static struct p4_event_alias {
591 u64 original; 591 u64 original;
592 u64 alternative; 592 u64 alternative;
593} p4_event_aliases[] = { 593} p4_event_aliases[] = {
diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c
index a45e2114a846..8e2457cb6b4a 100644
--- a/arch/x86/events/intel/rapl.c
+++ b/arch/x86/events/intel/rapl.c
@@ -559,7 +559,7 @@ static struct attribute_group rapl_pmu_format_group = {
559 .attrs = rapl_formats_attr, 559 .attrs = rapl_formats_attr,
560}; 560};
561 561
562const struct attribute_group *rapl_attr_groups[] = { 562static const struct attribute_group *rapl_attr_groups[] = {
563 &rapl_pmu_attr_group, 563 &rapl_pmu_attr_group,
564 &rapl_pmu_format_group, 564 &rapl_pmu_format_group,
565 &rapl_pmu_events_group, 565 &rapl_pmu_events_group,
diff --git a/arch/x86/events/intel/uncore.c b/arch/x86/events/intel/uncore.c
index 44ec523287f6..1c5390f1cf09 100644
--- a/arch/x86/events/intel/uncore.c
+++ b/arch/x86/events/intel/uncore.c
@@ -721,7 +721,7 @@ static struct attribute *uncore_pmu_attrs[] = {
721 NULL, 721 NULL,
722}; 722};
723 723
724static struct attribute_group uncore_pmu_attr_group = { 724static const struct attribute_group uncore_pmu_attr_group = {
725 .attrs = uncore_pmu_attrs, 725 .attrs = uncore_pmu_attrs,
726}; 726};
727 727
diff --git a/arch/x86/events/intel/uncore_nhmex.c b/arch/x86/events/intel/uncore_nhmex.c
index cda569332005..6a5cbe90f859 100644
--- a/arch/x86/events/intel/uncore_nhmex.c
+++ b/arch/x86/events/intel/uncore_nhmex.c
@@ -272,7 +272,7 @@ static struct attribute *nhmex_uncore_ubox_formats_attr[] = {
272 NULL, 272 NULL,
273}; 273};
274 274
275static struct attribute_group nhmex_uncore_ubox_format_group = { 275static const struct attribute_group nhmex_uncore_ubox_format_group = {
276 .name = "format", 276 .name = "format",
277 .attrs = nhmex_uncore_ubox_formats_attr, 277 .attrs = nhmex_uncore_ubox_formats_attr,
278}; 278};
@@ -299,7 +299,7 @@ static struct attribute *nhmex_uncore_cbox_formats_attr[] = {
299 NULL, 299 NULL,
300}; 300};
301 301
302static struct attribute_group nhmex_uncore_cbox_format_group = { 302static const struct attribute_group nhmex_uncore_cbox_format_group = {
303 .name = "format", 303 .name = "format",
304 .attrs = nhmex_uncore_cbox_formats_attr, 304 .attrs = nhmex_uncore_cbox_formats_attr,
305}; 305};
@@ -407,7 +407,7 @@ static struct attribute *nhmex_uncore_bbox_formats_attr[] = {
407 NULL, 407 NULL,
408}; 408};
409 409
410static struct attribute_group nhmex_uncore_bbox_format_group = { 410static const struct attribute_group nhmex_uncore_bbox_format_group = {
411 .name = "format", 411 .name = "format",
412 .attrs = nhmex_uncore_bbox_formats_attr, 412 .attrs = nhmex_uncore_bbox_formats_attr,
413}; 413};
@@ -484,7 +484,7 @@ static struct attribute *nhmex_uncore_sbox_formats_attr[] = {
484 NULL, 484 NULL,
485}; 485};
486 486
487static struct attribute_group nhmex_uncore_sbox_format_group = { 487static const struct attribute_group nhmex_uncore_sbox_format_group = {
488 .name = "format", 488 .name = "format",
489 .attrs = nhmex_uncore_sbox_formats_attr, 489 .attrs = nhmex_uncore_sbox_formats_attr,
490}; 490};
@@ -898,7 +898,7 @@ static struct attribute *nhmex_uncore_mbox_formats_attr[] = {
898 NULL, 898 NULL,
899}; 899};
900 900
901static struct attribute_group nhmex_uncore_mbox_format_group = { 901static const struct attribute_group nhmex_uncore_mbox_format_group = {
902 .name = "format", 902 .name = "format",
903 .attrs = nhmex_uncore_mbox_formats_attr, 903 .attrs = nhmex_uncore_mbox_formats_attr,
904}; 904};
@@ -1163,7 +1163,7 @@ static struct attribute *nhmex_uncore_rbox_formats_attr[] = {
1163 NULL, 1163 NULL,
1164}; 1164};
1165 1165
1166static struct attribute_group nhmex_uncore_rbox_format_group = { 1166static const struct attribute_group nhmex_uncore_rbox_format_group = {
1167 .name = "format", 1167 .name = "format",
1168 .attrs = nhmex_uncore_rbox_formats_attr, 1168 .attrs = nhmex_uncore_rbox_formats_attr,
1169}; 1169};
diff --git a/arch/x86/events/intel/uncore_snb.c b/arch/x86/events/intel/uncore_snb.c
index a3dcc12bef4a..db1127ce685e 100644
--- a/arch/x86/events/intel/uncore_snb.c
+++ b/arch/x86/events/intel/uncore_snb.c
@@ -130,7 +130,7 @@ static struct attribute *snb_uncore_formats_attr[] = {
130 NULL, 130 NULL,
131}; 131};
132 132
133static struct attribute_group snb_uncore_format_group = { 133static const struct attribute_group snb_uncore_format_group = {
134 .name = "format", 134 .name = "format",
135 .attrs = snb_uncore_formats_attr, 135 .attrs = snb_uncore_formats_attr,
136}; 136};
@@ -289,7 +289,7 @@ static struct attribute *snb_uncore_imc_formats_attr[] = {
289 NULL, 289 NULL,
290}; 290};
291 291
292static struct attribute_group snb_uncore_imc_format_group = { 292static const struct attribute_group snb_uncore_imc_format_group = {
293 .name = "format", 293 .name = "format",
294 .attrs = snb_uncore_imc_formats_attr, 294 .attrs = snb_uncore_imc_formats_attr,
295}; 295};
@@ -769,7 +769,7 @@ static struct attribute *nhm_uncore_formats_attr[] = {
769 NULL, 769 NULL,
770}; 770};
771 771
772static struct attribute_group nhm_uncore_format_group = { 772static const struct attribute_group nhm_uncore_format_group = {
773 .name = "format", 773 .name = "format",
774 .attrs = nhm_uncore_formats_attr, 774 .attrs = nhm_uncore_formats_attr,
775}; 775};
diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
index 4f9127644b80..db1fe377e6dd 100644
--- a/arch/x86/events/intel/uncore_snbep.c
+++ b/arch/x86/events/intel/uncore_snbep.c
@@ -602,27 +602,27 @@ static struct uncore_event_desc snbep_uncore_qpi_events[] = {
602 { /* end: all zeroes */ }, 602 { /* end: all zeroes */ },
603}; 603};
604 604
605static struct attribute_group snbep_uncore_format_group = { 605static const struct attribute_group snbep_uncore_format_group = {
606 .name = "format", 606 .name = "format",
607 .attrs = snbep_uncore_formats_attr, 607 .attrs = snbep_uncore_formats_attr,
608}; 608};
609 609
610static struct attribute_group snbep_uncore_ubox_format_group = { 610static const struct attribute_group snbep_uncore_ubox_format_group = {
611 .name = "format", 611 .name = "format",
612 .attrs = snbep_uncore_ubox_formats_attr, 612 .attrs = snbep_uncore_ubox_formats_attr,
613}; 613};
614 614
615static struct attribute_group snbep_uncore_cbox_format_group = { 615static const struct attribute_group snbep_uncore_cbox_format_group = {
616 .name = "format", 616 .name = "format",
617 .attrs = snbep_uncore_cbox_formats_attr, 617 .attrs = snbep_uncore_cbox_formats_attr,
618}; 618};
619 619
620static struct attribute_group snbep_uncore_pcu_format_group = { 620static const struct attribute_group snbep_uncore_pcu_format_group = {
621 .name = "format", 621 .name = "format",
622 .attrs = snbep_uncore_pcu_formats_attr, 622 .attrs = snbep_uncore_pcu_formats_attr,
623}; 623};
624 624
625static struct attribute_group snbep_uncore_qpi_format_group = { 625static const struct attribute_group snbep_uncore_qpi_format_group = {
626 .name = "format", 626 .name = "format",
627 .attrs = snbep_uncore_qpi_formats_attr, 627 .attrs = snbep_uncore_qpi_formats_attr,
628}; 628};
@@ -1431,27 +1431,27 @@ static struct attribute *ivbep_uncore_qpi_formats_attr[] = {
1431 NULL, 1431 NULL,
1432}; 1432};
1433 1433
1434static struct attribute_group ivbep_uncore_format_group = { 1434static const struct attribute_group ivbep_uncore_format_group = {
1435 .name = "format", 1435 .name = "format",
1436 .attrs = ivbep_uncore_formats_attr, 1436 .attrs = ivbep_uncore_formats_attr,
1437}; 1437};
1438 1438
1439static struct attribute_group ivbep_uncore_ubox_format_group = { 1439static const struct attribute_group ivbep_uncore_ubox_format_group = {
1440 .name = "format", 1440 .name = "format",
1441 .attrs = ivbep_uncore_ubox_formats_attr, 1441 .attrs = ivbep_uncore_ubox_formats_attr,
1442}; 1442};
1443 1443
1444static struct attribute_group ivbep_uncore_cbox_format_group = { 1444static const struct attribute_group ivbep_uncore_cbox_format_group = {
1445 .name = "format", 1445 .name = "format",
1446 .attrs = ivbep_uncore_cbox_formats_attr, 1446 .attrs = ivbep_uncore_cbox_formats_attr,
1447}; 1447};
1448 1448
1449static struct attribute_group ivbep_uncore_pcu_format_group = { 1449static const struct attribute_group ivbep_uncore_pcu_format_group = {
1450 .name = "format", 1450 .name = "format",
1451 .attrs = ivbep_uncore_pcu_formats_attr, 1451 .attrs = ivbep_uncore_pcu_formats_attr,
1452}; 1452};
1453 1453
1454static struct attribute_group ivbep_uncore_qpi_format_group = { 1454static const struct attribute_group ivbep_uncore_qpi_format_group = {
1455 .name = "format", 1455 .name = "format",
1456 .attrs = ivbep_uncore_qpi_formats_attr, 1456 .attrs = ivbep_uncore_qpi_formats_attr,
1457}; 1457};
@@ -1887,7 +1887,7 @@ static struct attribute *knl_uncore_ubox_formats_attr[] = {
1887 NULL, 1887 NULL,
1888}; 1888};
1889 1889
1890static struct attribute_group knl_uncore_ubox_format_group = { 1890static const struct attribute_group knl_uncore_ubox_format_group = {
1891 .name = "format", 1891 .name = "format",
1892 .attrs = knl_uncore_ubox_formats_attr, 1892 .attrs = knl_uncore_ubox_formats_attr,
1893}; 1893};
@@ -1927,7 +1927,7 @@ static struct attribute *knl_uncore_cha_formats_attr[] = {
1927 NULL, 1927 NULL,
1928}; 1928};
1929 1929
1930static struct attribute_group knl_uncore_cha_format_group = { 1930static const struct attribute_group knl_uncore_cha_format_group = {
1931 .name = "format", 1931 .name = "format",
1932 .attrs = knl_uncore_cha_formats_attr, 1932 .attrs = knl_uncore_cha_formats_attr,
1933}; 1933};
@@ -2037,7 +2037,7 @@ static struct attribute *knl_uncore_pcu_formats_attr[] = {
2037 NULL, 2037 NULL,
2038}; 2038};
2039 2039
2040static struct attribute_group knl_uncore_pcu_format_group = { 2040static const struct attribute_group knl_uncore_pcu_format_group = {
2041 .name = "format", 2041 .name = "format",
2042 .attrs = knl_uncore_pcu_formats_attr, 2042 .attrs = knl_uncore_pcu_formats_attr,
2043}; 2043};
@@ -2187,7 +2187,7 @@ static struct attribute *knl_uncore_irp_formats_attr[] = {
2187 NULL, 2187 NULL,
2188}; 2188};
2189 2189
2190static struct attribute_group knl_uncore_irp_format_group = { 2190static const struct attribute_group knl_uncore_irp_format_group = {
2191 .name = "format", 2191 .name = "format",
2192 .attrs = knl_uncore_irp_formats_attr, 2192 .attrs = knl_uncore_irp_formats_attr,
2193}; 2193};
@@ -2385,7 +2385,7 @@ static struct attribute *hswep_uncore_ubox_formats_attr[] = {
2385 NULL, 2385 NULL,
2386}; 2386};
2387 2387
2388static struct attribute_group hswep_uncore_ubox_format_group = { 2388static const struct attribute_group hswep_uncore_ubox_format_group = {
2389 .name = "format", 2389 .name = "format",
2390 .attrs = hswep_uncore_ubox_formats_attr, 2390 .attrs = hswep_uncore_ubox_formats_attr,
2391}; 2391};
@@ -2439,7 +2439,7 @@ static struct attribute *hswep_uncore_cbox_formats_attr[] = {
2439 NULL, 2439 NULL,
2440}; 2440};
2441 2441
2442static struct attribute_group hswep_uncore_cbox_format_group = { 2442static const struct attribute_group hswep_uncore_cbox_format_group = {
2443 .name = "format", 2443 .name = "format",
2444 .attrs = hswep_uncore_cbox_formats_attr, 2444 .attrs = hswep_uncore_cbox_formats_attr,
2445}; 2445};
@@ -2621,7 +2621,7 @@ static struct attribute *hswep_uncore_sbox_formats_attr[] = {
2621 NULL, 2621 NULL,
2622}; 2622};
2623 2623
2624static struct attribute_group hswep_uncore_sbox_format_group = { 2624static const struct attribute_group hswep_uncore_sbox_format_group = {
2625 .name = "format", 2625 .name = "format",
2626 .attrs = hswep_uncore_sbox_formats_attr, 2626 .attrs = hswep_uncore_sbox_formats_attr,
2627}; 2627};
@@ -3314,7 +3314,7 @@ static struct attribute *skx_uncore_cha_formats_attr[] = {
3314 NULL, 3314 NULL,
3315}; 3315};
3316 3316
3317static struct attribute_group skx_uncore_chabox_format_group = { 3317static const struct attribute_group skx_uncore_chabox_format_group = {
3318 .name = "format", 3318 .name = "format",
3319 .attrs = skx_uncore_cha_formats_attr, 3319 .attrs = skx_uncore_cha_formats_attr,
3320}; 3320};
@@ -3427,7 +3427,7 @@ static struct attribute *skx_uncore_iio_formats_attr[] = {
3427 NULL, 3427 NULL,
3428}; 3428};
3429 3429
3430static struct attribute_group skx_uncore_iio_format_group = { 3430static const struct attribute_group skx_uncore_iio_format_group = {
3431 .name = "format", 3431 .name = "format",
3432 .attrs = skx_uncore_iio_formats_attr, 3432 .attrs = skx_uncore_iio_formats_attr,
3433}; 3433};
@@ -3484,7 +3484,7 @@ static struct attribute *skx_uncore_formats_attr[] = {
3484 NULL, 3484 NULL,
3485}; 3485};
3486 3486
3487static struct attribute_group skx_uncore_format_group = { 3487static const struct attribute_group skx_uncore_format_group = {
3488 .name = "format", 3488 .name = "format",
3489 .attrs = skx_uncore_formats_attr, 3489 .attrs = skx_uncore_formats_attr,
3490}; 3490};
@@ -3605,7 +3605,7 @@ static struct attribute *skx_upi_uncore_formats_attr[] = {
3605 NULL, 3605 NULL,
3606}; 3606};
3607 3607
3608static struct attribute_group skx_upi_uncore_format_group = { 3608static const struct attribute_group skx_upi_uncore_format_group = {
3609 .name = "format", 3609 .name = "format",
3610 .attrs = skx_upi_uncore_formats_attr, 3610 .attrs = skx_upi_uncore_formats_attr,
3611}; 3611};
diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufeatures.h
index ca3c48c0872f..5a28e8e55e36 100644
--- a/arch/x86/include/asm/cpufeatures.h
+++ b/arch/x86/include/asm/cpufeatures.h
@@ -286,7 +286,7 @@
286#define X86_FEATURE_PAUSEFILTER (15*32+10) /* filtered pause intercept */ 286#define X86_FEATURE_PAUSEFILTER (15*32+10) /* filtered pause intercept */
287#define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */ 287#define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */
288#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */ 288#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */
289#define X86_FEATURE_VIRTUAL_VMLOAD_VMSAVE (15*32+15) /* Virtual VMLOAD VMSAVE */ 289#define X86_FEATURE_V_VMSAVE_VMLOAD (15*32+15) /* Virtual VMSAVE VMLOAD */
290 290
291/* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */ 291/* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */
292#define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/ 292#define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
diff --git a/arch/x86/include/asm/elf.h b/arch/x86/include/asm/elf.h
index 1c18d83d3f09..9aeb91935ce0 100644
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -247,11 +247,11 @@ extern int force_personality32;
247 247
248/* 248/*
249 * This is the base location for PIE (ET_DYN with INTERP) loads. On 249 * This is the base location for PIE (ET_DYN with INTERP) loads. On
250 * 64-bit, this is raised to 4GB to leave the entire 32-bit address 250 * 64-bit, this is above 4GB to leave the entire 32-bit address
251 * space open for things that want to use the area for 32-bit pointers. 251 * space open for things that want to use the area for 32-bit pointers.
252 */ 252 */
253#define ELF_ET_DYN_BASE (mmap_is_ia32() ? 0x000400000UL : \ 253#define ELF_ET_DYN_BASE (mmap_is_ia32() ? 0x000400000UL : \
254 0x100000000UL) 254 (TASK_SIZE / 3 * 2))
255 255
256/* This yields a mask that user programs can use to figure out what 256/* This yields a mask that user programs can use to figure out what
257 instruction set this CPU supports. This could be done in user space, 257 instruction set this CPU supports. This could be done in user space,
diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h
index 255645f60ca2..554cdb205d17 100644
--- a/arch/x86/include/asm/fpu/internal.h
+++ b/arch/x86/include/asm/fpu/internal.h
@@ -450,10 +450,10 @@ static inline int copy_fpregs_to_fpstate(struct fpu *fpu)
450 return 0; 450 return 0;
451} 451}
452 452
453static inline void __copy_kernel_to_fpregs(union fpregs_state *fpstate) 453static inline void __copy_kernel_to_fpregs(union fpregs_state *fpstate, u64 mask)
454{ 454{
455 if (use_xsave()) { 455 if (use_xsave()) {
456 copy_kernel_to_xregs(&fpstate->xsave, -1); 456 copy_kernel_to_xregs(&fpstate->xsave, mask);
457 } else { 457 } else {
458 if (use_fxsr()) 458 if (use_fxsr())
459 copy_kernel_to_fxregs(&fpstate->fxsave); 459 copy_kernel_to_fxregs(&fpstate->fxsave);
@@ -477,7 +477,7 @@ static inline void copy_kernel_to_fpregs(union fpregs_state *fpstate)
477 : : [addr] "m" (fpstate)); 477 : : [addr] "m" (fpstate));
478 } 478 }
479 479
480 __copy_kernel_to_fpregs(fpstate); 480 __copy_kernel_to_fpregs(fpstate, -1);
481} 481}
482 482
483extern int copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int size); 483extern int copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int size);
diff --git a/arch/x86/include/asm/hypervisor.h b/arch/x86/include/asm/hypervisor.h
index 21126155a739..0ead9dbb9130 100644
--- a/arch/x86/include/asm/hypervisor.h
+++ b/arch/x86/include/asm/hypervisor.h
@@ -43,6 +43,9 @@ struct hypervisor_x86 {
43 43
44 /* pin current vcpu to specified physical cpu (run rarely) */ 44 /* pin current vcpu to specified physical cpu (run rarely) */
45 void (*pin_vcpu)(int); 45 void (*pin_vcpu)(int);
46
47 /* called during init_mem_mapping() to setup early mappings. */
48 void (*init_mem_mapping)(void);
46}; 49};
47 50
48extern const struct hypervisor_x86 *x86_hyper; 51extern const struct hypervisor_x86 *x86_hyper;
@@ -57,8 +60,15 @@ extern const struct hypervisor_x86 x86_hyper_kvm;
57extern void init_hypervisor_platform(void); 60extern void init_hypervisor_platform(void);
58extern bool hypervisor_x2apic_available(void); 61extern bool hypervisor_x2apic_available(void);
59extern void hypervisor_pin_vcpu(int cpu); 62extern void hypervisor_pin_vcpu(int cpu);
63
64static inline void hypervisor_init_mem_mapping(void)
65{
66 if (x86_hyper && x86_hyper->init_mem_mapping)
67 x86_hyper->init_mem_mapping();
68}
60#else 69#else
61static inline void init_hypervisor_platform(void) { } 70static inline void init_hypervisor_platform(void) { }
62static inline bool hypervisor_x2apic_available(void) { return false; } 71static inline bool hypervisor_x2apic_available(void) { return false; }
72static inline void hypervisor_init_mem_mapping(void) { }
63#endif /* CONFIG_HYPERVISOR_GUEST */ 73#endif /* CONFIG_HYPERVISOR_GUEST */
64#endif /* _ASM_X86_HYPERVISOR_H */ 74#endif /* _ASM_X86_HYPERVISOR_H */
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 87ac4fba6d8e..f4d120a3e22e 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -492,6 +492,7 @@ struct kvm_vcpu_arch {
492 unsigned long cr4; 492 unsigned long cr4;
493 unsigned long cr4_guest_owned_bits; 493 unsigned long cr4_guest_owned_bits;
494 unsigned long cr8; 494 unsigned long cr8;
495 u32 pkru;
495 u32 hflags; 496 u32 hflags;
496 u64 efer; 497 u64 efer;
497 u64 apic_base; 498 u64 apic_base;
diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h
index 265c907d7d4c..7a234be7e298 100644
--- a/arch/x86/include/asm/mmu_context.h
+++ b/arch/x86/include/asm/mmu_context.h
@@ -140,9 +140,7 @@ static inline int init_new_context(struct task_struct *tsk,
140 mm->context.execute_only_pkey = -1; 140 mm->context.execute_only_pkey = -1;
141 } 141 }
142 #endif 142 #endif
143 init_new_context_ldt(tsk, mm); 143 return init_new_context_ldt(tsk, mm);
144
145 return 0;
146} 144}
147static inline void destroy_context(struct mm_struct *mm) 145static inline void destroy_context(struct mm_struct *mm)
148{ 146{
diff --git a/arch/x86/kernel/cpu/aperfmperf.c b/arch/x86/kernel/cpu/aperfmperf.c
index d869c8671e36..0ee83321a313 100644
--- a/arch/x86/kernel/cpu/aperfmperf.c
+++ b/arch/x86/kernel/cpu/aperfmperf.c
@@ -8,20 +8,25 @@
8 * This file is licensed under GPLv2. 8 * This file is licensed under GPLv2.
9 */ 9 */
10 10
11#include <linux/jiffies.h> 11#include <linux/delay.h>
12#include <linux/ktime.h>
12#include <linux/math64.h> 13#include <linux/math64.h>
13#include <linux/percpu.h> 14#include <linux/percpu.h>
14#include <linux/smp.h> 15#include <linux/smp.h>
15 16
16struct aperfmperf_sample { 17struct aperfmperf_sample {
17 unsigned int khz; 18 unsigned int khz;
18 unsigned long jiffies; 19 ktime_t time;
19 u64 aperf; 20 u64 aperf;
20 u64 mperf; 21 u64 mperf;
21}; 22};
22 23
23static DEFINE_PER_CPU(struct aperfmperf_sample, samples); 24static DEFINE_PER_CPU(struct aperfmperf_sample, samples);
24 25
26#define APERFMPERF_CACHE_THRESHOLD_MS 10
27#define APERFMPERF_REFRESH_DELAY_MS 20
28#define APERFMPERF_STALE_THRESHOLD_MS 1000
29
25/* 30/*
26 * aperfmperf_snapshot_khz() 31 * aperfmperf_snapshot_khz()
27 * On the current CPU, snapshot APERF, MPERF, and jiffies 32 * On the current CPU, snapshot APERF, MPERF, and jiffies
@@ -33,13 +38,18 @@ static void aperfmperf_snapshot_khz(void *dummy)
33 u64 aperf, aperf_delta; 38 u64 aperf, aperf_delta;
34 u64 mperf, mperf_delta; 39 u64 mperf, mperf_delta;
35 struct aperfmperf_sample *s = this_cpu_ptr(&samples); 40 struct aperfmperf_sample *s = this_cpu_ptr(&samples);
41 ktime_t now = ktime_get();
42 s64 time_delta = ktime_ms_delta(now, s->time);
43 unsigned long flags;
36 44
37 /* Don't bother re-computing within 10 ms */ 45 /* Don't bother re-computing within the cache threshold time. */
38 if (time_before(jiffies, s->jiffies + HZ/100)) 46 if (time_delta < APERFMPERF_CACHE_THRESHOLD_MS)
39 return; 47 return;
40 48
49 local_irq_save(flags);
41 rdmsrl(MSR_IA32_APERF, aperf); 50 rdmsrl(MSR_IA32_APERF, aperf);
42 rdmsrl(MSR_IA32_MPERF, mperf); 51 rdmsrl(MSR_IA32_MPERF, mperf);
52 local_irq_restore(flags);
43 53
44 aperf_delta = aperf - s->aperf; 54 aperf_delta = aperf - s->aperf;
45 mperf_delta = mperf - s->mperf; 55 mperf_delta = mperf - s->mperf;
@@ -51,22 +61,21 @@ static void aperfmperf_snapshot_khz(void *dummy)
51 if (mperf_delta == 0) 61 if (mperf_delta == 0)
52 return; 62 return;
53 63
54 /* 64 s->time = now;
55 * if (cpu_khz * aperf_delta) fits into ULLONG_MAX, then
56 * khz = (cpu_khz * aperf_delta) / mperf_delta
57 */
58 if (div64_u64(ULLONG_MAX, cpu_khz) > aperf_delta)
59 s->khz = div64_u64((cpu_khz * aperf_delta), mperf_delta);
60 else /* khz = aperf_delta / (mperf_delta / cpu_khz) */
61 s->khz = div64_u64(aperf_delta,
62 div64_u64(mperf_delta, cpu_khz));
63 s->jiffies = jiffies;
64 s->aperf = aperf; 65 s->aperf = aperf;
65 s->mperf = mperf; 66 s->mperf = mperf;
67
68 /* If the previous iteration was too long ago, discard it. */
69 if (time_delta > APERFMPERF_STALE_THRESHOLD_MS)
70 s->khz = 0;
71 else
72 s->khz = div64_u64((cpu_khz * aperf_delta), mperf_delta);
66} 73}
67 74
68unsigned int arch_freq_get_on_cpu(int cpu) 75unsigned int arch_freq_get_on_cpu(int cpu)
69{ 76{
77 unsigned int khz;
78
70 if (!cpu_khz) 79 if (!cpu_khz)
71 return 0; 80 return 0;
72 81
@@ -74,6 +83,12 @@ unsigned int arch_freq_get_on_cpu(int cpu)
74 return 0; 83 return 0;
75 84
76 smp_call_function_single(cpu, aperfmperf_snapshot_khz, NULL, 1); 85 smp_call_function_single(cpu, aperfmperf_snapshot_khz, NULL, 1);
86 khz = per_cpu(samples.khz, cpu);
87 if (khz)
88 return khz;
89
90 msleep(APERFMPERF_REFRESH_DELAY_MS);
91 smp_call_function_single(cpu, aperfmperf_snapshot_khz, NULL, 1);
77 92
78 return per_cpu(samples.khz, cpu); 93 return per_cpu(samples.khz, cpu);
79} 94}
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index d7cc190ae457..f7370abd33c6 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -122,7 +122,7 @@ static struct attribute *thermal_throttle_attrs[] = {
122 NULL 122 NULL
123}; 123};
124 124
125static struct attribute_group thermal_attr_group = { 125static const struct attribute_group thermal_attr_group = {
126 .attrs = thermal_throttle_attrs, 126 .attrs = thermal_throttle_attrs,
127 .name = "thermal_throttle" 127 .name = "thermal_throttle"
128}; 128};
diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 9cb98ee103db..86e8f0b2537b 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -561,7 +561,7 @@ static struct attribute *mc_default_attrs[] = {
561 NULL 561 NULL
562}; 562};
563 563
564static struct attribute_group mc_attr_group = { 564static const struct attribute_group mc_attr_group = {
565 .attrs = mc_default_attrs, 565 .attrs = mc_default_attrs,
566 .name = "microcode", 566 .name = "microcode",
567}; 567};
@@ -707,7 +707,7 @@ static struct attribute *cpu_root_microcode_attrs[] = {
707 NULL 707 NULL
708}; 708};
709 709
710static struct attribute_group cpu_root_microcode_group = { 710static const struct attribute_group cpu_root_microcode_group = {
711 .name = "microcode", 711 .name = "microcode",
712 .attrs = cpu_root_microcode_attrs, 712 .attrs = cpu_root_microcode_attrs,
713}; 713};
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index c5bb63be4ba1..40d5a8a75212 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -237,6 +237,18 @@ set_mtrr(unsigned int reg, unsigned long base, unsigned long size, mtrr_type typ
237 stop_machine(mtrr_rendezvous_handler, &data, cpu_online_mask); 237 stop_machine(mtrr_rendezvous_handler, &data, cpu_online_mask);
238} 238}
239 239
240static void set_mtrr_cpuslocked(unsigned int reg, unsigned long base,
241 unsigned long size, mtrr_type type)
242{
243 struct set_mtrr_data data = { .smp_reg = reg,
244 .smp_base = base,
245 .smp_size = size,
246 .smp_type = type
247 };
248
249 stop_machine_cpuslocked(mtrr_rendezvous_handler, &data, cpu_online_mask);
250}
251
240static void set_mtrr_from_inactive_cpu(unsigned int reg, unsigned long base, 252static void set_mtrr_from_inactive_cpu(unsigned int reg, unsigned long base,
241 unsigned long size, mtrr_type type) 253 unsigned long size, mtrr_type type)
242{ 254{
@@ -370,7 +382,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
370 /* Search for an empty MTRR */ 382 /* Search for an empty MTRR */
371 i = mtrr_if->get_free_region(base, size, replace); 383 i = mtrr_if->get_free_region(base, size, replace);
372 if (i >= 0) { 384 if (i >= 0) {
373 set_mtrr(i, base, size, type); 385 set_mtrr_cpuslocked(i, base, size, type);
374 if (likely(replace < 0)) { 386 if (likely(replace < 0)) {
375 mtrr_usage_table[i] = 1; 387 mtrr_usage_table[i] = 1;
376 } else { 388 } else {
@@ -378,7 +390,7 @@ int mtrr_add_page(unsigned long base, unsigned long size,
378 if (increment) 390 if (increment)
379 mtrr_usage_table[i]++; 391 mtrr_usage_table[i]++;
380 if (unlikely(replace != i)) { 392 if (unlikely(replace != i)) {
381 set_mtrr(replace, 0, 0, 0); 393 set_mtrr_cpuslocked(replace, 0, 0, 0);
382 mtrr_usage_table[replace] = 0; 394 mtrr_usage_table[replace] = 0;
383 } 395 }
384 } 396 }
@@ -506,7 +518,7 @@ int mtrr_del_page(int reg, unsigned long base, unsigned long size)
506 goto out; 518 goto out;
507 } 519 }
508 if (--mtrr_usage_table[reg] < 1) 520 if (--mtrr_usage_table[reg] < 1)
509 set_mtrr(reg, 0, 0, 0); 521 set_mtrr_cpuslocked(reg, 0, 0, 0);
510 error = reg; 522 error = reg;
511 out: 523 out:
512 mutex_unlock(&mtrr_mutex); 524 mutex_unlock(&mtrr_mutex);
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index 46c3c73e7f43..9ba79543d9ee 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -53,6 +53,7 @@ void __head __startup_64(unsigned long physaddr)
53 pudval_t *pud; 53 pudval_t *pud;
54 pmdval_t *pmd, pmd_entry; 54 pmdval_t *pmd, pmd_entry;
55 int i; 55 int i;
56 unsigned int *next_pgt_ptr;
56 57
57 /* Is the address too large? */ 58 /* Is the address too large? */
58 if (physaddr >> MAX_PHYSMEM_BITS) 59 if (physaddr >> MAX_PHYSMEM_BITS)
@@ -91,9 +92,9 @@ void __head __startup_64(unsigned long physaddr)
91 * creates a bunch of nonsense entries but that is fine -- 92 * creates a bunch of nonsense entries but that is fine --
92 * it avoids problems around wraparound. 93 * it avoids problems around wraparound.
93 */ 94 */
94 95 next_pgt_ptr = fixup_pointer(&next_early_pgt, physaddr);
95 pud = fixup_pointer(early_dynamic_pgts[next_early_pgt++], physaddr); 96 pud = fixup_pointer(early_dynamic_pgts[(*next_pgt_ptr)++], physaddr);
96 pmd = fixup_pointer(early_dynamic_pgts[next_early_pgt++], physaddr); 97 pmd = fixup_pointer(early_dynamic_pgts[(*next_pgt_ptr)++], physaddr);
97 98
98 if (IS_ENABLED(CONFIG_X86_5LEVEL)) { 99 if (IS_ENABLED(CONFIG_X86_5LEVEL)) {
99 p4d = fixup_pointer(early_dynamic_pgts[next_early_pgt++], physaddr); 100 p4d = fixup_pointer(early_dynamic_pgts[next_early_pgt++], physaddr);
diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 16f82a3aaec7..8ce4212e2b8d 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -345,21 +345,10 @@ static int hpet_shutdown(struct clock_event_device *evt, int timer)
345 return 0; 345 return 0;
346} 346}
347 347
348static int hpet_resume(struct clock_event_device *evt, int timer) 348static int hpet_resume(struct clock_event_device *evt)
349{ 349{
350 if (!timer) { 350 hpet_enable_legacy_int();
351 hpet_enable_legacy_int();
352 } else {
353 struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt);
354
355 irq_domain_deactivate_irq(irq_get_irq_data(hdev->irq));
356 irq_domain_activate_irq(irq_get_irq_data(hdev->irq));
357 disable_hardirq(hdev->irq);
358 irq_set_affinity(hdev->irq, cpumask_of(hdev->cpu));
359 enable_irq(hdev->irq);
360 }
361 hpet_print_config(); 351 hpet_print_config();
362
363 return 0; 352 return 0;
364} 353}
365 354
@@ -417,7 +406,7 @@ static int hpet_legacy_set_periodic(struct clock_event_device *evt)
417 406
418static int hpet_legacy_resume(struct clock_event_device *evt) 407static int hpet_legacy_resume(struct clock_event_device *evt)
419{ 408{
420 return hpet_resume(evt, 0); 409 return hpet_resume(evt);
421} 410}
422 411
423static int hpet_legacy_next_event(unsigned long delta, 412static int hpet_legacy_next_event(unsigned long delta,
@@ -510,8 +499,14 @@ static int hpet_msi_set_periodic(struct clock_event_device *evt)
510static int hpet_msi_resume(struct clock_event_device *evt) 499static int hpet_msi_resume(struct clock_event_device *evt)
511{ 500{
512 struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt); 501 struct hpet_dev *hdev = EVT_TO_HPET_DEV(evt);
502 struct irq_data *data = irq_get_irq_data(hdev->irq);
503 struct msi_msg msg;
513 504
514 return hpet_resume(evt, hdev->num); 505 /* Restore the MSI msg and unmask the interrupt */
506 irq_chip_compose_msi_msg(data, &msg);
507 hpet_msi_write(hdev, &msg);
508 hpet_msi_unmask(data);
509 return 0;
515} 510}
516 511
517static int hpet_msi_next_event(unsigned long delta, 512static int hpet_msi_next_event(unsigned long delta,
diff --git a/arch/x86/kernel/ksysfs.c b/arch/x86/kernel/ksysfs.c
index 4afc67f5facc..06e1ff5562c0 100644
--- a/arch/x86/kernel/ksysfs.c
+++ b/arch/x86/kernel/ksysfs.c
@@ -55,7 +55,7 @@ static struct bin_attribute *boot_params_data_attrs[] = {
55 NULL, 55 NULL,
56}; 56};
57 57
58static struct attribute_group boot_params_attr_group = { 58static const struct attribute_group boot_params_attr_group = {
59 .attrs = boot_params_version_attrs, 59 .attrs = boot_params_version_attrs,
60 .bin_attrs = boot_params_data_attrs, 60 .bin_attrs = boot_params_data_attrs,
61}; 61};
@@ -202,7 +202,7 @@ static struct bin_attribute *setup_data_data_attrs[] = {
202 NULL, 202 NULL,
203}; 203};
204 204
205static struct attribute_group setup_data_attr_group = { 205static const struct attribute_group setup_data_attr_group = {
206 .attrs = setup_data_type_attrs, 206 .attrs = setup_data_type_attrs,
207 .bin_attrs = setup_data_data_attrs, 207 .bin_attrs = setup_data_data_attrs,
208}; 208};
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 71c17a5be983..d04e30e3c0ff 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -151,6 +151,8 @@ void kvm_async_pf_task_wait(u32 token)
151 if (hlist_unhashed(&n.link)) 151 if (hlist_unhashed(&n.link))
152 break; 152 break;
153 153
154 rcu_irq_exit();
155
154 if (!n.halted) { 156 if (!n.halted) {
155 local_irq_enable(); 157 local_irq_enable();
156 schedule(); 158 schedule();
@@ -159,11 +161,11 @@ void kvm_async_pf_task_wait(u32 token)
159 /* 161 /*
160 * We cannot reschedule. So halt. 162 * We cannot reschedule. So halt.
161 */ 163 */
162 rcu_irq_exit();
163 native_safe_halt(); 164 native_safe_halt();
164 local_irq_disable(); 165 local_irq_disable();
165 rcu_irq_enter();
166 } 166 }
167
168 rcu_irq_enter();
167 } 169 }
168 if (!n.halted) 170 if (!n.halted)
169 finish_swait(&n.wq, &wait); 171 finish_swait(&n.wq, &wait);
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index b474c8de7fba..54b9e89d4d6b 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -971,7 +971,8 @@ void common_cpu_up(unsigned int cpu, struct task_struct *idle)
971 * Returns zero if CPU booted OK, else error code from 971 * Returns zero if CPU booted OK, else error code from
972 * ->wakeup_secondary_cpu. 972 * ->wakeup_secondary_cpu.
973 */ 973 */
974static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle) 974static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle,
975 int *cpu0_nmi_registered)
975{ 976{
976 volatile u32 *trampoline_status = 977 volatile u32 *trampoline_status =
977 (volatile u32 *) __va(real_mode_header->trampoline_status); 978 (volatile u32 *) __va(real_mode_header->trampoline_status);
@@ -979,7 +980,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
979 unsigned long start_ip = real_mode_header->trampoline_start; 980 unsigned long start_ip = real_mode_header->trampoline_start;
980 981
981 unsigned long boot_error = 0; 982 unsigned long boot_error = 0;
982 int cpu0_nmi_registered = 0;
983 unsigned long timeout; 983 unsigned long timeout;
984 984
985 idle->thread.sp = (unsigned long)task_pt_regs(idle); 985 idle->thread.sp = (unsigned long)task_pt_regs(idle);
@@ -1035,7 +1035,7 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
1035 boot_error = apic->wakeup_secondary_cpu(apicid, start_ip); 1035 boot_error = apic->wakeup_secondary_cpu(apicid, start_ip);
1036 else 1036 else
1037 boot_error = wakeup_cpu_via_init_nmi(cpu, start_ip, apicid, 1037 boot_error = wakeup_cpu_via_init_nmi(cpu, start_ip, apicid,
1038 &cpu0_nmi_registered); 1038 cpu0_nmi_registered);
1039 1039
1040 if (!boot_error) { 1040 if (!boot_error) {
1041 /* 1041 /*
@@ -1080,12 +1080,6 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
1080 */ 1080 */
1081 smpboot_restore_warm_reset_vector(); 1081 smpboot_restore_warm_reset_vector();
1082 } 1082 }
1083 /*
1084 * Clean up the nmi handler. Do this after the callin and callout sync
1085 * to avoid impact of possible long unregister time.
1086 */
1087 if (cpu0_nmi_registered)
1088 unregister_nmi_handler(NMI_LOCAL, "wake_cpu0");
1089 1083
1090 return boot_error; 1084 return boot_error;
1091} 1085}
@@ -1093,8 +1087,9 @@ static int do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
1093int native_cpu_up(unsigned int cpu, struct task_struct *tidle) 1087int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
1094{ 1088{
1095 int apicid = apic->cpu_present_to_apicid(cpu); 1089 int apicid = apic->cpu_present_to_apicid(cpu);
1090 int cpu0_nmi_registered = 0;
1096 unsigned long flags; 1091 unsigned long flags;
1097 int err; 1092 int err, ret = 0;
1098 1093
1099 WARN_ON(irqs_disabled()); 1094 WARN_ON(irqs_disabled());
1100 1095
@@ -1131,10 +1126,11 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
1131 1126
1132 common_cpu_up(cpu, tidle); 1127 common_cpu_up(cpu, tidle);
1133 1128
1134 err = do_boot_cpu(apicid, cpu, tidle); 1129 err = do_boot_cpu(apicid, cpu, tidle, &cpu0_nmi_registered);
1135 if (err) { 1130 if (err) {
1136 pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu); 1131 pr_err("do_boot_cpu failed(%d) to wakeup CPU#%u\n", err, cpu);
1137 return -EIO; 1132 ret = -EIO;
1133 goto unreg_nmi;
1138 } 1134 }
1139 1135
1140 /* 1136 /*
@@ -1150,7 +1146,15 @@ int native_cpu_up(unsigned int cpu, struct task_struct *tidle)
1150 touch_nmi_watchdog(); 1146 touch_nmi_watchdog();
1151 } 1147 }
1152 1148
1153 return 0; 1149unreg_nmi:
1150 /*
1151 * Clean up the nmi handler. Do this after the callin and callout sync
1152 * to avoid impact of possible long unregister time.
1153 */
1154 if (cpu0_nmi_registered)
1155 unregister_nmi_handler(NMI_LOCAL, "wake_cpu0");
1156
1157 return ret;
1154} 1158}
1155 1159
1156/** 1160/**
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index 59ca2eea522c..19adbb418443 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -469,7 +469,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
469 entry->ecx &= kvm_cpuid_7_0_ecx_x86_features; 469 entry->ecx &= kvm_cpuid_7_0_ecx_x86_features;
470 cpuid_mask(&entry->ecx, CPUID_7_ECX); 470 cpuid_mask(&entry->ecx, CPUID_7_ECX);
471 /* PKU is not yet implemented for shadow paging. */ 471 /* PKU is not yet implemented for shadow paging. */
472 if (!tdp_enabled) 472 if (!tdp_enabled || !boot_cpu_has(X86_FEATURE_OSPKE))
473 entry->ecx &= ~F(PKU); 473 entry->ecx &= ~F(PKU);
474 entry->edx &= kvm_cpuid_7_0_edx_x86_features; 474 entry->edx &= kvm_cpuid_7_0_edx_x86_features;
475 entry->edx &= get_scattered_cpuid_leaf(7, 0, CPUID_EDX); 475 entry->edx &= get_scattered_cpuid_leaf(7, 0, CPUID_EDX);
diff --git a/arch/x86/kvm/kvm_cache_regs.h b/arch/x86/kvm/kvm_cache_regs.h
index 762cdf2595f9..e1e89ee4af75 100644
--- a/arch/x86/kvm/kvm_cache_regs.h
+++ b/arch/x86/kvm/kvm_cache_regs.h
@@ -84,11 +84,6 @@ static inline u64 kvm_read_edx_eax(struct kvm_vcpu *vcpu)
84 | ((u64)(kvm_register_read(vcpu, VCPU_REGS_RDX) & -1u) << 32); 84 | ((u64)(kvm_register_read(vcpu, VCPU_REGS_RDX) & -1u) << 32);
85} 85}
86 86
87static inline u32 kvm_read_pkru(struct kvm_vcpu *vcpu)
88{
89 return kvm_x86_ops->get_pkru(vcpu);
90}
91
92static inline void enter_guest_mode(struct kvm_vcpu *vcpu) 87static inline void enter_guest_mode(struct kvm_vcpu *vcpu)
93{ 88{
94 vcpu->arch.hflags |= HF_GUEST_MASK; 89 vcpu->arch.hflags |= HF_GUEST_MASK;
diff --git a/arch/x86/kvm/mmu.h b/arch/x86/kvm/mmu.h
index d7d248a000dd..4b9a3ae6b725 100644
--- a/arch/x86/kvm/mmu.h
+++ b/arch/x86/kvm/mmu.h
@@ -185,7 +185,7 @@ static inline u8 permission_fault(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,
185 * index of the protection domain, so pte_pkey * 2 is 185 * index of the protection domain, so pte_pkey * 2 is
186 * is the index of the first bit for the domain. 186 * is the index of the first bit for the domain.
187 */ 187 */
188 pkru_bits = (kvm_read_pkru(vcpu) >> (pte_pkey * 2)) & 3; 188 pkru_bits = (vcpu->arch.pkru >> (pte_pkey * 2)) & 3;
189 189
190 /* clear present bit, replace PFEC.RSVD with ACC_USER_MASK. */ 190 /* clear present bit, replace PFEC.RSVD with ACC_USER_MASK. */
191 offset = (pfec & ~1) + 191 offset = (pfec & ~1) +
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 4d8141e533c3..af256b786a70 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1100,7 +1100,7 @@ static __init int svm_hardware_setup(void)
1100 1100
1101 if (vls) { 1101 if (vls) {
1102 if (!npt_enabled || 1102 if (!npt_enabled ||
1103 !boot_cpu_has(X86_FEATURE_VIRTUAL_VMLOAD_VMSAVE) || 1103 !boot_cpu_has(X86_FEATURE_V_VMSAVE_VMLOAD) ||
1104 !IS_ENABLED(CONFIG_X86_64)) { 1104 !IS_ENABLED(CONFIG_X86_64)) {
1105 vls = false; 1105 vls = false;
1106 } else { 1106 } else {
@@ -1777,11 +1777,6 @@ static void svm_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
1777 to_svm(vcpu)->vmcb->save.rflags = rflags; 1777 to_svm(vcpu)->vmcb->save.rflags = rflags;
1778} 1778}
1779 1779
1780static u32 svm_get_pkru(struct kvm_vcpu *vcpu)
1781{
1782 return 0;
1783}
1784
1785static void svm_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg) 1780static void svm_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg)
1786{ 1781{
1787 switch (reg) { 1782 switch (reg) {
@@ -2430,6 +2425,16 @@ static int nested_svm_check_exception(struct vcpu_svm *svm, unsigned nr,
2430 svm->vmcb->control.exit_code = SVM_EXIT_EXCP_BASE + nr; 2425 svm->vmcb->control.exit_code = SVM_EXIT_EXCP_BASE + nr;
2431 svm->vmcb->control.exit_code_hi = 0; 2426 svm->vmcb->control.exit_code_hi = 0;
2432 svm->vmcb->control.exit_info_1 = error_code; 2427 svm->vmcb->control.exit_info_1 = error_code;
2428
2429 /*
2430 * FIXME: we should not write CR2 when L1 intercepts an L2 #PF exception.
2431 * The fix is to add the ancillary datum (CR2 or DR6) to structs
2432 * kvm_queued_exception and kvm_vcpu_events, so that CR2 and DR6 can be
2433 * written only when inject_pending_event runs (DR6 would written here
2434 * too). This should be conditional on a new capability---if the
2435 * capability is disabled, kvm_multiple_exception would write the
2436 * ancillary information to CR2 or DR6, for backwards ABI-compatibility.
2437 */
2433 if (svm->vcpu.arch.exception.nested_apf) 2438 if (svm->vcpu.arch.exception.nested_apf)
2434 svm->vmcb->control.exit_info_2 = svm->vcpu.arch.apf.nested_apf_token; 2439 svm->vmcb->control.exit_info_2 = svm->vcpu.arch.apf.nested_apf_token;
2435 else 2440 else
@@ -5403,8 +5408,6 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
5403 .get_rflags = svm_get_rflags, 5408 .get_rflags = svm_get_rflags,
5404 .set_rflags = svm_set_rflags, 5409 .set_rflags = svm_set_rflags,
5405 5410
5406 .get_pkru = svm_get_pkru,
5407
5408 .tlb_flush = svm_flush_tlb, 5411 .tlb_flush = svm_flush_tlb,
5409 5412
5410 .run = svm_vcpu_run, 5413 .run = svm_vcpu_run,
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 39a6222bf968..c6ef2940119b 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -416,13 +416,10 @@ struct nested_vmx {
416 416
417 /* The guest-physical address of the current VMCS L1 keeps for L2 */ 417 /* The guest-physical address of the current VMCS L1 keeps for L2 */
418 gpa_t current_vmptr; 418 gpa_t current_vmptr;
419 /* The host-usable pointer to the above */
420 struct page *current_vmcs12_page;
421 struct vmcs12 *current_vmcs12;
422 /* 419 /*
423 * Cache of the guest's VMCS, existing outside of guest memory. 420 * Cache of the guest's VMCS, existing outside of guest memory.
424 * Loaded from guest memory during VMPTRLD. Flushed to guest 421 * Loaded from guest memory during VMPTRLD. Flushed to guest
425 * memory during VMXOFF, VMCLEAR, VMPTRLD. 422 * memory during VMCLEAR and VMPTRLD.
426 */ 423 */
427 struct vmcs12 *cached_vmcs12; 424 struct vmcs12 *cached_vmcs12;
428 /* 425 /*
@@ -639,8 +636,6 @@ struct vcpu_vmx {
639 636
640 u64 current_tsc_ratio; 637 u64 current_tsc_ratio;
641 638
642 bool guest_pkru_valid;
643 u32 guest_pkru;
644 u32 host_pkru; 639 u32 host_pkru;
645 640
646 /* 641 /*
@@ -927,6 +922,10 @@ static u32 vmx_segment_access_rights(struct kvm_segment *var);
927static void copy_vmcs12_to_shadow(struct vcpu_vmx *vmx); 922static void copy_vmcs12_to_shadow(struct vcpu_vmx *vmx);
928static void copy_shadow_to_vmcs12(struct vcpu_vmx *vmx); 923static void copy_shadow_to_vmcs12(struct vcpu_vmx *vmx);
929static int alloc_identity_pagetable(struct kvm *kvm); 924static int alloc_identity_pagetable(struct kvm *kvm);
925static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu);
926static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked);
927static bool nested_vmx_is_page_fault_vmexit(struct vmcs12 *vmcs12,
928 u16 error_code);
930 929
931static DEFINE_PER_CPU(struct vmcs *, vmxarea); 930static DEFINE_PER_CPU(struct vmcs *, vmxarea);
932static DEFINE_PER_CPU(struct vmcs *, current_vmcs); 931static DEFINE_PER_CPU(struct vmcs *, current_vmcs);
@@ -2382,11 +2381,6 @@ static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags)
2382 to_vmx(vcpu)->emulation_required = emulation_required(vcpu); 2381 to_vmx(vcpu)->emulation_required = emulation_required(vcpu);
2383} 2382}
2384 2383
2385static u32 vmx_get_pkru(struct kvm_vcpu *vcpu)
2386{
2387 return to_vmx(vcpu)->guest_pkru;
2388}
2389
2390static u32 vmx_get_interrupt_shadow(struct kvm_vcpu *vcpu) 2384static u32 vmx_get_interrupt_shadow(struct kvm_vcpu *vcpu)
2391{ 2385{
2392 u32 interruptibility = vmcs_read32(GUEST_INTERRUPTIBILITY_INFO); 2386 u32 interruptibility = vmcs_read32(GUEST_INTERRUPTIBILITY_INFO);
@@ -2428,6 +2422,30 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu)
2428 vmx_set_interrupt_shadow(vcpu, 0); 2422 vmx_set_interrupt_shadow(vcpu, 0);
2429} 2423}
2430 2424
2425static void nested_vmx_inject_exception_vmexit(struct kvm_vcpu *vcpu,
2426 unsigned long exit_qual)
2427{
2428 struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
2429 unsigned int nr = vcpu->arch.exception.nr;
2430 u32 intr_info = nr | INTR_INFO_VALID_MASK;
2431
2432 if (vcpu->arch.exception.has_error_code) {
2433 vmcs12->vm_exit_intr_error_code = vcpu->arch.exception.error_code;
2434 intr_info |= INTR_INFO_DELIVER_CODE_MASK;
2435 }
2436
2437 if (kvm_exception_is_soft(nr))
2438 intr_info |= INTR_TYPE_SOFT_EXCEPTION;
2439 else
2440 intr_info |= INTR_TYPE_HARD_EXCEPTION;
2441
2442 if (!(vmcs12->idt_vectoring_info_field & VECTORING_INFO_VALID_MASK) &&
2443 vmx_get_nmi_mask(vcpu))
2444 intr_info |= INTR_INFO_UNBLOCK_NMI;
2445
2446 nested_vmx_vmexit(vcpu, EXIT_REASON_EXCEPTION_NMI, intr_info, exit_qual);
2447}
2448
2431/* 2449/*
2432 * KVM wants to inject page-faults which it got to the guest. This function 2450 * KVM wants to inject page-faults which it got to the guest. This function
2433 * checks whether in a nested guest, we need to inject them to L1 or L2. 2451 * checks whether in a nested guest, we need to inject them to L1 or L2.
@@ -2437,23 +2455,38 @@ static int nested_vmx_check_exception(struct kvm_vcpu *vcpu)
2437 struct vmcs12 *vmcs12 = get_vmcs12(vcpu); 2455 struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
2438 unsigned int nr = vcpu->arch.exception.nr; 2456 unsigned int nr = vcpu->arch.exception.nr;
2439 2457
2440 if (!((vmcs12->exception_bitmap & (1u << nr)) || 2458 if (nr == PF_VECTOR) {
2441 (nr == PF_VECTOR && vcpu->arch.exception.nested_apf))) 2459 if (vcpu->arch.exception.nested_apf) {
2442 return 0; 2460 nested_vmx_inject_exception_vmexit(vcpu,
2461 vcpu->arch.apf.nested_apf_token);
2462 return 1;
2463 }
2464 /*
2465 * FIXME: we must not write CR2 when L1 intercepts an L2 #PF exception.
2466 * The fix is to add the ancillary datum (CR2 or DR6) to structs
2467 * kvm_queued_exception and kvm_vcpu_events, so that CR2 and DR6
2468 * can be written only when inject_pending_event runs. This should be
2469 * conditional on a new capability---if the capability is disabled,
2470 * kvm_multiple_exception would write the ancillary information to
2471 * CR2 or DR6, for backwards ABI-compatibility.
2472 */
2473 if (nested_vmx_is_page_fault_vmexit(vmcs12,
2474 vcpu->arch.exception.error_code)) {
2475 nested_vmx_inject_exception_vmexit(vcpu, vcpu->arch.cr2);
2476 return 1;
2477 }
2478 } else {
2479 unsigned long exit_qual = 0;
2480 if (nr == DB_VECTOR)
2481 exit_qual = vcpu->arch.dr6;
2443 2482
2444 if (vcpu->arch.exception.nested_apf) { 2483 if (vmcs12->exception_bitmap & (1u << nr)) {
2445 vmcs_write32(VM_EXIT_INTR_ERROR_CODE, vcpu->arch.exception.error_code); 2484 nested_vmx_inject_exception_vmexit(vcpu, exit_qual);
2446 nested_vmx_vmexit(vcpu, EXIT_REASON_EXCEPTION_NMI, 2485 return 1;
2447 PF_VECTOR | INTR_TYPE_HARD_EXCEPTION | 2486 }
2448 INTR_INFO_DELIVER_CODE_MASK | INTR_INFO_VALID_MASK,
2449 vcpu->arch.apf.nested_apf_token);
2450 return 1;
2451 } 2487 }
2452 2488
2453 nested_vmx_vmexit(vcpu, EXIT_REASON_EXCEPTION_NMI, 2489 return 0;
2454 vmcs_read32(VM_EXIT_INTR_INFO),
2455 vmcs_readl(EXIT_QUALIFICATION));
2456 return 1;
2457} 2490}
2458 2491
2459static void vmx_queue_exception(struct kvm_vcpu *vcpu) 2492static void vmx_queue_exception(struct kvm_vcpu *vcpu)
@@ -2667,7 +2700,7 @@ static void nested_vmx_setup_ctls_msrs(struct vcpu_vmx *vmx)
2667 * reason is that if one of these bits is necessary, it will appear 2700 * reason is that if one of these bits is necessary, it will appear
2668 * in vmcs01 and prepare_vmcs02, when it bitwise-or's the control 2701 * in vmcs01 and prepare_vmcs02, when it bitwise-or's the control
2669 * fields of vmcs01 and vmcs02, will turn these bits off - and 2702 * fields of vmcs01 and vmcs02, will turn these bits off - and
2670 * nested_vmx_exit_handled() will not pass related exits to L1. 2703 * nested_vmx_exit_reflected() will not pass related exits to L1.
2671 * These rules have exceptions below. 2704 * These rules have exceptions below.
2672 */ 2705 */
2673 2706
@@ -4955,6 +4988,28 @@ static bool vmx_get_enable_apicv(void)
4955 return enable_apicv; 4988 return enable_apicv;
4956} 4989}
4957 4990
4991static void nested_mark_vmcs12_pages_dirty(struct kvm_vcpu *vcpu)
4992{
4993 struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
4994 gfn_t gfn;
4995
4996 /*
4997 * Don't need to mark the APIC access page dirty; it is never
4998 * written to by the CPU during APIC virtualization.
4999 */
5000
5001 if (nested_cpu_has(vmcs12, CPU_BASED_TPR_SHADOW)) {
5002 gfn = vmcs12->virtual_apic_page_addr >> PAGE_SHIFT;
5003 kvm_vcpu_mark_page_dirty(vcpu, gfn);
5004 }
5005
5006 if (nested_cpu_has_posted_intr(vmcs12)) {
5007 gfn = vmcs12->posted_intr_desc_addr >> PAGE_SHIFT;
5008 kvm_vcpu_mark_page_dirty(vcpu, gfn);
5009 }
5010}
5011
5012
4958static void vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu) 5013static void vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
4959{ 5014{
4960 struct vcpu_vmx *vmx = to_vmx(vcpu); 5015 struct vcpu_vmx *vmx = to_vmx(vcpu);
@@ -4962,18 +5017,15 @@ static void vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
4962 void *vapic_page; 5017 void *vapic_page;
4963 u16 status; 5018 u16 status;
4964 5019
4965 if (vmx->nested.pi_desc && 5020 if (!vmx->nested.pi_desc || !vmx->nested.pi_pending)
4966 vmx->nested.pi_pending) { 5021 return;
4967 vmx->nested.pi_pending = false;
4968 if (!pi_test_and_clear_on(vmx->nested.pi_desc))
4969 return;
4970
4971 max_irr = find_last_bit(
4972 (unsigned long *)vmx->nested.pi_desc->pir, 256);
4973 5022
4974 if (max_irr == 256) 5023 vmx->nested.pi_pending = false;
4975 return; 5024 if (!pi_test_and_clear_on(vmx->nested.pi_desc))
5025 return;
4976 5026
5027 max_irr = find_last_bit((unsigned long *)vmx->nested.pi_desc->pir, 256);
5028 if (max_irr != 256) {
4977 vapic_page = kmap(vmx->nested.virtual_apic_page); 5029 vapic_page = kmap(vmx->nested.virtual_apic_page);
4978 __kvm_apic_update_irr(vmx->nested.pi_desc->pir, vapic_page); 5030 __kvm_apic_update_irr(vmx->nested.pi_desc->pir, vapic_page);
4979 kunmap(vmx->nested.virtual_apic_page); 5031 kunmap(vmx->nested.virtual_apic_page);
@@ -4985,6 +5037,8 @@ static void vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu)
4985 vmcs_write16(GUEST_INTR_STATUS, status); 5037 vmcs_write16(GUEST_INTR_STATUS, status);
4986 } 5038 }
4987 } 5039 }
5040
5041 nested_mark_vmcs12_pages_dirty(vcpu);
4988} 5042}
4989 5043
4990static inline bool kvm_vcpu_trigger_posted_interrupt(struct kvm_vcpu *vcpu, 5044static inline bool kvm_vcpu_trigger_posted_interrupt(struct kvm_vcpu *vcpu,
@@ -7134,34 +7188,32 @@ static int nested_vmx_check_permission(struct kvm_vcpu *vcpu)
7134 return 1; 7188 return 1;
7135} 7189}
7136 7190
7191static void vmx_disable_shadow_vmcs(struct vcpu_vmx *vmx)
7192{
7193 vmcs_clear_bits(SECONDARY_VM_EXEC_CONTROL, SECONDARY_EXEC_SHADOW_VMCS);
7194 vmcs_write64(VMCS_LINK_POINTER, -1ull);
7195}
7196
7137static inline void nested_release_vmcs12(struct vcpu_vmx *vmx) 7197static inline void nested_release_vmcs12(struct vcpu_vmx *vmx)
7138{ 7198{
7139 if (vmx->nested.current_vmptr == -1ull) 7199 if (vmx->nested.current_vmptr == -1ull)
7140 return; 7200 return;
7141 7201
7142 /* current_vmptr and current_vmcs12 are always set/reset together */
7143 if (WARN_ON(vmx->nested.current_vmcs12 == NULL))
7144 return;
7145
7146 if (enable_shadow_vmcs) { 7202 if (enable_shadow_vmcs) {
7147 /* copy to memory all shadowed fields in case 7203 /* copy to memory all shadowed fields in case
7148 they were modified */ 7204 they were modified */
7149 copy_shadow_to_vmcs12(vmx); 7205 copy_shadow_to_vmcs12(vmx);
7150 vmx->nested.sync_shadow_vmcs = false; 7206 vmx->nested.sync_shadow_vmcs = false;
7151 vmcs_clear_bits(SECONDARY_VM_EXEC_CONTROL, 7207 vmx_disable_shadow_vmcs(vmx);
7152 SECONDARY_EXEC_SHADOW_VMCS);
7153 vmcs_write64(VMCS_LINK_POINTER, -1ull);
7154 } 7208 }
7155 vmx->nested.posted_intr_nv = -1; 7209 vmx->nested.posted_intr_nv = -1;
7156 7210
7157 /* Flush VMCS12 to guest memory */ 7211 /* Flush VMCS12 to guest memory */
7158 memcpy(vmx->nested.current_vmcs12, vmx->nested.cached_vmcs12, 7212 kvm_vcpu_write_guest_page(&vmx->vcpu,
7159 VMCS12_SIZE); 7213 vmx->nested.current_vmptr >> PAGE_SHIFT,
7214 vmx->nested.cached_vmcs12, 0, VMCS12_SIZE);
7160 7215
7161 kunmap(vmx->nested.current_vmcs12_page);
7162 nested_release_page(vmx->nested.current_vmcs12_page);
7163 vmx->nested.current_vmptr = -1ull; 7216 vmx->nested.current_vmptr = -1ull;
7164 vmx->nested.current_vmcs12 = NULL;
7165} 7217}
7166 7218
7167/* 7219/*
@@ -7175,12 +7227,14 @@ static void free_nested(struct vcpu_vmx *vmx)
7175 7227
7176 vmx->nested.vmxon = false; 7228 vmx->nested.vmxon = false;
7177 free_vpid(vmx->nested.vpid02); 7229 free_vpid(vmx->nested.vpid02);
7178 nested_release_vmcs12(vmx); 7230 vmx->nested.posted_intr_nv = -1;
7231 vmx->nested.current_vmptr = -1ull;
7179 if (vmx->nested.msr_bitmap) { 7232 if (vmx->nested.msr_bitmap) {
7180 free_page((unsigned long)vmx->nested.msr_bitmap); 7233 free_page((unsigned long)vmx->nested.msr_bitmap);
7181 vmx->nested.msr_bitmap = NULL; 7234 vmx->nested.msr_bitmap = NULL;
7182 } 7235 }
7183 if (enable_shadow_vmcs) { 7236 if (enable_shadow_vmcs) {
7237 vmx_disable_shadow_vmcs(vmx);
7184 vmcs_clear(vmx->vmcs01.shadow_vmcs); 7238 vmcs_clear(vmx->vmcs01.shadow_vmcs);
7185 free_vmcs(vmx->vmcs01.shadow_vmcs); 7239 free_vmcs(vmx->vmcs01.shadow_vmcs);
7186 vmx->vmcs01.shadow_vmcs = NULL; 7240 vmx->vmcs01.shadow_vmcs = NULL;
@@ -7579,14 +7633,14 @@ static int handle_vmptrld(struct kvm_vcpu *vcpu)
7579 } 7633 }
7580 7634
7581 nested_release_vmcs12(vmx); 7635 nested_release_vmcs12(vmx);
7582 vmx->nested.current_vmcs12 = new_vmcs12;
7583 vmx->nested.current_vmcs12_page = page;
7584 /* 7636 /*
7585 * Load VMCS12 from guest memory since it is not already 7637 * Load VMCS12 from guest memory since it is not already
7586 * cached. 7638 * cached.
7587 */ 7639 */
7588 memcpy(vmx->nested.cached_vmcs12, 7640 memcpy(vmx->nested.cached_vmcs12, new_vmcs12, VMCS12_SIZE);
7589 vmx->nested.current_vmcs12, VMCS12_SIZE); 7641 kunmap(page);
7642 nested_release_page_clean(page);
7643
7590 set_current_vmptr(vmx, vmptr); 7644 set_current_vmptr(vmx, vmptr);
7591 } 7645 }
7592 7646
@@ -8019,12 +8073,11 @@ static bool nested_vmx_exit_handled_cr(struct kvm_vcpu *vcpu,
8019 * should handle it ourselves in L0 (and then continue L2). Only call this 8073 * should handle it ourselves in L0 (and then continue L2). Only call this
8020 * when in is_guest_mode (L2). 8074 * when in is_guest_mode (L2).
8021 */ 8075 */
8022static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu) 8076static bool nested_vmx_exit_reflected(struct kvm_vcpu *vcpu, u32 exit_reason)
8023{ 8077{
8024 u32 intr_info = vmcs_read32(VM_EXIT_INTR_INFO); 8078 u32 intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
8025 struct vcpu_vmx *vmx = to_vmx(vcpu); 8079 struct vcpu_vmx *vmx = to_vmx(vcpu);
8026 struct vmcs12 *vmcs12 = get_vmcs12(vcpu); 8080 struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
8027 u32 exit_reason = vmx->exit_reason;
8028 8081
8029 trace_kvm_nested_vmexit(kvm_rip_read(vcpu), exit_reason, 8082 trace_kvm_nested_vmexit(kvm_rip_read(vcpu), exit_reason,
8030 vmcs_readl(EXIT_QUALIFICATION), 8083 vmcs_readl(EXIT_QUALIFICATION),
@@ -8033,6 +8086,18 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
8033 vmcs_read32(VM_EXIT_INTR_ERROR_CODE), 8086 vmcs_read32(VM_EXIT_INTR_ERROR_CODE),
8034 KVM_ISA_VMX); 8087 KVM_ISA_VMX);
8035 8088
8089 /*
8090 * The host physical addresses of some pages of guest memory
8091 * are loaded into VMCS02 (e.g. L1's Virtual APIC Page). The CPU
8092 * may write to these pages via their host physical address while
8093 * L2 is running, bypassing any address-translation-based dirty
8094 * tracking (e.g. EPT write protection).
8095 *
8096 * Mark them dirty on every exit from L2 to prevent them from
8097 * getting out of sync with dirty tracking.
8098 */
8099 nested_mark_vmcs12_pages_dirty(vcpu);
8100
8036 if (vmx->nested.nested_run_pending) 8101 if (vmx->nested.nested_run_pending)
8037 return false; 8102 return false;
8038 8103
@@ -8169,6 +8234,29 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
8169 } 8234 }
8170} 8235}
8171 8236
8237static int nested_vmx_reflect_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason)
8238{
8239 u32 exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO);
8240
8241 /*
8242 * At this point, the exit interruption info in exit_intr_info
8243 * is only valid for EXCEPTION_NMI exits. For EXTERNAL_INTERRUPT
8244 * we need to query the in-kernel LAPIC.
8245 */
8246 WARN_ON(exit_reason == EXIT_REASON_EXTERNAL_INTERRUPT);
8247 if ((exit_intr_info &
8248 (INTR_INFO_VALID_MASK | INTR_INFO_DELIVER_CODE_MASK)) ==
8249 (INTR_INFO_VALID_MASK | INTR_INFO_DELIVER_CODE_MASK)) {
8250 struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
8251 vmcs12->vm_exit_intr_error_code =
8252 vmcs_read32(VM_EXIT_INTR_ERROR_CODE);
8253 }
8254
8255 nested_vmx_vmexit(vcpu, exit_reason, exit_intr_info,
8256 vmcs_readl(EXIT_QUALIFICATION));
8257 return 1;
8258}
8259
8172static void vmx_get_exit_info(struct kvm_vcpu *vcpu, u64 *info1, u64 *info2) 8260static void vmx_get_exit_info(struct kvm_vcpu *vcpu, u64 *info1, u64 *info2)
8173{ 8261{
8174 *info1 = vmcs_readl(EXIT_QUALIFICATION); 8262 *info1 = vmcs_readl(EXIT_QUALIFICATION);
@@ -8415,12 +8503,8 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)
8415 if (vmx->emulation_required) 8503 if (vmx->emulation_required)
8416 return handle_invalid_guest_state(vcpu); 8504 return handle_invalid_guest_state(vcpu);
8417 8505
8418 if (is_guest_mode(vcpu) && nested_vmx_exit_handled(vcpu)) { 8506 if (is_guest_mode(vcpu) && nested_vmx_exit_reflected(vcpu, exit_reason))
8419 nested_vmx_vmexit(vcpu, exit_reason, 8507 return nested_vmx_reflect_vmexit(vcpu, exit_reason);
8420 vmcs_read32(VM_EXIT_INTR_INFO),
8421 vmcs_readl(EXIT_QUALIFICATION));
8422 return 1;
8423 }
8424 8508
8425 if (exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) { 8509 if (exit_reason & VMX_EXIT_REASONS_FAILED_VMENTRY) {
8426 dump_vmcs(); 8510 dump_vmcs();
@@ -8929,8 +9013,10 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
8929 if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP) 9013 if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP)
8930 vmx_set_interrupt_shadow(vcpu, 0); 9014 vmx_set_interrupt_shadow(vcpu, 0);
8931 9015
8932 if (vmx->guest_pkru_valid) 9016 if (static_cpu_has(X86_FEATURE_PKU) &&
8933 __write_pkru(vmx->guest_pkru); 9017 kvm_read_cr4_bits(vcpu, X86_CR4_PKE) &&
9018 vcpu->arch.pkru != vmx->host_pkru)
9019 __write_pkru(vcpu->arch.pkru);
8934 9020
8935 atomic_switch_perf_msrs(vmx); 9021 atomic_switch_perf_msrs(vmx);
8936 debugctlmsr = get_debugctlmsr(); 9022 debugctlmsr = get_debugctlmsr();
@@ -9078,13 +9164,11 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
9078 * back on host, so it is safe to read guest PKRU from current 9164 * back on host, so it is safe to read guest PKRU from current
9079 * XSAVE. 9165 * XSAVE.
9080 */ 9166 */
9081 if (boot_cpu_has(X86_FEATURE_OSPKE)) { 9167 if (static_cpu_has(X86_FEATURE_PKU) &&
9082 vmx->guest_pkru = __read_pkru(); 9168 kvm_read_cr4_bits(vcpu, X86_CR4_PKE)) {
9083 if (vmx->guest_pkru != vmx->host_pkru) { 9169 vcpu->arch.pkru = __read_pkru();
9084 vmx->guest_pkru_valid = true; 9170 if (vcpu->arch.pkru != vmx->host_pkru)
9085 __write_pkru(vmx->host_pkru); 9171 __write_pkru(vmx->host_pkru);
9086 } else
9087 vmx->guest_pkru_valid = false;
9088 } 9172 }
9089 9173
9090 /* 9174 /*
@@ -9223,7 +9307,6 @@ static struct kvm_vcpu *vmx_create_vcpu(struct kvm *kvm, unsigned int id)
9223 9307
9224 vmx->nested.posted_intr_nv = -1; 9308 vmx->nested.posted_intr_nv = -1;
9225 vmx->nested.current_vmptr = -1ull; 9309 vmx->nested.current_vmptr = -1ull;
9226 vmx->nested.current_vmcs12 = NULL;
9227 9310
9228 vmx->msr_ia32_feature_control_valid_bits = FEATURE_CONTROL_LOCKED; 9311 vmx->msr_ia32_feature_control_valid_bits = FEATURE_CONTROL_LOCKED;
9229 9312
@@ -9509,12 +9592,15 @@ static void vmx_inject_page_fault_nested(struct kvm_vcpu *vcpu,
9509 9592
9510 WARN_ON(!is_guest_mode(vcpu)); 9593 WARN_ON(!is_guest_mode(vcpu));
9511 9594
9512 if (nested_vmx_is_page_fault_vmexit(vmcs12, fault->error_code)) 9595 if (nested_vmx_is_page_fault_vmexit(vmcs12, fault->error_code)) {
9513 nested_vmx_vmexit(vcpu, to_vmx(vcpu)->exit_reason, 9596 vmcs12->vm_exit_intr_error_code = fault->error_code;
9514 vmcs_read32(VM_EXIT_INTR_INFO), 9597 nested_vmx_vmexit(vcpu, EXIT_REASON_EXCEPTION_NMI,
9515 vmcs_readl(EXIT_QUALIFICATION)); 9598 PF_VECTOR | INTR_TYPE_HARD_EXCEPTION |
9516 else 9599 INTR_INFO_DELIVER_CODE_MASK | INTR_INFO_VALID_MASK,
9600 fault->address);
9601 } else {
9517 kvm_inject_page_fault(vcpu, fault); 9602 kvm_inject_page_fault(vcpu, fault);
9603 }
9518} 9604}
9519 9605
9520static inline bool nested_vmx_merge_msr_bitmap(struct kvm_vcpu *vcpu, 9606static inline bool nested_vmx_merge_msr_bitmap(struct kvm_vcpu *vcpu,
@@ -10094,12 +10180,6 @@ static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
10094 * "or"ing of the EB of vmcs01 and vmcs12, because when enable_ept, 10180 * "or"ing of the EB of vmcs01 and vmcs12, because when enable_ept,
10095 * vmcs01's EB.PF is 0 so the "or" will take vmcs12's value, and when 10181 * vmcs01's EB.PF is 0 so the "or" will take vmcs12's value, and when
10096 * !enable_ept, EB.PF is 1, so the "or" will always be 1. 10182 * !enable_ept, EB.PF is 1, so the "or" will always be 1.
10097 *
10098 * A problem with this approach (when !enable_ept) is that L1 may be
10099 * injected with more page faults than it asked for. This could have
10100 * caused problems, but in practice existing hypervisors don't care.
10101 * To fix this, we will need to emulate the PFEC checking (on the L1
10102 * page tables), using walk_addr(), when injecting PFs to L1.
10103 */ 10183 */
10104 vmcs_write32(PAGE_FAULT_ERROR_CODE_MASK, 10184 vmcs_write32(PAGE_FAULT_ERROR_CODE_MASK,
10105 enable_ept ? vmcs12->page_fault_error_code_mask : 0); 10185 enable_ept ? vmcs12->page_fault_error_code_mask : 0);
@@ -10847,13 +10927,8 @@ static void prepare_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12,
10847 10927
10848 vmcs12->vm_exit_reason = exit_reason; 10928 vmcs12->vm_exit_reason = exit_reason;
10849 vmcs12->exit_qualification = exit_qualification; 10929 vmcs12->exit_qualification = exit_qualification;
10850
10851 vmcs12->vm_exit_intr_info = exit_intr_info; 10930 vmcs12->vm_exit_intr_info = exit_intr_info;
10852 if ((vmcs12->vm_exit_intr_info & 10931
10853 (INTR_INFO_VALID_MASK | INTR_INFO_DELIVER_CODE_MASK)) ==
10854 (INTR_INFO_VALID_MASK | INTR_INFO_DELIVER_CODE_MASK))
10855 vmcs12->vm_exit_intr_error_code =
10856 vmcs_read32(VM_EXIT_INTR_ERROR_CODE);
10857 vmcs12->idt_vectoring_info_field = 0; 10932 vmcs12->idt_vectoring_info_field = 0;
10858 vmcs12->vm_exit_instruction_len = vmcs_read32(VM_EXIT_INSTRUCTION_LEN); 10933 vmcs12->vm_exit_instruction_len = vmcs_read32(VM_EXIT_INSTRUCTION_LEN);
10859 vmcs12->vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO); 10934 vmcs12->vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO);
@@ -11049,8 +11124,15 @@ static void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
11049 11124
11050 vmx_switch_vmcs(vcpu, &vmx->vmcs01); 11125 vmx_switch_vmcs(vcpu, &vmx->vmcs01);
11051 11126
11052 if ((exit_reason == EXIT_REASON_EXTERNAL_INTERRUPT) 11127 /*
11053 && nested_exit_intr_ack_set(vcpu)) { 11128 * TODO: SDM says that with acknowledge interrupt on exit, bit 31 of
11129 * the VM-exit interrupt information (valid interrupt) is always set to
11130 * 1 on EXIT_REASON_EXTERNAL_INTERRUPT, so we shouldn't need
11131 * kvm_cpu_has_interrupt(). See the commit message for details.
11132 */
11133 if (nested_exit_intr_ack_set(vcpu) &&
11134 exit_reason == EXIT_REASON_EXTERNAL_INTERRUPT &&
11135 kvm_cpu_has_interrupt(vcpu)) {
11054 int irq = kvm_cpu_get_interrupt(vcpu); 11136 int irq = kvm_cpu_get_interrupt(vcpu);
11055 WARN_ON(irq < 0); 11137 WARN_ON(irq < 0);
11056 vmcs12->vm_exit_intr_info = irq | 11138 vmcs12->vm_exit_intr_info = irq |
@@ -11593,8 +11675,6 @@ static struct kvm_x86_ops vmx_x86_ops __ro_after_init = {
11593 .get_rflags = vmx_get_rflags, 11675 .get_rflags = vmx_get_rflags,
11594 .set_rflags = vmx_set_rflags, 11676 .set_rflags = vmx_set_rflags,
11595 11677
11596 .get_pkru = vmx_get_pkru,
11597
11598 .tlb_flush = vmx_flush_tlb, 11678 .tlb_flush = vmx_flush_tlb,
11599 11679
11600 .run = vmx_vcpu_run, 11680 .run = vmx_vcpu_run,
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 6c97c82814c4..05a5e57c6f39 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3159,15 +3159,18 @@ static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
3159 kvm_set_hflags(vcpu, hflags); 3159 kvm_set_hflags(vcpu, hflags);
3160 3160
3161 vcpu->arch.smi_pending = events->smi.pending; 3161 vcpu->arch.smi_pending = events->smi.pending;
3162 if (events->smi.smm_inside_nmi) 3162
3163 vcpu->arch.hflags |= HF_SMM_INSIDE_NMI_MASK; 3163 if (events->smi.smm) {
3164 else 3164 if (events->smi.smm_inside_nmi)
3165 vcpu->arch.hflags &= ~HF_SMM_INSIDE_NMI_MASK; 3165 vcpu->arch.hflags |= HF_SMM_INSIDE_NMI_MASK;
3166 if (lapic_in_kernel(vcpu)) {
3167 if (events->smi.latched_init)
3168 set_bit(KVM_APIC_INIT, &vcpu->arch.apic->pending_events);
3169 else 3166 else
3170 clear_bit(KVM_APIC_INIT, &vcpu->arch.apic->pending_events); 3167 vcpu->arch.hflags &= ~HF_SMM_INSIDE_NMI_MASK;
3168 if (lapic_in_kernel(vcpu)) {
3169 if (events->smi.latched_init)
3170 set_bit(KVM_APIC_INIT, &vcpu->arch.apic->pending_events);
3171 else
3172 clear_bit(KVM_APIC_INIT, &vcpu->arch.apic->pending_events);
3173 }
3171 } 3174 }
3172 } 3175 }
3173 3176
@@ -3242,7 +3245,12 @@ static void fill_xsave(u8 *dest, struct kvm_vcpu *vcpu)
3242 u32 size, offset, ecx, edx; 3245 u32 size, offset, ecx, edx;
3243 cpuid_count(XSTATE_CPUID, index, 3246 cpuid_count(XSTATE_CPUID, index,
3244 &size, &offset, &ecx, &edx); 3247 &size, &offset, &ecx, &edx);
3245 memcpy(dest + offset, src, size); 3248 if (feature == XFEATURE_MASK_PKRU)
3249 memcpy(dest + offset, &vcpu->arch.pkru,
3250 sizeof(vcpu->arch.pkru));
3251 else
3252 memcpy(dest + offset, src, size);
3253
3246 } 3254 }
3247 3255
3248 valid -= feature; 3256 valid -= feature;
@@ -3280,7 +3288,11 @@ static void load_xsave(struct kvm_vcpu *vcpu, u8 *src)
3280 u32 size, offset, ecx, edx; 3288 u32 size, offset, ecx, edx;
3281 cpuid_count(XSTATE_CPUID, index, 3289 cpuid_count(XSTATE_CPUID, index,
3282 &size, &offset, &ecx, &edx); 3290 &size, &offset, &ecx, &edx);
3283 memcpy(dest, src + offset, size); 3291 if (feature == XFEATURE_MASK_PKRU)
3292 memcpy(&vcpu->arch.pkru, src + offset,
3293 sizeof(vcpu->arch.pkru));
3294 else
3295 memcpy(dest, src + offset, size);
3284 } 3296 }
3285 3297
3286 valid -= feature; 3298 valid -= feature;
@@ -6215,6 +6227,7 @@ static void kvm_pv_kick_cpu_op(struct kvm *kvm, unsigned long flags, int apicid)
6215 6227
6216 lapic_irq.shorthand = 0; 6228 lapic_irq.shorthand = 0;
6217 lapic_irq.dest_mode = 0; 6229 lapic_irq.dest_mode = 0;
6230 lapic_irq.level = 0;
6218 lapic_irq.dest_id = apicid; 6231 lapic_irq.dest_id = apicid;
6219 lapic_irq.msi_redir_hint = false; 6232 lapic_irq.msi_redir_hint = false;
6220 6233
@@ -7629,7 +7642,9 @@ void kvm_load_guest_fpu(struct kvm_vcpu *vcpu)
7629 */ 7642 */
7630 vcpu->guest_fpu_loaded = 1; 7643 vcpu->guest_fpu_loaded = 1;
7631 __kernel_fpu_begin(); 7644 __kernel_fpu_begin();
7632 __copy_kernel_to_fpregs(&vcpu->arch.guest_fpu.state); 7645 /* PKRU is separately restored in kvm_x86_ops->run. */
7646 __copy_kernel_to_fpregs(&vcpu->arch.guest_fpu.state,
7647 ~XFEATURE_MASK_PKRU);
7633 trace_kvm_fpu(1); 7648 trace_kvm_fpu(1);
7634} 7649}
7635 7650
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 673541eb3b3f..bf3f1065d6ad 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -18,6 +18,7 @@
18#include <asm/dma.h> /* for MAX_DMA_PFN */ 18#include <asm/dma.h> /* for MAX_DMA_PFN */
19#include <asm/microcode.h> 19#include <asm/microcode.h>
20#include <asm/kaslr.h> 20#include <asm/kaslr.h>
21#include <asm/hypervisor.h>
21 22
22/* 23/*
23 * We need to define the tracepoints somewhere, and tlb.c 24 * We need to define the tracepoints somewhere, and tlb.c
@@ -636,6 +637,8 @@ void __init init_mem_mapping(void)
636 load_cr3(swapper_pg_dir); 637 load_cr3(swapper_pg_dir);
637 __flush_tlb_all(); 638 __flush_tlb_all();
638 639
640 hypervisor_init_mem_mapping();
641
639 early_memtest(0, max_pfn_mapped << PAGE_SHIFT); 642 early_memtest(0, max_pfn_mapped << PAGE_SHIFT);
640} 643}
641 644
diff --git a/arch/x86/mm/mmap.c b/arch/x86/mm/mmap.c
index 229d04a83f85..a88cfbfbd078 100644
--- a/arch/x86/mm/mmap.c
+++ b/arch/x86/mm/mmap.c
@@ -50,8 +50,7 @@ unsigned long tasksize_64bit(void)
50static unsigned long stack_maxrandom_size(unsigned long task_size) 50static unsigned long stack_maxrandom_size(unsigned long task_size)
51{ 51{
52 unsigned long max = 0; 52 unsigned long max = 0;
53 if ((current->flags & PF_RANDOMIZE) && 53 if (current->flags & PF_RANDOMIZE) {
54 !(current->personality & ADDR_NO_RANDOMIZE)) {
55 max = (-1UL) & __STACK_RND_MASK(task_size == tasksize_32bit()); 54 max = (-1UL) & __STACK_RND_MASK(task_size == tasksize_32bit());
56 max <<= PAGE_SHIFT; 55 max <<= PAGE_SHIFT;
57 } 56 }
@@ -79,13 +78,13 @@ static int mmap_is_legacy(void)
79 78
80static unsigned long arch_rnd(unsigned int rndbits) 79static unsigned long arch_rnd(unsigned int rndbits)
81{ 80{
81 if (!(current->flags & PF_RANDOMIZE))
82 return 0;
82 return (get_random_long() & ((1UL << rndbits) - 1)) << PAGE_SHIFT; 83 return (get_random_long() & ((1UL << rndbits) - 1)) << PAGE_SHIFT;
83} 84}
84 85
85unsigned long arch_mmap_rnd(void) 86unsigned long arch_mmap_rnd(void)
86{ 87{
87 if (!(current->flags & PF_RANDOMIZE))
88 return 0;
89 return arch_rnd(mmap_is_ia32() ? mmap32_rnd_bits : mmap64_rnd_bits); 88 return arch_rnd(mmap_is_ia32() ? mmap32_rnd_bits : mmap64_rnd_bits);
90} 89}
91 90
diff --git a/arch/x86/platform/uv/tlb_uv.c b/arch/x86/platform/uv/tlb_uv.c
index 3e4bdb442fbc..f44c0bc95aa2 100644
--- a/arch/x86/platform/uv/tlb_uv.c
+++ b/arch/x86/platform/uv/tlb_uv.c
@@ -26,7 +26,7 @@
26static struct bau_operations ops __ro_after_init; 26static struct bau_operations ops __ro_after_init;
27 27
28/* timeouts in nanoseconds (indexed by UVH_AGING_PRESCALE_SEL urgency7 30:28) */ 28/* timeouts in nanoseconds (indexed by UVH_AGING_PRESCALE_SEL urgency7 30:28) */
29static int timeout_base_ns[] = { 29static const int timeout_base_ns[] = {
30 20, 30 20,
31 160, 31 160,
32 1280, 32 1280,
@@ -1216,7 +1216,7 @@ static struct bau_pq_entry *find_another_by_swack(struct bau_pq_entry *msg,
1216 * set a bit in the UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE register. 1216 * set a bit in the UVH_LB_BAU_INTD_SOFTWARE_ACKNOWLEDGE register.
1217 * Such a message must be ignored. 1217 * Such a message must be ignored.
1218 */ 1218 */
1219void process_uv2_message(struct msg_desc *mdp, struct bau_control *bcp) 1219static void process_uv2_message(struct msg_desc *mdp, struct bau_control *bcp)
1220{ 1220{
1221 unsigned long mmr_image; 1221 unsigned long mmr_image;
1222 unsigned char swack_vec; 1222 unsigned char swack_vec;
diff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c
index 87d791356ea9..de503c225ae1 100644
--- a/arch/x86/xen/enlighten_hvm.c
+++ b/arch/x86/xen/enlighten_hvm.c
@@ -12,6 +12,7 @@
12#include <asm/setup.h> 12#include <asm/setup.h>
13#include <asm/hypervisor.h> 13#include <asm/hypervisor.h>
14#include <asm/e820/api.h> 14#include <asm/e820/api.h>
15#include <asm/early_ioremap.h>
15 16
16#include <asm/xen/cpuid.h> 17#include <asm/xen/cpuid.h>
17#include <asm/xen/hypervisor.h> 18#include <asm/xen/hypervisor.h>
@@ -21,38 +22,50 @@
21#include "mmu.h" 22#include "mmu.h"
22#include "smp.h" 23#include "smp.h"
23 24
24void __ref xen_hvm_init_shared_info(void) 25static unsigned long shared_info_pfn;
26
27void xen_hvm_init_shared_info(void)
25{ 28{
26 struct xen_add_to_physmap xatp; 29 struct xen_add_to_physmap xatp;
27 u64 pa;
28
29 if (HYPERVISOR_shared_info == &xen_dummy_shared_info) {
30 /*
31 * Search for a free page starting at 4kB physical address.
32 * Low memory is preferred to avoid an EPT large page split up
33 * by the mapping.
34 * Starting below X86_RESERVE_LOW (usually 64kB) is fine as
35 * the BIOS used for HVM guests is well behaved and won't
36 * clobber memory other than the first 4kB.
37 */
38 for (pa = PAGE_SIZE;
39 !e820__mapped_all(pa, pa + PAGE_SIZE, E820_TYPE_RAM) ||
40 memblock_is_reserved(pa);
41 pa += PAGE_SIZE)
42 ;
43
44 memblock_reserve(pa, PAGE_SIZE);
45 HYPERVISOR_shared_info = __va(pa);
46 }
47 30
48 xatp.domid = DOMID_SELF; 31 xatp.domid = DOMID_SELF;
49 xatp.idx = 0; 32 xatp.idx = 0;
50 xatp.space = XENMAPSPACE_shared_info; 33 xatp.space = XENMAPSPACE_shared_info;
51 xatp.gpfn = virt_to_pfn(HYPERVISOR_shared_info); 34 xatp.gpfn = shared_info_pfn;
52 if (HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp)) 35 if (HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp))
53 BUG(); 36 BUG();
54} 37}
55 38
39static void __init reserve_shared_info(void)
40{
41 u64 pa;
42
43 /*
44 * Search for a free page starting at 4kB physical address.
45 * Low memory is preferred to avoid an EPT large page split up
46 * by the mapping.
47 * Starting below X86_RESERVE_LOW (usually 64kB) is fine as
48 * the BIOS used for HVM guests is well behaved and won't
49 * clobber memory other than the first 4kB.
50 */
51 for (pa = PAGE_SIZE;
52 !e820__mapped_all(pa, pa + PAGE_SIZE, E820_TYPE_RAM) ||
53 memblock_is_reserved(pa);
54 pa += PAGE_SIZE)
55 ;
56
57 shared_info_pfn = PHYS_PFN(pa);
58
59 memblock_reserve(pa, PAGE_SIZE);
60 HYPERVISOR_shared_info = early_memremap(pa, PAGE_SIZE);
61}
62
63static void __init xen_hvm_init_mem_mapping(void)
64{
65 early_memunmap(HYPERVISOR_shared_info, PAGE_SIZE);
66 HYPERVISOR_shared_info = __va(PFN_PHYS(shared_info_pfn));
67}
68
56static void __init init_hvm_pv_info(void) 69static void __init init_hvm_pv_info(void)
57{ 70{
58 int major, minor; 71 int major, minor;
@@ -153,6 +166,7 @@ static void __init xen_hvm_guest_init(void)
153 166
154 init_hvm_pv_info(); 167 init_hvm_pv_info();
155 168
169 reserve_shared_info();
156 xen_hvm_init_shared_info(); 170 xen_hvm_init_shared_info();
157 171
158 /* 172 /*
@@ -218,5 +232,6 @@ const struct hypervisor_x86 x86_hyper_xen_hvm = {
218 .init_platform = xen_hvm_guest_init, 232 .init_platform = xen_hvm_guest_init,
219 .pin_vcpu = xen_pin_vcpu, 233 .pin_vcpu = xen_pin_vcpu,
220 .x2apic_available = xen_x2apic_para_available, 234 .x2apic_available = xen_x2apic_para_available,
235 .init_mem_mapping = xen_hvm_init_mem_mapping,
221}; 236};
222EXPORT_SYMBOL(x86_hyper_xen_hvm); 237EXPORT_SYMBOL(x86_hyper_xen_hvm);
diff --git a/arch/xtensa/include/asm/Kbuild b/arch/xtensa/include/asm/Kbuild
index 2d716ebc5a5e..dff7cc39437c 100644
--- a/arch/xtensa/include/asm/Kbuild
+++ b/arch/xtensa/include/asm/Kbuild
@@ -1,5 +1,6 @@
1generic-y += bug.h 1generic-y += bug.h
2generic-y += clkdev.h 2generic-y += clkdev.h
3generic-y += device.h
3generic-y += div64.h 4generic-y += div64.h
4generic-y += dma-contiguous.h 5generic-y += dma-contiguous.h
5generic-y += emergency-restart.h 6generic-y += emergency-restart.h
@@ -17,6 +18,7 @@ generic-y += local.h
17generic-y += local64.h 18generic-y += local64.h
18generic-y += mcs_spinlock.h 19generic-y += mcs_spinlock.h
19generic-y += mm-arch-hooks.h 20generic-y += mm-arch-hooks.h
21generic-y += param.h
20generic-y += percpu.h 22generic-y += percpu.h
21generic-y += preempt.h 23generic-y += preempt.h
22generic-y += rwsem.h 24generic-y += rwsem.h
diff --git a/arch/xtensa/include/asm/device.h b/arch/xtensa/include/asm/device.h
deleted file mode 100644
index 1deeb8ebbb1b..000000000000
--- a/arch/xtensa/include/asm/device.h
+++ /dev/null
@@ -1,15 +0,0 @@
1/*
2 * Arch specific extensions to struct device
3 *
4 * This file is released under the GPLv2
5 */
6#ifndef _ASM_XTENSA_DEVICE_H
7#define _ASM_XTENSA_DEVICE_H
8
9struct dev_archdata {
10};
11
12struct pdev_archdata {
13};
14
15#endif /* _ASM_XTENSA_DEVICE_H */
diff --git a/arch/xtensa/include/asm/param.h b/arch/xtensa/include/asm/param.h
deleted file mode 100644
index 0a70e780ef2a..000000000000
--- a/arch/xtensa/include/asm/param.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * include/asm-xtensa/param.h
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive
6 * for more details.
7 *
8 * Copyright (C) 2001 - 2005 Tensilica Inc.
9 */
10#ifndef _XTENSA_PARAM_H
11#define _XTENSA_PARAM_H
12
13#include <uapi/asm/param.h>
14
15# define HZ CONFIG_HZ /* internal timer frequency */
16# define USER_HZ 100 /* for user interfaces in "ticks" */
17# define CLOCKS_PER_SEC (USER_HZ) /* frequnzy at which times() counts */
18#endif /* _XTENSA_PARAM_H */
diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c
index d159e9b9c018..672391003e40 100644
--- a/arch/xtensa/kernel/xtensa_ksyms.c
+++ b/arch/xtensa/kernel/xtensa_ksyms.c
@@ -94,13 +94,11 @@ unsigned long __sync_fetch_and_or_4(unsigned long *p, unsigned long v)
94} 94}
95EXPORT_SYMBOL(__sync_fetch_and_or_4); 95EXPORT_SYMBOL(__sync_fetch_and_or_4);
96 96
97#ifdef CONFIG_NET
98/* 97/*
99 * Networking support 98 * Networking support
100 */ 99 */
101EXPORT_SYMBOL(csum_partial); 100EXPORT_SYMBOL(csum_partial);
102EXPORT_SYMBOL(csum_partial_copy_generic); 101EXPORT_SYMBOL(csum_partial_copy_generic);
103#endif /* CONFIG_NET */
104 102
105/* 103/*
106 * Architecture-specific symbols 104 * Architecture-specific symbols
diff --git a/arch/xtensa/mm/cache.c b/arch/xtensa/mm/cache.c
index 1a804a2f9a5b..3c75c4e597da 100644
--- a/arch/xtensa/mm/cache.c
+++ b/arch/xtensa/mm/cache.c
@@ -103,6 +103,7 @@ void clear_user_highpage(struct page *page, unsigned long vaddr)
103 clear_page_alias(kvaddr, paddr); 103 clear_page_alias(kvaddr, paddr);
104 preempt_enable(); 104 preempt_enable();
105} 105}
106EXPORT_SYMBOL(clear_user_highpage);
106 107
107void copy_user_highpage(struct page *dst, struct page *src, 108void copy_user_highpage(struct page *dst, struct page *src,
108 unsigned long vaddr, struct vm_area_struct *vma) 109 unsigned long vaddr, struct vm_area_struct *vma)
@@ -119,10 +120,7 @@ void copy_user_highpage(struct page *dst, struct page *src,
119 copy_page_alias(dst_vaddr, src_vaddr, dst_paddr, src_paddr); 120 copy_page_alias(dst_vaddr, src_vaddr, dst_paddr, src_paddr);
120 preempt_enable(); 121 preempt_enable();
121} 122}
122 123EXPORT_SYMBOL(copy_user_highpage);
123#endif /* DCACHE_WAY_SIZE > PAGE_SIZE */
124
125#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK
126 124
127/* 125/*
128 * Any time the kernel writes to a user page cache page, or it is about to 126 * Any time the kernel writes to a user page cache page, or it is about to
@@ -176,7 +174,7 @@ void flush_dcache_page(struct page *page)
176 174
177 /* There shouldn't be an entry in the cache for this page anymore. */ 175 /* There shouldn't be an entry in the cache for this page anymore. */
178} 176}
179 177EXPORT_SYMBOL(flush_dcache_page);
180 178
181/* 179/*
182 * For now, flush the whole cache. FIXME?? 180 * For now, flush the whole cache. FIXME??
@@ -188,6 +186,7 @@ void local_flush_cache_range(struct vm_area_struct *vma,
188 __flush_invalidate_dcache_all(); 186 __flush_invalidate_dcache_all();
189 __invalidate_icache_all(); 187 __invalidate_icache_all();
190} 188}
189EXPORT_SYMBOL(local_flush_cache_range);
191 190
192/* 191/*
193 * Remove any entry in the cache for this page. 192 * Remove any entry in the cache for this page.
@@ -207,8 +206,9 @@ void local_flush_cache_page(struct vm_area_struct *vma, unsigned long address,
207 __flush_invalidate_dcache_page_alias(virt, phys); 206 __flush_invalidate_dcache_page_alias(virt, phys);
208 __invalidate_icache_page_alias(virt, phys); 207 __invalidate_icache_page_alias(virt, phys);
209} 208}
209EXPORT_SYMBOL(local_flush_cache_page);
210 210
211#endif 211#endif /* DCACHE_WAY_SIZE > PAGE_SIZE */
212 212
213void 213void
214update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep) 214update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
@@ -225,7 +225,7 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
225 225
226 flush_tlb_page(vma, addr); 226 flush_tlb_page(vma, addr);
227 227
228#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK 228#if (DCACHE_WAY_SIZE > PAGE_SIZE)
229 229
230 if (!PageReserved(page) && test_bit(PG_arch_1, &page->flags)) { 230 if (!PageReserved(page) && test_bit(PG_arch_1, &page->flags)) {
231 unsigned long phys = page_to_phys(page); 231 unsigned long phys = page_to_phys(page);
@@ -256,7 +256,7 @@ update_mmu_cache(struct vm_area_struct * vma, unsigned long addr, pte_t *ptep)
256 * flush_dcache_page() on the page. 256 * flush_dcache_page() on the page.
257 */ 257 */
258 258
259#if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK 259#if (DCACHE_WAY_SIZE > PAGE_SIZE)
260 260
261void copy_to_user_page(struct vm_area_struct *vma, struct page *page, 261void copy_to_user_page(struct vm_area_struct *vma, struct page *page,
262 unsigned long vaddr, void *dst, const void *src, 262 unsigned long vaddr, void *dst, const void *src,
diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h
index 63e771ab56d8..859f0a8c97c8 100644
--- a/block/bfq-iosched.h
+++ b/block/bfq-iosched.h
@@ -71,17 +71,29 @@ struct bfq_service_tree {
71 * 71 *
72 * bfq_sched_data is the basic scheduler queue. It supports three 72 * bfq_sched_data is the basic scheduler queue. It supports three
73 * ioprio_classes, and can be used either as a toplevel queue or as an 73 * ioprio_classes, and can be used either as a toplevel queue or as an
74 * intermediate queue on a hierarchical setup. @next_in_service 74 * intermediate queue in a hierarchical setup.
75 * points to the active entity of the sched_data service trees that
76 * will be scheduled next. It is used to reduce the number of steps
77 * needed for each hierarchical-schedule update.
78 * 75 *
79 * The supported ioprio_classes are the same as in CFQ, in descending 76 * The supported ioprio_classes are the same as in CFQ, in descending
80 * priority order, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE. 77 * priority order, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE.
81 * Requests from higher priority queues are served before all the 78 * Requests from higher priority queues are served before all the
82 * requests from lower priority queues; among requests of the same 79 * requests from lower priority queues; among requests of the same
83 * queue requests are served according to B-WF2Q+. 80 * queue requests are served according to B-WF2Q+.
84 * All the fields are protected by the queue lock of the containing bfqd. 81 *
82 * The schedule is implemented by the service trees, plus the field
83 * @next_in_service, which points to the entity on the active trees
84 * that will be served next, if 1) no changes in the schedule occurs
85 * before the current in-service entity is expired, 2) the in-service
86 * queue becomes idle when it expires, and 3) if the entity pointed by
87 * in_service_entity is not a queue, then the in-service child entity
88 * of the entity pointed by in_service_entity becomes idle on
89 * expiration. This peculiar definition allows for the following
90 * optimization, not yet exploited: while a given entity is still in
91 * service, we already know which is the best candidate for next
92 * service among the other active entitities in the same parent
93 * entity. We can then quickly compare the timestamps of the
94 * in-service entity with those of such best candidate.
95 *
96 * All fields are protected by the lock of the containing bfqd.
85 */ 97 */
86struct bfq_sched_data { 98struct bfq_sched_data {
87 /* entity in service */ 99 /* entity in service */
diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c
index 979f8f21b7e2..911aa7431dbe 100644
--- a/block/bfq-wf2q.c
+++ b/block/bfq-wf2q.c
@@ -188,21 +188,23 @@ static bool bfq_update_parent_budget(struct bfq_entity *next_in_service)
188 188
189/* 189/*
190 * This function tells whether entity stops being a candidate for next 190 * This function tells whether entity stops being a candidate for next
191 * service, according to the following logic. 191 * service, according to the restrictive definition of the field
192 * next_in_service. In particular, this function is invoked for an
193 * entity that is about to be set in service.
192 * 194 *
193 * This function is invoked for an entity that is about to be set in 195 * If entity is a queue, then the entity is no longer a candidate for
194 * service. If such an entity is a queue, then the entity is no longer 196 * next service according to the that definition, because entity is
195 * a candidate for next service (i.e, a candidate entity to serve 197 * about to become the in-service queue. This function then returns
196 * after the in-service entity is expired). The function then returns 198 * true if entity is a queue.
197 * true.
198 * 199 *
199 * In contrast, the entity could stil be a candidate for next service 200 * In contrast, entity could still be a candidate for next service if
200 * if it is not a queue, and has more than one child. In fact, even if 201 * it is not a queue, and has more than one active child. In fact,
201 * one of its children is about to be set in service, other children 202 * even if one of its children is about to be set in service, other
202 * may still be the next to serve. As a consequence, a non-queue 203 * active children may still be the next to serve, for the parent
203 * entity is not a candidate for next-service only if it has only one 204 * entity, even according to the above definition. As a consequence, a
204 * child. And only if this condition holds, then the function returns 205 * non-queue entity is not a candidate for next-service only if it has
205 * true for a non-queue entity. 206 * only one active child. And only if this condition holds, then this
207 * function returns true for a non-queue entity.
206 */ 208 */
207static bool bfq_no_longer_next_in_service(struct bfq_entity *entity) 209static bool bfq_no_longer_next_in_service(struct bfq_entity *entity)
208{ 210{
@@ -213,6 +215,18 @@ static bool bfq_no_longer_next_in_service(struct bfq_entity *entity)
213 215
214 bfqg = container_of(entity, struct bfq_group, entity); 216 bfqg = container_of(entity, struct bfq_group, entity);
215 217
218 /*
219 * The field active_entities does not always contain the
220 * actual number of active children entities: it happens to
221 * not account for the in-service entity in case the latter is
222 * removed from its active tree (which may get done after
223 * invoking the function bfq_no_longer_next_in_service in
224 * bfq_get_next_queue). Fortunately, here, i.e., while
225 * bfq_no_longer_next_in_service is not yet completed in
226 * bfq_get_next_queue, bfq_active_extract has not yet been
227 * invoked, and thus active_entities still coincides with the
228 * actual number of active entities.
229 */
216 if (bfqg->active_entities == 1) 230 if (bfqg->active_entities == 1)
217 return true; 231 return true;
218 232
@@ -954,7 +968,7 @@ static void bfq_update_fin_time_enqueue(struct bfq_entity *entity,
954 * one of its children receives a new request. 968 * one of its children receives a new request.
955 * 969 *
956 * Basically, this function updates the timestamps of entity and 970 * Basically, this function updates the timestamps of entity and
957 * inserts entity into its active tree, ater possible extracting it 971 * inserts entity into its active tree, ater possibly extracting it
958 * from its idle tree. 972 * from its idle tree.
959 */ 973 */
960static void __bfq_activate_entity(struct bfq_entity *entity, 974static void __bfq_activate_entity(struct bfq_entity *entity,
@@ -1048,7 +1062,7 @@ static void __bfq_requeue_entity(struct bfq_entity *entity)
1048 entity->start = entity->finish; 1062 entity->start = entity->finish;
1049 /* 1063 /*
1050 * In addition, if the entity had more than one child 1064 * In addition, if the entity had more than one child
1051 * when set in service, then was not extracted from 1065 * when set in service, then it was not extracted from
1052 * the active tree. This implies that the position of 1066 * the active tree. This implies that the position of
1053 * the entity in the active tree may need to be 1067 * the entity in the active tree may need to be
1054 * changed now, because we have just updated the start 1068 * changed now, because we have just updated the start
@@ -1056,9 +1070,8 @@ static void __bfq_requeue_entity(struct bfq_entity *entity)
1056 * time in a moment (the requeueing is then, more 1070 * time in a moment (the requeueing is then, more
1057 * precisely, a repositioning in this case). To 1071 * precisely, a repositioning in this case). To
1058 * implement this repositioning, we: 1) dequeue the 1072 * implement this repositioning, we: 1) dequeue the
1059 * entity here, 2) update the finish time and 1073 * entity here, 2) update the finish time and requeue
1060 * requeue the entity according to the new 1074 * the entity according to the new timestamps below.
1061 * timestamps below.
1062 */ 1075 */
1063 if (entity->tree) 1076 if (entity->tree)
1064 bfq_active_extract(st, entity); 1077 bfq_active_extract(st, entity);
@@ -1105,9 +1118,10 @@ static void __bfq_activate_requeue_entity(struct bfq_entity *entity,
1105 1118
1106 1119
1107/** 1120/**
1108 * bfq_activate_entity - activate or requeue an entity representing a bfq_queue, 1121 * bfq_activate_requeue_entity - activate or requeue an entity representing a
1109 * and activate, requeue or reposition all ancestors 1122 * bfq_queue, and activate, requeue or reposition
1110 * for which such an update becomes necessary. 1123 * all ancestors for which such an update becomes
1124 * necessary.
1111 * @entity: the entity to activate. 1125 * @entity: the entity to activate.
1112 * @non_blocking_wait_rq: true if this entity was waiting for a request 1126 * @non_blocking_wait_rq: true if this entity was waiting for a request
1113 * @requeue: true if this is a requeue, which implies that bfqq is 1127 * @requeue: true if this is a requeue, which implies that bfqq is
@@ -1135,9 +1149,9 @@ static void bfq_activate_requeue_entity(struct bfq_entity *entity,
1135 * @ins_into_idle_tree: if false, the entity will not be put into the 1149 * @ins_into_idle_tree: if false, the entity will not be put into the
1136 * idle tree. 1150 * idle tree.
1137 * 1151 *
1138 * Deactivates an entity, independently from its previous state. Must 1152 * Deactivates an entity, independently of its previous state. Must
1139 * be invoked only if entity is on a service tree. Extracts the entity 1153 * be invoked only if entity is on a service tree. Extracts the entity
1140 * from that tree, and if necessary and allowed, puts it on the idle 1154 * from that tree, and if necessary and allowed, puts it into the idle
1141 * tree. 1155 * tree.
1142 */ 1156 */
1143bool __bfq_deactivate_entity(struct bfq_entity *entity, bool ins_into_idle_tree) 1157bool __bfq_deactivate_entity(struct bfq_entity *entity, bool ins_into_idle_tree)
@@ -1158,8 +1172,10 @@ bool __bfq_deactivate_entity(struct bfq_entity *entity, bool ins_into_idle_tree)
1158 st = bfq_entity_service_tree(entity); 1172 st = bfq_entity_service_tree(entity);
1159 is_in_service = entity == sd->in_service_entity; 1173 is_in_service = entity == sd->in_service_entity;
1160 1174
1161 if (is_in_service) 1175 if (is_in_service) {
1162 bfq_calc_finish(entity, entity->service); 1176 bfq_calc_finish(entity, entity->service);
1177 sd->in_service_entity = NULL;
1178 }
1163 1179
1164 if (entity->tree == &st->active) 1180 if (entity->tree == &st->active)
1165 bfq_active_extract(st, entity); 1181 bfq_active_extract(st, entity);
@@ -1177,7 +1193,7 @@ bool __bfq_deactivate_entity(struct bfq_entity *entity, bool ins_into_idle_tree)
1177/** 1193/**
1178 * bfq_deactivate_entity - deactivate an entity representing a bfq_queue. 1194 * bfq_deactivate_entity - deactivate an entity representing a bfq_queue.
1179 * @entity: the entity to deactivate. 1195 * @entity: the entity to deactivate.
1180 * @ins_into_idle_tree: true if the entity can be put on the idle tree 1196 * @ins_into_idle_tree: true if the entity can be put into the idle tree
1181 */ 1197 */
1182static void bfq_deactivate_entity(struct bfq_entity *entity, 1198static void bfq_deactivate_entity(struct bfq_entity *entity,
1183 bool ins_into_idle_tree, 1199 bool ins_into_idle_tree,
@@ -1208,16 +1224,29 @@ static void bfq_deactivate_entity(struct bfq_entity *entity,
1208 */ 1224 */
1209 bfq_update_next_in_service(sd, NULL); 1225 bfq_update_next_in_service(sd, NULL);
1210 1226
1211 if (sd->next_in_service) 1227 if (sd->next_in_service || sd->in_service_entity) {
1212 /* 1228 /*
1213 * The parent entity is still backlogged, 1229 * The parent entity is still active, because
1214 * because next_in_service is not NULL. So, no 1230 * either next_in_service or in_service_entity
1215 * further upwards deactivation must be 1231 * is not NULL. So, no further upwards
1216 * performed. Yet, next_in_service has 1232 * deactivation must be performed. Yet,
1217 * changed. Then the schedule does need to be 1233 * next_in_service has changed. Then the
1218 * updated upwards. 1234 * schedule does need to be updated upwards.
1235 *
1236 * NOTE If in_service_entity is not NULL, then
1237 * next_in_service may happen to be NULL,
1238 * although the parent entity is evidently
1239 * active. This happens if 1) the entity
1240 * pointed by in_service_entity is the only
1241 * active entity in the parent entity, and 2)
1242 * according to the definition of
1243 * next_in_service, the in_service_entity
1244 * cannot be considered as
1245 * next_in_service. See the comments on the
1246 * definition of next_in_service for details.
1219 */ 1247 */
1220 break; 1248 break;
1249 }
1221 1250
1222 /* 1251 /*
1223 * If we get here, then the parent is no more 1252 * If we get here, then the parent is no more
@@ -1494,47 +1523,34 @@ struct bfq_queue *bfq_get_next_queue(struct bfq_data *bfqd)
1494 1523
1495 /* 1524 /*
1496 * If entity is no longer a candidate for next 1525 * If entity is no longer a candidate for next
1497 * service, then we extract it from its active tree, 1526 * service, then it must be extracted from its active
1498 * for the following reason. To further boost the 1527 * tree, so as to make sure that it won't be
1499 * throughput in some special case, BFQ needs to know 1528 * considered when computing next_in_service. See the
1500 * which is the next candidate entity to serve, while 1529 * comments on the function
1501 * there is already an entity in service. In this 1530 * bfq_no_longer_next_in_service() for details.
1502 * respect, to make it easy to compute/update the next
1503 * candidate entity to serve after the current
1504 * candidate has been set in service, there is a case
1505 * where it is necessary to extract the current
1506 * candidate from its service tree. Such a case is
1507 * when the entity just set in service cannot be also
1508 * a candidate for next service. Details about when
1509 * this conditions holds are reported in the comments
1510 * on the function bfq_no_longer_next_in_service()
1511 * invoked below.
1512 */ 1531 */
1513 if (bfq_no_longer_next_in_service(entity)) 1532 if (bfq_no_longer_next_in_service(entity))
1514 bfq_active_extract(bfq_entity_service_tree(entity), 1533 bfq_active_extract(bfq_entity_service_tree(entity),
1515 entity); 1534 entity);
1516 1535
1517 /* 1536 /*
1518 * For the same reason why we may have just extracted 1537 * Even if entity is not to be extracted according to
1519 * entity from its active tree, we may need to update 1538 * the above check, a descendant entity may get
1520 * next_in_service for the sched_data of entity too, 1539 * extracted in one of the next iterations of this
1521 * regardless of whether entity has been extracted. 1540 * loop. Such an event could cause a change in
1522 * In fact, even if entity has not been extracted, a 1541 * next_in_service for the level of the descendant
1523 * descendant entity may get extracted. Such an event 1542 * entity, and thus possibly back to this level.
1524 * would cause a change in next_in_service for the
1525 * level of the descendant entity, and thus possibly
1526 * back to upper levels.
1527 * 1543 *
1528 * We cannot perform the resulting needed update 1544 * However, we cannot perform the resulting needed
1529 * before the end of this loop, because, to know which 1545 * update of next_in_service for this level before the
1530 * is the correct next-to-serve candidate entity for 1546 * end of the whole loop, because, to know which is
1531 * each level, we need first to find the leaf entity 1547 * the correct next-to-serve candidate entity for each
1532 * to set in service. In fact, only after we know 1548 * level, we need first to find the leaf entity to set
1533 * which is the next-to-serve leaf entity, we can 1549 * in service. In fact, only after we know which is
1534 * discover whether the parent entity of the leaf 1550 * the next-to-serve leaf entity, we can discover
1535 * entity becomes the next-to-serve, and so on. 1551 * whether the parent entity of the leaf entity
1552 * becomes the next-to-serve, and so on.
1536 */ 1553 */
1537
1538 } 1554 }
1539 1555
1540 bfqq = bfq_entity_to_bfqq(entity); 1556 bfqq = bfq_entity_to_bfqq(entity);
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 83e92beb3c9f..9b1ea478577b 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -387,9 +387,11 @@ static void bio_integrity_verify_fn(struct work_struct *work)
387 */ 387 */
388bool __bio_integrity_endio(struct bio *bio) 388bool __bio_integrity_endio(struct bio *bio)
389{ 389{
390 if (bio_op(bio) == REQ_OP_READ && !bio->bi_status) { 390 struct blk_integrity *bi = bdev_get_integrity(bio->bi_bdev);
391 struct bio_integrity_payload *bip = bio_integrity(bio); 391 struct bio_integrity_payload *bip = bio_integrity(bio);
392 392
393 if (bio_op(bio) == REQ_OP_READ && !bio->bi_status &&
394 (bip->bip_flags & BIP_BLOCK_INTEGRITY) && bi->profile->verify_fn) {
393 INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); 395 INIT_WORK(&bip->bip_work, bio_integrity_verify_fn);
394 queue_work(kintegrityd_wq, &bip->bip_work); 396 queue_work(kintegrityd_wq, &bip->bip_work);
395 return false; 397 return false;
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 9ebc2945f991..4f927a58dff8 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -75,6 +75,8 @@ static const char *const blk_queue_flag_name[] = {
75 QUEUE_FLAG_NAME(STATS), 75 QUEUE_FLAG_NAME(STATS),
76 QUEUE_FLAG_NAME(POLL_STATS), 76 QUEUE_FLAG_NAME(POLL_STATS),
77 QUEUE_FLAG_NAME(REGISTERED), 77 QUEUE_FLAG_NAME(REGISTERED),
78 QUEUE_FLAG_NAME(SCSI_PASSTHROUGH),
79 QUEUE_FLAG_NAME(QUIESCED),
78}; 80};
79#undef QUEUE_FLAG_NAME 81#undef QUEUE_FLAG_NAME
80 82
@@ -265,6 +267,7 @@ static const char *const cmd_flag_name[] = {
265 CMD_FLAG_NAME(RAHEAD), 267 CMD_FLAG_NAME(RAHEAD),
266 CMD_FLAG_NAME(BACKGROUND), 268 CMD_FLAG_NAME(BACKGROUND),
267 CMD_FLAG_NAME(NOUNMAP), 269 CMD_FLAG_NAME(NOUNMAP),
270 CMD_FLAG_NAME(NOWAIT),
268}; 271};
269#undef CMD_FLAG_NAME 272#undef CMD_FLAG_NAME
270 273
diff --git a/block/blk-mq-pci.c b/block/blk-mq-pci.c
index 0c3354cf3552..76944e3271bf 100644
--- a/block/blk-mq-pci.c
+++ b/block/blk-mq-pci.c
@@ -36,12 +36,18 @@ int blk_mq_pci_map_queues(struct blk_mq_tag_set *set, struct pci_dev *pdev)
36 for (queue = 0; queue < set->nr_hw_queues; queue++) { 36 for (queue = 0; queue < set->nr_hw_queues; queue++) {
37 mask = pci_irq_get_affinity(pdev, queue); 37 mask = pci_irq_get_affinity(pdev, queue);
38 if (!mask) 38 if (!mask)
39 return -EINVAL; 39 goto fallback;
40 40
41 for_each_cpu(cpu, mask) 41 for_each_cpu(cpu, mask)
42 set->mq_map[cpu] = queue; 42 set->mq_map[cpu] = queue;
43 } 43 }
44 44
45 return 0; 45 return 0;
46
47fallback:
48 WARN_ON_ONCE(set->nr_hw_queues > 1);
49 for_each_possible_cpu(cpu)
50 set->mq_map[cpu] = 0;
51 return 0;
46} 52}
47EXPORT_SYMBOL_GPL(blk_mq_pci_map_queues); 53EXPORT_SYMBOL_GPL(blk_mq_pci_map_queues);
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 041f7b7fa0d6..4603b115e234 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -301,11 +301,12 @@ static struct request *blk_mq_get_request(struct request_queue *q,
301 struct elevator_queue *e = q->elevator; 301 struct elevator_queue *e = q->elevator;
302 struct request *rq; 302 struct request *rq;
303 unsigned int tag; 303 unsigned int tag;
304 struct blk_mq_ctx *local_ctx = NULL;
304 305
305 blk_queue_enter_live(q); 306 blk_queue_enter_live(q);
306 data->q = q; 307 data->q = q;
307 if (likely(!data->ctx)) 308 if (likely(!data->ctx))
308 data->ctx = blk_mq_get_ctx(q); 309 data->ctx = local_ctx = blk_mq_get_ctx(q);
309 if (likely(!data->hctx)) 310 if (likely(!data->hctx))
310 data->hctx = blk_mq_map_queue(q, data->ctx->cpu); 311 data->hctx = blk_mq_map_queue(q, data->ctx->cpu);
311 if (op & REQ_NOWAIT) 312 if (op & REQ_NOWAIT)
@@ -324,6 +325,10 @@ static struct request *blk_mq_get_request(struct request_queue *q,
324 325
325 tag = blk_mq_get_tag(data); 326 tag = blk_mq_get_tag(data);
326 if (tag == BLK_MQ_TAG_FAIL) { 327 if (tag == BLK_MQ_TAG_FAIL) {
328 if (local_ctx) {
329 blk_mq_put_ctx(local_ctx);
330 data->ctx = NULL;
331 }
327 blk_queue_exit(q); 332 blk_queue_exit(q);
328 return NULL; 333 return NULL;
329 } 334 }
@@ -355,13 +360,13 @@ struct request *blk_mq_alloc_request(struct request_queue *q, unsigned int op,
355 return ERR_PTR(ret); 360 return ERR_PTR(ret);
356 361
357 rq = blk_mq_get_request(q, NULL, op, &alloc_data); 362 rq = blk_mq_get_request(q, NULL, op, &alloc_data);
358
359 blk_mq_put_ctx(alloc_data.ctx);
360 blk_queue_exit(q); 363 blk_queue_exit(q);
361 364
362 if (!rq) 365 if (!rq)
363 return ERR_PTR(-EWOULDBLOCK); 366 return ERR_PTR(-EWOULDBLOCK);
364 367
368 blk_mq_put_ctx(alloc_data.ctx);
369
365 rq->__data_len = 0; 370 rq->__data_len = 0;
366 rq->__sector = (sector_t) -1; 371 rq->__sector = (sector_t) -1;
367 rq->bio = rq->biotail = NULL; 372 rq->bio = rq->biotail = NULL;
@@ -406,7 +411,6 @@ struct request *blk_mq_alloc_request_hctx(struct request_queue *q,
406 alloc_data.ctx = __blk_mq_get_ctx(q, cpu); 411 alloc_data.ctx = __blk_mq_get_ctx(q, cpu);
407 412
408 rq = blk_mq_get_request(q, NULL, op, &alloc_data); 413 rq = blk_mq_get_request(q, NULL, op, &alloc_data);
409
410 blk_queue_exit(q); 414 blk_queue_exit(q);
411 415
412 if (!rq) 416 if (!rq)
@@ -679,8 +683,8 @@ EXPORT_SYMBOL(blk_mq_kick_requeue_list);
679void blk_mq_delay_kick_requeue_list(struct request_queue *q, 683void blk_mq_delay_kick_requeue_list(struct request_queue *q,
680 unsigned long msecs) 684 unsigned long msecs)
681{ 685{
682 kblockd_schedule_delayed_work(&q->requeue_work, 686 kblockd_mod_delayed_work_on(WORK_CPU_UNBOUND, &q->requeue_work,
683 msecs_to_jiffies(msecs)); 687 msecs_to_jiffies(msecs));
684} 688}
685EXPORT_SYMBOL(blk_mq_delay_kick_requeue_list); 689EXPORT_SYMBOL(blk_mq_delay_kick_requeue_list);
686 690
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index a7285bf2831c..80f5481fe9f6 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -382,6 +382,14 @@ static unsigned int tg_iops_limit(struct throtl_grp *tg, int rw)
382 } \ 382 } \
383} while (0) 383} while (0)
384 384
385static inline unsigned int throtl_bio_data_size(struct bio *bio)
386{
387 /* assume it's one sector */
388 if (unlikely(bio_op(bio) == REQ_OP_DISCARD))
389 return 512;
390 return bio->bi_iter.bi_size;
391}
392
385static void throtl_qnode_init(struct throtl_qnode *qn, struct throtl_grp *tg) 393static void throtl_qnode_init(struct throtl_qnode *qn, struct throtl_grp *tg)
386{ 394{
387 INIT_LIST_HEAD(&qn->node); 395 INIT_LIST_HEAD(&qn->node);
@@ -934,6 +942,7 @@ static bool tg_with_in_bps_limit(struct throtl_grp *tg, struct bio *bio,
934 bool rw = bio_data_dir(bio); 942 bool rw = bio_data_dir(bio);
935 u64 bytes_allowed, extra_bytes, tmp; 943 u64 bytes_allowed, extra_bytes, tmp;
936 unsigned long jiffy_elapsed, jiffy_wait, jiffy_elapsed_rnd; 944 unsigned long jiffy_elapsed, jiffy_wait, jiffy_elapsed_rnd;
945 unsigned int bio_size = throtl_bio_data_size(bio);
937 946
938 jiffy_elapsed = jiffy_elapsed_rnd = jiffies - tg->slice_start[rw]; 947 jiffy_elapsed = jiffy_elapsed_rnd = jiffies - tg->slice_start[rw];
939 948
@@ -947,14 +956,14 @@ static bool tg_with_in_bps_limit(struct throtl_grp *tg, struct bio *bio,
947 do_div(tmp, HZ); 956 do_div(tmp, HZ);
948 bytes_allowed = tmp; 957 bytes_allowed = tmp;
949 958
950 if (tg->bytes_disp[rw] + bio->bi_iter.bi_size <= bytes_allowed) { 959 if (tg->bytes_disp[rw] + bio_size <= bytes_allowed) {
951 if (wait) 960 if (wait)
952 *wait = 0; 961 *wait = 0;
953 return true; 962 return true;
954 } 963 }
955 964
956 /* Calc approx time to dispatch */ 965 /* Calc approx time to dispatch */
957 extra_bytes = tg->bytes_disp[rw] + bio->bi_iter.bi_size - bytes_allowed; 966 extra_bytes = tg->bytes_disp[rw] + bio_size - bytes_allowed;
958 jiffy_wait = div64_u64(extra_bytes * HZ, tg_bps_limit(tg, rw)); 967 jiffy_wait = div64_u64(extra_bytes * HZ, tg_bps_limit(tg, rw));
959 968
960 if (!jiffy_wait) 969 if (!jiffy_wait)
@@ -1034,11 +1043,12 @@ static bool tg_may_dispatch(struct throtl_grp *tg, struct bio *bio,
1034static void throtl_charge_bio(struct throtl_grp *tg, struct bio *bio) 1043static void throtl_charge_bio(struct throtl_grp *tg, struct bio *bio)
1035{ 1044{
1036 bool rw = bio_data_dir(bio); 1045 bool rw = bio_data_dir(bio);
1046 unsigned int bio_size = throtl_bio_data_size(bio);
1037 1047
1038 /* Charge the bio to the group */ 1048 /* Charge the bio to the group */
1039 tg->bytes_disp[rw] += bio->bi_iter.bi_size; 1049 tg->bytes_disp[rw] += bio_size;
1040 tg->io_disp[rw]++; 1050 tg->io_disp[rw]++;
1041 tg->last_bytes_disp[rw] += bio->bi_iter.bi_size; 1051 tg->last_bytes_disp[rw] += bio_size;
1042 tg->last_io_disp[rw]++; 1052 tg->last_io_disp[rw]++;
1043 1053
1044 /* 1054 /*
diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index c4513b23f57a..dd56d7460cb9 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -29,26 +29,25 @@
29#include <scsi/scsi_cmnd.h> 29#include <scsi/scsi_cmnd.h>
30 30
31/** 31/**
32 * bsg_destroy_job - routine to teardown/delete a bsg job 32 * bsg_teardown_job - routine to teardown a bsg job
33 * @job: bsg_job that is to be torn down 33 * @job: bsg_job that is to be torn down
34 */ 34 */
35static void bsg_destroy_job(struct kref *kref) 35static void bsg_teardown_job(struct kref *kref)
36{ 36{
37 struct bsg_job *job = container_of(kref, struct bsg_job, kref); 37 struct bsg_job *job = container_of(kref, struct bsg_job, kref);
38 struct request *rq = job->req; 38 struct request *rq = job->req;
39 39
40 blk_end_request_all(rq, BLK_STS_OK);
41
42 put_device(job->dev); /* release reference for the request */ 40 put_device(job->dev); /* release reference for the request */
43 41
44 kfree(job->request_payload.sg_list); 42 kfree(job->request_payload.sg_list);
45 kfree(job->reply_payload.sg_list); 43 kfree(job->reply_payload.sg_list);
46 kfree(job); 44
45 blk_end_request_all(rq, BLK_STS_OK);
47} 46}
48 47
49void bsg_job_put(struct bsg_job *job) 48void bsg_job_put(struct bsg_job *job)
50{ 49{
51 kref_put(&job->kref, bsg_destroy_job); 50 kref_put(&job->kref, bsg_teardown_job);
52} 51}
53EXPORT_SYMBOL_GPL(bsg_job_put); 52EXPORT_SYMBOL_GPL(bsg_job_put);
54 53
@@ -100,7 +99,7 @@ EXPORT_SYMBOL_GPL(bsg_job_done);
100 */ 99 */
101static void bsg_softirq_done(struct request *rq) 100static void bsg_softirq_done(struct request *rq)
102{ 101{
103 struct bsg_job *job = rq->special; 102 struct bsg_job *job = blk_mq_rq_to_pdu(rq);
104 103
105 bsg_job_put(job); 104 bsg_job_put(job);
106} 105}
@@ -122,33 +121,20 @@ static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req)
122} 121}
123 122
124/** 123/**
125 * bsg_create_job - create the bsg_job structure for the bsg request 124 * bsg_prepare_job - create the bsg_job structure for the bsg request
126 * @dev: device that is being sent the bsg request 125 * @dev: device that is being sent the bsg request
127 * @req: BSG request that needs a job structure 126 * @req: BSG request that needs a job structure
128 */ 127 */
129static int bsg_create_job(struct device *dev, struct request *req) 128static int bsg_prepare_job(struct device *dev, struct request *req)
130{ 129{
131 struct request *rsp = req->next_rq; 130 struct request *rsp = req->next_rq;
132 struct request_queue *q = req->q;
133 struct scsi_request *rq = scsi_req(req); 131 struct scsi_request *rq = scsi_req(req);
134 struct bsg_job *job; 132 struct bsg_job *job = blk_mq_rq_to_pdu(req);
135 int ret; 133 int ret;
136 134
137 BUG_ON(req->special);
138
139 job = kzalloc(sizeof(struct bsg_job) + q->bsg_job_size, GFP_KERNEL);
140 if (!job)
141 return -ENOMEM;
142
143 req->special = job;
144 job->req = req;
145 if (q->bsg_job_size)
146 job->dd_data = (void *)&job[1];
147 job->request = rq->cmd; 135 job->request = rq->cmd;
148 job->request_len = rq->cmd_len; 136 job->request_len = rq->cmd_len;
149 job->reply = rq->sense; 137
150 job->reply_len = SCSI_SENSE_BUFFERSIZE; /* Size of sense buffer
151 * allocated */
152 if (req->bio) { 138 if (req->bio) {
153 ret = bsg_map_buffer(&job->request_payload, req); 139 ret = bsg_map_buffer(&job->request_payload, req);
154 if (ret) 140 if (ret)
@@ -187,7 +173,6 @@ static void bsg_request_fn(struct request_queue *q)
187{ 173{
188 struct device *dev = q->queuedata; 174 struct device *dev = q->queuedata;
189 struct request *req; 175 struct request *req;
190 struct bsg_job *job;
191 int ret; 176 int ret;
192 177
193 if (!get_device(dev)) 178 if (!get_device(dev))
@@ -199,7 +184,7 @@ static void bsg_request_fn(struct request_queue *q)
199 break; 184 break;
200 spin_unlock_irq(q->queue_lock); 185 spin_unlock_irq(q->queue_lock);
201 186
202 ret = bsg_create_job(dev, req); 187 ret = bsg_prepare_job(dev, req);
203 if (ret) { 188 if (ret) {
204 scsi_req(req)->result = ret; 189 scsi_req(req)->result = ret;
205 blk_end_request_all(req, BLK_STS_OK); 190 blk_end_request_all(req, BLK_STS_OK);
@@ -207,8 +192,7 @@ static void bsg_request_fn(struct request_queue *q)
207 continue; 192 continue;
208 } 193 }
209 194
210 job = req->special; 195 ret = q->bsg_job_fn(blk_mq_rq_to_pdu(req));
211 ret = q->bsg_job_fn(job);
212 spin_lock_irq(q->queue_lock); 196 spin_lock_irq(q->queue_lock);
213 if (ret) 197 if (ret)
214 break; 198 break;
@@ -219,6 +203,35 @@ static void bsg_request_fn(struct request_queue *q)
219 spin_lock_irq(q->queue_lock); 203 spin_lock_irq(q->queue_lock);
220} 204}
221 205
206static int bsg_init_rq(struct request_queue *q, struct request *req, gfp_t gfp)
207{
208 struct bsg_job *job = blk_mq_rq_to_pdu(req);
209 struct scsi_request *sreq = &job->sreq;
210
211 memset(job, 0, sizeof(*job));
212
213 scsi_req_init(sreq);
214 sreq->sense_len = SCSI_SENSE_BUFFERSIZE;
215 sreq->sense = kzalloc(sreq->sense_len, gfp);
216 if (!sreq->sense)
217 return -ENOMEM;
218
219 job->req = req;
220 job->reply = sreq->sense;
221 job->reply_len = sreq->sense_len;
222 job->dd_data = job + 1;
223
224 return 0;
225}
226
227static void bsg_exit_rq(struct request_queue *q, struct request *req)
228{
229 struct bsg_job *job = blk_mq_rq_to_pdu(req);
230 struct scsi_request *sreq = &job->sreq;
231
232 kfree(sreq->sense);
233}
234
222/** 235/**
223 * bsg_setup_queue - Create and add the bsg hooks so we can receive requests 236 * bsg_setup_queue - Create and add the bsg hooks so we can receive requests
224 * @dev: device to attach bsg device to 237 * @dev: device to attach bsg device to
@@ -235,7 +248,9 @@ struct request_queue *bsg_setup_queue(struct device *dev, char *name,
235 q = blk_alloc_queue(GFP_KERNEL); 248 q = blk_alloc_queue(GFP_KERNEL);
236 if (!q) 249 if (!q)
237 return ERR_PTR(-ENOMEM); 250 return ERR_PTR(-ENOMEM);
238 q->cmd_size = sizeof(struct scsi_request); 251 q->cmd_size = sizeof(struct bsg_job) + dd_job_size;
252 q->init_rq_fn = bsg_init_rq;
253 q->exit_rq_fn = bsg_exit_rq;
239 q->request_fn = bsg_request_fn; 254 q->request_fn = bsg_request_fn;
240 255
241 ret = blk_init_allocated_queue(q); 256 ret = blk_init_allocated_queue(q);
@@ -243,7 +258,6 @@ struct request_queue *bsg_setup_queue(struct device *dev, char *name,
243 goto out_cleanup_queue; 258 goto out_cleanup_queue;
244 259
245 q->queuedata = dev; 260 q->queuedata = dev;
246 q->bsg_job_size = dd_job_size;
247 q->bsg_job_fn = job_fn; 261 q->bsg_job_fn = job_fn;
248 queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q); 262 queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q);
249 queue_flag_set_unlocked(QUEUE_FLAG_SCSI_PASSTHROUGH, q); 263 queue_flag_set_unlocked(QUEUE_FLAG_SCSI_PASSTHROUGH, q);
diff --git a/drivers/acpi/acpi_apd.c b/drivers/acpi/acpi_apd.c
index fc6c416f8724..d5999eb41c00 100644
--- a/drivers/acpi/acpi_apd.c
+++ b/drivers/acpi/acpi_apd.c
@@ -180,8 +180,8 @@ static const struct acpi_device_id acpi_apd_device_ids[] = {
180 { "APMC0D0F", APD_ADDR(xgene_i2c_desc) }, 180 { "APMC0D0F", APD_ADDR(xgene_i2c_desc) },
181 { "BRCM900D", APD_ADDR(vulcan_spi_desc) }, 181 { "BRCM900D", APD_ADDR(vulcan_spi_desc) },
182 { "CAV900D", APD_ADDR(vulcan_spi_desc) }, 182 { "CAV900D", APD_ADDR(vulcan_spi_desc) },
183 { "HISI0A21", APD_ADDR(hip07_i2c_desc) }, 183 { "HISI02A1", APD_ADDR(hip07_i2c_desc) },
184 { "HISI0A22", APD_ADDR(hip08_i2c_desc) }, 184 { "HISI02A2", APD_ADDR(hip08_i2c_desc) },
185#endif 185#endif
186 { } 186 { }
187}; 187};
diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index e51a1e98e62f..f88caf5aab76 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -85,6 +85,7 @@ static const struct lpss_device_desc lpss_dma_desc = {
85}; 85};
86 86
87struct lpss_private_data { 87struct lpss_private_data {
88 struct acpi_device *adev;
88 void __iomem *mmio_base; 89 void __iomem *mmio_base;
89 resource_size_t mmio_size; 90 resource_size_t mmio_size;
90 unsigned int fixed_clk_rate; 91 unsigned int fixed_clk_rate;
@@ -155,6 +156,12 @@ static struct pwm_lookup byt_pwm_lookup[] = {
155 156
156static void byt_pwm_setup(struct lpss_private_data *pdata) 157static void byt_pwm_setup(struct lpss_private_data *pdata)
157{ 158{
159 struct acpi_device *adev = pdata->adev;
160
161 /* Only call pwm_add_table for the first PWM controller */
162 if (!adev->pnp.unique_id || strcmp(adev->pnp.unique_id, "1"))
163 return;
164
158 if (!acpi_dev_present("INT33FD", NULL, -1)) 165 if (!acpi_dev_present("INT33FD", NULL, -1))
159 pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup)); 166 pwm_add_table(byt_pwm_lookup, ARRAY_SIZE(byt_pwm_lookup));
160} 167}
@@ -180,6 +187,12 @@ static struct pwm_lookup bsw_pwm_lookup[] = {
180 187
181static void bsw_pwm_setup(struct lpss_private_data *pdata) 188static void bsw_pwm_setup(struct lpss_private_data *pdata)
182{ 189{
190 struct acpi_device *adev = pdata->adev;
191
192 /* Only call pwm_add_table for the first PWM controller */
193 if (!adev->pnp.unique_id || strcmp(adev->pnp.unique_id, "1"))
194 return;
195
183 pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup)); 196 pwm_add_table(bsw_pwm_lookup, ARRAY_SIZE(bsw_pwm_lookup));
184} 197}
185 198
@@ -456,6 +469,7 @@ static int acpi_lpss_create_device(struct acpi_device *adev,
456 goto err_out; 469 goto err_out;
457 } 470 }
458 471
472 pdata->adev = adev;
459 pdata->dev_desc = dev_desc; 473 pdata->dev_desc = dev_desc;
460 474
461 if (dev_desc->setup) 475 if (dev_desc->setup)
diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c
index 8c4e0a18460a..bf22c29d2517 100644
--- a/drivers/acpi/acpi_watchdog.c
+++ b/drivers/acpi/acpi_watchdog.c
@@ -86,7 +86,12 @@ void __init acpi_watchdog_init(void)
86 86
87 found = false; 87 found = false;
88 resource_list_for_each_entry(rentry, &resource_list) { 88 resource_list_for_each_entry(rentry, &resource_list) {
89 if (resource_contains(rentry->res, &res)) { 89 if (rentry->res->flags == res.flags &&
90 resource_overlaps(rentry->res, &res)) {
91 if (res.start < rentry->res->start)
92 rentry->res->start = res.start;
93 if (res.end > rentry->res->end)
94 rentry->res->end = res.end;
90 found = true; 95 found = true;
91 break; 96 break;
92 } 97 }
diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c
index 538c61677c10..783f4c838aee 100644
--- a/drivers/acpi/acpica/nsxfeval.c
+++ b/drivers/acpi/acpica/nsxfeval.c
@@ -100,9 +100,13 @@ acpi_evaluate_object_typed(acpi_handle handle,
100 free_buffer_on_error = TRUE; 100 free_buffer_on_error = TRUE;
101 } 101 }
102 102
103 status = acpi_get_handle(handle, pathname, &target_handle); 103 if (pathname) {
104 if (ACPI_FAILURE(status)) { 104 status = acpi_get_handle(handle, pathname, &target_handle);
105 return_ACPI_STATUS(status); 105 if (ACPI_FAILURE(status)) {
106 return_ACPI_STATUS(status);
107 }
108 } else {
109 target_handle = handle;
106 } 110 }
107 111
108 full_pathname = acpi_ns_get_external_pathname(target_handle); 112 full_pathname = acpi_ns_get_external_pathname(target_handle);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 62068a5e814f..ae3d6d152633 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1741,7 +1741,7 @@ error:
1741 * functioning ECDT EC first in order to handle the events. 1741 * functioning ECDT EC first in order to handle the events.
1742 * https://bugzilla.kernel.org/show_bug.cgi?id=115021 1742 * https://bugzilla.kernel.org/show_bug.cgi?id=115021
1743 */ 1743 */
1744int __init acpi_ec_ecdt_start(void) 1744static int __init acpi_ec_ecdt_start(void)
1745{ 1745{
1746 acpi_handle handle; 1746 acpi_handle handle;
1747 1747
@@ -2003,20 +2003,17 @@ static inline void acpi_ec_query_exit(void)
2003int __init acpi_ec_init(void) 2003int __init acpi_ec_init(void)
2004{ 2004{
2005 int result; 2005 int result;
2006 int ecdt_fail, dsdt_fail;
2006 2007
2007 /* register workqueue for _Qxx evaluations */ 2008 /* register workqueue for _Qxx evaluations */
2008 result = acpi_ec_query_init(); 2009 result = acpi_ec_query_init();
2009 if (result) 2010 if (result)
2010 goto err_exit; 2011 return result;
2011 /* Now register the driver for the EC */
2012 result = acpi_bus_register_driver(&acpi_ec_driver);
2013 if (result)
2014 goto err_exit;
2015 2012
2016err_exit: 2013 /* Drivers must be started after acpi_ec_query_init() */
2017 if (result) 2014 ecdt_fail = acpi_ec_ecdt_start();
2018 acpi_ec_query_exit(); 2015 dsdt_fail = acpi_bus_register_driver(&acpi_ec_driver);
2019 return result; 2016 return ecdt_fail && dsdt_fail ? -ENODEV : 0;
2020} 2017}
2021 2018
2022/* EC driver currently not unloadable */ 2019/* EC driver currently not unloadable */
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index 58dd7ab3c653..3f5af4d7a739 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -185,7 +185,6 @@ typedef int (*acpi_ec_query_func) (void *data);
185int acpi_ec_init(void); 185int acpi_ec_init(void);
186int acpi_ec_ecdt_probe(void); 186int acpi_ec_ecdt_probe(void);
187int acpi_ec_dsdt_probe(void); 187int acpi_ec_dsdt_probe(void);
188int acpi_ec_ecdt_start(void);
189void acpi_ec_block_transactions(void); 188void acpi_ec_block_transactions(void);
190void acpi_ec_unblock_transactions(void); 189void acpi_ec_unblock_transactions(void);
191int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit, 190int acpi_ec_add_query_handler(struct acpi_ec *ec, u8 query_bit,
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 917c789f953d..476a52c60cf3 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -1047,7 +1047,7 @@ static struct fwnode_handle *acpi_graph_get_child_prop_value(
1047 fwnode_for_each_child_node(fwnode, child) { 1047 fwnode_for_each_child_node(fwnode, child) {
1048 u32 nr; 1048 u32 nr;
1049 1049
1050 if (!fwnode_property_read_u32(fwnode, prop_name, &nr)) 1050 if (fwnode_property_read_u32(child, prop_name, &nr))
1051 continue; 1051 continue;
1052 1052
1053 if (val == nr) 1053 if (val == nr)
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 33897298f03e..70fd5502c284 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -2084,7 +2084,6 @@ int __init acpi_scan_init(void)
2084 2084
2085 acpi_gpe_apply_masked_gpes(); 2085 acpi_gpe_apply_masked_gpes();
2086 acpi_update_all_gpes(); 2086 acpi_update_all_gpes();
2087 acpi_ec_ecdt_start();
2088 2087
2089 acpi_scan_initialized = true; 2088 acpi_scan_initialized = true;
2090 2089
diff --git a/drivers/acpi/spcr.c b/drivers/acpi/spcr.c
index 4ac3e06b41d8..98aa8c808a33 100644
--- a/drivers/acpi/spcr.c
+++ b/drivers/acpi/spcr.c
@@ -17,6 +17,16 @@
17#include <linux/serial_core.h> 17#include <linux/serial_core.h>
18 18
19/* 19/*
20 * Erratum 44 for QDF2432v1 and QDF2400v1 SoCs describes the BUSY bit as
21 * occasionally getting stuck as 1. To avoid the potential for a hang, check
22 * TXFE == 0 instead of BUSY == 1. This may not be suitable for all UART
23 * implementations, so only do so if an affected platform is detected in
24 * parse_spcr().
25 */
26bool qdf2400_e44_present;
27EXPORT_SYMBOL(qdf2400_e44_present);
28
29/*
20 * Some Qualcomm Datacenter Technologies SoCs have a defective UART BUSY bit. 30 * Some Qualcomm Datacenter Technologies SoCs have a defective UART BUSY bit.
21 * Detect them by examining the OEM fields in the SPCR header, similiar to PCI 31 * Detect them by examining the OEM fields in the SPCR header, similiar to PCI
22 * quirk detection in pci_mcfg.c. 32 * quirk detection in pci_mcfg.c.
@@ -147,8 +157,30 @@ int __init parse_spcr(bool earlycon)
147 goto done; 157 goto done;
148 } 158 }
149 159
150 if (qdf2400_erratum_44_present(&table->header)) 160 /*
151 uart = "qdf2400_e44"; 161 * If the E44 erratum is required, then we need to tell the pl011
162 * driver to implement the work-around.
163 *
164 * The global variable is used by the probe function when it
165 * creates the UARTs, whether or not they're used as a console.
166 *
167 * If the user specifies "traditional" earlycon, the qdf2400_e44
168 * console name matches the EARLYCON_DECLARE() statement, and
169 * SPCR is not used. Parameter "earlycon" is false.
170 *
171 * If the user specifies "SPCR" earlycon, then we need to update
172 * the console name so that it also says "qdf2400_e44". Parameter
173 * "earlycon" is true.
174 *
175 * For consistency, if we change the console name, then we do it
176 * for everyone, not just earlycon.
177 */
178 if (qdf2400_erratum_44_present(&table->header)) {
179 qdf2400_e44_present = true;
180 if (earlycon)
181 uart = "qdf2400_e44";
182 }
183
152 if (xgene_8250_erratum_present(table)) 184 if (xgene_8250_erratum_present(table))
153 iotype = "mmio32"; 185 iotype = "mmio32";
154 186
diff --git a/drivers/android/binder.c b/drivers/android/binder.c
index f7665c31feca..831cdd7d197d 100644
--- a/drivers/android/binder.c
+++ b/drivers/android/binder.c
@@ -3362,7 +3362,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
3362 const char *failure_string; 3362 const char *failure_string;
3363 struct binder_buffer *buffer; 3363 struct binder_buffer *buffer;
3364 3364
3365 if (proc->tsk != current) 3365 if (proc->tsk != current->group_leader)
3366 return -EINVAL; 3366 return -EINVAL;
3367 3367
3368 if ((vma->vm_end - vma->vm_start) > SZ_4M) 3368 if ((vma->vm_end - vma->vm_start) > SZ_4M)
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 948fc86980a1..363fc5330c21 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -215,7 +215,7 @@ config SATA_FSL
215 215
216config SATA_GEMINI 216config SATA_GEMINI
217 tristate "Gemini SATA bridge support" 217 tristate "Gemini SATA bridge support"
218 depends on PATA_FTIDE010 218 depends on ARCH_GEMINI || COMPILE_TEST
219 default ARCH_GEMINI 219 default ARCH_GEMINI
220 help 220 help
221 This enabled support for the FTIDE010 to SATA bridge 221 This enabled support for the FTIDE010 to SATA bridge
@@ -613,7 +613,7 @@ config PATA_FTIDE010
613 tristate "Faraday Technology FTIDE010 PATA support" 613 tristate "Faraday Technology FTIDE010 PATA support"
614 depends on OF 614 depends on OF
615 depends on ARM 615 depends on ARM
616 default ARCH_GEMINI 616 depends on SATA_GEMINI
617 help 617 help
618 This option enables support for the Faraday FTIDE010 618 This option enables support for the Faraday FTIDE010
619 PATA controller found in the Cortina Gemini SoCs. 619 PATA controller found in the Cortina Gemini SoCs.
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 8453f9a4682f..fa7dd4394c02 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2083,7 +2083,7 @@ unsigned int ata_read_log_page(struct ata_device *dev, u8 log,
2083retry: 2083retry:
2084 ata_tf_init(dev, &tf); 2084 ata_tf_init(dev, &tf);
2085 if (dev->dma_mode && ata_id_has_read_log_dma_ext(dev->id) && 2085 if (dev->dma_mode && ata_id_has_read_log_dma_ext(dev->id) &&
2086 !(dev->horkage & ATA_HORKAGE_NO_NCQ_LOG)) { 2086 !(dev->horkage & ATA_HORKAGE_NO_DMA_LOG)) {
2087 tf.command = ATA_CMD_READ_LOG_DMA_EXT; 2087 tf.command = ATA_CMD_READ_LOG_DMA_EXT;
2088 tf.protocol = ATA_PROT_DMA; 2088 tf.protocol = ATA_PROT_DMA;
2089 dma = true; 2089 dma = true;
@@ -2102,8 +2102,8 @@ retry:
2102 buf, sectors * ATA_SECT_SIZE, 0); 2102 buf, sectors * ATA_SECT_SIZE, 0);
2103 2103
2104 if (err_mask && dma) { 2104 if (err_mask && dma) {
2105 dev->horkage |= ATA_HORKAGE_NO_NCQ_LOG; 2105 dev->horkage |= ATA_HORKAGE_NO_DMA_LOG;
2106 ata_dev_warn(dev, "READ LOG DMA EXT failed, trying unqueued\n"); 2106 ata_dev_warn(dev, "READ LOG DMA EXT failed, trying PIO\n");
2107 goto retry; 2107 goto retry;
2108 } 2108 }
2109 2109
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index b70bcf6d2914..3dbd05532c09 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1434,7 +1434,7 @@ void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev,
1434 1434
1435/** 1435/**
1436 * ata_eh_done - EH action complete 1436 * ata_eh_done - EH action complete
1437* @ap: target ATA port 1437 * @link: ATA link for which EH actions are complete
1438 * @dev: target ATA dev for per-dev action (can be NULL) 1438 * @dev: target ATA dev for per-dev action (can be NULL)
1439 * @action: action just completed 1439 * @action: action just completed
1440 * 1440 *
@@ -1576,7 +1576,7 @@ unsigned int atapi_eh_tur(struct ata_device *dev, u8 *r_sense_key)
1576 1576
1577/** 1577/**
1578 * ata_eh_request_sense - perform REQUEST_SENSE_DATA_EXT 1578 * ata_eh_request_sense - perform REQUEST_SENSE_DATA_EXT
1579 * @dev: device to perform REQUEST_SENSE_SENSE_DATA_EXT to 1579 * @qc: qc to perform REQUEST_SENSE_SENSE_DATA_EXT to
1580 * @cmd: scsi command for which the sense code should be set 1580 * @cmd: scsi command for which the sense code should be set
1581 * 1581 *
1582 * Perform REQUEST_SENSE_DATA_EXT after the device reported CHECK 1582 * Perform REQUEST_SENSE_DATA_EXT after the device reported CHECK
@@ -4175,7 +4175,6 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)
4175 struct ata_link *link; 4175 struct ata_link *link;
4176 struct ata_device *dev; 4176 struct ata_device *dev;
4177 unsigned long flags; 4177 unsigned long flags;
4178 int rc = 0;
4179 4178
4180 /* are we resuming? */ 4179 /* are we resuming? */
4181 spin_lock_irqsave(ap->lock, flags); 4180 spin_lock_irqsave(ap->lock, flags);
@@ -4202,7 +4201,7 @@ static void ata_eh_handle_port_resume(struct ata_port *ap)
4202 ata_acpi_set_state(ap, ap->pm_mesg); 4201 ata_acpi_set_state(ap, ap->pm_mesg);
4203 4202
4204 if (ap->ops->port_resume) 4203 if (ap->ops->port_resume)
4205 rc = ap->ops->port_resume(ap); 4204 ap->ops->port_resume(ap);
4206 4205
4207 /* tell ACPI that we're resuming */ 4206 /* tell ACPI that we're resuming */
4208 ata_acpi_on_resume(ap); 4207 ata_acpi_on_resume(ap);
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index d462c5a3a7ef..44ba292f2cd7 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3030,10 +3030,12 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc)
3030static struct ata_device *ata_find_dev(struct ata_port *ap, int devno) 3030static struct ata_device *ata_find_dev(struct ata_port *ap, int devno)
3031{ 3031{
3032 if (!sata_pmp_attached(ap)) { 3032 if (!sata_pmp_attached(ap)) {
3033 if (likely(devno < ata_link_max_devices(&ap->link))) 3033 if (likely(devno >= 0 &&
3034 devno < ata_link_max_devices(&ap->link)))
3034 return &ap->link.device[devno]; 3035 return &ap->link.device[devno];
3035 } else { 3036 } else {
3036 if (likely(devno < ap->nr_pmp_links)) 3037 if (likely(devno >= 0 &&
3038 devno < ap->nr_pmp_links))
3037 return &ap->pmp_link[devno].device[0]; 3039 return &ap->pmp_link[devno].device[0];
3038 } 3040 }
3039 3041
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index ee9844758736..537d11869069 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -858,6 +858,14 @@ static const struct of_device_id sata_rcar_match[] = {
858 .compatible = "renesas,sata-r8a7795", 858 .compatible = "renesas,sata-r8a7795",
859 .data = (void *)RCAR_GEN2_SATA 859 .data = (void *)RCAR_GEN2_SATA
860 }, 860 },
861 {
862 .compatible = "renesas,rcar-gen2-sata",
863 .data = (void *)RCAR_GEN2_SATA
864 },
865 {
866 .compatible = "renesas,rcar-gen3-sata",
867 .data = (void *)RCAR_GEN2_SATA
868 },
861 { }, 869 { },
862}; 870};
863MODULE_DEVICE_TABLE(of, sata_rcar_match); 871MODULE_DEVICE_TABLE(of, sata_rcar_match);
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c
index b9f907eedbf7..bfbe1e154128 100644
--- a/drivers/base/firmware_class.c
+++ b/drivers/base/firmware_class.c
@@ -30,7 +30,6 @@
30#include <linux/syscore_ops.h> 30#include <linux/syscore_ops.h>
31#include <linux/reboot.h> 31#include <linux/reboot.h>
32#include <linux/security.h> 32#include <linux/security.h>
33#include <linux/swait.h>
34 33
35#include <generated/utsrelease.h> 34#include <generated/utsrelease.h>
36 35
@@ -112,13 +111,13 @@ static inline long firmware_loading_timeout(void)
112 * state of the firmware loading. 111 * state of the firmware loading.
113 */ 112 */
114struct fw_state { 113struct fw_state {
115 struct swait_queue_head wq; 114 struct completion completion;
116 enum fw_status status; 115 enum fw_status status;
117}; 116};
118 117
119static void fw_state_init(struct fw_state *fw_st) 118static void fw_state_init(struct fw_state *fw_st)
120{ 119{
121 init_swait_queue_head(&fw_st->wq); 120 init_completion(&fw_st->completion);
122 fw_st->status = FW_STATUS_UNKNOWN; 121 fw_st->status = FW_STATUS_UNKNOWN;
123} 122}
124 123
@@ -131,9 +130,7 @@ static int __fw_state_wait_common(struct fw_state *fw_st, long timeout)
131{ 130{
132 long ret; 131 long ret;
133 132
134 ret = swait_event_interruptible_timeout(fw_st->wq, 133 ret = wait_for_completion_killable_timeout(&fw_st->completion, timeout);
135 __fw_state_is_done(READ_ONCE(fw_st->status)),
136 timeout);
137 if (ret != 0 && fw_st->status == FW_STATUS_ABORTED) 134 if (ret != 0 && fw_st->status == FW_STATUS_ABORTED)
138 return -ENOENT; 135 return -ENOENT;
139 if (!ret) 136 if (!ret)
@@ -148,35 +145,34 @@ static void __fw_state_set(struct fw_state *fw_st,
148 WRITE_ONCE(fw_st->status, status); 145 WRITE_ONCE(fw_st->status, status);
149 146
150 if (status == FW_STATUS_DONE || status == FW_STATUS_ABORTED) 147 if (status == FW_STATUS_DONE || status == FW_STATUS_ABORTED)
151 swake_up(&fw_st->wq); 148 complete_all(&fw_st->completion);
152} 149}
153 150
154#define fw_state_start(fw_st) \ 151#define fw_state_start(fw_st) \
155 __fw_state_set(fw_st, FW_STATUS_LOADING) 152 __fw_state_set(fw_st, FW_STATUS_LOADING)
156#define fw_state_done(fw_st) \ 153#define fw_state_done(fw_st) \
157 __fw_state_set(fw_st, FW_STATUS_DONE) 154 __fw_state_set(fw_st, FW_STATUS_DONE)
155#define fw_state_aborted(fw_st) \
156 __fw_state_set(fw_st, FW_STATUS_ABORTED)
158#define fw_state_wait(fw_st) \ 157#define fw_state_wait(fw_st) \
159 __fw_state_wait_common(fw_st, MAX_SCHEDULE_TIMEOUT) 158 __fw_state_wait_common(fw_st, MAX_SCHEDULE_TIMEOUT)
160 159
161#ifndef CONFIG_FW_LOADER_USER_HELPER
162
163#define fw_state_is_aborted(fw_st) false
164
165#else /* CONFIG_FW_LOADER_USER_HELPER */
166
167static int __fw_state_check(struct fw_state *fw_st, enum fw_status status) 160static int __fw_state_check(struct fw_state *fw_st, enum fw_status status)
168{ 161{
169 return fw_st->status == status; 162 return fw_st->status == status;
170} 163}
171 164
165#define fw_state_is_aborted(fw_st) \
166 __fw_state_check(fw_st, FW_STATUS_ABORTED)
167
168#ifdef CONFIG_FW_LOADER_USER_HELPER
169
172#define fw_state_aborted(fw_st) \ 170#define fw_state_aborted(fw_st) \
173 __fw_state_set(fw_st, FW_STATUS_ABORTED) 171 __fw_state_set(fw_st, FW_STATUS_ABORTED)
174#define fw_state_is_done(fw_st) \ 172#define fw_state_is_done(fw_st) \
175 __fw_state_check(fw_st, FW_STATUS_DONE) 173 __fw_state_check(fw_st, FW_STATUS_DONE)
176#define fw_state_is_loading(fw_st) \ 174#define fw_state_is_loading(fw_st) \
177 __fw_state_check(fw_st, FW_STATUS_LOADING) 175 __fw_state_check(fw_st, FW_STATUS_LOADING)
178#define fw_state_is_aborted(fw_st) \
179 __fw_state_check(fw_st, FW_STATUS_ABORTED)
180#define fw_state_wait_timeout(fw_st, timeout) \ 176#define fw_state_wait_timeout(fw_st, timeout) \
181 __fw_state_wait_common(fw_st, timeout) 177 __fw_state_wait_common(fw_st, timeout)
182 178
@@ -1200,6 +1196,28 @@ _request_firmware_prepare(struct firmware **firmware_p, const char *name,
1200 return 1; /* need to load */ 1196 return 1; /* need to load */
1201} 1197}
1202 1198
1199/*
1200 * Batched requests need only one wake, we need to do this step last due to the
1201 * fallback mechanism. The buf is protected with kref_get(), and it won't be
1202 * released until the last user calls release_firmware().
1203 *
1204 * Failed batched requests are possible as well, in such cases we just share
1205 * the struct firmware_buf and won't release it until all requests are woken
1206 * and have gone through this same path.
1207 */
1208static void fw_abort_batch_reqs(struct firmware *fw)
1209{
1210 struct firmware_buf *buf;
1211
1212 /* Loaded directly? */
1213 if (!fw || !fw->priv)
1214 return;
1215
1216 buf = fw->priv;
1217 if (!fw_state_is_aborted(&buf->fw_st))
1218 fw_state_aborted(&buf->fw_st);
1219}
1220
1203/* called from request_firmware() and request_firmware_work_func() */ 1221/* called from request_firmware() and request_firmware_work_func() */
1204static int 1222static int
1205_request_firmware(const struct firmware **firmware_p, const char *name, 1223_request_firmware(const struct firmware **firmware_p, const char *name,
@@ -1243,6 +1261,7 @@ _request_firmware(const struct firmware **firmware_p, const char *name,
1243 1261
1244 out: 1262 out:
1245 if (ret < 0) { 1263 if (ret < 0) {
1264 fw_abort_batch_reqs(fw);
1246 release_firmware(fw); 1265 release_firmware(fw);
1247 fw = NULL; 1266 fw = NULL;
1248 } 1267 }
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index ef8334949b42..f321b96405f5 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -221,8 +221,7 @@ static void __loop_update_dio(struct loop_device *lo, bool dio)
221} 221}
222 222
223static int 223static int
224figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit, 224figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit)
225 loff_t logical_blocksize)
226{ 225{
227 loff_t size = get_size(offset, sizelimit, lo->lo_backing_file); 226 loff_t size = get_size(offset, sizelimit, lo->lo_backing_file);
228 sector_t x = (sector_t)size; 227 sector_t x = (sector_t)size;
@@ -234,12 +233,6 @@ figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit,
234 lo->lo_offset = offset; 233 lo->lo_offset = offset;
235 if (lo->lo_sizelimit != sizelimit) 234 if (lo->lo_sizelimit != sizelimit)
236 lo->lo_sizelimit = sizelimit; 235 lo->lo_sizelimit = sizelimit;
237 if (lo->lo_flags & LO_FLAGS_BLOCKSIZE) {
238 lo->lo_logical_blocksize = logical_blocksize;
239 blk_queue_physical_block_size(lo->lo_queue, lo->lo_blocksize);
240 blk_queue_logical_block_size(lo->lo_queue,
241 lo->lo_logical_blocksize);
242 }
243 set_capacity(lo->lo_disk, x); 236 set_capacity(lo->lo_disk, x);
244 bd_set_size(bdev, (loff_t)get_capacity(bdev->bd_disk) << 9); 237 bd_set_size(bdev, (loff_t)get_capacity(bdev->bd_disk) << 9);
245 /* let user-space know about the new size */ 238 /* let user-space know about the new size */
@@ -820,7 +813,6 @@ static void loop_config_discard(struct loop_device *lo)
820 struct file *file = lo->lo_backing_file; 813 struct file *file = lo->lo_backing_file;
821 struct inode *inode = file->f_mapping->host; 814 struct inode *inode = file->f_mapping->host;
822 struct request_queue *q = lo->lo_queue; 815 struct request_queue *q = lo->lo_queue;
823 int lo_bits = 9;
824 816
825 /* 817 /*
826 * We use punch hole to reclaim the free space used by the 818 * We use punch hole to reclaim the free space used by the
@@ -840,11 +832,9 @@ static void loop_config_discard(struct loop_device *lo)
840 832
841 q->limits.discard_granularity = inode->i_sb->s_blocksize; 833 q->limits.discard_granularity = inode->i_sb->s_blocksize;
842 q->limits.discard_alignment = 0; 834 q->limits.discard_alignment = 0;
843 if (lo->lo_flags & LO_FLAGS_BLOCKSIZE)
844 lo_bits = blksize_bits(lo->lo_logical_blocksize);
845 835
846 blk_queue_max_discard_sectors(q, UINT_MAX >> lo_bits); 836 blk_queue_max_discard_sectors(q, UINT_MAX >> 9);
847 blk_queue_max_write_zeroes_sectors(q, UINT_MAX >> lo_bits); 837 blk_queue_max_write_zeroes_sectors(q, UINT_MAX >> 9);
848 queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); 838 queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
849} 839}
850 840
@@ -938,7 +928,6 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
938 928
939 lo->use_dio = false; 929 lo->use_dio = false;
940 lo->lo_blocksize = lo_blocksize; 930 lo->lo_blocksize = lo_blocksize;
941 lo->lo_logical_blocksize = 512;
942 lo->lo_device = bdev; 931 lo->lo_device = bdev;
943 lo->lo_flags = lo_flags; 932 lo->lo_flags = lo_flags;
944 lo->lo_backing_file = file; 933 lo->lo_backing_file = file;
@@ -1104,7 +1093,6 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
1104 int err; 1093 int err;
1105 struct loop_func_table *xfer; 1094 struct loop_func_table *xfer;
1106 kuid_t uid = current_uid(); 1095 kuid_t uid = current_uid();
1107 int lo_flags = lo->lo_flags;
1108 1096
1109 if (lo->lo_encrypt_key_size && 1097 if (lo->lo_encrypt_key_size &&
1110 !uid_eq(lo->lo_key_owner, uid) && 1098 !uid_eq(lo->lo_key_owner, uid) &&
@@ -1137,26 +1125,9 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
1137 if (err) 1125 if (err)
1138 goto exit; 1126 goto exit;
1139 1127
1140 if (info->lo_flags & LO_FLAGS_BLOCKSIZE) {
1141 if (!(lo->lo_flags & LO_FLAGS_BLOCKSIZE))
1142 lo->lo_logical_blocksize = 512;
1143 lo->lo_flags |= LO_FLAGS_BLOCKSIZE;
1144 if (LO_INFO_BLOCKSIZE(info) != 512 &&
1145 LO_INFO_BLOCKSIZE(info) != 1024 &&
1146 LO_INFO_BLOCKSIZE(info) != 2048 &&
1147 LO_INFO_BLOCKSIZE(info) != 4096)
1148 return -EINVAL;
1149 if (LO_INFO_BLOCKSIZE(info) > lo->lo_blocksize)
1150 return -EINVAL;
1151 }
1152
1153 if (lo->lo_offset != info->lo_offset || 1128 if (lo->lo_offset != info->lo_offset ||
1154 lo->lo_sizelimit != info->lo_sizelimit || 1129 lo->lo_sizelimit != info->lo_sizelimit) {
1155 lo->lo_flags != lo_flags || 1130 if (figure_loop_size(lo, info->lo_offset, info->lo_sizelimit)) {
1156 ((lo->lo_flags & LO_FLAGS_BLOCKSIZE) &&
1157 lo->lo_logical_blocksize != LO_INFO_BLOCKSIZE(info))) {
1158 if (figure_loop_size(lo, info->lo_offset, info->lo_sizelimit,
1159 LO_INFO_BLOCKSIZE(info))) {
1160 err = -EFBIG; 1131 err = -EFBIG;
1161 goto exit; 1132 goto exit;
1162 } 1133 }
@@ -1348,8 +1319,7 @@ static int loop_set_capacity(struct loop_device *lo)
1348 if (unlikely(lo->lo_state != Lo_bound)) 1319 if (unlikely(lo->lo_state != Lo_bound))
1349 return -ENXIO; 1320 return -ENXIO;
1350 1321
1351 return figure_loop_size(lo, lo->lo_offset, lo->lo_sizelimit, 1322 return figure_loop_size(lo, lo->lo_offset, lo->lo_sizelimit);
1352 lo->lo_logical_blocksize);
1353} 1323}
1354 1324
1355static int loop_set_dio(struct loop_device *lo, unsigned long arg) 1325static int loop_set_dio(struct loop_device *lo, unsigned long arg)
diff --git a/drivers/block/loop.h b/drivers/block/loop.h
index 2c096b9a17b8..fecd3f97ef8c 100644
--- a/drivers/block/loop.h
+++ b/drivers/block/loop.h
@@ -49,7 +49,6 @@ struct loop_device {
49 struct file * lo_backing_file; 49 struct file * lo_backing_file;
50 struct block_device *lo_device; 50 struct block_device *lo_device;
51 unsigned lo_blocksize; 51 unsigned lo_blocksize;
52 unsigned lo_logical_blocksize;
53 void *key_data; 52 void *key_data;
54 53
55 gfp_t old_gfp_mask; 54 gfp_t old_gfp_mask;
diff --git a/drivers/block/sunvdc.c b/drivers/block/sunvdc.c
index 6b16ead1da58..ad9749463d4f 100644
--- a/drivers/block/sunvdc.c
+++ b/drivers/block/sunvdc.c
@@ -875,6 +875,56 @@ static void print_version(void)
875 printk(KERN_INFO "%s", version); 875 printk(KERN_INFO "%s", version);
876} 876}
877 877
878struct vdc_check_port_data {
879 int dev_no;
880 char *type;
881};
882
883static int vdc_device_probed(struct device *dev, void *arg)
884{
885 struct vio_dev *vdev = to_vio_dev(dev);
886 struct vdc_check_port_data *port_data;
887
888 port_data = (struct vdc_check_port_data *)arg;
889
890 if ((vdev->dev_no == port_data->dev_no) &&
891 (!(strcmp((char *)&vdev->type, port_data->type))) &&
892 dev_get_drvdata(dev)) {
893 /* This device has already been configured
894 * by vdc_port_probe()
895 */
896 return 1;
897 } else {
898 return 0;
899 }
900}
901
902/* Determine whether the VIO device is part of an mpgroup
903 * by locating all the virtual-device-port nodes associated
904 * with the parent virtual-device node for the VIO device
905 * and checking whether any of these nodes are vdc-ports
906 * which have already been configured.
907 *
908 * Returns true if this device is part of an mpgroup and has
909 * already been probed.
910 */
911static bool vdc_port_mpgroup_check(struct vio_dev *vdev)
912{
913 struct vdc_check_port_data port_data;
914 struct device *dev;
915
916 port_data.dev_no = vdev->dev_no;
917 port_data.type = (char *)&vdev->type;
918
919 dev = device_find_child(vdev->dev.parent, &port_data,
920 vdc_device_probed);
921
922 if (dev)
923 return true;
924
925 return false;
926}
927
878static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id) 928static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
879{ 929{
880 struct mdesc_handle *hp; 930 struct mdesc_handle *hp;
@@ -893,6 +943,14 @@ static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
893 goto err_out_release_mdesc; 943 goto err_out_release_mdesc;
894 } 944 }
895 945
946 /* Check if this device is part of an mpgroup */
947 if (vdc_port_mpgroup_check(vdev)) {
948 printk(KERN_WARNING
949 "VIO: Ignoring extra vdisk port %s",
950 dev_name(&vdev->dev));
951 goto err_out_release_mdesc;
952 }
953
896 port = kzalloc(sizeof(*port), GFP_KERNEL); 954 port = kzalloc(sizeof(*port), GFP_KERNEL);
897 err = -ENOMEM; 955 err = -ENOMEM;
898 if (!port) { 956 if (!port) {
@@ -943,6 +1001,9 @@ static int vdc_port_probe(struct vio_dev *vdev, const struct vio_device_id *id)
943 if (err) 1001 if (err)
944 goto err_out_free_tx_ring; 1002 goto err_out_free_tx_ring;
945 1003
1004 /* Note that the device driver_data is used to determine
1005 * whether the port has been probed.
1006 */
946 dev_set_drvdata(&vdev->dev, port); 1007 dev_set_drvdata(&vdev->dev, port);
947 1008
948 mdesc_release(hp); 1009 mdesc_release(hp);
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 1498b899a593..d3d5523862c2 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -381,6 +381,7 @@ static void virtblk_config_changed_work(struct work_struct *work)
381 struct request_queue *q = vblk->disk->queue; 381 struct request_queue *q = vblk->disk->queue;
382 char cap_str_2[10], cap_str_10[10]; 382 char cap_str_2[10], cap_str_10[10];
383 char *envp[] = { "RESIZE=1", NULL }; 383 char *envp[] = { "RESIZE=1", NULL };
384 unsigned long long nblocks;
384 u64 capacity; 385 u64 capacity;
385 386
386 /* Host must always specify the capacity. */ 387 /* Host must always specify the capacity. */
@@ -393,16 +394,19 @@ static void virtblk_config_changed_work(struct work_struct *work)
393 capacity = (sector_t)-1; 394 capacity = (sector_t)-1;
394 } 395 }
395 396
396 string_get_size(capacity, queue_logical_block_size(q), 397 nblocks = DIV_ROUND_UP_ULL(capacity, queue_logical_block_size(q) >> 9);
398
399 string_get_size(nblocks, queue_logical_block_size(q),
397 STRING_UNITS_2, cap_str_2, sizeof(cap_str_2)); 400 STRING_UNITS_2, cap_str_2, sizeof(cap_str_2));
398 string_get_size(capacity, queue_logical_block_size(q), 401 string_get_size(nblocks, queue_logical_block_size(q),
399 STRING_UNITS_10, cap_str_10, sizeof(cap_str_10)); 402 STRING_UNITS_10, cap_str_10, sizeof(cap_str_10));
400 403
401 dev_notice(&vdev->dev, 404 dev_notice(&vdev->dev,
402 "new size: %llu %d-byte logical blocks (%s/%s)\n", 405 "new size: %llu %d-byte logical blocks (%s/%s)\n",
403 (unsigned long long)capacity, 406 nblocks,
404 queue_logical_block_size(q), 407 queue_logical_block_size(q),
405 cap_str_10, cap_str_2); 408 cap_str_10,
409 cap_str_2);
406 410
407 set_capacity(vblk->disk, capacity); 411 set_capacity(vblk->disk, capacity);
408 revalidate_disk(vblk->disk); 412 revalidate_disk(vblk->disk);
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 98e34e4c62b8..2468c28d4771 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -2075,9 +2075,9 @@ static int blkfront_resume(struct xenbus_device *dev)
2075 /* 2075 /*
2076 * Get the bios in the request so we can re-queue them. 2076 * Get the bios in the request so we can re-queue them.
2077 */ 2077 */
2078 if (req_op(shadow[i].request) == REQ_OP_FLUSH || 2078 if (req_op(shadow[j].request) == REQ_OP_FLUSH ||
2079 req_op(shadow[i].request) == REQ_OP_DISCARD || 2079 req_op(shadow[j].request) == REQ_OP_DISCARD ||
2080 req_op(shadow[i].request) == REQ_OP_SECURE_ERASE || 2080 req_op(shadow[j].request) == REQ_OP_SECURE_ERASE ||
2081 shadow[j].request->cmd_flags & REQ_FUA) { 2081 shadow[j].request->cmd_flags & REQ_FUA) {
2082 /* 2082 /*
2083 * Flush operations don't contain bios, so 2083 * Flush operations don't contain bios, so
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index 856d5dc02451..3b1b6340ba13 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -308,7 +308,7 @@ static ssize_t comp_algorithm_store(struct device *dev,
308 struct device_attribute *attr, const char *buf, size_t len) 308 struct device_attribute *attr, const char *buf, size_t len)
309{ 309{
310 struct zram *zram = dev_to_zram(dev); 310 struct zram *zram = dev_to_zram(dev);
311 char compressor[CRYPTO_MAX_ALG_NAME]; 311 char compressor[ARRAY_SIZE(zram->compressor)];
312 size_t sz; 312 size_t sz;
313 313
314 strlcpy(compressor, buf, sizeof(compressor)); 314 strlcpy(compressor, buf, sizeof(compressor));
@@ -327,7 +327,7 @@ static ssize_t comp_algorithm_store(struct device *dev,
327 return -EBUSY; 327 return -EBUSY;
328 } 328 }
329 329
330 strlcpy(zram->compressor, compressor, sizeof(compressor)); 330 strcpy(zram->compressor, compressor);
331 up_write(&zram->init_lock); 331 up_write(&zram->init_lock);
332 return len; 332 return len;
333} 333}
diff --git a/drivers/bus/uniphier-system-bus.c b/drivers/bus/uniphier-system-bus.c
index 1e6e0269edcc..f76be6bd6eb3 100644
--- a/drivers/bus/uniphier-system-bus.c
+++ b/drivers/bus/uniphier-system-bus.c
@@ -256,10 +256,23 @@ static int uniphier_system_bus_probe(struct platform_device *pdev)
256 256
257 uniphier_system_bus_set_reg(priv); 257 uniphier_system_bus_set_reg(priv);
258 258
259 platform_set_drvdata(pdev, priv);
260
259 /* Now, the bus is configured. Populate platform_devices below it */ 261 /* Now, the bus is configured. Populate platform_devices below it */
260 return of_platform_default_populate(dev->of_node, NULL, dev); 262 return of_platform_default_populate(dev->of_node, NULL, dev);
261} 263}
262 264
265static int __maybe_unused uniphier_system_bus_resume(struct device *dev)
266{
267 uniphier_system_bus_set_reg(dev_get_drvdata(dev));
268
269 return 0;
270}
271
272static const struct dev_pm_ops uniphier_system_bus_pm_ops = {
273 SET_SYSTEM_SLEEP_PM_OPS(NULL, uniphier_system_bus_resume)
274};
275
263static const struct of_device_id uniphier_system_bus_match[] = { 276static const struct of_device_id uniphier_system_bus_match[] = {
264 { .compatible = "socionext,uniphier-system-bus" }, 277 { .compatible = "socionext,uniphier-system-bus" },
265 { /* sentinel */ } 278 { /* sentinel */ }
@@ -271,6 +284,7 @@ static struct platform_driver uniphier_system_bus_driver = {
271 .driver = { 284 .driver = {
272 .name = "uniphier-system-bus", 285 .name = "uniphier-system-bus",
273 .of_match_table = uniphier_system_bus_match, 286 .of_match_table = uniphier_system_bus_match,
287 .pm = &uniphier_system_bus_pm_ops,
274 }, 288 },
275}; 289};
276module_platform_driver(uniphier_system_bus_driver); 290module_platform_driver(uniphier_system_bus_driver);
diff --git a/drivers/char/random.c b/drivers/char/random.c
index afa3ce7d3e72..8ad92707e45f 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1492,7 +1492,7 @@ static void _warn_unseeded_randomness(const char *func_name, void *caller,
1492#ifndef CONFIG_WARN_ALL_UNSEEDED_RANDOM 1492#ifndef CONFIG_WARN_ALL_UNSEEDED_RANDOM
1493 print_once = true; 1493 print_once = true;
1494#endif 1494#endif
1495 pr_notice("random: %s called from %pF with crng_init=%d\n", 1495 pr_notice("random: %s called from %pS with crng_init=%d\n",
1496 func_name, caller, crng_init); 1496 func_name, caller, crng_init);
1497} 1497}
1498 1498
diff --git a/drivers/clk/clk-gemini.c b/drivers/clk/clk-gemini.c
index c391a49aaaff..b4cf2f699a21 100644
--- a/drivers/clk/clk-gemini.c
+++ b/drivers/clk/clk-gemini.c
@@ -237,6 +237,18 @@ static int gemini_reset(struct reset_controller_dev *rcdev,
237 BIT(GEMINI_RESET_CPU1) | BIT(id)); 237 BIT(GEMINI_RESET_CPU1) | BIT(id));
238} 238}
239 239
240static int gemini_reset_assert(struct reset_controller_dev *rcdev,
241 unsigned long id)
242{
243 return 0;
244}
245
246static int gemini_reset_deassert(struct reset_controller_dev *rcdev,
247 unsigned long id)
248{
249 return 0;
250}
251
240static int gemini_reset_status(struct reset_controller_dev *rcdev, 252static int gemini_reset_status(struct reset_controller_dev *rcdev,
241 unsigned long id) 253 unsigned long id)
242{ 254{
@@ -253,6 +265,8 @@ static int gemini_reset_status(struct reset_controller_dev *rcdev,
253 265
254static const struct reset_control_ops gemini_reset_ops = { 266static const struct reset_control_ops gemini_reset_ops = {
255 .reset = gemini_reset, 267 .reset = gemini_reset,
268 .assert = gemini_reset_assert,
269 .deassert = gemini_reset_deassert,
256 .status = gemini_reset_status, 270 .status = gemini_reset_status,
257}; 271};
258 272
diff --git a/drivers/clk/keystone/sci-clk.c b/drivers/clk/keystone/sci-clk.c
index 43b0f2f08df2..9cdf9d5050ac 100644
--- a/drivers/clk/keystone/sci-clk.c
+++ b/drivers/clk/keystone/sci-clk.c
@@ -22,6 +22,7 @@
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/soc/ti/ti_sci_protocol.h> 24#include <linux/soc/ti/ti_sci_protocol.h>
25#include <linux/bsearch.h>
25 26
26#define SCI_CLK_SSC_ENABLE BIT(0) 27#define SCI_CLK_SSC_ENABLE BIT(0)
27#define SCI_CLK_ALLOW_FREQ_CHANGE BIT(1) 28#define SCI_CLK_ALLOW_FREQ_CHANGE BIT(1)
@@ -44,6 +45,7 @@ struct sci_clk_data {
44 * @dev: Device pointer for the clock provider 45 * @dev: Device pointer for the clock provider
45 * @clk_data: Clock data 46 * @clk_data: Clock data
46 * @clocks: Clocks array for this device 47 * @clocks: Clocks array for this device
48 * @num_clocks: Total number of clocks for this provider
47 */ 49 */
48struct sci_clk_provider { 50struct sci_clk_provider {
49 const struct ti_sci_handle *sci; 51 const struct ti_sci_handle *sci;
@@ -51,6 +53,7 @@ struct sci_clk_provider {
51 struct device *dev; 53 struct device *dev;
52 const struct sci_clk_data *clk_data; 54 const struct sci_clk_data *clk_data;
53 struct clk_hw **clocks; 55 struct clk_hw **clocks;
56 int num_clocks;
54}; 57};
55 58
56/** 59/**
@@ -58,7 +61,6 @@ struct sci_clk_provider {
58 * @hw: Hardware clock cookie for common clock framework 61 * @hw: Hardware clock cookie for common clock framework
59 * @dev_id: Device index 62 * @dev_id: Device index
60 * @clk_id: Clock index 63 * @clk_id: Clock index
61 * @node: Clocks list link
62 * @provider: Master clock provider 64 * @provider: Master clock provider
63 * @flags: Flags for the clock 65 * @flags: Flags for the clock
64 */ 66 */
@@ -66,7 +68,6 @@ struct sci_clk {
66 struct clk_hw hw; 68 struct clk_hw hw;
67 u16 dev_id; 69 u16 dev_id;
68 u8 clk_id; 70 u8 clk_id;
69 struct list_head node;
70 struct sci_clk_provider *provider; 71 struct sci_clk_provider *provider;
71 u8 flags; 72 u8 flags;
72}; 73};
@@ -367,6 +368,19 @@ err:
367 return &sci_clk->hw; 368 return &sci_clk->hw;
368} 369}
369 370
371static int _cmp_sci_clk(const void *a, const void *b)
372{
373 const struct sci_clk *ca = a;
374 const struct sci_clk *cb = *(struct sci_clk **)b;
375
376 if (ca->dev_id == cb->dev_id && ca->clk_id == cb->clk_id)
377 return 0;
378 if (ca->dev_id > cb->dev_id ||
379 (ca->dev_id == cb->dev_id && ca->clk_id > cb->clk_id))
380 return 1;
381 return -1;
382}
383
370/** 384/**
371 * sci_clk_get - Xlate function for getting clock handles 385 * sci_clk_get - Xlate function for getting clock handles
372 * @clkspec: device tree clock specifier 386 * @clkspec: device tree clock specifier
@@ -380,29 +394,22 @@ err:
380static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data) 394static struct clk_hw *sci_clk_get(struct of_phandle_args *clkspec, void *data)
381{ 395{
382 struct sci_clk_provider *provider = data; 396 struct sci_clk_provider *provider = data;
383 u16 dev_id; 397 struct sci_clk **clk;
384 u8 clk_id; 398 struct sci_clk key;
385 const struct sci_clk_data *clks = provider->clk_data;
386 struct clk_hw **clocks = provider->clocks;
387 399
388 if (clkspec->args_count != 2) 400 if (clkspec->args_count != 2)
389 return ERR_PTR(-EINVAL); 401 return ERR_PTR(-EINVAL);
390 402
391 dev_id = clkspec->args[0]; 403 key.dev_id = clkspec->args[0];
392 clk_id = clkspec->args[1]; 404 key.clk_id = clkspec->args[1];
393 405
394 while (clks->num_clks) { 406 clk = bsearch(&key, provider->clocks, provider->num_clocks,
395 if (clks->dev == dev_id) { 407 sizeof(clk), _cmp_sci_clk);
396 if (clk_id >= clks->num_clks)
397 return ERR_PTR(-EINVAL);
398
399 return clocks[clk_id];
400 }
401 408
402 clks++; 409 if (!clk)
403 } 410 return ERR_PTR(-ENODEV);
404 411
405 return ERR_PTR(-ENODEV); 412 return &(*clk)->hw;
406} 413}
407 414
408static int ti_sci_init_clocks(struct sci_clk_provider *p) 415static int ti_sci_init_clocks(struct sci_clk_provider *p)
@@ -410,18 +417,29 @@ static int ti_sci_init_clocks(struct sci_clk_provider *p)
410 const struct sci_clk_data *data = p->clk_data; 417 const struct sci_clk_data *data = p->clk_data;
411 struct clk_hw *hw; 418 struct clk_hw *hw;
412 int i; 419 int i;
420 int num_clks = 0;
413 421
414 while (data->num_clks) { 422 while (data->num_clks) {
415 p->clocks = devm_kcalloc(p->dev, data->num_clks, 423 num_clks += data->num_clks;
416 sizeof(struct sci_clk), 424 data++;
417 GFP_KERNEL); 425 }
418 if (!p->clocks)
419 return -ENOMEM;
420 426
427 p->num_clocks = num_clks;
428
429 p->clocks = devm_kcalloc(p->dev, num_clks, sizeof(struct sci_clk),
430 GFP_KERNEL);
431 if (!p->clocks)
432 return -ENOMEM;
433
434 num_clks = 0;
435
436 data = p->clk_data;
437
438 while (data->num_clks) {
421 for (i = 0; i < data->num_clks; i++) { 439 for (i = 0; i < data->num_clks; i++) {
422 hw = _sci_clk_build(p, data->dev, i); 440 hw = _sci_clk_build(p, data->dev, i);
423 if (!IS_ERR(hw)) { 441 if (!IS_ERR(hw)) {
424 p->clocks[i] = hw; 442 p->clocks[num_clks++] = hw;
425 continue; 443 continue;
426 } 444 }
427 445
diff --git a/drivers/clk/meson/clk-mpll.c b/drivers/clk/meson/clk-mpll.c
index 39eab69fe51a..44a5a535ca63 100644
--- a/drivers/clk/meson/clk-mpll.c
+++ b/drivers/clk/meson/clk-mpll.c
@@ -161,6 +161,13 @@ static int mpll_set_rate(struct clk_hw *hw,
161 reg = PARM_SET(p->width, p->shift, reg, 1); 161 reg = PARM_SET(p->width, p->shift, reg, 1);
162 writel(reg, mpll->base + p->reg_off); 162 writel(reg, mpll->base + p->reg_off);
163 163
164 p = &mpll->ssen;
165 if (p->width != 0) {
166 reg = readl(mpll->base + p->reg_off);
167 reg = PARM_SET(p->width, p->shift, reg, 1);
168 writel(reg, mpll->base + p->reg_off);
169 }
170
164 p = &mpll->n2; 171 p = &mpll->n2;
165 reg = readl(mpll->base + p->reg_off); 172 reg = readl(mpll->base + p->reg_off);
166 reg = PARM_SET(p->width, p->shift, reg, n2); 173 reg = PARM_SET(p->width, p->shift, reg, n2);
diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h
index d6feafe8bd6c..1629da9b4141 100644
--- a/drivers/clk/meson/clkc.h
+++ b/drivers/clk/meson/clkc.h
@@ -118,6 +118,7 @@ struct meson_clk_mpll {
118 struct parm sdm_en; 118 struct parm sdm_en;
119 struct parm n2; 119 struct parm n2;
120 struct parm en; 120 struct parm en;
121 struct parm ssen;
121 spinlock_t *lock; 122 spinlock_t *lock;
122}; 123};
123 124
diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c
index a897ea45327c..a7ea5f3da89d 100644
--- a/drivers/clk/meson/gxbb.c
+++ b/drivers/clk/meson/gxbb.c
@@ -528,6 +528,11 @@ static struct meson_clk_mpll gxbb_mpll0 = {
528 .shift = 14, 528 .shift = 14,
529 .width = 1, 529 .width = 1,
530 }, 530 },
531 .ssen = {
532 .reg_off = HHI_MPLL_CNTL,
533 .shift = 25,
534 .width = 1,
535 },
531 .lock = &clk_lock, 536 .lock = &clk_lock,
532 .hw.init = &(struct clk_init_data){ 537 .hw.init = &(struct clk_init_data){
533 .name = "mpll0", 538 .name = "mpll0",
diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
index bb3f1de876b1..6ec512ad2598 100644
--- a/drivers/clk/meson/meson8b.c
+++ b/drivers/clk/meson/meson8b.c
@@ -267,6 +267,11 @@ static struct meson_clk_mpll meson8b_mpll0 = {
267 .shift = 14, 267 .shift = 14,
268 .width = 1, 268 .width = 1,
269 }, 269 },
270 .ssen = {
271 .reg_off = HHI_MPLL_CNTL,
272 .shift = 25,
273 .width = 1,
274 },
270 .lock = &clk_lock, 275 .lock = &clk_lock,
271 .hw.init = &(struct clk_init_data){ 276 .hw.init = &(struct clk_init_data){
272 .name = "mpll0", 277 .name = "mpll0",
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index 0748a0b333c5..9a6476aa7d81 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -1283,16 +1283,16 @@ static const struct samsung_pll_rate_table exynos5420_pll2550x_24mhz_tbl[] __ini
1283static const struct samsung_pll_rate_table exynos5420_epll_24mhz_tbl[] = { 1283static const struct samsung_pll_rate_table exynos5420_epll_24mhz_tbl[] = {
1284 PLL_36XX_RATE(600000000U, 100, 2, 1, 0), 1284 PLL_36XX_RATE(600000000U, 100, 2, 1, 0),
1285 PLL_36XX_RATE(400000000U, 200, 3, 2, 0), 1285 PLL_36XX_RATE(400000000U, 200, 3, 2, 0),
1286 PLL_36XX_RATE(393216000U, 197, 3, 2, 25690), 1286 PLL_36XX_RATE(393216003U, 197, 3, 2, -25690),
1287 PLL_36XX_RATE(361267200U, 301, 5, 2, 3671), 1287 PLL_36XX_RATE(361267218U, 301, 5, 2, 3671),
1288 PLL_36XX_RATE(200000000U, 200, 3, 3, 0), 1288 PLL_36XX_RATE(200000000U, 200, 3, 3, 0),
1289 PLL_36XX_RATE(196608000U, 197, 3, 3, -25690), 1289 PLL_36XX_RATE(196608001U, 197, 3, 3, -25690),
1290 PLL_36XX_RATE(180633600U, 301, 5, 3, 3671), 1290 PLL_36XX_RATE(180633609U, 301, 5, 3, 3671),
1291 PLL_36XX_RATE(131072000U, 131, 3, 3, 4719), 1291 PLL_36XX_RATE(131072006U, 131, 3, 3, 4719),
1292 PLL_36XX_RATE(100000000U, 200, 3, 4, 0), 1292 PLL_36XX_RATE(100000000U, 200, 3, 4, 0),
1293 PLL_36XX_RATE(65536000U, 131, 3, 4, 4719), 1293 PLL_36XX_RATE( 65536003U, 131, 3, 4, 4719),
1294 PLL_36XX_RATE(49152000U, 197, 3, 5, 25690), 1294 PLL_36XX_RATE( 49152000U, 197, 3, 5, -25690),
1295 PLL_36XX_RATE(32768000U, 131, 3, 5, 4719), 1295 PLL_36XX_RATE( 32768001U, 131, 3, 5, 4719),
1296}; 1296};
1297 1297
1298static struct samsung_pll_clock exynos5x_plls[nr_plls] __initdata = { 1298static struct samsung_pll_clock exynos5x_plls[nr_plls] __initdata = {
diff --git a/drivers/clk/sunxi-ng/ccu-sun5i.c b/drivers/clk/sunxi-ng/ccu-sun5i.c
index 5372bf8be5e6..31d7ffda9aab 100644
--- a/drivers/clk/sunxi-ng/ccu-sun5i.c
+++ b/drivers/clk/sunxi-ng/ccu-sun5i.c
@@ -184,7 +184,7 @@ static struct ccu_mux cpu_clk = {
184 .hw.init = CLK_HW_INIT_PARENTS("cpu", 184 .hw.init = CLK_HW_INIT_PARENTS("cpu",
185 cpu_parents, 185 cpu_parents,
186 &ccu_mux_ops, 186 &ccu_mux_ops,
187 CLK_IS_CRITICAL), 187 CLK_SET_RATE_PARENT | CLK_IS_CRITICAL),
188 } 188 }
189}; 189};
190 190
diff --git a/drivers/clk/x86/clk-pmc-atom.c b/drivers/clk/x86/clk-pmc-atom.c
index f99abc1106f0..08ef69945ffb 100644
--- a/drivers/clk/x86/clk-pmc-atom.c
+++ b/drivers/clk/x86/clk-pmc-atom.c
@@ -186,6 +186,13 @@ static struct clk_plt *plt_clk_register(struct platform_device *pdev, int id,
186 pclk->reg = base + PMC_CLK_CTL_OFFSET + id * PMC_CLK_CTL_SIZE; 186 pclk->reg = base + PMC_CLK_CTL_OFFSET + id * PMC_CLK_CTL_SIZE;
187 spin_lock_init(&pclk->lock); 187 spin_lock_init(&pclk->lock);
188 188
189 /*
190 * If the clock was already enabled by the firmware mark it as critical
191 * to avoid it being gated by the clock framework if no driver owns it.
192 */
193 if (plt_clk_is_enabled(&pclk->hw))
194 init.flags |= CLK_IS_CRITICAL;
195
189 ret = devm_clk_hw_register(&pdev->dev, &pclk->hw); 196 ret = devm_clk_hw_register(&pdev->dev, &pclk->hw);
190 if (ret) { 197 if (ret) {
191 pclk = ERR_PTR(ret); 198 pclk = ERR_PTR(ret);
diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index fcae5ca6ac92..54a67f8a28eb 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -262,7 +262,7 @@ config CLKSRC_LPC32XX
262 262
263config CLKSRC_PISTACHIO 263config CLKSRC_PISTACHIO
264 bool "Clocksource for Pistachio SoC" if COMPILE_TEST 264 bool "Clocksource for Pistachio SoC" if COMPILE_TEST
265 depends on HAS_IOMEM 265 depends on GENERIC_CLOCKEVENTS && HAS_IOMEM
266 select TIMER_OF 266 select TIMER_OF
267 help 267 help
268 Enables the clocksource for the Pistachio SoC. 268 Enables the clocksource for the Pistachio SoC.
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index aae87c4c546e..72bbfccef113 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -1440,7 +1440,7 @@ static int __init arch_timer_mem_acpi_init(int platform_timer_count)
1440 * While unlikely, it's theoretically possible that none of the frames 1440 * While unlikely, it's theoretically possible that none of the frames
1441 * in a timer expose the combination of feature we want. 1441 * in a timer expose the combination of feature we want.
1442 */ 1442 */
1443 for (i = i; i < timer_count; i++) { 1443 for (i = 0; i < timer_count; i++) {
1444 timer = &timers[i]; 1444 timer = &timers[i];
1445 1445
1446 frame = arch_timer_mem_find_best_frame(timer); 1446 frame = arch_timer_mem_find_best_frame(timer);
diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c
index bc48cbf6a795..269db74a0658 100644
--- a/drivers/clocksource/em_sti.c
+++ b/drivers/clocksource/em_sti.c
@@ -305,7 +305,7 @@ static int em_sti_probe(struct platform_device *pdev)
305 irq = platform_get_irq(pdev, 0); 305 irq = platform_get_irq(pdev, 0);
306 if (irq < 0) { 306 if (irq < 0) {
307 dev_err(&pdev->dev, "failed to get irq\n"); 307 dev_err(&pdev->dev, "failed to get irq\n");
308 return -EINVAL; 308 return irq;
309 } 309 }
310 310
311 /* map memory, let base point to the STI instance */ 311 /* map memory, let base point to the STI instance */
@@ -314,11 +314,12 @@ static int em_sti_probe(struct platform_device *pdev)
314 if (IS_ERR(p->base)) 314 if (IS_ERR(p->base))
315 return PTR_ERR(p->base); 315 return PTR_ERR(p->base);
316 316
317 if (devm_request_irq(&pdev->dev, irq, em_sti_interrupt, 317 ret = devm_request_irq(&pdev->dev, irq, em_sti_interrupt,
318 IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING, 318 IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
319 dev_name(&pdev->dev), p)) { 319 dev_name(&pdev->dev), p);
320 if (ret) {
320 dev_err(&pdev->dev, "failed to request low IRQ\n"); 321 dev_err(&pdev->dev, "failed to request low IRQ\n");
321 return -ENOENT; 322 return ret;
322 } 323 }
323 324
324 /* get hold of clock */ 325 /* get hold of clock */
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index d509b500a7b5..4d7aef9d9c15 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -128,9 +128,9 @@ static __init int timer_base_init(struct device_node *np,
128 const char *name = of_base->name ? of_base->name : np->full_name; 128 const char *name = of_base->name ? of_base->name : np->full_name;
129 129
130 of_base->base = of_io_request_and_map(np, of_base->index, name); 130 of_base->base = of_io_request_and_map(np, of_base->index, name);
131 if (!of_base->base) { 131 if (IS_ERR(of_base->base)) {
132 pr_err("Failed to iomap (%s)\n", name); 132 pr_err("Failed to iomap (%s)\n", name);
133 return -ENXIO; 133 return PTR_ERR(of_base->base);
134 } 134 }
135 135
136 return 0; 136 return 0;
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 6cd503525638..65ee4fcace1f 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -1613,8 +1613,7 @@ static inline bool intel_pstate_sample(struct cpudata *cpu, u64 time)
1613 1613
1614static inline int32_t get_avg_frequency(struct cpudata *cpu) 1614static inline int32_t get_avg_frequency(struct cpudata *cpu)
1615{ 1615{
1616 return mul_ext_fp(cpu->sample.core_avg_perf, 1616 return mul_ext_fp(cpu->sample.core_avg_perf, cpu_khz);
1617 cpu->pstate.max_pstate_physical * cpu->pstate.scaling);
1618} 1617}
1619 1618
1620static inline int32_t get_avg_pstate(struct cpudata *cpu) 1619static inline int32_t get_avg_pstate(struct cpudata *cpu)
@@ -1922,13 +1921,6 @@ static int intel_pstate_init_cpu(unsigned int cpunum)
1922 return 0; 1921 return 0;
1923} 1922}
1924 1923
1925static unsigned int intel_pstate_get(unsigned int cpu_num)
1926{
1927 struct cpudata *cpu = all_cpu_data[cpu_num];
1928
1929 return cpu ? get_avg_frequency(cpu) : 0;
1930}
1931
1932static void intel_pstate_set_update_util_hook(unsigned int cpu_num) 1924static void intel_pstate_set_update_util_hook(unsigned int cpu_num)
1933{ 1925{
1934 struct cpudata *cpu = all_cpu_data[cpu_num]; 1926 struct cpudata *cpu = all_cpu_data[cpu_num];
@@ -2169,7 +2161,6 @@ static struct cpufreq_driver intel_pstate = {
2169 .setpolicy = intel_pstate_set_policy, 2161 .setpolicy = intel_pstate_set_policy,
2170 .suspend = intel_pstate_hwp_save_state, 2162 .suspend = intel_pstate_hwp_save_state,
2171 .resume = intel_pstate_resume, 2163 .resume = intel_pstate_resume,
2172 .get = intel_pstate_get,
2173 .init = intel_pstate_cpu_init, 2164 .init = intel_pstate_cpu_init,
2174 .exit = intel_pstate_cpu_exit, 2165 .exit = intel_pstate_cpu_exit,
2175 .stop_cpu = intel_pstate_stop_cpu, 2166 .stop_cpu = intel_pstate_stop_cpu,
diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers/cpuidle/cpuidle-powernv.c
index 37b0698b7193..42896a67aeae 100644
--- a/drivers/cpuidle/cpuidle-powernv.c
+++ b/drivers/cpuidle/cpuidle-powernv.c
@@ -235,6 +235,7 @@ static inline int validate_dt_prop_sizes(const char *prop1, int prop1_len,
235 return -1; 235 return -1;
236} 236}
237 237
238extern u32 pnv_get_supported_cpuidle_states(void);
238static int powernv_add_idle_states(void) 239static int powernv_add_idle_states(void)
239{ 240{
240 struct device_node *power_mgt; 241 struct device_node *power_mgt;
@@ -248,6 +249,8 @@ static int powernv_add_idle_states(void)
248 const char *names[CPUIDLE_STATE_MAX]; 249 const char *names[CPUIDLE_STATE_MAX];
249 u32 has_stop_states = 0; 250 u32 has_stop_states = 0;
250 int i, rc; 251 int i, rc;
252 u32 supported_flags = pnv_get_supported_cpuidle_states();
253
251 254
252 /* Currently we have snooze statically defined */ 255 /* Currently we have snooze statically defined */
253 256
@@ -362,6 +365,13 @@ static int powernv_add_idle_states(void)
362 for (i = 0; i < dt_idle_states; i++) { 365 for (i = 0; i < dt_idle_states; i++) {
363 unsigned int exit_latency, target_residency; 366 unsigned int exit_latency, target_residency;
364 bool stops_timebase = false; 367 bool stops_timebase = false;
368
369 /*
370 * Skip the platform idle state whose flag isn't in
371 * the supported_cpuidle_states flag mask.
372 */
373 if ((flags[i] & supported_flags) != flags[i])
374 continue;
365 /* 375 /*
366 * If an idle state has exit latency beyond 376 * If an idle state has exit latency beyond
367 * POWERNV_THRESHOLD_LATENCY_NS then don't use it 377 * POWERNV_THRESHOLD_LATENCY_NS then don't use it
diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c
index 8527a5899a2f..3f819399cd95 100644
--- a/drivers/crypto/inside-secure/safexcel_hash.c
+++ b/drivers/crypto/inside-secure/safexcel_hash.c
@@ -883,10 +883,7 @@ static int safexcel_hmac_sha1_setkey(struct crypto_ahash *tfm, const u8 *key,
883 if (ret) 883 if (ret)
884 return ret; 884 return ret;
885 885
886 memcpy(ctx->ipad, &istate.state, SHA1_DIGEST_SIZE); 886 for (i = 0; i < SHA1_DIGEST_SIZE / sizeof(u32); i++) {
887 memcpy(ctx->opad, &ostate.state, SHA1_DIGEST_SIZE);
888
889 for (i = 0; i < ARRAY_SIZE(istate.state); i++) {
890 if (ctx->ipad[i] != le32_to_cpu(istate.state[i]) || 887 if (ctx->ipad[i] != le32_to_cpu(istate.state[i]) ||
891 ctx->opad[i] != le32_to_cpu(ostate.state[i])) { 888 ctx->opad[i] != le32_to_cpu(ostate.state[i])) {
892 ctx->base.needs_inv = true; 889 ctx->base.needs_inv = true;
@@ -894,6 +891,9 @@ static int safexcel_hmac_sha1_setkey(struct crypto_ahash *tfm, const u8 *key,
894 } 891 }
895 } 892 }
896 893
894 memcpy(ctx->ipad, &istate.state, SHA1_DIGEST_SIZE);
895 memcpy(ctx->opad, &ostate.state, SHA1_DIGEST_SIZE);
896
897 return 0; 897 return 0;
898} 898}
899 899
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 427cbe012729..dadc4a808df5 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers/crypto/ixp4xx_crypto.c
@@ -1073,7 +1073,7 @@ static int aead_perform(struct aead_request *req, int encrypt,
1073 req_ctx->hmac_virt = dma_pool_alloc(buffer_pool, flags, 1073 req_ctx->hmac_virt = dma_pool_alloc(buffer_pool, flags,
1074 &crypt->icv_rev_aes); 1074 &crypt->icv_rev_aes);
1075 if (unlikely(!req_ctx->hmac_virt)) 1075 if (unlikely(!req_ctx->hmac_virt))
1076 goto free_buf_src; 1076 goto free_buf_dst;
1077 if (!encrypt) { 1077 if (!encrypt) {
1078 scatterwalk_map_and_copy(req_ctx->hmac_virt, 1078 scatterwalk_map_and_copy(req_ctx->hmac_virt,
1079 req->src, cryptlen, authsize, 0); 1079 req->src, cryptlen, authsize, 0);
@@ -1088,10 +1088,10 @@ static int aead_perform(struct aead_request *req, int encrypt,
1088 BUG_ON(qmgr_stat_overflow(SEND_QID)); 1088 BUG_ON(qmgr_stat_overflow(SEND_QID));
1089 return -EINPROGRESS; 1089 return -EINPROGRESS;
1090 1090
1091free_buf_src:
1092 free_buf_chain(dev, req_ctx->src, crypt->src_buf);
1093free_buf_dst: 1091free_buf_dst:
1094 free_buf_chain(dev, req_ctx->dst, crypt->dst_buf); 1092 free_buf_chain(dev, req_ctx->dst, crypt->dst_buf);
1093free_buf_src:
1094 free_buf_chain(dev, req_ctx->src, crypt->src_buf);
1095 crypt->ctl_flags = CTL_FLAG_UNUSED; 1095 crypt->ctl_flags = CTL_FLAG_UNUSED;
1096 return -ENOMEM; 1096 return -ENOMEM;
1097} 1097}
diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
index d7e219d2669d..66fb40d0ebdb 100644
--- a/drivers/dma-buf/sync_file.c
+++ b/drivers/dma-buf/sync_file.c
@@ -304,7 +304,7 @@ static int sync_file_release(struct inode *inode, struct file *file)
304{ 304{
305 struct sync_file *sync_file = file->private_data; 305 struct sync_file *sync_file = file->private_data;
306 306
307 if (test_bit(POLL_ENABLED, &sync_file->fence->flags)) 307 if (test_bit(POLL_ENABLED, &sync_file->flags))
308 dma_fence_remove_callback(sync_file->fence, &sync_file->cb); 308 dma_fence_remove_callback(sync_file->fence, &sync_file->cb);
309 dma_fence_put(sync_file->fence); 309 dma_fence_put(sync_file->fence);
310 kfree(sync_file); 310 kfree(sync_file);
@@ -318,7 +318,8 @@ static unsigned int sync_file_poll(struct file *file, poll_table *wait)
318 318
319 poll_wait(file, &sync_file->wq, wait); 319 poll_wait(file, &sync_file->wq, wait);
320 320
321 if (!test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) { 321 if (list_empty(&sync_file->cb.node) &&
322 !test_and_set_bit(POLL_ENABLED, &sync_file->flags)) {
322 if (dma_fence_add_callback(sync_file->fence, &sync_file->cb, 323 if (dma_fence_add_callback(sync_file->fence, &sync_file->cb,
323 fence_check_cb_func) < 0) 324 fence_check_cb_func) < 0)
324 wake_up_all(&sync_file->wq); 325 wake_up_all(&sync_file->wq);
diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
index b10cbaa82ff5..b26256f23d67 100644
--- a/drivers/dma/tegra210-adma.c
+++ b/drivers/dma/tegra210-adma.c
@@ -717,8 +717,8 @@ static int tegra_adma_probe(struct platform_device *pdev)
717 tdc->chan_addr = tdma->base_addr + ADMA_CH_REG_OFFSET(i); 717 tdc->chan_addr = tdma->base_addr + ADMA_CH_REG_OFFSET(i);
718 718
719 tdc->irq = of_irq_get(pdev->dev.of_node, i); 719 tdc->irq = of_irq_get(pdev->dev.of_node, i);
720 if (tdc->irq < 0) { 720 if (tdc->irq <= 0) {
721 ret = tdc->irq; 721 ret = tdc->irq ?: -ENXIO;
722 goto irq_dispose; 722 goto irq_dispose;
723 } 723 }
724 724
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index f235eae04c16..461d6fc3688b 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -504,6 +504,7 @@ config GPIO_XGENE_SB
504 depends on ARCH_XGENE && OF_GPIO 504 depends on ARCH_XGENE && OF_GPIO
505 select GPIO_GENERIC 505 select GPIO_GENERIC
506 select GPIOLIB_IRQCHIP 506 select GPIOLIB_IRQCHIP
507 select IRQ_DOMAIN_HIERARCHY
507 help 508 help
508 This driver supports the GPIO block within the APM X-Gene 509 This driver supports the GPIO block within the APM X-Gene
509 Standby Domain. Say yes here to enable the GPIO functionality. 510 Standby Domain. Say yes here to enable the GPIO functionality.
diff --git a/drivers/gpio/gpio-exar.c b/drivers/gpio/gpio-exar.c
index fb8d304cfa17..0ecd2369c2ca 100644
--- a/drivers/gpio/gpio-exar.c
+++ b/drivers/gpio/gpio-exar.c
@@ -132,7 +132,7 @@ static int gpio_exar_probe(struct platform_device *pdev)
132 if (!p) 132 if (!p)
133 return -ENOMEM; 133 return -ENOMEM;
134 134
135 ret = device_property_read_u32(&pdev->dev, "linux,first-pin", 135 ret = device_property_read_u32(&pdev->dev, "exar,first-pin",
136 &first_pin); 136 &first_pin);
137 if (ret) 137 if (ret)
138 return ret; 138 return ret;
diff --git a/drivers/gpio/gpio-lp87565.c b/drivers/gpio/gpio-lp87565.c
index 6313c50bb91b..a121c8f10610 100644
--- a/drivers/gpio/gpio-lp87565.c
+++ b/drivers/gpio/gpio-lp87565.c
@@ -26,6 +26,27 @@ struct lp87565_gpio {
26 struct regmap *map; 26 struct regmap *map;
27}; 27};
28 28
29static int lp87565_gpio_get(struct gpio_chip *chip, unsigned int offset)
30{
31 struct lp87565_gpio *gpio = gpiochip_get_data(chip);
32 int ret, val;
33
34 ret = regmap_read(gpio->map, LP87565_REG_GPIO_IN, &val);
35 if (ret < 0)
36 return ret;
37
38 return !!(val & BIT(offset));
39}
40
41static void lp87565_gpio_set(struct gpio_chip *chip, unsigned int offset,
42 int value)
43{
44 struct lp87565_gpio *gpio = gpiochip_get_data(chip);
45
46 regmap_update_bits(gpio->map, LP87565_REG_GPIO_OUT,
47 BIT(offset), value ? BIT(offset) : 0);
48}
49
29static int lp87565_gpio_get_direction(struct gpio_chip *chip, 50static int lp87565_gpio_get_direction(struct gpio_chip *chip,
30 unsigned int offset) 51 unsigned int offset)
31{ 52{
@@ -54,30 +75,11 @@ static int lp87565_gpio_direction_output(struct gpio_chip *chip,
54{ 75{
55 struct lp87565_gpio *gpio = gpiochip_get_data(chip); 76 struct lp87565_gpio *gpio = gpiochip_get_data(chip);
56 77
78 lp87565_gpio_set(chip, offset, value);
79
57 return regmap_update_bits(gpio->map, 80 return regmap_update_bits(gpio->map,
58 LP87565_REG_GPIO_CONFIG, 81 LP87565_REG_GPIO_CONFIG,
59 BIT(offset), !value ? BIT(offset) : 0); 82 BIT(offset), BIT(offset));
60}
61
62static int lp87565_gpio_get(struct gpio_chip *chip, unsigned int offset)
63{
64 struct lp87565_gpio *gpio = gpiochip_get_data(chip);
65 int ret, val;
66
67 ret = regmap_read(gpio->map, LP87565_REG_GPIO_IN, &val);
68 if (ret < 0)
69 return ret;
70
71 return !!(val & BIT(offset));
72}
73
74static void lp87565_gpio_set(struct gpio_chip *chip, unsigned int offset,
75 int value)
76{
77 struct lp87565_gpio *gpio = gpiochip_get_data(chip);
78
79 regmap_update_bits(gpio->map, LP87565_REG_GPIO_OUT,
80 BIT(offset), value ? BIT(offset) : 0);
81} 83}
82 84
83static int lp87565_gpio_request(struct gpio_chip *gc, unsigned int offset) 85static int lp87565_gpio_request(struct gpio_chip *gc, unsigned int offset)
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index e338c3743562..45c65f805fd6 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -557,7 +557,7 @@ static void mvebu_gpio_irq_handler(struct irq_desc *desc)
557 edge_cause = mvebu_gpio_read_edge_cause(mvchip); 557 edge_cause = mvebu_gpio_read_edge_cause(mvchip);
558 edge_mask = mvebu_gpio_read_edge_mask(mvchip); 558 edge_mask = mvebu_gpio_read_edge_mask(mvchip);
559 559
560 cause = (data_in ^ level_mask) | (edge_cause & edge_mask); 560 cause = (data_in & level_mask) | (edge_cause & edge_mask);
561 561
562 for (i = 0; i < mvchip->chip.ngpio; i++) { 562 for (i = 0; i < mvchip->chip.ngpio; i++) {
563 int irq; 563 int irq;
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 3abea3f0b307..92692251ade1 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -424,6 +424,9 @@ static int mxc_gpio_probe(struct platform_device *pdev)
424 return PTR_ERR(port->base); 424 return PTR_ERR(port->base);
425 425
426 port->irq_high = platform_get_irq(pdev, 1); 426 port->irq_high = platform_get_irq(pdev, 1);
427 if (port->irq_high < 0)
428 port->irq_high = 0;
429
427 port->irq = platform_get_irq(pdev, 0); 430 port->irq = platform_get_irq(pdev, 0);
428 if (port->irq < 0) 431 if (port->irq < 0)
429 return port->irq; 432 return port->irq;
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 88529d3c06c9..506c6a67c5fc 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -360,7 +360,7 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc)
360{ 360{
361 int port; 361 int port;
362 int pin; 362 int pin;
363 int unmasked = 0; 363 bool unmasked = false;
364 int gpio; 364 int gpio;
365 u32 lvl; 365 u32 lvl;
366 unsigned long sta; 366 unsigned long sta;
@@ -384,8 +384,8 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc)
384 * before executing the handler so that we don't 384 * before executing the handler so that we don't
385 * miss edges 385 * miss edges
386 */ 386 */
387 if (lvl & (0x100 << pin)) { 387 if (!unmasked && lvl & (0x100 << pin)) {
388 unmasked = 1; 388 unmasked = true;
389 chained_irq_exit(chip, desc); 389 chained_irq_exit(chip, desc);
390 } 390 }
391 391
diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c
index 16fe9742597b..fc80add5fedb 100644
--- a/drivers/gpio/gpiolib-sysfs.c
+++ b/drivers/gpio/gpiolib-sysfs.c
@@ -2,6 +2,7 @@
2#include <linux/mutex.h> 2#include <linux/mutex.h>
3#include <linux/device.h> 3#include <linux/device.h>
4#include <linux/sysfs.h> 4#include <linux/sysfs.h>
5#include <linux/gpio.h>
5#include <linux/gpio/consumer.h> 6#include <linux/gpio/consumer.h>
6#include <linux/gpio/driver.h> 7#include <linux/gpio/driver.h>
7#include <linux/interrupt.h> 8#include <linux/interrupt.h>
@@ -432,6 +433,11 @@ static struct attribute *gpiochip_attrs[] = {
432}; 433};
433ATTRIBUTE_GROUPS(gpiochip); 434ATTRIBUTE_GROUPS(gpiochip);
434 435
436static struct gpio_desc *gpio_to_valid_desc(int gpio)
437{
438 return gpio_is_valid(gpio) ? gpio_to_desc(gpio) : NULL;
439}
440
435/* 441/*
436 * /sys/class/gpio/export ... write-only 442 * /sys/class/gpio/export ... write-only
437 * integer N ... number of GPIO to export (full access) 443 * integer N ... number of GPIO to export (full access)
@@ -450,7 +456,7 @@ static ssize_t export_store(struct class *class,
450 if (status < 0) 456 if (status < 0)
451 goto done; 457 goto done;
452 458
453 desc = gpio_to_desc(gpio); 459 desc = gpio_to_valid_desc(gpio);
454 /* reject invalid GPIOs */ 460 /* reject invalid GPIOs */
455 if (!desc) { 461 if (!desc) {
456 pr_warn("%s: invalid GPIO %ld\n", __func__, gpio); 462 pr_warn("%s: invalid GPIO %ld\n", __func__, gpio);
@@ -493,7 +499,7 @@ static ssize_t unexport_store(struct class *class,
493 if (status < 0) 499 if (status < 0)
494 goto done; 500 goto done;
495 501
496 desc = gpio_to_desc(gpio); 502 desc = gpio_to_valid_desc(gpio);
497 /* reject bogus commands (gpio_unexport ignores them) */ 503 /* reject bogus commands (gpio_unexport ignores them) */
498 if (!desc) { 504 if (!desc) {
499 pr_warn("%s: invalid GPIO %ld\n", __func__, gpio); 505 pr_warn("%s: invalid GPIO %ld\n", __func__, gpio);
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 9568708a550b..cd003b74512f 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -704,24 +704,23 @@ static irqreturn_t lineevent_irq_thread(int irq, void *p)
704{ 704{
705 struct lineevent_state *le = p; 705 struct lineevent_state *le = p;
706 struct gpioevent_data ge; 706 struct gpioevent_data ge;
707 int ret; 707 int ret, level;
708 708
709 ge.timestamp = ktime_get_real_ns(); 709 ge.timestamp = ktime_get_real_ns();
710 level = gpiod_get_value_cansleep(le->desc);
710 711
711 if (le->eflags & GPIOEVENT_REQUEST_RISING_EDGE 712 if (le->eflags & GPIOEVENT_REQUEST_RISING_EDGE
712 && le->eflags & GPIOEVENT_REQUEST_FALLING_EDGE) { 713 && le->eflags & GPIOEVENT_REQUEST_FALLING_EDGE) {
713 int level = gpiod_get_value_cansleep(le->desc);
714
715 if (level) 714 if (level)
716 /* Emit low-to-high event */ 715 /* Emit low-to-high event */
717 ge.id = GPIOEVENT_EVENT_RISING_EDGE; 716 ge.id = GPIOEVENT_EVENT_RISING_EDGE;
718 else 717 else
719 /* Emit high-to-low event */ 718 /* Emit high-to-low event */
720 ge.id = GPIOEVENT_EVENT_FALLING_EDGE; 719 ge.id = GPIOEVENT_EVENT_FALLING_EDGE;
721 } else if (le->eflags & GPIOEVENT_REQUEST_RISING_EDGE) { 720 } else if (le->eflags & GPIOEVENT_REQUEST_RISING_EDGE && level) {
722 /* Emit low-to-high event */ 721 /* Emit low-to-high event */
723 ge.id = GPIOEVENT_EVENT_RISING_EDGE; 722 ge.id = GPIOEVENT_EVENT_RISING_EDGE;
724 } else if (le->eflags & GPIOEVENT_REQUEST_FALLING_EDGE) { 723 } else if (le->eflags & GPIOEVENT_REQUEST_FALLING_EDGE && !level) {
725 /* Emit high-to-low event */ 724 /* Emit high-to-low event */
726 ge.id = GPIOEVENT_EVENT_FALLING_EDGE; 725 ge.id = GPIOEVENT_EVENT_FALLING_EDGE;
727 } else { 726 } else {
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
index 38f739fb727b..6558a3ed57a7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
@@ -359,7 +359,7 @@ void amdgpu_mn_unregister(struct amdgpu_bo *bo)
359 head = bo->mn_list.next; 359 head = bo->mn_list.next;
360 360
361 bo->mn = NULL; 361 bo->mn = NULL;
362 list_del(&bo->mn_list); 362 list_del_init(&bo->mn_list);
363 363
364 if (list_empty(head)) { 364 if (list_empty(head)) {
365 struct amdgpu_mn_node *node; 365 struct amdgpu_mn_node *node;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
index a6899180b265..c586f44312f9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
@@ -244,6 +244,12 @@ struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
244 struct dma_fence *f = e->fence; 244 struct dma_fence *f = e->fence;
245 struct amd_sched_fence *s_fence = to_amd_sched_fence(f); 245 struct amd_sched_fence *s_fence = to_amd_sched_fence(f);
246 246
247 if (dma_fence_is_signaled(f)) {
248 hash_del(&e->node);
249 dma_fence_put(f);
250 kmem_cache_free(amdgpu_sync_slab, e);
251 continue;
252 }
247 if (ring && s_fence) { 253 if (ring && s_fence) {
248 /* For fences from the same ring it is sufficient 254 /* For fences from the same ring it is sufficient
249 * when they are scheduled. 255 * when they are scheduled.
@@ -256,13 +262,6 @@ struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
256 } 262 }
257 } 263 }
258 264
259 if (dma_fence_is_signaled(f)) {
260 hash_del(&e->node);
261 dma_fence_put(f);
262 kmem_cache_free(amdgpu_sync_slab, e);
263 continue;
264 }
265
266 return f; 265 return f;
267 } 266 }
268 267
diff --git a/drivers/gpu/drm/amd/amdgpu/clearstate_gfx9.h b/drivers/gpu/drm/amd/amdgpu/clearstate_gfx9.h
index 18fd01f3e4b2..003a131bad47 100644
--- a/drivers/gpu/drm/amd/amdgpu/clearstate_gfx9.h
+++ b/drivers/gpu/drm/amd/amdgpu/clearstate_gfx9.h
@@ -1,24 +1,25 @@
1
2/* 1/*
3*************************************************************************************************** 2 * Copyright 2017 Advanced Micro Devices, Inc.
4* 3 *
5* Trade secret of Advanced Micro Devices, Inc. 4 * Permission is hereby granted, free of charge, to any person obtaining a
6* Copyright (c) 2010 Advanced Micro Devices, Inc. (unpublished) 5 * copy of this software and associated documentation files (the "Software"),
7* 6 * to deal in the Software without restriction, including without limitation
8* All rights reserved. This notice is intended as a precaution against inadvertent publication and 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9* does not imply publication or any waiver of confidentiality. The year included in the foregoing 8 * and/or sell copies of the Software, and to permit persons to whom the
10* notice is the year of creation of the work. 9 * Software is furnished to do so, subject to the following conditions:
11* 10 *
12*************************************************************************************************** 11 * The above copyright notice and this permission notice shall be included in
13*/ 12 * all copies or substantial portions of the Software.
14/** 13 *
15*************************************************************************************************** 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16* @brief gfx9 Clearstate Definitions 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17*************************************************************************************************** 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18* 17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19* Do not edit! This is a machine-generated file! 18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20* 19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21*/ 20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
22 23
23static const unsigned int gfx9_SECT_CONTEXT_def_1[] = 24static const unsigned int gfx9_SECT_CONTEXT_def_1[] =
24{ 25{
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c
index f45fb0f022b3..4267fa417997 100644
--- a/drivers/gpu/drm/amd/amdgpu/si.c
+++ b/drivers/gpu/drm/amd/amdgpu/si.c
@@ -1385,6 +1385,7 @@ static void si_init_golden_registers(struct amdgpu_device *adev)
1385 amdgpu_program_register_sequence(adev, 1385 amdgpu_program_register_sequence(adev,
1386 pitcairn_mgcg_cgcg_init, 1386 pitcairn_mgcg_cgcg_init,
1387 (const u32)ARRAY_SIZE(pitcairn_mgcg_cgcg_init)); 1387 (const u32)ARRAY_SIZE(pitcairn_mgcg_cgcg_init));
1388 break;
1388 case CHIP_VERDE: 1389 case CHIP_VERDE:
1389 amdgpu_program_register_sequence(adev, 1390 amdgpu_program_register_sequence(adev,
1390 verde_golden_registers, 1391 verde_golden_registers,
@@ -1409,6 +1410,7 @@ static void si_init_golden_registers(struct amdgpu_device *adev)
1409 amdgpu_program_register_sequence(adev, 1410 amdgpu_program_register_sequence(adev,
1410 oland_mgcg_cgcg_init, 1411 oland_mgcg_cgcg_init,
1411 (const u32)ARRAY_SIZE(oland_mgcg_cgcg_init)); 1412 (const u32)ARRAY_SIZE(oland_mgcg_cgcg_init));
1413 break;
1412 case CHIP_HAINAN: 1414 case CHIP_HAINAN:
1413 amdgpu_program_register_sequence(adev, 1415 amdgpu_program_register_sequence(adev,
1414 hainan_golden_registers, 1416 hainan_golden_registers,
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 5c26488e7a2d..0529e500c534 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -1255,7 +1255,7 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id)
1255 1255
1256 /* port@2 is the output port */ 1256 /* port@2 is the output port */
1257 ret = drm_of_find_panel_or_bridge(dev->of_node, 2, 0, &tc->panel, NULL); 1257 ret = drm_of_find_panel_or_bridge(dev->of_node, 2, 0, &tc->panel, NULL);
1258 if (ret) 1258 if (ret && ret != -ENODEV)
1259 return ret; 1259 return ret;
1260 1260
1261 /* Shut down GPIO is optional */ 1261 /* Shut down GPIO is optional */
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index c0f336d23f9c..aed25c4183bb 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1655,6 +1655,9 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
1655 if (config->funcs->atomic_check) 1655 if (config->funcs->atomic_check)
1656 ret = config->funcs->atomic_check(state->dev, state); 1656 ret = config->funcs->atomic_check(state->dev, state);
1657 1657
1658 if (ret)
1659 return ret;
1660
1658 if (!state->allow_modeset) { 1661 if (!state->allow_modeset) {
1659 for_each_new_crtc_in_state(state, crtc, crtc_state, i) { 1662 for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
1660 if (drm_atomic_crtc_needs_modeset(crtc_state)) { 1663 if (drm_atomic_crtc_needs_modeset(crtc_state)) {
@@ -1665,7 +1668,7 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
1665 } 1668 }
1666 } 1669 }
1667 1670
1668 return ret; 1671 return 0;
1669} 1672}
1670EXPORT_SYMBOL(drm_atomic_check_only); 1673EXPORT_SYMBOL(drm_atomic_check_only);
1671 1674
@@ -2167,10 +2170,10 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
2167 struct drm_atomic_state *state; 2170 struct drm_atomic_state *state;
2168 struct drm_modeset_acquire_ctx ctx; 2171 struct drm_modeset_acquire_ctx ctx;
2169 struct drm_plane *plane; 2172 struct drm_plane *plane;
2170 struct drm_out_fence_state *fence_state = NULL; 2173 struct drm_out_fence_state *fence_state;
2171 unsigned plane_mask; 2174 unsigned plane_mask;
2172 int ret = 0; 2175 int ret = 0;
2173 unsigned int i, j, num_fences = 0; 2176 unsigned int i, j, num_fences;
2174 2177
2175 /* disallow for drivers not supporting atomic: */ 2178 /* disallow for drivers not supporting atomic: */
2176 if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) 2179 if (!drm_core_check_feature(dev, DRIVER_ATOMIC))
@@ -2211,6 +2214,8 @@ retry:
2211 plane_mask = 0; 2214 plane_mask = 0;
2212 copied_objs = 0; 2215 copied_objs = 0;
2213 copied_props = 0; 2216 copied_props = 0;
2217 fence_state = NULL;
2218 num_fences = 0;
2214 2219
2215 for (i = 0; i < arg->count_objs; i++) { 2220 for (i = 0; i < arg->count_objs; i++) {
2216 uint32_t obj_id, count_props; 2221 uint32_t obj_id, count_props;
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 8dc11064253d..cdaac37907b1 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -255,13 +255,13 @@ drm_gem_object_release_handle(int id, void *ptr, void *data)
255 struct drm_gem_object *obj = ptr; 255 struct drm_gem_object *obj = ptr;
256 struct drm_device *dev = obj->dev; 256 struct drm_device *dev = obj->dev;
257 257
258 if (dev->driver->gem_close_object)
259 dev->driver->gem_close_object(obj, file_priv);
260
258 if (drm_core_check_feature(dev, DRIVER_PRIME)) 261 if (drm_core_check_feature(dev, DRIVER_PRIME))
259 drm_gem_remove_prime_handles(obj, file_priv); 262 drm_gem_remove_prime_handles(obj, file_priv);
260 drm_vma_node_revoke(&obj->vma_node, file_priv); 263 drm_vma_node_revoke(&obj->vma_node, file_priv);
261 264
262 if (dev->driver->gem_close_object)
263 dev->driver->gem_close_object(obj, file_priv);
264
265 drm_gem_object_handle_put_unlocked(obj); 265 drm_gem_object_handle_put_unlocked(obj);
266 266
267 return 0; 267 return 0;
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index 5dc8c4350602..e40c12fabbde 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -601,6 +601,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data,
601 601
602 crtc = drm_crtc_find(dev, plane_req->crtc_id); 602 crtc = drm_crtc_find(dev, plane_req->crtc_id);
603 if (!crtc) { 603 if (!crtc) {
604 drm_framebuffer_put(fb);
604 DRM_DEBUG_KMS("Unknown crtc ID %d\n", 605 DRM_DEBUG_KMS("Unknown crtc ID %d\n",
605 plane_req->crtc_id); 606 plane_req->crtc_id);
606 return -ENOENT; 607 return -ENOENT;
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
index 5bd93169dac2..6463fc2c736f 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
@@ -270,8 +270,8 @@ static int submit_reloc(struct etnaviv_gem_submit *submit, void *stream,
270 if (ret) 270 if (ret)
271 return ret; 271 return ret;
272 272
273 if (r->reloc_offset >= bo->obj->base.size - sizeof(*ptr)) { 273 if (r->reloc_offset > bo->obj->base.size - sizeof(*ptr)) {
274 DRM_ERROR("relocation %u outside object", i); 274 DRM_ERROR("relocation %u outside object\n", i);
275 return -EINVAL; 275 return -EINVAL;
276 } 276 }
277 277
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index d48fd7c918f8..73217c281c9a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -145,13 +145,19 @@ static struct drm_framebuffer *
145exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv, 145exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
146 const struct drm_mode_fb_cmd2 *mode_cmd) 146 const struct drm_mode_fb_cmd2 *mode_cmd)
147{ 147{
148 const struct drm_format_info *info = drm_get_format_info(dev, mode_cmd);
148 struct exynos_drm_gem *exynos_gem[MAX_FB_BUFFER]; 149 struct exynos_drm_gem *exynos_gem[MAX_FB_BUFFER];
149 struct drm_gem_object *obj; 150 struct drm_gem_object *obj;
150 struct drm_framebuffer *fb; 151 struct drm_framebuffer *fb;
151 int i; 152 int i;
152 int ret; 153 int ret;
153 154
154 for (i = 0; i < drm_format_num_planes(mode_cmd->pixel_format); i++) { 155 for (i = 0; i < info->num_planes; i++) {
156 unsigned int height = (i == 0) ? mode_cmd->height :
157 DIV_ROUND_UP(mode_cmd->height, info->vsub);
158 unsigned long size = height * mode_cmd->pitches[i] +
159 mode_cmd->offsets[i];
160
155 obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[i]); 161 obj = drm_gem_object_lookup(file_priv, mode_cmd->handles[i]);
156 if (!obj) { 162 if (!obj) {
157 DRM_ERROR("failed to lookup gem object\n"); 163 DRM_ERROR("failed to lookup gem object\n");
@@ -160,6 +166,12 @@ exynos_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
160 } 166 }
161 167
162 exynos_gem[i] = to_exynos_gem(obj); 168 exynos_gem[i] = to_exynos_gem(obj);
169
170 if (size > exynos_gem[i]->size) {
171 i++;
172 ret = -EINVAL;
173 goto err;
174 }
163 } 175 }
164 176
165 fb = exynos_drm_framebuffer_init(dev, mode_cmd, exynos_gem, i); 177 fb = exynos_drm_framebuffer_init(dev, mode_cmd, exynos_gem, i);
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 713848c36349..e556a46cd4c2 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -2714,7 +2714,7 @@ static int shadow_indirect_ctx(struct intel_shadow_wa_ctx *wa_ctx)
2714unmap_src: 2714unmap_src:
2715 i915_gem_object_unpin_map(obj); 2715 i915_gem_object_unpin_map(obj);
2716put_obj: 2716put_obj:
2717 i915_gem_object_put(wa_ctx->indirect_ctx.obj); 2717 i915_gem_object_put(obj);
2718 return ret; 2718 return ret;
2719} 2719}
2720 2720
diff --git a/drivers/gpu/drm/i915/gvt/execlist.c b/drivers/gpu/drm/i915/gvt/execlist.c
index 700050556242..1648887d3f55 100644
--- a/drivers/gpu/drm/i915/gvt/execlist.c
+++ b/drivers/gpu/drm/i915/gvt/execlist.c
@@ -46,6 +46,8 @@
46#define same_context(a, b) (((a)->context_id == (b)->context_id) && \ 46#define same_context(a, b) (((a)->context_id == (b)->context_id) && \
47 ((a)->lrca == (b)->lrca)) 47 ((a)->lrca == (b)->lrca))
48 48
49static void clean_workloads(struct intel_vgpu *vgpu, unsigned long engine_mask);
50
49static int context_switch_events[] = { 51static int context_switch_events[] = {
50 [RCS] = RCS_AS_CONTEXT_SWITCH, 52 [RCS] = RCS_AS_CONTEXT_SWITCH,
51 [BCS] = BCS_AS_CONTEXT_SWITCH, 53 [BCS] = BCS_AS_CONTEXT_SWITCH,
@@ -499,10 +501,10 @@ static void release_shadow_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
499static int complete_execlist_workload(struct intel_vgpu_workload *workload) 501static int complete_execlist_workload(struct intel_vgpu_workload *workload)
500{ 502{
501 struct intel_vgpu *vgpu = workload->vgpu; 503 struct intel_vgpu *vgpu = workload->vgpu;
502 struct intel_vgpu_execlist *execlist = 504 int ring_id = workload->ring_id;
503 &vgpu->execlist[workload->ring_id]; 505 struct intel_vgpu_execlist *execlist = &vgpu->execlist[ring_id];
504 struct intel_vgpu_workload *next_workload; 506 struct intel_vgpu_workload *next_workload;
505 struct list_head *next = workload_q_head(vgpu, workload->ring_id)->next; 507 struct list_head *next = workload_q_head(vgpu, ring_id)->next;
506 bool lite_restore = false; 508 bool lite_restore = false;
507 int ret; 509 int ret;
508 510
@@ -512,10 +514,25 @@ static int complete_execlist_workload(struct intel_vgpu_workload *workload)
512 release_shadow_batch_buffer(workload); 514 release_shadow_batch_buffer(workload);
513 release_shadow_wa_ctx(&workload->wa_ctx); 515 release_shadow_wa_ctx(&workload->wa_ctx);
514 516
515 if (workload->status || vgpu->resetting) 517 if (workload->status || (vgpu->resetting_eng & ENGINE_MASK(ring_id))) {
518 /* if workload->status is not successful means HW GPU
519 * has occurred GPU hang or something wrong with i915/GVT,
520 * and GVT won't inject context switch interrupt to guest.
521 * So this error is a vGPU hang actually to the guest.
522 * According to this we should emunlate a vGPU hang. If
523 * there are pending workloads which are already submitted
524 * from guest, we should clean them up like HW GPU does.
525 *
526 * if it is in middle of engine resetting, the pending
527 * workloads won't be submitted to HW GPU and will be
528 * cleaned up during the resetting process later, so doing
529 * the workload clean up here doesn't have any impact.
530 **/
531 clean_workloads(vgpu, ENGINE_MASK(ring_id));
516 goto out; 532 goto out;
533 }
517 534
518 if (!list_empty(workload_q_head(vgpu, workload->ring_id))) { 535 if (!list_empty(workload_q_head(vgpu, ring_id))) {
519 struct execlist_ctx_descriptor_format *this_desc, *next_desc; 536 struct execlist_ctx_descriptor_format *this_desc, *next_desc;
520 537
521 next_workload = container_of(next, 538 next_workload = container_of(next,
diff --git a/drivers/gpu/drm/i915/gvt/firmware.c b/drivers/gpu/drm/i915/gvt/firmware.c
index 5dad9298b2d5..a26c1705430e 100644
--- a/drivers/gpu/drm/i915/gvt/firmware.c
+++ b/drivers/gpu/drm/i915/gvt/firmware.c
@@ -72,11 +72,13 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt)
72 struct intel_gvt_device_info *info = &gvt->device_info; 72 struct intel_gvt_device_info *info = &gvt->device_info;
73 struct pci_dev *pdev = gvt->dev_priv->drm.pdev; 73 struct pci_dev *pdev = gvt->dev_priv->drm.pdev;
74 struct intel_gvt_mmio_info *e; 74 struct intel_gvt_mmio_info *e;
75 struct gvt_mmio_block *block = gvt->mmio.mmio_block;
76 int num = gvt->mmio.num_mmio_block;
75 struct gvt_firmware_header *h; 77 struct gvt_firmware_header *h;
76 void *firmware; 78 void *firmware;
77 void *p; 79 void *p;
78 unsigned long size, crc32_start; 80 unsigned long size, crc32_start;
79 int i; 81 int i, j;
80 int ret; 82 int ret;
81 83
82 size = sizeof(*h) + info->mmio_size + info->cfg_space_size; 84 size = sizeof(*h) + info->mmio_size + info->cfg_space_size;
@@ -105,6 +107,13 @@ static int expose_firmware_sysfs(struct intel_gvt *gvt)
105 hash_for_each(gvt->mmio.mmio_info_table, i, e, node) 107 hash_for_each(gvt->mmio.mmio_info_table, i, e, node)
106 *(u32 *)(p + e->offset) = I915_READ_NOTRACE(_MMIO(e->offset)); 108 *(u32 *)(p + e->offset) = I915_READ_NOTRACE(_MMIO(e->offset));
107 109
110 for (i = 0; i < num; i++, block++) {
111 for (j = 0; j < block->size; j += 4)
112 *(u32 *)(p + INTEL_GVT_MMIO_OFFSET(block->offset) + j) =
113 I915_READ_NOTRACE(_MMIO(INTEL_GVT_MMIO_OFFSET(
114 block->offset) + j));
115 }
116
108 memcpy(gvt->firmware.mmio, p, info->mmio_size); 117 memcpy(gvt->firmware.mmio, p, info->mmio_size);
109 118
110 crc32_start = offsetof(struct gvt_firmware_header, crc32) + 4; 119 crc32_start = offsetof(struct gvt_firmware_header, crc32) + 4;
diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
index 3a74e79eac2f..2964a4d01a66 100644
--- a/drivers/gpu/drm/i915/gvt/gvt.h
+++ b/drivers/gpu/drm/i915/gvt/gvt.h
@@ -149,7 +149,7 @@ struct intel_vgpu {
149 bool active; 149 bool active;
150 bool pv_notified; 150 bool pv_notified;
151 bool failsafe; 151 bool failsafe;
152 bool resetting; 152 unsigned int resetting_eng;
153 void *sched_data; 153 void *sched_data;
154 struct vgpu_sched_ctl sched_ctl; 154 struct vgpu_sched_ctl sched_ctl;
155 155
@@ -195,6 +195,15 @@ struct intel_gvt_fence {
195 unsigned long vgpu_allocated_fence_num; 195 unsigned long vgpu_allocated_fence_num;
196}; 196};
197 197
198/* Special MMIO blocks. */
199struct gvt_mmio_block {
200 unsigned int device;
201 i915_reg_t offset;
202 unsigned int size;
203 gvt_mmio_func read;
204 gvt_mmio_func write;
205};
206
198#define INTEL_GVT_MMIO_HASH_BITS 11 207#define INTEL_GVT_MMIO_HASH_BITS 11
199 208
200struct intel_gvt_mmio { 209struct intel_gvt_mmio {
@@ -214,6 +223,9 @@ struct intel_gvt_mmio {
214/* This reg could be accessed by unaligned address */ 223/* This reg could be accessed by unaligned address */
215#define F_UNALIGN (1 << 6) 224#define F_UNALIGN (1 << 6)
216 225
226 struct gvt_mmio_block *mmio_block;
227 unsigned int num_mmio_block;
228
217 DECLARE_HASHTABLE(mmio_info_table, INTEL_GVT_MMIO_HASH_BITS); 229 DECLARE_HASHTABLE(mmio_info_table, INTEL_GVT_MMIO_HASH_BITS);
218 unsigned int num_tracked_mmio; 230 unsigned int num_tracked_mmio;
219}; 231};
diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c
index 17febe830ff6..feed9921b3b3 100644
--- a/drivers/gpu/drm/i915/gvt/handlers.c
+++ b/drivers/gpu/drm/i915/gvt/handlers.c
@@ -2857,31 +2857,15 @@ static int init_skl_mmio_info(struct intel_gvt *gvt)
2857 return 0; 2857 return 0;
2858} 2858}
2859 2859
2860/* Special MMIO blocks. */
2861static struct gvt_mmio_block {
2862 unsigned int device;
2863 i915_reg_t offset;
2864 unsigned int size;
2865 gvt_mmio_func read;
2866 gvt_mmio_func write;
2867} gvt_mmio_blocks[] = {
2868 {D_SKL_PLUS, _MMIO(CSR_MMIO_START_RANGE), 0x3000, NULL, NULL},
2869 {D_ALL, _MMIO(MCHBAR_MIRROR_BASE_SNB), 0x40000, NULL, NULL},
2870 {D_ALL, _MMIO(VGT_PVINFO_PAGE), VGT_PVINFO_SIZE,
2871 pvinfo_mmio_read, pvinfo_mmio_write},
2872 {D_ALL, LGC_PALETTE(PIPE_A, 0), 1024, NULL, NULL},
2873 {D_ALL, LGC_PALETTE(PIPE_B, 0), 1024, NULL, NULL},
2874 {D_ALL, LGC_PALETTE(PIPE_C, 0), 1024, NULL, NULL},
2875};
2876
2877static struct gvt_mmio_block *find_mmio_block(struct intel_gvt *gvt, 2860static struct gvt_mmio_block *find_mmio_block(struct intel_gvt *gvt,
2878 unsigned int offset) 2861 unsigned int offset)
2879{ 2862{
2880 unsigned long device = intel_gvt_get_device_type(gvt); 2863 unsigned long device = intel_gvt_get_device_type(gvt);
2881 struct gvt_mmio_block *block = gvt_mmio_blocks; 2864 struct gvt_mmio_block *block = gvt->mmio.mmio_block;
2865 int num = gvt->mmio.num_mmio_block;
2882 int i; 2866 int i;
2883 2867
2884 for (i = 0; i < ARRAY_SIZE(gvt_mmio_blocks); i++, block++) { 2868 for (i = 0; i < num; i++, block++) {
2885 if (!(device & block->device)) 2869 if (!(device & block->device))
2886 continue; 2870 continue;
2887 if (offset >= INTEL_GVT_MMIO_OFFSET(block->offset) && 2871 if (offset >= INTEL_GVT_MMIO_OFFSET(block->offset) &&
@@ -2912,6 +2896,17 @@ void intel_gvt_clean_mmio_info(struct intel_gvt *gvt)
2912 gvt->mmio.mmio_attribute = NULL; 2896 gvt->mmio.mmio_attribute = NULL;
2913} 2897}
2914 2898
2899/* Special MMIO blocks. */
2900static struct gvt_mmio_block mmio_blocks[] = {
2901 {D_SKL_PLUS, _MMIO(CSR_MMIO_START_RANGE), 0x3000, NULL, NULL},
2902 {D_ALL, _MMIO(MCHBAR_MIRROR_BASE_SNB), 0x40000, NULL, NULL},
2903 {D_ALL, _MMIO(VGT_PVINFO_PAGE), VGT_PVINFO_SIZE,
2904 pvinfo_mmio_read, pvinfo_mmio_write},
2905 {D_ALL, LGC_PALETTE(PIPE_A, 0), 1024, NULL, NULL},
2906 {D_ALL, LGC_PALETTE(PIPE_B, 0), 1024, NULL, NULL},
2907 {D_ALL, LGC_PALETTE(PIPE_C, 0), 1024, NULL, NULL},
2908};
2909
2915/** 2910/**
2916 * intel_gvt_setup_mmio_info - setup MMIO information table for GVT device 2911 * intel_gvt_setup_mmio_info - setup MMIO information table for GVT device
2917 * @gvt: GVT device 2912 * @gvt: GVT device
@@ -2951,6 +2946,9 @@ int intel_gvt_setup_mmio_info(struct intel_gvt *gvt)
2951 goto err; 2946 goto err;
2952 } 2947 }
2953 2948
2949 gvt->mmio.mmio_block = mmio_blocks;
2950 gvt->mmio.num_mmio_block = ARRAY_SIZE(mmio_blocks);
2951
2954 gvt_dbg_mmio("traced %u virtual mmio registers\n", 2952 gvt_dbg_mmio("traced %u virtual mmio registers\n",
2955 gvt->mmio.num_tracked_mmio); 2953 gvt->mmio.num_tracked_mmio);
2956 return 0; 2954 return 0;
@@ -3030,7 +3028,7 @@ int intel_vgpu_mmio_reg_rw(struct intel_vgpu *vgpu, unsigned int offset,
3030 gvt_mmio_func func; 3028 gvt_mmio_func func;
3031 int ret; 3029 int ret;
3032 3030
3033 if (WARN_ON(bytes > 4)) 3031 if (WARN_ON(bytes > 8))
3034 return -EINVAL; 3032 return -EINVAL;
3035 3033
3036 /* 3034 /*
diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c
index 4f7057d62d88..22e08eb2d0b7 100644
--- a/drivers/gpu/drm/i915/gvt/scheduler.c
+++ b/drivers/gpu/drm/i915/gvt/scheduler.c
@@ -432,7 +432,8 @@ static void complete_current_workload(struct intel_gvt *gvt, int ring_id)
432 432
433 i915_gem_request_put(fetch_and_zero(&workload->req)); 433 i915_gem_request_put(fetch_and_zero(&workload->req));
434 434
435 if (!workload->status && !vgpu->resetting) { 435 if (!workload->status && !(vgpu->resetting_eng &
436 ENGINE_MASK(ring_id))) {
436 update_guest_context(workload); 437 update_guest_context(workload);
437 438
438 for_each_set_bit(event, workload->pending_events, 439 for_each_set_bit(event, workload->pending_events,
diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt/vgpu.c
index 90c14e6e3ea0..3deadcbd5a24 100644
--- a/drivers/gpu/drm/i915/gvt/vgpu.c
+++ b/drivers/gpu/drm/i915/gvt/vgpu.c
@@ -480,11 +480,13 @@ void intel_gvt_reset_vgpu_locked(struct intel_vgpu *vgpu, bool dmlr,
480{ 480{
481 struct intel_gvt *gvt = vgpu->gvt; 481 struct intel_gvt *gvt = vgpu->gvt;
482 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler; 482 struct intel_gvt_workload_scheduler *scheduler = &gvt->scheduler;
483 unsigned int resetting_eng = dmlr ? ALL_ENGINES : engine_mask;
483 484
484 gvt_dbg_core("------------------------------------------\n"); 485 gvt_dbg_core("------------------------------------------\n");
485 gvt_dbg_core("resseting vgpu%d, dmlr %d, engine_mask %08x\n", 486 gvt_dbg_core("resseting vgpu%d, dmlr %d, engine_mask %08x\n",
486 vgpu->id, dmlr, engine_mask); 487 vgpu->id, dmlr, engine_mask);
487 vgpu->resetting = true; 488
489 vgpu->resetting_eng = resetting_eng;
488 490
489 intel_vgpu_stop_schedule(vgpu); 491 intel_vgpu_stop_schedule(vgpu);
490 /* 492 /*
@@ -497,7 +499,7 @@ void intel_gvt_reset_vgpu_locked(struct intel_vgpu *vgpu, bool dmlr,
497 mutex_lock(&gvt->lock); 499 mutex_lock(&gvt->lock);
498 } 500 }
499 501
500 intel_vgpu_reset_execlist(vgpu, dmlr ? ALL_ENGINES : engine_mask); 502 intel_vgpu_reset_execlist(vgpu, resetting_eng);
501 503
502 /* full GPU reset or device model level reset */ 504 /* full GPU reset or device model level reset */
503 if (engine_mask == ALL_ENGINES || dmlr) { 505 if (engine_mask == ALL_ENGINES || dmlr) {
@@ -520,7 +522,7 @@ void intel_gvt_reset_vgpu_locked(struct intel_vgpu *vgpu, bool dmlr,
520 } 522 }
521 } 523 }
522 524
523 vgpu->resetting = false; 525 vgpu->resetting_eng = 0;
524 gvt_dbg_core("reset vgpu%d done\n", vgpu->id); 526 gvt_dbg_core("reset vgpu%d done\n", vgpu->id);
525 gvt_dbg_core("------------------------------------------\n"); 527 gvt_dbg_core("------------------------------------------\n");
526} 528}
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 00d8967c8512..d1bd53b73738 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4580,7 +4580,7 @@ static void gen9_sseu_device_status(struct drm_i915_private *dev_priv,
4580 4580
4581 sseu->slice_mask |= BIT(s); 4581 sseu->slice_mask |= BIT(s);
4582 4582
4583 if (IS_GEN9_BC(dev_priv)) 4583 if (IS_GEN9_BC(dev_priv) || IS_CANNONLAKE(dev_priv))
4584 sseu->subslice_mask = 4584 sseu->subslice_mask =
4585 INTEL_INFO(dev_priv)->sseu.subslice_mask; 4585 INTEL_INFO(dev_priv)->sseu.subslice_mask;
4586 4586
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 39ed58a21fc1..e1e971ee2ed5 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -688,19 +688,19 @@ static inline bool skip_rcs_switch(struct i915_hw_ppgtt *ppgtt,
688} 688}
689 689
690static bool 690static bool
691needs_pd_load_pre(struct i915_hw_ppgtt *ppgtt, 691needs_pd_load_pre(struct i915_hw_ppgtt *ppgtt, struct intel_engine_cs *engine)
692 struct intel_engine_cs *engine,
693 struct i915_gem_context *to)
694{ 692{
693 struct i915_gem_context *from = engine->legacy_active_context;
694
695 if (!ppgtt) 695 if (!ppgtt)
696 return false; 696 return false;
697 697
698 /* Always load the ppgtt on first use */ 698 /* Always load the ppgtt on first use */
699 if (!engine->legacy_active_context) 699 if (!from)
700 return true; 700 return true;
701 701
702 /* Same context without new entries, skip */ 702 /* Same context without new entries, skip */
703 if (engine->legacy_active_context == to && 703 if ((!from->ppgtt || from->ppgtt == ppgtt) &&
704 !(intel_engine_flag(engine) & ppgtt->pd_dirty_rings)) 704 !(intel_engine_flag(engine) & ppgtt->pd_dirty_rings))
705 return false; 705 return false;
706 706
@@ -744,7 +744,7 @@ static int do_rcs_switch(struct drm_i915_gem_request *req)
744 if (skip_rcs_switch(ppgtt, engine, to)) 744 if (skip_rcs_switch(ppgtt, engine, to))
745 return 0; 745 return 0;
746 746
747 if (needs_pd_load_pre(ppgtt, engine, to)) { 747 if (needs_pd_load_pre(ppgtt, engine)) {
748 /* Older GENs and non render rings still want the load first, 748 /* Older GENs and non render rings still want the load first,
749 * "PP_DCLV followed by PP_DIR_BASE register through Load 749 * "PP_DCLV followed by PP_DIR_BASE register through Load
750 * Register Immediate commands in Ring Buffer before submitting 750 * Register Immediate commands in Ring Buffer before submitting
@@ -841,7 +841,7 @@ int i915_switch_context(struct drm_i915_gem_request *req)
841 struct i915_hw_ppgtt *ppgtt = 841 struct i915_hw_ppgtt *ppgtt =
842 to->ppgtt ?: req->i915->mm.aliasing_ppgtt; 842 to->ppgtt ?: req->i915->mm.aliasing_ppgtt;
843 843
844 if (needs_pd_load_pre(ppgtt, engine, to)) { 844 if (needs_pd_load_pre(ppgtt, engine)) {
845 int ret; 845 int ret;
846 846
847 trace_switch_mm(engine, to); 847 trace_switch_mm(engine, to);
@@ -852,6 +852,7 @@ int i915_switch_context(struct drm_i915_gem_request *req)
852 ppgtt->pd_dirty_rings &= ~intel_engine_flag(engine); 852 ppgtt->pd_dirty_rings &= ~intel_engine_flag(engine);
853 } 853 }
854 854
855 engine->legacy_active_context = to;
855 return 0; 856 return 0;
856 } 857 }
857 858
diff --git a/drivers/gpu/drm/i915/i915_gem_render_state.c b/drivers/gpu/drm/i915/i915_gem_render_state.c
index 7032c542a9b1..4dd4c2159a92 100644
--- a/drivers/gpu/drm/i915/i915_gem_render_state.c
+++ b/drivers/gpu/drm/i915/i915_gem_render_state.c
@@ -242,6 +242,10 @@ int i915_gem_render_state_emit(struct drm_i915_gem_request *req)
242 goto err_unpin; 242 goto err_unpin;
243 } 243 }
244 244
245 ret = req->engine->emit_flush(req, EMIT_INVALIDATE);
246 if (ret)
247 goto err_unpin;
248
245 ret = req->engine->emit_bb_start(req, 249 ret = req->engine->emit_bb_start(req,
246 so->batch_offset, so->batch_size, 250 so->batch_offset, so->batch_size,
247 I915_DISPATCH_SECURE); 251 I915_DISPATCH_SECURE);
diff --git a/drivers/gpu/drm/i915/i915_gem_shrinker.c b/drivers/gpu/drm/i915/i915_gem_shrinker.c
index 1032f98add11..77fb39808131 100644
--- a/drivers/gpu/drm/i915/i915_gem_shrinker.c
+++ b/drivers/gpu/drm/i915/i915_gem_shrinker.c
@@ -43,16 +43,21 @@ static bool shrinker_lock(struct drm_i915_private *dev_priv, bool *unlock)
43 return true; 43 return true;
44 44
45 case MUTEX_TRYLOCK_FAILED: 45 case MUTEX_TRYLOCK_FAILED:
46 *unlock = false;
47 preempt_disable();
46 do { 48 do {
47 cpu_relax(); 49 cpu_relax();
48 if (mutex_trylock(&dev_priv->drm.struct_mutex)) { 50 if (mutex_trylock(&dev_priv->drm.struct_mutex)) {
49 case MUTEX_TRYLOCK_SUCCESS:
50 *unlock = true; 51 *unlock = true;
51 return true; 52 break;
52 } 53 }
53 } while (!need_resched()); 54 } while (!need_resched());
55 preempt_enable();
56 return *unlock;
54 57
55 return false; 58 case MUTEX_TRYLOCK_SUCCESS:
59 *unlock = true;
60 return true;
56 } 61 }
57 62
58 BUG(); 63 BUG();
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 9cd22f83b0cf..f33d90226704 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -1601,11 +1601,11 @@ static int gen8_emit_oa_config(struct drm_i915_gem_request *req)
1601 u32 *cs; 1601 u32 *cs;
1602 int i; 1602 int i;
1603 1603
1604 cs = intel_ring_begin(req, n_flex_regs * 2 + 4); 1604 cs = intel_ring_begin(req, ARRAY_SIZE(flex_mmio) * 2 + 4);
1605 if (IS_ERR(cs)) 1605 if (IS_ERR(cs))
1606 return PTR_ERR(cs); 1606 return PTR_ERR(cs);
1607 1607
1608 *cs++ = MI_LOAD_REGISTER_IMM(n_flex_regs + 1); 1608 *cs++ = MI_LOAD_REGISTER_IMM(ARRAY_SIZE(flex_mmio) + 1);
1609 1609
1610 *cs++ = i915_mmio_reg_offset(GEN8_OACTXCONTROL); 1610 *cs++ = i915_mmio_reg_offset(GEN8_OACTXCONTROL);
1611 *cs++ = (dev_priv->perf.oa.period_exponent << GEN8_OA_TIMER_PERIOD_SHIFT) | 1611 *cs++ = (dev_priv->perf.oa.period_exponent << GEN8_OA_TIMER_PERIOD_SHIFT) |
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 639d45c1dd2e..7ea7fd1e8856 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1120,8 +1120,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
1120 bool is_dvi, is_hdmi, is_dp, is_edp, is_crt; 1120 bool is_dvi, is_hdmi, is_dp, is_edp, is_crt;
1121 uint8_t aux_channel, ddc_pin; 1121 uint8_t aux_channel, ddc_pin;
1122 /* Each DDI port can have more than one value on the "DVO Port" field, 1122 /* Each DDI port can have more than one value on the "DVO Port" field,
1123 * so look for all the possible values for each port and abort if more 1123 * so look for all the possible values for each port.
1124 * than one is found. */ 1124 */
1125 int dvo_ports[][3] = { 1125 int dvo_ports[][3] = {
1126 {DVO_PORT_HDMIA, DVO_PORT_DPA, -1}, 1126 {DVO_PORT_HDMIA, DVO_PORT_DPA, -1},
1127 {DVO_PORT_HDMIB, DVO_PORT_DPB, -1}, 1127 {DVO_PORT_HDMIB, DVO_PORT_DPB, -1},
@@ -1130,7 +1130,10 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
1130 {DVO_PORT_CRT, DVO_PORT_HDMIE, DVO_PORT_DPE}, 1130 {DVO_PORT_CRT, DVO_PORT_HDMIE, DVO_PORT_DPE},
1131 }; 1131 };
1132 1132
1133 /* Find the child device to use, abort if more than one found. */ 1133 /*
1134 * Find the first child device to reference the port, report if more
1135 * than one found.
1136 */
1134 for (i = 0; i < dev_priv->vbt.child_dev_num; i++) { 1137 for (i = 0; i < dev_priv->vbt.child_dev_num; i++) {
1135 it = dev_priv->vbt.child_dev + i; 1138 it = dev_priv->vbt.child_dev + i;
1136 1139
@@ -1140,11 +1143,11 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
1140 1143
1141 if (it->common.dvo_port == dvo_ports[port][j]) { 1144 if (it->common.dvo_port == dvo_ports[port][j]) {
1142 if (child) { 1145 if (child) {
1143 DRM_DEBUG_KMS("More than one child device for port %c in VBT.\n", 1146 DRM_DEBUG_KMS("More than one child device for port %c in VBT, using the first.\n",
1144 port_name(port)); 1147 port_name(port));
1145 return; 1148 } else {
1149 child = it;
1146 } 1150 }
1147 child = it;
1148 } 1151 }
1149 } 1152 }
1150 } 1153 }
diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index 306c6b06b330..17c4ae7e4e7c 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -398,6 +398,7 @@ static void bdw_load_gamma_lut(struct drm_crtc_state *state, u32 offset)
398 } 398 }
399 399
400 /* Program the max register to clamp values > 1.0. */ 400 /* Program the max register to clamp values > 1.0. */
401 i = lut_size - 1;
401 I915_WRITE(PREC_PAL_GC_MAX(pipe, 0), 402 I915_WRITE(PREC_PAL_GC_MAX(pipe, 0),
402 drm_color_lut_extract(lut[i].red, 16)); 403 drm_color_lut_extract(lut[i].red, 16));
403 I915_WRITE(PREC_PAL_GC_MAX(pipe, 1), 404 I915_WRITE(PREC_PAL_GC_MAX(pipe, 1),
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 9edeaaef77ad..d3b3252a8742 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1762,7 +1762,7 @@ cnl_get_buf_trans_edp(struct drm_i915_private *dev_priv,
1762 if (dev_priv->vbt.edp.low_vswing) { 1762 if (dev_priv->vbt.edp.low_vswing) {
1763 if (voltage == VOLTAGE_INFO_0_85V) { 1763 if (voltage == VOLTAGE_INFO_0_85V) {
1764 *n_entries = ARRAY_SIZE(cnl_ddi_translations_edp_0_85V); 1764 *n_entries = ARRAY_SIZE(cnl_ddi_translations_edp_0_85V);
1765 return cnl_ddi_translations_dp_0_85V; 1765 return cnl_ddi_translations_edp_0_85V;
1766 } else if (voltage == VOLTAGE_INFO_0_95V) { 1766 } else if (voltage == VOLTAGE_INFO_0_95V) {
1767 *n_entries = ARRAY_SIZE(cnl_ddi_translations_edp_0_95V); 1767 *n_entries = ARRAY_SIZE(cnl_ddi_translations_edp_0_95V);
1768 return cnl_ddi_translations_edp_0_95V; 1768 return cnl_ddi_translations_edp_0_95V;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 9471c88d449e..cc484b56eeaa 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3485,6 +3485,13 @@ void intel_prepare_reset(struct drm_i915_private *dev_priv)
3485 !gpu_reset_clobbers_display(dev_priv)) 3485 !gpu_reset_clobbers_display(dev_priv))
3486 return; 3486 return;
3487 3487
3488 /* We have a modeset vs reset deadlock, defensively unbreak it.
3489 *
3490 * FIXME: We can do a _lot_ better, this is just a first iteration.
3491 */
3492 i915_gem_set_wedged(dev_priv);
3493 DRM_DEBUG_DRIVER("Wedging GPU to avoid deadlocks with pending modeset updates\n");
3494
3488 /* 3495 /*
3489 * Need mode_config.mutex so that we don't 3496 * Need mode_config.mutex so that we don't
3490 * trample ongoing ->detect() and whatnot. 3497 * trample ongoing ->detect() and whatnot.
diff --git a/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c b/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c
index 6e09ceb71500..150a156f3b1e 100644
--- a/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c
+++ b/drivers/gpu/drm/i915/intel_dsi_dcs_backlight.c
@@ -46,7 +46,7 @@ static u32 dcs_get_backlight(struct intel_connector *connector)
46 struct intel_encoder *encoder = connector->encoder; 46 struct intel_encoder *encoder = connector->encoder;
47 struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base); 47 struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base);
48 struct mipi_dsi_device *dsi_device; 48 struct mipi_dsi_device *dsi_device;
49 u8 data; 49 u8 data = 0;
50 enum port port; 50 enum port port;
51 51
52 /* FIXME: Need to take care of 16 bit brightness level */ 52 /* FIXME: Need to take care of 16 bit brightness level */
diff --git a/drivers/gpu/drm/i915/intel_dsi_vbt.c b/drivers/gpu/drm/i915/intel_dsi_vbt.c
index 7158c7ce9c09..91c07b0c8db9 100644
--- a/drivers/gpu/drm/i915/intel_dsi_vbt.c
+++ b/drivers/gpu/drm/i915/intel_dsi_vbt.c
@@ -306,7 +306,7 @@ static void bxt_exec_gpio(struct drm_i915_private *dev_priv,
306 306
307 if (!gpio_desc) { 307 if (!gpio_desc) {
308 gpio_desc = devm_gpiod_get_index(dev_priv->drm.dev, 308 gpio_desc = devm_gpiod_get_index(dev_priv->drm.dev,
309 "panel", gpio_index, 309 NULL, gpio_index,
310 value ? GPIOD_OUT_LOW : 310 value ? GPIOD_OUT_LOW :
311 GPIOD_OUT_HIGH); 311 GPIOD_OUT_HIGH);
312 312
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 7404cf2aac28..2afa4daa88e8 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1221,6 +1221,14 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)
1221 return ret; 1221 return ret;
1222} 1222}
1223 1223
1224static u8 gtiir[] = {
1225 [RCS] = 0,
1226 [BCS] = 0,
1227 [VCS] = 1,
1228 [VCS2] = 1,
1229 [VECS] = 3,
1230};
1231
1224static int gen8_init_common_ring(struct intel_engine_cs *engine) 1232static int gen8_init_common_ring(struct intel_engine_cs *engine)
1225{ 1233{
1226 struct drm_i915_private *dev_priv = engine->i915; 1234 struct drm_i915_private *dev_priv = engine->i915;
@@ -1245,9 +1253,22 @@ static int gen8_init_common_ring(struct intel_engine_cs *engine)
1245 1253
1246 DRM_DEBUG_DRIVER("Execlists enabled for %s\n", engine->name); 1254 DRM_DEBUG_DRIVER("Execlists enabled for %s\n", engine->name);
1247 1255
1248 /* After a GPU reset, we may have requests to replay */ 1256 GEM_BUG_ON(engine->id >= ARRAY_SIZE(gtiir));
1257
1258 /*
1259 * Clear any pending interrupt state.
1260 *
1261 * We do it twice out of paranoia that some of the IIR are double
1262 * buffered, and if we only reset it once there may still be
1263 * an interrupt pending.
1264 */
1265 I915_WRITE(GEN8_GT_IIR(gtiir[engine->id]),
1266 GT_CONTEXT_SWITCH_INTERRUPT << engine->irq_shift);
1267 I915_WRITE(GEN8_GT_IIR(gtiir[engine->id]),
1268 GT_CONTEXT_SWITCH_INTERRUPT << engine->irq_shift);
1249 clear_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted); 1269 clear_bit(ENGINE_IRQ_EXECLIST, &engine->irq_posted);
1250 1270
1271 /* After a GPU reset, we may have requests to replay */
1251 submit = false; 1272 submit = false;
1252 for (n = 0; n < ARRAY_SIZE(engine->execlist_port); n++) { 1273 for (n = 0; n < ARRAY_SIZE(engine->execlist_port); n++) {
1253 if (!port_isset(&port[n])) 1274 if (!port_isset(&port[n]))
diff --git a/drivers/gpu/drm/i915/intel_lrc.h b/drivers/gpu/drm/i915/intel_lrc.h
index 52b3a1fd4059..57ef5833c427 100644
--- a/drivers/gpu/drm/i915/intel_lrc.h
+++ b/drivers/gpu/drm/i915/intel_lrc.h
@@ -63,7 +63,6 @@ enum {
63}; 63};
64 64
65/* Logical Rings */ 65/* Logical Rings */
66void intel_logical_ring_stop(struct intel_engine_cs *engine);
67void intel_logical_ring_cleanup(struct intel_engine_cs *engine); 66void intel_logical_ring_cleanup(struct intel_engine_cs *engine);
68int logical_render_ring_init(struct intel_engine_cs *engine); 67int logical_render_ring_init(struct intel_engine_cs *engine);
69int logical_xcs_ring_init(struct intel_engine_cs *engine); 68int logical_xcs_ring_init(struct intel_engine_cs *engine);
diff --git a/drivers/gpu/drm/i915/intel_lspcon.c b/drivers/gpu/drm/i915/intel_lspcon.c
index 5abef482eacf..beb9baaf2f2e 100644
--- a/drivers/gpu/drm/i915/intel_lspcon.c
+++ b/drivers/gpu/drm/i915/intel_lspcon.c
@@ -210,8 +210,8 @@ bool lspcon_init(struct intel_digital_port *intel_dig_port)
210 struct drm_device *dev = intel_dig_port->base.base.dev; 210 struct drm_device *dev = intel_dig_port->base.base.dev;
211 struct drm_i915_private *dev_priv = to_i915(dev); 211 struct drm_i915_private *dev_priv = to_i915(dev);
212 212
213 if (!IS_GEN9(dev_priv)) { 213 if (!HAS_LSPCON(dev_priv)) {
214 DRM_ERROR("LSPCON is supported on GEN9 only\n"); 214 DRM_ERROR("LSPCON is not supported on this platform\n");
215 return false; 215 return false;
216 } 216 }
217 217
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 96c2cbd81869..593349be8b9d 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -469,7 +469,7 @@ static u32 intel_panel_compute_brightness(struct intel_connector *connector,
469 469
470 if (i915.invert_brightness > 0 || 470 if (i915.invert_brightness > 0 ||
471 dev_priv->quirks & QUIRK_INVERT_BRIGHTNESS) { 471 dev_priv->quirks & QUIRK_INVERT_BRIGHTNESS) {
472 return panel->backlight.max - val; 472 return panel->backlight.max - val + panel->backlight.min;
473 } 473 }
474 474
475 return val; 475 return val;
diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c
index 6276bb834b4f..d3845989a29d 100644
--- a/drivers/gpu/drm/imx/ipuv3-plane.c
+++ b/drivers/gpu/drm/imx/ipuv3-plane.c
@@ -545,15 +545,13 @@ static void ipu_plane_atomic_update(struct drm_plane *plane,
545 return; 545 return;
546 } 546 }
547 547
548 ics = ipu_drm_fourcc_to_colorspace(fb->format->format);
548 switch (ipu_plane->dp_flow) { 549 switch (ipu_plane->dp_flow) {
549 case IPU_DP_FLOW_SYNC_BG: 550 case IPU_DP_FLOW_SYNC_BG:
550 ipu_dp_setup_channel(ipu_plane->dp, 551 ipu_dp_setup_channel(ipu_plane->dp, ics, IPUV3_COLORSPACE_RGB);
551 IPUV3_COLORSPACE_RGB,
552 IPUV3_COLORSPACE_RGB);
553 ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true); 552 ipu_dp_set_global_alpha(ipu_plane->dp, true, 0, true);
554 break; 553 break;
555 case IPU_DP_FLOW_SYNC_FG: 554 case IPU_DP_FLOW_SYNC_FG:
556 ics = ipu_drm_fourcc_to_colorspace(state->fb->format->format);
557 ipu_dp_setup_channel(ipu_plane->dp, ics, 555 ipu_dp_setup_channel(ipu_plane->dp, ics,
558 IPUV3_COLORSPACE_UNKNOWN); 556 IPUV3_COLORSPACE_UNKNOWN);
559 /* Enable local alpha on partial plane */ 557 /* Enable local alpha on partial plane */
diff --git a/drivers/gpu/drm/msm/Kconfig b/drivers/gpu/drm/msm/Kconfig
index b638d192ce5e..99d39b2aefa6 100644
--- a/drivers/gpu/drm/msm/Kconfig
+++ b/drivers/gpu/drm/msm/Kconfig
@@ -5,7 +5,7 @@ config DRM_MSM
5 depends on ARCH_QCOM || (ARM && COMPILE_TEST) 5 depends on ARCH_QCOM || (ARM && COMPILE_TEST)
6 depends on OF && COMMON_CLK 6 depends on OF && COMMON_CLK
7 depends on MMU 7 depends on MMU
8 select QCOM_MDT_LOADER 8 select QCOM_MDT_LOADER if ARCH_QCOM
9 select REGULATOR 9 select REGULATOR
10 select DRM_KMS_HELPER 10 select DRM_KMS_HELPER
11 select DRM_PANEL 11 select DRM_PANEL
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index b4b54f1c24bc..f9eae03aa1dc 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -15,7 +15,7 @@
15#include <linux/cpumask.h> 15#include <linux/cpumask.h>
16#include <linux/qcom_scm.h> 16#include <linux/qcom_scm.h>
17#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
18#include <linux/of_reserved_mem.h> 18#include <linux/of_address.h>
19#include <linux/soc/qcom/mdt_loader.h> 19#include <linux/soc/qcom/mdt_loader.h>
20#include "msm_gem.h" 20#include "msm_gem.h"
21#include "msm_mmu.h" 21#include "msm_mmu.h"
@@ -26,16 +26,34 @@ static void a5xx_dump(struct msm_gpu *gpu);
26 26
27#define GPU_PAS_ID 13 27#define GPU_PAS_ID 13
28 28
29#if IS_ENABLED(CONFIG_QCOM_MDT_LOADER)
30
31static int zap_shader_load_mdt(struct device *dev, const char *fwname) 29static int zap_shader_load_mdt(struct device *dev, const char *fwname)
32{ 30{
33 const struct firmware *fw; 31 const struct firmware *fw;
32 struct device_node *np;
33 struct resource r;
34 phys_addr_t mem_phys; 34 phys_addr_t mem_phys;
35 ssize_t mem_size; 35 ssize_t mem_size;
36 void *mem_region = NULL; 36 void *mem_region = NULL;
37 int ret; 37 int ret;
38 38
39 if (!IS_ENABLED(CONFIG_ARCH_QCOM))
40 return -EINVAL;
41
42 np = of_get_child_by_name(dev->of_node, "zap-shader");
43 if (!np)
44 return -ENODEV;
45
46 np = of_parse_phandle(np, "memory-region", 0);
47 if (!np)
48 return -EINVAL;
49
50 ret = of_address_to_resource(np, 0, &r);
51 if (ret)
52 return ret;
53
54 mem_phys = r.start;
55 mem_size = resource_size(&r);
56
39 /* Request the MDT file for the firmware */ 57 /* Request the MDT file for the firmware */
40 ret = request_firmware(&fw, fwname, dev); 58 ret = request_firmware(&fw, fwname, dev);
41 if (ret) { 59 if (ret) {
@@ -51,7 +69,7 @@ static int zap_shader_load_mdt(struct device *dev, const char *fwname)
51 } 69 }
52 70
53 /* Allocate memory for the firmware image */ 71 /* Allocate memory for the firmware image */
54 mem_region = dmam_alloc_coherent(dev, mem_size, &mem_phys, GFP_KERNEL); 72 mem_region = memremap(mem_phys, mem_size, MEMREMAP_WC);
55 if (!mem_region) { 73 if (!mem_region) {
56 ret = -ENOMEM; 74 ret = -ENOMEM;
57 goto out; 75 goto out;
@@ -69,16 +87,13 @@ static int zap_shader_load_mdt(struct device *dev, const char *fwname)
69 DRM_DEV_ERROR(dev, "Unable to authorize the image\n"); 87 DRM_DEV_ERROR(dev, "Unable to authorize the image\n");
70 88
71out: 89out:
90 if (mem_region)
91 memunmap(mem_region);
92
72 release_firmware(fw); 93 release_firmware(fw);
73 94
74 return ret; 95 return ret;
75} 96}
76#else
77static int zap_shader_load_mdt(struct device *dev, const char *fwname)
78{
79 return -ENODEV;
80}
81#endif
82 97
83static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit, 98static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
84 struct msm_file_private *ctx) 99 struct msm_file_private *ctx)
@@ -117,12 +132,10 @@ static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit,
117 gpu->funcs->flush(gpu); 132 gpu->funcs->flush(gpu);
118} 133}
119 134
120struct a5xx_hwcg { 135static const struct {
121 u32 offset; 136 u32 offset;
122 u32 value; 137 u32 value;
123}; 138} a5xx_hwcg[] = {
124
125static const struct a5xx_hwcg a530_hwcg[] = {
126 {REG_A5XX_RBBM_CLOCK_CNTL_SP0, 0x02222222}, 139 {REG_A5XX_RBBM_CLOCK_CNTL_SP0, 0x02222222},
127 {REG_A5XX_RBBM_CLOCK_CNTL_SP1, 0x02222222}, 140 {REG_A5XX_RBBM_CLOCK_CNTL_SP1, 0x02222222},
128 {REG_A5XX_RBBM_CLOCK_CNTL_SP2, 0x02222222}, 141 {REG_A5XX_RBBM_CLOCK_CNTL_SP2, 0x02222222},
@@ -217,38 +230,16 @@ static const struct a5xx_hwcg a530_hwcg[] = {
217 {REG_A5XX_RBBM_CLOCK_DELAY_VFD, 0x00002222} 230 {REG_A5XX_RBBM_CLOCK_DELAY_VFD, 0x00002222}
218}; 231};
219 232
220static const struct { 233void a5xx_set_hwcg(struct msm_gpu *gpu, bool state)
221 int (*test)(struct adreno_gpu *gpu);
222 const struct a5xx_hwcg *regs;
223 unsigned int count;
224} a5xx_hwcg_regs[] = {
225 { adreno_is_a530, a530_hwcg, ARRAY_SIZE(a530_hwcg), },
226};
227
228static void _a5xx_enable_hwcg(struct msm_gpu *gpu,
229 const struct a5xx_hwcg *regs, unsigned int count)
230{ 234{
231 unsigned int i; 235 unsigned int i;
232 236
233 for (i = 0; i < count; i++) 237 for (i = 0; i < ARRAY_SIZE(a5xx_hwcg); i++)
234 gpu_write(gpu, regs[i].offset, regs[i].value); 238 gpu_write(gpu, a5xx_hwcg[i].offset,
239 state ? a5xx_hwcg[i].value : 0);
235 240
236 gpu_write(gpu, REG_A5XX_RBBM_CLOCK_CNTL, 0xAAA8AA00); 241 gpu_write(gpu, REG_A5XX_RBBM_CLOCK_CNTL, state ? 0xAAA8AA00 : 0);
237 gpu_write(gpu, REG_A5XX_RBBM_ISDB_CNT, 0x182); 242 gpu_write(gpu, REG_A5XX_RBBM_ISDB_CNT, state ? 0x182 : 0x180);
238}
239
240static void a5xx_enable_hwcg(struct msm_gpu *gpu)
241{
242 struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
243 unsigned int i;
244
245 for (i = 0; i < ARRAY_SIZE(a5xx_hwcg_regs); i++) {
246 if (a5xx_hwcg_regs[i].test(adreno_gpu)) {
247 _a5xx_enable_hwcg(gpu, a5xx_hwcg_regs[i].regs,
248 a5xx_hwcg_regs[i].count);
249 return;
250 }
251 }
252} 243}
253 244
254static int a5xx_me_init(struct msm_gpu *gpu) 245static int a5xx_me_init(struct msm_gpu *gpu)
@@ -377,45 +368,6 @@ static int a5xx_zap_shader_resume(struct msm_gpu *gpu)
377 return ret; 368 return ret;
378} 369}
379 370
380/* Set up a child device to "own" the zap shader */
381static int a5xx_zap_shader_dev_init(struct device *parent, struct device *dev)
382{
383 struct device_node *node;
384 int ret;
385
386 if (dev->parent)
387 return 0;
388
389 /* Find the sub-node for the zap shader */
390 node = of_get_child_by_name(parent->of_node, "zap-shader");
391 if (!node) {
392 DRM_DEV_ERROR(parent, "zap-shader not found in device tree\n");
393 return -ENODEV;
394 }
395
396 dev->parent = parent;
397 dev->of_node = node;
398 dev_set_name(dev, "adreno_zap_shader");
399
400 ret = device_register(dev);
401 if (ret) {
402 DRM_DEV_ERROR(parent, "Couldn't register zap shader device\n");
403 goto out;
404 }
405
406 ret = of_reserved_mem_device_init(dev);
407 if (ret) {
408 DRM_DEV_ERROR(parent, "Unable to set up the reserved memory\n");
409 device_unregister(dev);
410 }
411
412out:
413 if (ret)
414 dev->parent = NULL;
415
416 return ret;
417}
418
419static int a5xx_zap_shader_init(struct msm_gpu *gpu) 371static int a5xx_zap_shader_init(struct msm_gpu *gpu)
420{ 372{
421 static bool loaded; 373 static bool loaded;
@@ -444,11 +396,7 @@ static int a5xx_zap_shader_init(struct msm_gpu *gpu)
444 return -ENODEV; 396 return -ENODEV;
445 } 397 }
446 398
447 ret = a5xx_zap_shader_dev_init(&pdev->dev, &a5xx_gpu->zap_dev); 399 ret = zap_shader_load_mdt(&pdev->dev, adreno_gpu->info->zapfw);
448
449 if (!ret)
450 ret = zap_shader_load_mdt(&a5xx_gpu->zap_dev,
451 adreno_gpu->info->zapfw);
452 400
453 loaded = !ret; 401 loaded = !ret;
454 402
@@ -545,7 +493,7 @@ static int a5xx_hw_init(struct msm_gpu *gpu)
545 gpu_write(gpu, REG_A5XX_RBBM_AHB_CNTL1, 0xA6FFFFFF); 493 gpu_write(gpu, REG_A5XX_RBBM_AHB_CNTL1, 0xA6FFFFFF);
546 494
547 /* Enable HWCG */ 495 /* Enable HWCG */
548 a5xx_enable_hwcg(gpu); 496 a5xx_set_hwcg(gpu, true);
549 497
550 gpu_write(gpu, REG_A5XX_RBBM_AHB_CNTL2, 0x0000003F); 498 gpu_write(gpu, REG_A5XX_RBBM_AHB_CNTL2, 0x0000003F);
551 499
@@ -691,9 +639,6 @@ static void a5xx_destroy(struct msm_gpu *gpu)
691 639
692 DBG("%s", gpu->name); 640 DBG("%s", gpu->name);
693 641
694 if (a5xx_gpu->zap_dev.parent)
695 device_unregister(&a5xx_gpu->zap_dev);
696
697 if (a5xx_gpu->pm4_bo) { 642 if (a5xx_gpu->pm4_bo) {
698 if (a5xx_gpu->pm4_iova) 643 if (a5xx_gpu->pm4_iova)
699 msm_gem_put_iova(a5xx_gpu->pm4_bo, gpu->aspace); 644 msm_gem_put_iova(a5xx_gpu->pm4_bo, gpu->aspace);
@@ -920,31 +865,30 @@ static const u32 a5xx_registers[] = {
920 0x0000, 0x0002, 0x0004, 0x0020, 0x0022, 0x0026, 0x0029, 0x002B, 865 0x0000, 0x0002, 0x0004, 0x0020, 0x0022, 0x0026, 0x0029, 0x002B,
921 0x002E, 0x0035, 0x0038, 0x0042, 0x0044, 0x0044, 0x0047, 0x0095, 866 0x002E, 0x0035, 0x0038, 0x0042, 0x0044, 0x0044, 0x0047, 0x0095,
922 0x0097, 0x00BB, 0x03A0, 0x0464, 0x0469, 0x046F, 0x04D2, 0x04D3, 867 0x0097, 0x00BB, 0x03A0, 0x0464, 0x0469, 0x046F, 0x04D2, 0x04D3,
923 0x04E0, 0x0533, 0x0540, 0x0555, 0xF400, 0xF400, 0xF800, 0xF807, 868 0x04E0, 0x0533, 0x0540, 0x0555, 0x0800, 0x081A, 0x081F, 0x0841,
924 0x0800, 0x081A, 0x081F, 0x0841, 0x0860, 0x0860, 0x0880, 0x08A0, 869 0x0860, 0x0860, 0x0880, 0x08A0, 0x0B00, 0x0B12, 0x0B15, 0x0B28,
925 0x0B00, 0x0B12, 0x0B15, 0x0B28, 0x0B78, 0x0B7F, 0x0BB0, 0x0BBD, 870 0x0B78, 0x0B7F, 0x0BB0, 0x0BBD, 0x0BC0, 0x0BC6, 0x0BD0, 0x0C53,
926 0x0BC0, 0x0BC6, 0x0BD0, 0x0C53, 0x0C60, 0x0C61, 0x0C80, 0x0C82, 871 0x0C60, 0x0C61, 0x0C80, 0x0C82, 0x0C84, 0x0C85, 0x0C90, 0x0C98,
927 0x0C84, 0x0C85, 0x0C90, 0x0C98, 0x0CA0, 0x0CA0, 0x0CB0, 0x0CB2, 872 0x0CA0, 0x0CA0, 0x0CB0, 0x0CB2, 0x2180, 0x2185, 0x2580, 0x2585,
928 0x2180, 0x2185, 0x2580, 0x2585, 0x0CC1, 0x0CC1, 0x0CC4, 0x0CC7, 873 0x0CC1, 0x0CC1, 0x0CC4, 0x0CC7, 0x0CCC, 0x0CCC, 0x0CD0, 0x0CD8,
929 0x0CCC, 0x0CCC, 0x0CD0, 0x0CD8, 0x0CE0, 0x0CE5, 0x0CE8, 0x0CE8, 874 0x0CE0, 0x0CE5, 0x0CE8, 0x0CE8, 0x0CEC, 0x0CF1, 0x0CFB, 0x0D0E,
930 0x0CEC, 0x0CF1, 0x0CFB, 0x0D0E, 0x2100, 0x211E, 0x2140, 0x2145, 875 0x2100, 0x211E, 0x2140, 0x2145, 0x2500, 0x251E, 0x2540, 0x2545,
931 0x2500, 0x251E, 0x2540, 0x2545, 0x0D10, 0x0D17, 0x0D20, 0x0D23, 876 0x0D10, 0x0D17, 0x0D20, 0x0D23, 0x0D30, 0x0D30, 0x20C0, 0x20C0,
932 0x0D30, 0x0D30, 0x20C0, 0x20C0, 0x24C0, 0x24C0, 0x0E40, 0x0E43, 877 0x24C0, 0x24C0, 0x0E40, 0x0E43, 0x0E4A, 0x0E4A, 0x0E50, 0x0E57,
933 0x0E4A, 0x0E4A, 0x0E50, 0x0E57, 0x0E60, 0x0E7C, 0x0E80, 0x0E8E, 878 0x0E60, 0x0E7C, 0x0E80, 0x0E8E, 0x0E90, 0x0E96, 0x0EA0, 0x0EA8,
934 0x0E90, 0x0E96, 0x0EA0, 0x0EA8, 0x0EB0, 0x0EB2, 0xE140, 0xE147, 879 0x0EB0, 0x0EB2, 0xE140, 0xE147, 0xE150, 0xE187, 0xE1A0, 0xE1A9,
935 0xE150, 0xE187, 0xE1A0, 0xE1A9, 0xE1B0, 0xE1B6, 0xE1C0, 0xE1C7, 880 0xE1B0, 0xE1B6, 0xE1C0, 0xE1C7, 0xE1D0, 0xE1D1, 0xE200, 0xE201,
936 0xE1D0, 0xE1D1, 0xE200, 0xE201, 0xE210, 0xE21C, 0xE240, 0xE268, 881 0xE210, 0xE21C, 0xE240, 0xE268, 0xE000, 0xE006, 0xE010, 0xE09A,
937 0xE000, 0xE006, 0xE010, 0xE09A, 0xE0A0, 0xE0A4, 0xE0AA, 0xE0EB, 882 0xE0A0, 0xE0A4, 0xE0AA, 0xE0EB, 0xE100, 0xE105, 0xE380, 0xE38F,
938 0xE100, 0xE105, 0xE380, 0xE38F, 0xE3B0, 0xE3B0, 0xE400, 0xE405, 883 0xE3B0, 0xE3B0, 0xE400, 0xE405, 0xE408, 0xE4E9, 0xE4F0, 0xE4F0,
939 0xE408, 0xE4E9, 0xE4F0, 0xE4F0, 0xE280, 0xE280, 0xE282, 0xE2A3, 884 0xE280, 0xE280, 0xE282, 0xE2A3, 0xE2A5, 0xE2C2, 0xE940, 0xE947,
940 0xE2A5, 0xE2C2, 0xE940, 0xE947, 0xE950, 0xE987, 0xE9A0, 0xE9A9, 885 0xE950, 0xE987, 0xE9A0, 0xE9A9, 0xE9B0, 0xE9B6, 0xE9C0, 0xE9C7,
941 0xE9B0, 0xE9B6, 0xE9C0, 0xE9C7, 0xE9D0, 0xE9D1, 0xEA00, 0xEA01, 886 0xE9D0, 0xE9D1, 0xEA00, 0xEA01, 0xEA10, 0xEA1C, 0xEA40, 0xEA68,
942 0xEA10, 0xEA1C, 0xEA40, 0xEA68, 0xE800, 0xE806, 0xE810, 0xE89A, 887 0xE800, 0xE806, 0xE810, 0xE89A, 0xE8A0, 0xE8A4, 0xE8AA, 0xE8EB,
943 0xE8A0, 0xE8A4, 0xE8AA, 0xE8EB, 0xE900, 0xE905, 0xEB80, 0xEB8F, 888 0xE900, 0xE905, 0xEB80, 0xEB8F, 0xEBB0, 0xEBB0, 0xEC00, 0xEC05,
944 0xEBB0, 0xEBB0, 0xEC00, 0xEC05, 0xEC08, 0xECE9, 0xECF0, 0xECF0, 889 0xEC08, 0xECE9, 0xECF0, 0xECF0, 0xEA80, 0xEA80, 0xEA82, 0xEAA3,
945 0xEA80, 0xEA80, 0xEA82, 0xEAA3, 0xEAA5, 0xEAC2, 0xA800, 0xA8FF, 890 0xEAA5, 0xEAC2, 0xA800, 0xA8FF, 0xAC60, 0xAC60, 0xB000, 0xB97F,
946 0xAC60, 0xAC60, 0xB000, 0xB97F, 0xB9A0, 0xB9BF, 891 0xB9A0, 0xB9BF, ~0
947 ~0
948}; 892};
949 893
950static void a5xx_dump(struct msm_gpu *gpu) 894static void a5xx_dump(struct msm_gpu *gpu)
@@ -1020,7 +964,14 @@ static void a5xx_show(struct msm_gpu *gpu, struct seq_file *m)
1020{ 964{
1021 seq_printf(m, "status: %08x\n", 965 seq_printf(m, "status: %08x\n",
1022 gpu_read(gpu, REG_A5XX_RBBM_STATUS)); 966 gpu_read(gpu, REG_A5XX_RBBM_STATUS));
967
968 /*
969 * Temporarily disable hardware clock gating before going into
970 * adreno_show to avoid issues while reading the registers
971 */
972 a5xx_set_hwcg(gpu, false);
1023 adreno_show(gpu, m); 973 adreno_show(gpu, m);
974 a5xx_set_hwcg(gpu, true);
1024} 975}
1025#endif 976#endif
1026 977
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.h b/drivers/gpu/drm/msm/adreno/a5xx_gpu.h
index 6638bc85645d..1137092241d5 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.h
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.h
@@ -36,8 +36,6 @@ struct a5xx_gpu {
36 uint32_t gpmu_dwords; 36 uint32_t gpmu_dwords;
37 37
38 uint32_t lm_leakage; 38 uint32_t lm_leakage;
39
40 struct device zap_dev;
41}; 39};
42 40
43#define to_a5xx_gpu(x) container_of(x, struct a5xx_gpu, base) 41#define to_a5xx_gpu(x) container_of(x, struct a5xx_gpu, base)
@@ -59,5 +57,6 @@ static inline int spin_usecs(struct msm_gpu *gpu, uint32_t usecs,
59} 57}
60 58
61bool a5xx_idle(struct msm_gpu *gpu); 59bool a5xx_idle(struct msm_gpu *gpu);
60void a5xx_set_hwcg(struct msm_gpu *gpu, bool state);
62 61
63#endif /* __A5XX_GPU_H__ */ 62#endif /* __A5XX_GPU_H__ */
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index f1ab2703674a..7414c6bbd582 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
@@ -48,8 +48,15 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value)
48 *value = adreno_gpu->base.fast_rate; 48 *value = adreno_gpu->base.fast_rate;
49 return 0; 49 return 0;
50 case MSM_PARAM_TIMESTAMP: 50 case MSM_PARAM_TIMESTAMP:
51 if (adreno_gpu->funcs->get_timestamp) 51 if (adreno_gpu->funcs->get_timestamp) {
52 return adreno_gpu->funcs->get_timestamp(gpu, value); 52 int ret;
53
54 pm_runtime_get_sync(&gpu->pdev->dev);
55 ret = adreno_gpu->funcs->get_timestamp(gpu, value);
56 pm_runtime_put_autosuspend(&gpu->pdev->dev);
57
58 return ret;
59 }
53 return -EINVAL; 60 return -EINVAL;
54 default: 61 default:
55 DBG("%s: invalid param: %u", gpu->name, param); 62 DBG("%s: invalid param: %u", gpu->name, param);
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 9e9c5696bc03..c7b612c3d771 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -2137,6 +2137,13 @@ void msm_dsi_host_get_phy_clk_req(struct mipi_dsi_host *host,
2137 struct msm_dsi_phy_clk_request *clk_req) 2137 struct msm_dsi_phy_clk_request *clk_req)
2138{ 2138{
2139 struct msm_dsi_host *msm_host = to_msm_dsi_host(host); 2139 struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
2140 int ret;
2141
2142 ret = dsi_calc_clk_rate(msm_host);
2143 if (ret) {
2144 pr_err("%s: unable to calc clk rate, %d\n", __func__, ret);
2145 return;
2146 }
2140 2147
2141 clk_req->bitclk_rate = msm_host->byte_clk_rate * 8; 2148 clk_req->bitclk_rate = msm_host->byte_clk_rate * 8;
2142 clk_req->escclk_rate = msm_host->esc_clk_rate; 2149 clk_req->escclk_rate = msm_host->esc_clk_rate;
@@ -2280,7 +2287,6 @@ int msm_dsi_host_set_display_mode(struct mipi_dsi_host *host,
2280 struct drm_display_mode *mode) 2287 struct drm_display_mode *mode)
2281{ 2288{
2282 struct msm_dsi_host *msm_host = to_msm_dsi_host(host); 2289 struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
2283 int ret;
2284 2290
2285 if (msm_host->mode) { 2291 if (msm_host->mode) {
2286 drm_mode_destroy(msm_host->dev, msm_host->mode); 2292 drm_mode_destroy(msm_host->dev, msm_host->mode);
@@ -2293,12 +2299,6 @@ int msm_dsi_host_set_display_mode(struct mipi_dsi_host *host,
2293 return -ENOMEM; 2299 return -ENOMEM;
2294 } 2300 }
2295 2301
2296 ret = dsi_calc_clk_rate(msm_host);
2297 if (ret) {
2298 pr_err("%s: unable to calc clk rate, %d\n", __func__, ret);
2299 return ret;
2300 }
2301
2302 return 0; 2302 return 0;
2303} 2303}
2304 2304
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
index cb5415d6c04b..735a87a699fa 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
@@ -221,8 +221,8 @@ static void blend_setup(struct drm_crtc *crtc)
221 struct mdp5_ctl *ctl = mdp5_cstate->ctl; 221 struct mdp5_ctl *ctl = mdp5_cstate->ctl;
222 uint32_t blend_op, fg_alpha, bg_alpha, ctl_blend_flags = 0; 222 uint32_t blend_op, fg_alpha, bg_alpha, ctl_blend_flags = 0;
223 unsigned long flags; 223 unsigned long flags;
224 enum mdp5_pipe stage[STAGE_MAX + 1][MAX_PIPE_STAGE] = { SSPP_NONE }; 224 enum mdp5_pipe stage[STAGE_MAX + 1][MAX_PIPE_STAGE] = { { SSPP_NONE } };
225 enum mdp5_pipe r_stage[STAGE_MAX + 1][MAX_PIPE_STAGE] = { SSPP_NONE }; 225 enum mdp5_pipe r_stage[STAGE_MAX + 1][MAX_PIPE_STAGE] = { { SSPP_NONE } };
226 int i, plane_cnt = 0; 226 int i, plane_cnt = 0;
227 bool bg_alpha_enabled = false; 227 bool bg_alpha_enabled = false;
228 u32 mixer_op_mode = 0; 228 u32 mixer_op_mode = 0;
@@ -753,6 +753,7 @@ static int mdp5_crtc_cursor_set(struct drm_crtc *crtc,
753 if (!handle) { 753 if (!handle) {
754 DBG("Cursor off"); 754 DBG("Cursor off");
755 cursor_enable = false; 755 cursor_enable = false;
756 mdp5_enable(mdp5_kms);
756 goto set_cursor; 757 goto set_cursor;
757 } 758 }
758 759
@@ -776,6 +777,8 @@ static int mdp5_crtc_cursor_set(struct drm_crtc *crtc,
776 777
777 get_roi(crtc, &roi_w, &roi_h); 778 get_roi(crtc, &roi_w, &roi_h);
778 779
780 mdp5_enable(mdp5_kms);
781
779 mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_STRIDE(lm), stride); 782 mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_STRIDE(lm), stride);
780 mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_FORMAT(lm), 783 mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_FORMAT(lm),
781 MDP5_LM_CURSOR_FORMAT_FORMAT(CURSOR_FMT_ARGB8888)); 784 MDP5_LM_CURSOR_FORMAT_FORMAT(CURSOR_FMT_ARGB8888));
@@ -804,6 +807,7 @@ set_cursor:
804 crtc_flush(crtc, flush_mask); 807 crtc_flush(crtc, flush_mask);
805 808
806end: 809end:
810 mdp5_disable(mdp5_kms);
807 if (old_bo) { 811 if (old_bo) {
808 drm_flip_work_queue(&mdp5_crtc->unref_cursor_work, old_bo); 812 drm_flip_work_queue(&mdp5_crtc->unref_cursor_work, old_bo);
809 /* enable vblank to complete cursor work: */ 813 /* enable vblank to complete cursor work: */
@@ -836,6 +840,8 @@ static int mdp5_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
836 840
837 get_roi(crtc, &roi_w, &roi_h); 841 get_roi(crtc, &roi_w, &roi_h);
838 842
843 mdp5_enable(mdp5_kms);
844
839 spin_lock_irqsave(&mdp5_crtc->cursor.lock, flags); 845 spin_lock_irqsave(&mdp5_crtc->cursor.lock, flags);
840 mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_SIZE(lm), 846 mdp5_write(mdp5_kms, REG_MDP5_LM_CURSOR_SIZE(lm),
841 MDP5_LM_CURSOR_SIZE_ROI_H(roi_h) | 847 MDP5_LM_CURSOR_SIZE_ROI_H(roi_h) |
@@ -847,6 +853,8 @@ static int mdp5_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
847 853
848 crtc_flush(crtc, flush_mask); 854 crtc_flush(crtc, flush_mask);
849 855
856 mdp5_disable(mdp5_kms);
857
850 return 0; 858 return 0;
851} 859}
852 860
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c
index 97f3294fbfc6..70bef51245af 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_encoder.c
@@ -299,7 +299,7 @@ static void mdp5_encoder_enable(struct drm_encoder *encoder)
299 struct mdp5_interface *intf = mdp5_encoder->intf; 299 struct mdp5_interface *intf = mdp5_encoder->intf;
300 300
301 if (intf->mode == MDP5_INTF_DSI_MODE_COMMAND) 301 if (intf->mode == MDP5_INTF_DSI_MODE_COMMAND)
302 mdp5_cmd_encoder_disable(encoder); 302 mdp5_cmd_encoder_enable(encoder);
303 else 303 else
304 mdp5_vid_encoder_enable(encoder); 304 mdp5_vid_encoder_enable(encoder);
305} 305}
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
index 5d13fa5381ee..1c603aef3c59 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
@@ -502,7 +502,7 @@ static int get_clk(struct platform_device *pdev, struct clk **clkp,
502 const char *name, bool mandatory) 502 const char *name, bool mandatory)
503{ 503{
504 struct device *dev = &pdev->dev; 504 struct device *dev = &pdev->dev;
505 struct clk *clk = devm_clk_get(dev, name); 505 struct clk *clk = msm_clk_get(pdev, name);
506 if (IS_ERR(clk) && mandatory) { 506 if (IS_ERR(clk) && mandatory) {
507 dev_err(dev, "failed to get %s (%ld)\n", name, PTR_ERR(clk)); 507 dev_err(dev, "failed to get %s (%ld)\n", name, PTR_ERR(clk));
508 return PTR_ERR(clk); 508 return PTR_ERR(clk);
@@ -887,21 +887,21 @@ static int mdp5_init(struct platform_device *pdev, struct drm_device *dev)
887 } 887 }
888 888
889 /* mandatory clocks: */ 889 /* mandatory clocks: */
890 ret = get_clk(pdev, &mdp5_kms->axi_clk, "bus_clk", true); 890 ret = get_clk(pdev, &mdp5_kms->axi_clk, "bus", true);
891 if (ret) 891 if (ret)
892 goto fail; 892 goto fail;
893 ret = get_clk(pdev, &mdp5_kms->ahb_clk, "iface_clk", true); 893 ret = get_clk(pdev, &mdp5_kms->ahb_clk, "iface", true);
894 if (ret) 894 if (ret)
895 goto fail; 895 goto fail;
896 ret = get_clk(pdev, &mdp5_kms->core_clk, "core_clk", true); 896 ret = get_clk(pdev, &mdp5_kms->core_clk, "core", true);
897 if (ret) 897 if (ret)
898 goto fail; 898 goto fail;
899 ret = get_clk(pdev, &mdp5_kms->vsync_clk, "vsync_clk", true); 899 ret = get_clk(pdev, &mdp5_kms->vsync_clk, "vsync", true);
900 if (ret) 900 if (ret)
901 goto fail; 901 goto fail;
902 902
903 /* optional clocks: */ 903 /* optional clocks: */
904 get_clk(pdev, &mdp5_kms->lut_clk, "lut_clk", false); 904 get_clk(pdev, &mdp5_kms->lut_clk, "lut", false);
905 905
906 /* we need to set a default rate before enabling. Set a safe 906 /* we need to set a default rate before enabling. Set a safe
907 * rate first, then figure out hw revision, and then set a 907 * rate first, then figure out hw revision, and then set a
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
index fe3a4de1a433..61f39c86dd09 100644
--- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
+++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c
@@ -890,8 +890,8 @@ static int mdp5_plane_mode_set(struct drm_plane *plane,
890 struct mdp5_hw_pipe *right_hwpipe; 890 struct mdp5_hw_pipe *right_hwpipe;
891 const struct mdp_format *format; 891 const struct mdp_format *format;
892 uint32_t nplanes, config = 0; 892 uint32_t nplanes, config = 0;
893 struct phase_step step = { 0 }; 893 struct phase_step step = { { 0 } };
894 struct pixel_ext pe = { 0 }; 894 struct pixel_ext pe = { { 0 } };
895 uint32_t hdecm = 0, vdecm = 0; 895 uint32_t hdecm = 0, vdecm = 0;
896 uint32_t pix_format; 896 uint32_t pix_format;
897 unsigned int rotation; 897 unsigned int rotation;
diff --git a/drivers/gpu/drm/msm/msm_gem.c b/drivers/gpu/drm/msm/msm_gem.c
index 65f35544c1ec..a0c60e738db8 100644
--- a/drivers/gpu/drm/msm/msm_gem.c
+++ b/drivers/gpu/drm/msm/msm_gem.c
@@ -383,8 +383,10 @@ int msm_gem_get_iova(struct drm_gem_object *obj,
383 struct page **pages; 383 struct page **pages;
384 384
385 vma = add_vma(obj, aspace); 385 vma = add_vma(obj, aspace);
386 if (IS_ERR(vma)) 386 if (IS_ERR(vma)) {
387 return PTR_ERR(vma); 387 ret = PTR_ERR(vma);
388 goto unlock;
389 }
388 390
389 pages = get_pages(obj); 391 pages = get_pages(obj);
390 if (IS_ERR(pages)) { 392 if (IS_ERR(pages)) {
@@ -405,7 +407,7 @@ int msm_gem_get_iova(struct drm_gem_object *obj,
405 407
406fail: 408fail:
407 del_vma(vma); 409 del_vma(vma);
408 410unlock:
409 mutex_unlock(&msm_obj->lock); 411 mutex_unlock(&msm_obj->lock);
410 return ret; 412 return ret;
411} 413}
@@ -928,8 +930,12 @@ static struct drm_gem_object *_msm_gem_new(struct drm_device *dev,
928 if (use_vram) { 930 if (use_vram) {
929 struct msm_gem_vma *vma; 931 struct msm_gem_vma *vma;
930 struct page **pages; 932 struct page **pages;
933 struct msm_gem_object *msm_obj = to_msm_bo(obj);
934
935 mutex_lock(&msm_obj->lock);
931 936
932 vma = add_vma(obj, NULL); 937 vma = add_vma(obj, NULL);
938 mutex_unlock(&msm_obj->lock);
933 if (IS_ERR(vma)) { 939 if (IS_ERR(vma)) {
934 ret = PTR_ERR(vma); 940 ret = PTR_ERR(vma);
935 goto fail; 941 goto fail;
diff --git a/drivers/gpu/drm/msm/msm_gem_submit.c b/drivers/gpu/drm/msm/msm_gem_submit.c
index 6bfca7470141..8a75c0bd8a78 100644
--- a/drivers/gpu/drm/msm/msm_gem_submit.c
+++ b/drivers/gpu/drm/msm/msm_gem_submit.c
@@ -34,8 +34,8 @@ static struct msm_gem_submit *submit_create(struct drm_device *dev,
34 struct msm_gpu *gpu, uint32_t nr_bos, uint32_t nr_cmds) 34 struct msm_gpu *gpu, uint32_t nr_bos, uint32_t nr_cmds)
35{ 35{
36 struct msm_gem_submit *submit; 36 struct msm_gem_submit *submit;
37 uint64_t sz = sizeof(*submit) + (nr_bos * sizeof(submit->bos[0])) + 37 uint64_t sz = sizeof(*submit) + ((u64)nr_bos * sizeof(submit->bos[0])) +
38 (nr_cmds * sizeof(submit->cmd[0])); 38 ((u64)nr_cmds * sizeof(submit->cmd[0]));
39 39
40 if (sz > SIZE_MAX) 40 if (sz > SIZE_MAX)
41 return NULL; 41 return NULL;
@@ -451,7 +451,7 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
451 if (ret) 451 if (ret)
452 goto out; 452 goto out;
453 453
454 if (!(args->fence & MSM_SUBMIT_NO_IMPLICIT)) { 454 if (!(args->flags & MSM_SUBMIT_NO_IMPLICIT)) {
455 ret = submit_fence_sync(submit); 455 ret = submit_fence_sync(submit);
456 if (ret) 456 if (ret)
457 goto out; 457 goto out;
diff --git a/drivers/gpu/drm/msm/msm_gem_vma.c b/drivers/gpu/drm/msm/msm_gem_vma.c
index c36321bc8714..d34e331554f3 100644
--- a/drivers/gpu/drm/msm/msm_gem_vma.c
+++ b/drivers/gpu/drm/msm/msm_gem_vma.c
@@ -42,7 +42,7 @@ void
42msm_gem_unmap_vma(struct msm_gem_address_space *aspace, 42msm_gem_unmap_vma(struct msm_gem_address_space *aspace,
43 struct msm_gem_vma *vma, struct sg_table *sgt) 43 struct msm_gem_vma *vma, struct sg_table *sgt)
44{ 44{
45 if (!vma->iova) 45 if (!aspace || !vma->iova)
46 return; 46 return;
47 47
48 if (aspace->mmu) { 48 if (aspace->mmu) {
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c b/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
index c7c84d34d97e..88582af8bd89 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c
@@ -267,6 +267,8 @@ nvkm_disp_oneinit(struct nvkm_engine *engine)
267 /* Create output path objects for each VBIOS display path. */ 267 /* Create output path objects for each VBIOS display path. */
268 i = -1; 268 i = -1;
269 while ((data = dcb_outp_parse(bios, ++i, &ver, &hdr, &dcbE))) { 269 while ((data = dcb_outp_parse(bios, ++i, &ver, &hdr, &dcbE))) {
270 if (ver < 0x40) /* No support for chipsets prior to NV50. */
271 break;
270 if (dcbE.type == DCB_OUTPUT_UNUSED) 272 if (dcbE.type == DCB_OUTPUT_UNUSED)
271 continue; 273 continue;
272 if (dcbE.type == DCB_OUTPUT_EOL) 274 if (dcbE.type == DCB_OUTPUT_EOL)
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index c6b1b7f3a2a3..c16bc0a7115b 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -275,11 +275,15 @@ static void rockchip_drm_fb_resume(struct drm_device *drm)
275static int rockchip_drm_sys_suspend(struct device *dev) 275static int rockchip_drm_sys_suspend(struct device *dev)
276{ 276{
277 struct drm_device *drm = dev_get_drvdata(dev); 277 struct drm_device *drm = dev_get_drvdata(dev);
278 struct rockchip_drm_private *priv = drm->dev_private; 278 struct rockchip_drm_private *priv;
279
280 if (!drm)
281 return 0;
279 282
280 drm_kms_helper_poll_disable(drm); 283 drm_kms_helper_poll_disable(drm);
281 rockchip_drm_fb_suspend(drm); 284 rockchip_drm_fb_suspend(drm);
282 285
286 priv = drm->dev_private;
283 priv->state = drm_atomic_helper_suspend(drm); 287 priv->state = drm_atomic_helper_suspend(drm);
284 if (IS_ERR(priv->state)) { 288 if (IS_ERR(priv->state)) {
285 rockchip_drm_fb_resume(drm); 289 rockchip_drm_fb_resume(drm);
@@ -293,8 +297,12 @@ static int rockchip_drm_sys_suspend(struct device *dev)
293static int rockchip_drm_sys_resume(struct device *dev) 297static int rockchip_drm_sys_resume(struct device *dev)
294{ 298{
295 struct drm_device *drm = dev_get_drvdata(dev); 299 struct drm_device *drm = dev_get_drvdata(dev);
296 struct rockchip_drm_private *priv = drm->dev_private; 300 struct rockchip_drm_private *priv;
301
302 if (!drm)
303 return 0;
297 304
305 priv = drm->dev_private;
298 drm_atomic_helper_resume(drm, priv->state); 306 drm_atomic_helper_resume(drm, priv->state);
299 rockchip_drm_fb_resume(drm); 307 rockchip_drm_fb_resume(drm);
300 drm_kms_helper_poll_enable(drm); 308 drm_kms_helper_poll_enable(drm);
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
index 5d450332c2fd..2900f1410d95 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c
@@ -500,7 +500,7 @@ static void vop_line_flag_irq_disable(struct vop *vop)
500static int vop_enable(struct drm_crtc *crtc) 500static int vop_enable(struct drm_crtc *crtc)
501{ 501{
502 struct vop *vop = to_vop(crtc); 502 struct vop *vop = to_vop(crtc);
503 int ret; 503 int ret, i;
504 504
505 ret = pm_runtime_get_sync(vop->dev); 505 ret = pm_runtime_get_sync(vop->dev);
506 if (ret < 0) { 506 if (ret < 0) {
@@ -533,6 +533,20 @@ static int vop_enable(struct drm_crtc *crtc)
533 } 533 }
534 534
535 memcpy(vop->regs, vop->regsbak, vop->len); 535 memcpy(vop->regs, vop->regsbak, vop->len);
536 /*
537 * We need to make sure that all windows are disabled before we
538 * enable the crtc. Otherwise we might try to scan from a destroyed
539 * buffer later.
540 */
541 for (i = 0; i < vop->data->win_size; i++) {
542 struct vop_win *vop_win = &vop->win[i];
543 const struct vop_win_data *win = vop_win->data;
544
545 spin_lock(&vop->reg_lock);
546 VOP_WIN_SET(vop, win, enable, 0);
547 spin_unlock(&vop->reg_lock);
548 }
549
536 vop_cfg_done(vop); 550 vop_cfg_done(vop);
537 551
538 /* 552 /*
@@ -566,28 +580,11 @@ err_put_pm_runtime:
566static void vop_crtc_disable(struct drm_crtc *crtc) 580static void vop_crtc_disable(struct drm_crtc *crtc)
567{ 581{
568 struct vop *vop = to_vop(crtc); 582 struct vop *vop = to_vop(crtc);
569 int i;
570 583
571 WARN_ON(vop->event); 584 WARN_ON(vop->event);
572 585
573 rockchip_drm_psr_deactivate(&vop->crtc); 586 rockchip_drm_psr_deactivate(&vop->crtc);
574 587
575 /*
576 * We need to make sure that all windows are disabled before we
577 * disable that crtc. Otherwise we might try to scan from a destroyed
578 * buffer later.
579 */
580 for (i = 0; i < vop->data->win_size; i++) {
581 struct vop_win *vop_win = &vop->win[i];
582 const struct vop_win_data *win = vop_win->data;
583
584 spin_lock(&vop->reg_lock);
585 VOP_WIN_SET(vop, win, enable, 0);
586 spin_unlock(&vop->reg_lock);
587 }
588
589 vop_cfg_done(vop);
590
591 drm_crtc_vblank_off(crtc); 588 drm_crtc_vblank_off(crtc);
592 589
593 /* 590 /*
@@ -682,8 +679,10 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
682 * Src.x1 can be odd when do clip, but yuv plane start point 679 * Src.x1 can be odd when do clip, but yuv plane start point
683 * need align with 2 pixel. 680 * need align with 2 pixel.
684 */ 681 */
685 if (is_yuv_support(fb->format->format) && ((state->src.x1 >> 16) % 2)) 682 if (is_yuv_support(fb->format->format) && ((state->src.x1 >> 16) % 2)) {
683 DRM_ERROR("Invalid Source: Yuv format not support odd xpos\n");
686 return -EINVAL; 684 return -EINVAL;
685 }
687 686
688 return 0; 687 return 0;
689} 688}
@@ -764,7 +763,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
764 spin_lock(&vop->reg_lock); 763 spin_lock(&vop->reg_lock);
765 764
766 VOP_WIN_SET(vop, win, format, format); 765 VOP_WIN_SET(vop, win, format, format);
767 VOP_WIN_SET(vop, win, yrgb_vir, fb->pitches[0] >> 2); 766 VOP_WIN_SET(vop, win, yrgb_vir, DIV_ROUND_UP(fb->pitches[0], 4));
768 VOP_WIN_SET(vop, win, yrgb_mst, dma_addr); 767 VOP_WIN_SET(vop, win, yrgb_mst, dma_addr);
769 if (is_yuv_support(fb->format->format)) { 768 if (is_yuv_support(fb->format->format)) {
770 int hsub = drm_format_horz_chroma_subsampling(fb->format->format); 769 int hsub = drm_format_horz_chroma_subsampling(fb->format->format);
@@ -778,7 +777,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane,
778 offset += (src->y1 >> 16) * fb->pitches[1] / vsub; 777 offset += (src->y1 >> 16) * fb->pitches[1] / vsub;
779 778
780 dma_addr = rk_uv_obj->dma_addr + offset + fb->offsets[1]; 779 dma_addr = rk_uv_obj->dma_addr + offset + fb->offsets[1];
781 VOP_WIN_SET(vop, win, uv_vir, fb->pitches[1] >> 2); 780 VOP_WIN_SET(vop, win, uv_vir, DIV_ROUND_UP(fb->pitches[1], 4));
782 VOP_WIN_SET(vop, win, uv_mst, dma_addr); 781 VOP_WIN_SET(vop, win, uv_mst, dma_addr);
783 } 782 }
784 783
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
index 9979fd0c2282..27eefbfcf3d0 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.h
@@ -282,6 +282,9 @@ static inline uint16_t scl_get_bili_dn_vskip(int src_h, int dst_h,
282 282
283 act_height = (src_h + vskiplines - 1) / vskiplines; 283 act_height = (src_h + vskiplines - 1) / vskiplines;
284 284
285 if (act_height == dst_h)
286 return GET_SCL_FT_BILI_DN(src_h, dst_h) / vskiplines;
287
285 return GET_SCL_FT_BILI_DN(act_height, dst_h); 288 return GET_SCL_FT_BILI_DN(act_height, dst_h);
286} 289}
287 290
diff --git a/drivers/gpu/drm/stm/Kconfig b/drivers/gpu/drm/stm/Kconfig
index 2c4817fb0890..8fe5b184b4e8 100644
--- a/drivers/gpu/drm/stm/Kconfig
+++ b/drivers/gpu/drm/stm/Kconfig
@@ -7,7 +7,6 @@ config DRM_STM
7 select DRM_PANEL 7 select DRM_PANEL
8 select VIDEOMODE_HELPERS 8 select VIDEOMODE_HELPERS
9 select FB_PROVIDE_GET_FB_UNMAPPED_AREA 9 select FB_PROVIDE_GET_FB_UNMAPPED_AREA
10 default y
11 10
12 help 11 help
13 Enable support for the on-chip display controller on 12 Enable support for the on-chip display controller on
diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c
index abc7d8fe06b4..a45a627283a1 100644
--- a/drivers/gpu/drm/sun4i/sun4i_drv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_drv.c
@@ -25,12 +25,20 @@
25#include "sun4i_framebuffer.h" 25#include "sun4i_framebuffer.h"
26#include "sun4i_tcon.h" 26#include "sun4i_tcon.h"
27 27
28static void sun4i_drv_lastclose(struct drm_device *dev)
29{
30 struct sun4i_drv *drv = dev->dev_private;
31
32 drm_fbdev_cma_restore_mode(drv->fbdev);
33}
34
28DEFINE_DRM_GEM_CMA_FOPS(sun4i_drv_fops); 35DEFINE_DRM_GEM_CMA_FOPS(sun4i_drv_fops);
29 36
30static struct drm_driver sun4i_drv_driver = { 37static struct drm_driver sun4i_drv_driver = {
31 .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_ATOMIC, 38 .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | DRIVER_ATOMIC,
32 39
33 /* Generic Operations */ 40 /* Generic Operations */
41 .lastclose = sun4i_drv_lastclose,
34 .fops = &sun4i_drv_fops, 42 .fops = &sun4i_drv_fops,
35 .name = "sun4i-drm", 43 .name = "sun4i-drm",
36 .desc = "Allwinner sun4i Display Engine", 44 .desc = "Allwinner sun4i Display Engine",
diff --git a/drivers/gpu/ipu-v3/Kconfig b/drivers/gpu/ipu-v3/Kconfig
index 08766c6e7856..87a20b3dcf7a 100644
--- a/drivers/gpu/ipu-v3/Kconfig
+++ b/drivers/gpu/ipu-v3/Kconfig
@@ -1,6 +1,7 @@
1config IMX_IPUV3_CORE 1config IMX_IPUV3_CORE
2 tristate "IPUv3 core support" 2 tristate "IPUv3 core support"
3 depends on SOC_IMX5 || SOC_IMX6Q || ARCH_MULTIPLATFORM 3 depends on SOC_IMX5 || SOC_IMX6Q || ARCH_MULTIPLATFORM
4 depends on DRM || !DRM # if DRM=m, this can't be 'y'
4 select GENERIC_IRQ_CHIP 5 select GENERIC_IRQ_CHIP
5 help 6 help
6 Choose this if you have a i.MX5/6 system and want to use the Image 7 Choose this if you have a i.MX5/6 system and want to use the Image
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 1006b230b236..65fa29591d21 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -983,7 +983,7 @@ config I2C_UNIPHIER_F
983 983
984config I2C_VERSATILE 984config I2C_VERSATILE
985 tristate "ARM Versatile/Realview I2C bus support" 985 tristate "ARM Versatile/Realview I2C bus support"
986 depends on ARCH_VERSATILE || ARCH_REALVIEW || ARCH_VEXPRESS || COMPILE_TEST 986 depends on ARCH_MPS2 || ARCH_VERSATILE || ARCH_REALVIEW || ARCH_VEXPRESS || COMPILE_TEST
987 select I2C_ALGOBIT 987 select I2C_ALGOBIT
988 help 988 help
989 Say yes if you want to support the I2C serial bus on ARMs Versatile 989 Say yes if you want to support the I2C serial bus on ARMs Versatile
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index f19348328a71..6fdf9231c23c 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -410,10 +410,11 @@ static bool aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus)
410 } 410 }
411 411
412 /* We are in an invalid state; reset bus to a known state. */ 412 /* We are in an invalid state; reset bus to a known state. */
413 if (!bus->msgs && bus->master_state != ASPEED_I2C_MASTER_STOP) { 413 if (!bus->msgs) {
414 dev_err(bus->dev, "bus in unknown state"); 414 dev_err(bus->dev, "bus in unknown state");
415 bus->cmd_err = -EIO; 415 bus->cmd_err = -EIO;
416 aspeed_i2c_do_stop(bus); 416 if (bus->master_state != ASPEED_I2C_MASTER_STOP)
417 aspeed_i2c_do_stop(bus);
417 goto out_no_complete; 418 goto out_no_complete;
418 } 419 }
419 msg = &bus->msgs[bus->msgs_index]; 420 msg = &bus->msgs[bus->msgs_index];
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 2ea6d0d25a01..57248bccadbc 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -198,8 +198,7 @@ static void i2c_dw_configure_slave(struct dw_i2c_dev *dev)
198 dev->functionality = I2C_FUNC_SLAVE | DW_IC_DEFAULT_FUNCTIONALITY; 198 dev->functionality = I2C_FUNC_SLAVE | DW_IC_DEFAULT_FUNCTIONALITY;
199 199
200 dev->slave_cfg = DW_IC_CON_RX_FIFO_FULL_HLD_CTRL | 200 dev->slave_cfg = DW_IC_CON_RX_FIFO_FULL_HLD_CTRL |
201 DW_IC_CON_RESTART_EN | DW_IC_CON_STOP_DET_IFADDRESSED | 201 DW_IC_CON_RESTART_EN | DW_IC_CON_STOP_DET_IFADDRESSED;
202 DW_IC_CON_SPEED_FAST;
203 202
204 dev->mode = DW_IC_SLAVE; 203 dev->mode = DW_IC_SLAVE;
205 204
@@ -298,6 +297,9 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
298 } 297 }
299 298
300 acpi_speed = i2c_acpi_find_bus_speed(&pdev->dev); 299 acpi_speed = i2c_acpi_find_bus_speed(&pdev->dev);
300 /* Some broken DSTDs use 1MiHz instead of 1MHz */
301 if (acpi_speed == 1048576)
302 acpi_speed = 1000000;
301 /* 303 /*
302 * Find bus speed from the "clock-frequency" device property, ACPI 304 * Find bus speed from the "clock-frequency" device property, ACPI
303 * or by using fast mode if neither is set. 305 * or by using fast mode if neither is set.
@@ -319,7 +321,8 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
319 if (dev->clk_freq != 100000 && dev->clk_freq != 400000 321 if (dev->clk_freq != 100000 && dev->clk_freq != 400000
320 && dev->clk_freq != 1000000 && dev->clk_freq != 3400000) { 322 && dev->clk_freq != 1000000 && dev->clk_freq != 3400000) {
321 dev_err(&pdev->dev, 323 dev_err(&pdev->dev,
322 "Only 100kHz, 400kHz, 1MHz and 3.4MHz supported"); 324 "%d Hz is unsupported, only 100kHz, 400kHz, 1MHz and 3.4MHz are supported\n",
325 dev->clk_freq);
323 ret = -EINVAL; 326 ret = -EINVAL;
324 goto exit_reset; 327 goto exit_reset;
325 } 328 }
@@ -426,7 +429,7 @@ static void dw_i2c_plat_complete(struct device *dev)
426#endif 429#endif
427 430
428#ifdef CONFIG_PM 431#ifdef CONFIG_PM
429static int dw_i2c_plat_suspend(struct device *dev) 432static int dw_i2c_plat_runtime_suspend(struct device *dev)
430{ 433{
431 struct platform_device *pdev = to_platform_device(dev); 434 struct platform_device *pdev = to_platform_device(dev);
432 struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev); 435 struct dw_i2c_dev *i_dev = platform_get_drvdata(pdev);
@@ -448,11 +451,21 @@ static int dw_i2c_plat_resume(struct device *dev)
448 return 0; 451 return 0;
449} 452}
450 453
454#ifdef CONFIG_PM_SLEEP
455static int dw_i2c_plat_suspend(struct device *dev)
456{
457 pm_runtime_resume(dev);
458 return dw_i2c_plat_runtime_suspend(dev);
459}
460#endif
461
451static const struct dev_pm_ops dw_i2c_dev_pm_ops = { 462static const struct dev_pm_ops dw_i2c_dev_pm_ops = {
452 .prepare = dw_i2c_plat_prepare, 463 .prepare = dw_i2c_plat_prepare,
453 .complete = dw_i2c_plat_complete, 464 .complete = dw_i2c_plat_complete,
454 SET_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume) 465 SET_SYSTEM_SLEEP_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume)
455 SET_RUNTIME_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume, NULL) 466 SET_RUNTIME_PM_OPS(dw_i2c_plat_runtime_suspend,
467 dw_i2c_plat_resume,
468 NULL)
456}; 469};
457 470
458#define DW_I2C_DEV_PMOPS (&dw_i2c_dev_pm_ops) 471#define DW_I2C_DEV_PMOPS (&dw_i2c_dev_pm_ops)
diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c
index 0548c7ea578c..78d8fb73927d 100644
--- a/drivers/i2c/busses/i2c-designware-slave.c
+++ b/drivers/i2c/busses/i2c-designware-slave.c
@@ -177,6 +177,8 @@ static int i2c_dw_reg_slave(struct i2c_client *slave)
177 return -EBUSY; 177 return -EBUSY;
178 if (slave->flags & I2C_CLIENT_TEN) 178 if (slave->flags & I2C_CLIENT_TEN)
179 return -EAFNOSUPPORT; 179 return -EAFNOSUPPORT;
180 pm_runtime_get_sync(dev->dev);
181
180 /* 182 /*
181 * Set slave address in the IC_SAR register, 183 * Set slave address in the IC_SAR register,
182 * the address to which the DW_apb_i2c responds. 184 * the address to which the DW_apb_i2c responds.
@@ -205,6 +207,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave)
205 dev->disable_int(dev); 207 dev->disable_int(dev);
206 dev->disable(dev); 208 dev->disable(dev);
207 dev->slave = NULL; 209 dev->slave = NULL;
210 pm_runtime_put(dev->dev);
208 211
209 return 0; 212 return 0;
210} 213}
@@ -272,7 +275,7 @@ static int i2c_dw_irq_handler_slave(struct dw_i2c_dev *dev)
272 slave_activity = ((dw_readl(dev, DW_IC_STATUS) & 275 slave_activity = ((dw_readl(dev, DW_IC_STATUS) &
273 DW_IC_STATUS_SLAVE_ACTIVITY) >> 6); 276 DW_IC_STATUS_SLAVE_ACTIVITY) >> 6);
274 277
275 if (!enabled || !(raw_stat & ~DW_IC_INTR_ACTIVITY)) 278 if (!enabled || !(raw_stat & ~DW_IC_INTR_ACTIVITY) || !dev->slave)
276 return 0; 279 return 0;
277 280
278 dev_dbg(dev->dev, 281 dev_dbg(dev->dev,
@@ -382,7 +385,6 @@ int i2c_dw_probe_slave(struct dw_i2c_dev *dev)
382 ret = i2c_add_numbered_adapter(adap); 385 ret = i2c_add_numbered_adapter(adap);
383 if (ret) 386 if (ret)
384 dev_err(dev->dev, "failure adding adapter: %d\n", ret); 387 dev_err(dev->dev, "failure adding adapter: %d\n", ret);
385 pm_runtime_put_noidle(dev->dev);
386 388
387 return ret; 389 return ret;
388} 390}
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c
index b4685bb9b5d7..adca51a99487 100644
--- a/drivers/i2c/busses/i2c-simtec.c
+++ b/drivers/i2c/busses/i2c-simtec.c
@@ -127,8 +127,7 @@ static int simtec_i2c_probe(struct platform_device *dev)
127 iounmap(pd->reg); 127 iounmap(pd->reg);
128 128
129 err_res: 129 err_res:
130 release_resource(pd->ioarea); 130 release_mem_region(pd->ioarea->start, size);
131 kfree(pd->ioarea);
132 131
133 err: 132 err:
134 kfree(pd); 133 kfree(pd);
@@ -142,8 +141,7 @@ static int simtec_i2c_remove(struct platform_device *dev)
142 i2c_del_adapter(&pd->adap); 141 i2c_del_adapter(&pd->adap);
143 142
144 iounmap(pd->reg); 143 iounmap(pd->reg);
145 release_resource(pd->ioarea); 144 release_mem_region(pd->ioarea->start, resource_size(pd->ioarea));
146 kfree(pd->ioarea);
147 kfree(pd); 145 kfree(pd);
148 146
149 return 0; 147 return 0;
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index 4842ec3a5451..a9126b3cda61 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -230,6 +230,16 @@ void i2c_acpi_register_devices(struct i2c_adapter *adap)
230 dev_warn(&adap->dev, "failed to enumerate I2C slaves\n"); 230 dev_warn(&adap->dev, "failed to enumerate I2C slaves\n");
231} 231}
232 232
233const struct acpi_device_id *
234i2c_acpi_match_device(const struct acpi_device_id *matches,
235 struct i2c_client *client)
236{
237 if (!(client && matches))
238 return NULL;
239
240 return acpi_match_device(matches, &client->dev);
241}
242
233static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level, 243static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
234 void *data, void **return_value) 244 void *data, void **return_value)
235{ 245{
@@ -289,7 +299,7 @@ u32 i2c_acpi_find_bus_speed(struct device *dev)
289} 299}
290EXPORT_SYMBOL_GPL(i2c_acpi_find_bus_speed); 300EXPORT_SYMBOL_GPL(i2c_acpi_find_bus_speed);
291 301
292static int i2c_acpi_match_adapter(struct device *dev, void *data) 302static int i2c_acpi_find_match_adapter(struct device *dev, void *data)
293{ 303{
294 struct i2c_adapter *adapter = i2c_verify_adapter(dev); 304 struct i2c_adapter *adapter = i2c_verify_adapter(dev);
295 305
@@ -299,7 +309,7 @@ static int i2c_acpi_match_adapter(struct device *dev, void *data)
299 return ACPI_HANDLE(dev) == (acpi_handle)data; 309 return ACPI_HANDLE(dev) == (acpi_handle)data;
300} 310}
301 311
302static int i2c_acpi_match_device(struct device *dev, void *data) 312static int i2c_acpi_find_match_device(struct device *dev, void *data)
303{ 313{
304 return ACPI_COMPANION(dev) == data; 314 return ACPI_COMPANION(dev) == data;
305} 315}
@@ -309,7 +319,7 @@ static struct i2c_adapter *i2c_acpi_find_adapter_by_handle(acpi_handle handle)
309 struct device *dev; 319 struct device *dev;
310 320
311 dev = bus_find_device(&i2c_bus_type, NULL, handle, 321 dev = bus_find_device(&i2c_bus_type, NULL, handle,
312 i2c_acpi_match_adapter); 322 i2c_acpi_find_match_adapter);
313 return dev ? i2c_verify_adapter(dev) : NULL; 323 return dev ? i2c_verify_adapter(dev) : NULL;
314} 324}
315 325
@@ -317,7 +327,8 @@ static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev)
317{ 327{
318 struct device *dev; 328 struct device *dev;
319 329
320 dev = bus_find_device(&i2c_bus_type, NULL, adev, i2c_acpi_match_device); 330 dev = bus_find_device(&i2c_bus_type, NULL, adev,
331 i2c_acpi_find_match_device);
321 return dev ? i2c_verify_client(dev) : NULL; 332 return dev ? i2c_verify_client(dev) : NULL;
322} 333}
323 334
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
index c89dac7fd2e7..56e46581b84b 100644
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -353,10 +353,11 @@ static int i2c_device_probe(struct device *dev)
353 } 353 }
354 354
355 /* 355 /*
356 * An I2C ID table is not mandatory, if and only if, a suitable Device 356 * An I2C ID table is not mandatory, if and only if, a suitable OF
357 * Tree match table entry is supplied for the probing device. 357 * or ACPI ID table is supplied for the probing device.
358 */ 358 */
359 if (!driver->id_table && 359 if (!driver->id_table &&
360 !i2c_acpi_match_device(dev->driver->acpi_match_table, client) &&
360 !i2c_of_match_device(dev->driver->of_match_table, client)) 361 !i2c_of_match_device(dev->driver->of_match_table, client))
361 return -ENODEV; 362 return -ENODEV;
362 363
diff --git a/drivers/i2c/i2c-core.h b/drivers/i2c/i2c-core.h
index 3b63f5e5b89c..3d3d9bf02101 100644
--- a/drivers/i2c/i2c-core.h
+++ b/drivers/i2c/i2c-core.h
@@ -31,9 +31,18 @@ int i2c_check_addr_validity(unsigned addr, unsigned short flags);
31int i2c_check_7bit_addr_validity_strict(unsigned short addr); 31int i2c_check_7bit_addr_validity_strict(unsigned short addr);
32 32
33#ifdef CONFIG_ACPI 33#ifdef CONFIG_ACPI
34const struct acpi_device_id *
35i2c_acpi_match_device(const struct acpi_device_id *matches,
36 struct i2c_client *client);
34void i2c_acpi_register_devices(struct i2c_adapter *adap); 37void i2c_acpi_register_devices(struct i2c_adapter *adap);
35#else /* CONFIG_ACPI */ 38#else /* CONFIG_ACPI */
36static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { } 39static inline void i2c_acpi_register_devices(struct i2c_adapter *adap) { }
40static inline const struct acpi_device_id *
41i2c_acpi_match_device(const struct acpi_device_id *matches,
42 struct i2c_client *client)
43{
44 return NULL;
45}
37#endif /* CONFIG_ACPI */ 46#endif /* CONFIG_ACPI */
38extern struct notifier_block i2c_acpi_notifier; 47extern struct notifier_block i2c_acpi_notifier;
39 48
diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index 2c64d0e0740f..17121329bb79 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
@@ -83,7 +83,7 @@ config I2C_MUX_PINCTRL
83 different sets of pins at run-time. 83 different sets of pins at run-time.
84 84
85 This driver can also be built as a module. If so, the module will be 85 This driver can also be built as a module. If so, the module will be
86 called pinctrl-i2cmux. 86 called i2c-mux-pinctrl.
87 87
88config I2C_MUX_REG 88config I2C_MUX_REG
89 tristate "Register-based I2C multiplexer" 89 tristate "Register-based I2C multiplexer"
diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
index 6b5d3be283c4..807299dd45eb 100644
--- a/drivers/iio/accel/bmc150-accel-core.c
+++ b/drivers/iio/accel/bmc150-accel-core.c
@@ -193,7 +193,6 @@ struct bmc150_accel_data {
193 struct regmap *regmap; 193 struct regmap *regmap;
194 int irq; 194 int irq;
195 struct bmc150_accel_interrupt interrupts[BMC150_ACCEL_INTERRUPTS]; 195 struct bmc150_accel_interrupt interrupts[BMC150_ACCEL_INTERRUPTS];
196 atomic_t active_intr;
197 struct bmc150_accel_trigger triggers[BMC150_ACCEL_TRIGGERS]; 196 struct bmc150_accel_trigger triggers[BMC150_ACCEL_TRIGGERS];
198 struct mutex mutex; 197 struct mutex mutex;
199 u8 fifo_mode, watermark; 198 u8 fifo_mode, watermark;
@@ -493,11 +492,6 @@ static int bmc150_accel_set_interrupt(struct bmc150_accel_data *data, int i,
493 goto out_fix_power_state; 492 goto out_fix_power_state;
494 } 493 }
495 494
496 if (state)
497 atomic_inc(&data->active_intr);
498 else
499 atomic_dec(&data->active_intr);
500
501 return 0; 495 return 0;
502 496
503out_fix_power_state: 497out_fix_power_state:
@@ -1710,8 +1704,7 @@ static int bmc150_accel_resume(struct device *dev)
1710 struct bmc150_accel_data *data = iio_priv(indio_dev); 1704 struct bmc150_accel_data *data = iio_priv(indio_dev);
1711 1705
1712 mutex_lock(&data->mutex); 1706 mutex_lock(&data->mutex);
1713 if (atomic_read(&data->active_intr)) 1707 bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
1714 bmc150_accel_set_mode(data, BMC150_ACCEL_SLEEP_MODE_NORMAL, 0);
1715 bmc150_accel_fifo_set_mode(data); 1708 bmc150_accel_fifo_set_mode(data);
1716 mutex_unlock(&data->mutex); 1709 mutex_unlock(&data->mutex);
1717 1710
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 07d1489cd457..e44f62bf9caa 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -166,6 +166,10 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
166 .mask_ihl = 0x02, 166 .mask_ihl = 0x02,
167 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, 167 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR,
168 }, 168 },
169 .sim = {
170 .addr = 0x23,
171 .value = BIT(0),
172 },
169 .multi_read_bit = true, 173 .multi_read_bit = true,
170 .bootime = 2, 174 .bootime = 2,
171 }, 175 },
@@ -234,6 +238,10 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
234 .mask_od = 0x40, 238 .mask_od = 0x40,
235 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, 239 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR,
236 }, 240 },
241 .sim = {
242 .addr = 0x23,
243 .value = BIT(0),
244 },
237 .multi_read_bit = true, 245 .multi_read_bit = true,
238 .bootime = 2, 246 .bootime = 2,
239 }, 247 },
@@ -316,6 +324,10 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
316 .en_mask = 0x08, 324 .en_mask = 0x08,
317 }, 325 },
318 }, 326 },
327 .sim = {
328 .addr = 0x24,
329 .value = BIT(0),
330 },
319 .multi_read_bit = false, 331 .multi_read_bit = false,
320 .bootime = 2, 332 .bootime = 2,
321 }, 333 },
@@ -379,6 +391,10 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
379 .mask_int1 = 0x04, 391 .mask_int1 = 0x04,
380 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, 392 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR,
381 }, 393 },
394 .sim = {
395 .addr = 0x21,
396 .value = BIT(1),
397 },
382 .multi_read_bit = true, 398 .multi_read_bit = true,
383 .bootime = 2, /* guess */ 399 .bootime = 2, /* guess */
384 }, 400 },
@@ -437,6 +453,10 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
437 .mask_od = 0x40, 453 .mask_od = 0x40,
438 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, 454 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR,
439 }, 455 },
456 .sim = {
457 .addr = 0x21,
458 .value = BIT(7),
459 },
440 .multi_read_bit = false, 460 .multi_read_bit = false,
441 .bootime = 2, /* guess */ 461 .bootime = 2, /* guess */
442 }, 462 },
@@ -499,6 +519,10 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
499 .addr_ihl = 0x22, 519 .addr_ihl = 0x22,
500 .mask_ihl = 0x80, 520 .mask_ihl = 0x80,
501 }, 521 },
522 .sim = {
523 .addr = 0x23,
524 .value = BIT(0),
525 },
502 .multi_read_bit = true, 526 .multi_read_bit = true,
503 .bootime = 2, 527 .bootime = 2,
504 }, 528 },
@@ -547,6 +571,10 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
547 .mask_int1 = 0x04, 571 .mask_int1 = 0x04,
548 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, 572 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR,
549 }, 573 },
574 .sim = {
575 .addr = 0x21,
576 .value = BIT(1),
577 },
550 .multi_read_bit = false, 578 .multi_read_bit = false,
551 .bootime = 2, 579 .bootime = 2,
552 }, 580 },
@@ -614,6 +642,10 @@ static const struct st_sensor_settings st_accel_sensors_settings[] = {
614 .mask_ihl = 0x02, 642 .mask_ihl = 0x02,
615 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, 643 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR,
616 }, 644 },
645 .sim = {
646 .addr = 0x23,
647 .value = BIT(0),
648 },
617 .multi_read_bit = true, 649 .multi_read_bit = true,
618 .bootime = 2, 650 .bootime = 2,
619 }, 651 },
diff --git a/drivers/iio/adc/aspeed_adc.c b/drivers/iio/adc/aspeed_adc.c
index e0ea411a0b2d..c02b23d675cb 100644
--- a/drivers/iio/adc/aspeed_adc.c
+++ b/drivers/iio/adc/aspeed_adc.c
@@ -22,6 +22,7 @@
22 22
23#include <linux/iio/iio.h> 23#include <linux/iio/iio.h>
24#include <linux/iio/driver.h> 24#include <linux/iio/driver.h>
25#include <linux/iopoll.h>
25 26
26#define ASPEED_RESOLUTION_BITS 10 27#define ASPEED_RESOLUTION_BITS 10
27#define ASPEED_CLOCKS_PER_SAMPLE 12 28#define ASPEED_CLOCKS_PER_SAMPLE 12
@@ -38,11 +39,17 @@
38 39
39#define ASPEED_ENGINE_ENABLE BIT(0) 40#define ASPEED_ENGINE_ENABLE BIT(0)
40 41
42#define ASPEED_ADC_CTRL_INIT_RDY BIT(8)
43
44#define ASPEED_ADC_INIT_POLLING_TIME 500
45#define ASPEED_ADC_INIT_TIMEOUT 500000
46
41struct aspeed_adc_model_data { 47struct aspeed_adc_model_data {
42 const char *model_name; 48 const char *model_name;
43 unsigned int min_sampling_rate; // Hz 49 unsigned int min_sampling_rate; // Hz
44 unsigned int max_sampling_rate; // Hz 50 unsigned int max_sampling_rate; // Hz
45 unsigned int vref_voltage; // mV 51 unsigned int vref_voltage; // mV
52 bool wait_init_sequence;
46}; 53};
47 54
48struct aspeed_adc_data { 55struct aspeed_adc_data {
@@ -211,6 +218,24 @@ static int aspeed_adc_probe(struct platform_device *pdev)
211 goto scaler_error; 218 goto scaler_error;
212 } 219 }
213 220
221 model_data = of_device_get_match_data(&pdev->dev);
222
223 if (model_data->wait_init_sequence) {
224 /* Enable engine in normal mode. */
225 writel(ASPEED_OPERATION_MODE_NORMAL | ASPEED_ENGINE_ENABLE,
226 data->base + ASPEED_REG_ENGINE_CONTROL);
227
228 /* Wait for initial sequence complete. */
229 ret = readl_poll_timeout(data->base + ASPEED_REG_ENGINE_CONTROL,
230 adc_engine_control_reg_val,
231 adc_engine_control_reg_val &
232 ASPEED_ADC_CTRL_INIT_RDY,
233 ASPEED_ADC_INIT_POLLING_TIME,
234 ASPEED_ADC_INIT_TIMEOUT);
235 if (ret)
236 goto scaler_error;
237 }
238
214 /* Start all channels in normal mode. */ 239 /* Start all channels in normal mode. */
215 ret = clk_prepare_enable(data->clk_scaler->clk); 240 ret = clk_prepare_enable(data->clk_scaler->clk);
216 if (ret) 241 if (ret)
@@ -274,6 +299,7 @@ static const struct aspeed_adc_model_data ast2500_model_data = {
274 .vref_voltage = 1800, // mV 299 .vref_voltage = 1800, // mV
275 .min_sampling_rate = 1, 300 .min_sampling_rate = 1,
276 .max_sampling_rate = 1000000, 301 .max_sampling_rate = 1000000,
302 .wait_init_sequence = true,
277}; 303};
278 304
279static const struct of_device_id aspeed_adc_matches[] = { 305static const struct of_device_id aspeed_adc_matches[] = {
diff --git a/drivers/iio/adc/axp288_adc.c b/drivers/iio/adc/axp288_adc.c
index 64799ad7ebad..462a99c13e7a 100644
--- a/drivers/iio/adc/axp288_adc.c
+++ b/drivers/iio/adc/axp288_adc.c
@@ -28,6 +28,8 @@
28#include <linux/iio/driver.h> 28#include <linux/iio/driver.h>
29 29
30#define AXP288_ADC_EN_MASK 0xF1 30#define AXP288_ADC_EN_MASK 0xF1
31#define AXP288_ADC_TS_PIN_GPADC 0xF2
32#define AXP288_ADC_TS_PIN_ON 0xF3
31 33
32enum axp288_adc_id { 34enum axp288_adc_id {
33 AXP288_ADC_TS, 35 AXP288_ADC_TS,
@@ -121,6 +123,26 @@ static int axp288_adc_read_channel(int *val, unsigned long address,
121 return IIO_VAL_INT; 123 return IIO_VAL_INT;
122} 124}
123 125
126static int axp288_adc_set_ts(struct regmap *regmap, unsigned int mode,
127 unsigned long address)
128{
129 int ret;
130
131 /* channels other than GPADC do not need to switch TS pin */
132 if (address != AXP288_GP_ADC_H)
133 return 0;
134
135 ret = regmap_write(regmap, AXP288_ADC_TS_PIN_CTRL, mode);
136 if (ret)
137 return ret;
138
139 /* When switching to the GPADC pin give things some time to settle */
140 if (mode == AXP288_ADC_TS_PIN_GPADC)
141 usleep_range(6000, 10000);
142
143 return 0;
144}
145
124static int axp288_adc_read_raw(struct iio_dev *indio_dev, 146static int axp288_adc_read_raw(struct iio_dev *indio_dev,
125 struct iio_chan_spec const *chan, 147 struct iio_chan_spec const *chan,
126 int *val, int *val2, long mask) 148 int *val, int *val2, long mask)
@@ -131,7 +153,16 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,
131 mutex_lock(&indio_dev->mlock); 153 mutex_lock(&indio_dev->mlock);
132 switch (mask) { 154 switch (mask) {
133 case IIO_CHAN_INFO_RAW: 155 case IIO_CHAN_INFO_RAW:
156 if (axp288_adc_set_ts(info->regmap, AXP288_ADC_TS_PIN_GPADC,
157 chan->address)) {
158 dev_err(&indio_dev->dev, "GPADC mode\n");
159 ret = -EINVAL;
160 break;
161 }
134 ret = axp288_adc_read_channel(val, chan->address, info->regmap); 162 ret = axp288_adc_read_channel(val, chan->address, info->regmap);
163 if (axp288_adc_set_ts(info->regmap, AXP288_ADC_TS_PIN_ON,
164 chan->address))
165 dev_err(&indio_dev->dev, "TS pin restore\n");
135 break; 166 break;
136 default: 167 default:
137 ret = -EINVAL; 168 ret = -EINVAL;
@@ -141,6 +172,15 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,
141 return ret; 172 return ret;
142} 173}
143 174
175static int axp288_adc_set_state(struct regmap *regmap)
176{
177 /* ADC should be always enabled for internal FG to function */
178 if (regmap_write(regmap, AXP288_ADC_TS_PIN_CTRL, AXP288_ADC_TS_PIN_ON))
179 return -EIO;
180
181 return regmap_write(regmap, AXP20X_ADC_EN1, AXP288_ADC_EN_MASK);
182}
183
144static const struct iio_info axp288_adc_iio_info = { 184static const struct iio_info axp288_adc_iio_info = {
145 .read_raw = &axp288_adc_read_raw, 185 .read_raw = &axp288_adc_read_raw,
146 .driver_module = THIS_MODULE, 186 .driver_module = THIS_MODULE,
@@ -169,7 +209,7 @@ static int axp288_adc_probe(struct platform_device *pdev)
169 * Set ADC to enabled state at all time, including system suspend. 209 * Set ADC to enabled state at all time, including system suspend.
170 * otherwise internal fuel gauge functionality may be affected. 210 * otherwise internal fuel gauge functionality may be affected.
171 */ 211 */
172 ret = regmap_write(info->regmap, AXP20X_ADC_EN1, AXP288_ADC_EN_MASK); 212 ret = axp288_adc_set_state(axp20x->regmap);
173 if (ret) { 213 if (ret) {
174 dev_err(&pdev->dev, "unable to enable ADC device\n"); 214 dev_err(&pdev->dev, "unable to enable ADC device\n");
175 return ret; 215 return ret;
diff --git a/drivers/iio/adc/ina2xx-adc.c b/drivers/iio/adc/ina2xx-adc.c
index 232c0b80d658..c3f86138cb55 100644
--- a/drivers/iio/adc/ina2xx-adc.c
+++ b/drivers/iio/adc/ina2xx-adc.c
@@ -644,7 +644,7 @@ static int ina2xx_capture_thread(void *data)
644{ 644{
645 struct iio_dev *indio_dev = data; 645 struct iio_dev *indio_dev = data;
646 struct ina2xx_chip_info *chip = iio_priv(indio_dev); 646 struct ina2xx_chip_info *chip = iio_priv(indio_dev);
647 unsigned int sampling_us = SAMPLING_PERIOD(chip); 647 int sampling_us = SAMPLING_PERIOD(chip);
648 int buffer_us; 648 int buffer_us;
649 649
650 /* 650 /*
diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
index e09233b03c05..609676384f5e 100644
--- a/drivers/iio/adc/stm32-adc-core.c
+++ b/drivers/iio/adc/stm32-adc-core.c
@@ -64,7 +64,7 @@
64#define STM32H7_CKMODE_MASK GENMASK(17, 16) 64#define STM32H7_CKMODE_MASK GENMASK(17, 16)
65 65
66/* STM32 H7 maximum analog clock rate (from datasheet) */ 66/* STM32 H7 maximum analog clock rate (from datasheet) */
67#define STM32H7_ADC_MAX_CLK_RATE 72000000 67#define STM32H7_ADC_MAX_CLK_RATE 36000000
68 68
69/** 69/**
70 * stm32_adc_common_regs - stm32 common registers, compatible dependent data 70 * stm32_adc_common_regs - stm32 common registers, compatible dependent data
@@ -148,14 +148,14 @@ static int stm32f4_adc_clk_sel(struct platform_device *pdev,
148 return -EINVAL; 148 return -EINVAL;
149 } 149 }
150 150
151 priv->common.rate = rate; 151 priv->common.rate = rate / stm32f4_pclk_div[i];
152 val = readl_relaxed(priv->common.base + STM32F4_ADC_CCR); 152 val = readl_relaxed(priv->common.base + STM32F4_ADC_CCR);
153 val &= ~STM32F4_ADC_ADCPRE_MASK; 153 val &= ~STM32F4_ADC_ADCPRE_MASK;
154 val |= i << STM32F4_ADC_ADCPRE_SHIFT; 154 val |= i << STM32F4_ADC_ADCPRE_SHIFT;
155 writel_relaxed(val, priv->common.base + STM32F4_ADC_CCR); 155 writel_relaxed(val, priv->common.base + STM32F4_ADC_CCR);
156 156
157 dev_dbg(&pdev->dev, "Using analog clock source at %ld kHz\n", 157 dev_dbg(&pdev->dev, "Using analog clock source at %ld kHz\n",
158 rate / (stm32f4_pclk_div[i] * 1000)); 158 priv->common.rate / 1000);
159 159
160 return 0; 160 return 0;
161} 161}
@@ -250,7 +250,7 @@ static int stm32h7_adc_clk_sel(struct platform_device *pdev,
250 250
251out: 251out:
252 /* rate used later by each ADC instance to control BOOST mode */ 252 /* rate used later by each ADC instance to control BOOST mode */
253 priv->common.rate = rate; 253 priv->common.rate = rate / div;
254 254
255 /* Set common clock mode and prescaler */ 255 /* Set common clock mode and prescaler */
256 val = readl_relaxed(priv->common.base + STM32H7_ADC_CCR); 256 val = readl_relaxed(priv->common.base + STM32H7_ADC_CCR);
@@ -260,7 +260,7 @@ out:
260 writel_relaxed(val, priv->common.base + STM32H7_ADC_CCR); 260 writel_relaxed(val, priv->common.base + STM32H7_ADC_CCR);
261 261
262 dev_dbg(&pdev->dev, "Using %s clock/%d source at %ld kHz\n", 262 dev_dbg(&pdev->dev, "Using %s clock/%d source at %ld kHz\n",
263 ckmode ? "bus" : "adc", div, rate / (div * 1000)); 263 ckmode ? "bus" : "adc", div, priv->common.rate / 1000);
264 264
265 return 0; 265 return 0;
266} 266}
diff --git a/drivers/iio/adc/sun4i-gpadc-iio.c b/drivers/iio/adc/sun4i-gpadc-iio.c
index 81d4c39e414a..137f577d9432 100644
--- a/drivers/iio/adc/sun4i-gpadc-iio.c
+++ b/drivers/iio/adc/sun4i-gpadc-iio.c
@@ -256,6 +256,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
256 256
257err: 257err:
258 pm_runtime_put_autosuspend(indio_dev->dev.parent); 258 pm_runtime_put_autosuspend(indio_dev->dev.parent);
259 disable_irq(irq);
259 mutex_unlock(&info->mutex); 260 mutex_unlock(&info->mutex);
260 261
261 return ret; 262 return ret;
@@ -365,7 +366,6 @@ static irqreturn_t sun4i_gpadc_temp_data_irq_handler(int irq, void *dev_id)
365 complete(&info->completion); 366 complete(&info->completion);
366 367
367out: 368out:
368 disable_irq_nosync(info->temp_data_irq);
369 return IRQ_HANDLED; 369 return IRQ_HANDLED;
370} 370}
371 371
@@ -380,7 +380,6 @@ static irqreturn_t sun4i_gpadc_fifo_data_irq_handler(int irq, void *dev_id)
380 complete(&info->completion); 380 complete(&info->completion);
381 381
382out: 382out:
383 disable_irq_nosync(info->fifo_data_irq);
384 return IRQ_HANDLED; 383 return IRQ_HANDLED;
385} 384}
386 385
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
index 01fc76f7d660..c168e0db329a 100644
--- a/drivers/iio/adc/vf610_adc.c
+++ b/drivers/iio/adc/vf610_adc.c
@@ -77,7 +77,7 @@
77#define VF610_ADC_ADSTS_MASK 0x300 77#define VF610_ADC_ADSTS_MASK 0x300
78#define VF610_ADC_ADLPC_EN 0x80 78#define VF610_ADC_ADLPC_EN 0x80
79#define VF610_ADC_ADHSC_EN 0x400 79#define VF610_ADC_ADHSC_EN 0x400
80#define VF610_ADC_REFSEL_VALT 0x100 80#define VF610_ADC_REFSEL_VALT 0x800
81#define VF610_ADC_REFSEL_VBG 0x1000 81#define VF610_ADC_REFSEL_VBG 0x1000
82#define VF610_ADC_ADTRG_HARD 0x2000 82#define VF610_ADC_ADTRG_HARD 0x2000
83#define VF610_ADC_AVGS_8 0x4000 83#define VF610_ADC_AVGS_8 0x4000
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
index 16ade0a0327b..0e4b379ada45 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
@@ -111,8 +111,6 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
111 s32 poll_value = 0; 111 s32 poll_value = 0;
112 112
113 if (state) { 113 if (state) {
114 if (!atomic_read(&st->user_requested_state))
115 return 0;
116 if (sensor_hub_device_open(st->hsdev)) 114 if (sensor_hub_device_open(st->hsdev))
117 return -EIO; 115 return -EIO;
118 116
@@ -161,6 +159,9 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
161 &report_val); 159 &report_val);
162 } 160 }
163 161
162 pr_debug("HID_SENSOR %s set power_state %d report_state %d\n",
163 st->pdev->name, state_val, report_val);
164
164 sensor_hub_get_feature(st->hsdev, st->power_state.report_id, 165 sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
165 st->power_state.index, 166 st->power_state.index,
166 sizeof(state_val), &state_val); 167 sizeof(state_val), &state_val);
@@ -182,6 +183,7 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state)
182 ret = pm_runtime_get_sync(&st->pdev->dev); 183 ret = pm_runtime_get_sync(&st->pdev->dev);
183 else { 184 else {
184 pm_runtime_mark_last_busy(&st->pdev->dev); 185 pm_runtime_mark_last_busy(&st->pdev->dev);
186 pm_runtime_use_autosuspend(&st->pdev->dev);
185 ret = pm_runtime_put_autosuspend(&st->pdev->dev); 187 ret = pm_runtime_put_autosuspend(&st->pdev->dev);
186 } 188 }
187 if (ret < 0) { 189 if (ret < 0) {
@@ -285,8 +287,6 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name,
285 /* Default to 3 seconds, but can be changed from sysfs */ 287 /* Default to 3 seconds, but can be changed from sysfs */
286 pm_runtime_set_autosuspend_delay(&attrb->pdev->dev, 288 pm_runtime_set_autosuspend_delay(&attrb->pdev->dev,
287 3000); 289 3000);
288 pm_runtime_use_autosuspend(&attrb->pdev->dev);
289
290 return ret; 290 return ret;
291error_unreg_trigger: 291error_unreg_trigger:
292 iio_trigger_unregister(trig); 292 iio_trigger_unregister(trig);
diff --git a/drivers/iio/common/st_sensors/st_sensors_core.c b/drivers/iio/common/st_sensors/st_sensors_core.c
index 79c8c7cd70d5..6e6a1ecc99dd 100644
--- a/drivers/iio/common/st_sensors/st_sensors_core.c
+++ b/drivers/iio/common/st_sensors/st_sensors_core.c
@@ -550,6 +550,31 @@ out:
550} 550}
551EXPORT_SYMBOL(st_sensors_read_info_raw); 551EXPORT_SYMBOL(st_sensors_read_info_raw);
552 552
553static int st_sensors_init_interface_mode(struct iio_dev *indio_dev,
554 const struct st_sensor_settings *sensor_settings)
555{
556 struct st_sensor_data *sdata = iio_priv(indio_dev);
557 struct device_node *np = sdata->dev->of_node;
558 struct st_sensors_platform_data *pdata;
559
560 pdata = (struct st_sensors_platform_data *)sdata->dev->platform_data;
561 if (((np && of_property_read_bool(np, "spi-3wire")) ||
562 (pdata && pdata->spi_3wire)) && sensor_settings->sim.addr) {
563 int err;
564
565 err = sdata->tf->write_byte(&sdata->tb, sdata->dev,
566 sensor_settings->sim.addr,
567 sensor_settings->sim.value);
568 if (err < 0) {
569 dev_err(&indio_dev->dev,
570 "failed to init interface mode\n");
571 return err;
572 }
573 }
574
575 return 0;
576}
577
553int st_sensors_check_device_support(struct iio_dev *indio_dev, 578int st_sensors_check_device_support(struct iio_dev *indio_dev,
554 int num_sensors_list, 579 int num_sensors_list,
555 const struct st_sensor_settings *sensor_settings) 580 const struct st_sensor_settings *sensor_settings)
@@ -574,6 +599,10 @@ int st_sensors_check_device_support(struct iio_dev *indio_dev,
574 return -ENODEV; 599 return -ENODEV;
575 } 600 }
576 601
602 err = st_sensors_init_interface_mode(indio_dev, &sensor_settings[i]);
603 if (err < 0)
604 return err;
605
577 if (sensor_settings[i].wai_addr) { 606 if (sensor_settings[i].wai_addr) {
578 err = sdata->tf->read_byte(&sdata->tb, sdata->dev, 607 err = sdata->tf->read_byte(&sdata->tb, sdata->dev,
579 sensor_settings[i].wai_addr, &wai); 608 sensor_settings[i].wai_addr, &wai);
diff --git a/drivers/iio/imu/adis16480.c b/drivers/iio/imu/adis16480.c
index 8cf84d3488b2..12898424d838 100644
--- a/drivers/iio/imu/adis16480.c
+++ b/drivers/iio/imu/adis16480.c
@@ -696,7 +696,7 @@ static const struct adis16480_chip_info adis16480_chip_info[] = {
696 .gyro_max_val = IIO_RAD_TO_DEGREE(22500), 696 .gyro_max_val = IIO_RAD_TO_DEGREE(22500),
697 .gyro_max_scale = 450, 697 .gyro_max_scale = 450,
698 .accel_max_val = IIO_M_S_2_TO_G(12500), 698 .accel_max_val = IIO_M_S_2_TO_G(12500),
699 .accel_max_scale = 5, 699 .accel_max_scale = 10,
700 }, 700 },
701 [ADIS16485] = { 701 [ADIS16485] = {
702 .channels = adis16485_channels, 702 .channels = adis16485_channels,
diff --git a/drivers/iio/light/tsl2563.c b/drivers/iio/light/tsl2563.c
index e7d4ea75e007..7599693f7fe9 100644
--- a/drivers/iio/light/tsl2563.c
+++ b/drivers/iio/light/tsl2563.c
@@ -626,7 +626,7 @@ static irqreturn_t tsl2563_event_handler(int irq, void *private)
626 struct tsl2563_chip *chip = iio_priv(dev_info); 626 struct tsl2563_chip *chip = iio_priv(dev_info);
627 627
628 iio_push_event(dev_info, 628 iio_push_event(dev_info,
629 IIO_UNMOD_EVENT_CODE(IIO_LIGHT, 629 IIO_UNMOD_EVENT_CODE(IIO_INTENSITY,
630 0, 630 0,
631 IIO_EV_TYPE_THRESH, 631 IIO_EV_TYPE_THRESH,
632 IIO_EV_DIR_EITHER), 632 IIO_EV_DIR_EITHER),
diff --git a/drivers/iio/magnetometer/st_magn_core.c b/drivers/iio/magnetometer/st_magn_core.c
index 8e1b0861fbe4..c38563699984 100644
--- a/drivers/iio/magnetometer/st_magn_core.c
+++ b/drivers/iio/magnetometer/st_magn_core.c
@@ -356,9 +356,7 @@ static const struct st_sensor_settings st_magn_sensors_settings[] = {
356 .drdy_irq = { 356 .drdy_irq = {
357 .addr = 0x62, 357 .addr = 0x62,
358 .mask_int1 = 0x01, 358 .mask_int1 = 0x01,
359 .addr_ihl = 0x63, 359 .addr_stat_drdy = 0x67,
360 .mask_ihl = 0x04,
361 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR,
362 }, 360 },
363 .multi_read_bit = false, 361 .multi_read_bit = false,
364 .bootime = 2, 362 .bootime = 2,
diff --git a/drivers/iio/pressure/bmp280-core.c b/drivers/iio/pressure/bmp280-core.c
index d82b788374b6..0d2ea3ee371b 100644
--- a/drivers/iio/pressure/bmp280-core.c
+++ b/drivers/iio/pressure/bmp280-core.c
@@ -282,6 +282,11 @@ static int bmp280_read_temp(struct bmp280_data *data,
282 } 282 }
283 283
284 adc_temp = be32_to_cpu(tmp) >> 12; 284 adc_temp = be32_to_cpu(tmp) >> 12;
285 if (adc_temp == BMP280_TEMP_SKIPPED) {
286 /* reading was skipped */
287 dev_err(data->dev, "reading temperature skipped\n");
288 return -EIO;
289 }
285 comp_temp = bmp280_compensate_temp(data, adc_temp); 290 comp_temp = bmp280_compensate_temp(data, adc_temp);
286 291
287 /* 292 /*
@@ -317,6 +322,11 @@ static int bmp280_read_press(struct bmp280_data *data,
317 } 322 }
318 323
319 adc_press = be32_to_cpu(tmp) >> 12; 324 adc_press = be32_to_cpu(tmp) >> 12;
325 if (adc_press == BMP280_PRESS_SKIPPED) {
326 /* reading was skipped */
327 dev_err(data->dev, "reading pressure skipped\n");
328 return -EIO;
329 }
320 comp_press = bmp280_compensate_press(data, adc_press); 330 comp_press = bmp280_compensate_press(data, adc_press);
321 331
322 *val = comp_press; 332 *val = comp_press;
@@ -345,6 +355,11 @@ static int bmp280_read_humid(struct bmp280_data *data, int *val, int *val2)
345 } 355 }
346 356
347 adc_humidity = be16_to_cpu(tmp); 357 adc_humidity = be16_to_cpu(tmp);
358 if (adc_humidity == BMP280_HUMIDITY_SKIPPED) {
359 /* reading was skipped */
360 dev_err(data->dev, "reading humidity skipped\n");
361 return -EIO;
362 }
348 comp_humidity = bmp280_compensate_humidity(data, adc_humidity); 363 comp_humidity = bmp280_compensate_humidity(data, adc_humidity);
349 364
350 *val = comp_humidity; 365 *val = comp_humidity;
@@ -597,14 +612,20 @@ static const struct bmp280_chip_info bmp280_chip_info = {
597 612
598static int bme280_chip_config(struct bmp280_data *data) 613static int bme280_chip_config(struct bmp280_data *data)
599{ 614{
600 int ret = bmp280_chip_config(data); 615 int ret;
601 u8 osrs = BMP280_OSRS_HUMIDITIY_X(data->oversampling_humid + 1); 616 u8 osrs = BMP280_OSRS_HUMIDITIY_X(data->oversampling_humid + 1);
602 617
618 /*
619 * Oversampling of humidity must be set before oversampling of
620 * temperature/pressure is set to become effective.
621 */
622 ret = regmap_update_bits(data->regmap, BMP280_REG_CTRL_HUMIDITY,
623 BMP280_OSRS_HUMIDITY_MASK, osrs);
624
603 if (ret < 0) 625 if (ret < 0)
604 return ret; 626 return ret;
605 627
606 return regmap_update_bits(data->regmap, BMP280_REG_CTRL_HUMIDITY, 628 return bmp280_chip_config(data);
607 BMP280_OSRS_HUMIDITY_MASK, osrs);
608} 629}
609 630
610static const struct bmp280_chip_info bme280_chip_info = { 631static const struct bmp280_chip_info bme280_chip_info = {
diff --git a/drivers/iio/pressure/bmp280.h b/drivers/iio/pressure/bmp280.h
index 2c770e13be0e..61347438b779 100644
--- a/drivers/iio/pressure/bmp280.h
+++ b/drivers/iio/pressure/bmp280.h
@@ -96,6 +96,11 @@
96#define BME280_CHIP_ID 0x60 96#define BME280_CHIP_ID 0x60
97#define BMP280_SOFT_RESET_VAL 0xB6 97#define BMP280_SOFT_RESET_VAL 0xB6
98 98
99/* BMP280 register skipped special values */
100#define BMP280_TEMP_SKIPPED 0x80000
101#define BMP280_PRESS_SKIPPED 0x80000
102#define BMP280_HUMIDITY_SKIPPED 0x8000
103
99/* Regmap configurations */ 104/* Regmap configurations */
100extern const struct regmap_config bmp180_regmap_config; 105extern const struct regmap_config bmp180_regmap_config;
101extern const struct regmap_config bmp280_regmap_config; 106extern const struct regmap_config bmp280_regmap_config;
diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c
index aa61ec15c139..f1bce05ffa13 100644
--- a/drivers/iio/pressure/st_pressure_core.c
+++ b/drivers/iio/pressure/st_pressure_core.c
@@ -456,7 +456,7 @@ static const struct st_sensor_settings st_press_sensors_settings[] = {
456 .mask_od = 0x40, 456 .mask_od = 0x40,
457 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR, 457 .addr_stat_drdy = ST_SENSORS_DEFAULT_STAT_ADDR,
458 }, 458 },
459 .multi_read_bit = true, 459 .multi_read_bit = false,
460 .bootime = 2, 460 .bootime = 2,
461 }, 461 },
462}; 462};
diff --git a/drivers/iio/trigger/stm32-timer-trigger.c b/drivers/iio/trigger/stm32-timer-trigger.c
index d22bc56dd9fc..25ad6abfee22 100644
--- a/drivers/iio/trigger/stm32-timer-trigger.c
+++ b/drivers/iio/trigger/stm32-timer-trigger.c
@@ -366,34 +366,32 @@ static int stm32_counter_read_raw(struct iio_dev *indio_dev,
366 int *val, int *val2, long mask) 366 int *val, int *val2, long mask)
367{ 367{
368 struct stm32_timer_trigger *priv = iio_priv(indio_dev); 368 struct stm32_timer_trigger *priv = iio_priv(indio_dev);
369 u32 dat;
369 370
370 switch (mask) { 371 switch (mask) {
371 case IIO_CHAN_INFO_RAW: 372 case IIO_CHAN_INFO_RAW:
372 { 373 regmap_read(priv->regmap, TIM_CNT, &dat);
373 u32 cnt; 374 *val = dat;
374 375 return IIO_VAL_INT;
375 regmap_read(priv->regmap, TIM_CNT, &cnt);
376 *val = cnt;
377 376
377 case IIO_CHAN_INFO_ENABLE:
378 regmap_read(priv->regmap, TIM_CR1, &dat);
379 *val = (dat & TIM_CR1_CEN) ? 1 : 0;
378 return IIO_VAL_INT; 380 return IIO_VAL_INT;
379 }
380 case IIO_CHAN_INFO_SCALE:
381 {
382 u32 smcr;
383 381
384 regmap_read(priv->regmap, TIM_SMCR, &smcr); 382 case IIO_CHAN_INFO_SCALE:
385 smcr &= TIM_SMCR_SMS; 383 regmap_read(priv->regmap, TIM_SMCR, &dat);
384 dat &= TIM_SMCR_SMS;
386 385
387 *val = 1; 386 *val = 1;
388 *val2 = 0; 387 *val2 = 0;
389 388
390 /* in quadrature case scale = 0.25 */ 389 /* in quadrature case scale = 0.25 */
391 if (smcr == 3) 390 if (dat == 3)
392 *val2 = 2; 391 *val2 = 2;
393 392
394 return IIO_VAL_FRACTIONAL_LOG2; 393 return IIO_VAL_FRACTIONAL_LOG2;
395 } 394 }
396 }
397 395
398 return -EINVAL; 396 return -EINVAL;
399} 397}
@@ -403,15 +401,31 @@ static int stm32_counter_write_raw(struct iio_dev *indio_dev,
403 int val, int val2, long mask) 401 int val, int val2, long mask)
404{ 402{
405 struct stm32_timer_trigger *priv = iio_priv(indio_dev); 403 struct stm32_timer_trigger *priv = iio_priv(indio_dev);
404 u32 dat;
406 405
407 switch (mask) { 406 switch (mask) {
408 case IIO_CHAN_INFO_RAW: 407 case IIO_CHAN_INFO_RAW:
409 regmap_write(priv->regmap, TIM_CNT, val); 408 return regmap_write(priv->regmap, TIM_CNT, val);
410 409
411 return IIO_VAL_INT;
412 case IIO_CHAN_INFO_SCALE: 410 case IIO_CHAN_INFO_SCALE:
413 /* fixed scale */ 411 /* fixed scale */
414 return -EINVAL; 412 return -EINVAL;
413
414 case IIO_CHAN_INFO_ENABLE:
415 if (val) {
416 regmap_read(priv->regmap, TIM_CR1, &dat);
417 if (!(dat & TIM_CR1_CEN))
418 clk_enable(priv->clk);
419 regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN,
420 TIM_CR1_CEN);
421 } else {
422 regmap_read(priv->regmap, TIM_CR1, &dat);
423 regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN,
424 0);
425 if (dat & TIM_CR1_CEN)
426 clk_disable(priv->clk);
427 }
428 return 0;
415 } 429 }
416 430
417 return -EINVAL; 431 return -EINVAL;
@@ -471,7 +485,7 @@ static int stm32_get_trigger_mode(struct iio_dev *indio_dev,
471 485
472 regmap_read(priv->regmap, TIM_SMCR, &smcr); 486 regmap_read(priv->regmap, TIM_SMCR, &smcr);
473 487
474 return smcr == TIM_SMCR_SMS ? 0 : -EINVAL; 488 return (smcr & TIM_SMCR_SMS) == TIM_SMCR_SMS ? 0 : -EINVAL;
475} 489}
476 490
477static const struct iio_enum stm32_trigger_mode_enum = { 491static const struct iio_enum stm32_trigger_mode_enum = {
@@ -507,9 +521,19 @@ static int stm32_set_enable_mode(struct iio_dev *indio_dev,
507{ 521{
508 struct stm32_timer_trigger *priv = iio_priv(indio_dev); 522 struct stm32_timer_trigger *priv = iio_priv(indio_dev);
509 int sms = stm32_enable_mode2sms(mode); 523 int sms = stm32_enable_mode2sms(mode);
524 u32 val;
510 525
511 if (sms < 0) 526 if (sms < 0)
512 return sms; 527 return sms;
528 /*
529 * Triggered mode sets CEN bit automatically by hardware. So, first
530 * enable counter clock, so it can use it. Keeps it in sync with CEN.
531 */
532 if (sms == 6) {
533 regmap_read(priv->regmap, TIM_CR1, &val);
534 if (!(val & TIM_CR1_CEN))
535 clk_enable(priv->clk);
536 }
513 537
514 regmap_update_bits(priv->regmap, TIM_SMCR, TIM_SMCR_SMS, sms); 538 regmap_update_bits(priv->regmap, TIM_SMCR, TIM_SMCR_SMS, sms);
515 539
@@ -571,11 +595,14 @@ static int stm32_get_quadrature_mode(struct iio_dev *indio_dev,
571{ 595{
572 struct stm32_timer_trigger *priv = iio_priv(indio_dev); 596 struct stm32_timer_trigger *priv = iio_priv(indio_dev);
573 u32 smcr; 597 u32 smcr;
598 int mode;
574 599
575 regmap_read(priv->regmap, TIM_SMCR, &smcr); 600 regmap_read(priv->regmap, TIM_SMCR, &smcr);
576 smcr &= TIM_SMCR_SMS; 601 mode = (smcr & TIM_SMCR_SMS) - 1;
602 if ((mode < 0) || (mode > ARRAY_SIZE(stm32_quadrature_modes)))
603 return -EINVAL;
577 604
578 return smcr - 1; 605 return mode;
579} 606}
580 607
581static const struct iio_enum stm32_quadrature_mode_enum = { 608static const struct iio_enum stm32_quadrature_mode_enum = {
@@ -592,13 +619,20 @@ static const char *const stm32_count_direction_states[] = {
592 619
593static int stm32_set_count_direction(struct iio_dev *indio_dev, 620static int stm32_set_count_direction(struct iio_dev *indio_dev,
594 const struct iio_chan_spec *chan, 621 const struct iio_chan_spec *chan,
595 unsigned int mode) 622 unsigned int dir)
596{ 623{
597 struct stm32_timer_trigger *priv = iio_priv(indio_dev); 624 struct stm32_timer_trigger *priv = iio_priv(indio_dev);
625 u32 val;
626 int mode;
598 627
599 regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_DIR, mode); 628 /* In encoder mode, direction is RO (given by TI1/TI2 signals) */
629 regmap_read(priv->regmap, TIM_SMCR, &val);
630 mode = (val & TIM_SMCR_SMS) - 1;
631 if ((mode >= 0) || (mode < ARRAY_SIZE(stm32_quadrature_modes)))
632 return -EBUSY;
600 633
601 return 0; 634 return regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_DIR,
635 dir ? TIM_CR1_DIR : 0);
602} 636}
603 637
604static int stm32_get_count_direction(struct iio_dev *indio_dev, 638static int stm32_get_count_direction(struct iio_dev *indio_dev,
@@ -609,7 +643,7 @@ static int stm32_get_count_direction(struct iio_dev *indio_dev,
609 643
610 regmap_read(priv->regmap, TIM_CR1, &cr1); 644 regmap_read(priv->regmap, TIM_CR1, &cr1);
611 645
612 return (cr1 & TIM_CR1_DIR); 646 return ((cr1 & TIM_CR1_DIR) ? 1 : 0);
613} 647}
614 648
615static const struct iio_enum stm32_count_direction_enum = { 649static const struct iio_enum stm32_count_direction_enum = {
@@ -672,7 +706,9 @@ static const struct iio_chan_spec_ext_info stm32_trigger_count_info[] = {
672static const struct iio_chan_spec stm32_trigger_channel = { 706static const struct iio_chan_spec stm32_trigger_channel = {
673 .type = IIO_COUNT, 707 .type = IIO_COUNT,
674 .channel = 0, 708 .channel = 0,
675 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | BIT(IIO_CHAN_INFO_SCALE), 709 .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |
710 BIT(IIO_CHAN_INFO_ENABLE) |
711 BIT(IIO_CHAN_INFO_SCALE),
676 .ext_info = stm32_trigger_count_info, 712 .ext_info = stm32_trigger_count_info,
677 .indexed = 1 713 .indexed = 1
678}; 714};
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 01236cef7bfb..437522ca97b4 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -61,6 +61,7 @@ struct addr_req {
61 void (*callback)(int status, struct sockaddr *src_addr, 61 void (*callback)(int status, struct sockaddr *src_addr,
62 struct rdma_dev_addr *addr, void *context); 62 struct rdma_dev_addr *addr, void *context);
63 unsigned long timeout; 63 unsigned long timeout;
64 struct delayed_work work;
64 int status; 65 int status;
65 u32 seq; 66 u32 seq;
66}; 67};
@@ -295,7 +296,7 @@ int rdma_translate_ip(const struct sockaddr *addr,
295} 296}
296EXPORT_SYMBOL(rdma_translate_ip); 297EXPORT_SYMBOL(rdma_translate_ip);
297 298
298static void set_timeout(unsigned long time) 299static void set_timeout(struct delayed_work *delayed_work, unsigned long time)
299{ 300{
300 unsigned long delay; 301 unsigned long delay;
301 302
@@ -303,7 +304,7 @@ static void set_timeout(unsigned long time)
303 if ((long)delay < 0) 304 if ((long)delay < 0)
304 delay = 0; 305 delay = 0;
305 306
306 mod_delayed_work(addr_wq, &work, delay); 307 mod_delayed_work(addr_wq, delayed_work, delay);
307} 308}
308 309
309static void queue_req(struct addr_req *req) 310static void queue_req(struct addr_req *req)
@@ -318,8 +319,7 @@ static void queue_req(struct addr_req *req)
318 319
319 list_add(&req->list, &temp_req->list); 320 list_add(&req->list, &temp_req->list);
320 321
321 if (req_list.next == &req->list) 322 set_timeout(&req->work, req->timeout);
322 set_timeout(req->timeout);
323 mutex_unlock(&lock); 323 mutex_unlock(&lock);
324} 324}
325 325
@@ -574,6 +574,37 @@ static int addr_resolve(struct sockaddr *src_in,
574 return ret; 574 return ret;
575} 575}
576 576
577static void process_one_req(struct work_struct *_work)
578{
579 struct addr_req *req;
580 struct sockaddr *src_in, *dst_in;
581
582 mutex_lock(&lock);
583 req = container_of(_work, struct addr_req, work.work);
584
585 if (req->status == -ENODATA) {
586 src_in = (struct sockaddr *)&req->src_addr;
587 dst_in = (struct sockaddr *)&req->dst_addr;
588 req->status = addr_resolve(src_in, dst_in, req->addr,
589 true, req->seq);
590 if (req->status && time_after_eq(jiffies, req->timeout)) {
591 req->status = -ETIMEDOUT;
592 } else if (req->status == -ENODATA) {
593 /* requeue the work for retrying again */
594 set_timeout(&req->work, req->timeout);
595 mutex_unlock(&lock);
596 return;
597 }
598 }
599 list_del(&req->list);
600 mutex_unlock(&lock);
601
602 req->callback(req->status, (struct sockaddr *)&req->src_addr,
603 req->addr, req->context);
604 put_client(req->client);
605 kfree(req);
606}
607
577static void process_req(struct work_struct *work) 608static void process_req(struct work_struct *work)
578{ 609{
579 struct addr_req *req, *temp_req; 610 struct addr_req *req, *temp_req;
@@ -591,20 +622,23 @@ static void process_req(struct work_struct *work)
591 true, req->seq); 622 true, req->seq);
592 if (req->status && time_after_eq(jiffies, req->timeout)) 623 if (req->status && time_after_eq(jiffies, req->timeout))
593 req->status = -ETIMEDOUT; 624 req->status = -ETIMEDOUT;
594 else if (req->status == -ENODATA) 625 else if (req->status == -ENODATA) {
626 set_timeout(&req->work, req->timeout);
595 continue; 627 continue;
628 }
596 } 629 }
597 list_move_tail(&req->list, &done_list); 630 list_move_tail(&req->list, &done_list);
598 } 631 }
599 632
600 if (!list_empty(&req_list)) {
601 req = list_entry(req_list.next, struct addr_req, list);
602 set_timeout(req->timeout);
603 }
604 mutex_unlock(&lock); 633 mutex_unlock(&lock);
605 634
606 list_for_each_entry_safe(req, temp_req, &done_list, list) { 635 list_for_each_entry_safe(req, temp_req, &done_list, list) {
607 list_del(&req->list); 636 list_del(&req->list);
637 /* It is safe to cancel other work items from this work item
638 * because at a time there can be only one work item running
639 * with this single threaded work queue.
640 */
641 cancel_delayed_work(&req->work);
608 req->callback(req->status, (struct sockaddr *) &req->src_addr, 642 req->callback(req->status, (struct sockaddr *) &req->src_addr,
609 req->addr, req->context); 643 req->addr, req->context);
610 put_client(req->client); 644 put_client(req->client);
@@ -647,6 +681,7 @@ int rdma_resolve_ip(struct rdma_addr_client *client,
647 req->context = context; 681 req->context = context;
648 req->client = client; 682 req->client = client;
649 atomic_inc(&client->refcount); 683 atomic_inc(&client->refcount);
684 INIT_DELAYED_WORK(&req->work, process_one_req);
650 req->seq = (u32)atomic_inc_return(&ib_nl_addr_request_seq); 685 req->seq = (u32)atomic_inc_return(&ib_nl_addr_request_seq);
651 686
652 req->status = addr_resolve(src_in, dst_in, addr, true, req->seq); 687 req->status = addr_resolve(src_in, dst_in, addr, true, req->seq);
@@ -701,7 +736,7 @@ void rdma_addr_cancel(struct rdma_dev_addr *addr)
701 req->status = -ECANCELED; 736 req->status = -ECANCELED;
702 req->timeout = jiffies; 737 req->timeout = jiffies;
703 list_move(&req->list, &req_list); 738 list_move(&req->list, &req_list);
704 set_timeout(req->timeout); 739 set_timeout(&req->work, req->timeout);
705 break; 740 break;
706 } 741 }
707 } 742 }
@@ -807,9 +842,8 @@ static int netevent_callback(struct notifier_block *self, unsigned long event,
807 if (event == NETEVENT_NEIGH_UPDATE) { 842 if (event == NETEVENT_NEIGH_UPDATE) {
808 struct neighbour *neigh = ctx; 843 struct neighbour *neigh = ctx;
809 844
810 if (neigh->nud_state & NUD_VALID) { 845 if (neigh->nud_state & NUD_VALID)
811 set_timeout(jiffies); 846 set_timeout(&work, jiffies);
812 }
813 } 847 }
814 return 0; 848 return 0;
815} 849}
@@ -820,7 +854,7 @@ static struct notifier_block nb = {
820 854
821int addr_init(void) 855int addr_init(void)
822{ 856{
823 addr_wq = alloc_workqueue("ib_addr", WQ_MEM_RECLAIM, 0); 857 addr_wq = alloc_ordered_workqueue("ib_addr", WQ_MEM_RECLAIM);
824 if (!addr_wq) 858 if (!addr_wq)
825 return -ENOMEM; 859 return -ENOMEM;
826 860
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index a5dfab6adf49..221468f77128 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -537,10 +537,11 @@ void ib_unregister_device(struct ib_device *device)
537 } 537 }
538 up_read(&lists_rwsem); 538 up_read(&lists_rwsem);
539 539
540 mutex_unlock(&device_mutex);
541
542 ib_device_unregister_rdmacg(device); 540 ib_device_unregister_rdmacg(device);
543 ib_device_unregister_sysfs(device); 541 ib_device_unregister_sysfs(device);
542
543 mutex_unlock(&device_mutex);
544
544 ib_cache_cleanup_one(device); 545 ib_cache_cleanup_one(device);
545 546
546 ib_security_destroy_port_pkey_list(device); 547 ib_security_destroy_port_pkey_list(device);
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 2c98533a0203..739bd69ef1d4 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -1015,7 +1015,7 @@ static struct ib_ucq_object *create_cq(struct ib_uverbs_file *file,
1015 cq->uobject = &obj->uobject; 1015 cq->uobject = &obj->uobject;
1016 cq->comp_handler = ib_uverbs_comp_handler; 1016 cq->comp_handler = ib_uverbs_comp_handler;
1017 cq->event_handler = ib_uverbs_cq_event_handler; 1017 cq->event_handler = ib_uverbs_cq_event_handler;
1018 cq->cq_context = &ev_file->ev_queue; 1018 cq->cq_context = ev_file ? &ev_file->ev_queue : NULL;
1019 atomic_set(&cq->usecnt, 0); 1019 atomic_set(&cq->usecnt, 0);
1020 1020
1021 obj->uobject.object = cq; 1021 obj->uobject.object = cq;
@@ -1153,7 +1153,7 @@ ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file,
1153 int out_len) 1153 int out_len)
1154{ 1154{
1155 struct ib_uverbs_resize_cq cmd; 1155 struct ib_uverbs_resize_cq cmd;
1156 struct ib_uverbs_resize_cq_resp resp; 1156 struct ib_uverbs_resize_cq_resp resp = {};
1157 struct ib_udata udata; 1157 struct ib_udata udata;
1158 struct ib_cq *cq; 1158 struct ib_cq *cq;
1159 int ret = -EINVAL; 1159 int ret = -EINVAL;
@@ -1522,6 +1522,7 @@ static int create_qp(struct ib_uverbs_file *file,
1522 qp->qp_type = attr.qp_type; 1522 qp->qp_type = attr.qp_type;
1523 atomic_set(&qp->usecnt, 0); 1523 atomic_set(&qp->usecnt, 0);
1524 atomic_inc(&pd->usecnt); 1524 atomic_inc(&pd->usecnt);
1525 qp->port = 0;
1525 if (attr.send_cq) 1526 if (attr.send_cq)
1526 atomic_inc(&attr.send_cq->usecnt); 1527 atomic_inc(&attr.send_cq->usecnt);
1527 if (attr.recv_cq) 1528 if (attr.recv_cq)
@@ -1962,8 +1963,9 @@ static int modify_qp(struct ib_uverbs_file *file,
1962 attr->alt_timeout = cmd->base.alt_timeout; 1963 attr->alt_timeout = cmd->base.alt_timeout;
1963 attr->rate_limit = cmd->rate_limit; 1964 attr->rate_limit = cmd->rate_limit;
1964 1965
1965 attr->ah_attr.type = rdma_ah_find_type(qp->device, 1966 if (cmd->base.attr_mask & IB_QP_AV)
1966 cmd->base.dest.port_num); 1967 attr->ah_attr.type = rdma_ah_find_type(qp->device,
1968 cmd->base.dest.port_num);
1967 if (cmd->base.dest.is_global) { 1969 if (cmd->base.dest.is_global) {
1968 rdma_ah_set_grh(&attr->ah_attr, NULL, 1970 rdma_ah_set_grh(&attr->ah_attr, NULL,
1969 cmd->base.dest.flow_label, 1971 cmd->base.dest.flow_label,
@@ -1981,8 +1983,9 @@ static int modify_qp(struct ib_uverbs_file *file,
1981 rdma_ah_set_port_num(&attr->ah_attr, 1983 rdma_ah_set_port_num(&attr->ah_attr,
1982 cmd->base.dest.port_num); 1984 cmd->base.dest.port_num);
1983 1985
1984 attr->alt_ah_attr.type = rdma_ah_find_type(qp->device, 1986 if (cmd->base.attr_mask & IB_QP_ALT_PATH)
1985 cmd->base.dest.port_num); 1987 attr->alt_ah_attr.type =
1988 rdma_ah_find_type(qp->device, cmd->base.dest.port_num);
1986 if (cmd->base.alt_dest.is_global) { 1989 if (cmd->base.alt_dest.is_global) {
1987 rdma_ah_set_grh(&attr->alt_ah_attr, NULL, 1990 rdma_ah_set_grh(&attr->alt_ah_attr, NULL,
1988 cmd->base.alt_dest.flow_label, 1991 cmd->base.alt_dest.flow_label,
diff --git a/drivers/infiniband/core/uverbs_main.c b/drivers/infiniband/core/uverbs_main.c
index 3d2609608f58..5e530d2bee44 100644
--- a/drivers/infiniband/core/uverbs_main.c
+++ b/drivers/infiniband/core/uverbs_main.c
@@ -250,6 +250,7 @@ void ib_uverbs_release_file(struct kref *ref)
250 if (atomic_dec_and_test(&file->device->refcount)) 250 if (atomic_dec_and_test(&file->device->refcount))
251 ib_uverbs_comp_dev(file->device); 251 ib_uverbs_comp_dev(file->device);
252 252
253 kobject_put(&file->device->kobj);
253 kfree(file); 254 kfree(file);
254} 255}
255 256
@@ -917,7 +918,6 @@ err:
917static int ib_uverbs_close(struct inode *inode, struct file *filp) 918static int ib_uverbs_close(struct inode *inode, struct file *filp)
918{ 919{
919 struct ib_uverbs_file *file = filp->private_data; 920 struct ib_uverbs_file *file = filp->private_data;
920 struct ib_uverbs_device *dev = file->device;
921 921
922 mutex_lock(&file->cleanup_mutex); 922 mutex_lock(&file->cleanup_mutex);
923 if (file->ucontext) { 923 if (file->ucontext) {
@@ -939,7 +939,6 @@ static int ib_uverbs_close(struct inode *inode, struct file *filp)
939 ib_uverbs_release_async_event_file); 939 ib_uverbs_release_async_event_file);
940 940
941 kref_put(&file->ref, ib_uverbs_release_file); 941 kref_put(&file->ref, ib_uverbs_release_file);
942 kobject_put(&dev->kobj);
943 942
944 return 0; 943 return 0;
945} 944}
@@ -1154,7 +1153,6 @@ static void ib_uverbs_free_hw_resources(struct ib_uverbs_device *uverbs_dev,
1154 kref_get(&file->ref); 1153 kref_get(&file->ref);
1155 mutex_unlock(&uverbs_dev->lists_mutex); 1154 mutex_unlock(&uverbs_dev->lists_mutex);
1156 1155
1157 ib_uverbs_event_handler(&file->event_handler, &event);
1158 1156
1159 mutex_lock(&file->cleanup_mutex); 1157 mutex_lock(&file->cleanup_mutex);
1160 ucontext = file->ucontext; 1158 ucontext = file->ucontext;
@@ -1171,6 +1169,7 @@ static void ib_uverbs_free_hw_resources(struct ib_uverbs_device *uverbs_dev,
1171 * for example due to freeing the resources 1169 * for example due to freeing the resources
1172 * (e.g mmput). 1170 * (e.g mmput).
1173 */ 1171 */
1172 ib_uverbs_event_handler(&file->event_handler, &event);
1174 ib_dev->disassociate_ucontext(ucontext); 1173 ib_dev->disassociate_ucontext(ucontext);
1175 mutex_lock(&file->cleanup_mutex); 1174 mutex_lock(&file->cleanup_mutex);
1176 ib_uverbs_cleanup_ucontext(file, ucontext, true); 1175 ib_uverbs_cleanup_ucontext(file, ucontext, true);
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index fb98ed67d5bc..b456e3ca1876 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -838,6 +838,7 @@ struct ib_qp *ib_create_qp(struct ib_pd *pd,
838 spin_lock_init(&qp->mr_lock); 838 spin_lock_init(&qp->mr_lock);
839 INIT_LIST_HEAD(&qp->rdma_mrs); 839 INIT_LIST_HEAD(&qp->rdma_mrs);
840 INIT_LIST_HEAD(&qp->sig_mrs); 840 INIT_LIST_HEAD(&qp->sig_mrs);
841 qp->port = 0;
841 842
842 if (qp_init_attr->qp_type == IB_QPT_XRC_TGT) 843 if (qp_init_attr->qp_type == IB_QPT_XRC_TGT)
843 return ib_create_xrc_qp(qp, qp_init_attr); 844 return ib_create_xrc_qp(qp, qp_init_attr);
@@ -895,7 +896,6 @@ static const struct {
895} qp_state_table[IB_QPS_ERR + 1][IB_QPS_ERR + 1] = { 896} qp_state_table[IB_QPS_ERR + 1][IB_QPS_ERR + 1] = {
896 [IB_QPS_RESET] = { 897 [IB_QPS_RESET] = {
897 [IB_QPS_RESET] = { .valid = 1 }, 898 [IB_QPS_RESET] = { .valid = 1 },
898 [IB_QPS_ERR] = { .valid = 1 },
899 [IB_QPS_INIT] = { 899 [IB_QPS_INIT] = {
900 .valid = 1, 900 .valid = 1,
901 .req_param = { 901 .req_param = {
@@ -1298,7 +1298,11 @@ int ib_modify_qp_with_udata(struct ib_qp *qp, struct ib_qp_attr *attr,
1298 if (ret) 1298 if (ret)
1299 return ret; 1299 return ret;
1300 } 1300 }
1301 return ib_security_modify_qp(qp, attr, attr_mask, udata); 1301 ret = ib_security_modify_qp(qp, attr, attr_mask, udata);
1302 if (!ret && (attr_mask & IB_QP_PORT))
1303 qp->port = attr->port_num;
1304
1305 return ret;
1302} 1306}
1303EXPORT_SYMBOL(ib_modify_qp_with_udata); 1307EXPORT_SYMBOL(ib_modify_qp_with_udata);
1304 1308
diff --git a/drivers/infiniband/hw/cxgb4/mem.c b/drivers/infiniband/hw/cxgb4/mem.c
index 5332f06b99ba..c2fba76becd4 100644
--- a/drivers/infiniband/hw/cxgb4/mem.c
+++ b/drivers/infiniband/hw/cxgb4/mem.c
@@ -661,7 +661,7 @@ struct ib_mr *c4iw_alloc_mr(struct ib_pd *pd,
661 rhp = php->rhp; 661 rhp = php->rhp;
662 662
663 if (mr_type != IB_MR_TYPE_MEM_REG || 663 if (mr_type != IB_MR_TYPE_MEM_REG ||
664 max_num_sg > t4_max_fr_depth(&rhp->rdev.lldi.ulptx_memwrite_dsgl && 664 max_num_sg > t4_max_fr_depth(rhp->rdev.lldi.ulptx_memwrite_dsgl &&
665 use_dsgl)) 665 use_dsgl))
666 return ERR_PTR(-EINVAL); 666 return ERR_PTR(-EINVAL);
667 667
diff --git a/drivers/infiniband/hw/hns/hns_roce_ah.c b/drivers/infiniband/hw/hns/hns_roce_ah.c
index f78a733a63ec..d545302b8ef8 100644
--- a/drivers/infiniband/hw/hns/hns_roce_ah.c
+++ b/drivers/infiniband/hw/hns/hns_roce_ah.c
@@ -64,8 +64,10 @@ struct ib_ah *hns_roce_create_ah(struct ib_pd *ibpd,
64 } else { 64 } else {
65 u8 *dmac = rdma_ah_retrieve_dmac(ah_attr); 65 u8 *dmac = rdma_ah_retrieve_dmac(ah_attr);
66 66
67 if (!dmac) 67 if (!dmac) {
68 kfree(ah);
68 return ERR_PTR(-EINVAL); 69 return ERR_PTR(-EINVAL);
70 }
69 memcpy(ah->av.mac, dmac, ETH_ALEN); 71 memcpy(ah->av.mac, dmac, ETH_ALEN);
70 } 72 }
71 73
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index 23fad6d96944..2540b65e242c 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
@@ -733,7 +733,7 @@ static int hns_roce_v1_rsv_lp_qp(struct hns_roce_dev *hr_dev)
733 continue; 733 continue;
734 734
735 free_mr->mr_free_qp[i] = hns_roce_v1_create_lp_qp(hr_dev, pd); 735 free_mr->mr_free_qp[i] = hns_roce_v1_create_lp_qp(hr_dev, pd);
736 if (IS_ERR(free_mr->mr_free_qp[i])) { 736 if (!free_mr->mr_free_qp[i]) {
737 dev_err(dev, "Create loop qp failed!\n"); 737 dev_err(dev, "Create loop qp failed!\n");
738 goto create_lp_qp_failed; 738 goto create_lp_qp_failed;
739 } 739 }
diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
index 9ec1ae9a82c9..a49ff2eb6fb3 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c
@@ -130,20 +130,32 @@ static enum i40iw_status_code i40iw_sc_parse_fpm_commit_buf(
130 u64 base = 0; 130 u64 base = 0;
131 u32 i, j; 131 u32 i, j;
132 u32 k = 0; 132 u32 k = 0;
133 u32 low;
134 133
135 /* copy base values in obj_info */ 134 /* copy base values in obj_info */
136 for (i = I40IW_HMC_IW_QP, j = 0; 135 for (i = I40IW_HMC_IW_QP, j = 0; i <= I40IW_HMC_IW_PBLE; i++, j += 8) {
137 i <= I40IW_HMC_IW_PBLE; i++, j += 8) { 136 if ((i == I40IW_HMC_IW_SRQ) ||
137 (i == I40IW_HMC_IW_FSIMC) ||
138 (i == I40IW_HMC_IW_FSIAV)) {
139 info[i].base = 0;
140 info[i].cnt = 0;
141 continue;
142 }
138 get_64bit_val(buf, j, &temp); 143 get_64bit_val(buf, j, &temp);
139 info[i].base = RS_64_1(temp, 32) * 512; 144 info[i].base = RS_64_1(temp, 32) * 512;
140 if (info[i].base > base) { 145 if (info[i].base > base) {
141 base = info[i].base; 146 base = info[i].base;
142 k = i; 147 k = i;
143 } 148 }
144 low = (u32)(temp); 149 if (i == I40IW_HMC_IW_APBVT_ENTRY) {
145 if (low) 150 info[i].cnt = 1;
146 info[i].cnt = low; 151 continue;
152 }
153 if (i == I40IW_HMC_IW_QP)
154 info[i].cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_QPS);
155 else if (i == I40IW_HMC_IW_CQ)
156 info[i].cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_CQS);
157 else
158 info[i].cnt = (u32)(temp);
147 } 159 }
148 size = info[k].cnt * info[k].size + info[k].base; 160 size = info[k].cnt * info[k].size + info[k].base;
149 if (size & 0x1FFFFF) 161 if (size & 0x1FFFFF)
@@ -155,6 +167,31 @@ static enum i40iw_status_code i40iw_sc_parse_fpm_commit_buf(
155} 167}
156 168
157/** 169/**
170 * i40iw_sc_decode_fpm_query() - Decode a 64 bit value into max count and size
171 * @buf: ptr to fpm query buffer
172 * @buf_idx: index into buf
173 * @info: ptr to i40iw_hmc_obj_info struct
174 * @rsrc_idx: resource index into info
175 *
176 * Decode a 64 bit value from fpm query buffer into max count and size
177 */
178static u64 i40iw_sc_decode_fpm_query(u64 *buf,
179 u32 buf_idx,
180 struct i40iw_hmc_obj_info *obj_info,
181 u32 rsrc_idx)
182{
183 u64 temp;
184 u32 size;
185
186 get_64bit_val(buf, buf_idx, &temp);
187 obj_info[rsrc_idx].max_cnt = (u32)temp;
188 size = (u32)RS_64_1(temp, 32);
189 obj_info[rsrc_idx].size = LS_64_1(1, size);
190
191 return temp;
192}
193
194/**
158 * i40iw_sc_parse_fpm_query_buf() - parses fpm query buffer 195 * i40iw_sc_parse_fpm_query_buf() - parses fpm query buffer
159 * @buf: ptr to fpm query buffer 196 * @buf: ptr to fpm query buffer
160 * @info: ptr to i40iw_hmc_obj_info struct 197 * @info: ptr to i40iw_hmc_obj_info struct
@@ -168,9 +205,9 @@ static enum i40iw_status_code i40iw_sc_parse_fpm_query_buf(
168 struct i40iw_hmc_info *hmc_info, 205 struct i40iw_hmc_info *hmc_info,
169 struct i40iw_hmc_fpm_misc *hmc_fpm_misc) 206 struct i40iw_hmc_fpm_misc *hmc_fpm_misc)
170{ 207{
171 u64 temp;
172 struct i40iw_hmc_obj_info *obj_info; 208 struct i40iw_hmc_obj_info *obj_info;
173 u32 i, j, size; 209 u64 temp;
210 u32 size;
174 u16 max_pe_sds; 211 u16 max_pe_sds;
175 212
176 obj_info = hmc_info->hmc_obj; 213 obj_info = hmc_info->hmc_obj;
@@ -185,41 +222,52 @@ static enum i40iw_status_code i40iw_sc_parse_fpm_query_buf(
185 hmc_fpm_misc->max_sds = max_pe_sds; 222 hmc_fpm_misc->max_sds = max_pe_sds;
186 hmc_info->sd_table.sd_cnt = max_pe_sds + hmc_info->first_sd_index; 223 hmc_info->sd_table.sd_cnt = max_pe_sds + hmc_info->first_sd_index;
187 224
188 for (i = I40IW_HMC_IW_QP, j = 8; 225 get_64bit_val(buf, 8, &temp);
189 i <= I40IW_HMC_IW_ARP; i++, j += 8) { 226 obj_info[I40IW_HMC_IW_QP].max_cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_QPS);
190 get_64bit_val(buf, j, &temp); 227 size = (u32)RS_64_1(temp, 32);
191 if (i == I40IW_HMC_IW_QP) 228 obj_info[I40IW_HMC_IW_QP].size = LS_64_1(1, size);
192 obj_info[i].max_cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_QPS);
193 else if (i == I40IW_HMC_IW_CQ)
194 obj_info[i].max_cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_CQS);
195 else
196 obj_info[i].max_cnt = (u32)temp;
197 229
198 size = (u32)RS_64_1(temp, 32); 230 get_64bit_val(buf, 16, &temp);
199 obj_info[i].size = ((u64)1 << size); 231 obj_info[I40IW_HMC_IW_CQ].max_cnt = (u32)RS_64(temp, I40IW_QUERY_FPM_MAX_CQS);
200 } 232 size = (u32)RS_64_1(temp, 32);
201 for (i = I40IW_HMC_IW_MR, j = 48; 233 obj_info[I40IW_HMC_IW_CQ].size = LS_64_1(1, size);
202 i <= I40IW_HMC_IW_PBLE; i++, j += 8) { 234
203 get_64bit_val(buf, j, &temp); 235 i40iw_sc_decode_fpm_query(buf, 32, obj_info, I40IW_HMC_IW_HTE);
204 obj_info[i].max_cnt = (u32)temp; 236 i40iw_sc_decode_fpm_query(buf, 40, obj_info, I40IW_HMC_IW_ARP);
205 size = (u32)RS_64_1(temp, 32); 237
206 obj_info[i].size = LS_64_1(1, size); 238 obj_info[I40IW_HMC_IW_APBVT_ENTRY].size = 8192;
207 } 239 obj_info[I40IW_HMC_IW_APBVT_ENTRY].max_cnt = 1;
240
241 i40iw_sc_decode_fpm_query(buf, 48, obj_info, I40IW_HMC_IW_MR);
242 i40iw_sc_decode_fpm_query(buf, 56, obj_info, I40IW_HMC_IW_XF);
208 243
209 get_64bit_val(buf, 120, &temp);
210 hmc_fpm_misc->max_ceqs = (u8)RS_64(temp, I40IW_QUERY_FPM_MAX_CEQS);
211 get_64bit_val(buf, 120, &temp);
212 hmc_fpm_misc->ht_multiplier = RS_64(temp, I40IW_QUERY_FPM_HTMULTIPLIER);
213 get_64bit_val(buf, 120, &temp);
214 hmc_fpm_misc->timer_bucket = RS_64(temp, I40IW_QUERY_FPM_TIMERBUCKET);
215 get_64bit_val(buf, 64, &temp); 244 get_64bit_val(buf, 64, &temp);
245 obj_info[I40IW_HMC_IW_XFFL].max_cnt = (u32)temp;
246 obj_info[I40IW_HMC_IW_XFFL].size = 4;
216 hmc_fpm_misc->xf_block_size = RS_64(temp, I40IW_QUERY_FPM_XFBLOCKSIZE); 247 hmc_fpm_misc->xf_block_size = RS_64(temp, I40IW_QUERY_FPM_XFBLOCKSIZE);
217 if (!hmc_fpm_misc->xf_block_size) 248 if (!hmc_fpm_misc->xf_block_size)
218 return I40IW_ERR_INVALID_SIZE; 249 return I40IW_ERR_INVALID_SIZE;
250
251 i40iw_sc_decode_fpm_query(buf, 72, obj_info, I40IW_HMC_IW_Q1);
252
219 get_64bit_val(buf, 80, &temp); 253 get_64bit_val(buf, 80, &temp);
254 obj_info[I40IW_HMC_IW_Q1FL].max_cnt = (u32)temp;
255 obj_info[I40IW_HMC_IW_Q1FL].size = 4;
220 hmc_fpm_misc->q1_block_size = RS_64(temp, I40IW_QUERY_FPM_Q1BLOCKSIZE); 256 hmc_fpm_misc->q1_block_size = RS_64(temp, I40IW_QUERY_FPM_Q1BLOCKSIZE);
221 if (!hmc_fpm_misc->q1_block_size) 257 if (!hmc_fpm_misc->q1_block_size)
222 return I40IW_ERR_INVALID_SIZE; 258 return I40IW_ERR_INVALID_SIZE;
259
260 i40iw_sc_decode_fpm_query(buf, 88, obj_info, I40IW_HMC_IW_TIMER);
261
262 get_64bit_val(buf, 112, &temp);
263 obj_info[I40IW_HMC_IW_PBLE].max_cnt = (u32)temp;
264 obj_info[I40IW_HMC_IW_PBLE].size = 8;
265
266 get_64bit_val(buf, 120, &temp);
267 hmc_fpm_misc->max_ceqs = (u8)RS_64(temp, I40IW_QUERY_FPM_MAX_CEQS);
268 hmc_fpm_misc->ht_multiplier = RS_64(temp, I40IW_QUERY_FPM_HTMULTIPLIER);
269 hmc_fpm_misc->timer_bucket = RS_64(temp, I40IW_QUERY_FPM_TIMERBUCKET);
270
223 return 0; 271 return 0;
224} 272}
225 273
@@ -3392,13 +3440,6 @@ enum i40iw_status_code i40iw_sc_init_iw_hmc(struct i40iw_sc_dev *dev, u8 hmc_fn_
3392 hmc_info->sd_table.sd_entry = virt_mem.va; 3440 hmc_info->sd_table.sd_entry = virt_mem.va;
3393 } 3441 }
3394 3442
3395 /* fill size of objects which are fixed */
3396 hmc_info->hmc_obj[I40IW_HMC_IW_XFFL].size = 4;
3397 hmc_info->hmc_obj[I40IW_HMC_IW_Q1FL].size = 4;
3398 hmc_info->hmc_obj[I40IW_HMC_IW_PBLE].size = 8;
3399 hmc_info->hmc_obj[I40IW_HMC_IW_APBVT_ENTRY].size = 8192;
3400 hmc_info->hmc_obj[I40IW_HMC_IW_APBVT_ENTRY].max_cnt = 1;
3401
3402 return ret_code; 3443 return ret_code;
3403} 3444}
3404 3445
@@ -4840,7 +4881,7 @@ void i40iw_vsi_stats_free(struct i40iw_sc_vsi *vsi)
4840{ 4881{
4841 u8 fcn_id = vsi->fcn_id; 4882 u8 fcn_id = vsi->fcn_id;
4842 4883
4843 if ((vsi->stats_fcn_id_alloc) && (fcn_id != I40IW_INVALID_FCN_ID)) 4884 if (vsi->stats_fcn_id_alloc && fcn_id < I40IW_MAX_STATS_COUNT)
4844 vsi->dev->fcn_id_array[fcn_id] = false; 4885 vsi->dev->fcn_id_array[fcn_id] = false;
4845 i40iw_hw_stats_stop_timer(vsi); 4886 i40iw_hw_stats_stop_timer(vsi);
4846} 4887}
diff --git a/drivers/infiniband/hw/i40iw/i40iw_d.h b/drivers/infiniband/hw/i40iw/i40iw_d.h
index a39ac12b6a7e..2ebaadbed379 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_d.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_d.h
@@ -1507,8 +1507,8 @@ enum {
1507 I40IW_CQ0_ALIGNMENT_MASK = (256 - 1), 1507 I40IW_CQ0_ALIGNMENT_MASK = (256 - 1),
1508 I40IW_HOST_CTX_ALIGNMENT_MASK = (4 - 1), 1508 I40IW_HOST_CTX_ALIGNMENT_MASK = (4 - 1),
1509 I40IW_SHADOWAREA_MASK = (128 - 1), 1509 I40IW_SHADOWAREA_MASK = (128 - 1),
1510 I40IW_FPM_QUERY_BUF_ALIGNMENT_MASK = 0, 1510 I40IW_FPM_QUERY_BUF_ALIGNMENT_MASK = (4 - 1),
1511 I40IW_FPM_COMMIT_BUF_ALIGNMENT_MASK = 0 1511 I40IW_FPM_COMMIT_BUF_ALIGNMENT_MASK = (4 - 1)
1512}; 1512};
1513 1513
1514enum i40iw_alignment { 1514enum i40iw_alignment {
diff --git a/drivers/infiniband/hw/i40iw/i40iw_puda.c b/drivers/infiniband/hw/i40iw/i40iw_puda.c
index 71050c5d29a0..7f5583d83622 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_puda.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_puda.c
@@ -685,7 +685,7 @@ static enum i40iw_status_code i40iw_puda_cq_create(struct i40iw_puda_rsrc *rsrc)
685 cqsize = rsrc->cq_size * (sizeof(struct i40iw_cqe)); 685 cqsize = rsrc->cq_size * (sizeof(struct i40iw_cqe));
686 tsize = cqsize + sizeof(struct i40iw_cq_shadow_area); 686 tsize = cqsize + sizeof(struct i40iw_cq_shadow_area);
687 ret = i40iw_allocate_dma_mem(dev->hw, &rsrc->cqmem, tsize, 687 ret = i40iw_allocate_dma_mem(dev->hw, &rsrc->cqmem, tsize,
688 I40IW_CQ0_ALIGNMENT_MASK); 688 I40IW_CQ0_ALIGNMENT);
689 if (ret) 689 if (ret)
690 return ret; 690 return ret;
691 691
diff --git a/drivers/infiniband/hw/i40iw/i40iw_status.h b/drivers/infiniband/hw/i40iw/i40iw_status.h
index 91c421762f06..f7013f11d808 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_status.h
+++ b/drivers/infiniband/hw/i40iw/i40iw_status.h
@@ -62,7 +62,7 @@ enum i40iw_status_code {
62 I40IW_ERR_INVALID_ALIGNMENT = -23, 62 I40IW_ERR_INVALID_ALIGNMENT = -23,
63 I40IW_ERR_FLUSHED_QUEUE = -24, 63 I40IW_ERR_FLUSHED_QUEUE = -24,
64 I40IW_ERR_INVALID_PUSH_PAGE_INDEX = -25, 64 I40IW_ERR_INVALID_PUSH_PAGE_INDEX = -25,
65 I40IW_ERR_INVALID_IMM_DATA_SIZE = -26, 65 I40IW_ERR_INVALID_INLINE_DATA_SIZE = -26,
66 I40IW_ERR_TIMEOUT = -27, 66 I40IW_ERR_TIMEOUT = -27,
67 I40IW_ERR_OPCODE_MISMATCH = -28, 67 I40IW_ERR_OPCODE_MISMATCH = -28,
68 I40IW_ERR_CQP_COMPL_ERROR = -29, 68 I40IW_ERR_CQP_COMPL_ERROR = -29,
diff --git a/drivers/infiniband/hw/i40iw/i40iw_uk.c b/drivers/infiniband/hw/i40iw/i40iw_uk.c
index b0d3a0e8a9b5..1060725d18bc 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_uk.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_uk.c
@@ -435,7 +435,7 @@ static enum i40iw_status_code i40iw_inline_rdma_write(struct i40iw_qp_uk *qp,
435 435
436 op_info = &info->op.inline_rdma_write; 436 op_info = &info->op.inline_rdma_write;
437 if (op_info->len > I40IW_MAX_INLINE_DATA_SIZE) 437 if (op_info->len > I40IW_MAX_INLINE_DATA_SIZE)
438 return I40IW_ERR_INVALID_IMM_DATA_SIZE; 438 return I40IW_ERR_INVALID_INLINE_DATA_SIZE;
439 439
440 ret_code = i40iw_inline_data_size_to_wqesize(op_info->len, &wqe_size); 440 ret_code = i40iw_inline_data_size_to_wqesize(op_info->len, &wqe_size);
441 if (ret_code) 441 if (ret_code)
@@ -511,7 +511,7 @@ static enum i40iw_status_code i40iw_inline_send(struct i40iw_qp_uk *qp,
511 511
512 op_info = &info->op.inline_send; 512 op_info = &info->op.inline_send;
513 if (op_info->len > I40IW_MAX_INLINE_DATA_SIZE) 513 if (op_info->len > I40IW_MAX_INLINE_DATA_SIZE)
514 return I40IW_ERR_INVALID_IMM_DATA_SIZE; 514 return I40IW_ERR_INVALID_INLINE_DATA_SIZE;
515 515
516 ret_code = i40iw_inline_data_size_to_wqesize(op_info->len, &wqe_size); 516 ret_code = i40iw_inline_data_size_to_wqesize(op_info->len, &wqe_size);
517 if (ret_code) 517 if (ret_code)
@@ -784,7 +784,7 @@ static enum i40iw_status_code i40iw_cq_poll_completion(struct i40iw_cq_uk *cq,
784 get_64bit_val(cqe, 0, &qword0); 784 get_64bit_val(cqe, 0, &qword0);
785 get_64bit_val(cqe, 16, &qword2); 785 get_64bit_val(cqe, 16, &qword2);
786 786
787 info->tcp_seq_num = (u8)RS_64(qword0, I40IWCQ_TCPSEQNUM); 787 info->tcp_seq_num = (u32)RS_64(qword0, I40IWCQ_TCPSEQNUM);
788 788
789 info->qp_id = (u32)RS_64(qword2, I40IWCQ_QPID); 789 info->qp_id = (u32)RS_64(qword2, I40IWCQ_QPID);
790 790
@@ -1187,7 +1187,7 @@ enum i40iw_status_code i40iw_inline_data_size_to_wqesize(u32 data_size,
1187 u8 *wqe_size) 1187 u8 *wqe_size)
1188{ 1188{
1189 if (data_size > I40IW_MAX_INLINE_DATA_SIZE) 1189 if (data_size > I40IW_MAX_INLINE_DATA_SIZE)
1190 return I40IW_ERR_INVALID_IMM_DATA_SIZE; 1190 return I40IW_ERR_INVALID_INLINE_DATA_SIZE;
1191 1191
1192 if (data_size <= 16) 1192 if (data_size <= 16)
1193 *wqe_size = I40IW_QP_WQE_MIN_SIZE; 1193 *wqe_size = I40IW_QP_WQE_MIN_SIZE;
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index a7f2e60085c4..f7fcde1ff0aa 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -1085,6 +1085,12 @@ static int mlx5_ib_modify_port(struct ib_device *ibdev, u8 port, int mask,
1085 bool is_ib = (mlx5_ib_port_link_layer(ibdev, port) == 1085 bool is_ib = (mlx5_ib_port_link_layer(ibdev, port) ==
1086 IB_LINK_LAYER_INFINIBAND); 1086 IB_LINK_LAYER_INFINIBAND);
1087 1087
1088 /* CM layer calls ib_modify_port() regardless of the link layer. For
1089 * Ethernet ports, qkey violation and Port capabilities are meaningless.
1090 */
1091 if (!is_ib)
1092 return 0;
1093
1088 if (MLX5_CAP_GEN(dev->mdev, ib_virt) && is_ib) { 1094 if (MLX5_CAP_GEN(dev->mdev, ib_virt) && is_ib) {
1089 change_mask = props->clr_port_cap_mask | props->set_port_cap_mask; 1095 change_mask = props->clr_port_cap_mask | props->set_port_cap_mask;
1090 value = ~props->clr_port_cap_mask | props->set_port_cap_mask; 1096 value = ~props->clr_port_cap_mask | props->set_port_cap_mask;
diff --git a/drivers/infiniband/hw/mlx5/odp.c b/drivers/infiniband/hw/mlx5/odp.c
index ae0746754008..3d701c7a4c91 100644
--- a/drivers/infiniband/hw/mlx5/odp.c
+++ b/drivers/infiniband/hw/mlx5/odp.c
@@ -939,7 +939,7 @@ static int mlx5_ib_mr_initiator_pfault_handler(
939 939
940 if (qp->ibqp.qp_type != IB_QPT_RC) { 940 if (qp->ibqp.qp_type != IB_QPT_RC) {
941 av = *wqe; 941 av = *wqe;
942 if (av->dqp_dct & be32_to_cpu(MLX5_WQE_AV_EXT)) 942 if (av->dqp_dct & cpu_to_be32(MLX5_EXTENDED_UD_AV))
943 *wqe += sizeof(struct mlx5_av); 943 *wqe += sizeof(struct mlx5_av);
944 else 944 else
945 *wqe += sizeof(struct mlx5_base_av); 945 *wqe += sizeof(struct mlx5_base_av);
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index 0889ff367c86..f58f8f5f3ebe 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -1238,6 +1238,7 @@ static int create_raw_packet_qp(struct mlx5_ib_dev *dev, struct mlx5_ib_qp *qp,
1238 goto err_destroy_tis; 1238 goto err_destroy_tis;
1239 1239
1240 sq->base.container_mibqp = qp; 1240 sq->base.container_mibqp = qp;
1241 sq->base.mqp.event = mlx5_ib_qp_event;
1241 } 1242 }
1242 1243
1243 if (qp->rq.wqe_cnt) { 1244 if (qp->rq.wqe_cnt) {
diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c
index 69bda611d313..90aa326fd7c0 100644
--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c
+++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_cq.c
@@ -65,13 +65,28 @@ int pvrdma_req_notify_cq(struct ib_cq *ibcq,
65 struct pvrdma_dev *dev = to_vdev(ibcq->device); 65 struct pvrdma_dev *dev = to_vdev(ibcq->device);
66 struct pvrdma_cq *cq = to_vcq(ibcq); 66 struct pvrdma_cq *cq = to_vcq(ibcq);
67 u32 val = cq->cq_handle; 67 u32 val = cq->cq_handle;
68 unsigned long flags;
69 int has_data = 0;
68 70
69 val |= (notify_flags & IB_CQ_SOLICITED_MASK) == IB_CQ_SOLICITED ? 71 val |= (notify_flags & IB_CQ_SOLICITED_MASK) == IB_CQ_SOLICITED ?
70 PVRDMA_UAR_CQ_ARM_SOL : PVRDMA_UAR_CQ_ARM; 72 PVRDMA_UAR_CQ_ARM_SOL : PVRDMA_UAR_CQ_ARM;
71 73
74 spin_lock_irqsave(&cq->cq_lock, flags);
75
72 pvrdma_write_uar_cq(dev, val); 76 pvrdma_write_uar_cq(dev, val);
73 77
74 return 0; 78 if (notify_flags & IB_CQ_REPORT_MISSED_EVENTS) {
79 unsigned int head;
80
81 has_data = pvrdma_idx_ring_has_data(&cq->ring_state->rx,
82 cq->ibcq.cqe, &head);
83 if (unlikely(has_data == PVRDMA_INVALID_IDX))
84 dev_err(&dev->pdev->dev, "CQ ring state invalid\n");
85 }
86
87 spin_unlock_irqrestore(&cq->cq_lock, flags);
88
89 return has_data;
75} 90}
76 91
77/** 92/**
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index ff50a7bd66d8..7ac25059c40f 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -336,6 +336,7 @@ struct ipoib_dev_priv {
336 unsigned long flags; 336 unsigned long flags;
337 337
338 struct rw_semaphore vlan_rwsem; 338 struct rw_semaphore vlan_rwsem;
339 struct mutex mcast_mutex;
339 340
340 struct rb_root path_tree; 341 struct rb_root path_tree;
341 struct list_head path_list; 342 struct list_head path_list;
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index f87d104837dc..d69410c2ed97 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -511,7 +511,6 @@ static int ipoib_cm_rx_handler(struct ib_cm_id *cm_id,
511 case IB_CM_REQ_RECEIVED: 511 case IB_CM_REQ_RECEIVED:
512 return ipoib_cm_req_handler(cm_id, event); 512 return ipoib_cm_req_handler(cm_id, event);
513 case IB_CM_DREQ_RECEIVED: 513 case IB_CM_DREQ_RECEIVED:
514 p = cm_id->context;
515 ib_send_cm_drep(cm_id, NULL, 0); 514 ib_send_cm_drep(cm_id, NULL, 0);
516 /* Fall through */ 515 /* Fall through */
517 case IB_CM_REJ_RECEIVED: 516 case IB_CM_REJ_RECEIVED:
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
index 7871379342f4..184a22f48027 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c
@@ -52,7 +52,8 @@ static const struct ipoib_stats ipoib_gstrings_stats[] = {
52 IPOIB_NETDEV_STAT(tx_bytes), 52 IPOIB_NETDEV_STAT(tx_bytes),
53 IPOIB_NETDEV_STAT(tx_errors), 53 IPOIB_NETDEV_STAT(tx_errors),
54 IPOIB_NETDEV_STAT(rx_dropped), 54 IPOIB_NETDEV_STAT(rx_dropped),
55 IPOIB_NETDEV_STAT(tx_dropped) 55 IPOIB_NETDEV_STAT(tx_dropped),
56 IPOIB_NETDEV_STAT(multicast),
56}; 57};
57 58
58#define IPOIB_GLOBAL_STATS_LEN ARRAY_SIZE(ipoib_gstrings_stats) 59#define IPOIB_GLOBAL_STATS_LEN ARRAY_SIZE(ipoib_gstrings_stats)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 57a9655e844d..2e075377242e 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -256,6 +256,8 @@ static void ipoib_ib_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
256 256
257 ++dev->stats.rx_packets; 257 ++dev->stats.rx_packets;
258 dev->stats.rx_bytes += skb->len; 258 dev->stats.rx_bytes += skb->len;
259 if (skb->pkt_type == PACKET_MULTICAST)
260 dev->stats.multicast++;
259 261
260 skb->dev = dev; 262 skb->dev = dev;
261 if ((dev->features & NETIF_F_RXCSUM) && 263 if ((dev->features & NETIF_F_RXCSUM) &&
@@ -709,6 +711,27 @@ static int recvs_pending(struct net_device *dev)
709 return pending; 711 return pending;
710} 712}
711 713
714static void check_qp_movement_and_print(struct ipoib_dev_priv *priv,
715 struct ib_qp *qp,
716 enum ib_qp_state new_state)
717{
718 struct ib_qp_attr qp_attr;
719 struct ib_qp_init_attr query_init_attr;
720 int ret;
721
722 ret = ib_query_qp(qp, &qp_attr, IB_QP_STATE, &query_init_attr);
723 if (ret) {
724 ipoib_warn(priv, "%s: Failed to query QP\n", __func__);
725 return;
726 }
727 /* print according to the new-state and the previous state.*/
728 if (new_state == IB_QPS_ERR && qp_attr.qp_state == IB_QPS_RESET)
729 ipoib_dbg(priv, "Failed modify QP, IB_QPS_RESET to IB_QPS_ERR, acceptable\n");
730 else
731 ipoib_warn(priv, "Failed to modify QP to state: %d from state: %d\n",
732 new_state, qp_attr.qp_state);
733}
734
712int ipoib_ib_dev_stop_default(struct net_device *dev) 735int ipoib_ib_dev_stop_default(struct net_device *dev)
713{ 736{
714 struct ipoib_dev_priv *priv = ipoib_priv(dev); 737 struct ipoib_dev_priv *priv = ipoib_priv(dev);
@@ -728,7 +751,7 @@ int ipoib_ib_dev_stop_default(struct net_device *dev)
728 */ 751 */
729 qp_attr.qp_state = IB_QPS_ERR; 752 qp_attr.qp_state = IB_QPS_ERR;
730 if (ib_modify_qp(priv->qp, &qp_attr, IB_QP_STATE)) 753 if (ib_modify_qp(priv->qp, &qp_attr, IB_QP_STATE))
731 ipoib_warn(priv, "Failed to modify QP to ERROR state\n"); 754 check_qp_movement_and_print(priv, priv->qp, IB_QPS_ERR);
732 755
733 /* Wait for all sends and receives to complete */ 756 /* Wait for all sends and receives to complete */
734 begin = jiffies; 757 begin = jiffies;
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 4ce315c92b48..6c77df34869d 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1560,6 +1560,7 @@ static void ipoib_flush_neighs(struct ipoib_dev_priv *priv)
1560 int i, wait_flushed = 0; 1560 int i, wait_flushed = 0;
1561 1561
1562 init_completion(&priv->ntbl.flushed); 1562 init_completion(&priv->ntbl.flushed);
1563 set_bit(IPOIB_NEIGH_TBL_FLUSH, &priv->flags);
1563 1564
1564 spin_lock_irqsave(&priv->lock, flags); 1565 spin_lock_irqsave(&priv->lock, flags);
1565 1566
@@ -1604,7 +1605,6 @@ static void ipoib_neigh_hash_uninit(struct net_device *dev)
1604 1605
1605 ipoib_dbg(priv, "ipoib_neigh_hash_uninit\n"); 1606 ipoib_dbg(priv, "ipoib_neigh_hash_uninit\n");
1606 init_completion(&priv->ntbl.deleted); 1607 init_completion(&priv->ntbl.deleted);
1607 set_bit(IPOIB_NEIGH_TBL_FLUSH, &priv->flags);
1608 1608
1609 /* Stop GC if called at init fail need to cancel work */ 1609 /* Stop GC if called at init fail need to cancel work */
1610 stopped = test_and_set_bit(IPOIB_STOP_NEIGH_GC, &priv->flags); 1610 stopped = test_and_set_bit(IPOIB_STOP_NEIGH_GC, &priv->flags);
@@ -1847,6 +1847,7 @@ static const struct net_device_ops ipoib_netdev_ops_vf = {
1847 .ndo_tx_timeout = ipoib_timeout, 1847 .ndo_tx_timeout = ipoib_timeout,
1848 .ndo_set_rx_mode = ipoib_set_mcast_list, 1848 .ndo_set_rx_mode = ipoib_set_mcast_list,
1849 .ndo_get_iflink = ipoib_get_iflink, 1849 .ndo_get_iflink = ipoib_get_iflink,
1850 .ndo_get_stats64 = ipoib_get_stats,
1850}; 1851};
1851 1852
1852void ipoib_setup_common(struct net_device *dev) 1853void ipoib_setup_common(struct net_device *dev)
@@ -1877,6 +1878,7 @@ static void ipoib_build_priv(struct net_device *dev)
1877 priv->dev = dev; 1878 priv->dev = dev;
1878 spin_lock_init(&priv->lock); 1879 spin_lock_init(&priv->lock);
1879 init_rwsem(&priv->vlan_rwsem); 1880 init_rwsem(&priv->vlan_rwsem);
1881 mutex_init(&priv->mcast_mutex);
1880 1882
1881 INIT_LIST_HEAD(&priv->path_list); 1883 INIT_LIST_HEAD(&priv->path_list);
1882 INIT_LIST_HEAD(&priv->child_intfs); 1884 INIT_LIST_HEAD(&priv->child_intfs);
@@ -2173,14 +2175,14 @@ static struct net_device *ipoib_add_port(const char *format,
2173 priv->dev->dev_id = port - 1; 2175 priv->dev->dev_id = port - 1;
2174 2176
2175 result = ib_query_port(hca, port, &attr); 2177 result = ib_query_port(hca, port, &attr);
2176 if (!result) 2178 if (result) {
2177 priv->max_ib_mtu = ib_mtu_enum_to_int(attr.max_mtu);
2178 else {
2179 printk(KERN_WARNING "%s: ib_query_port %d failed\n", 2179 printk(KERN_WARNING "%s: ib_query_port %d failed\n",
2180 hca->name, port); 2180 hca->name, port);
2181 goto device_init_failed; 2181 goto device_init_failed;
2182 } 2182 }
2183 2183
2184 priv->max_ib_mtu = ib_mtu_enum_to_int(attr.max_mtu);
2185
2184 /* MTU will be reset when mcast join happens */ 2186 /* MTU will be reset when mcast join happens */
2185 priv->dev->mtu = IPOIB_UD_MTU(priv->max_ib_mtu); 2187 priv->dev->mtu = IPOIB_UD_MTU(priv->max_ib_mtu);
2186 priv->mcast_mtu = priv->admin_mtu = priv->dev->mtu; 2188 priv->mcast_mtu = priv->admin_mtu = priv->dev->mtu;
@@ -2211,12 +2213,14 @@ static struct net_device *ipoib_add_port(const char *format,
2211 printk(KERN_WARNING "%s: ib_query_gid port %d failed (ret = %d)\n", 2213 printk(KERN_WARNING "%s: ib_query_gid port %d failed (ret = %d)\n",
2212 hca->name, port, result); 2214 hca->name, port, result);
2213 goto device_init_failed; 2215 goto device_init_failed;
2214 } else 2216 }
2215 memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw, sizeof (union ib_gid)); 2217
2218 memcpy(priv->dev->dev_addr + 4, priv->local_gid.raw,
2219 sizeof(union ib_gid));
2216 set_bit(IPOIB_FLAG_DEV_ADDR_SET, &priv->flags); 2220 set_bit(IPOIB_FLAG_DEV_ADDR_SET, &priv->flags);
2217 2221
2218 result = ipoib_dev_init(priv->dev, hca, port); 2222 result = ipoib_dev_init(priv->dev, hca, port);
2219 if (result < 0) { 2223 if (result) {
2220 printk(KERN_WARNING "%s: failed to initialize port %d (ret = %d)\n", 2224 printk(KERN_WARNING "%s: failed to initialize port %d (ret = %d)\n",
2221 hca->name, port, result); 2225 hca->name, port, result);
2222 goto device_init_failed; 2226 goto device_init_failed;
@@ -2365,6 +2369,7 @@ static int __init ipoib_init_module(void)
2365 ipoib_sendq_size = max3(ipoib_sendq_size, 2 * MAX_SEND_CQE, IPOIB_MIN_QUEUE_SIZE); 2369 ipoib_sendq_size = max3(ipoib_sendq_size, 2 * MAX_SEND_CQE, IPOIB_MIN_QUEUE_SIZE);
2366#ifdef CONFIG_INFINIBAND_IPOIB_CM 2370#ifdef CONFIG_INFINIBAND_IPOIB_CM
2367 ipoib_max_conn_qp = min(ipoib_max_conn_qp, IPOIB_CM_MAX_CONN_QP); 2371 ipoib_max_conn_qp = min(ipoib_max_conn_qp, IPOIB_CM_MAX_CONN_QP);
2372 ipoib_max_conn_qp = max(ipoib_max_conn_qp, 0);
2368#endif 2373#endif
2369 2374
2370 /* 2375 /*
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 057f58e6afca..93e149efc1f5 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -684,15 +684,10 @@ void ipoib_mcast_start_thread(struct net_device *dev)
684int ipoib_mcast_stop_thread(struct net_device *dev) 684int ipoib_mcast_stop_thread(struct net_device *dev)
685{ 685{
686 struct ipoib_dev_priv *priv = ipoib_priv(dev); 686 struct ipoib_dev_priv *priv = ipoib_priv(dev);
687 unsigned long flags;
688 687
689 ipoib_dbg_mcast(priv, "stopping multicast thread\n"); 688 ipoib_dbg_mcast(priv, "stopping multicast thread\n");
690 689
691 spin_lock_irqsave(&priv->lock, flags); 690 cancel_delayed_work_sync(&priv->mcast_task);
692 cancel_delayed_work(&priv->mcast_task);
693 spin_unlock_irqrestore(&priv->lock, flags);
694
695 flush_workqueue(priv->wq);
696 691
697 return 0; 692 return 0;
698} 693}
@@ -748,6 +743,14 @@ void ipoib_mcast_remove_list(struct list_head *remove_list)
748{ 743{
749 struct ipoib_mcast *mcast, *tmcast; 744 struct ipoib_mcast *mcast, *tmcast;
750 745
746 /*
747 * make sure the in-flight joins have finished before we attempt
748 * to leave
749 */
750 list_for_each_entry_safe(mcast, tmcast, remove_list, list)
751 if (test_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
752 wait_for_completion(&mcast->done);
753
751 list_for_each_entry_safe(mcast, tmcast, remove_list, list) { 754 list_for_each_entry_safe(mcast, tmcast, remove_list, list) {
752 ipoib_mcast_leave(mcast->dev, mcast); 755 ipoib_mcast_leave(mcast->dev, mcast);
753 ipoib_mcast_free(mcast); 756 ipoib_mcast_free(mcast);
@@ -838,6 +841,7 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
838 struct ipoib_mcast *mcast, *tmcast; 841 struct ipoib_mcast *mcast, *tmcast;
839 unsigned long flags; 842 unsigned long flags;
840 843
844 mutex_lock(&priv->mcast_mutex);
841 ipoib_dbg_mcast(priv, "flushing multicast list\n"); 845 ipoib_dbg_mcast(priv, "flushing multicast list\n");
842 846
843 spin_lock_irqsave(&priv->lock, flags); 847 spin_lock_irqsave(&priv->lock, flags);
@@ -856,15 +860,8 @@ void ipoib_mcast_dev_flush(struct net_device *dev)
856 860
857 spin_unlock_irqrestore(&priv->lock, flags); 861 spin_unlock_irqrestore(&priv->lock, flags);
858 862
859 /*
860 * make sure the in-flight joins have finished before we attempt
861 * to leave
862 */
863 list_for_each_entry_safe(mcast, tmcast, &remove_list, list)
864 if (test_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
865 wait_for_completion(&mcast->done);
866
867 ipoib_mcast_remove_list(&remove_list); 863 ipoib_mcast_remove_list(&remove_list);
864 mutex_unlock(&priv->mcast_mutex);
868} 865}
869 866
870static int ipoib_mcast_addr_is_valid(const u8 *addr, const u8 *broadcast) 867static int ipoib_mcast_addr_is_valid(const u8 *addr, const u8 *broadcast)
@@ -982,14 +979,6 @@ void ipoib_mcast_restart_task(struct work_struct *work)
982 netif_addr_unlock(dev); 979 netif_addr_unlock(dev);
983 local_irq_restore(flags); 980 local_irq_restore(flags);
984 981
985 /*
986 * make sure the in-flight joins have finished before we attempt
987 * to leave
988 */
989 list_for_each_entry_safe(mcast, tmcast, &remove_list, list)
990 if (test_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags))
991 wait_for_completion(&mcast->done);
992
993 ipoib_mcast_remove_list(&remove_list); 982 ipoib_mcast_remove_list(&remove_list);
994 983
995 /* 984 /*
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index f600f3a7a3c6..23520df7650f 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -331,7 +331,7 @@ static int soc_button_probe(struct platform_device *pdev)
331 error = gpiod_count(dev, NULL); 331 error = gpiod_count(dev, NULL);
332 if (error < 0) { 332 if (error < 0) {
333 dev_dbg(dev, "no GPIO attached, ignoring...\n"); 333 dev_dbg(dev, "no GPIO attached, ignoring...\n");
334 return error; 334 return -ENODEV;
335 } 335 }
336 336
337 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 337 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index 262d1057c1da..850b00e3ad8e 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1215,14 +1215,24 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
1215 1215
1216 case SS4_PACKET_ID_TWO: 1216 case SS4_PACKET_ID_TWO:
1217 if (priv->flags & ALPS_BUTTONPAD) { 1217 if (priv->flags & ALPS_BUTTONPAD) {
1218 f->mt[0].x = SS4_BTL_MF_X_V2(p, 0); 1218 if (IS_SS4PLUS_DEV(priv->dev_id)) {
1219 f->mt[0].x = SS4_PLUS_BTL_MF_X_V2(p, 0);
1220 f->mt[1].x = SS4_PLUS_BTL_MF_X_V2(p, 1);
1221 } else {
1222 f->mt[0].x = SS4_BTL_MF_X_V2(p, 0);
1223 f->mt[1].x = SS4_BTL_MF_X_V2(p, 1);
1224 }
1219 f->mt[0].y = SS4_BTL_MF_Y_V2(p, 0); 1225 f->mt[0].y = SS4_BTL_MF_Y_V2(p, 0);
1220 f->mt[1].x = SS4_BTL_MF_X_V2(p, 1);
1221 f->mt[1].y = SS4_BTL_MF_Y_V2(p, 1); 1226 f->mt[1].y = SS4_BTL_MF_Y_V2(p, 1);
1222 } else { 1227 } else {
1223 f->mt[0].x = SS4_STD_MF_X_V2(p, 0); 1228 if (IS_SS4PLUS_DEV(priv->dev_id)) {
1229 f->mt[0].x = SS4_PLUS_STD_MF_X_V2(p, 0);
1230 f->mt[1].x = SS4_PLUS_STD_MF_X_V2(p, 1);
1231 } else {
1232 f->mt[0].x = SS4_STD_MF_X_V2(p, 0);
1233 f->mt[1].x = SS4_STD_MF_X_V2(p, 1);
1234 }
1224 f->mt[0].y = SS4_STD_MF_Y_V2(p, 0); 1235 f->mt[0].y = SS4_STD_MF_Y_V2(p, 0);
1225 f->mt[1].x = SS4_STD_MF_X_V2(p, 1);
1226 f->mt[1].y = SS4_STD_MF_Y_V2(p, 1); 1236 f->mt[1].y = SS4_STD_MF_Y_V2(p, 1);
1227 } 1237 }
1228 f->pressure = SS4_MF_Z_V2(p, 0) ? 0x30 : 0; 1238 f->pressure = SS4_MF_Z_V2(p, 0) ? 0x30 : 0;
@@ -1239,16 +1249,27 @@ static int alps_decode_ss4_v2(struct alps_fields *f,
1239 1249
1240 case SS4_PACKET_ID_MULTI: 1250 case SS4_PACKET_ID_MULTI:
1241 if (priv->flags & ALPS_BUTTONPAD) { 1251 if (priv->flags & ALPS_BUTTONPAD) {
1242 f->mt[2].x = SS4_BTL_MF_X_V2(p, 0); 1252 if (IS_SS4PLUS_DEV(priv->dev_id)) {
1253 f->mt[0].x = SS4_PLUS_BTL_MF_X_V2(p, 0);
1254 f->mt[1].x = SS4_PLUS_BTL_MF_X_V2(p, 1);
1255 } else {
1256 f->mt[2].x = SS4_BTL_MF_X_V2(p, 0);
1257 f->mt[3].x = SS4_BTL_MF_X_V2(p, 1);
1258 }
1259
1243 f->mt[2].y = SS4_BTL_MF_Y_V2(p, 0); 1260 f->mt[2].y = SS4_BTL_MF_Y_V2(p, 0);
1244 f->mt[3].x = SS4_BTL_MF_X_V2(p, 1);
1245 f->mt[3].y = SS4_BTL_MF_Y_V2(p, 1); 1261 f->mt[3].y = SS4_BTL_MF_Y_V2(p, 1);
1246 no_data_x = SS4_MFPACKET_NO_AX_BL; 1262 no_data_x = SS4_MFPACKET_NO_AX_BL;
1247 no_data_y = SS4_MFPACKET_NO_AY_BL; 1263 no_data_y = SS4_MFPACKET_NO_AY_BL;
1248 } else { 1264 } else {
1249 f->mt[2].x = SS4_STD_MF_X_V2(p, 0); 1265 if (IS_SS4PLUS_DEV(priv->dev_id)) {
1266 f->mt[0].x = SS4_PLUS_STD_MF_X_V2(p, 0);
1267 f->mt[1].x = SS4_PLUS_STD_MF_X_V2(p, 1);
1268 } else {
1269 f->mt[0].x = SS4_STD_MF_X_V2(p, 0);
1270 f->mt[1].x = SS4_STD_MF_X_V2(p, 1);
1271 }
1250 f->mt[2].y = SS4_STD_MF_Y_V2(p, 0); 1272 f->mt[2].y = SS4_STD_MF_Y_V2(p, 0);
1251 f->mt[3].x = SS4_STD_MF_X_V2(p, 1);
1252 f->mt[3].y = SS4_STD_MF_Y_V2(p, 1); 1273 f->mt[3].y = SS4_STD_MF_Y_V2(p, 1);
1253 no_data_x = SS4_MFPACKET_NO_AX; 1274 no_data_x = SS4_MFPACKET_NO_AX;
1254 no_data_y = SS4_MFPACKET_NO_AY; 1275 no_data_y = SS4_MFPACKET_NO_AY;
@@ -2541,8 +2562,8 @@ static int alps_set_defaults_ss4_v2(struct psmouse *psmouse,
2541 2562
2542 memset(otp, 0, sizeof(otp)); 2563 memset(otp, 0, sizeof(otp));
2543 2564
2544 if (alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]) || 2565 if (alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0]) ||
2545 alps_get_otp_values_ss4_v2(psmouse, 1, &otp[1][0])) 2566 alps_get_otp_values_ss4_v2(psmouse, 0, &otp[0][0]))
2546 return -1; 2567 return -1;
2547 2568
2548 alps_update_device_area_ss4_v2(otp, priv); 2569 alps_update_device_area_ss4_v2(otp, priv);
diff --git a/drivers/input/mouse/alps.h b/drivers/input/mouse/alps.h
index ed2d6879fa52..c80a7c76cb76 100644
--- a/drivers/input/mouse/alps.h
+++ b/drivers/input/mouse/alps.h
@@ -100,6 +100,10 @@ enum SS4_PACKET_ID {
100 ((_b[1 + _i * 3] << 5) & 0x1F00) \ 100 ((_b[1 + _i * 3] << 5) & 0x1F00) \
101 ) 101 )
102 102
103#define SS4_PLUS_STD_MF_X_V2(_b, _i) (((_b[0 + (_i) * 3] << 4) & 0x0070) | \
104 ((_b[1 + (_i) * 3] << 4) & 0x0F80) \
105 )
106
103#define SS4_STD_MF_Y_V2(_b, _i) (((_b[1 + (_i) * 3] << 3) & 0x0010) | \ 107#define SS4_STD_MF_Y_V2(_b, _i) (((_b[1 + (_i) * 3] << 3) & 0x0010) | \
104 ((_b[2 + (_i) * 3] << 5) & 0x01E0) | \ 108 ((_b[2 + (_i) * 3] << 5) & 0x01E0) | \
105 ((_b[2 + (_i) * 3] << 4) & 0x0E00) \ 109 ((_b[2 + (_i) * 3] << 4) & 0x0E00) \
@@ -109,6 +113,10 @@ enum SS4_PACKET_ID {
109 ((_b[0 + (_i) * 3] >> 3) & 0x0010) \ 113 ((_b[0 + (_i) * 3] >> 3) & 0x0010) \
110 ) 114 )
111 115
116#define SS4_PLUS_BTL_MF_X_V2(_b, _i) (SS4_PLUS_STD_MF_X_V2(_b, _i) | \
117 ((_b[0 + (_i) * 3] >> 4) & 0x0008) \
118 )
119
112#define SS4_BTL_MF_Y_V2(_b, _i) (SS4_STD_MF_Y_V2(_b, _i) | \ 120#define SS4_BTL_MF_Y_V2(_b, _i) (SS4_STD_MF_Y_V2(_b, _i) | \
113 ((_b[0 + (_i) * 3] >> 3) & 0x0008) \ 121 ((_b[0 + (_i) * 3] >> 3) & 0x0008) \
114 ) 122 )
diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c
index 3b616cb7c67f..cfbc8ba4c96c 100644
--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -1247,7 +1247,12 @@ static const struct acpi_device_id elan_acpi_id[] = {
1247 { "ELAN0000", 0 }, 1247 { "ELAN0000", 0 },
1248 { "ELAN0100", 0 }, 1248 { "ELAN0100", 0 },
1249 { "ELAN0600", 0 }, 1249 { "ELAN0600", 0 },
1250 { "ELAN0602", 0 },
1250 { "ELAN0605", 0 }, 1251 { "ELAN0605", 0 },
1252 { "ELAN0608", 0 },
1253 { "ELAN0605", 0 },
1254 { "ELAN0609", 0 },
1255 { "ELAN060B", 0 },
1251 { "ELAN1000", 0 }, 1256 { "ELAN1000", 0 },
1252 { } 1257 { }
1253}; 1258};
diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c
index 922ea02edcc3..0871010f18d5 100644
--- a/drivers/input/mouse/trackpoint.c
+++ b/drivers/input/mouse/trackpoint.c
@@ -265,7 +265,8 @@ static int trackpoint_start_protocol(struct psmouse *psmouse, unsigned char *fir
265 if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID))) 265 if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID)))
266 return -1; 266 return -1;
267 267
268 if (param[0] != TP_MAGIC_IDENT) 268 /* add new TP ID. */
269 if (!(param[0] & TP_MAGIC_IDENT))
269 return -1; 270 return -1;
270 271
271 if (firmware_id) 272 if (firmware_id)
@@ -380,8 +381,8 @@ int trackpoint_detect(struct psmouse *psmouse, bool set_properties)
380 return 0; 381 return 0;
381 382
382 if (trackpoint_read(ps2dev, TP_EXT_BTN, &button_info)) { 383 if (trackpoint_read(ps2dev, TP_EXT_BTN, &button_info)) {
383 psmouse_warn(psmouse, "failed to get extended button data\n"); 384 psmouse_warn(psmouse, "failed to get extended button data, assuming 3 buttons\n");
384 button_info = 0; 385 button_info = 0x33;
385 } 386 }
386 387
387 psmouse->private = kzalloc(sizeof(struct trackpoint_data), GFP_KERNEL); 388 psmouse->private = kzalloc(sizeof(struct trackpoint_data), GFP_KERNEL);
diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h
index 5617ed3a7d7a..88055755f82e 100644
--- a/drivers/input/mouse/trackpoint.h
+++ b/drivers/input/mouse/trackpoint.h
@@ -21,8 +21,9 @@
21#define TP_COMMAND 0xE2 /* Commands start with this */ 21#define TP_COMMAND 0xE2 /* Commands start with this */
22 22
23#define TP_READ_ID 0xE1 /* Sent for device identification */ 23#define TP_READ_ID 0xE1 /* Sent for device identification */
24#define TP_MAGIC_IDENT 0x01 /* Sent after a TP_READ_ID followed */ 24#define TP_MAGIC_IDENT 0x03 /* Sent after a TP_READ_ID followed */
25 /* by the firmware ID */ 25 /* by the firmware ID */
26 /* Firmware ID includes 0x1, 0x2, 0x3 */
26 27
27 28
28/* 29/*
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 688e77576e5a..354cbd6392cd 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -4452,6 +4452,7 @@ static int amd_ir_set_vcpu_affinity(struct irq_data *data, void *vcpu_info)
4452 /* Setting */ 4452 /* Setting */
4453 irte->hi.fields.ga_root_ptr = (pi_data->base >> 12); 4453 irte->hi.fields.ga_root_ptr = (pi_data->base >> 12);
4454 irte->hi.fields.vector = vcpu_pi_info->vector; 4454 irte->hi.fields.vector = vcpu_pi_info->vector;
4455 irte->lo.fields_vapic.ga_log_intr = 1;
4455 irte->lo.fields_vapic.guest_mode = 1; 4456 irte->lo.fields_vapic.guest_mode = 1;
4456 irte->lo.fields_vapic.ga_tag = pi_data->ga_tag; 4457 irte->lo.fields_vapic.ga_tag = pi_data->ga_tag;
4457 4458
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 5cc597b383c7..372303700566 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -2440,11 +2440,11 @@ static int __init state_next(void)
2440 break; 2440 break;
2441 case IOMMU_ACPI_FINISHED: 2441 case IOMMU_ACPI_FINISHED:
2442 early_enable_iommus(); 2442 early_enable_iommus();
2443 register_syscore_ops(&amd_iommu_syscore_ops);
2444 x86_platform.iommu_shutdown = disable_iommus; 2443 x86_platform.iommu_shutdown = disable_iommus;
2445 init_state = IOMMU_ENABLED; 2444 init_state = IOMMU_ENABLED;
2446 break; 2445 break;
2447 case IOMMU_ENABLED: 2446 case IOMMU_ENABLED:
2447 register_syscore_ops(&amd_iommu_syscore_ops);
2448 ret = amd_iommu_init_pci(); 2448 ret = amd_iommu_init_pci();
2449 init_state = ret ? IOMMU_INIT_ERROR : IOMMU_PCI_INIT; 2449 init_state = ret ? IOMMU_INIT_ERROR : IOMMU_PCI_INIT;
2450 enable_iommus_v2(); 2450 enable_iommus_v2();
diff --git a/drivers/iommu/amd_iommu_types.h b/drivers/iommu/amd_iommu_types.h
index 294a409e283b..d6b873b57054 100644
--- a/drivers/iommu/amd_iommu_types.h
+++ b/drivers/iommu/amd_iommu_types.h
@@ -574,7 +574,9 @@ struct amd_iommu {
574 574
575static inline struct amd_iommu *dev_to_amd_iommu(struct device *dev) 575static inline struct amd_iommu *dev_to_amd_iommu(struct device *dev)
576{ 576{
577 return container_of(dev, struct amd_iommu, iommu.dev); 577 struct iommu_device *iommu = dev_to_iommu_device(dev);
578
579 return container_of(iommu, struct amd_iommu, iommu);
578} 580}
579 581
580#define ACPIHID_UID_LEN 256 582#define ACPIHID_UID_LEN 256
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index bc89b4d6c043..2d80fa8a0634 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -400,6 +400,8 @@ struct arm_smmu_device {
400 400
401 u32 cavium_id_base; /* Specific to Cavium */ 401 u32 cavium_id_base; /* Specific to Cavium */
402 402
403 spinlock_t global_sync_lock;
404
403 /* IOMMU core code handle */ 405 /* IOMMU core code handle */
404 struct iommu_device iommu; 406 struct iommu_device iommu;
405}; 407};
@@ -436,7 +438,7 @@ struct arm_smmu_domain {
436 struct arm_smmu_cfg cfg; 438 struct arm_smmu_cfg cfg;
437 enum arm_smmu_domain_stage stage; 439 enum arm_smmu_domain_stage stage;
438 struct mutex init_mutex; /* Protects smmu pointer */ 440 struct mutex init_mutex; /* Protects smmu pointer */
439 spinlock_t cb_lock; /* Serialises ATS1* ops */ 441 spinlock_t cb_lock; /* Serialises ATS1* ops and TLB syncs */
440 struct iommu_domain domain; 442 struct iommu_domain domain;
441}; 443};
442 444
@@ -602,9 +604,12 @@ static void __arm_smmu_tlb_sync(struct arm_smmu_device *smmu,
602static void arm_smmu_tlb_sync_global(struct arm_smmu_device *smmu) 604static void arm_smmu_tlb_sync_global(struct arm_smmu_device *smmu)
603{ 605{
604 void __iomem *base = ARM_SMMU_GR0(smmu); 606 void __iomem *base = ARM_SMMU_GR0(smmu);
607 unsigned long flags;
605 608
609 spin_lock_irqsave(&smmu->global_sync_lock, flags);
606 __arm_smmu_tlb_sync(smmu, base + ARM_SMMU_GR0_sTLBGSYNC, 610 __arm_smmu_tlb_sync(smmu, base + ARM_SMMU_GR0_sTLBGSYNC,
607 base + ARM_SMMU_GR0_sTLBGSTATUS); 611 base + ARM_SMMU_GR0_sTLBGSTATUS);
612 spin_unlock_irqrestore(&smmu->global_sync_lock, flags);
608} 613}
609 614
610static void arm_smmu_tlb_sync_context(void *cookie) 615static void arm_smmu_tlb_sync_context(void *cookie)
@@ -612,9 +617,12 @@ static void arm_smmu_tlb_sync_context(void *cookie)
612 struct arm_smmu_domain *smmu_domain = cookie; 617 struct arm_smmu_domain *smmu_domain = cookie;
613 struct arm_smmu_device *smmu = smmu_domain->smmu; 618 struct arm_smmu_device *smmu = smmu_domain->smmu;
614 void __iomem *base = ARM_SMMU_CB(smmu, smmu_domain->cfg.cbndx); 619 void __iomem *base = ARM_SMMU_CB(smmu, smmu_domain->cfg.cbndx);
620 unsigned long flags;
615 621
622 spin_lock_irqsave(&smmu_domain->cb_lock, flags);
616 __arm_smmu_tlb_sync(smmu, base + ARM_SMMU_CB_TLBSYNC, 623 __arm_smmu_tlb_sync(smmu, base + ARM_SMMU_CB_TLBSYNC,
617 base + ARM_SMMU_CB_TLBSTATUS); 624 base + ARM_SMMU_CB_TLBSTATUS);
625 spin_unlock_irqrestore(&smmu_domain->cb_lock, flags);
618} 626}
619 627
620static void arm_smmu_tlb_sync_vmid(void *cookie) 628static void arm_smmu_tlb_sync_vmid(void *cookie)
@@ -1511,6 +1519,12 @@ static int arm_smmu_add_device(struct device *dev)
1511 1519
1512 if (using_legacy_binding) { 1520 if (using_legacy_binding) {
1513 ret = arm_smmu_register_legacy_master(dev, &smmu); 1521 ret = arm_smmu_register_legacy_master(dev, &smmu);
1522
1523 /*
1524 * If dev->iommu_fwspec is initally NULL, arm_smmu_register_legacy_master()
1525 * will allocate/initialise a new one. Thus we need to update fwspec for
1526 * later use.
1527 */
1514 fwspec = dev->iommu_fwspec; 1528 fwspec = dev->iommu_fwspec;
1515 if (ret) 1529 if (ret)
1516 goto out_free; 1530 goto out_free;
@@ -1550,15 +1564,15 @@ static int arm_smmu_add_device(struct device *dev)
1550 1564
1551 ret = arm_smmu_master_alloc_smes(dev); 1565 ret = arm_smmu_master_alloc_smes(dev);
1552 if (ret) 1566 if (ret)
1553 goto out_free; 1567 goto out_cfg_free;
1554 1568
1555 iommu_device_link(&smmu->iommu, dev); 1569 iommu_device_link(&smmu->iommu, dev);
1556 1570
1557 return 0; 1571 return 0;
1558 1572
1573out_cfg_free:
1574 kfree(cfg);
1559out_free: 1575out_free:
1560 if (fwspec)
1561 kfree(fwspec->iommu_priv);
1562 iommu_fwspec_free(dev); 1576 iommu_fwspec_free(dev);
1563 return ret; 1577 return ret;
1564} 1578}
@@ -1925,6 +1939,7 @@ static int arm_smmu_device_cfg_probe(struct arm_smmu_device *smmu)
1925 1939
1926 smmu->num_mapping_groups = size; 1940 smmu->num_mapping_groups = size;
1927 mutex_init(&smmu->stream_map_mutex); 1941 mutex_init(&smmu->stream_map_mutex);
1942 spin_lock_init(&smmu->global_sync_lock);
1928 1943
1929 if (smmu->version < ARM_SMMU_V2 || !(id & ID0_PTFS_NO_AARCH32)) { 1944 if (smmu->version < ARM_SMMU_V2 || !(id & ID0_PTFS_NO_AARCH32)) {
1930 smmu->features |= ARM_SMMU_FEAT_FMT_AARCH32_L; 1945 smmu->features |= ARM_SMMU_FEAT_FMT_AARCH32_L;
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 687f18f65cea..3e8636f1220e 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -4736,7 +4736,9 @@ static void intel_disable_iommus(void)
4736 4736
4737static inline struct intel_iommu *dev_to_intel_iommu(struct device *dev) 4737static inline struct intel_iommu *dev_to_intel_iommu(struct device *dev)
4738{ 4738{
4739 return container_of(dev, struct intel_iommu, iommu.dev); 4739 struct iommu_device *iommu_dev = dev_to_iommu_device(dev);
4740
4741 return container_of(iommu_dev, struct intel_iommu, iommu);
4740} 4742}
4741 4743
4742static ssize_t intel_iommu_show_version(struct device *dev, 4744static ssize_t intel_iommu_show_version(struct device *dev,
diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c
index af330f513653..d665d0dc16e8 100644
--- a/drivers/iommu/io-pgtable-arm-v7s.c
+++ b/drivers/iommu/io-pgtable-arm-v7s.c
@@ -479,6 +479,9 @@ static int arm_v7s_map(struct io_pgtable_ops *ops, unsigned long iova,
479 if (!(prot & (IOMMU_READ | IOMMU_WRITE))) 479 if (!(prot & (IOMMU_READ | IOMMU_WRITE)))
480 return 0; 480 return 0;
481 481
482 if (WARN_ON(upper_32_bits(iova) || upper_32_bits(paddr)))
483 return -ERANGE;
484
482 ret = __arm_v7s_map(data, iova, paddr, size, prot, 1, data->pgd); 485 ret = __arm_v7s_map(data, iova, paddr, size, prot, 1, data->pgd);
483 /* 486 /*
484 * Synchronise all PTE updates for the new mapping before there's 487 * Synchronise all PTE updates for the new mapping before there's
@@ -659,6 +662,9 @@ static int arm_v7s_unmap(struct io_pgtable_ops *ops, unsigned long iova,
659 struct arm_v7s_io_pgtable *data = io_pgtable_ops_to_data(ops); 662 struct arm_v7s_io_pgtable *data = io_pgtable_ops_to_data(ops);
660 size_t unmapped; 663 size_t unmapped;
661 664
665 if (WARN_ON(upper_32_bits(iova)))
666 return 0;
667
662 unmapped = __arm_v7s_unmap(data, iova, size, 1, data->pgd); 668 unmapped = __arm_v7s_unmap(data, iova, size, 1, data->pgd);
663 if (unmapped) 669 if (unmapped)
664 io_pgtable_tlb_sync(&data->iop); 670 io_pgtable_tlb_sync(&data->iop);
diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
index b182039862c5..e8018a308868 100644
--- a/drivers/iommu/io-pgtable-arm.c
+++ b/drivers/iommu/io-pgtable-arm.c
@@ -452,6 +452,10 @@ static int arm_lpae_map(struct io_pgtable_ops *ops, unsigned long iova,
452 if (!(iommu_prot & (IOMMU_READ | IOMMU_WRITE))) 452 if (!(iommu_prot & (IOMMU_READ | IOMMU_WRITE)))
453 return 0; 453 return 0;
454 454
455 if (WARN_ON(iova >= (1ULL << data->iop.cfg.ias) ||
456 paddr >= (1ULL << data->iop.cfg.oas)))
457 return -ERANGE;
458
455 prot = arm_lpae_prot_to_pte(data, iommu_prot); 459 prot = arm_lpae_prot_to_pte(data, iommu_prot);
456 ret = __arm_lpae_map(data, iova, paddr, size, prot, lvl, ptep); 460 ret = __arm_lpae_map(data, iova, paddr, size, prot, lvl, ptep);
457 /* 461 /*
@@ -610,6 +614,9 @@ static int arm_lpae_unmap(struct io_pgtable_ops *ops, unsigned long iova,
610 arm_lpae_iopte *ptep = data->pgd; 614 arm_lpae_iopte *ptep = data->pgd;
611 int lvl = ARM_LPAE_START_LVL(data); 615 int lvl = ARM_LPAE_START_LVL(data);
612 616
617 if (WARN_ON(iova >= (1ULL << data->iop.cfg.ias)))
618 return 0;
619
613 unmapped = __arm_lpae_unmap(data, iova, size, lvl, ptep); 620 unmapped = __arm_lpae_unmap(data, iova, size, lvl, ptep);
614 if (unmapped) 621 if (unmapped)
615 io_pgtable_tlb_sync(&data->iop); 622 io_pgtable_tlb_sync(&data->iop);
diff --git a/drivers/iommu/io-pgtable.h b/drivers/iommu/io-pgtable.h
index 524263a7ae6f..a3e667077b14 100644
--- a/drivers/iommu/io-pgtable.h
+++ b/drivers/iommu/io-pgtable.h
@@ -158,14 +158,12 @@ void free_io_pgtable_ops(struct io_pgtable_ops *ops);
158 * @fmt: The page table format. 158 * @fmt: The page table format.
159 * @cookie: An opaque token provided by the IOMMU driver and passed back to 159 * @cookie: An opaque token provided by the IOMMU driver and passed back to
160 * any callback routines. 160 * any callback routines.
161 * @tlb_sync_pending: Private flag for optimising out redundant syncs.
162 * @cfg: A copy of the page table configuration. 161 * @cfg: A copy of the page table configuration.
163 * @ops: The page table operations in use for this set of page tables. 162 * @ops: The page table operations in use for this set of page tables.
164 */ 163 */
165struct io_pgtable { 164struct io_pgtable {
166 enum io_pgtable_fmt fmt; 165 enum io_pgtable_fmt fmt;
167 void *cookie; 166 void *cookie;
168 bool tlb_sync_pending;
169 struct io_pgtable_cfg cfg; 167 struct io_pgtable_cfg cfg;
170 struct io_pgtable_ops ops; 168 struct io_pgtable_ops ops;
171}; 169};
@@ -175,22 +173,17 @@ struct io_pgtable {
175static inline void io_pgtable_tlb_flush_all(struct io_pgtable *iop) 173static inline void io_pgtable_tlb_flush_all(struct io_pgtable *iop)
176{ 174{
177 iop->cfg.tlb->tlb_flush_all(iop->cookie); 175 iop->cfg.tlb->tlb_flush_all(iop->cookie);
178 iop->tlb_sync_pending = true;
179} 176}
180 177
181static inline void io_pgtable_tlb_add_flush(struct io_pgtable *iop, 178static inline void io_pgtable_tlb_add_flush(struct io_pgtable *iop,
182 unsigned long iova, size_t size, size_t granule, bool leaf) 179 unsigned long iova, size_t size, size_t granule, bool leaf)
183{ 180{
184 iop->cfg.tlb->tlb_add_flush(iova, size, granule, leaf, iop->cookie); 181 iop->cfg.tlb->tlb_add_flush(iova, size, granule, leaf, iop->cookie);
185 iop->tlb_sync_pending = true;
186} 182}
187 183
188static inline void io_pgtable_tlb_sync(struct io_pgtable *iop) 184static inline void io_pgtable_tlb_sync(struct io_pgtable *iop)
189{ 185{
190 if (iop->tlb_sync_pending) { 186 iop->cfg.tlb->tlb_sync(iop->cookie);
191 iop->cfg.tlb->tlb_sync(iop->cookie);
192 iop->tlb_sync_pending = false;
193 }
194} 187}
195 188
196/** 189/**
diff --git a/drivers/iommu/iommu-sysfs.c b/drivers/iommu/iommu-sysfs.c
index c58351ed61c1..36d1a7ce7fc4 100644
--- a/drivers/iommu/iommu-sysfs.c
+++ b/drivers/iommu/iommu-sysfs.c
@@ -62,32 +62,40 @@ int iommu_device_sysfs_add(struct iommu_device *iommu,
62 va_list vargs; 62 va_list vargs;
63 int ret; 63 int ret;
64 64
65 device_initialize(&iommu->dev); 65 iommu->dev = kzalloc(sizeof(*iommu->dev), GFP_KERNEL);
66 if (!iommu->dev)
67 return -ENOMEM;
66 68
67 iommu->dev.class = &iommu_class; 69 device_initialize(iommu->dev);
68 iommu->dev.parent = parent; 70
69 iommu->dev.groups = groups; 71 iommu->dev->class = &iommu_class;
72 iommu->dev->parent = parent;
73 iommu->dev->groups = groups;
70 74
71 va_start(vargs, fmt); 75 va_start(vargs, fmt);
72 ret = kobject_set_name_vargs(&iommu->dev.kobj, fmt, vargs); 76 ret = kobject_set_name_vargs(&iommu->dev->kobj, fmt, vargs);
73 va_end(vargs); 77 va_end(vargs);
74 if (ret) 78 if (ret)
75 goto error; 79 goto error;
76 80
77 ret = device_add(&iommu->dev); 81 ret = device_add(iommu->dev);
78 if (ret) 82 if (ret)
79 goto error; 83 goto error;
80 84
85 dev_set_drvdata(iommu->dev, iommu);
86
81 return 0; 87 return 0;
82 88
83error: 89error:
84 put_device(&iommu->dev); 90 put_device(iommu->dev);
85 return ret; 91 return ret;
86} 92}
87 93
88void iommu_device_sysfs_remove(struct iommu_device *iommu) 94void iommu_device_sysfs_remove(struct iommu_device *iommu)
89{ 95{
90 device_unregister(&iommu->dev); 96 dev_set_drvdata(iommu->dev, NULL);
97 device_unregister(iommu->dev);
98 iommu->dev = NULL;
91} 99}
92/* 100/*
93 * IOMMU drivers can indicate a device is managed by a given IOMMU using 101 * IOMMU drivers can indicate a device is managed by a given IOMMU using
@@ -102,14 +110,14 @@ int iommu_device_link(struct iommu_device *iommu, struct device *link)
102 if (!iommu || IS_ERR(iommu)) 110 if (!iommu || IS_ERR(iommu))
103 return -ENODEV; 111 return -ENODEV;
104 112
105 ret = sysfs_add_link_to_group(&iommu->dev.kobj, "devices", 113 ret = sysfs_add_link_to_group(&iommu->dev->kobj, "devices",
106 &link->kobj, dev_name(link)); 114 &link->kobj, dev_name(link));
107 if (ret) 115 if (ret)
108 return ret; 116 return ret;
109 117
110 ret = sysfs_create_link_nowarn(&link->kobj, &iommu->dev.kobj, "iommu"); 118 ret = sysfs_create_link_nowarn(&link->kobj, &iommu->dev->kobj, "iommu");
111 if (ret) 119 if (ret)
112 sysfs_remove_link_from_group(&iommu->dev.kobj, "devices", 120 sysfs_remove_link_from_group(&iommu->dev->kobj, "devices",
113 dev_name(link)); 121 dev_name(link));
114 122
115 return ret; 123 return ret;
@@ -121,5 +129,5 @@ void iommu_device_unlink(struct iommu_device *iommu, struct device *link)
121 return; 129 return;
122 130
123 sysfs_remove_link(&link->kobj, "iommu"); 131 sysfs_remove_link(&link->kobj, "iommu");
124 sysfs_remove_link_from_group(&iommu->dev.kobj, "devices", dev_name(link)); 132 sysfs_remove_link_from_group(&iommu->dev->kobj, "devices", dev_name(link));
125} 133}
diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c
index 5d14cd15198d..91c6d367ab35 100644
--- a/drivers/iommu/mtk_iommu.c
+++ b/drivers/iommu/mtk_iommu.c
@@ -129,6 +129,7 @@ static void mtk_iommu_tlb_add_flush_nosync(unsigned long iova, size_t size,
129 writel_relaxed(iova, data->base + REG_MMU_INVLD_START_A); 129 writel_relaxed(iova, data->base + REG_MMU_INVLD_START_A);
130 writel_relaxed(iova + size - 1, data->base + REG_MMU_INVLD_END_A); 130 writel_relaxed(iova + size - 1, data->base + REG_MMU_INVLD_END_A);
131 writel_relaxed(F_MMU_INV_RANGE, data->base + REG_MMU_INVALIDATE); 131 writel_relaxed(F_MMU_INV_RANGE, data->base + REG_MMU_INVALIDATE);
132 data->tlb_flush_active = true;
132} 133}
133 134
134static void mtk_iommu_tlb_sync(void *cookie) 135static void mtk_iommu_tlb_sync(void *cookie)
@@ -137,6 +138,10 @@ static void mtk_iommu_tlb_sync(void *cookie)
137 int ret; 138 int ret;
138 u32 tmp; 139 u32 tmp;
139 140
141 /* Avoid timing out if there's nothing to wait for */
142 if (!data->tlb_flush_active)
143 return;
144
140 ret = readl_poll_timeout_atomic(data->base + REG_MMU_CPE_DONE, tmp, 145 ret = readl_poll_timeout_atomic(data->base + REG_MMU_CPE_DONE, tmp,
141 tmp != 0, 10, 100000); 146 tmp != 0, 10, 100000);
142 if (ret) { 147 if (ret) {
@@ -146,6 +151,7 @@ static void mtk_iommu_tlb_sync(void *cookie)
146 } 151 }
147 /* Clear the CPE status */ 152 /* Clear the CPE status */
148 writel_relaxed(0, data->base + REG_MMU_CPE_DONE); 153 writel_relaxed(0, data->base + REG_MMU_CPE_DONE);
154 data->tlb_flush_active = false;
149} 155}
150 156
151static const struct iommu_gather_ops mtk_iommu_gather_ops = { 157static const struct iommu_gather_ops mtk_iommu_gather_ops = {
diff --git a/drivers/iommu/mtk_iommu.h b/drivers/iommu/mtk_iommu.h
index 2a28eadeea0e..c06cc91b5d9a 100644
--- a/drivers/iommu/mtk_iommu.h
+++ b/drivers/iommu/mtk_iommu.h
@@ -47,6 +47,7 @@ struct mtk_iommu_data {
47 struct iommu_group *m4u_group; 47 struct iommu_group *m4u_group;
48 struct mtk_smi_iommu smi_imu; /* SMI larb iommu info */ 48 struct mtk_smi_iommu smi_imu; /* SMI larb iommu info */
49 bool enable_4GB; 49 bool enable_4GB;
50 bool tlb_flush_active;
50 51
51 struct iommu_device iommu; 52 struct iommu_device iommu;
52}; 53};
diff --git a/drivers/irqchip/irq-atmel-aic-common.c b/drivers/irqchip/irq-atmel-aic-common.c
index 28b26c80f4cf..072bd227b6c6 100644
--- a/drivers/irqchip/irq-atmel-aic-common.c
+++ b/drivers/irqchip/irq-atmel-aic-common.c
@@ -137,14 +137,14 @@ static void __init aic_common_ext_irq_of_init(struct irq_domain *domain)
137#define AT91_RTC_IMR 0x28 137#define AT91_RTC_IMR 0x28
138#define AT91_RTC_IRQ_MASK 0x1f 138#define AT91_RTC_IRQ_MASK 0x1f
139 139
140void __init aic_common_rtc_irq_fixup(struct device_node *root) 140void __init aic_common_rtc_irq_fixup(void)
141{ 141{
142 struct device_node *np; 142 struct device_node *np;
143 void __iomem *regs; 143 void __iomem *regs;
144 144
145 np = of_find_compatible_node(root, NULL, "atmel,at91rm9200-rtc"); 145 np = of_find_compatible_node(NULL, NULL, "atmel,at91rm9200-rtc");
146 if (!np) 146 if (!np)
147 np = of_find_compatible_node(root, NULL, 147 np = of_find_compatible_node(NULL, NULL,
148 "atmel,at91sam9x5-rtc"); 148 "atmel,at91sam9x5-rtc");
149 149
150 if (!np) 150 if (!np)
@@ -165,7 +165,7 @@ void __init aic_common_rtc_irq_fixup(struct device_node *root)
165#define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */ 165#define AT91_RTT_ALMIEN (1 << 16) /* Alarm Interrupt Enable */
166#define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */ 166#define AT91_RTT_RTTINCIEN (1 << 17) /* Real Time Timer Increment Interrupt Enable */
167 167
168void __init aic_common_rtt_irq_fixup(struct device_node *root) 168void __init aic_common_rtt_irq_fixup(void)
169{ 169{
170 struct device_node *np; 170 struct device_node *np;
171 void __iomem *regs; 171 void __iomem *regs;
@@ -196,11 +196,10 @@ static void __init aic_common_irq_fixup(const struct of_device_id *matches)
196 return; 196 return;
197 197
198 match = of_match_node(matches, root); 198 match = of_match_node(matches, root);
199 of_node_put(root);
200 199
201 if (match) { 200 if (match) {
202 void (*fixup)(struct device_node *) = match->data; 201 void (*fixup)(void) = match->data;
203 fixup(root); 202 fixup();
204 } 203 }
205 204
206 of_node_put(root); 205 of_node_put(root);
diff --git a/drivers/irqchip/irq-atmel-aic-common.h b/drivers/irqchip/irq-atmel-aic-common.h
index af60376d50de..242e62c1851e 100644
--- a/drivers/irqchip/irq-atmel-aic-common.h
+++ b/drivers/irqchip/irq-atmel-aic-common.h
@@ -33,8 +33,8 @@ struct irq_domain *__init aic_common_of_init(struct device_node *node,
33 const char *name, int nirqs, 33 const char *name, int nirqs,
34 const struct of_device_id *matches); 34 const struct of_device_id *matches);
35 35
36void __init aic_common_rtc_irq_fixup(struct device_node *root); 36void __init aic_common_rtc_irq_fixup(void);
37 37
38void __init aic_common_rtt_irq_fixup(struct device_node *root); 38void __init aic_common_rtt_irq_fixup(void);
39 39
40#endif /* __IRQ_ATMEL_AIC_COMMON_H */ 40#endif /* __IRQ_ATMEL_AIC_COMMON_H */
diff --git a/drivers/irqchip/irq-atmel-aic.c b/drivers/irqchip/irq-atmel-aic.c
index 37f952dd9fc9..bb1ad451392f 100644
--- a/drivers/irqchip/irq-atmel-aic.c
+++ b/drivers/irqchip/irq-atmel-aic.c
@@ -209,20 +209,20 @@ static const struct irq_domain_ops aic_irq_ops = {
209 .xlate = aic_irq_domain_xlate, 209 .xlate = aic_irq_domain_xlate,
210}; 210};
211 211
212static void __init at91rm9200_aic_irq_fixup(struct device_node *root) 212static void __init at91rm9200_aic_irq_fixup(void)
213{ 213{
214 aic_common_rtc_irq_fixup(root); 214 aic_common_rtc_irq_fixup();
215} 215}
216 216
217static void __init at91sam9260_aic_irq_fixup(struct device_node *root) 217static void __init at91sam9260_aic_irq_fixup(void)
218{ 218{
219 aic_common_rtt_irq_fixup(root); 219 aic_common_rtt_irq_fixup();
220} 220}
221 221
222static void __init at91sam9g45_aic_irq_fixup(struct device_node *root) 222static void __init at91sam9g45_aic_irq_fixup(void)
223{ 223{
224 aic_common_rtc_irq_fixup(root); 224 aic_common_rtc_irq_fixup();
225 aic_common_rtt_irq_fixup(root); 225 aic_common_rtt_irq_fixup();
226} 226}
227 227
228static const struct of_device_id aic_irq_fixups[] __initconst = { 228static const struct of_device_id aic_irq_fixups[] __initconst = {
diff --git a/drivers/irqchip/irq-atmel-aic5.c b/drivers/irqchip/irq-atmel-aic5.c
index c04ee9a23d09..6acad2ea0fb3 100644
--- a/drivers/irqchip/irq-atmel-aic5.c
+++ b/drivers/irqchip/irq-atmel-aic5.c
@@ -305,9 +305,9 @@ static const struct irq_domain_ops aic5_irq_ops = {
305 .xlate = aic5_irq_domain_xlate, 305 .xlate = aic5_irq_domain_xlate,
306}; 306};
307 307
308static void __init sama5d3_aic_irq_fixup(struct device_node *root) 308static void __init sama5d3_aic_irq_fixup(void)
309{ 309{
310 aic_common_rtc_irq_fixup(root); 310 aic_common_rtc_irq_fixup();
311} 311}
312 312
313static const struct of_device_id aic5_irq_fixups[] __initconst = { 313static const struct of_device_id aic5_irq_fixups[] __initconst = {
diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb-l2.c
index bddf169c4b37..b009b916a292 100644
--- a/drivers/irqchip/irq-brcmstb-l2.c
+++ b/drivers/irqchip/irq-brcmstb-l2.c
@@ -189,6 +189,7 @@ static int __init brcmstb_l2_intc_of_init(struct device_node *np,
189 189
190 ct->chip.irq_suspend = brcmstb_l2_intc_suspend; 190 ct->chip.irq_suspend = brcmstb_l2_intc_suspend;
191 ct->chip.irq_resume = brcmstb_l2_intc_resume; 191 ct->chip.irq_resume = brcmstb_l2_intc_resume;
192 ct->chip.irq_pm_shutdown = brcmstb_l2_intc_suspend;
192 193
193 if (data->can_wake) { 194 if (data->can_wake) {
194 /* This IRQ chip can wake the system, set all child interrupts 195 /* This IRQ chip can wake the system, set all child interrupts
diff --git a/drivers/irqchip/irq-gic-v3-its-platform-msi.c b/drivers/irqchip/irq-gic-v3-its-platform-msi.c
index 249240d9a425..833a90fe33ae 100644
--- a/drivers/irqchip/irq-gic-v3-its-platform-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-platform-msi.c
@@ -43,6 +43,7 @@ static int of_pmsi_get_dev_id(struct irq_domain *domain, struct device *dev,
43 *dev_id = args.args[0]; 43 *dev_id = args.args[0];
44 break; 44 break;
45 } 45 }
46 index++;
46 } while (!ret); 47 } while (!ret);
47 48
48 return ret; 49 return ret;
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 68932873eebc..284738add89b 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1835,7 +1835,7 @@ static int __init its_of_probe(struct device_node *node)
1835 1835
1836#define ACPI_GICV3_ITS_MEM_SIZE (SZ_128K) 1836#define ACPI_GICV3_ITS_MEM_SIZE (SZ_128K)
1837 1837
1838#if defined(CONFIG_ACPI_NUMA) && (ACPI_CA_VERSION >= 0x20170531) 1838#ifdef CONFIG_ACPI_NUMA
1839struct its_srat_map { 1839struct its_srat_map {
1840 /* numa node id */ 1840 /* numa node id */
1841 u32 numa_node; 1841 u32 numa_node;
@@ -1843,7 +1843,7 @@ struct its_srat_map {
1843 u32 its_id; 1843 u32 its_id;
1844}; 1844};
1845 1845
1846static struct its_srat_map its_srat_maps[MAX_NUMNODES] __initdata; 1846static struct its_srat_map *its_srat_maps __initdata;
1847static int its_in_srat __initdata; 1847static int its_in_srat __initdata;
1848 1848
1849static int __init acpi_get_its_numa_node(u32 its_id) 1849static int __init acpi_get_its_numa_node(u32 its_id)
@@ -1857,6 +1857,12 @@ static int __init acpi_get_its_numa_node(u32 its_id)
1857 return NUMA_NO_NODE; 1857 return NUMA_NO_NODE;
1858} 1858}
1859 1859
1860static int __init gic_acpi_match_srat_its(struct acpi_subtable_header *header,
1861 const unsigned long end)
1862{
1863 return 0;
1864}
1865
1860static int __init gic_acpi_parse_srat_its(struct acpi_subtable_header *header, 1866static int __init gic_acpi_parse_srat_its(struct acpi_subtable_header *header,
1861 const unsigned long end) 1867 const unsigned long end)
1862{ 1868{
@@ -1873,12 +1879,6 @@ static int __init gic_acpi_parse_srat_its(struct acpi_subtable_header *header,
1873 return -EINVAL; 1879 return -EINVAL;
1874 } 1880 }
1875 1881
1876 if (its_in_srat >= MAX_NUMNODES) {
1877 pr_err("SRAT: ITS affinity exceeding max count[%d]\n",
1878 MAX_NUMNODES);
1879 return -EINVAL;
1880 }
1881
1882 node = acpi_map_pxm_to_node(its_affinity->proximity_domain); 1882 node = acpi_map_pxm_to_node(its_affinity->proximity_domain);
1883 1883
1884 if (node == NUMA_NO_NODE || node >= MAX_NUMNODES) { 1884 if (node == NUMA_NO_NODE || node >= MAX_NUMNODES) {
@@ -1897,14 +1897,37 @@ static int __init gic_acpi_parse_srat_its(struct acpi_subtable_header *header,
1897 1897
1898static void __init acpi_table_parse_srat_its(void) 1898static void __init acpi_table_parse_srat_its(void)
1899{ 1899{
1900 int count;
1901
1902 count = acpi_table_parse_entries(ACPI_SIG_SRAT,
1903 sizeof(struct acpi_table_srat),
1904 ACPI_SRAT_TYPE_GIC_ITS_AFFINITY,
1905 gic_acpi_match_srat_its, 0);
1906 if (count <= 0)
1907 return;
1908
1909 its_srat_maps = kmalloc(count * sizeof(struct its_srat_map),
1910 GFP_KERNEL);
1911 if (!its_srat_maps) {
1912 pr_warn("SRAT: Failed to allocate memory for its_srat_maps!\n");
1913 return;
1914 }
1915
1900 acpi_table_parse_entries(ACPI_SIG_SRAT, 1916 acpi_table_parse_entries(ACPI_SIG_SRAT,
1901 sizeof(struct acpi_table_srat), 1917 sizeof(struct acpi_table_srat),
1902 ACPI_SRAT_TYPE_GIC_ITS_AFFINITY, 1918 ACPI_SRAT_TYPE_GIC_ITS_AFFINITY,
1903 gic_acpi_parse_srat_its, 0); 1919 gic_acpi_parse_srat_its, 0);
1904} 1920}
1921
1922/* free the its_srat_maps after ITS probing */
1923static void __init acpi_its_srat_maps_free(void)
1924{
1925 kfree(its_srat_maps);
1926}
1905#else 1927#else
1906static void __init acpi_table_parse_srat_its(void) { } 1928static void __init acpi_table_parse_srat_its(void) { }
1907static int __init acpi_get_its_numa_node(u32 its_id) { return NUMA_NO_NODE; } 1929static int __init acpi_get_its_numa_node(u32 its_id) { return NUMA_NO_NODE; }
1930static void __init acpi_its_srat_maps_free(void) { }
1908#endif 1931#endif
1909 1932
1910static int __init gic_acpi_parse_madt_its(struct acpi_subtable_header *header, 1933static int __init gic_acpi_parse_madt_its(struct acpi_subtable_header *header,
@@ -1951,6 +1974,7 @@ static void __init its_acpi_probe(void)
1951 acpi_table_parse_srat_its(); 1974 acpi_table_parse_srat_its();
1952 acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR, 1975 acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR,
1953 gic_acpi_parse_madt_its, 0); 1976 gic_acpi_parse_madt_its, 0);
1977 acpi_its_srat_maps_free();
1954} 1978}
1955#else 1979#else
1956static void __init its_acpi_probe(void) { } 1980static void __init its_acpi_probe(void) { }
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index dbffb7ab6203..984c3ecfd22c 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -353,6 +353,8 @@ static asmlinkage void __exception_irq_entry gic_handle_irq(struct pt_regs *regs
353 353
354 if (static_key_true(&supports_deactivate)) 354 if (static_key_true(&supports_deactivate))
355 gic_write_eoir(irqnr); 355 gic_write_eoir(irqnr);
356 else
357 isb();
356 358
357 err = handle_domain_irq(gic_data.domain, irqnr, regs); 359 err = handle_domain_irq(gic_data.domain, irqnr, regs);
358 if (err) { 360 if (err) {
@@ -640,11 +642,16 @@ static void gic_smp_init(void)
640static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, 642static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
641 bool force) 643 bool force)
642{ 644{
643 unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask); 645 unsigned int cpu;
644 void __iomem *reg; 646 void __iomem *reg;
645 int enabled; 647 int enabled;
646 u64 val; 648 u64 val;
647 649
650 if (force)
651 cpu = cpumask_first(mask_val);
652 else
653 cpu = cpumask_any_and(mask_val, cpu_online_mask);
654
648 if (cpu >= nr_cpu_ids) 655 if (cpu >= nr_cpu_ids)
649 return -EINVAL; 656 return -EINVAL;
650 657
@@ -831,8 +838,11 @@ static int gic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
831 if (ret) 838 if (ret)
832 return ret; 839 return ret;
833 840
834 for (i = 0; i < nr_irqs; i++) 841 for (i = 0; i < nr_irqs; i++) {
835 gic_irq_domain_map(domain, virq + i, hwirq + i); 842 ret = gic_irq_domain_map(domain, virq + i, hwirq + i);
843 if (ret)
844 return ret;
845 }
836 846
837 return 0; 847 return 0;
838} 848}
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 1b1df4f770bd..d3e7c43718b8 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -361,6 +361,7 @@ static void __exception_irq_entry gic_handle_irq(struct pt_regs *regs)
361 if (likely(irqnr > 15 && irqnr < 1020)) { 361 if (likely(irqnr > 15 && irqnr < 1020)) {
362 if (static_key_true(&supports_deactivate)) 362 if (static_key_true(&supports_deactivate))
363 writel_relaxed(irqstat, cpu_base + GIC_CPU_EOI); 363 writel_relaxed(irqstat, cpu_base + GIC_CPU_EOI);
364 isb();
364 handle_domain_irq(gic->domain, irqnr, regs); 365 handle_domain_irq(gic->domain, irqnr, regs);
365 continue; 366 continue;
366 } 367 }
@@ -401,10 +402,12 @@ static void gic_handle_cascade_irq(struct irq_desc *desc)
401 goto out; 402 goto out;
402 403
403 cascade_irq = irq_find_mapping(chip_data->domain, gic_irq); 404 cascade_irq = irq_find_mapping(chip_data->domain, gic_irq);
404 if (unlikely(gic_irq < 32 || gic_irq > 1020)) 405 if (unlikely(gic_irq < 32 || gic_irq > 1020)) {
405 handle_bad_irq(desc); 406 handle_bad_irq(desc);
406 else 407 } else {
408 isb();
407 generic_handle_irq(cascade_irq); 409 generic_handle_irq(cascade_irq);
410 }
408 411
409 out: 412 out:
410 chained_irq_exit(chip, desc); 413 chained_irq_exit(chip, desc);
@@ -1027,8 +1030,11 @@ static int gic_irq_domain_alloc(struct irq_domain *domain, unsigned int virq,
1027 if (ret) 1030 if (ret)
1028 return ret; 1031 return ret;
1029 1032
1030 for (i = 0; i < nr_irqs; i++) 1033 for (i = 0; i < nr_irqs; i++) {
1031 gic_irq_domain_map(domain, virq + i, hwirq + i); 1034 ret = gic_irq_domain_map(domain, virq + i, hwirq + i);
1035 if (ret)
1036 return ret;
1037 }
1032 1038
1033 return 0; 1039 return 0;
1034} 1040}
diff --git a/drivers/isdn/hysdn/hysdn_proclog.c b/drivers/isdn/hysdn/hysdn_proclog.c
index 7b5fd8fb1761..aaca0b3d662e 100644
--- a/drivers/isdn/hysdn/hysdn_proclog.c
+++ b/drivers/isdn/hysdn/hysdn_proclog.c
@@ -44,7 +44,6 @@ struct procdata {
44 char log_name[15]; /* log filename */ 44 char log_name[15]; /* log filename */
45 struct log_data *log_head, *log_tail; /* head and tail for queue */ 45 struct log_data *log_head, *log_tail; /* head and tail for queue */
46 int if_used; /* open count for interface */ 46 int if_used; /* open count for interface */
47 int volatile del_lock; /* lock for delete operations */
48 unsigned char logtmp[LOG_MAX_LINELEN]; 47 unsigned char logtmp[LOG_MAX_LINELEN];
49 wait_queue_head_t rd_queue; 48 wait_queue_head_t rd_queue;
50}; 49};
@@ -102,7 +101,6 @@ put_log_buffer(hysdn_card *card, char *cp)
102{ 101{
103 struct log_data *ib; 102 struct log_data *ib;
104 struct procdata *pd = card->proclog; 103 struct procdata *pd = card->proclog;
105 int i;
106 unsigned long flags; 104 unsigned long flags;
107 105
108 if (!pd) 106 if (!pd)
@@ -126,21 +124,21 @@ put_log_buffer(hysdn_card *card, char *cp)
126 else 124 else
127 pd->log_tail->next = ib; /* follows existing messages */ 125 pd->log_tail->next = ib; /* follows existing messages */
128 pd->log_tail = ib; /* new tail */ 126 pd->log_tail = ib; /* new tail */
129 i = pd->del_lock++; /* get lock state */
130 spin_unlock_irqrestore(&card->hysdn_lock, flags);
131 127
132 /* delete old entrys */ 128 /* delete old entrys */
133 if (!i) 129 while (pd->log_head->next) {
134 while (pd->log_head->next) { 130 if ((pd->log_head->usage_cnt <= 0) &&
135 if ((pd->log_head->usage_cnt <= 0) && 131 (pd->log_head->next->usage_cnt <= 0)) {
136 (pd->log_head->next->usage_cnt <= 0)) { 132 ib = pd->log_head;
137 ib = pd->log_head; 133 pd->log_head = pd->log_head->next;
138 pd->log_head = pd->log_head->next; 134 kfree(ib);
139 kfree(ib); 135 } else {
140 } else 136 break;
141 break; 137 }
142 } /* pd->log_head->next */ 138 } /* pd->log_head->next */
143 pd->del_lock--; /* release lock level */ 139
140 spin_unlock_irqrestore(&card->hysdn_lock, flags);
141
144 wake_up_interruptible(&(pd->rd_queue)); /* announce new entry */ 142 wake_up_interruptible(&(pd->rd_queue)); /* announce new entry */
145} /* put_log_buffer */ 143} /* put_log_buffer */
146 144
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index 89b09c51ab7c..38a5bb764c7b 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -1376,6 +1376,7 @@ isdn_ioctl(struct file *file, uint cmd, ulong arg)
1376 if (arg) { 1376 if (arg) {
1377 if (copy_from_user(bname, argp, sizeof(bname) - 1)) 1377 if (copy_from_user(bname, argp, sizeof(bname) - 1))
1378 return -EFAULT; 1378 return -EFAULT;
1379 bname[sizeof(bname)-1] = 0;
1379 } else 1380 } else
1380 return -EINVAL; 1381 return -EINVAL;
1381 ret = mutex_lock_interruptible(&dev->mtx); 1382 ret = mutex_lock_interruptible(&dev->mtx);
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index c151c6daa67e..f63a110b7bcb 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -2611,10 +2611,9 @@ isdn_net_newslave(char *parm)
2611 char newname[10]; 2611 char newname[10];
2612 2612
2613 if (p) { 2613 if (p) {
2614 /* Slave-Name MUST not be empty */ 2614 /* Slave-Name MUST not be empty or overflow 'newname' */
2615 if (!strlen(p + 1)) 2615 if (strscpy(newname, p + 1, sizeof(newname)) <= 0)
2616 return NULL; 2616 return NULL;
2617 strcpy(newname, p + 1);
2618 *p = 0; 2617 *p = 0;
2619 /* Master must already exist */ 2618 /* Master must already exist */
2620 if (!(n = isdn_net_findif(parm))) 2619 if (!(n = isdn_net_findif(parm)))
diff --git a/drivers/isdn/mISDN/fsm.c b/drivers/isdn/mISDN/fsm.c
index 78fc5d5e9051..92e6570b1143 100644
--- a/drivers/isdn/mISDN/fsm.c
+++ b/drivers/isdn/mISDN/fsm.c
@@ -26,7 +26,7 @@
26 26
27#define FSM_TIMER_DEBUG 0 27#define FSM_TIMER_DEBUG 0
28 28
29void 29int
30mISDN_FsmNew(struct Fsm *fsm, 30mISDN_FsmNew(struct Fsm *fsm,
31 struct FsmNode *fnlist, int fncount) 31 struct FsmNode *fnlist, int fncount)
32{ 32{
@@ -34,6 +34,8 @@ mISDN_FsmNew(struct Fsm *fsm,
34 34
35 fsm->jumpmatrix = kzalloc(sizeof(FSMFNPTR) * fsm->state_count * 35 fsm->jumpmatrix = kzalloc(sizeof(FSMFNPTR) * fsm->state_count *
36 fsm->event_count, GFP_KERNEL); 36 fsm->event_count, GFP_KERNEL);
37 if (fsm->jumpmatrix == NULL)
38 return -ENOMEM;
37 39
38 for (i = 0; i < fncount; i++) 40 for (i = 0; i < fncount; i++)
39 if ((fnlist[i].state >= fsm->state_count) || 41 if ((fnlist[i].state >= fsm->state_count) ||
@@ -45,6 +47,7 @@ mISDN_FsmNew(struct Fsm *fsm,
45 } else 47 } else
46 fsm->jumpmatrix[fsm->state_count * fnlist[i].event + 48 fsm->jumpmatrix[fsm->state_count * fnlist[i].event +
47 fnlist[i].state] = (FSMFNPTR) fnlist[i].routine; 49 fnlist[i].state] = (FSMFNPTR) fnlist[i].routine;
50 return 0;
48} 51}
49EXPORT_SYMBOL(mISDN_FsmNew); 52EXPORT_SYMBOL(mISDN_FsmNew);
50 53
diff --git a/drivers/isdn/mISDN/fsm.h b/drivers/isdn/mISDN/fsm.h
index 928f5be192c1..e1def8490221 100644
--- a/drivers/isdn/mISDN/fsm.h
+++ b/drivers/isdn/mISDN/fsm.h
@@ -55,7 +55,7 @@ struct FsmTimer {
55 void *arg; 55 void *arg;
56}; 56};
57 57
58extern void mISDN_FsmNew(struct Fsm *, struct FsmNode *, int); 58extern int mISDN_FsmNew(struct Fsm *, struct FsmNode *, int);
59extern void mISDN_FsmFree(struct Fsm *); 59extern void mISDN_FsmFree(struct Fsm *);
60extern int mISDN_FsmEvent(struct FsmInst *, int , void *); 60extern int mISDN_FsmEvent(struct FsmInst *, int , void *);
61extern void mISDN_FsmChangeState(struct FsmInst *, int); 61extern void mISDN_FsmChangeState(struct FsmInst *, int);
diff --git a/drivers/isdn/mISDN/layer1.c b/drivers/isdn/mISDN/layer1.c
index bebc57b72138..3192b0eb3944 100644
--- a/drivers/isdn/mISDN/layer1.c
+++ b/drivers/isdn/mISDN/layer1.c
@@ -414,8 +414,7 @@ l1_init(u_int *deb)
414 l1fsm_s.event_count = L1_EVENT_COUNT; 414 l1fsm_s.event_count = L1_EVENT_COUNT;
415 l1fsm_s.strEvent = strL1Event; 415 l1fsm_s.strEvent = strL1Event;
416 l1fsm_s.strState = strL1SState; 416 l1fsm_s.strState = strL1SState;
417 mISDN_FsmNew(&l1fsm_s, L1SFnList, ARRAY_SIZE(L1SFnList)); 417 return mISDN_FsmNew(&l1fsm_s, L1SFnList, ARRAY_SIZE(L1SFnList));
418 return 0;
419} 418}
420 419
421void 420void
diff --git a/drivers/isdn/mISDN/layer2.c b/drivers/isdn/mISDN/layer2.c
index 7243a6746f8b..9ff0903a0e89 100644
--- a/drivers/isdn/mISDN/layer2.c
+++ b/drivers/isdn/mISDN/layer2.c
@@ -2247,15 +2247,26 @@ static struct Bprotocol X75SLP = {
2247int 2247int
2248Isdnl2_Init(u_int *deb) 2248Isdnl2_Init(u_int *deb)
2249{ 2249{
2250 int res;
2250 debug = deb; 2251 debug = deb;
2251 mISDN_register_Bprotocol(&X75SLP); 2252 mISDN_register_Bprotocol(&X75SLP);
2252 l2fsm.state_count = L2_STATE_COUNT; 2253 l2fsm.state_count = L2_STATE_COUNT;
2253 l2fsm.event_count = L2_EVENT_COUNT; 2254 l2fsm.event_count = L2_EVENT_COUNT;
2254 l2fsm.strEvent = strL2Event; 2255 l2fsm.strEvent = strL2Event;
2255 l2fsm.strState = strL2State; 2256 l2fsm.strState = strL2State;
2256 mISDN_FsmNew(&l2fsm, L2FnList, ARRAY_SIZE(L2FnList)); 2257 res = mISDN_FsmNew(&l2fsm, L2FnList, ARRAY_SIZE(L2FnList));
2257 TEIInit(deb); 2258 if (res)
2259 goto error;
2260 res = TEIInit(deb);
2261 if (res)
2262 goto error_fsm;
2258 return 0; 2263 return 0;
2264
2265error_fsm:
2266 mISDN_FsmFree(&l2fsm);
2267error:
2268 mISDN_unregister_Bprotocol(&X75SLP);
2269 return res;
2259} 2270}
2260 2271
2261void 2272void
diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c
index 908127efccf8..12d9e5f4beb1 100644
--- a/drivers/isdn/mISDN/tei.c
+++ b/drivers/isdn/mISDN/tei.c
@@ -1387,23 +1387,37 @@ create_teimanager(struct mISDNdevice *dev)
1387 1387
1388int TEIInit(u_int *deb) 1388int TEIInit(u_int *deb)
1389{ 1389{
1390 int res;
1390 debug = deb; 1391 debug = deb;
1391 teifsmu.state_count = TEI_STATE_COUNT; 1392 teifsmu.state_count = TEI_STATE_COUNT;
1392 teifsmu.event_count = TEI_EVENT_COUNT; 1393 teifsmu.event_count = TEI_EVENT_COUNT;
1393 teifsmu.strEvent = strTeiEvent; 1394 teifsmu.strEvent = strTeiEvent;
1394 teifsmu.strState = strTeiState; 1395 teifsmu.strState = strTeiState;
1395 mISDN_FsmNew(&teifsmu, TeiFnListUser, ARRAY_SIZE(TeiFnListUser)); 1396 res = mISDN_FsmNew(&teifsmu, TeiFnListUser, ARRAY_SIZE(TeiFnListUser));
1397 if (res)
1398 goto error;
1396 teifsmn.state_count = TEI_STATE_COUNT; 1399 teifsmn.state_count = TEI_STATE_COUNT;
1397 teifsmn.event_count = TEI_EVENT_COUNT; 1400 teifsmn.event_count = TEI_EVENT_COUNT;
1398 teifsmn.strEvent = strTeiEvent; 1401 teifsmn.strEvent = strTeiEvent;
1399 teifsmn.strState = strTeiState; 1402 teifsmn.strState = strTeiState;
1400 mISDN_FsmNew(&teifsmn, TeiFnListNet, ARRAY_SIZE(TeiFnListNet)); 1403 res = mISDN_FsmNew(&teifsmn, TeiFnListNet, ARRAY_SIZE(TeiFnListNet));
1404 if (res)
1405 goto error_smn;
1401 deactfsm.state_count = DEACT_STATE_COUNT; 1406 deactfsm.state_count = DEACT_STATE_COUNT;
1402 deactfsm.event_count = DEACT_EVENT_COUNT; 1407 deactfsm.event_count = DEACT_EVENT_COUNT;
1403 deactfsm.strEvent = strDeactEvent; 1408 deactfsm.strEvent = strDeactEvent;
1404 deactfsm.strState = strDeactState; 1409 deactfsm.strState = strDeactState;
1405 mISDN_FsmNew(&deactfsm, DeactFnList, ARRAY_SIZE(DeactFnList)); 1410 res = mISDN_FsmNew(&deactfsm, DeactFnList, ARRAY_SIZE(DeactFnList));
1411 if (res)
1412 goto error_deact;
1406 return 0; 1413 return 0;
1414
1415error_deact:
1416 mISDN_FsmFree(&teifsmn);
1417error_smn:
1418 mISDN_FsmFree(&teifsmu);
1419error:
1420 return res;
1407} 1421}
1408 1422
1409void TEIFree(void) 1423void TEIFree(void)
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index ac91fd0d62c6..cbca5e51b975 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -92,7 +92,7 @@ static struct mbox_controller pcc_mbox_ctrl = {};
92 */ 92 */
93static struct mbox_chan *get_pcc_channel(int id) 93static struct mbox_chan *get_pcc_channel(int id)
94{ 94{
95 if (id < 0 || id > pcc_mbox_ctrl.num_chans) 95 if (id < 0 || id >= pcc_mbox_ctrl.num_chans)
96 return ERR_PTR(-ENOENT); 96 return ERR_PTR(-ENOENT);
97 97
98 return &pcc_mbox_channels[id]; 98 return &pcc_mbox_channels[id];
diff --git a/drivers/md/md.c b/drivers/md/md.c
index c99634612fc4..b01e458d31e9 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -7996,7 +7996,7 @@ bool md_write_start(struct mddev *mddev, struct bio *bi)
7996 if (mddev->safemode == 1) 7996 if (mddev->safemode == 1)
7997 mddev->safemode = 0; 7997 mddev->safemode = 0;
7998 /* sync_checkers is always 0 when writes_pending is in per-cpu mode */ 7998 /* sync_checkers is always 0 when writes_pending is in per-cpu mode */
7999 if (mddev->in_sync || !mddev->sync_checkers) { 7999 if (mddev->in_sync || mddev->sync_checkers) {
8000 spin_lock(&mddev->lock); 8000 spin_lock(&mddev->lock);
8001 if (mddev->in_sync) { 8001 if (mddev->in_sync) {
8002 mddev->in_sync = 0; 8002 mddev->in_sync = 0;
@@ -8656,6 +8656,9 @@ void md_check_recovery(struct mddev *mddev)
8656 if (mddev_trylock(mddev)) { 8656 if (mddev_trylock(mddev)) {
8657 int spares = 0; 8657 int spares = 0;
8658 8658
8659 if (!mddev->external && mddev->safemode == 1)
8660 mddev->safemode = 0;
8661
8659 if (mddev->ro) { 8662 if (mddev->ro) {
8660 struct md_rdev *rdev; 8663 struct md_rdev *rdev;
8661 if (!mddev->external && mddev->in_sync) 8664 if (!mddev->external && mddev->in_sync)
diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c
index bfa1e907c472..2dcbafa8e66c 100644
--- a/drivers/md/raid5-cache.c
+++ b/drivers/md/raid5-cache.c
@@ -236,9 +236,10 @@ struct r5l_io_unit {
236 bool need_split_bio; 236 bool need_split_bio;
237 struct bio *split_bio; 237 struct bio *split_bio;
238 238
239 unsigned int has_flush:1; /* include flush request */ 239 unsigned int has_flush:1; /* include flush request */
240 unsigned int has_fua:1; /* include fua request */ 240 unsigned int has_fua:1; /* include fua request */
241 unsigned int has_null_flush:1; /* include empty flush request */ 241 unsigned int has_null_flush:1; /* include null flush request */
242 unsigned int has_flush_payload:1; /* include flush payload */
242 /* 243 /*
243 * io isn't sent yet, flush/fua request can only be submitted till it's 244 * io isn't sent yet, flush/fua request can only be submitted till it's
244 * the first IO in running_ios list 245 * the first IO in running_ios list
@@ -571,6 +572,8 @@ static void r5l_log_endio(struct bio *bio)
571 struct r5l_io_unit *io_deferred; 572 struct r5l_io_unit *io_deferred;
572 struct r5l_log *log = io->log; 573 struct r5l_log *log = io->log;
573 unsigned long flags; 574 unsigned long flags;
575 bool has_null_flush;
576 bool has_flush_payload;
574 577
575 if (bio->bi_status) 578 if (bio->bi_status)
576 md_error(log->rdev->mddev, log->rdev); 579 md_error(log->rdev->mddev, log->rdev);
@@ -580,6 +583,16 @@ static void r5l_log_endio(struct bio *bio)
580 583
581 spin_lock_irqsave(&log->io_list_lock, flags); 584 spin_lock_irqsave(&log->io_list_lock, flags);
582 __r5l_set_io_unit_state(io, IO_UNIT_IO_END); 585 __r5l_set_io_unit_state(io, IO_UNIT_IO_END);
586
587 /*
588 * if the io doesn't not have null_flush or flush payload,
589 * it is not safe to access it after releasing io_list_lock.
590 * Therefore, it is necessary to check the condition with
591 * the lock held.
592 */
593 has_null_flush = io->has_null_flush;
594 has_flush_payload = io->has_flush_payload;
595
583 if (log->need_cache_flush && !list_empty(&io->stripe_list)) 596 if (log->need_cache_flush && !list_empty(&io->stripe_list))
584 r5l_move_to_end_ios(log); 597 r5l_move_to_end_ios(log);
585 else 598 else
@@ -600,19 +613,23 @@ static void r5l_log_endio(struct bio *bio)
600 if (log->need_cache_flush) 613 if (log->need_cache_flush)
601 md_wakeup_thread(log->rdev->mddev->thread); 614 md_wakeup_thread(log->rdev->mddev->thread);
602 615
603 if (io->has_null_flush) { 616 /* finish flush only io_unit and PAYLOAD_FLUSH only io_unit */
617 if (has_null_flush) {
604 struct bio *bi; 618 struct bio *bi;
605 619
606 WARN_ON(bio_list_empty(&io->flush_barriers)); 620 WARN_ON(bio_list_empty(&io->flush_barriers));
607 while ((bi = bio_list_pop(&io->flush_barriers)) != NULL) { 621 while ((bi = bio_list_pop(&io->flush_barriers)) != NULL) {
608 bio_endio(bi); 622 bio_endio(bi);
609 atomic_dec(&io->pending_stripe); 623 if (atomic_dec_and_test(&io->pending_stripe)) {
624 __r5l_stripe_write_finished(io);
625 return;
626 }
610 } 627 }
611 } 628 }
612 629 /* decrease pending_stripe for flush payload */
613 /* finish flush only io_unit and PAYLOAD_FLUSH only io_unit */ 630 if (has_flush_payload)
614 if (atomic_read(&io->pending_stripe) == 0) 631 if (atomic_dec_and_test(&io->pending_stripe))
615 __r5l_stripe_write_finished(io); 632 __r5l_stripe_write_finished(io);
616} 633}
617 634
618static void r5l_do_submit_io(struct r5l_log *log, struct r5l_io_unit *io) 635static void r5l_do_submit_io(struct r5l_log *log, struct r5l_io_unit *io)
@@ -881,6 +898,11 @@ static void r5l_append_flush_payload(struct r5l_log *log, sector_t sect)
881 payload->size = cpu_to_le32(sizeof(__le64)); 898 payload->size = cpu_to_le32(sizeof(__le64));
882 payload->flush_stripes[0] = cpu_to_le64(sect); 899 payload->flush_stripes[0] = cpu_to_le64(sect);
883 io->meta_offset += meta_size; 900 io->meta_offset += meta_size;
901 /* multiple flush payloads count as one pending_stripe */
902 if (!io->has_flush_payload) {
903 io->has_flush_payload = 1;
904 atomic_inc(&io->pending_stripe);
905 }
884 mutex_unlock(&log->io_mutex); 906 mutex_unlock(&log->io_mutex);
885} 907}
886 908
@@ -2540,23 +2562,32 @@ static ssize_t r5c_journal_mode_show(struct mddev *mddev, char *page)
2540 */ 2562 */
2541int r5c_journal_mode_set(struct mddev *mddev, int mode) 2563int r5c_journal_mode_set(struct mddev *mddev, int mode)
2542{ 2564{
2543 struct r5conf *conf = mddev->private; 2565 struct r5conf *conf;
2544 struct r5l_log *log = conf->log; 2566 int err;
2545
2546 if (!log)
2547 return -ENODEV;
2548 2567
2549 if (mode < R5C_JOURNAL_MODE_WRITE_THROUGH || 2568 if (mode < R5C_JOURNAL_MODE_WRITE_THROUGH ||
2550 mode > R5C_JOURNAL_MODE_WRITE_BACK) 2569 mode > R5C_JOURNAL_MODE_WRITE_BACK)
2551 return -EINVAL; 2570 return -EINVAL;
2552 2571
2572 err = mddev_lock(mddev);
2573 if (err)
2574 return err;
2575 conf = mddev->private;
2576 if (!conf || !conf->log) {
2577 mddev_unlock(mddev);
2578 return -ENODEV;
2579 }
2580
2553 if (raid5_calc_degraded(conf) > 0 && 2581 if (raid5_calc_degraded(conf) > 0 &&
2554 mode == R5C_JOURNAL_MODE_WRITE_BACK) 2582 mode == R5C_JOURNAL_MODE_WRITE_BACK) {
2583 mddev_unlock(mddev);
2555 return -EINVAL; 2584 return -EINVAL;
2585 }
2556 2586
2557 mddev_suspend(mddev); 2587 mddev_suspend(mddev);
2558 conf->log->r5c_journal_mode = mode; 2588 conf->log->r5c_journal_mode = mode;
2559 mddev_resume(mddev); 2589 mddev_resume(mddev);
2590 mddev_unlock(mddev);
2560 2591
2561 pr_debug("md/raid:%s: setting r5c cache mode to %d: %s\n", 2592 pr_debug("md/raid:%s: setting r5c cache mode to %d: %s\n",
2562 mdname(mddev), mode, r5c_journal_mode_str[mode]); 2593 mdname(mddev), mode, r5c_journal_mode_str[mode]);
diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c
index bf45977b2823..d596b601ff42 100644
--- a/drivers/media/cec/cec-adap.c
+++ b/drivers/media/cec/cec-adap.c
@@ -559,7 +559,7 @@ EXPORT_SYMBOL_GPL(cec_transmit_done);
559 559
560void cec_transmit_attempt_done(struct cec_adapter *adap, u8 status) 560void cec_transmit_attempt_done(struct cec_adapter *adap, u8 status)
561{ 561{
562 switch (status) { 562 switch (status & ~CEC_TX_STATUS_MAX_RETRIES) {
563 case CEC_TX_STATUS_OK: 563 case CEC_TX_STATUS_OK:
564 cec_transmit_done(adap, status, 0, 0, 0, 0); 564 cec_transmit_done(adap, status, 0, 0, 0, 0);
565 return; 565 return;
diff --git a/drivers/media/cec/cec-notifier.c b/drivers/media/cec/cec-notifier.c
index 74dc1c32080e..08b619d0ea1e 100644
--- a/drivers/media/cec/cec-notifier.c
+++ b/drivers/media/cec/cec-notifier.c
@@ -87,6 +87,9 @@ EXPORT_SYMBOL_GPL(cec_notifier_put);
87 87
88void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa) 88void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa)
89{ 89{
90 if (n == NULL)
91 return;
92
90 mutex_lock(&n->lock); 93 mutex_lock(&n->lock);
91 n->phys_addr = pa; 94 n->phys_addr = pa;
92 if (n->callback) 95 if (n->callback)
@@ -100,6 +103,9 @@ void cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n,
100{ 103{
101 u16 pa = CEC_PHYS_ADDR_INVALID; 104 u16 pa = CEC_PHYS_ADDR_INVALID;
102 105
106 if (n == NULL)
107 return;
108
103 if (edid && edid->extensions) 109 if (edid && edid->extensions)
104 pa = cec_get_edid_phys_addr((const u8 *)edid, 110 pa = cec_get_edid_phys_addr((const u8 *)edid,
105 EDID_LENGTH * (edid->extensions + 1), NULL); 111 EDID_LENGTH * (edid->extensions + 1), NULL);
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c
index af694f2066a2..17970cdd55fa 100644
--- a/drivers/media/dvb-core/dvb_ca_en50221.c
+++ b/drivers/media/dvb-core/dvb_ca_en50221.c
@@ -349,7 +349,8 @@ static int dvb_ca_en50221_link_init(struct dvb_ca_private *ca, int slot)
349 /* read the buffer size from the CAM */ 349 /* read the buffer size from the CAM */
350 if ((ret = ca->pub->write_cam_control(ca->pub, slot, CTRLIF_COMMAND, IRQEN | CMDREG_SR)) != 0) 350 if ((ret = ca->pub->write_cam_control(ca->pub, slot, CTRLIF_COMMAND, IRQEN | CMDREG_SR)) != 0)
351 return ret; 351 return ret;
352 if ((ret = dvb_ca_en50221_wait_if_status(ca, slot, STATUSREG_DA, HZ / 10)) != 0) 352 ret = dvb_ca_en50221_wait_if_status(ca, slot, STATUSREG_DA, HZ);
353 if (ret != 0)
353 return ret; 354 return ret;
354 if ((ret = dvb_ca_en50221_read_data(ca, slot, buf, 2)) != 2) 355 if ((ret = dvb_ca_en50221_read_data(ca, slot, buf, 2)) != 2)
355 return -EIO; 356 return -EIO;
@@ -644,72 +645,101 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot,
644 } 645 }
645 buf_free = dvb_ringbuffer_free(&ca->slot_info[slot].rx_buffer); 646 buf_free = dvb_ringbuffer_free(&ca->slot_info[slot].rx_buffer);
646 647
647 if (buf_free < (ca->slot_info[slot].link_buf_size + DVB_RINGBUFFER_PKTHDRSIZE)) { 648 if (buf_free < (ca->slot_info[slot].link_buf_size +
649 DVB_RINGBUFFER_PKTHDRSIZE)) {
648 status = -EAGAIN; 650 status = -EAGAIN;
649 goto exit; 651 goto exit;
650 } 652 }
651 } 653 }
652 654
653 /* check if there is data available */ 655 if (ca->pub->read_data &&
654 if ((status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_STATUS)) < 0) 656 (ca->slot_info[slot].slot_state != DVB_CA_SLOTSTATE_LINKINIT)) {
655 goto exit; 657 if (ebuf == NULL)
656 if (!(status & STATUSREG_DA)) { 658 status = ca->pub->read_data(ca->pub, slot, buf,
657 /* no data */ 659 sizeof(buf));
658 status = 0; 660 else
659 goto exit; 661 status = ca->pub->read_data(ca->pub, slot, buf, ecount);
660 } 662 if (status < 0)
661 663 return status;
662 /* read the amount of data */ 664 bytes_read = status;
663 if ((status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_SIZE_HIGH)) < 0) 665 if (status == 0)
664 goto exit; 666 goto exit;
665 bytes_read = status << 8; 667 } else {
666 if ((status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_SIZE_LOW)) < 0)
667 goto exit;
668 bytes_read |= status;
669 668
670 /* check it will fit */ 669 /* check if there is data available */
671 if (ebuf == NULL) { 670 status = ca->pub->read_cam_control(ca->pub, slot,
672 if (bytes_read > ca->slot_info[slot].link_buf_size) { 671 CTRLIF_STATUS);
673 pr_err("dvb_ca adapter %d: CAM tried to send a buffer larger than the link buffer size (%i > %i)!\n", 672 if (status < 0)
674 ca->dvbdev->adapter->num, bytes_read,
675 ca->slot_info[slot].link_buf_size);
676 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_LINKINIT;
677 status = -EIO;
678 goto exit; 673 goto exit;
679 } 674 if (!(status & STATUSREG_DA)) {
680 if (bytes_read < 2) { 675 /* no data */
681 pr_err("dvb_ca adapter %d: CAM sent a buffer that was less than 2 bytes!\n", 676 status = 0;
682 ca->dvbdev->adapter->num);
683 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_LINKINIT;
684 status = -EIO;
685 goto exit; 677 goto exit;
686 } 678 }
687 } else { 679
688 if (bytes_read > ecount) { 680 /* read the amount of data */
689 pr_err("dvb_ca adapter %d: CAM tried to send a buffer larger than the ecount size!\n", 681 status = ca->pub->read_cam_control(ca->pub, slot,
690 ca->dvbdev->adapter->num); 682 CTRLIF_SIZE_HIGH);
691 status = -EIO; 683 if (status < 0)
684 goto exit;
685 bytes_read = status << 8;
686 status = ca->pub->read_cam_control(ca->pub, slot,
687 CTRLIF_SIZE_LOW);
688 if (status < 0)
692 goto exit; 689 goto exit;
690 bytes_read |= status;
691
692 /* check it will fit */
693 if (ebuf == NULL) {
694 if (bytes_read > ca->slot_info[slot].link_buf_size) {
695 pr_err("dvb_ca adapter %d: CAM tried to send a buffer larger than the link buffer size (%i > %i)!\n",
696 ca->dvbdev->adapter->num, bytes_read,
697 ca->slot_info[slot].link_buf_size);
698 ca->slot_info[slot].slot_state =
699 DVB_CA_SLOTSTATE_LINKINIT;
700 status = -EIO;
701 goto exit;
702 }
703 if (bytes_read < 2) {
704 pr_err("dvb_ca adapter %d: CAM sent a buffer that was less than 2 bytes!\n",
705 ca->dvbdev->adapter->num);
706 ca->slot_info[slot].slot_state =
707 DVB_CA_SLOTSTATE_LINKINIT;
708 status = -EIO;
709 goto exit;
710 }
711 } else {
712 if (bytes_read > ecount) {
713 pr_err("dvb_ca adapter %d: CAM tried to send a buffer larger than the ecount size!\n",
714 ca->dvbdev->adapter->num);
715 status = -EIO;
716 goto exit;
717 }
693 } 718 }
694 }
695 719
696 /* fill the buffer */ 720 /* fill the buffer */
697 for (i = 0; i < bytes_read; i++) { 721 for (i = 0; i < bytes_read; i++) {
698 /* read byte and check */ 722 /* read byte and check */
699 if ((status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_DATA)) < 0) 723 status = ca->pub->read_cam_control(ca->pub, slot,
700 goto exit; 724 CTRLIF_DATA);
725 if (status < 0)
726 goto exit;
701 727
702 /* OK, store it in the buffer */ 728 /* OK, store it in the buffer */
703 buf[i] = status; 729 buf[i] = status;
704 } 730 }
705 731
706 /* check for read error (RE should now be 0) */ 732 /* check for read error (RE should now be 0) */
707 if ((status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_STATUS)) < 0) 733 status = ca->pub->read_cam_control(ca->pub, slot,
708 goto exit; 734 CTRLIF_STATUS);
709 if (status & STATUSREG_RE) { 735 if (status < 0)
710 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_LINKINIT; 736 goto exit;
711 status = -EIO; 737 if (status & STATUSREG_RE) {
712 goto exit; 738 ca->slot_info[slot].slot_state =
739 DVB_CA_SLOTSTATE_LINKINIT;
740 status = -EIO;
741 goto exit;
742 }
713 } 743 }
714 744
715 /* OK, add it to the receive buffer, or copy into external buffer if supplied */ 745 /* OK, add it to the receive buffer, or copy into external buffer if supplied */
@@ -762,6 +792,10 @@ static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot,
762 if (bytes_write > ca->slot_info[slot].link_buf_size) 792 if (bytes_write > ca->slot_info[slot].link_buf_size)
763 return -EINVAL; 793 return -EINVAL;
764 794
795 if (ca->pub->write_data &&
796 (ca->slot_info[slot].slot_state != DVB_CA_SLOTSTATE_LINKINIT))
797 return ca->pub->write_data(ca->pub, slot, buf, bytes_write);
798
765 /* it is possible we are dealing with a single buffer implementation, 799 /* it is possible we are dealing with a single buffer implementation,
766 thus if there is data available for read or if there is even a read 800 thus if there is data available for read or if there is even a read
767 already in progress, we do nothing but awake the kernel thread to 801 already in progress, we do nothing but awake the kernel thread to
@@ -1176,7 +1210,8 @@ static int dvb_ca_en50221_thread(void *data)
1176 1210
1177 pr_err("dvb_ca adapter %d: DVB CAM link initialisation failed :(\n", 1211 pr_err("dvb_ca adapter %d: DVB CAM link initialisation failed :(\n",
1178 ca->dvbdev->adapter->num); 1212 ca->dvbdev->adapter->num);
1179 ca->slot_info[slot].slot_state = DVB_CA_SLOTSTATE_INVALID; 1213 ca->slot_info[slot].slot_state =
1214 DVB_CA_SLOTSTATE_UNINITIALISED;
1180 dvb_ca_en50221_thread_update_delay(ca); 1215 dvb_ca_en50221_thread_update_delay(ca);
1181 break; 1216 break;
1182 } 1217 }
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.h b/drivers/media/dvb-core/dvb_ca_en50221.h
index 1e4bbbd34d91..82617bac0875 100644
--- a/drivers/media/dvb-core/dvb_ca_en50221.h
+++ b/drivers/media/dvb-core/dvb_ca_en50221.h
@@ -41,6 +41,8 @@
41 * @write_attribute_mem: function for writing attribute memory on the CAM 41 * @write_attribute_mem: function for writing attribute memory on the CAM
42 * @read_cam_control: function for reading the control interface on the CAM 42 * @read_cam_control: function for reading the control interface on the CAM
43 * @write_cam_control: function for reading the control interface on the CAM 43 * @write_cam_control: function for reading the control interface on the CAM
44 * @read_data: function for reading data (block mode)
45 * @write_data: function for writing data (block mode)
44 * @slot_reset: function to reset the CAM slot 46 * @slot_reset: function to reset the CAM slot
45 * @slot_shutdown: function to shutdown a CAM slot 47 * @slot_shutdown: function to shutdown a CAM slot
46 * @slot_ts_enable: function to enable the Transport Stream on a CAM slot 48 * @slot_ts_enable: function to enable the Transport Stream on a CAM slot
@@ -66,6 +68,11 @@ struct dvb_ca_en50221 {
66 int (*write_cam_control)(struct dvb_ca_en50221 *ca, 68 int (*write_cam_control)(struct dvb_ca_en50221 *ca,
67 int slot, u8 address, u8 value); 69 int slot, u8 address, u8 value);
68 70
71 int (*read_data)(struct dvb_ca_en50221 *ca,
72 int slot, u8 *ebuf, int ecount);
73 int (*write_data)(struct dvb_ca_en50221 *ca,
74 int slot, u8 *ebuf, int ecount);
75
69 int (*slot_reset)(struct dvb_ca_en50221 *ca, int slot); 76 int (*slot_reset)(struct dvb_ca_en50221 *ca, int slot);
70 int (*slot_shutdown)(struct dvb_ca_en50221 *ca, int slot); 77 int (*slot_shutdown)(struct dvb_ca_en50221 *ca, int slot);
71 int (*slot_ts_enable)(struct dvb_ca_en50221 *ca, int slot); 78 int (*slot_ts_enable)(struct dvb_ca_en50221 *ca, int slot);
diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c
index 08f67d60a7d9..12bff778c97f 100644
--- a/drivers/media/dvb-frontends/cxd2841er.c
+++ b/drivers/media/dvb-frontends/cxd2841er.c
@@ -3279,7 +3279,10 @@ static int cxd2841er_get_frontend(struct dvb_frontend *fe,
3279 else if (priv->state == STATE_ACTIVE_TC) 3279 else if (priv->state == STATE_ACTIVE_TC)
3280 cxd2841er_read_status_tc(fe, &status); 3280 cxd2841er_read_status_tc(fe, &status);
3281 3281
3282 cxd2841er_read_signal_strength(fe); 3282 if (priv->state == STATE_ACTIVE_TC || priv->state == STATE_ACTIVE_S)
3283 cxd2841er_read_signal_strength(fe);
3284 else
3285 p->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
3283 3286
3284 if (status & FE_HAS_LOCK) { 3287 if (status & FE_HAS_LOCK) {
3285 cxd2841er_read_snr(fe); 3288 cxd2841er_read_snr(fe);
diff --git a/drivers/media/dvb-frontends/drx39xyj/drx_driver.h b/drivers/media/dvb-frontends/drx39xyj/drx_driver.h
index 4442e478db72..cd69e187ba7a 100644
--- a/drivers/media/dvb-frontends/drx39xyj/drx_driver.h
+++ b/drivers/media/dvb-frontends/drx39xyj/drx_driver.h
@@ -307,7 +307,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner,
307* \def DRX_UNKNOWN 307* \def DRX_UNKNOWN
308* \brief Generic UNKNOWN value for DRX enumerated types. 308* \brief Generic UNKNOWN value for DRX enumerated types.
309* 309*
310* Used to indicate that the parameter value is unknown or not yet initalized. 310* Used to indicate that the parameter value is unknown or not yet initialized.
311*/ 311*/
312#ifndef DRX_UNKNOWN 312#ifndef DRX_UNKNOWN
313#define DRX_UNKNOWN (254) 313#define DRX_UNKNOWN (254)
@@ -450,19 +450,6 @@ MACROS
450 ((u8)((((u16)x)>>8)&0xFF)) 450 ((u8)((((u16)x)>>8)&0xFF))
451 451
452/** 452/**
453* \brief Macro to sign extend signed 9 bit value to signed 16 bit value
454*/
455#define DRX_S9TOS16(x) ((((u16)x)&0x100) ? ((s16)((u16)(x)|0xFF00)) : (x))
456
457/**
458* \brief Macro to sign extend signed 9 bit value to signed 16 bit value
459*/
460#define DRX_S24TODRXFREQ(x) ((((u32) x) & 0x00800000UL) ? \
461 ((s32) \
462 (((u32) x) | 0xFF000000)) : \
463 ((s32) x))
464
465/**
466* \brief Macro to convert 16 bit register value to a s32 453* \brief Macro to convert 16 bit register value to a s32
467*/ 454*/
468#define DRX_U16TODRXFREQ(x) ((x & 0x8000) ? \ 455#define DRX_U16TODRXFREQ(x) ((x & 0x8000) ? \
diff --git a/drivers/media/dvb-frontends/lnbh25.c b/drivers/media/dvb-frontends/lnbh25.c
index ef3021e964be..cb486e879fdd 100644
--- a/drivers/media/dvb-frontends/lnbh25.c
+++ b/drivers/media/dvb-frontends/lnbh25.c
@@ -76,8 +76,8 @@ static int lnbh25_read_vmon(struct lnbh25_priv *priv)
76 return ret; 76 return ret;
77 } 77 }
78 } 78 }
79 print_hex_dump_bytes("lnbh25_read_vmon: ", 79 dev_dbg(&priv->i2c->dev, "%s(): %*ph\n",
80 DUMP_PREFIX_OFFSET, status, sizeof(status)); 80 __func__, (int) sizeof(status), status);
81 if ((status[0] & (LNBH25_STATUS_OFL | LNBH25_STATUS_VMON)) != 0) { 81 if ((status[0] & (LNBH25_STATUS_OFL | LNBH25_STATUS_VMON)) != 0) {
82 dev_err(&priv->i2c->dev, 82 dev_err(&priv->i2c->dev,
83 "%s(): voltage in failure state, status reg 0x%x\n", 83 "%s(): voltage in failure state, status reg 0x%x\n",
@@ -178,7 +178,7 @@ struct dvb_frontend *lnbh25_attach(struct dvb_frontend *fe,
178 fe->ops.release_sec = lnbh25_release; 178 fe->ops.release_sec = lnbh25_release;
179 fe->ops.set_voltage = lnbh25_set_voltage; 179 fe->ops.set_voltage = lnbh25_set_voltage;
180 180
181 dev_err(&i2c->dev, "%s(): attached at I2C addr 0x%02x\n", 181 dev_info(&i2c->dev, "%s(): attached at I2C addr 0x%02x\n",
182 __func__, priv->i2c_address); 182 __func__, priv->i2c_address);
183 return fe; 183 return fe;
184} 184}
diff --git a/drivers/media/dvb-frontends/stv0367.c b/drivers/media/dvb-frontends/stv0367.c
index e726c2e00460..8ac0f598978d 100644
--- a/drivers/media/dvb-frontends/stv0367.c
+++ b/drivers/media/dvb-frontends/stv0367.c
@@ -25,6 +25,8 @@
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/i2c.h> 26#include <linux/i2c.h>
27 27
28#include "dvb_math.h"
29
28#include "stv0367.h" 30#include "stv0367.h"
29#include "stv0367_defs.h" 31#include "stv0367_defs.h"
30#include "stv0367_regs.h" 32#include "stv0367_regs.h"
@@ -1437,7 +1439,7 @@ static int stv0367ter_get_frontend(struct dvb_frontend *fe,
1437 return 0; 1439 return 0;
1438} 1440}
1439 1441
1440static int stv0367ter_read_snr(struct dvb_frontend *fe, u16 *snr) 1442static u32 stv0367ter_snr_readreg(struct dvb_frontend *fe)
1441{ 1443{
1442 struct stv0367_state *state = fe->demodulator_priv; 1444 struct stv0367_state *state = fe->demodulator_priv;
1443 u32 snru32 = 0; 1445 u32 snru32 = 0;
@@ -1453,10 +1455,16 @@ static int stv0367ter_read_snr(struct dvb_frontend *fe, u16 *snr)
1453 1455
1454 cpt++; 1456 cpt++;
1455 } 1457 }
1456
1457 snru32 /= 10;/*average on 10 values*/ 1458 snru32 /= 10;/*average on 10 values*/
1458 1459
1459 *snr = snru32 / 1000; 1460 return snru32;
1461}
1462
1463static int stv0367ter_read_snr(struct dvb_frontend *fe, u16 *snr)
1464{
1465 u32 snrval = stv0367ter_snr_readreg(fe);
1466
1467 *snr = snrval / 1000;
1460 1468
1461 return 0; 1469 return 0;
1462} 1470}
@@ -1501,7 +1509,8 @@ static int stv0367ter_read_status(struct dvb_frontend *fe,
1501 *status = 0; 1509 *status = 0;
1502 1510
1503 if (stv0367_readbits(state, F367TER_LK)) { 1511 if (stv0367_readbits(state, F367TER_LK)) {
1504 *status |= FE_HAS_LOCK; 1512 *status = FE_HAS_SIGNAL | FE_HAS_CARRIER | FE_HAS_VITERBI
1513 | FE_HAS_SYNC | FE_HAS_LOCK;
1505 dprintk("%s: stv0367 has locked\n", __func__); 1514 dprintk("%s: stv0367 has locked\n", __func__);
1506 } 1515 }
1507 1516
@@ -2149,6 +2158,18 @@ static int stv0367cab_read_status(struct dvb_frontend *fe,
2149 2158
2150 *status = 0; 2159 *status = 0;
2151 2160
2161 if (state->cab_state->state > FE_CAB_NOSIGNAL)
2162 *status |= FE_HAS_SIGNAL;
2163
2164 if (state->cab_state->state > FE_CAB_NOCARRIER)
2165 *status |= FE_HAS_CARRIER;
2166
2167 if (state->cab_state->state >= FE_CAB_DEMODOK)
2168 *status |= FE_HAS_VITERBI;
2169
2170 if (state->cab_state->state >= FE_CAB_DATAOK)
2171 *status |= FE_HAS_SYNC;
2172
2152 if (stv0367_readbits(state, (state->cab_state->qamfec_status_reg ? 2173 if (stv0367_readbits(state, (state->cab_state->qamfec_status_reg ?
2153 state->cab_state->qamfec_status_reg : F367CAB_QAMFEC_LOCK))) { 2174 state->cab_state->qamfec_status_reg : F367CAB_QAMFEC_LOCK))) {
2154 *status |= FE_HAS_LOCK; 2175 *status |= FE_HAS_LOCK;
@@ -2702,51 +2723,61 @@ static int stv0367cab_read_strength(struct dvb_frontend *fe, u16 *strength)
2702 return 0; 2723 return 0;
2703} 2724}
2704 2725
2705static int stv0367cab_read_snr(struct dvb_frontend *fe, u16 *snr) 2726static int stv0367cab_snr_power(struct dvb_frontend *fe)
2706{ 2727{
2707 struct stv0367_state *state = fe->demodulator_priv; 2728 struct stv0367_state *state = fe->demodulator_priv;
2708 u32 noisepercentage;
2709 enum stv0367cab_mod QAMSize; 2729 enum stv0367cab_mod QAMSize;
2710 u32 regval = 0, temp = 0;
2711 int power, i;
2712 2730
2713 QAMSize = stv0367_readbits(state, F367CAB_QAM_MODE); 2731 QAMSize = stv0367_readbits(state, F367CAB_QAM_MODE);
2714 switch (QAMSize) { 2732 switch (QAMSize) {
2715 case FE_CAB_MOD_QAM4: 2733 case FE_CAB_MOD_QAM4:
2716 power = 21904; 2734 return 21904;
2717 break;
2718 case FE_CAB_MOD_QAM16: 2735 case FE_CAB_MOD_QAM16:
2719 power = 20480; 2736 return 20480;
2720 break;
2721 case FE_CAB_MOD_QAM32: 2737 case FE_CAB_MOD_QAM32:
2722 power = 23040; 2738 return 23040;
2723 break;
2724 case FE_CAB_MOD_QAM64: 2739 case FE_CAB_MOD_QAM64:
2725 power = 21504; 2740 return 21504;
2726 break;
2727 case FE_CAB_MOD_QAM128: 2741 case FE_CAB_MOD_QAM128:
2728 power = 23616; 2742 return 23616;
2729 break;
2730 case FE_CAB_MOD_QAM256: 2743 case FE_CAB_MOD_QAM256:
2731 power = 21760; 2744 return 21760;
2732 break;
2733 case FE_CAB_MOD_QAM512:
2734 power = 1;
2735 break;
2736 case FE_CAB_MOD_QAM1024: 2745 case FE_CAB_MOD_QAM1024:
2737 power = 21280; 2746 return 21280;
2738 break;
2739 default: 2747 default:
2740 power = 1;
2741 break; 2748 break;
2742 } 2749 }
2743 2750
2751 return 1;
2752}
2753
2754static int stv0367cab_snr_readreg(struct dvb_frontend *fe, int avgdiv)
2755{
2756 struct stv0367_state *state = fe->demodulator_priv;
2757 u32 regval = 0;
2758 int i;
2759
2744 for (i = 0; i < 10; i++) { 2760 for (i = 0; i < 10; i++) {
2745 regval += (stv0367_readbits(state, F367CAB_SNR_LO) 2761 regval += (stv0367_readbits(state, F367CAB_SNR_LO)
2746 + 256 * stv0367_readbits(state, F367CAB_SNR_HI)); 2762 + 256 * stv0367_readbits(state, F367CAB_SNR_HI));
2747 } 2763 }
2748 2764
2749 regval /= 10; /*for average over 10 times in for loop above*/ 2765 if (avgdiv)
2766 regval /= 10;
2767
2768 return regval;
2769}
2770
2771static int stv0367cab_read_snr(struct dvb_frontend *fe, u16 *snr)
2772{
2773 struct stv0367_state *state = fe->demodulator_priv;
2774 u32 noisepercentage;
2775 u32 regval = 0, temp = 0;
2776 int power;
2777
2778 power = stv0367cab_snr_power(fe);
2779 regval = stv0367cab_snr_readreg(fe, 1);
2780
2750 if (regval != 0) { 2781 if (regval != 0) {
2751 temp = power 2782 temp = power
2752 * (1 << (3 + stv0367_readbits(state, F367CAB_SNR_PER))); 2783 * (1 << (3 + stv0367_readbits(state, F367CAB_SNR_PER)));
@@ -2980,21 +3011,117 @@ static int stv0367ddb_set_frontend(struct dvb_frontend *fe)
2980 return -EINVAL; 3011 return -EINVAL;
2981} 3012}
2982 3013
3014static void stv0367ddb_read_signal_strength(struct dvb_frontend *fe)
3015{
3016 struct stv0367_state *state = fe->demodulator_priv;
3017 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
3018 s32 signalstrength;
3019
3020 switch (state->activedemod) {
3021 case demod_cab:
3022 signalstrength = stv0367cab_get_rf_lvl(state) * 1000;
3023 break;
3024 default:
3025 p->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
3026 return;
3027 }
3028
3029 p->strength.stat[0].scale = FE_SCALE_DECIBEL;
3030 p->strength.stat[0].uvalue = signalstrength;
3031}
3032
3033static void stv0367ddb_read_snr(struct dvb_frontend *fe)
3034{
3035 struct stv0367_state *state = fe->demodulator_priv;
3036 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
3037 int cab_pwr;
3038 u32 regval, tmpval, snrval = 0;
3039
3040 switch (state->activedemod) {
3041 case demod_ter:
3042 snrval = stv0367ter_snr_readreg(fe);
3043 break;
3044 case demod_cab:
3045 cab_pwr = stv0367cab_snr_power(fe);
3046 regval = stv0367cab_snr_readreg(fe, 0);
3047
3048 /* prevent division by zero */
3049 if (!regval) {
3050 snrval = 0;
3051 break;
3052 }
3053
3054 tmpval = (cab_pwr * 320) / regval;
3055 snrval = ((tmpval != 0) ? (intlog2(tmpval) / 5581) : 0);
3056 break;
3057 default:
3058 p->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
3059 return;
3060 }
3061
3062 p->cnr.stat[0].scale = FE_SCALE_DECIBEL;
3063 p->cnr.stat[0].uvalue = snrval;
3064}
3065
3066static void stv0367ddb_read_ucblocks(struct dvb_frontend *fe)
3067{
3068 struct stv0367_state *state = fe->demodulator_priv;
3069 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
3070 u32 ucblocks = 0;
3071
3072 switch (state->activedemod) {
3073 case demod_ter:
3074 stv0367ter_read_ucblocks(fe, &ucblocks);
3075 break;
3076 case demod_cab:
3077 stv0367cab_read_ucblcks(fe, &ucblocks);
3078 break;
3079 default:
3080 p->block_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
3081 return;
3082 }
3083
3084 p->block_error.stat[0].scale = FE_SCALE_COUNTER;
3085 p->block_error.stat[0].uvalue = ucblocks;
3086}
3087
2983static int stv0367ddb_read_status(struct dvb_frontend *fe, 3088static int stv0367ddb_read_status(struct dvb_frontend *fe,
2984 enum fe_status *status) 3089 enum fe_status *status)
2985{ 3090{
2986 struct stv0367_state *state = fe->demodulator_priv; 3091 struct stv0367_state *state = fe->demodulator_priv;
3092 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
3093 int ret;
2987 3094
2988 switch (state->activedemod) { 3095 switch (state->activedemod) {
2989 case demod_ter: 3096 case demod_ter:
2990 return stv0367ter_read_status(fe, status); 3097 ret = stv0367ter_read_status(fe, status);
3098 break;
2991 case demod_cab: 3099 case demod_cab:
2992 return stv0367cab_read_status(fe, status); 3100 ret = stv0367cab_read_status(fe, status);
2993 default:
2994 break; 3101 break;
3102 default:
3103 return 0;
2995 } 3104 }
2996 3105
2997 return -EINVAL; 3106 /* stop and report on *_read_status failure */
3107 if (ret)
3108 return ret;
3109
3110 stv0367ddb_read_signal_strength(fe);
3111
3112 /* read carrier/noise when a carrier is detected */
3113 if (*status & FE_HAS_CARRIER)
3114 stv0367ddb_read_snr(fe);
3115 else
3116 p->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
3117
3118 /* read uncorrected blocks on FE_HAS_LOCK */
3119 if (*status & FE_HAS_LOCK)
3120 stv0367ddb_read_ucblocks(fe);
3121 else
3122 p->block_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
3123
3124 return 0;
2998} 3125}
2999 3126
3000static int stv0367ddb_get_frontend(struct dvb_frontend *fe, 3127static int stv0367ddb_get_frontend(struct dvb_frontend *fe,
@@ -3035,6 +3162,7 @@ static int stv0367ddb_sleep(struct dvb_frontend *fe)
3035static int stv0367ddb_init(struct stv0367_state *state) 3162static int stv0367ddb_init(struct stv0367_state *state)
3036{ 3163{
3037 struct stv0367ter_state *ter_state = state->ter_state; 3164 struct stv0367ter_state *ter_state = state->ter_state;
3165 struct dtv_frontend_properties *p = &state->fe.dtv_property_cache;
3038 3166
3039 stv0367_writereg(state, R367TER_TOPCTRL, 0x10); 3167 stv0367_writereg(state, R367TER_TOPCTRL, 0x10);
3040 3168
@@ -3109,6 +3237,13 @@ static int stv0367ddb_init(struct stv0367_state *state)
3109 ter_state->first_lock = 0; 3237 ter_state->first_lock = 0;
3110 ter_state->unlock_counter = 2; 3238 ter_state->unlock_counter = 2;
3111 3239
3240 p->strength.len = 1;
3241 p->strength.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
3242 p->cnr.len = 1;
3243 p->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
3244 p->block_error.len = 1;
3245 p->block_error.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
3246
3112 return 0; 3247 return 0;
3113} 3248}
3114 3249
@@ -3126,15 +3261,12 @@ static const struct dvb_frontend_ops stv0367ddb_ops = {
3126 0x400 |/* FE_CAN_QAM_4 */ 3261 0x400 |/* FE_CAN_QAM_4 */
3127 FE_CAN_QAM_16 | FE_CAN_QAM_32 | 3262 FE_CAN_QAM_16 | FE_CAN_QAM_32 |
3128 FE_CAN_QAM_64 | FE_CAN_QAM_128 | 3263 FE_CAN_QAM_64 | FE_CAN_QAM_128 |
3129 FE_CAN_QAM_256 | FE_CAN_FEC_AUTO | 3264 FE_CAN_QAM_256 | FE_CAN_QAM_AUTO |
3130 /* DVB-T */ 3265 /* DVB-T */
3131 FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | 3266 FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
3132 FE_CAN_FEC_3_4 | FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | 3267 FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
3133 FE_CAN_FEC_AUTO | 3268 FE_CAN_QPSK | FE_CAN_TRANSMISSION_MODE_AUTO |
3134 FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | 3269 FE_CAN_RECOVER | FE_CAN_INVERSION_AUTO |
3135 FE_CAN_QAM_128 | FE_CAN_QAM_256 | FE_CAN_QAM_AUTO |
3136 FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_RECOVER |
3137 FE_CAN_INVERSION_AUTO |
3138 FE_CAN_MUTE_TS 3270 FE_CAN_MUTE_TS
3139 }, 3271 },
3140 .release = stv0367_release, 3272 .release = stv0367_release,
diff --git a/drivers/media/i2c/et8ek8/et8ek8_driver.c b/drivers/media/i2c/et8ek8/et8ek8_driver.c
index 6e313d5243a0..f39f5179dd95 100644
--- a/drivers/media/i2c/et8ek8/et8ek8_driver.c
+++ b/drivers/media/i2c/et8ek8/et8ek8_driver.c
@@ -1496,7 +1496,6 @@ MODULE_DEVICE_TABLE(i2c, et8ek8_id_table);
1496static const struct dev_pm_ops et8ek8_pm_ops = { 1496static const struct dev_pm_ops et8ek8_pm_ops = {
1497 SET_SYSTEM_SLEEP_PM_OPS(et8ek8_suspend, et8ek8_resume) 1497 SET_SYSTEM_SLEEP_PM_OPS(et8ek8_suspend, et8ek8_resume)
1498}; 1498};
1499MODULE_DEVICE_TABLE(of, et8ek8_of_table);
1500 1499
1501static struct i2c_driver et8ek8_i2c_driver = { 1500static struct i2c_driver et8ek8_i2c_driver = {
1502 .driver = { 1501 .driver = {
diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c
index 9da4bf4f2c7a..7b79a7498751 100644
--- a/drivers/media/i2c/tvp5150.c
+++ b/drivers/media/i2c/tvp5150.c
@@ -659,7 +659,7 @@ static int tvp5150_set_vbi(struct v4l2_subdev *sd,
659 struct tvp5150 *decoder = to_tvp5150(sd); 659 struct tvp5150 *decoder = to_tvp5150(sd);
660 v4l2_std_id std = decoder->norm; 660 v4l2_std_id std = decoder->norm;
661 u8 reg; 661 u8 reg;
662 int pos=0; 662 int pos = 0;
663 663
664 if (std == V4L2_STD_ALL) { 664 if (std == V4L2_STD_ALL) {
665 dev_err(sd->dev, "VBI can't be configured without knowing number of lines\n"); 665 dev_err(sd->dev, "VBI can't be configured without knowing number of lines\n");
@@ -669,33 +669,30 @@ static int tvp5150_set_vbi(struct v4l2_subdev *sd,
669 line += 3; 669 line += 3;
670 } 670 }
671 671
672 if (line<6||line>27) 672 if (line < 6 || line > 27)
673 return 0; 673 return 0;
674 674
675 while (regs->reg != (u16)-1 ) { 675 while (regs->reg != (u16)-1) {
676 if ((type & regs->type.vbi_type) && 676 if ((type & regs->type.vbi_type) &&
677 (line>=regs->type.ini_line) && 677 (line >= regs->type.ini_line) &&
678 (line<=regs->type.end_line)) { 678 (line <= regs->type.end_line))
679 type=regs->type.vbi_type;
680 break; 679 break;
681 }
682 680
683 regs++; 681 regs++;
684 pos++; 682 pos++;
685 } 683 }
684
686 if (regs->reg == (u16)-1) 685 if (regs->reg == (u16)-1)
687 return 0; 686 return 0;
688 687
689 type=pos | (flags & 0xf0); 688 type = pos | (flags & 0xf0);
690 reg=((line-6)<<1)+TVP5150_LINE_MODE_INI; 689 reg = ((line - 6) << 1) + TVP5150_LINE_MODE_INI;
691 690
692 if (fields&1) { 691 if (fields & 1)
693 tvp5150_write(sd, reg, type); 692 tvp5150_write(sd, reg, type);
694 }
695 693
696 if (fields&2) { 694 if (fields & 2)
697 tvp5150_write(sd, reg+1, type); 695 tvp5150_write(sd, reg + 1, type);
698 }
699 696
700 return type; 697 return type;
701} 698}
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index 9420479bee9a..cd1723e79a07 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -17,6 +17,8 @@
17 * http://www.gnu.org/copyleft/gpl.html 17 * http://www.gnu.org/copyleft/gpl.html
18 */ 18 */
19 19
20#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
21
20#include <linux/module.h> 22#include <linux/module.h>
21#include <linux/init.h> 23#include <linux/init.h>
22#include <linux/interrupt.h> 24#include <linux/interrupt.h>
@@ -114,6 +116,19 @@ static int i2c_write_reg(struct i2c_adapter *adap, u8 adr,
114 return i2c_write(adap, adr, msg, 2); 116 return i2c_write(adap, adr, msg, 2);
115} 117}
116 118
119static inline u32 safe_ddbreadl(struct ddb *dev, u32 adr)
120{
121 u32 val = ddbreadl(adr);
122
123 /* (ddb)readl returns (uint)-1 (all bits set) on failure, catch that */
124 if (val == ~0) {
125 dev_err(&dev->pdev->dev, "ddbreadl failure, adr=%08x\n", adr);
126 return 0;
127 }
128
129 return val;
130}
131
117static int ddb_i2c_cmd(struct ddb_i2c *i2c, u32 adr, u32 cmd) 132static int ddb_i2c_cmd(struct ddb_i2c *i2c, u32 adr, u32 cmd)
118{ 133{
119 struct ddb *dev = i2c->dev; 134 struct ddb *dev = i2c->dev;
@@ -124,10 +139,10 @@ static int ddb_i2c_cmd(struct ddb_i2c *i2c, u32 adr, u32 cmd)
124 ddbwritel((adr << 9) | cmd, i2c->regs + I2C_COMMAND); 139 ddbwritel((adr << 9) | cmd, i2c->regs + I2C_COMMAND);
125 stat = wait_event_timeout(i2c->wq, i2c->done == 1, HZ); 140 stat = wait_event_timeout(i2c->wq, i2c->done == 1, HZ);
126 if (stat == 0) { 141 if (stat == 0) {
127 printk(KERN_ERR "I2C timeout\n"); 142 dev_err(&dev->pdev->dev, "I2C timeout\n");
128 { /* MSI debugging*/ 143 { /* MSI debugging*/
129 u32 istat = ddbreadl(INTERRUPT_STATUS); 144 u32 istat = ddbreadl(INTERRUPT_STATUS);
130 printk(KERN_ERR "IRS %08x\n", istat); 145 dev_err(&dev->pdev->dev, "IRS %08x\n", istat);
131 ddbwritel(istat, INTERRUPT_ACK); 146 ddbwritel(istat, INTERRUPT_ACK);
132 } 147 }
133 return -EIO; 148 return -EIO;
@@ -533,7 +548,7 @@ static u32 ddb_input_avail(struct ddb_input *input)
533 off = (stat & 0x7ff) << 7; 548 off = (stat & 0x7ff) << 7;
534 549
535 if (ctrl & 4) { 550 if (ctrl & 4) {
536 printk(KERN_ERR "IA %d %d %08x\n", idx, off, ctrl); 551 dev_err(&dev->pdev->dev, "IA %d %d %08x\n", idx, off, ctrl);
537 ddbwritel(input->stat, DMA_BUFFER_ACK(input->nr)); 552 ddbwritel(input->stat, DMA_BUFFER_ACK(input->nr));
538 return 0; 553 return 0;
539 } 554 }
@@ -611,6 +626,7 @@ static int demod_attach_drxk(struct ddb_input *input)
611 struct i2c_adapter *i2c = &input->port->i2c->adap; 626 struct i2c_adapter *i2c = &input->port->i2c->adap;
612 struct dvb_frontend *fe; 627 struct dvb_frontend *fe;
613 struct drxk_config config; 628 struct drxk_config config;
629 struct device *dev = &input->port->dev->pdev->dev;
614 630
615 memset(&config, 0, sizeof(config)); 631 memset(&config, 0, sizeof(config));
616 config.microcode_name = "drxk_a3.mc"; 632 config.microcode_name = "drxk_a3.mc";
@@ -619,7 +635,7 @@ static int demod_attach_drxk(struct ddb_input *input)
619 635
620 fe = input->fe = dvb_attach(drxk_attach, &config, i2c); 636 fe = input->fe = dvb_attach(drxk_attach, &config, i2c);
621 if (!input->fe) { 637 if (!input->fe) {
622 printk(KERN_ERR "No DRXK found!\n"); 638 dev_err(dev, "No DRXK found!\n");
623 return -ENODEV; 639 return -ENODEV;
624 } 640 }
625 fe->sec_priv = input; 641 fe->sec_priv = input;
@@ -632,12 +648,13 @@ static int tuner_attach_tda18271(struct ddb_input *input)
632{ 648{
633 struct i2c_adapter *i2c = &input->port->i2c->adap; 649 struct i2c_adapter *i2c = &input->port->i2c->adap;
634 struct dvb_frontend *fe; 650 struct dvb_frontend *fe;
651 struct device *dev = &input->port->dev->pdev->dev;
635 652
636 if (input->fe->ops.i2c_gate_ctrl) 653 if (input->fe->ops.i2c_gate_ctrl)
637 input->fe->ops.i2c_gate_ctrl(input->fe, 1); 654 input->fe->ops.i2c_gate_ctrl(input->fe, 1);
638 fe = dvb_attach(tda18271c2dd_attach, input->fe, i2c, 0x60); 655 fe = dvb_attach(tda18271c2dd_attach, input->fe, i2c, 0x60);
639 if (!fe) { 656 if (!fe) {
640 printk(KERN_ERR "No TDA18271 found!\n"); 657 dev_err(dev, "No TDA18271 found!\n");
641 return -ENODEV; 658 return -ENODEV;
642 } 659 }
643 if (input->fe->ops.i2c_gate_ctrl) 660 if (input->fe->ops.i2c_gate_ctrl)
@@ -670,13 +687,14 @@ static struct stv0367_config ddb_stv0367_config[] = {
670static int demod_attach_stv0367(struct ddb_input *input) 687static int demod_attach_stv0367(struct ddb_input *input)
671{ 688{
672 struct i2c_adapter *i2c = &input->port->i2c->adap; 689 struct i2c_adapter *i2c = &input->port->i2c->adap;
690 struct device *dev = &input->port->dev->pdev->dev;
673 691
674 /* attach frontend */ 692 /* attach frontend */
675 input->fe = dvb_attach(stv0367ddb_attach, 693 input->fe = dvb_attach(stv0367ddb_attach,
676 &ddb_stv0367_config[(input->nr & 1)], i2c); 694 &ddb_stv0367_config[(input->nr & 1)], i2c);
677 695
678 if (!input->fe) { 696 if (!input->fe) {
679 printk(KERN_ERR "stv0367ddb_attach failed (not found?)\n"); 697 dev_err(dev, "stv0367ddb_attach failed (not found?)\n");
680 return -ENODEV; 698 return -ENODEV;
681 } 699 }
682 700
@@ -690,17 +708,19 @@ static int demod_attach_stv0367(struct ddb_input *input)
690static int tuner_tda18212_ping(struct ddb_input *input, unsigned short adr) 708static int tuner_tda18212_ping(struct ddb_input *input, unsigned short adr)
691{ 709{
692 struct i2c_adapter *adapter = &input->port->i2c->adap; 710 struct i2c_adapter *adapter = &input->port->i2c->adap;
711 struct device *dev = &input->port->dev->pdev->dev;
712
693 u8 tda_id[2]; 713 u8 tda_id[2];
694 u8 subaddr = 0x00; 714 u8 subaddr = 0x00;
695 715
696 printk(KERN_DEBUG "stv0367-tda18212 tuner ping\n"); 716 dev_dbg(dev, "stv0367-tda18212 tuner ping\n");
697 if (input->fe->ops.i2c_gate_ctrl) 717 if (input->fe->ops.i2c_gate_ctrl)
698 input->fe->ops.i2c_gate_ctrl(input->fe, 1); 718 input->fe->ops.i2c_gate_ctrl(input->fe, 1);
699 719
700 if (i2c_read_regs(adapter, adr, subaddr, tda_id, sizeof(tda_id)) < 0) 720 if (i2c_read_regs(adapter, adr, subaddr, tda_id, sizeof(tda_id)) < 0)
701 printk(KERN_DEBUG "tda18212 ping 1 fail\n"); 721 dev_dbg(dev, "tda18212 ping 1 fail\n");
702 if (i2c_read_regs(adapter, adr, subaddr, tda_id, sizeof(tda_id)) < 0) 722 if (i2c_read_regs(adapter, adr, subaddr, tda_id, sizeof(tda_id)) < 0)
703 printk(KERN_DEBUG "tda18212 ping 2 fail\n"); 723 dev_warn(dev, "tda18212 ping failed, expect problems\n");
704 724
705 if (input->fe->ops.i2c_gate_ctrl) 725 if (input->fe->ops.i2c_gate_ctrl)
706 input->fe->ops.i2c_gate_ctrl(input->fe, 0); 726 input->fe->ops.i2c_gate_ctrl(input->fe, 0);
@@ -711,6 +731,7 @@ static int tuner_tda18212_ping(struct ddb_input *input, unsigned short adr)
711static int demod_attach_cxd28xx(struct ddb_input *input, int par, int osc24) 731static int demod_attach_cxd28xx(struct ddb_input *input, int par, int osc24)
712{ 732{
713 struct i2c_adapter *i2c = &input->port->i2c->adap; 733 struct i2c_adapter *i2c = &input->port->i2c->adap;
734 struct device *dev = &input->port->dev->pdev->dev;
714 struct cxd2841er_config cfg; 735 struct cxd2841er_config cfg;
715 736
716 /* the cxd2841er driver expects 8bit/shifted I2C addresses */ 737 /* the cxd2841er driver expects 8bit/shifted I2C addresses */
@@ -728,7 +749,7 @@ static int demod_attach_cxd28xx(struct ddb_input *input, int par, int osc24)
728 input->fe = dvb_attach(cxd2841er_attach_t_c, &cfg, i2c); 749 input->fe = dvb_attach(cxd2841er_attach_t_c, &cfg, i2c);
729 750
730 if (!input->fe) { 751 if (!input->fe) {
731 printk(KERN_ERR "No Sony CXD28xx found!\n"); 752 dev_err(dev, "No Sony CXD28xx found!\n");
732 return -ENODEV; 753 return -ENODEV;
733 } 754 }
734 755
@@ -742,6 +763,7 @@ static int demod_attach_cxd28xx(struct ddb_input *input, int par, int osc24)
742static int tuner_attach_tda18212(struct ddb_input *input, u32 porttype) 763static int tuner_attach_tda18212(struct ddb_input *input, u32 porttype)
743{ 764{
744 struct i2c_adapter *adapter = &input->port->i2c->adap; 765 struct i2c_adapter *adapter = &input->port->i2c->adap;
766 struct device *dev = &input->port->dev->pdev->dev;
745 struct i2c_client *client; 767 struct i2c_client *client;
746 struct tda18212_config config = { 768 struct tda18212_config config = {
747 .fe = input->fe, 769 .fe = input->fe,
@@ -786,7 +808,7 @@ static int tuner_attach_tda18212(struct ddb_input *input, u32 porttype)
786 808
787 return 0; 809 return 0;
788err: 810err:
789 printk(KERN_INFO "TDA18212 tuner not found. Device is not fully operational.\n"); 811 dev_warn(dev, "TDA18212 tuner not found. Device is not fully operational.\n");
790 return -ENODEV; 812 return -ENODEV;
791} 813}
792 814
@@ -847,19 +869,20 @@ static struct stv6110x_config stv6110b = {
847static int demod_attach_stv0900(struct ddb_input *input, int type) 869static int demod_attach_stv0900(struct ddb_input *input, int type)
848{ 870{
849 struct i2c_adapter *i2c = &input->port->i2c->adap; 871 struct i2c_adapter *i2c = &input->port->i2c->adap;
872 struct device *dev = &input->port->dev->pdev->dev;
850 struct stv090x_config *feconf = type ? &stv0900_aa : &stv0900; 873 struct stv090x_config *feconf = type ? &stv0900_aa : &stv0900;
851 874
852 input->fe = dvb_attach(stv090x_attach, feconf, i2c, 875 input->fe = dvb_attach(stv090x_attach, feconf, i2c,
853 (input->nr & 1) ? STV090x_DEMODULATOR_1 876 (input->nr & 1) ? STV090x_DEMODULATOR_1
854 : STV090x_DEMODULATOR_0); 877 : STV090x_DEMODULATOR_0);
855 if (!input->fe) { 878 if (!input->fe) {
856 printk(KERN_ERR "No STV0900 found!\n"); 879 dev_err(dev, "No STV0900 found!\n");
857 return -ENODEV; 880 return -ENODEV;
858 } 881 }
859 if (!dvb_attach(lnbh24_attach, input->fe, i2c, 0, 882 if (!dvb_attach(lnbh24_attach, input->fe, i2c, 0,
860 0, (input->nr & 1) ? 883 0, (input->nr & 1) ?
861 (0x09 - type) : (0x0b - type))) { 884 (0x09 - type) : (0x0b - type))) {
862 printk(KERN_ERR "No LNBH24 found!\n"); 885 dev_err(dev, "No LNBH24 found!\n");
863 return -ENODEV; 886 return -ENODEV;
864 } 887 }
865 return 0; 888 return 0;
@@ -868,6 +891,7 @@ static int demod_attach_stv0900(struct ddb_input *input, int type)
868static int tuner_attach_stv6110(struct ddb_input *input, int type) 891static int tuner_attach_stv6110(struct ddb_input *input, int type)
869{ 892{
870 struct i2c_adapter *i2c = &input->port->i2c->adap; 893 struct i2c_adapter *i2c = &input->port->i2c->adap;
894 struct device *dev = &input->port->dev->pdev->dev;
871 struct stv090x_config *feconf = type ? &stv0900_aa : &stv0900; 895 struct stv090x_config *feconf = type ? &stv0900_aa : &stv0900;
872 struct stv6110x_config *tunerconf = (input->nr & 1) ? 896 struct stv6110x_config *tunerconf = (input->nr & 1) ?
873 &stv6110b : &stv6110a; 897 &stv6110b : &stv6110a;
@@ -875,10 +899,10 @@ static int tuner_attach_stv6110(struct ddb_input *input, int type)
875 899
876 ctl = dvb_attach(stv6110x_attach, input->fe, tunerconf, i2c); 900 ctl = dvb_attach(stv6110x_attach, input->fe, tunerconf, i2c);
877 if (!ctl) { 901 if (!ctl) {
878 printk(KERN_ERR "No STV6110X found!\n"); 902 dev_err(dev, "No STV6110X found!\n");
879 return -ENODEV; 903 return -ENODEV;
880 } 904 }
881 printk(KERN_INFO "attach tuner input %d adr %02x\n", 905 dev_info(dev, "attach tuner input %d adr %02x\n",
882 input->nr, tunerconf->addr); 906 input->nr, tunerconf->addr);
883 907
884 feconf->tuner_init = ctl->tuner_init; 908 feconf->tuner_init = ctl->tuner_init;
@@ -1009,13 +1033,14 @@ static int dvb_input_attach(struct ddb_input *input)
1009 struct ddb_port *port = input->port; 1033 struct ddb_port *port = input->port;
1010 struct dvb_adapter *adap = &input->adap; 1034 struct dvb_adapter *adap = &input->adap;
1011 struct dvb_demux *dvbdemux = &input->demux; 1035 struct dvb_demux *dvbdemux = &input->demux;
1036 struct device *dev = &input->port->dev->pdev->dev;
1012 int sony_osc24 = 0, sony_tspar = 0; 1037 int sony_osc24 = 0, sony_tspar = 0;
1013 1038
1014 ret = dvb_register_adapter(adap, "DDBridge", THIS_MODULE, 1039 ret = dvb_register_adapter(adap, "DDBridge", THIS_MODULE,
1015 &input->port->dev->pdev->dev, 1040 &input->port->dev->pdev->dev,
1016 adapter_nr); 1041 adapter_nr);
1017 if (ret < 0) { 1042 if (ret < 0) {
1018 printk(KERN_ERR "ddbridge: Could not register adapter.Check if you enabled enough adapters in dvb-core!\n"); 1043 dev_err(dev, "Could not register adapter. Check if you enabled enough adapters in dvb-core!\n");
1019 return ret; 1044 return ret;
1020 } 1045 }
1021 input->attached = 1; 1046 input->attached = 1;
@@ -1241,9 +1266,9 @@ static void input_tasklet(unsigned long data)
1241 1266
1242 if (input->port->class == DDB_PORT_TUNER) { 1267 if (input->port->class == DDB_PORT_TUNER) {
1243 if (4&ddbreadl(DMA_BUFFER_CONTROL(input->nr))) 1268 if (4&ddbreadl(DMA_BUFFER_CONTROL(input->nr)))
1244 printk(KERN_ERR "Overflow input %d\n", input->nr); 1269 dev_err(&dev->pdev->dev, "Overflow input %d\n", input->nr);
1245 while (input->cbuf != ((input->stat >> 11) & 0x1f) 1270 while (input->cbuf != ((input->stat >> 11) & 0x1f)
1246 || (4&ddbreadl(DMA_BUFFER_CONTROL(input->nr)))) { 1271 || (4 & safe_ddbreadl(dev, DMA_BUFFER_CONTROL(input->nr)))) {
1247 dvb_dmx_swfilter_packets(&input->demux, 1272 dvb_dmx_swfilter_packets(&input->demux,
1248 input->vbuf[input->cbuf], 1273 input->vbuf[input->cbuf],
1249 input->dma_buf_size / 188); 1274 input->dma_buf_size / 188);
@@ -1280,6 +1305,7 @@ static struct cxd2099_cfg cxd_cfg = {
1280 .adr = 0x40, 1305 .adr = 0x40,
1281 .polarity = 1, 1306 .polarity = 1,
1282 .clock_mode = 1, 1307 .clock_mode = 1,
1308 .max_i2c = 512,
1283}; 1309};
1284 1310
1285static int ddb_ci_attach(struct ddb_port *port) 1311static int ddb_ci_attach(struct ddb_port *port)
@@ -1310,6 +1336,7 @@ static int ddb_ci_attach(struct ddb_port *port)
1310 1336
1311static int ddb_port_attach(struct ddb_port *port) 1337static int ddb_port_attach(struct ddb_port *port)
1312{ 1338{
1339 struct device *dev = &port->dev->pdev->dev;
1313 int ret = 0; 1340 int ret = 0;
1314 1341
1315 switch (port->class) { 1342 switch (port->class) {
@@ -1326,7 +1353,7 @@ static int ddb_port_attach(struct ddb_port *port)
1326 break; 1353 break;
1327 } 1354 }
1328 if (ret < 0) 1355 if (ret < 0)
1329 printk(KERN_ERR "port_attach on port %d failed\n", port->nr); 1356 dev_err(dev, "port_attach on port %d failed\n", port->nr);
1330 return ret; 1357 return ret;
1331} 1358}
1332 1359
@@ -1377,6 +1404,7 @@ static void ddb_ports_detach(struct ddb *dev)
1377static int init_xo2(struct ddb_port *port) 1404static int init_xo2(struct ddb_port *port)
1378{ 1405{
1379 struct i2c_adapter *i2c = &port->i2c->adap; 1406 struct i2c_adapter *i2c = &port->i2c->adap;
1407 struct device *dev = &port->dev->pdev->dev;
1380 u8 val, data[2]; 1408 u8 val, data[2];
1381 int res; 1409 int res;
1382 1410
@@ -1385,7 +1413,7 @@ static int init_xo2(struct ddb_port *port)
1385 return res; 1413 return res;
1386 1414
1387 if (data[0] != 0x01) { 1415 if (data[0] != 0x01) {
1388 pr_info("Port %d: invalid XO2\n", port->nr); 1416 dev_info(dev, "Port %d: invalid XO2\n", port->nr);
1389 return -1; 1417 return -1;
1390 } 1418 }
1391 1419
@@ -1511,7 +1539,7 @@ static void ddb_port_probe(struct ddb_port *port)
1511 port->class = DDB_PORT_CI; 1539 port->class = DDB_PORT_CI;
1512 ddbwritel(I2C_SPEED_400, port->i2c->regs + I2C_TIMING); 1540 ddbwritel(I2C_SPEED_400, port->i2c->regs + I2C_TIMING);
1513 } else if (port_has_xo2(port, &xo2_type, &xo2_id)) { 1541 } else if (port_has_xo2(port, &xo2_type, &xo2_id)) {
1514 printk(KERN_INFO "Port %d (TAB %d): XO2 type: %d, id: %d\n", 1542 dev_dbg(&dev->pdev->dev, "Port %d (TAB %d): XO2 type: %d, id: %d\n",
1515 port->nr, port->nr+1, xo2_type, xo2_id); 1543 port->nr, port->nr+1, xo2_type, xo2_id);
1516 1544
1517 ddbwritel(I2C_SPEED_400, port->i2c->regs + I2C_TIMING); 1545 ddbwritel(I2C_SPEED_400, port->i2c->regs + I2C_TIMING);
@@ -1556,10 +1584,10 @@ static void ddb_port_probe(struct ddb_port *port)
1556 } 1584 }
1557 break; 1585 break;
1558 case DDB_XO2_TYPE_CI: 1586 case DDB_XO2_TYPE_CI:
1559 printk(KERN_INFO "DuoFlex CI modules not supported\n"); 1587 dev_info(&dev->pdev->dev, "DuoFlex CI modules not supported\n");
1560 break; 1588 break;
1561 default: 1589 default:
1562 printk(KERN_INFO "Unknown XO2 DuoFlex module\n"); 1590 dev_info(&dev->pdev->dev, "Unknown XO2 DuoFlex module\n");
1563 break; 1591 break;
1564 } 1592 }
1565 } else if (port_has_cxd28xx(port, &cxd_id)) { 1593 } else if (port_has_cxd28xx(port, &cxd_id)) {
@@ -1611,7 +1639,7 @@ static void ddb_port_probe(struct ddb_port *port)
1611 ddbwritel(I2C_SPEED_100, port->i2c->regs + I2C_TIMING); 1639 ddbwritel(I2C_SPEED_100, port->i2c->regs + I2C_TIMING);
1612 } 1640 }
1613 1641
1614 printk(KERN_INFO "Port %d (TAB %d): %s\n", 1642 dev_info(&dev->pdev->dev, "Port %d (TAB %d): %s\n",
1615 port->nr, port->nr+1, modname); 1643 port->nr, port->nr+1, modname);
1616} 1644}
1617 1645
@@ -1765,7 +1793,7 @@ static int flashio(struct ddb *dev, u8 *wbuf, u32 wlen, u8 *rbuf, u32 rlen)
1765 wbuf += 4; 1793 wbuf += 4;
1766 wlen -= 4; 1794 wlen -= 4;
1767 ddbwritel(data, SPI_DATA); 1795 ddbwritel(data, SPI_DATA);
1768 while (ddbreadl(SPI_CONTROL) & 0x0004) 1796 while (safe_ddbreadl(dev, SPI_CONTROL) & 0x0004)
1769 ; 1797 ;
1770 } 1798 }
1771 1799
@@ -1785,7 +1813,7 @@ static int flashio(struct ddb *dev, u8 *wbuf, u32 wlen, u8 *rbuf, u32 rlen)
1785 if (shift) 1813 if (shift)
1786 data <<= shift; 1814 data <<= shift;
1787 ddbwritel(data, SPI_DATA); 1815 ddbwritel(data, SPI_DATA);
1788 while (ddbreadl(SPI_CONTROL) & 0x0004) 1816 while (safe_ddbreadl(dev, SPI_CONTROL) & 0x0004)
1789 ; 1817 ;
1790 1818
1791 if (!rlen) { 1819 if (!rlen) {
@@ -1797,7 +1825,7 @@ static int flashio(struct ddb *dev, u8 *wbuf, u32 wlen, u8 *rbuf, u32 rlen)
1797 1825
1798 while (rlen > 4) { 1826 while (rlen > 4) {
1799 ddbwritel(0xffffffff, SPI_DATA); 1827 ddbwritel(0xffffffff, SPI_DATA);
1800 while (ddbreadl(SPI_CONTROL) & 0x0004) 1828 while (safe_ddbreadl(dev, SPI_CONTROL) & 0x0004)
1801 ; 1829 ;
1802 data = ddbreadl(SPI_DATA); 1830 data = ddbreadl(SPI_DATA);
1803 *(u32 *) rbuf = swab32(data); 1831 *(u32 *) rbuf = swab32(data);
@@ -1806,7 +1834,7 @@ static int flashio(struct ddb *dev, u8 *wbuf, u32 wlen, u8 *rbuf, u32 rlen)
1806 } 1834 }
1807 ddbwritel(0x0003 | ((rlen << (8 + 3)) & 0x1F00), SPI_CONTROL); 1835 ddbwritel(0x0003 | ((rlen << (8 + 3)) & 0x1F00), SPI_CONTROL);
1808 ddbwritel(0xffffffff, SPI_DATA); 1836 ddbwritel(0xffffffff, SPI_DATA);
1809 while (ddbreadl(SPI_CONTROL) & 0x0004) 1837 while (safe_ddbreadl(dev, SPI_CONTROL) & 0x0004)
1810 ; 1838 ;
1811 1839
1812 data = ddbreadl(SPI_DATA); 1840 data = ddbreadl(SPI_DATA);
@@ -1993,7 +2021,7 @@ static int ddb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1993 dev->pdev = pdev; 2021 dev->pdev = pdev;
1994 pci_set_drvdata(pdev, dev); 2022 pci_set_drvdata(pdev, dev);
1995 dev->info = (struct ddb_info *) id->driver_data; 2023 dev->info = (struct ddb_info *) id->driver_data;
1996 printk(KERN_INFO "DDBridge driver detected: %s\n", dev->info->name); 2024 dev_info(&pdev->dev, "Detected %s\n", dev->info->name);
1997 2025
1998 dev->regs = ioremap(pci_resource_start(dev->pdev, 0), 2026 dev->regs = ioremap(pci_resource_start(dev->pdev, 0),
1999 pci_resource_len(dev->pdev, 0)); 2027 pci_resource_len(dev->pdev, 0));
@@ -2001,13 +2029,13 @@ static int ddb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
2001 stat = -ENOMEM; 2029 stat = -ENOMEM;
2002 goto fail; 2030 goto fail;
2003 } 2031 }
2004 printk(KERN_INFO "HW %08x FW %08x\n", ddbreadl(0), ddbreadl(4)); 2032 dev_info(&pdev->dev, "HW %08x FW %08x\n", ddbreadl(0), ddbreadl(4));
2005 2033
2006#ifdef CONFIG_PCI_MSI 2034#ifdef CONFIG_PCI_MSI
2007 if (pci_msi_enabled()) 2035 if (pci_msi_enabled())
2008 stat = pci_enable_msi(dev->pdev); 2036 stat = pci_enable_msi(dev->pdev);
2009 if (stat) { 2037 if (stat) {
2010 printk(KERN_INFO ": MSI not available.\n"); 2038 dev_info(&pdev->dev, "MSI not available.\n");
2011 } else { 2039 } else {
2012 irq_flag = 0; 2040 irq_flag = 0;
2013 dev->msi = 1; 2041 dev->msi = 1;
@@ -2040,7 +2068,7 @@ static int ddb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
2040 goto fail1; 2068 goto fail1;
2041 ddb_ports_init(dev); 2069 ddb_ports_init(dev);
2042 if (ddb_buffers_alloc(dev) < 0) { 2070 if (ddb_buffers_alloc(dev) < 0) {
2043 printk(KERN_INFO ": Could not allocate buffer memory\n"); 2071 dev_err(&pdev->dev, "Could not allocate buffer memory\n");
2044 goto fail2; 2072 goto fail2;
2045 } 2073 }
2046 if (ddb_ports_attach(dev) < 0) 2074 if (ddb_ports_attach(dev) < 0)
@@ -2050,19 +2078,19 @@ static int ddb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
2050 2078
2051fail3: 2079fail3:
2052 ddb_ports_detach(dev); 2080 ddb_ports_detach(dev);
2053 printk(KERN_ERR "fail3\n"); 2081 dev_err(&pdev->dev, "fail3\n");
2054 ddb_ports_release(dev); 2082 ddb_ports_release(dev);
2055fail2: 2083fail2:
2056 printk(KERN_ERR "fail2\n"); 2084 dev_err(&pdev->dev, "fail2\n");
2057 ddb_buffers_free(dev); 2085 ddb_buffers_free(dev);
2058fail1: 2086fail1:
2059 printk(KERN_ERR "fail1\n"); 2087 dev_err(&pdev->dev, "fail1\n");
2060 if (dev->msi) 2088 if (dev->msi)
2061 pci_disable_msi(dev->pdev); 2089 pci_disable_msi(dev->pdev);
2062 if (stat == 0) 2090 if (stat == 0)
2063 free_irq(dev->pdev->irq, dev); 2091 free_irq(dev->pdev->irq, dev);
2064fail: 2092fail:
2065 printk(KERN_ERR "fail\n"); 2093 dev_err(&pdev->dev, "fail\n");
2066 ddb_unmap(dev); 2094 ddb_unmap(dev);
2067 pci_set_drvdata(pdev, NULL); 2095 pci_set_drvdata(pdev, NULL);
2068 pci_disable_device(pdev); 2096 pci_disable_device(pdev);
@@ -2242,7 +2270,7 @@ static __init int module_init_ddbridge(void)
2242{ 2270{
2243 int ret; 2271 int ret;
2244 2272
2245 printk(KERN_INFO "Digital Devices PCIE bridge driver, Copyright (C) 2010-11 Digital Devices GmbH\n"); 2273 pr_info("Digital Devices PCIE bridge driver, Copyright (C) 2010-11 Digital Devices GmbH\n");
2246 2274
2247 ret = ddb_class_create(); 2275 ret = ddb_class_create();
2248 if (ret < 0) 2276 if (ret < 0)
diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c
index ce69e648b663..8c92cb7f7e72 100644
--- a/drivers/media/pci/ngene/ngene-core.c
+++ b/drivers/media/pci/ngene/ngene-core.c
@@ -336,9 +336,9 @@ int ngene_command(struct ngene *dev, struct ngene_command *com)
336{ 336{
337 int result; 337 int result;
338 338
339 down(&dev->cmd_mutex); 339 mutex_lock(&dev->cmd_mutex);
340 result = ngene_command_mutex(dev, com); 340 result = ngene_command_mutex(dev, com);
341 up(&dev->cmd_mutex); 341 mutex_unlock(&dev->cmd_mutex);
342 return result; 342 return result;
343} 343}
344 344
@@ -560,7 +560,6 @@ static int ngene_command_stream_control(struct ngene *dev, u8 stream,
560 u16 BsSPI = ((stream & 1) ? 0x9800 : 0x9700); 560 u16 BsSPI = ((stream & 1) ? 0x9800 : 0x9700);
561 u16 BsSDO = 0x9B00; 561 u16 BsSDO = 0x9B00;
562 562
563 down(&dev->stream_mutex);
564 memset(&com, 0, sizeof(com)); 563 memset(&com, 0, sizeof(com));
565 com.cmd.hdr.Opcode = CMD_CONTROL; 564 com.cmd.hdr.Opcode = CMD_CONTROL;
566 com.cmd.hdr.Length = sizeof(struct FW_STREAM_CONTROL) - 2; 565 com.cmd.hdr.Length = sizeof(struct FW_STREAM_CONTROL) - 2;
@@ -586,17 +585,13 @@ static int ngene_command_stream_control(struct ngene *dev, u8 stream,
586 chan->State = KSSTATE_ACQUIRE; 585 chan->State = KSSTATE_ACQUIRE;
587 chan->HWState = HWSTATE_STOP; 586 chan->HWState = HWSTATE_STOP;
588 spin_unlock_irq(&chan->state_lock); 587 spin_unlock_irq(&chan->state_lock);
589 if (ngene_command(dev, &com) < 0) { 588 if (ngene_command(dev, &com) < 0)
590 up(&dev->stream_mutex);
591 return -1; 589 return -1;
592 }
593 /* clear_buffers(chan); */ 590 /* clear_buffers(chan); */
594 flush_buffers(chan); 591 flush_buffers(chan);
595 up(&dev->stream_mutex);
596 return 0; 592 return 0;
597 } 593 }
598 spin_unlock_irq(&chan->state_lock); 594 spin_unlock_irq(&chan->state_lock);
599 up(&dev->stream_mutex);
600 return 0; 595 return 0;
601 } 596 }
602 597
@@ -692,11 +687,9 @@ static int ngene_command_stream_control(struct ngene *dev, u8 stream,
692 chan->HWState = HWSTATE_STARTUP; 687 chan->HWState = HWSTATE_STARTUP;
693 spin_unlock_irq(&chan->state_lock); 688 spin_unlock_irq(&chan->state_lock);
694 689
695 if (ngene_command(dev, &com) < 0) { 690 if (ngene_command(dev, &com) < 0)
696 up(&dev->stream_mutex);
697 return -1; 691 return -1;
698 } 692
699 up(&dev->stream_mutex);
700 return 0; 693 return 0;
701} 694}
702 695
@@ -750,8 +743,11 @@ void set_transfer(struct ngene_channel *chan, int state)
750 /* else printk(KERN_INFO DEVICE_NAME ": lock=%08x\n", 743 /* else printk(KERN_INFO DEVICE_NAME ": lock=%08x\n",
751 ngreadl(0x9310)); */ 744 ngreadl(0x9310)); */
752 745
746 mutex_lock(&dev->stream_mutex);
753 ret = ngene_command_stream_control(dev, chan->number, 747 ret = ngene_command_stream_control(dev, chan->number,
754 control, mode, flags); 748 control, mode, flags);
749 mutex_unlock(&dev->stream_mutex);
750
755 if (!ret) 751 if (!ret)
756 chan->running = state; 752 chan->running = state;
757 else 753 else
@@ -1283,7 +1279,7 @@ static int ngene_load_firm(struct ngene *dev)
1283 1279
1284static void ngene_stop(struct ngene *dev) 1280static void ngene_stop(struct ngene *dev)
1285{ 1281{
1286 down(&dev->cmd_mutex); 1282 mutex_destroy(&dev->cmd_mutex);
1287 i2c_del_adapter(&(dev->channel[0].i2c_adapter)); 1283 i2c_del_adapter(&(dev->channel[0].i2c_adapter));
1288 i2c_del_adapter(&(dev->channel[1].i2c_adapter)); 1284 i2c_del_adapter(&(dev->channel[1].i2c_adapter));
1289 ngwritel(0, NGENE_INT_ENABLE); 1285 ngwritel(0, NGENE_INT_ENABLE);
@@ -1346,10 +1342,10 @@ static int ngene_start(struct ngene *dev)
1346 init_waitqueue_head(&dev->cmd_wq); 1342 init_waitqueue_head(&dev->cmd_wq);
1347 init_waitqueue_head(&dev->tx_wq); 1343 init_waitqueue_head(&dev->tx_wq);
1348 init_waitqueue_head(&dev->rx_wq); 1344 init_waitqueue_head(&dev->rx_wq);
1349 sema_init(&dev->cmd_mutex, 1); 1345 mutex_init(&dev->cmd_mutex);
1350 sema_init(&dev->stream_mutex, 1); 1346 mutex_init(&dev->stream_mutex);
1351 sema_init(&dev->pll_mutex, 1); 1347 sema_init(&dev->pll_mutex, 1);
1352 sema_init(&dev->i2c_switch_mutex, 1); 1348 mutex_init(&dev->i2c_switch_mutex);
1353 spin_lock_init(&dev->cmd_lock); 1349 spin_lock_init(&dev->cmd_lock);
1354 for (i = 0; i < MAX_STREAM; i++) 1350 for (i = 0; i < MAX_STREAM; i++)
1355 spin_lock_init(&dev->channel[i].state_lock); 1351 spin_lock_init(&dev->channel[i].state_lock);
@@ -1606,10 +1602,10 @@ static void ngene_unlink(struct ngene *dev)
1606 com.in_len = 3; 1602 com.in_len = 3;
1607 com.out_len = 1; 1603 com.out_len = 1;
1608 1604
1609 down(&dev->cmd_mutex); 1605 mutex_lock(&dev->cmd_mutex);
1610 ngwritel(0, NGENE_INT_ENABLE); 1606 ngwritel(0, NGENE_INT_ENABLE);
1611 ngene_command_mutex(dev, &com); 1607 ngene_command_mutex(dev, &com);
1612 up(&dev->cmd_mutex); 1608 mutex_unlock(&dev->cmd_mutex);
1613} 1609}
1614 1610
1615void ngene_shutdown(struct pci_dev *pdev) 1611void ngene_shutdown(struct pci_dev *pdev)
diff --git a/drivers/media/pci/ngene/ngene-i2c.c b/drivers/media/pci/ngene/ngene-i2c.c
index cf39fcf54adf..fbf36353c701 100644
--- a/drivers/media/pci/ngene/ngene-i2c.c
+++ b/drivers/media/pci/ngene/ngene-i2c.c
@@ -118,7 +118,7 @@ static int ngene_i2c_master_xfer(struct i2c_adapter *adapter,
118 (struct ngene_channel *)i2c_get_adapdata(adapter); 118 (struct ngene_channel *)i2c_get_adapdata(adapter);
119 struct ngene *dev = chan->dev; 119 struct ngene *dev = chan->dev;
120 120
121 down(&dev->i2c_switch_mutex); 121 mutex_lock(&dev->i2c_switch_mutex);
122 ngene_i2c_set_bus(dev, chan->number); 122 ngene_i2c_set_bus(dev, chan->number);
123 123
124 if (num == 2 && msg[1].flags & I2C_M_RD && !(msg[0].flags & I2C_M_RD)) 124 if (num == 2 && msg[1].flags & I2C_M_RD && !(msg[0].flags & I2C_M_RD))
@@ -136,11 +136,11 @@ static int ngene_i2c_master_xfer(struct i2c_adapter *adapter,
136 msg[0].buf, msg[0].len, 0)) 136 msg[0].buf, msg[0].len, 0))
137 goto done; 137 goto done;
138 138
139 up(&dev->i2c_switch_mutex); 139 mutex_unlock(&dev->i2c_switch_mutex);
140 return -EIO; 140 return -EIO;
141 141
142done: 142done:
143 up(&dev->i2c_switch_mutex); 143 mutex_unlock(&dev->i2c_switch_mutex);
144 return num; 144 return num;
145} 145}
146 146
diff --git a/drivers/media/pci/ngene/ngene.h b/drivers/media/pci/ngene/ngene.h
index 10d8f74c4f0a..7c7cd217333d 100644
--- a/drivers/media/pci/ngene/ngene.h
+++ b/drivers/media/pci/ngene/ngene.h
@@ -762,10 +762,10 @@ struct ngene {
762 762
763 wait_queue_head_t cmd_wq; 763 wait_queue_head_t cmd_wq;
764 int cmd_done; 764 int cmd_done;
765 struct semaphore cmd_mutex; 765 struct mutex cmd_mutex;
766 struct semaphore stream_mutex; 766 struct mutex stream_mutex;
767 struct semaphore pll_mutex; 767 struct semaphore pll_mutex;
768 struct semaphore i2c_switch_mutex; 768 struct mutex i2c_switch_mutex;
769 int i2c_current_channel; 769 int i2c_current_channel;
770 int i2c_current_bus; 770 int i2c_current_bus;
771 spinlock_t cmd_lock; 771 spinlock_t cmd_lock;
diff --git a/drivers/media/pci/tw5864/tw5864-video.c b/drivers/media/pci/tw5864/tw5864-video.c
index 2a044be729da..e7bd2b8484e3 100644
--- a/drivers/media/pci/tw5864/tw5864-video.c
+++ b/drivers/media/pci/tw5864/tw5864-video.c
@@ -545,6 +545,7 @@ static int tw5864_fmt_vid_cap(struct file *file, void *priv,
545 switch (input->std) { 545 switch (input->std) {
546 default: 546 default:
547 WARN_ON_ONCE(1); 547 WARN_ON_ONCE(1);
548 return -EINVAL;
548 case STD_NTSC: 549 case STD_NTSC:
549 f->fmt.pix.height = 480; 550 f->fmt.pix.height = 480;
550 break; 551 break;
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index 1313cd533436..fb1fa0b82077 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -475,8 +475,8 @@ config VIDEO_QCOM_VENUS
475 tristate "Qualcomm Venus V4L2 encoder/decoder driver" 475 tristate "Qualcomm Venus V4L2 encoder/decoder driver"
476 depends on VIDEO_DEV && VIDEO_V4L2 && HAS_DMA 476 depends on VIDEO_DEV && VIDEO_V4L2 && HAS_DMA
477 depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST 477 depends on (ARCH_QCOM && IOMMU_DMA) || COMPILE_TEST
478 select QCOM_MDT_LOADER if (ARM || ARM64) 478 select QCOM_MDT_LOADER if ARCH_QCOM
479 select QCOM_SCM if (ARM || ARM64) 479 select QCOM_SCM if ARCH_QCOM
480 select VIDEOBUF2_DMA_SG 480 select VIDEOBUF2_DMA_SG
481 select V4L2_MEM2MEM_DEV 481 select V4L2_MEM2MEM_DEV
482 ---help--- 482 ---help---
diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c
index 25cbf9e5ac5a..bba1eb43b5d8 100644
--- a/drivers/media/platform/coda/coda-bit.c
+++ b/drivers/media/platform/coda/coda-bit.c
@@ -393,8 +393,8 @@ static int coda_alloc_framebuffers(struct coda_ctx *ctx,
393 int ret; 393 int ret;
394 int i; 394 int i;
395 395
396 if (ctx->codec && (ctx->codec->src_fourcc == V4L2_PIX_FMT_H264 || 396 if (ctx->codec->src_fourcc == V4L2_PIX_FMT_H264 ||
397 ctx->codec->dst_fourcc == V4L2_PIX_FMT_H264)) { 397 ctx->codec->dst_fourcc == V4L2_PIX_FMT_H264) {
398 width = round_up(q_data->width, 16); 398 width = round_up(q_data->width, 16);
399 height = round_up(q_data->height, 16); 399 height = round_up(q_data->height, 16);
400 } else { 400 } else {
@@ -2198,7 +2198,7 @@ static void coda_finish_decode(struct coda_ctx *ctx)
2198 ctx->display_idx = display_idx; 2198 ctx->display_idx = display_idx;
2199} 2199}
2200 2200
2201static void coda_error_decode(struct coda_ctx *ctx) 2201static void coda_decode_timeout(struct coda_ctx *ctx)
2202{ 2202{
2203 struct vb2_v4l2_buffer *dst_buf; 2203 struct vb2_v4l2_buffer *dst_buf;
2204 2204
@@ -2223,7 +2223,7 @@ const struct coda_context_ops coda_bit_decode_ops = {
2223 .start_streaming = coda_start_decoding, 2223 .start_streaming = coda_start_decoding,
2224 .prepare_run = coda_prepare_decode, 2224 .prepare_run = coda_prepare_decode,
2225 .finish_run = coda_finish_decode, 2225 .finish_run = coda_finish_decode,
2226 .error_run = coda_error_decode, 2226 .run_timeout = coda_decode_timeout,
2227 .seq_end_work = coda_seq_end_work, 2227 .seq_end_work = coda_seq_end_work,
2228 .release = coda_bit_release, 2228 .release = coda_bit_release,
2229}; 2229};
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index f92cc7df58fb..829c7895a98a 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1164,8 +1164,8 @@ static void coda_pic_run_work(struct work_struct *work)
1164 1164
1165 coda_hw_reset(ctx); 1165 coda_hw_reset(ctx);
1166 1166
1167 if (ctx->ops->error_run) 1167 if (ctx->ops->run_timeout)
1168 ctx->ops->error_run(ctx); 1168 ctx->ops->run_timeout(ctx);
1169 } else if (!ctx->aborting) { 1169 } else if (!ctx->aborting) {
1170 ctx->ops->finish_run(ctx); 1170 ctx->ops->finish_run(ctx);
1171 } 1171 }
diff --git a/drivers/media/platform/coda/coda.h b/drivers/media/platform/coda/coda.h
index 40fe22f0d757..c5f504d8cf67 100644
--- a/drivers/media/platform/coda/coda.h
+++ b/drivers/media/platform/coda/coda.h
@@ -183,7 +183,7 @@ struct coda_context_ops {
183 int (*start_streaming)(struct coda_ctx *ctx); 183 int (*start_streaming)(struct coda_ctx *ctx);
184 int (*prepare_run)(struct coda_ctx *ctx); 184 int (*prepare_run)(struct coda_ctx *ctx);
185 void (*finish_run)(struct coda_ctx *ctx); 185 void (*finish_run)(struct coda_ctx *ctx);
186 void (*error_run)(struct coda_ctx *ctx); 186 void (*run_timeout)(struct coda_ctx *ctx);
187 void (*seq_end_work)(struct work_struct *work); 187 void (*seq_end_work)(struct work_struct *work);
188 void (*release)(struct coda_ctx *ctx); 188 void (*release)(struct coda_ctx *ctx);
189}; 189};
diff --git a/drivers/media/platform/davinci/ccdc_hw_device.h b/drivers/media/platform/davinci/ccdc_hw_device.h
index 8f6688a7a111..f1b521045d64 100644
--- a/drivers/media/platform/davinci/ccdc_hw_device.h
+++ b/drivers/media/platform/davinci/ccdc_hw_device.h
@@ -42,16 +42,6 @@ struct ccdc_hw_ops {
42 int (*set_hw_if_params) (struct vpfe_hw_if_param *param); 42 int (*set_hw_if_params) (struct vpfe_hw_if_param *param);
43 /* get interface parameters */ 43 /* get interface parameters */
44 int (*get_hw_if_params) (struct vpfe_hw_if_param *param); 44 int (*get_hw_if_params) (struct vpfe_hw_if_param *param);
45 /*
46 * Pointer to function to set parameters. Used
47 * for implementing VPFE_S_CCDC_PARAMS
48 */
49 int (*set_params) (void *params);
50 /*
51 * Pointer to function to get parameter. Used
52 * for implementing VPFE_G_CCDC_PARAMS
53 */
54 int (*get_params) (void *params);
55 /* Pointer to function to configure ccdc */ 45 /* Pointer to function to configure ccdc */
56 int (*configure) (void); 46 int (*configure) (void);
57 47
diff --git a/drivers/media/platform/davinci/dm355_ccdc.c b/drivers/media/platform/davinci/dm355_ccdc.c
index 73db166dc338..6d492dc4c3a9 100644
--- a/drivers/media/platform/davinci/dm355_ccdc.c
+++ b/drivers/media/platform/davinci/dm355_ccdc.c
@@ -17,12 +17,7 @@
17 * This module is for configuring DM355 CCD controller of VPFE to capture 17 * This module is for configuring DM355 CCD controller of VPFE to capture
18 * Raw yuv or Bayer RGB data from a decoder. CCDC has several modules 18 * Raw yuv or Bayer RGB data from a decoder. CCDC has several modules
19 * such as Defect Pixel Correction, Color Space Conversion etc to 19 * such as Defect Pixel Correction, Color Space Conversion etc to
20 * pre-process the Bayer RGB data, before writing it to SDRAM. This 20 * pre-process the Bayer RGB data, before writing it to SDRAM.
21 * module also allows application to configure individual
22 * module parameters through VPFE_CMD_S_CCDC_RAW_PARAMS IOCTL.
23 * To do so, application include dm355_ccdc.h and vpfe_capture.h header
24 * files. The setparams() API is called by vpfe_capture driver
25 * to configure module parameters
26 * 21 *
27 * TODO: 1) Raw bayer parameter settings and bayer capture 22 * TODO: 1) Raw bayer parameter settings and bayer capture
28 * 2) Split module parameter structure to module specific ioctl structs 23 * 2) Split module parameter structure to module specific ioctl structs
@@ -260,90 +255,6 @@ static void ccdc_setwin(struct v4l2_rect *image_win,
260 dev_dbg(ccdc_cfg.dev, "\nEnd of ccdc_setwin..."); 255 dev_dbg(ccdc_cfg.dev, "\nEnd of ccdc_setwin...");
261} 256}
262 257
263static int validate_ccdc_param(struct ccdc_config_params_raw *ccdcparam)
264{
265 if (ccdcparam->datasft < CCDC_DATA_NO_SHIFT ||
266 ccdcparam->datasft > CCDC_DATA_SHIFT_6BIT) {
267 dev_dbg(ccdc_cfg.dev, "Invalid value of data shift\n");
268 return -EINVAL;
269 }
270
271 if (ccdcparam->mfilt1 < CCDC_NO_MEDIAN_FILTER1 ||
272 ccdcparam->mfilt1 > CCDC_MEDIAN_FILTER1) {
273 dev_dbg(ccdc_cfg.dev, "Invalid value of median filter1\n");
274 return -EINVAL;
275 }
276
277 if (ccdcparam->mfilt2 < CCDC_NO_MEDIAN_FILTER2 ||
278 ccdcparam->mfilt2 > CCDC_MEDIAN_FILTER2) {
279 dev_dbg(ccdc_cfg.dev, "Invalid value of median filter2\n");
280 return -EINVAL;
281 }
282
283 if ((ccdcparam->med_filt_thres < 0) ||
284 (ccdcparam->med_filt_thres > CCDC_MED_FILT_THRESH)) {
285 dev_dbg(ccdc_cfg.dev,
286 "Invalid value of median filter threshold\n");
287 return -EINVAL;
288 }
289
290 if (ccdcparam->data_sz < CCDC_DATA_16BITS ||
291 ccdcparam->data_sz > CCDC_DATA_8BITS) {
292 dev_dbg(ccdc_cfg.dev, "Invalid value of data size\n");
293 return -EINVAL;
294 }
295
296 if (ccdcparam->alaw.enable) {
297 if (ccdcparam->alaw.gamma_wd < CCDC_GAMMA_BITS_13_4 ||
298 ccdcparam->alaw.gamma_wd > CCDC_GAMMA_BITS_09_0) {
299 dev_dbg(ccdc_cfg.dev, "Invalid value of ALAW\n");
300 return -EINVAL;
301 }
302 }
303
304 if (ccdcparam->blk_clamp.b_clamp_enable) {
305 if (ccdcparam->blk_clamp.sample_pixel < CCDC_SAMPLE_1PIXELS ||
306 ccdcparam->blk_clamp.sample_pixel > CCDC_SAMPLE_16PIXELS) {
307 dev_dbg(ccdc_cfg.dev,
308 "Invalid value of sample pixel\n");
309 return -EINVAL;
310 }
311 if (ccdcparam->blk_clamp.sample_ln < CCDC_SAMPLE_1LINES ||
312 ccdcparam->blk_clamp.sample_ln > CCDC_SAMPLE_16LINES) {
313 dev_dbg(ccdc_cfg.dev,
314 "Invalid value of sample lines\n");
315 return -EINVAL;
316 }
317 }
318 return 0;
319}
320
321/* Parameter operations */
322static int ccdc_set_params(void __user *params)
323{
324 struct ccdc_config_params_raw ccdc_raw_params;
325 int x;
326
327 /* only raw module parameters can be set through the IOCTL */
328 if (ccdc_cfg.if_type != VPFE_RAW_BAYER)
329 return -EINVAL;
330
331 x = copy_from_user(&ccdc_raw_params, params, sizeof(ccdc_raw_params));
332 if (x) {
333 dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copying ccdcparams, %d\n",
334 x);
335 return -EFAULT;
336 }
337
338 if (!validate_ccdc_param(&ccdc_raw_params)) {
339 memcpy(&ccdc_cfg.bayer.config_params,
340 &ccdc_raw_params,
341 sizeof(ccdc_raw_params));
342 return 0;
343 }
344 return -EINVAL;
345}
346
347/* This function will configure CCDC for YCbCr video capture */ 258/* This function will configure CCDC for YCbCr video capture */
348static void ccdc_config_ycbcr(void) 259static void ccdc_config_ycbcr(void)
349{ 260{
@@ -939,7 +850,6 @@ static struct ccdc_hw_device ccdc_hw_dev = {
939 .enable = ccdc_enable, 850 .enable = ccdc_enable,
940 .enable_out_to_sdram = ccdc_enable_output_to_sdram, 851 .enable_out_to_sdram = ccdc_enable_output_to_sdram,
941 .set_hw_if_params = ccdc_set_hw_if_params, 852 .set_hw_if_params = ccdc_set_hw_if_params,
942 .set_params = ccdc_set_params,
943 .configure = ccdc_configure, 853 .configure = ccdc_configure,
944 .set_buftype = ccdc_set_buftype, 854 .set_buftype = ccdc_set_buftype,
945 .get_buftype = ccdc_get_buftype, 855 .get_buftype = ccdc_get_buftype,
diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c b/drivers/media/platform/davinci/dm644x_ccdc.c
index 740fbc7a8c14..3b2d8a9317b8 100644
--- a/drivers/media/platform/davinci/dm644x_ccdc.c
+++ b/drivers/media/platform/davinci/dm644x_ccdc.c
@@ -17,13 +17,9 @@
17 * This module is for configuring CCD controller of DM6446 VPFE to capture 17 * This module is for configuring CCD controller of DM6446 VPFE to capture
18 * Raw yuv or Bayer RGB data from a decoder. CCDC has several modules 18 * Raw yuv or Bayer RGB data from a decoder. CCDC has several modules
19 * such as Defect Pixel Correction, Color Space Conversion etc to 19 * such as Defect Pixel Correction, Color Space Conversion etc to
20 * pre-process the Raw Bayer RGB data, before writing it to SDRAM. This 20 * pre-process the Raw Bayer RGB data, before writing it to SDRAM.
21 * module also allows application to configure individual 21 * This file is named DM644x so that other variants such DM6443
22 * module parameters through VPFE_CMD_S_CCDC_RAW_PARAMS IOCTL. 22 * may be supported using the same module.
23 * To do so, application includes dm644x_ccdc.h and vpfe_capture.h header
24 * files. The setparams() API is called by vpfe_capture driver
25 * to configure module parameters. This file is named DM644x so that other
26 * variants such DM6443 may be supported using the same module.
27 * 23 *
28 * TODO: Test Raw bayer parameter settings and bayer capture 24 * TODO: Test Raw bayer parameter settings and bayer capture
29 * Split module parameter structure to module specific ioctl structs 25 * Split module parameter structure to module specific ioctl structs
@@ -216,96 +212,8 @@ static void ccdc_readregs(void)
216 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to VERT_LINES...\n", val); 212 dev_notice(ccdc_cfg.dev, "\nReading 0x%x to VERT_LINES...\n", val);
217} 213}
218 214
219static int validate_ccdc_param(struct ccdc_config_params_raw *ccdcparam)
220{
221 if (ccdcparam->alaw.enable) {
222 u8 max_gamma = ccdc_gamma_width_max_bit(ccdcparam->alaw.gamma_wd);
223 u8 max_data = ccdc_data_size_max_bit(ccdcparam->data_sz);
224
225 if ((ccdcparam->alaw.gamma_wd > CCDC_GAMMA_BITS_09_0) ||
226 (ccdcparam->alaw.gamma_wd < CCDC_GAMMA_BITS_15_6) ||
227 (max_gamma > max_data)) {
228 dev_dbg(ccdc_cfg.dev, "\nInvalid data line select");
229 return -1;
230 }
231 }
232 return 0;
233}
234
235static int ccdc_update_raw_params(struct ccdc_config_params_raw *raw_params)
236{
237 struct ccdc_config_params_raw *config_params =
238 &ccdc_cfg.bayer.config_params;
239 unsigned int *fpc_virtaddr = NULL;
240 unsigned int *fpc_physaddr = NULL;
241
242 memcpy(config_params, raw_params, sizeof(*raw_params));
243 /*
244 * allocate memory for fault pixel table and copy the user
245 * values to the table
246 */
247 if (!config_params->fault_pxl.enable)
248 return 0;
249
250 fpc_physaddr = (unsigned int *)config_params->fault_pxl.fpc_table_addr;
251 fpc_virtaddr = (unsigned int *)phys_to_virt(
252 (unsigned long)fpc_physaddr);
253 /*
254 * Allocate memory for FPC table if current
255 * FPC table buffer is not big enough to
256 * accommodate FPC Number requested
257 */
258 if (raw_params->fault_pxl.fp_num != config_params->fault_pxl.fp_num) {
259 if (fpc_physaddr != NULL) {
260 free_pages((unsigned long)fpc_virtaddr,
261 get_order
262 (config_params->fault_pxl.fp_num *
263 FP_NUM_BYTES));
264 }
265
266 /* Allocate memory for FPC table */
267 fpc_virtaddr =
268 (unsigned int *)__get_free_pages(GFP_KERNEL | GFP_DMA,
269 get_order(raw_params->
270 fault_pxl.fp_num *
271 FP_NUM_BYTES));
272
273 if (fpc_virtaddr == NULL) {
274 dev_dbg(ccdc_cfg.dev,
275 "\nUnable to allocate memory for FPC");
276 return -EFAULT;
277 }
278 fpc_physaddr =
279 (unsigned int *)virt_to_phys((void *)fpc_virtaddr);
280 }
281
282 /* Copy number of fault pixels and FPC table */
283 config_params->fault_pxl.fp_num = raw_params->fault_pxl.fp_num;
284 if (copy_from_user(fpc_virtaddr,
285 (void __user *)raw_params->fault_pxl.fpc_table_addr,
286 config_params->fault_pxl.fp_num * FP_NUM_BYTES)) {
287 dev_dbg(ccdc_cfg.dev, "\n copy_from_user failed");
288 return -EFAULT;
289 }
290 config_params->fault_pxl.fpc_table_addr = (unsigned long)fpc_physaddr;
291 return 0;
292}
293
294static int ccdc_close(struct device *dev) 215static int ccdc_close(struct device *dev)
295{ 216{
296 struct ccdc_config_params_raw *config_params =
297 &ccdc_cfg.bayer.config_params;
298 unsigned int *fpc_physaddr = NULL, *fpc_virtaddr = NULL;
299
300 fpc_physaddr = (unsigned int *)config_params->fault_pxl.fpc_table_addr;
301
302 if (fpc_physaddr != NULL) {
303 fpc_virtaddr = (unsigned int *)
304 phys_to_virt((unsigned long)fpc_physaddr);
305 free_pages((unsigned long)fpc_virtaddr,
306 get_order(config_params->fault_pxl.fp_num *
307 FP_NUM_BYTES));
308 }
309 return 0; 217 return 0;
310} 218}
311 219
@@ -339,29 +247,6 @@ static void ccdc_sbl_reset(void)
339 vpss_clear_wbl_overflow(VPSS_PCR_CCDC_WBL_O); 247 vpss_clear_wbl_overflow(VPSS_PCR_CCDC_WBL_O);
340} 248}
341 249
342/* Parameter operations */
343static int ccdc_set_params(void __user *params)
344{
345 struct ccdc_config_params_raw ccdc_raw_params;
346 int x;
347
348 if (ccdc_cfg.if_type != VPFE_RAW_BAYER)
349 return -EINVAL;
350
351 x = copy_from_user(&ccdc_raw_params, params, sizeof(ccdc_raw_params));
352 if (x) {
353 dev_dbg(ccdc_cfg.dev, "ccdc_set_params: error in copyingccdc params, %d\n",
354 x);
355 return -EFAULT;
356 }
357
358 if (!validate_ccdc_param(&ccdc_raw_params)) {
359 if (!ccdc_update_raw_params(&ccdc_raw_params))
360 return 0;
361 }
362 return -EINVAL;
363}
364
365/* 250/*
366 * ccdc_config_ycbcr() 251 * ccdc_config_ycbcr()
367 * This function will configure CCDC for YCbCr video capture 252 * This function will configure CCDC for YCbCr video capture
@@ -489,32 +374,6 @@ static void ccdc_config_black_compense(struct ccdc_black_compensation *bcomp)
489 regw(val, CCDC_BLKCMP); 374 regw(val, CCDC_BLKCMP);
490} 375}
491 376
492static void ccdc_config_fpc(struct ccdc_fault_pixel *fpc)
493{
494 u32 val;
495
496 /* Initially disable FPC */
497 val = CCDC_FPC_DISABLE;
498 regw(val, CCDC_FPC);
499
500 if (!fpc->enable)
501 return;
502
503 /* Configure Fault pixel if needed */
504 regw(fpc->fpc_table_addr, CCDC_FPC_ADDR);
505 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%lx to FPC_ADDR...\n",
506 (fpc->fpc_table_addr));
507 /* Write the FPC params with FPC disable */
508 val = fpc->fp_num & CCDC_FPC_FPC_NUM_MASK;
509 regw(val, CCDC_FPC);
510
511 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to FPC...\n", val);
512 /* read the FPC register */
513 val = regr(CCDC_FPC) | CCDC_FPC_ENABLE;
514 regw(val, CCDC_FPC);
515 dev_dbg(ccdc_cfg.dev, "\nWriting 0x%x to FPC...\n", val);
516}
517
518/* 377/*
519 * ccdc_config_raw() 378 * ccdc_config_raw()
520 * This function will configure CCDC for Raw capture mode 379 * This function will configure CCDC for Raw capture mode
@@ -569,9 +428,6 @@ static void ccdc_config_raw(void)
569 /* Configure Black level compensation */ 428 /* Configure Black level compensation */
570 ccdc_config_black_compense(&config_params->blk_comp); 429 ccdc_config_black_compense(&config_params->blk_comp);
571 430
572 /* Configure Fault Pixel Correction */
573 ccdc_config_fpc(&config_params->fault_pxl);
574
575 /* If data size is 8 bit then pack the data */ 431 /* If data size is 8 bit then pack the data */
576 if ((config_params->data_sz == CCDC_DATA_8BITS) || 432 if ((config_params->data_sz == CCDC_DATA_8BITS) ||
577 config_params->alaw.enable) 433 config_params->alaw.enable)
@@ -929,7 +785,6 @@ static struct ccdc_hw_device ccdc_hw_dev = {
929 .reset = ccdc_sbl_reset, 785 .reset = ccdc_sbl_reset,
930 .enable = ccdc_enable, 786 .enable = ccdc_enable,
931 .set_hw_if_params = ccdc_set_hw_if_params, 787 .set_hw_if_params = ccdc_set_hw_if_params,
932 .set_params = ccdc_set_params,
933 .configure = ccdc_configure, 788 .configure = ccdc_configure,
934 .set_buftype = ccdc_set_buftype, 789 .set_buftype = ccdc_set_buftype,
935 .get_buftype = ccdc_get_buftype, 790 .get_buftype = ccdc_get_buftype,
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c
index e3fe3e0635aa..b1bf4a7e8eb7 100644
--- a/drivers/media/platform/davinci/vpfe_capture.c
+++ b/drivers/media/platform/davinci/vpfe_capture.c
@@ -281,45 +281,6 @@ void vpfe_unregister_ccdc_device(struct ccdc_hw_device *dev)
281EXPORT_SYMBOL(vpfe_unregister_ccdc_device); 281EXPORT_SYMBOL(vpfe_unregister_ccdc_device);
282 282
283/* 283/*
284 * vpfe_get_ccdc_image_format - Get image parameters based on CCDC settings
285 */
286static int vpfe_get_ccdc_image_format(struct vpfe_device *vpfe_dev,
287 struct v4l2_format *f)
288{
289 struct v4l2_rect image_win;
290 enum ccdc_buftype buf_type;
291 enum ccdc_frmfmt frm_fmt;
292
293 memset(f, 0, sizeof(*f));
294 f->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
295 ccdc_dev->hw_ops.get_image_window(&image_win);
296 f->fmt.pix.width = image_win.width;
297 f->fmt.pix.height = image_win.height;
298 f->fmt.pix.bytesperline = ccdc_dev->hw_ops.get_line_length();
299 f->fmt.pix.sizeimage = f->fmt.pix.bytesperline *
300 f->fmt.pix.height;
301 buf_type = ccdc_dev->hw_ops.get_buftype();
302 f->fmt.pix.pixelformat = ccdc_dev->hw_ops.get_pixel_format();
303 frm_fmt = ccdc_dev->hw_ops.get_frame_format();
304 if (frm_fmt == CCDC_FRMFMT_PROGRESSIVE)
305 f->fmt.pix.field = V4L2_FIELD_NONE;
306 else if (frm_fmt == CCDC_FRMFMT_INTERLACED) {
307 if (buf_type == CCDC_BUFTYPE_FLD_INTERLEAVED)
308 f->fmt.pix.field = V4L2_FIELD_INTERLACED;
309 else if (buf_type == CCDC_BUFTYPE_FLD_SEPARATED)
310 f->fmt.pix.field = V4L2_FIELD_SEQ_TB;
311 else {
312 v4l2_err(&vpfe_dev->v4l2_dev, "Invalid buf_type\n");
313 return -EINVAL;
314 }
315 } else {
316 v4l2_err(&vpfe_dev->v4l2_dev, "Invalid frm_fmt\n");
317 return -EINVAL;
318 }
319 return 0;
320}
321
322/*
323 * vpfe_config_ccdc_image_format() 284 * vpfe_config_ccdc_image_format()
324 * For a pix format, configure ccdc to setup the capture 285 * For a pix format, configure ccdc to setup the capture
325 */ 286 */
@@ -1697,59 +1658,6 @@ unlock_out:
1697 return ret; 1658 return ret;
1698} 1659}
1699 1660
1700
1701static long vpfe_param_handler(struct file *file, void *priv,
1702 bool valid_prio, unsigned int cmd, void *param)
1703{
1704 struct vpfe_device *vpfe_dev = video_drvdata(file);
1705 int ret;
1706
1707 v4l2_dbg(2, debug, &vpfe_dev->v4l2_dev, "vpfe_param_handler\n");
1708
1709 if (vpfe_dev->started) {
1710 /* only allowed if streaming is not started */
1711 v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev,
1712 "device already started\n");
1713 return -EBUSY;
1714 }
1715
1716 ret = mutex_lock_interruptible(&vpfe_dev->lock);
1717 if (ret)
1718 return ret;
1719
1720 switch (cmd) {
1721 case VPFE_CMD_S_CCDC_RAW_PARAMS:
1722 v4l2_warn(&vpfe_dev->v4l2_dev,
1723 "VPFE_CMD_S_CCDC_RAW_PARAMS: experimental ioctl\n");
1724 if (ccdc_dev->hw_ops.set_params) {
1725 ret = ccdc_dev->hw_ops.set_params(param);
1726 if (ret) {
1727 v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev,
1728 "Error setting parameters in CCDC\n");
1729 goto unlock_out;
1730 }
1731 ret = vpfe_get_ccdc_image_format(vpfe_dev,
1732 &vpfe_dev->fmt);
1733 if (ret < 0) {
1734 v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev,
1735 "Invalid image format at CCDC\n");
1736 goto unlock_out;
1737 }
1738 } else {
1739 ret = -EINVAL;
1740 v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev,
1741 "VPFE_CMD_S_CCDC_RAW_PARAMS not supported\n");
1742 }
1743 break;
1744 default:
1745 ret = -ENOTTY;
1746 }
1747unlock_out:
1748 mutex_unlock(&vpfe_dev->lock);
1749 return ret;
1750}
1751
1752
1753/* vpfe capture ioctl operations */ 1661/* vpfe capture ioctl operations */
1754static const struct v4l2_ioctl_ops vpfe_ioctl_ops = { 1662static const struct v4l2_ioctl_ops vpfe_ioctl_ops = {
1755 .vidioc_querycap = vpfe_querycap, 1663 .vidioc_querycap = vpfe_querycap,
@@ -1772,7 +1680,6 @@ static const struct v4l2_ioctl_ops vpfe_ioctl_ops = {
1772 .vidioc_cropcap = vpfe_cropcap, 1680 .vidioc_cropcap = vpfe_cropcap,
1773 .vidioc_g_selection = vpfe_g_selection, 1681 .vidioc_g_selection = vpfe_g_selection,
1774 .vidioc_s_selection = vpfe_s_selection, 1682 .vidioc_s_selection = vpfe_s_selection,
1775 .vidioc_default = vpfe_param_handler,
1776}; 1683};
1777 1684
1778static struct vpfe_device *vpfe_initialize(void) 1685static struct vpfe_device *vpfe_initialize(void)
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c
index d78580f9e431..4be6554c56c5 100644
--- a/drivers/media/platform/davinci/vpif_capture.c
+++ b/drivers/media/platform/davinci/vpif_capture.c
@@ -1719,7 +1719,6 @@ vpif_unregister:
1719 */ 1719 */
1720static int vpif_remove(struct platform_device *device) 1720static int vpif_remove(struct platform_device *device)
1721{ 1721{
1722 struct common_obj *common;
1723 struct channel_obj *ch; 1722 struct channel_obj *ch;
1724 int i; 1723 int i;
1725 1724
@@ -1730,7 +1729,6 @@ static int vpif_remove(struct platform_device *device)
1730 for (i = 0; i < VPIF_CAPTURE_MAX_DEVICES; i++) { 1729 for (i = 0; i < VPIF_CAPTURE_MAX_DEVICES; i++) {
1731 /* Get the pointer to the channel object */ 1730 /* Get the pointer to the channel object */
1732 ch = vpif_obj.dev[i]; 1731 ch = vpif_obj.dev[i];
1733 common = &ch->common[VPIF_VIDEO_INDEX];
1734 /* Unregister video device */ 1732 /* Unregister video device */
1735 video_unregister_device(&ch->video_dev); 1733 video_unregister_device(&ch->video_dev);
1736 kfree(vpif_obj.dev[i]); 1734 kfree(vpif_obj.dev[i]);
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index b5ac6ce626b3..bf982bf86542 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -1339,7 +1339,6 @@ vpif_unregister:
1339 */ 1339 */
1340static int vpif_remove(struct platform_device *device) 1340static int vpif_remove(struct platform_device *device)
1341{ 1341{
1342 struct common_obj *common;
1343 struct channel_obj *ch; 1342 struct channel_obj *ch;
1344 int i; 1343 int i;
1345 1344
@@ -1350,7 +1349,6 @@ static int vpif_remove(struct platform_device *device)
1350 for (i = 0; i < VPIF_DISPLAY_MAX_DEVICES; i++) { 1349 for (i = 0; i < VPIF_DISPLAY_MAX_DEVICES; i++) {
1351 /* Get the pointer to the channel object */ 1350 /* Get the pointer to the channel object */
1352 ch = vpif_obj.dev[i]; 1351 ch = vpif_obj.dev[i];
1353 common = &ch->common[VPIF_VIDEO_INDEX];
1354 /* Unregister video device */ 1352 /* Unregister video device */
1355 video_unregister_device(&ch->video_dev); 1353 video_unregister_device(&ch->video_dev);
1356 kfree(vpif_obj.dev[i]); 1354 kfree(vpif_obj.dev[i]);
diff --git a/drivers/media/platform/omap/omap_vout_vrfb.c b/drivers/media/platform/omap/omap_vout_vrfb.c
index 92c4e1826356..45a553d4f5b2 100644
--- a/drivers/media/platform/omap/omap_vout_vrfb.c
+++ b/drivers/media/platform/omap/omap_vout_vrfb.c
@@ -16,7 +16,6 @@
16#include <media/videobuf-dma-contig.h> 16#include <media/videobuf-dma-contig.h>
17#include <media/v4l2-device.h> 17#include <media/v4l2-device.h>
18 18
19#include <linux/omap-dma.h>
20#include <video/omapvrfb.h> 19#include <video/omapvrfb.h>
21 20
22#include "omap_voutdef.h" 21#include "omap_voutdef.h"
@@ -63,7 +62,7 @@ static int omap_vout_allocate_vrfb_buffers(struct omap_vout_device *vout,
63/* 62/*
64 * Wakes up the application once the DMA transfer to VRFB space is completed. 63 * Wakes up the application once the DMA transfer to VRFB space is completed.
65 */ 64 */
66static void omap_vout_vrfb_dma_tx_callback(int lch, u16 ch_status, void *data) 65static void omap_vout_vrfb_dma_tx_callback(void *data)
67{ 66{
68 struct vid_vrfb_dma *t = (struct vid_vrfb_dma *) data; 67 struct vid_vrfb_dma *t = (struct vid_vrfb_dma *) data;
69 68
@@ -94,6 +93,7 @@ int omap_vout_setup_vrfb_bufs(struct platform_device *pdev, int vid_num,
94 int ret = 0, i, j; 93 int ret = 0, i, j;
95 struct omap_vout_device *vout; 94 struct omap_vout_device *vout;
96 struct video_device *vfd; 95 struct video_device *vfd;
96 dma_cap_mask_t mask;
97 int image_width, image_height; 97 int image_width, image_height;
98 int vrfb_num_bufs = VRFB_NUM_BUFS; 98 int vrfb_num_bufs = VRFB_NUM_BUFS;
99 struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev); 99 struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
@@ -131,18 +131,27 @@ int omap_vout_setup_vrfb_bufs(struct platform_device *pdev, int vid_num,
131 /* 131 /*
132 * Request and Initialize DMA, for DMA based VRFB transfer 132 * Request and Initialize DMA, for DMA based VRFB transfer
133 */ 133 */
134 vout->vrfb_dma_tx.dev_id = OMAP_DMA_NO_DEVICE; 134 dma_cap_zero(mask);
135 vout->vrfb_dma_tx.dma_ch = -1; 135 dma_cap_set(DMA_INTERLEAVE, mask);
136 vout->vrfb_dma_tx.req_status = DMA_CHAN_ALLOTED; 136 vout->vrfb_dma_tx.chan = dma_request_chan_by_mask(&mask);
137 ret = omap_request_dma(vout->vrfb_dma_tx.dev_id, "VRFB DMA TX", 137 if (IS_ERR(vout->vrfb_dma_tx.chan)) {
138 omap_vout_vrfb_dma_tx_callback,
139 (void *) &vout->vrfb_dma_tx, &vout->vrfb_dma_tx.dma_ch);
140 if (ret < 0) {
141 vout->vrfb_dma_tx.req_status = DMA_CHAN_NOT_ALLOTED; 138 vout->vrfb_dma_tx.req_status = DMA_CHAN_NOT_ALLOTED;
139 } else {
140 size_t xt_size = sizeof(struct dma_interleaved_template) +
141 sizeof(struct data_chunk);
142
143 vout->vrfb_dma_tx.xt = kzalloc(xt_size, GFP_KERNEL);
144 if (!vout->vrfb_dma_tx.xt) {
145 dma_release_channel(vout->vrfb_dma_tx.chan);
146 vout->vrfb_dma_tx.req_status = DMA_CHAN_NOT_ALLOTED;
147 }
148 }
149
150 if (vout->vrfb_dma_tx.req_status == DMA_CHAN_NOT_ALLOTED)
142 dev_info(&pdev->dev, 151 dev_info(&pdev->dev,
143 ": failed to allocate DMA Channel for video%d\n", 152 ": failed to allocate DMA Channel for video%d\n",
144 vfd->minor); 153 vfd->minor);
145 } 154
146 init_waitqueue_head(&vout->vrfb_dma_tx.wait); 155 init_waitqueue_head(&vout->vrfb_dma_tx.wait);
147 156
148 /* statically allocated the VRFB buffer is done through 157 /* statically allocated the VRFB buffer is done through
@@ -177,7 +186,9 @@ void omap_vout_release_vrfb(struct omap_vout_device *vout)
177 186
178 if (vout->vrfb_dma_tx.req_status == DMA_CHAN_ALLOTED) { 187 if (vout->vrfb_dma_tx.req_status == DMA_CHAN_ALLOTED) {
179 vout->vrfb_dma_tx.req_status = DMA_CHAN_NOT_ALLOTED; 188 vout->vrfb_dma_tx.req_status = DMA_CHAN_NOT_ALLOTED;
180 omap_free_dma(vout->vrfb_dma_tx.dma_ch); 189 kfree(vout->vrfb_dma_tx.xt);
190 dmaengine_terminate_sync(vout->vrfb_dma_tx.chan);
191 dma_release_channel(vout->vrfb_dma_tx.chan);
181 } 192 }
182} 193}
183 194
@@ -219,70 +230,84 @@ int omap_vout_vrfb_buffer_setup(struct omap_vout_device *vout,
219} 230}
220 231
221int omap_vout_prepare_vrfb(struct omap_vout_device *vout, 232int omap_vout_prepare_vrfb(struct omap_vout_device *vout,
222 struct videobuf_buffer *vb) 233 struct videobuf_buffer *vb)
223{ 234{
224 dma_addr_t dmabuf; 235 struct dma_async_tx_descriptor *tx;
225 struct vid_vrfb_dma *tx; 236 enum dma_ctrl_flags flags;
237 struct dma_chan *chan = vout->vrfb_dma_tx.chan;
238 struct dma_device *dmadev = chan->device;
239 struct dma_interleaved_template *xt = vout->vrfb_dma_tx.xt;
240 dma_cookie_t cookie;
241 enum dma_status status;
226 enum dss_rotation rotation; 242 enum dss_rotation rotation;
227 u32 dest_frame_index = 0, src_element_index = 0; 243 size_t dst_icg;
228 u32 dest_element_index = 0, src_frame_index = 0; 244 u32 pixsize;
229 u32 elem_count = 0, frame_count = 0, pixsize = 2;
230 245
231 if (!is_rotation_enabled(vout)) 246 if (!is_rotation_enabled(vout))
232 return 0; 247 return 0;
233 248
234 dmabuf = vout->buf_phy_addr[vb->i];
235 /* If rotation is enabled, copy input buffer into VRFB 249 /* If rotation is enabled, copy input buffer into VRFB
236 * memory space using DMA. We are copying input buffer 250 * memory space using DMA. We are copying input buffer
237 * into VRFB memory space of desired angle and DSS will 251 * into VRFB memory space of desired angle and DSS will
238 * read image VRFB memory for 0 degree angle 252 * read image VRFB memory for 0 degree angle
239 */ 253 */
254
240 pixsize = vout->bpp * vout->vrfb_bpp; 255 pixsize = vout->bpp * vout->vrfb_bpp;
241 /* 256 dst_icg = ((MAX_PIXELS_PER_LINE * pixsize) -
242 * DMA transfer in double index mode 257 (vout->pix.width * vout->bpp)) + 1;
243 */ 258
259 xt->src_start = vout->buf_phy_addr[vb->i];
260 xt->dst_start = vout->vrfb_context[vb->i].paddr[0];
261
262 xt->numf = vout->pix.height;
263 xt->frame_size = 1;
264 xt->sgl[0].size = vout->pix.width * vout->bpp;
265 xt->sgl[0].icg = dst_icg;
266
267 xt->dir = DMA_MEM_TO_MEM;
268 xt->src_sgl = false;
269 xt->src_inc = true;
270 xt->dst_sgl = true;
271 xt->dst_inc = true;
272
273 tx = dmadev->device_prep_interleaved_dma(chan, xt, flags);
274 if (tx == NULL) {
275 pr_err("%s: DMA interleaved prep error\n", __func__);
276 return -EINVAL;
277 }
244 278
245 /* Frame index */ 279 tx->callback = omap_vout_vrfb_dma_tx_callback;
246 dest_frame_index = ((MAX_PIXELS_PER_LINE * pixsize) - 280 tx->callback_param = &vout->vrfb_dma_tx;
247 (vout->pix.width * vout->bpp)) + 1; 281
248 282 cookie = dmaengine_submit(tx);
249 /* Source and destination parameters */ 283 if (dma_submit_error(cookie)) {
250 src_element_index = 0; 284 pr_err("%s: dmaengine_submit failed (%d)\n", __func__, cookie);
251 src_frame_index = 0; 285 return -EINVAL;
252 dest_element_index = 1; 286 }
253 /* Number of elements per frame */
254 elem_count = vout->pix.width * vout->bpp;
255 frame_count = vout->pix.height;
256 tx = &vout->vrfb_dma_tx;
257 tx->tx_status = 0;
258 omap_set_dma_transfer_params(tx->dma_ch, OMAP_DMA_DATA_TYPE_S32,
259 (elem_count / 4), frame_count, OMAP_DMA_SYNC_ELEMENT,
260 tx->dev_id, 0x0);
261 /* src_port required only for OMAP1 */
262 omap_set_dma_src_params(tx->dma_ch, 0, OMAP_DMA_AMODE_POST_INC,
263 dmabuf, src_element_index, src_frame_index);
264 /*set dma source burst mode for VRFB */
265 omap_set_dma_src_burst_mode(tx->dma_ch, OMAP_DMA_DATA_BURST_16);
266 rotation = calc_rotation(vout);
267 287
268 /* dest_port required only for OMAP1 */ 288 vout->vrfb_dma_tx.tx_status = 0;
269 omap_set_dma_dest_params(tx->dma_ch, 0, OMAP_DMA_AMODE_DOUBLE_IDX, 289 dma_async_issue_pending(chan);
270 vout->vrfb_context[vb->i].paddr[0], dest_element_index,
271 dest_frame_index);
272 /*set dma dest burst mode for VRFB */
273 omap_set_dma_dest_burst_mode(tx->dma_ch, OMAP_DMA_DATA_BURST_16);
274 omap_dma_set_global_params(DMA_DEFAULT_ARB_RATE, 0x20, 0);
275 290
276 omap_start_dma(tx->dma_ch); 291 wait_event_interruptible_timeout(vout->vrfb_dma_tx.wait,
277 wait_event_interruptible_timeout(tx->wait, tx->tx_status == 1, 292 vout->vrfb_dma_tx.tx_status == 1,
278 VRFB_TX_TIMEOUT); 293 VRFB_TX_TIMEOUT);
279 294
280 if (tx->tx_status == 0) { 295 status = dma_async_is_tx_complete(chan, cookie, NULL, NULL);
281 omap_stop_dma(tx->dma_ch); 296
297 if (vout->vrfb_dma_tx.tx_status == 0) {
298 pr_err("%s: Timeout while waiting for DMA\n", __func__);
299 dmaengine_terminate_sync(chan);
300 return -EINVAL;
301 } else if (status != DMA_COMPLETE) {
302 pr_err("%s: DMA completion %s status\n", __func__,
303 status == DMA_ERROR ? "error" : "busy");
304 dmaengine_terminate_sync(chan);
282 return -EINVAL; 305 return -EINVAL;
283 } 306 }
307
284 /* Store buffers physical address into an array. Addresses 308 /* Store buffers physical address into an array. Addresses
285 * from this array will be used to configure DSS */ 309 * from this array will be used to configure DSS */
310 rotation = calc_rotation(vout);
286 vout->queued_buf_addr[vb->i] = (u8 *) 311 vout->queued_buf_addr[vb->i] = (u8 *)
287 vout->vrfb_context[vb->i].paddr[rotation]; 312 vout->vrfb_context[vb->i].paddr[rotation];
288 return 0; 313 return 0;
diff --git a/drivers/media/platform/omap/omap_voutdef.h b/drivers/media/platform/omap/omap_voutdef.h
index 80c79fabdf95..56b630b1c8b4 100644
--- a/drivers/media/platform/omap/omap_voutdef.h
+++ b/drivers/media/platform/omap/omap_voutdef.h
@@ -14,6 +14,7 @@
14#include <media/v4l2-ctrls.h> 14#include <media/v4l2-ctrls.h>
15#include <video/omapfb_dss.h> 15#include <video/omapfb_dss.h>
16#include <video/omapvrfb.h> 16#include <video/omapvrfb.h>
17#include <linux/dmaengine.h>
17 18
18#define YUYV_BPP 2 19#define YUYV_BPP 2
19#define RGB565_BPP 2 20#define RGB565_BPP 2
@@ -81,8 +82,9 @@ enum vout_rotaion_type {
81 * for VRFB hidden buffer 82 * for VRFB hidden buffer
82 */ 83 */
83struct vid_vrfb_dma { 84struct vid_vrfb_dma {
84 int dev_id; 85 struct dma_chan *chan;
85 int dma_ch; 86 struct dma_interleaved_template *xt;
87
86 int req_status; 88 int req_status;
87 int tx_status; 89 int tx_status;
88 wait_queue_head_t wait; 90 wait_queue_head_t wait;
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index 776d2bae6979..41eef376eb2d 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -76,7 +76,7 @@ static void venus_sys_error_handler(struct work_struct *work)
76 hfi_core_deinit(core, true); 76 hfi_core_deinit(core, true);
77 hfi_destroy(core); 77 hfi_destroy(core);
78 mutex_lock(&core->lock); 78 mutex_lock(&core->lock);
79 venus_shutdown(&core->dev_fw); 79 venus_shutdown(core->dev);
80 80
81 pm_runtime_put_sync(core->dev); 81 pm_runtime_put_sync(core->dev);
82 82
@@ -84,7 +84,7 @@ static void venus_sys_error_handler(struct work_struct *work)
84 84
85 pm_runtime_get_sync(core->dev); 85 pm_runtime_get_sync(core->dev);
86 86
87 ret |= venus_boot(core->dev, &core->dev_fw, core->res->fwname); 87 ret |= venus_boot(core->dev, core->res->fwname);
88 88
89 ret |= hfi_core_resume(core, true); 89 ret |= hfi_core_resume(core, true);
90 90
@@ -137,7 +137,7 @@ static int venus_clks_enable(struct venus_core *core)
137 137
138 return 0; 138 return 0;
139err: 139err:
140 while (--i) 140 while (i--)
141 clk_disable_unprepare(core->clks[i]); 141 clk_disable_unprepare(core->clks[i]);
142 142
143 return ret; 143 return ret;
@@ -207,7 +207,7 @@ static int venus_probe(struct platform_device *pdev)
207 if (ret < 0) 207 if (ret < 0)
208 goto err_runtime_disable; 208 goto err_runtime_disable;
209 209
210 ret = venus_boot(dev, &core->dev_fw, core->res->fwname); 210 ret = venus_boot(dev, core->res->fwname);
211 if (ret) 211 if (ret)
212 goto err_runtime_disable; 212 goto err_runtime_disable;
213 213
@@ -238,7 +238,7 @@ err_dev_unregister:
238err_core_deinit: 238err_core_deinit:
239 hfi_core_deinit(core, false); 239 hfi_core_deinit(core, false);
240err_venus_shutdown: 240err_venus_shutdown:
241 venus_shutdown(&core->dev_fw); 241 venus_shutdown(dev);
242err_runtime_disable: 242err_runtime_disable:
243 pm_runtime_set_suspended(dev); 243 pm_runtime_set_suspended(dev);
244 pm_runtime_disable(dev); 244 pm_runtime_disable(dev);
@@ -259,7 +259,7 @@ static int venus_remove(struct platform_device *pdev)
259 WARN_ON(ret); 259 WARN_ON(ret);
260 260
261 hfi_destroy(core); 261 hfi_destroy(core);
262 venus_shutdown(&core->dev_fw); 262 venus_shutdown(dev);
263 of_platform_depopulate(dev); 263 of_platform_depopulate(dev);
264 264
265 pm_runtime_put_sync(dev); 265 pm_runtime_put_sync(dev);
@@ -270,8 +270,7 @@ static int venus_remove(struct platform_device *pdev)
270 return ret; 270 return ret;
271} 271}
272 272
273#ifdef CONFIG_PM 273static __maybe_unused int venus_runtime_suspend(struct device *dev)
274static int venus_runtime_suspend(struct device *dev)
275{ 274{
276 struct venus_core *core = dev_get_drvdata(dev); 275 struct venus_core *core = dev_get_drvdata(dev);
277 int ret; 276 int ret;
@@ -283,7 +282,7 @@ static int venus_runtime_suspend(struct device *dev)
283 return ret; 282 return ret;
284} 283}
285 284
286static int venus_runtime_resume(struct device *dev) 285static __maybe_unused int venus_runtime_resume(struct device *dev)
287{ 286{
288 struct venus_core *core = dev_get_drvdata(dev); 287 struct venus_core *core = dev_get_drvdata(dev);
289 int ret; 288 int ret;
@@ -302,7 +301,6 @@ err_clks_disable:
302 venus_clks_disable(core); 301 venus_clks_disable(core);
303 return ret; 302 return ret;
304} 303}
305#endif
306 304
307static const struct dev_pm_ops venus_pm_ops = { 305static const struct dev_pm_ops venus_pm_ops = {
308 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, 306 SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h
index e542700eee32..cba092bcb76d 100644
--- a/drivers/media/platform/qcom/venus/core.h
+++ b/drivers/media/platform/qcom/venus/core.h
@@ -101,7 +101,6 @@ struct venus_core {
101 struct device *dev; 101 struct device *dev;
102 struct device *dev_dec; 102 struct device *dev_dec;
103 struct device *dev_enc; 103 struct device *dev_enc;
104 struct device dev_fw;
105 struct mutex lock; 104 struct mutex lock;
106 struct list_head instances; 105 struct list_head instances;
107 atomic_t insts_count; 106 atomic_t insts_count;
diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c
index 1b1a4f355918..521d4b36c090 100644
--- a/drivers/media/platform/qcom/venus/firmware.c
+++ b/drivers/media/platform/qcom/venus/firmware.c
@@ -12,97 +12,87 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/dma-mapping.h> 15#include <linux/device.h>
16#include <linux/firmware.h> 16#include <linux/firmware.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/io.h>
18#include <linux/of.h> 19#include <linux/of.h>
19#include <linux/of_reserved_mem.h> 20#include <linux/of_address.h>
20#include <linux/slab.h>
21#include <linux/qcom_scm.h> 21#include <linux/qcom_scm.h>
22#include <linux/sizes.h>
22#include <linux/soc/qcom/mdt_loader.h> 23#include <linux/soc/qcom/mdt_loader.h>
23 24
24#include "firmware.h" 25#include "firmware.h"
25 26
26#define VENUS_PAS_ID 9 27#define VENUS_PAS_ID 9
27#define VENUS_FW_MEM_SIZE SZ_8M 28#define VENUS_FW_MEM_SIZE (6 * SZ_1M)
28 29
29static void device_release_dummy(struct device *dev) 30int venus_boot(struct device *dev, const char *fwname)
30{
31 of_reserved_mem_device_release(dev);
32}
33
34int venus_boot(struct device *parent, struct device *fw_dev, const char *fwname)
35{ 31{
36 const struct firmware *mdt; 32 const struct firmware *mdt;
33 struct device_node *node;
37 phys_addr_t mem_phys; 34 phys_addr_t mem_phys;
35 struct resource r;
38 ssize_t fw_size; 36 ssize_t fw_size;
39 size_t mem_size; 37 size_t mem_size;
40 void *mem_va; 38 void *mem_va;
41 int ret; 39 int ret;
42 40
43 if (!qcom_scm_is_available()) 41 if (!IS_ENABLED(CONFIG_QCOM_MDT_LOADER) || !qcom_scm_is_available())
44 return -EPROBE_DEFER; 42 return -EPROBE_DEFER;
45 43
46 fw_dev->parent = parent; 44 node = of_parse_phandle(dev->of_node, "memory-region", 0);
47 fw_dev->release = device_release_dummy; 45 if (!node) {
46 dev_err(dev, "no memory-region specified\n");
47 return -EINVAL;
48 }
48 49
49 ret = dev_set_name(fw_dev, "%s:%s", dev_name(parent), "firmware"); 50 ret = of_address_to_resource(node, 0, &r);
50 if (ret) 51 if (ret)
51 return ret; 52 return ret;
52 53
53 ret = device_register(fw_dev); 54 mem_phys = r.start;
54 if (ret < 0) 55 mem_size = resource_size(&r);
55 return ret;
56 56
57 ret = of_reserved_mem_device_init_by_idx(fw_dev, parent->of_node, 0); 57 if (mem_size < VENUS_FW_MEM_SIZE)
58 if (ret) 58 return -EINVAL;
59 goto err_unreg_device;
60 59
61 mem_size = VENUS_FW_MEM_SIZE; 60 mem_va = memremap(r.start, mem_size, MEMREMAP_WC);
62
63 mem_va = dmam_alloc_coherent(fw_dev, mem_size, &mem_phys, GFP_KERNEL);
64 if (!mem_va) { 61 if (!mem_va) {
65 ret = -ENOMEM; 62 dev_err(dev, "unable to map memory region: %pa+%zx\n",
66 goto err_unreg_device; 63 &r.start, mem_size);
64 return -ENOMEM;
67 } 65 }
68 66
69 ret = request_firmware(&mdt, fwname, fw_dev); 67 ret = request_firmware(&mdt, fwname, dev);
70 if (ret < 0) 68 if (ret < 0)
71 goto err_unreg_device; 69 goto err_unmap;
72 70
73 fw_size = qcom_mdt_get_size(mdt); 71 fw_size = qcom_mdt_get_size(mdt);
74 if (fw_size < 0) { 72 if (fw_size < 0) {
75 ret = fw_size; 73 ret = fw_size;
76 release_firmware(mdt); 74 release_firmware(mdt);
77 goto err_unreg_device; 75 goto err_unmap;
78 } 76 }
79 77
80 ret = qcom_mdt_load(fw_dev, mdt, fwname, VENUS_PAS_ID, mem_va, mem_phys, 78 ret = qcom_mdt_load(dev, mdt, fwname, VENUS_PAS_ID, mem_va, mem_phys,
81 mem_size); 79 mem_size);
82 80
83 release_firmware(mdt); 81 release_firmware(mdt);
84 82
85 if (ret) 83 if (ret)
86 goto err_unreg_device; 84 goto err_unmap;
87 85
88 ret = qcom_scm_pas_auth_and_reset(VENUS_PAS_ID); 86 ret = qcom_scm_pas_auth_and_reset(VENUS_PAS_ID);
89 if (ret) 87 if (ret)
90 goto err_unreg_device; 88 goto err_unmap;
91
92 return 0;
93 89
94err_unreg_device: 90err_unmap:
95 device_unregister(fw_dev); 91 memunmap(mem_va);
96 return ret; 92 return ret;
97} 93}
98 94
99int venus_shutdown(struct device *fw_dev) 95int venus_shutdown(struct device *dev)
100{ 96{
101 int ret; 97 return qcom_scm_pas_shutdown(VENUS_PAS_ID);
102
103 ret = qcom_scm_pas_shutdown(VENUS_PAS_ID);
104 device_unregister(fw_dev);
105 memset(fw_dev, 0, sizeof(*fw_dev));
106
107 return ret;
108} 98}
diff --git a/drivers/media/platform/qcom/venus/firmware.h b/drivers/media/platform/qcom/venus/firmware.h
index f81a98979798..428efb56d339 100644
--- a/drivers/media/platform/qcom/venus/firmware.h
+++ b/drivers/media/platform/qcom/venus/firmware.h
@@ -16,8 +16,7 @@
16 16
17struct device; 17struct device;
18 18
19int venus_boot(struct device *parent, struct device *fw_dev, 19int venus_boot(struct device *dev, const char *fwname);
20 const char *fwname); 20int venus_shutdown(struct device *dev);
21int venus_shutdown(struct device *fw_dev);
22 21
23#endif 22#endif
diff --git a/drivers/media/platform/qcom/venus/hfi_msgs.c b/drivers/media/platform/qcom/venus/hfi_msgs.c
index f8841713e417..a681ae5381d6 100644
--- a/drivers/media/platform/qcom/venus/hfi_msgs.c
+++ b/drivers/media/platform/qcom/venus/hfi_msgs.c
@@ -239,11 +239,12 @@ static void hfi_sys_init_done(struct venus_core *core, struct venus_inst *inst,
239 break; 239 break;
240 } 240 }
241 241
242 if (!error) { 242 if (error)
243 rem_bytes -= read_bytes; 243 break;
244 data += read_bytes; 244
245 num_properties--; 245 rem_bytes -= read_bytes;
246 } 246 data += read_bytes;
247 num_properties--;
247 } 248 }
248 249
249err_no_prop: 250err_no_prop:
diff --git a/drivers/media/platform/sti/bdisp/bdisp-debug.c b/drivers/media/platform/sti/bdisp/bdisp-debug.c
index 7af66860d624..2cc289e4dea1 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-debug.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-debug.c
@@ -104,7 +104,7 @@ static void bdisp_dbg_dump_ins(struct seq_file *s, u32 val)
104 if (val & BLT_INS_IRQ) 104 if (val & BLT_INS_IRQ)
105 seq_puts(s, "IRQ - "); 105 seq_puts(s, "IRQ - ");
106 106
107 seq_puts(s, "\n"); 107 seq_putc(s, '\n');
108} 108}
109 109
110static void bdisp_dbg_dump_tty(struct seq_file *s, u32 val) 110static void bdisp_dbg_dump_tty(struct seq_file *s, u32 val)
@@ -153,7 +153,7 @@ static void bdisp_dbg_dump_tty(struct seq_file *s, u32 val)
153 if (val & BLT_TTY_BIG_END) 153 if (val & BLT_TTY_BIG_END)
154 seq_puts(s, "BigEndian - "); 154 seq_puts(s, "BigEndian - ");
155 155
156 seq_puts(s, "\n"); 156 seq_putc(s, '\n');
157} 157}
158 158
159static void bdisp_dbg_dump_xy(struct seq_file *s, u32 val, char *name) 159static void bdisp_dbg_dump_xy(struct seq_file *s, u32 val, char *name)
@@ -230,7 +230,7 @@ static void bdisp_dbg_dump_sty(struct seq_file *s,
230 seq_puts(s, "BigEndian - "); 230 seq_puts(s, "BigEndian - ");
231 231
232done: 232done:
233 seq_puts(s, "\n"); 233 seq_putc(s, '\n');
234} 234}
235 235
236static void bdisp_dbg_dump_fctl(struct seq_file *s, u32 val) 236static void bdisp_dbg_dump_fctl(struct seq_file *s, u32 val)
@@ -247,7 +247,7 @@ static void bdisp_dbg_dump_fctl(struct seq_file *s, u32 val)
247 else if ((val & BLT_FCTL_HV_SCALE) == BLT_FCTL_HV_SAMPLE) 247 else if ((val & BLT_FCTL_HV_SCALE) == BLT_FCTL_HV_SAMPLE)
248 seq_puts(s, "Sample Chroma"); 248 seq_puts(s, "Sample Chroma");
249 249
250 seq_puts(s, "\n"); 250 seq_putc(s, '\n');
251} 251}
252 252
253static void bdisp_dbg_dump_rsf(struct seq_file *s, u32 val, char *name) 253static void bdisp_dbg_dump_rsf(struct seq_file *s, u32 val, char *name)
@@ -266,7 +266,7 @@ static void bdisp_dbg_dump_rsf(struct seq_file *s, u32 val, char *name)
266 seq_printf(s, "V: %d(6.10) / scale~%dx0.1", inc, 1024 * 10 / inc); 266 seq_printf(s, "V: %d(6.10) / scale~%dx0.1", inc, 1024 * 10 / inc);
267 267
268done: 268done:
269 seq_puts(s, "\n"); 269 seq_putc(s, '\n');
270} 270}
271 271
272static void bdisp_dbg_dump_rzi(struct seq_file *s, u32 val, char *name) 272static void bdisp_dbg_dump_rzi(struct seq_file *s, u32 val, char *name)
@@ -281,7 +281,7 @@ static void bdisp_dbg_dump_rzi(struct seq_file *s, u32 val, char *name)
281 seq_printf(s, "V: init=%d repeat=%d", val & 0x3FF, (val >> 12) & 7); 281 seq_printf(s, "V: init=%d repeat=%d", val & 0x3FF, (val >> 12) & 7);
282 282
283done: 283done:
284 seq_puts(s, "\n"); 284 seq_putc(s, '\n');
285} 285}
286 286
287static void bdisp_dbg_dump_ivmx(struct seq_file *s, 287static void bdisp_dbg_dump_ivmx(struct seq_file *s,
@@ -293,7 +293,7 @@ static void bdisp_dbg_dump_ivmx(struct seq_file *s,
293 seq_printf(s, "IVMX3\t0x%08X\t", c3); 293 seq_printf(s, "IVMX3\t0x%08X\t", c3);
294 294
295 if (!c0 && !c1 && !c2 && !c3) { 295 if (!c0 && !c1 && !c2 && !c3) {
296 seq_puts(s, "\n"); 296 seq_putc(s, '\n');
297 return; 297 return;
298 } 298 }
299 299
diff --git a/drivers/media/platform/vimc/vimc-capture.c b/drivers/media/platform/vimc/vimc-capture.c
index 14cb32e21130..88a1e5670c72 100644
--- a/drivers/media/platform/vimc/vimc-capture.c
+++ b/drivers/media/platform/vimc/vimc-capture.c
@@ -517,21 +517,22 @@ static int vimc_cap_remove(struct platform_device *pdev)
517 return 0; 517 return 0;
518} 518}
519 519
520static const struct platform_device_id vimc_cap_driver_ids[] = {
521 {
522 .name = VIMC_CAP_DRV_NAME,
523 },
524 { }
525};
526
520static struct platform_driver vimc_cap_pdrv = { 527static struct platform_driver vimc_cap_pdrv = {
521 .probe = vimc_cap_probe, 528 .probe = vimc_cap_probe,
522 .remove = vimc_cap_remove, 529 .remove = vimc_cap_remove,
530 .id_table = vimc_cap_driver_ids,
523 .driver = { 531 .driver = {
524 .name = VIMC_CAP_DRV_NAME, 532 .name = VIMC_CAP_DRV_NAME,
525 }, 533 },
526}; 534};
527 535
528static const struct platform_device_id vimc_cap_driver_ids[] = {
529 {
530 .name = VIMC_CAP_DRV_NAME,
531 },
532 { }
533};
534
535module_platform_driver(vimc_cap_pdrv); 536module_platform_driver(vimc_cap_pdrv);
536 537
537MODULE_DEVICE_TABLE(platform, vimc_cap_driver_ids); 538MODULE_DEVICE_TABLE(platform, vimc_cap_driver_ids);
diff --git a/drivers/media/platform/vimc/vimc-debayer.c b/drivers/media/platform/vimc/vimc-debayer.c
index 35b15bd4d61d..033a131f67af 100644
--- a/drivers/media/platform/vimc/vimc-debayer.c
+++ b/drivers/media/platform/vimc/vimc-debayer.c
@@ -577,21 +577,22 @@ static int vimc_deb_remove(struct platform_device *pdev)
577 return 0; 577 return 0;
578} 578}
579 579
580static const struct platform_device_id vimc_deb_driver_ids[] = {
581 {
582 .name = VIMC_DEB_DRV_NAME,
583 },
584 { }
585};
586
580static struct platform_driver vimc_deb_pdrv = { 587static struct platform_driver vimc_deb_pdrv = {
581 .probe = vimc_deb_probe, 588 .probe = vimc_deb_probe,
582 .remove = vimc_deb_remove, 589 .remove = vimc_deb_remove,
590 .id_table = vimc_deb_driver_ids,
583 .driver = { 591 .driver = {
584 .name = VIMC_DEB_DRV_NAME, 592 .name = VIMC_DEB_DRV_NAME,
585 }, 593 },
586}; 594};
587 595
588static const struct platform_device_id vimc_deb_driver_ids[] = {
589 {
590 .name = VIMC_DEB_DRV_NAME,
591 },
592 { }
593};
594
595module_platform_driver(vimc_deb_pdrv); 596module_platform_driver(vimc_deb_pdrv);
596 597
597MODULE_DEVICE_TABLE(platform, vimc_deb_driver_ids); 598MODULE_DEVICE_TABLE(platform, vimc_deb_driver_ids);
diff --git a/drivers/media/platform/vimc/vimc-scaler.c b/drivers/media/platform/vimc/vimc-scaler.c
index fe77505d2679..0a3e086e12f3 100644
--- a/drivers/media/platform/vimc/vimc-scaler.c
+++ b/drivers/media/platform/vimc/vimc-scaler.c
@@ -431,21 +431,22 @@ static int vimc_sca_remove(struct platform_device *pdev)
431 return 0; 431 return 0;
432} 432}
433 433
434static const struct platform_device_id vimc_sca_driver_ids[] = {
435 {
436 .name = VIMC_SCA_DRV_NAME,
437 },
438 { }
439};
440
434static struct platform_driver vimc_sca_pdrv = { 441static struct platform_driver vimc_sca_pdrv = {
435 .probe = vimc_sca_probe, 442 .probe = vimc_sca_probe,
436 .remove = vimc_sca_remove, 443 .remove = vimc_sca_remove,
444 .id_table = vimc_sca_driver_ids,
437 .driver = { 445 .driver = {
438 .name = VIMC_SCA_DRV_NAME, 446 .name = VIMC_SCA_DRV_NAME,
439 }, 447 },
440}; 448};
441 449
442static const struct platform_device_id vimc_sca_driver_ids[] = {
443 {
444 .name = VIMC_SCA_DRV_NAME,
445 },
446 { }
447};
448
449module_platform_driver(vimc_sca_pdrv); 450module_platform_driver(vimc_sca_pdrv);
450 451
451MODULE_DEVICE_TABLE(platform, vimc_sca_driver_ids); 452MODULE_DEVICE_TABLE(platform, vimc_sca_driver_ids);
diff --git a/drivers/media/platform/vimc/vimc-sensor.c b/drivers/media/platform/vimc/vimc-sensor.c
index ebdbbe8c05ed..615c2b18dcfc 100644
--- a/drivers/media/platform/vimc/vimc-sensor.c
+++ b/drivers/media/platform/vimc/vimc-sensor.c
@@ -365,21 +365,22 @@ static int vimc_sen_remove(struct platform_device *pdev)
365 return 0; 365 return 0;
366} 366}
367 367
368static const struct platform_device_id vimc_sen_driver_ids[] = {
369 {
370 .name = VIMC_SEN_DRV_NAME,
371 },
372 { }
373};
374
368static struct platform_driver vimc_sen_pdrv = { 375static struct platform_driver vimc_sen_pdrv = {
369 .probe = vimc_sen_probe, 376 .probe = vimc_sen_probe,
370 .remove = vimc_sen_remove, 377 .remove = vimc_sen_remove,
378 .id_table = vimc_sen_driver_ids,
371 .driver = { 379 .driver = {
372 .name = VIMC_SEN_DRV_NAME, 380 .name = VIMC_SEN_DRV_NAME,
373 }, 381 },
374}; 382};
375 383
376static const struct platform_device_id vimc_sen_driver_ids[] = {
377 {
378 .name = VIMC_SEN_DRV_NAME,
379 },
380 { }
381};
382
383module_platform_driver(vimc_sen_pdrv); 384module_platform_driver(vimc_sen_pdrv);
384 385
385MODULE_DEVICE_TABLE(platform, vimc_sen_driver_ids); 386MODULE_DEVICE_TABLE(platform, vimc_sen_driver_ids);
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c
index 7240223dc15a..17e82a9a0109 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -610,10 +610,21 @@ static int wl1273_fm_start(struct wl1273_device *radio, int new_mode)
610 } 610 }
611 } 611 }
612 612
613 if (radio->rds_on) 613 if (radio->rds_on) {
614 r = core->write(core, WL1273_RDS_DATA_ENB, 1); 614 r = core->write(core, WL1273_RDS_DATA_ENB, 1);
615 else 615 if (r) {
616 dev_err(dev, "%s: RDS_DATA_ENB ON fails\n",
617 __func__);
618 goto fail;
619 }
620 } else {
616 r = core->write(core, WL1273_RDS_DATA_ENB, 0); 621 r = core->write(core, WL1273_RDS_DATA_ENB, 0);
622 if (r) {
623 dev_err(dev, "%s: RDS_DATA_ENB OFF fails\n",
624 __func__);
625 goto fail;
626 }
627 }
617 } else { 628 } else {
618 dev_warn(dev, "%s: Illegal mode.\n", __func__); 629 dev_warn(dev, "%s: Illegal mode.\n", __func__);
619 } 630 }
diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c
index a30af91710fe..d2223c04e9ad 100644
--- a/drivers/media/rc/ir-lirc-codec.c
+++ b/drivers/media/rc/ir-lirc-codec.c
@@ -266,7 +266,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
266 if (!dev->rx_resolution) 266 if (!dev->rx_resolution)
267 return -ENOTTY; 267 return -ENOTTY;
268 268
269 val = dev->rx_resolution; 269 val = dev->rx_resolution / 1000;
270 break; 270 break;
271 271
272 case LIRC_SET_WIDEBAND_RECEIVER: 272 case LIRC_SET_WIDEBAND_RECEIVER:
diff --git a/drivers/media/tuners/fc0011.c b/drivers/media/tuners/fc0011.c
index 192b1c7740df..145407dee3db 100644
--- a/drivers/media/tuners/fc0011.c
+++ b/drivers/media/tuners/fc0011.c
@@ -342,6 +342,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
342 switch (vco_sel) { 342 switch (vco_sel) {
343 default: 343 default:
344 WARN_ON(1); 344 WARN_ON(1);
345 return -EINVAL;
345 case 0: 346 case 0:
346 if (vco_cal < 8) { 347 if (vco_cal < 8) {
347 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2); 348 regs[FC11_REG_VCOSEL] &= ~(FC11_VCOSEL_1 | FC11_VCOSEL_2);
diff --git a/drivers/media/tuners/mxl5005s.c b/drivers/media/tuners/mxl5005s.c
index 353744fee053..dd59c2c0e4a5 100644
--- a/drivers/media/tuners/mxl5005s.c
+++ b/drivers/media/tuners/mxl5005s.c
@@ -2737,8 +2737,6 @@ static u16 MXL_TuneRF(struct dvb_frontend *fe, u32 RF_Freq)
2737 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x0); 2737 status += MXL_ControlWrite(fe, TG_LO_DIVVAL, 0x0);
2738 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x7); 2738 status += MXL_ControlWrite(fe, TG_LO_SELVAL, 0x7);
2739 divider_val = 2 ; 2739 divider_val = 2 ;
2740 Fmax = FmaxBin ;
2741 Fmin = FminBin ;
2742 } 2740 }
2743 2741
2744 /* TG_DIV_VAL */ 2742 /* TG_DIV_VAL */
diff --git a/drivers/media/usb/au0828/au0828-input.c b/drivers/media/usb/au0828/au0828-input.c
index 9ec919c68482..9d82ec0a4b64 100644
--- a/drivers/media/usb/au0828/au0828-input.c
+++ b/drivers/media/usb/au0828/au0828-input.c
@@ -351,7 +351,7 @@ int au0828_rc_register(struct au0828_dev *dev)
351 if (err) 351 if (err)
352 goto error; 352 goto error;
353 353
354 pr_info("Remote controller %s initalized\n", ir->name); 354 pr_info("Remote controller %s initialized\n", ir->name);
355 355
356 return 0; 356 return 0;
357 357
diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c b/drivers/media/usb/dvb-usb-v2/lmedm04.c
index 594360a63c18..a91fdad8f8d4 100644
--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
+++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
@@ -207,15 +207,13 @@ static int lme2510_stream_restart(struct dvb_usb_device *d)
207 struct lme2510_state *st = d->priv; 207 struct lme2510_state *st = d->priv;
208 u8 all_pids[] = LME_ALL_PIDS; 208 u8 all_pids[] = LME_ALL_PIDS;
209 u8 stream_on[] = LME_ST_ON_W; 209 u8 stream_on[] = LME_ST_ON_W;
210 int ret;
211 u8 rbuff[1]; 210 u8 rbuff[1];
212 if (st->pid_off) 211 if (st->pid_off)
213 ret = lme2510_usb_talk(d, all_pids, sizeof(all_pids), 212 lme2510_usb_talk(d, all_pids, sizeof(all_pids),
214 rbuff, sizeof(rbuff)); 213 rbuff, sizeof(rbuff));
215 /*Restart Stream Command*/ 214 /*Restart Stream Command*/
216 ret = lme2510_usb_talk(d, stream_on, sizeof(stream_on), 215 return lme2510_usb_talk(d, stream_on, sizeof(stream_on),
217 rbuff, sizeof(rbuff)); 216 rbuff, sizeof(rbuff));
218 return ret;
219} 217}
220 218
221static int lme2510_enable_pid(struct dvb_usb_device *d, u8 index, u16 pid_out) 219static int lme2510_enable_pid(struct dvb_usb_device *d, u8 index, u16 pid_out)
diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c b/drivers/media/usb/dvb-usb/dib0700_core.c
index 08acdd32e412..bea1b4764a66 100644
--- a/drivers/media/usb/dvb-usb/dib0700_core.c
+++ b/drivers/media/usb/dvb-usb/dib0700_core.c
@@ -215,13 +215,14 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg,
215 USB_CTRL_GET_TIMEOUT); 215 USB_CTRL_GET_TIMEOUT);
216 if (result < 0) { 216 if (result < 0) {
217 deb_info("i2c read error (status = %d)\n", result); 217 deb_info("i2c read error (status = %d)\n", result);
218 break; 218 goto unlock;
219 } 219 }
220 220
221 if (msg[i].len > sizeof(st->buf)) { 221 if (msg[i].len > sizeof(st->buf)) {
222 deb_info("buffer too small to fit %d bytes\n", 222 deb_info("buffer too small to fit %d bytes\n",
223 msg[i].len); 223 msg[i].len);
224 return -EIO; 224 result = -EIO;
225 goto unlock;
225 } 226 }
226 227
227 memcpy(msg[i].buf, st->buf, msg[i].len); 228 memcpy(msg[i].buf, st->buf, msg[i].len);
@@ -233,8 +234,8 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg,
233 /* Write request */ 234 /* Write request */
234 if (mutex_lock_interruptible(&d->usb_mutex) < 0) { 235 if (mutex_lock_interruptible(&d->usb_mutex) < 0) {
235 err("could not acquire lock"); 236 err("could not acquire lock");
236 mutex_unlock(&d->i2c_mutex); 237 result = -EINTR;
237 return -EINTR; 238 goto unlock;
238 } 239 }
239 st->buf[0] = REQUEST_NEW_I2C_WRITE; 240 st->buf[0] = REQUEST_NEW_I2C_WRITE;
240 st->buf[1] = msg[i].addr << 1; 241 st->buf[1] = msg[i].addr << 1;
@@ -247,7 +248,9 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg,
247 if (msg[i].len > sizeof(st->buf) - 4) { 248 if (msg[i].len > sizeof(st->buf) - 4) {
248 deb_info("i2c message to big: %d\n", 249 deb_info("i2c message to big: %d\n",
249 msg[i].len); 250 msg[i].len);
250 return -EIO; 251 mutex_unlock(&d->usb_mutex);
252 result = -EIO;
253 goto unlock;
251 } 254 }
252 255
253 /* The Actual i2c payload */ 256 /* The Actual i2c payload */
@@ -269,8 +272,11 @@ static int dib0700_i2c_xfer_new(struct i2c_adapter *adap, struct i2c_msg *msg,
269 } 272 }
270 } 273 }
271 } 274 }
275 result = i;
276
277unlock:
272 mutex_unlock(&d->i2c_mutex); 278 mutex_unlock(&d->i2c_mutex);
273 return i; 279 return result;
274} 280}
275 281
276/* 282/*
@@ -281,7 +287,7 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap,
281{ 287{
282 struct dvb_usb_device *d = i2c_get_adapdata(adap); 288 struct dvb_usb_device *d = i2c_get_adapdata(adap);
283 struct dib0700_state *st = d->priv; 289 struct dib0700_state *st = d->priv;
284 int i,len; 290 int i, len, result;
285 291
286 if (mutex_lock_interruptible(&d->i2c_mutex) < 0) 292 if (mutex_lock_interruptible(&d->i2c_mutex) < 0)
287 return -EINTR; 293 return -EINTR;
@@ -298,7 +304,8 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap,
298 if (msg[i].len > sizeof(st->buf) - 2) { 304 if (msg[i].len > sizeof(st->buf) - 2) {
299 deb_info("i2c xfer to big: %d\n", 305 deb_info("i2c xfer to big: %d\n",
300 msg[i].len); 306 msg[i].len);
301 return -EIO; 307 result = -EIO;
308 goto unlock;
302 } 309 }
303 memcpy(&st->buf[2], msg[i].buf, msg[i].len); 310 memcpy(&st->buf[2], msg[i].buf, msg[i].len);
304 311
@@ -313,13 +320,15 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap,
313 if (len <= 0) { 320 if (len <= 0) {
314 deb_info("I2C read failed on address 0x%02x\n", 321 deb_info("I2C read failed on address 0x%02x\n",
315 msg[i].addr); 322 msg[i].addr);
316 break; 323 result = -EIO;
324 goto unlock;
317 } 325 }
318 326
319 if (msg[i + 1].len > sizeof(st->buf)) { 327 if (msg[i + 1].len > sizeof(st->buf)) {
320 deb_info("i2c xfer buffer to small for %d\n", 328 deb_info("i2c xfer buffer to small for %d\n",
321 msg[i].len); 329 msg[i].len);
322 return -EIO; 330 result = -EIO;
331 goto unlock;
323 } 332 }
324 memcpy(msg[i + 1].buf, st->buf, msg[i + 1].len); 333 memcpy(msg[i + 1].buf, st->buf, msg[i + 1].len);
325 334
@@ -328,14 +337,17 @@ static int dib0700_i2c_xfer_legacy(struct i2c_adapter *adap,
328 i++; 337 i++;
329 } else { 338 } else {
330 st->buf[0] = REQUEST_I2C_WRITE; 339 st->buf[0] = REQUEST_I2C_WRITE;
331 if (dib0700_ctrl_wr(d, st->buf, msg[i].len + 2) < 0) 340 result = dib0700_ctrl_wr(d, st->buf, msg[i].len + 2);
332 break; 341 if (result < 0)
342 goto unlock;
333 } 343 }
334 } 344 }
345 result = i;
346unlock:
335 mutex_unlock(&d->usb_mutex); 347 mutex_unlock(&d->usb_mutex);
336 mutex_unlock(&d->i2c_mutex); 348 mutex_unlock(&d->i2c_mutex);
337 349
338 return i; 350 return result;
339} 351}
340 352
341static int dib0700_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, 353static int dib0700_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
diff --git a/drivers/media/usb/em28xx/em28xx-cards.c b/drivers/media/usb/em28xx/em28xx-cards.c
index 146341aeb782..4c57fd7929cb 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -1193,6 +1193,22 @@ struct em28xx_board em28xx_boards[] = {
1193 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | 1193 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
1194 EM28XX_I2C_FREQ_400_KHZ, 1194 EM28XX_I2C_FREQ_400_KHZ,
1195 }, 1195 },
1196 [EM2884_BOARD_TERRATEC_H6] = {
1197 .name = "Terratec Cinergy H6 rev. 2",
1198 .has_dvb = 1,
1199 .ir_codes = RC_MAP_NEC_TERRATEC_CINERGY_XS,
1200#if 0
1201 .tuner_type = TUNER_PHILIPS_TDA8290,
1202 .tuner_addr = 0x41,
1203 .dvb_gpio = terratec_h5_digital, /* FIXME: probably wrong */
1204 .tuner_gpio = terratec_h5_gpio,
1205#else
1206 .tuner_type = TUNER_ABSENT,
1207#endif
1208 .def_i2c_bus = 1,
1209 .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE |
1210 EM28XX_I2C_FREQ_400_KHZ,
1211 },
1196 [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = { 1212 [EM2884_BOARD_HAUPPAUGE_WINTV_HVR_930C] = {
1197 .name = "Hauppauge WinTV HVR 930C", 1213 .name = "Hauppauge WinTV HVR 930C",
1198 .has_dvb = 1, 1214 .has_dvb = 1,
@@ -2496,6 +2512,8 @@ struct usb_device_id em28xx_id_table[] = {
2496 .driver_info = EM2884_BOARD_TERRATEC_H5 }, 2512 .driver_info = EM2884_BOARD_TERRATEC_H5 },
2497 { USB_DEVICE(0x0ccd, 0x10b6), /* H5 Rev. 3 */ 2513 { USB_DEVICE(0x0ccd, 0x10b6), /* H5 Rev. 3 */
2498 .driver_info = EM2884_BOARD_TERRATEC_H5 }, 2514 .driver_info = EM2884_BOARD_TERRATEC_H5 },
2515 { USB_DEVICE(0x0ccd, 0x10b2), /* H6 */
2516 .driver_info = EM2884_BOARD_TERRATEC_H6 },
2499 { USB_DEVICE(0x0ccd, 0x0084), 2517 { USB_DEVICE(0x0ccd, 0x0084),
2500 .driver_info = EM2860_BOARD_TERRATEC_AV350 }, 2518 .driver_info = EM2860_BOARD_TERRATEC_AV350 },
2501 { USB_DEVICE(0x0ccd, 0x0096), 2519 { USB_DEVICE(0x0ccd, 0x0096),
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index 82edd37f0d73..4a7db623fe29 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -1522,6 +1522,7 @@ static int em28xx_dvb_init(struct em28xx *dev)
1522 break; 1522 break;
1523 case EM2884_BOARD_ELGATO_EYETV_HYBRID_2008: 1523 case EM2884_BOARD_ELGATO_EYETV_HYBRID_2008:
1524 case EM2884_BOARD_CINERGY_HTC_STICK: 1524 case EM2884_BOARD_CINERGY_HTC_STICK:
1525 case EM2884_BOARD_TERRATEC_H6:
1525 terratec_htc_stick_init(dev); 1526 terratec_htc_stick_init(dev);
1526 1527
1527 /* attach demodulator */ 1528 /* attach demodulator */
diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c
index 8c472d5adb50..60b195c157b8 100644
--- a/drivers/media/usb/em28xx/em28xx-i2c.c
+++ b/drivers/media/usb/em28xx/em28xx-i2c.c
@@ -982,8 +982,6 @@ int em28xx_i2c_register(struct em28xx *dev, unsigned bus,
982 dev_err(&dev->intf->dev, 982 dev_err(&dev->intf->dev,
983 "%s: em28xx_i2_eeprom failed! retval [%d]\n", 983 "%s: em28xx_i2_eeprom failed! retval [%d]\n",
984 __func__, retval); 984 __func__, retval);
985
986 return retval;
987 } 985 }
988 } 986 }
989 987
diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
index eba75736e654..ca9673917ad5 100644
--- a/drivers/media/usb/em28xx/em28xx-input.c
+++ b/drivers/media/usb/em28xx/em28xx-input.c
@@ -821,7 +821,7 @@ static int em28xx_ir_init(struct em28xx *dev)
821 if (err) 821 if (err)
822 goto error; 822 goto error;
823 823
824 dev_info(&dev->intf->dev, "Input extension successfully initalized\n"); 824 dev_info(&dev->intf->dev, "Input extension successfully initialized\n");
825 825
826 return 0; 826 return 0;
827 827
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index e8d97d5ec161..88084f24f033 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -148,6 +148,7 @@
148#define EM28178_BOARD_PLEX_PX_BCUD 98 148#define EM28178_BOARD_PLEX_PX_BCUD 98
149#define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB 99 149#define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_DVB 99
150#define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 100 150#define EM28174_BOARD_HAUPPAUGE_WINTV_DUALHD_01595 100
151#define EM2884_BOARD_TERRATEC_H6 101
151 152
152/* Limits minimum and default number of buffers */ 153/* Limits minimum and default number of buffers */
153#define EM28XX_MIN_BUF 4 154#define EM28XX_MIN_BUF 4
diff --git a/drivers/media/usb/pulse8-cec/pulse8-cec.c b/drivers/media/usb/pulse8-cec/pulse8-cec.c
index c843070f24c1..f9ed9c950247 100644
--- a/drivers/media/usb/pulse8-cec/pulse8-cec.c
+++ b/drivers/media/usb/pulse8-cec/pulse8-cec.c
@@ -51,7 +51,7 @@ MODULE_DESCRIPTION("Pulse Eight HDMI CEC driver");
51MODULE_LICENSE("GPL"); 51MODULE_LICENSE("GPL");
52 52
53static int debug; 53static int debug;
54static int persistent_config = 1; 54static int persistent_config;
55module_param(debug, int, 0644); 55module_param(debug, int, 0644);
56module_param(persistent_config, int, 0644); 56module_param(persistent_config, int, 0644);
57MODULE_PARM_DESC(debug, "debug level (0-1)"); 57MODULE_PARM_DESC(debug, "debug level (0-1)");
diff --git a/drivers/media/usb/rainshadow-cec/rainshadow-cec.c b/drivers/media/usb/rainshadow-cec/rainshadow-cec.c
index f203699e9c1b..65692576690f 100644
--- a/drivers/media/usb/rainshadow-cec/rainshadow-cec.c
+++ b/drivers/media/usb/rainshadow-cec/rainshadow-cec.c
@@ -116,21 +116,19 @@ static void rain_irq_work_handler(struct work_struct *work)
116 116
117 while (true) { 117 while (true) {
118 unsigned long flags; 118 unsigned long flags;
119 bool exit_loop = false;
120 char data; 119 char data;
121 120
122 spin_lock_irqsave(&rain->buf_lock, flags); 121 spin_lock_irqsave(&rain->buf_lock, flags);
123 if (rain->buf_len) { 122 if (!rain->buf_len) {
124 data = rain->buf[rain->buf_rd_idx]; 123 spin_unlock_irqrestore(&rain->buf_lock, flags);
125 rain->buf_len--; 124 break;
126 rain->buf_rd_idx = (rain->buf_rd_idx + 1) & 0xff;
127 } else {
128 exit_loop = true;
129 } 125 }
130 spin_unlock_irqrestore(&rain->buf_lock, flags);
131 126
132 if (exit_loop) 127 data = rain->buf[rain->buf_rd_idx];
133 break; 128 rain->buf_len--;
129 rain->buf_rd_idx = (rain->buf_rd_idx + 1) & 0xff;
130
131 spin_unlock_irqrestore(&rain->buf_lock, flags);
134 132
135 if (!rain->cmd_started && data != '?') 133 if (!rain->cmd_started && data != '?')
136 continue; 134 continue;
diff --git a/drivers/media/usb/stkwebcam/stk-sensor.c b/drivers/media/usb/stkwebcam/stk-sensor.c
index 985af9933c7e..c1d4505f84ea 100644
--- a/drivers/media/usb/stkwebcam/stk-sensor.c
+++ b/drivers/media/usb/stkwebcam/stk-sensor.c
@@ -41,6 +41,8 @@
41 41
42/* It seems the i2c bus is controlled with these registers */ 42/* It seems the i2c bus is controlled with these registers */
43 43
44#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
45
44#include "stk-webcam.h" 46#include "stk-webcam.h"
45 47
46#define STK_IIC_BASE (0x0200) 48#define STK_IIC_BASE (0x0200)
@@ -239,8 +241,8 @@ static int stk_sensor_outb(struct stk_camera *dev, u8 reg, u8 val)
239 } while (tmpval == 0 && i < MAX_RETRIES); 241 } while (tmpval == 0 && i < MAX_RETRIES);
240 if (tmpval != STK_IIC_STAT_TX_OK) { 242 if (tmpval != STK_IIC_STAT_TX_OK) {
241 if (tmpval) 243 if (tmpval)
242 STK_ERROR("stk_sensor_outb failed, status=0x%02x\n", 244 pr_err("stk_sensor_outb failed, status=0x%02x\n",
243 tmpval); 245 tmpval);
244 return 1; 246 return 1;
245 } else 247 } else
246 return 0; 248 return 0;
@@ -262,8 +264,8 @@ static int stk_sensor_inb(struct stk_camera *dev, u8 reg, u8 *val)
262 } while (tmpval == 0 && i < MAX_RETRIES); 264 } while (tmpval == 0 && i < MAX_RETRIES);
263 if (tmpval != STK_IIC_STAT_RX_OK) { 265 if (tmpval != STK_IIC_STAT_RX_OK) {
264 if (tmpval) 266 if (tmpval)
265 STK_ERROR("stk_sensor_inb failed, status=0x%02x\n", 267 pr_err("stk_sensor_inb failed, status=0x%02x\n",
266 tmpval); 268 tmpval);
267 return 1; 269 return 1;
268 } 270 }
269 271
@@ -366,29 +368,29 @@ int stk_sensor_init(struct stk_camera *dev)
366 if (stk_camera_write_reg(dev, STK_IIC_ENABLE, STK_IIC_ENABLE_YES) 368 if (stk_camera_write_reg(dev, STK_IIC_ENABLE, STK_IIC_ENABLE_YES)
367 || stk_camera_write_reg(dev, STK_IIC_ADDR, SENSOR_ADDRESS) 369 || stk_camera_write_reg(dev, STK_IIC_ADDR, SENSOR_ADDRESS)
368 || stk_sensor_outb(dev, REG_COM7, COM7_RESET)) { 370 || stk_sensor_outb(dev, REG_COM7, COM7_RESET)) {
369 STK_ERROR("Sensor resetting failed\n"); 371 pr_err("Sensor resetting failed\n");
370 return -ENODEV; 372 return -ENODEV;
371 } 373 }
372 msleep(10); 374 msleep(10);
373 /* Read the manufacturer ID: ov = 0x7FA2 */ 375 /* Read the manufacturer ID: ov = 0x7FA2 */
374 if (stk_sensor_inb(dev, REG_MIDH, &idh) 376 if (stk_sensor_inb(dev, REG_MIDH, &idh)
375 || stk_sensor_inb(dev, REG_MIDL, &idl)) { 377 || stk_sensor_inb(dev, REG_MIDL, &idl)) {
376 STK_ERROR("Strange error reading sensor ID\n"); 378 pr_err("Strange error reading sensor ID\n");
377 return -ENODEV; 379 return -ENODEV;
378 } 380 }
379 if (idh != 0x7f || idl != 0xa2) { 381 if (idh != 0x7f || idl != 0xa2) {
380 STK_ERROR("Huh? you don't have a sensor from ovt\n"); 382 pr_err("Huh? you don't have a sensor from ovt\n");
381 return -ENODEV; 383 return -ENODEV;
382 } 384 }
383 if (stk_sensor_inb(dev, REG_PID, &idh) 385 if (stk_sensor_inb(dev, REG_PID, &idh)
384 || stk_sensor_inb(dev, REG_VER, &idl)) { 386 || stk_sensor_inb(dev, REG_VER, &idl)) {
385 STK_ERROR("Could not read sensor model\n"); 387 pr_err("Could not read sensor model\n");
386 return -ENODEV; 388 return -ENODEV;
387 } 389 }
388 stk_sensor_write_regvals(dev, ov_initvals); 390 stk_sensor_write_regvals(dev, ov_initvals);
389 msleep(10); 391 msleep(10);
390 STK_INFO("OmniVision sensor detected, id %02X%02X at address %x\n", 392 pr_info("OmniVision sensor detected, id %02X%02X at address %x\n",
391 idh, idl, SENSOR_ADDRESS); 393 idh, idl, SENSOR_ADDRESS);
392 return 0; 394 return 0;
393} 395}
394 396
@@ -520,7 +522,8 @@ int stk_sensor_configure(struct stk_camera *dev)
520 case MODE_SXGA: com7 = COM7_FMT_SXGA; 522 case MODE_SXGA: com7 = COM7_FMT_SXGA;
521 dummylines = 0; 523 dummylines = 0;
522 break; 524 break;
523 default: STK_ERROR("Unsupported mode %d\n", dev->vsettings.mode); 525 default:
526 pr_err("Unsupported mode %d\n", dev->vsettings.mode);
524 return -EFAULT; 527 return -EFAULT;
525 } 528 }
526 switch (dev->vsettings.palette) { 529 switch (dev->vsettings.palette) {
@@ -544,7 +547,8 @@ int stk_sensor_configure(struct stk_camera *dev)
544 com7 |= COM7_PBAYER; 547 com7 |= COM7_PBAYER;
545 rv = ov_fmt_bayer; 548 rv = ov_fmt_bayer;
546 break; 549 break;
547 default: STK_ERROR("Unsupported colorspace\n"); 550 default:
551 pr_err("Unsupported colorspace\n");
548 return -EFAULT; 552 return -EFAULT;
549 } 553 }
550 /*FIXME sometimes the sensor go to a bad state 554 /*FIXME sometimes the sensor go to a bad state
@@ -564,7 +568,7 @@ int stk_sensor_configure(struct stk_camera *dev)
564 switch (dev->vsettings.mode) { 568 switch (dev->vsettings.mode) {
565 case MODE_VGA: 569 case MODE_VGA:
566 if (stk_sensor_set_hw(dev, 302, 1582, 6, 486)) 570 if (stk_sensor_set_hw(dev, 302, 1582, 6, 486))
567 STK_ERROR("stk_sensor_set_hw failed (VGA)\n"); 571 pr_err("stk_sensor_set_hw failed (VGA)\n");
568 break; 572 break;
569 case MODE_SXGA: 573 case MODE_SXGA:
570 case MODE_CIF: 574 case MODE_CIF:
@@ -572,7 +576,7 @@ int stk_sensor_configure(struct stk_camera *dev)
572 case MODE_QCIF: 576 case MODE_QCIF:
573 /*FIXME These settings seem ignored by the sensor 577 /*FIXME These settings seem ignored by the sensor
574 if (stk_sensor_set_hw(dev, 220, 1500, 10, 1034)) 578 if (stk_sensor_set_hw(dev, 220, 1500, 10, 1034))
575 STK_ERROR("stk_sensor_set_hw failed (SXGA)\n"); 579 pr_err("stk_sensor_set_hw failed (SXGA)\n");
576 */ 580 */
577 break; 581 break;
578 } 582 }
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
index 6e7fc36b658f..90d4a08cda31 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -18,6 +18,8 @@
18 * GNU General Public License for more details. 18 * GNU General Public License for more details.
19 */ 19 */
20 20
21#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
22
21#include <linux/module.h> 23#include <linux/module.h>
22#include <linux/init.h> 24#include <linux/init.h>
23#include <linux/kernel.h> 25#include <linux/kernel.h>
@@ -175,15 +177,15 @@ static int stk_start_stream(struct stk_camera *dev)
175 if (!is_present(dev)) 177 if (!is_present(dev))
176 return -ENODEV; 178 return -ENODEV;
177 if (!is_memallocd(dev) || !is_initialised(dev)) { 179 if (!is_memallocd(dev) || !is_initialised(dev)) {
178 STK_ERROR("FIXME: Buffers are not allocated\n"); 180 pr_err("FIXME: Buffers are not allocated\n");
179 return -EFAULT; 181 return -EFAULT;
180 } 182 }
181 ret = usb_set_interface(dev->udev, 0, 5); 183 ret = usb_set_interface(dev->udev, 0, 5);
182 184
183 if (ret < 0) 185 if (ret < 0)
184 STK_ERROR("usb_set_interface failed !\n"); 186 pr_err("usb_set_interface failed !\n");
185 if (stk_sensor_wakeup(dev)) 187 if (stk_sensor_wakeup(dev))
186 STK_ERROR("error awaking the sensor\n"); 188 pr_err("error awaking the sensor\n");
187 189
188 stk_camera_read_reg(dev, 0x0116, &value_116); 190 stk_camera_read_reg(dev, 0x0116, &value_116);
189 stk_camera_read_reg(dev, 0x0117, &value_117); 191 stk_camera_read_reg(dev, 0x0117, &value_117);
@@ -224,9 +226,9 @@ static int stk_stop_stream(struct stk_camera *dev)
224 unset_streaming(dev); 226 unset_streaming(dev);
225 227
226 if (usb_set_interface(dev->udev, 0, 0)) 228 if (usb_set_interface(dev->udev, 0, 0))
227 STK_ERROR("usb_set_interface failed !\n"); 229 pr_err("usb_set_interface failed !\n");
228 if (stk_sensor_sleep(dev)) 230 if (stk_sensor_sleep(dev))
229 STK_ERROR("error suspending the sensor\n"); 231 pr_err("error suspending the sensor\n");
230 } 232 }
231 return 0; 233 return 0;
232} 234}
@@ -313,7 +315,7 @@ static void stk_isoc_handler(struct urb *urb)
313 dev = (struct stk_camera *) urb->context; 315 dev = (struct stk_camera *) urb->context;
314 316
315 if (dev == NULL) { 317 if (dev == NULL) {
316 STK_ERROR("isoc_handler called with NULL device !\n"); 318 pr_err("isoc_handler called with NULL device !\n");
317 return; 319 return;
318 } 320 }
319 321
@@ -326,14 +328,13 @@ static void stk_isoc_handler(struct urb *urb)
326 spin_lock_irqsave(&dev->spinlock, flags); 328 spin_lock_irqsave(&dev->spinlock, flags);
327 329
328 if (urb->status != -EINPROGRESS && urb->status != 0) { 330 if (urb->status != -EINPROGRESS && urb->status != 0) {
329 STK_ERROR("isoc_handler: urb->status == %d\n", urb->status); 331 pr_err("isoc_handler: urb->status == %d\n", urb->status);
330 goto resubmit; 332 goto resubmit;
331 } 333 }
332 334
333 if (list_empty(&dev->sio_avail)) { 335 if (list_empty(&dev->sio_avail)) {
334 /*FIXME Stop streaming after a while */ 336 /*FIXME Stop streaming after a while */
335 (void) (printk_ratelimit() && 337 pr_err_ratelimited("isoc_handler without available buffer!\n");
336 STK_ERROR("isoc_handler without available buffer!\n"));
337 goto resubmit; 338 goto resubmit;
338 } 339 }
339 fb = list_first_entry(&dev->sio_avail, 340 fb = list_first_entry(&dev->sio_avail,
@@ -343,8 +344,8 @@ static void stk_isoc_handler(struct urb *urb)
343 for (i = 0; i < urb->number_of_packets; i++) { 344 for (i = 0; i < urb->number_of_packets; i++) {
344 if (urb->iso_frame_desc[i].status != 0) { 345 if (urb->iso_frame_desc[i].status != 0) {
345 if (urb->iso_frame_desc[i].status != -EXDEV) 346 if (urb->iso_frame_desc[i].status != -EXDEV)
346 STK_ERROR("Frame %d has error %d\n", i, 347 pr_err("Frame %d has error %d\n",
347 urb->iso_frame_desc[i].status); 348 i, urb->iso_frame_desc[i].status);
348 continue; 349 continue;
349 } 350 }
350 framelen = urb->iso_frame_desc[i].actual_length; 351 framelen = urb->iso_frame_desc[i].actual_length;
@@ -368,9 +369,8 @@ static void stk_isoc_handler(struct urb *urb)
368 /* This marks a new frame */ 369 /* This marks a new frame */
369 if (fb->v4lbuf.bytesused != 0 370 if (fb->v4lbuf.bytesused != 0
370 && fb->v4lbuf.bytesused != dev->frame_size) { 371 && fb->v4lbuf.bytesused != dev->frame_size) {
371 (void) (printk_ratelimit() && 372 pr_err_ratelimited("frame %d, bytesused=%d, skipping\n",
372 STK_ERROR("frame %d, bytesused=%d, skipping\n", 373 i, fb->v4lbuf.bytesused);
373 i, fb->v4lbuf.bytesused));
374 fb->v4lbuf.bytesused = 0; 374 fb->v4lbuf.bytesused = 0;
375 fill = fb->buffer; 375 fill = fb->buffer;
376 } else if (fb->v4lbuf.bytesused == dev->frame_size) { 376 } else if (fb->v4lbuf.bytesused == dev->frame_size) {
@@ -395,8 +395,7 @@ static void stk_isoc_handler(struct urb *urb)
395 395
396 /* Our buffer is full !!! */ 396 /* Our buffer is full !!! */
397 if (framelen + fb->v4lbuf.bytesused > dev->frame_size) { 397 if (framelen + fb->v4lbuf.bytesused > dev->frame_size) {
398 (void) (printk_ratelimit() && 398 pr_err_ratelimited("Frame buffer overflow, lost sync\n");
399 STK_ERROR("Frame buffer overflow, lost sync\n"));
400 /*FIXME Do something here? */ 399 /*FIXME Do something here? */
401 continue; 400 continue;
402 } 401 }
@@ -414,8 +413,8 @@ resubmit:
414 urb->dev = dev->udev; 413 urb->dev = dev->udev;
415 ret = usb_submit_urb(urb, GFP_ATOMIC); 414 ret = usb_submit_urb(urb, GFP_ATOMIC);
416 if (ret != 0) { 415 if (ret != 0) {
417 STK_ERROR("Error (%d) re-submitting urb in stk_isoc_handler.\n", 416 pr_err("Error (%d) re-submitting urb in stk_isoc_handler\n",
418 ret); 417 ret);
419 } 418 }
420} 419}
421 420
@@ -433,32 +432,31 @@ static int stk_prepare_iso(struct stk_camera *dev)
433 udev = dev->udev; 432 udev = dev->udev;
434 433
435 if (dev->isobufs) 434 if (dev->isobufs)
436 STK_ERROR("isobufs already allocated. Bad\n"); 435 pr_err("isobufs already allocated. Bad\n");
437 else 436 else
438 dev->isobufs = kcalloc(MAX_ISO_BUFS, sizeof(*dev->isobufs), 437 dev->isobufs = kcalloc(MAX_ISO_BUFS, sizeof(*dev->isobufs),
439 GFP_KERNEL); 438 GFP_KERNEL);
440 if (dev->isobufs == NULL) { 439 if (dev->isobufs == NULL) {
441 STK_ERROR("Unable to allocate iso buffers\n"); 440 pr_err("Unable to allocate iso buffers\n");
442 return -ENOMEM; 441 return -ENOMEM;
443 } 442 }
444 for (i = 0; i < MAX_ISO_BUFS; i++) { 443 for (i = 0; i < MAX_ISO_BUFS; i++) {
445 if (dev->isobufs[i].data == NULL) { 444 if (dev->isobufs[i].data == NULL) {
446 kbuf = kzalloc(ISO_BUFFER_SIZE, GFP_KERNEL); 445 kbuf = kzalloc(ISO_BUFFER_SIZE, GFP_KERNEL);
447 if (kbuf == NULL) { 446 if (kbuf == NULL) {
448 STK_ERROR("Failed to allocate iso buffer %d\n", 447 pr_err("Failed to allocate iso buffer %d\n", i);
449 i);
450 goto isobufs_out; 448 goto isobufs_out;
451 } 449 }
452 dev->isobufs[i].data = kbuf; 450 dev->isobufs[i].data = kbuf;
453 } else 451 } else
454 STK_ERROR("isobuf data already allocated\n"); 452 pr_err("isobuf data already allocated\n");
455 if (dev->isobufs[i].urb == NULL) { 453 if (dev->isobufs[i].urb == NULL) {
456 urb = usb_alloc_urb(ISO_FRAMES_PER_DESC, GFP_KERNEL); 454 urb = usb_alloc_urb(ISO_FRAMES_PER_DESC, GFP_KERNEL);
457 if (urb == NULL) 455 if (urb == NULL)
458 goto isobufs_out; 456 goto isobufs_out;
459 dev->isobufs[i].urb = urb; 457 dev->isobufs[i].urb = urb;
460 } else { 458 } else {
461 STK_ERROR("Killing URB\n"); 459 pr_err("Killing URB\n");
462 usb_kill_urb(dev->isobufs[i].urb); 460 usb_kill_urb(dev->isobufs[i].urb);
463 urb = dev->isobufs[i].urb; 461 urb = dev->isobufs[i].urb;
464 } 462 }
@@ -567,7 +565,7 @@ static int stk_prepare_sio_buffers(struct stk_camera *dev, unsigned n_sbufs)
567{ 565{
568 int i; 566 int i;
569 if (dev->sio_bufs != NULL) 567 if (dev->sio_bufs != NULL)
570 STK_ERROR("sio_bufs already allocated\n"); 568 pr_err("sio_bufs already allocated\n");
571 else { 569 else {
572 dev->sio_bufs = kzalloc(n_sbufs * sizeof(struct stk_sio_buffer), 570 dev->sio_bufs = kzalloc(n_sbufs * sizeof(struct stk_sio_buffer),
573 GFP_KERNEL); 571 GFP_KERNEL);
@@ -690,7 +688,7 @@ static ssize_t stk_read(struct file *fp, char __user *buf,
690 spin_lock_irqsave(&dev->spinlock, flags); 688 spin_lock_irqsave(&dev->spinlock, flags);
691 if (list_empty(&dev->sio_full)) { 689 if (list_empty(&dev->sio_full)) {
692 spin_unlock_irqrestore(&dev->spinlock, flags); 690 spin_unlock_irqrestore(&dev->spinlock, flags);
693 STK_ERROR("BUG: No siobufs ready\n"); 691 pr_err("BUG: No siobufs ready\n");
694 return 0; 692 return 0;
695 } 693 }
696 sbuf = list_first_entry(&dev->sio_full, struct stk_sio_buffer, list); 694 sbuf = list_first_entry(&dev->sio_full, struct stk_sio_buffer, list);
@@ -907,7 +905,7 @@ static int stk_vidioc_g_fmt_vid_cap(struct file *filp,
907 stk_sizes[i].m != dev->vsettings.mode; i++) 905 stk_sizes[i].m != dev->vsettings.mode; i++)
908 ; 906 ;
909 if (i == ARRAY_SIZE(stk_sizes)) { 907 if (i == ARRAY_SIZE(stk_sizes)) {
910 STK_ERROR("ERROR: mode invalid\n"); 908 pr_err("ERROR: mode invalid\n");
911 return -EINVAL; 909 return -EINVAL;
912 } 910 }
913 pix_format->width = stk_sizes[i].w; 911 pix_format->width = stk_sizes[i].w;
@@ -985,7 +983,7 @@ static int stk_setup_format(struct stk_camera *dev)
985 stk_sizes[i].m != dev->vsettings.mode) 983 stk_sizes[i].m != dev->vsettings.mode)
986 i++; 984 i++;
987 if (i == ARRAY_SIZE(stk_sizes)) { 985 if (i == ARRAY_SIZE(stk_sizes)) {
988 STK_ERROR("Something is broken in %s\n", __func__); 986 pr_err("Something is broken in %s\n", __func__);
989 return -EFAULT; 987 return -EFAULT;
990 } 988 }
991 /* This registers controls some timings, not sure of what. */ 989 /* This registers controls some timings, not sure of what. */
@@ -1241,7 +1239,7 @@ static void stk_v4l_dev_release(struct video_device *vd)
1241 struct stk_camera *dev = vdev_to_camera(vd); 1239 struct stk_camera *dev = vdev_to_camera(vd);
1242 1240
1243 if (dev->sio_bufs != NULL || dev->isobufs != NULL) 1241 if (dev->sio_bufs != NULL || dev->isobufs != NULL)
1244 STK_ERROR("We are leaking memory\n"); 1242 pr_err("We are leaking memory\n");
1245 usb_put_intf(dev->interface); 1243 usb_put_intf(dev->interface);
1246 kfree(dev); 1244 kfree(dev);
1247} 1245}
@@ -1264,10 +1262,10 @@ static int stk_register_video_device(struct stk_camera *dev)
1264 video_set_drvdata(&dev->vdev, dev); 1262 video_set_drvdata(&dev->vdev, dev);
1265 err = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1); 1263 err = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1);
1266 if (err) 1264 if (err)
1267 STK_ERROR("v4l registration failed\n"); 1265 pr_err("v4l registration failed\n");
1268 else 1266 else
1269 STK_INFO("Syntek USB2.0 Camera is now controlling device %s\n", 1267 pr_info("Syntek USB2.0 Camera is now controlling device %s\n",
1270 video_device_node_name(&dev->vdev)); 1268 video_device_node_name(&dev->vdev));
1271 return err; 1269 return err;
1272} 1270}
1273 1271
@@ -1288,7 +1286,7 @@ static int stk_camera_probe(struct usb_interface *interface,
1288 1286
1289 dev = kzalloc(sizeof(struct stk_camera), GFP_KERNEL); 1287 dev = kzalloc(sizeof(struct stk_camera), GFP_KERNEL);
1290 if (dev == NULL) { 1288 if (dev == NULL) {
1291 STK_ERROR("Out of memory !\n"); 1289 pr_err("Out of memory !\n");
1292 return -ENOMEM; 1290 return -ENOMEM;
1293 } 1291 }
1294 err = v4l2_device_register(&interface->dev, &dev->v4l2_dev); 1292 err = v4l2_device_register(&interface->dev, &dev->v4l2_dev);
@@ -1352,7 +1350,7 @@ static int stk_camera_probe(struct usb_interface *interface,
1352 } 1350 }
1353 } 1351 }
1354 if (!dev->isoc_ep) { 1352 if (!dev->isoc_ep) {
1355 STK_ERROR("Could not find isoc-in endpoint"); 1353 pr_err("Could not find isoc-in endpoint\n");
1356 err = -ENODEV; 1354 err = -ENODEV;
1357 goto error; 1355 goto error;
1358 } 1356 }
@@ -1387,8 +1385,8 @@ static void stk_camera_disconnect(struct usb_interface *interface)
1387 1385
1388 wake_up_interruptible(&dev->wait_frame); 1386 wake_up_interruptible(&dev->wait_frame);
1389 1387
1390 STK_INFO("Syntek USB2.0 Camera release resources device %s\n", 1388 pr_info("Syntek USB2.0 Camera release resources device %s\n",
1391 video_device_node_name(&dev->vdev)); 1389 video_device_node_name(&dev->vdev));
1392 1390
1393 video_unregister_device(&dev->vdev); 1391 video_unregister_device(&dev->vdev);
1394 v4l2_ctrl_handler_free(&dev->hdl); 1392 v4l2_ctrl_handler_free(&dev->hdl);
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.h b/drivers/media/usb/stkwebcam/stk-webcam.h
index 0284120ce246..5cecbdc97573 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.h
+++ b/drivers/media/usb/stkwebcam/stk-webcam.h
@@ -31,12 +31,6 @@
31#define ISO_MAX_FRAME_SIZE 3 * 1024 31#define ISO_MAX_FRAME_SIZE 3 * 1024
32#define ISO_BUFFER_SIZE (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE) 32#define ISO_BUFFER_SIZE (ISO_FRAMES_PER_DESC * ISO_MAX_FRAME_SIZE)
33 33
34
35#define PREFIX "stkwebcam: "
36#define STK_INFO(str, args...) printk(KERN_INFO PREFIX str, ##args)
37#define STK_ERROR(str, args...) printk(KERN_ERR PREFIX str, ##args)
38#define STK_WARNING(str, args...) printk(KERN_WARNING PREFIX str, ##args)
39
40struct stk_iso_buf { 34struct stk_iso_buf {
41 void *data; 35 void *data;
42 int length; 36 int length;
diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c
index e48b7c032c95..8db45dfc271b 100644
--- a/drivers/media/v4l2-core/tuner-core.c
+++ b/drivers/media/v4l2-core/tuner-core.c
@@ -43,8 +43,6 @@
43 43
44#define UNSET (-1U) 44#define UNSET (-1U)
45 45
46#define PREFIX (t->i2c->dev.driver->name)
47
48/* 46/*
49 * Driver modprobe parameters 47 * Driver modprobe parameters
50 */ 48 */
diff --git a/drivers/memory/atmel-ebi.c b/drivers/memory/atmel-ebi.c
index 99e644cda4d1..ebf69ff48ae2 100644
--- a/drivers/memory/atmel-ebi.c
+++ b/drivers/memory/atmel-ebi.c
@@ -72,7 +72,7 @@ struct atmel_smc_timing_xlate {
72 { .name = nm, .converter = atmel_smc_cs_conf_set_pulse, .shift = pos} 72 { .name = nm, .converter = atmel_smc_cs_conf_set_pulse, .shift = pos}
73 73
74#define ATMEL_SMC_CYCLE_XLATE(nm, pos) \ 74#define ATMEL_SMC_CYCLE_XLATE(nm, pos) \
75 { .name = nm, .converter = atmel_smc_cs_conf_set_setup, .shift = pos} 75 { .name = nm, .converter = atmel_smc_cs_conf_set_cycle, .shift = pos}
76 76
77static void at91sam9_ebi_get_config(struct atmel_ebi_dev *ebid, 77static void at91sam9_ebi_get_config(struct atmel_ebi_dev *ebid,
78 struct atmel_ebi_dev_config *conf) 78 struct atmel_ebi_dev_config *conf)
@@ -120,12 +120,14 @@ static int atmel_ebi_xslate_smc_timings(struct atmel_ebi_dev *ebid,
120 if (!ret) { 120 if (!ret) {
121 required = true; 121 required = true;
122 ncycles = DIV_ROUND_UP(val, clk_period_ns); 122 ncycles = DIV_ROUND_UP(val, clk_period_ns);
123 if (ncycles > ATMEL_SMC_MODE_TDF_MAX || 123 if (ncycles > ATMEL_SMC_MODE_TDF_MAX) {
124 ncycles < ATMEL_SMC_MODE_TDF_MIN) {
125 ret = -EINVAL; 124 ret = -EINVAL;
126 goto out; 125 goto out;
127 } 126 }
128 127
128 if (ncycles < ATMEL_SMC_MODE_TDF_MIN)
129 ncycles = ATMEL_SMC_MODE_TDF_MIN;
130
129 smcconf->mode |= ATMEL_SMC_MODE_TDF(ncycles); 131 smcconf->mode |= ATMEL_SMC_MODE_TDF(ncycles);
130 } 132 }
131 133
@@ -263,7 +265,7 @@ static int atmel_ebi_xslate_smc_config(struct atmel_ebi_dev *ebid,
263 } 265 }
264 266
265 ret = atmel_ebi_xslate_smc_timings(ebid, np, &conf->smcconf); 267 ret = atmel_ebi_xslate_smc_timings(ebid, np, &conf->smcconf);
266 if (ret) 268 if (ret < 0)
267 return -EINVAL; 269 return -EINVAL;
268 270
269 if ((ret > 0 && !required) || (!ret && required)) { 271 if ((ret > 0 && !required) || (!ret && required)) {
diff --git a/drivers/mfd/atmel-smc.c b/drivers/mfd/atmel-smc.c
index 954cf0f66a31..20cc0ea470fa 100644
--- a/drivers/mfd/atmel-smc.c
+++ b/drivers/mfd/atmel-smc.c
@@ -206,7 +206,7 @@ EXPORT_SYMBOL_GPL(atmel_smc_cs_conf_set_pulse);
206 * parameter 206 * parameter
207 * 207 *
208 * This function encodes the @ncycles value as described in the datasheet 208 * This function encodes the @ncycles value as described in the datasheet
209 * (section "SMC Pulse Register"), and then stores the result in the 209 * (section "SMC Cycle Register"), and then stores the result in the
210 * @conf->setup field at @shift position. 210 * @conf->setup field at @shift position.
211 * 211 *
212 * Returns -EINVAL if @shift is invalid, -ERANGE if @ncycles does not fit in 212 * Returns -EINVAL if @shift is invalid, -ERANGE if @ncycles does not fit in
diff --git a/drivers/mfd/da9062-core.c b/drivers/mfd/da9062-core.c
index fbe0f245ce8e..fe1811523e4a 100644
--- a/drivers/mfd/da9062-core.c
+++ b/drivers/mfd/da9062-core.c
@@ -645,6 +645,9 @@ static const struct regmap_range da9062_aa_readable_ranges[] = {
645 .range_min = DA9062AA_VLDO1_B, 645 .range_min = DA9062AA_VLDO1_B,
646 .range_max = DA9062AA_VLDO4_B, 646 .range_max = DA9062AA_VLDO4_B,
647 }, { 647 }, {
648 .range_min = DA9062AA_BBAT_CONT,
649 .range_max = DA9062AA_BBAT_CONT,
650 }, {
648 .range_min = DA9062AA_INTERFACE, 651 .range_min = DA9062AA_INTERFACE,
649 .range_max = DA9062AA_CONFIG_E, 652 .range_max = DA9062AA_CONFIG_E,
650 }, { 653 }, {
@@ -721,6 +724,9 @@ static const struct regmap_range da9062_aa_writeable_ranges[] = {
721 .range_min = DA9062AA_VLDO1_B, 724 .range_min = DA9062AA_VLDO1_B,
722 .range_max = DA9062AA_VLDO4_B, 725 .range_max = DA9062AA_VLDO4_B,
723 }, { 726 }, {
727 .range_min = DA9062AA_BBAT_CONT,
728 .range_max = DA9062AA_BBAT_CONT,
729 }, {
724 .range_min = DA9062AA_GP_ID_0, 730 .range_min = DA9062AA_GP_ID_0,
725 .range_max = DA9062AA_GP_ID_19, 731 .range_max = DA9062AA_GP_ID_19,
726 }, 732 },
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c
index 8621a198a2ce..bac33311f55a 100644
--- a/drivers/misc/mei/pci-me.c
+++ b/drivers/misc/mei/pci-me.c
@@ -216,6 +216,12 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
216 pci_set_drvdata(pdev, dev); 216 pci_set_drvdata(pdev, dev);
217 217
218 /* 218 /*
219 * MEI requires to resume from runtime suspend mode
220 * in order to perform link reset flow upon system suspend.
221 */
222 pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
223
224 /*
219 * For not wake-able HW runtime pm framework 225 * For not wake-able HW runtime pm framework
220 * can't be used on pci device level. 226 * can't be used on pci device level.
221 * Use domain runtime pm callbacks instead. 227 * Use domain runtime pm callbacks instead.
diff --git a/drivers/misc/mei/pci-txe.c b/drivers/misc/mei/pci-txe.c
index f811cd524468..e38a5f144373 100644
--- a/drivers/misc/mei/pci-txe.c
+++ b/drivers/misc/mei/pci-txe.c
@@ -138,6 +138,12 @@ static int mei_txe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
138 pci_set_drvdata(pdev, dev); 138 pci_set_drvdata(pdev, dev);
139 139
140 /* 140 /*
141 * MEI requires to resume from runtime suspend mode
142 * in order to perform link reset flow upon system suspend.
143 */
144 pdev->dev_flags |= PCI_DEV_FLAGS_NEEDS_RESUME;
145
146 /*
141 * For not wake-able HW runtime pm framework 147 * For not wake-able HW runtime pm framework
142 * can't be used on pci device level. 148 * can't be used on pci device level.
143 * Use domain runtime pm callbacks instead. 149 * Use domain runtime pm callbacks instead.
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c
index 8ac59dc80f23..80d1ec693d2d 100644
--- a/drivers/mmc/core/block.c
+++ b/drivers/mmc/core/block.c
@@ -1371,12 +1371,46 @@ static inline void mmc_apply_rel_rw(struct mmc_blk_request *brq,
1371 R1_CC_ERROR | /* Card controller error */ \ 1371 R1_CC_ERROR | /* Card controller error */ \
1372 R1_ERROR) /* General/unknown error */ 1372 R1_ERROR) /* General/unknown error */
1373 1373
1374static bool mmc_blk_has_cmd_err(struct mmc_command *cmd) 1374static void mmc_blk_eval_resp_error(struct mmc_blk_request *brq)
1375{ 1375{
1376 if (!cmd->error && cmd->resp[0] & CMD_ERRORS) 1376 u32 val;
1377 cmd->error = -EIO;
1378 1377
1379 return cmd->error; 1378 /*
1379 * Per the SD specification(physical layer version 4.10)[1],
1380 * section 4.3.3, it explicitly states that "When the last
1381 * block of user area is read using CMD18, the host should
1382 * ignore OUT_OF_RANGE error that may occur even the sequence
1383 * is correct". And JESD84-B51 for eMMC also has a similar
1384 * statement on section 6.8.3.
1385 *
1386 * Multiple block read/write could be done by either predefined
1387 * method, namely CMD23, or open-ending mode. For open-ending mode,
1388 * we should ignore the OUT_OF_RANGE error as it's normal behaviour.
1389 *
1390 * However the spec[1] doesn't tell us whether we should also
1391 * ignore that for predefined method. But per the spec[1], section
1392 * 4.15 Set Block Count Command, it says"If illegal block count
1393 * is set, out of range error will be indicated during read/write
1394 * operation (For example, data transfer is stopped at user area
1395 * boundary)." In another word, we could expect a out of range error
1396 * in the response for the following CMD18/25. And if argument of
1397 * CMD23 + the argument of CMD18/25 exceed the max number of blocks,
1398 * we could also expect to get a -ETIMEDOUT or any error number from
1399 * the host drivers due to missing data response(for write)/data(for
1400 * read), as the cards will stop the data transfer by itself per the
1401 * spec. So we only need to check R1_OUT_OF_RANGE for open-ending mode.
1402 */
1403
1404 if (!brq->stop.error) {
1405 bool oor_with_open_end;
1406 /* If there is no error yet, check R1 response */
1407
1408 val = brq->stop.resp[0] & CMD_ERRORS;
1409 oor_with_open_end = val & R1_OUT_OF_RANGE && !brq->mrq.sbc;
1410
1411 if (val && !oor_with_open_end)
1412 brq->stop.error = -EIO;
1413 }
1380} 1414}
1381 1415
1382static enum mmc_blk_status mmc_blk_err_check(struct mmc_card *card, 1416static enum mmc_blk_status mmc_blk_err_check(struct mmc_card *card,
@@ -1400,8 +1434,11 @@ static enum mmc_blk_status mmc_blk_err_check(struct mmc_card *card,
1400 * stop.error indicates a problem with the stop command. Data 1434 * stop.error indicates a problem with the stop command. Data
1401 * may have been transferred, or may still be transferring. 1435 * may have been transferred, or may still be transferring.
1402 */ 1436 */
1403 if (brq->sbc.error || brq->cmd.error || mmc_blk_has_cmd_err(&brq->stop) || 1437
1404 brq->data.error) { 1438 mmc_blk_eval_resp_error(brq);
1439
1440 if (brq->sbc.error || brq->cmd.error ||
1441 brq->stop.error || brq->data.error) {
1405 switch (mmc_blk_cmd_recovery(card, req, brq, &ecc_err, &gen_err)) { 1442 switch (mmc_blk_cmd_recovery(card, req, brq, &ecc_err, &gen_err)) {
1406 case ERR_RETRY: 1443 case ERR_RETRY:
1407 return MMC_BLK_RETRY; 1444 return MMC_BLK_RETRY;
@@ -2170,6 +2207,9 @@ static void mmc_blk_remove_req(struct mmc_blk_data *md)
2170 * from being accepted. 2207 * from being accepted.
2171 */ 2208 */
2172 card = md->queue.card; 2209 card = md->queue.card;
2210 spin_lock_irq(md->queue.queue->queue_lock);
2211 queue_flag_set(QUEUE_FLAG_BYPASS, md->queue.queue);
2212 spin_unlock_irq(md->queue.queue->queue_lock);
2173 blk_set_queue_dying(md->queue.queue); 2213 blk_set_queue_dying(md->queue.queue);
2174 mmc_cleanup_queue(&md->queue); 2214 mmc_cleanup_queue(&md->queue);
2175 if (md->disk->flags & GENHD_FL_UP) { 2215 if (md->disk->flags & GENHD_FL_UP) {
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 4ffea14b7eb6..2bae69e39544 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1289,7 +1289,7 @@ out_err:
1289static int mmc_select_hs400es(struct mmc_card *card) 1289static int mmc_select_hs400es(struct mmc_card *card)
1290{ 1290{
1291 struct mmc_host *host = card->host; 1291 struct mmc_host *host = card->host;
1292 int err = 0; 1292 int err = -EINVAL;
1293 u8 val; 1293 u8 val;
1294 1294
1295 if (!(host->caps & MMC_CAP_8_BIT_DATA)) { 1295 if (!(host->caps & MMC_CAP_8_BIT_DATA)) {
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 04ff3c97a535..2ab4788d021f 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -2086,7 +2086,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
2086 mmc->max_seg_size = mmc->max_req_size; 2086 mmc->max_seg_size = mmc->max_req_size;
2087 2087
2088 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | 2088 mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
2089 MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_ERASE; 2089 MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_ERASE | MMC_CAP_CMD23;
2090 2090
2091 mmc->caps |= mmc_pdata(host)->caps; 2091 mmc->caps |= mmc_pdata(host)->caps;
2092 if (mmc->caps & MMC_CAP_8_BIT_DATA) 2092 if (mmc->caps & MMC_CAP_8_BIT_DATA)
diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c
index 7611fd679f1a..1485530c3592 100644
--- a/drivers/mmc/host/sdhci-of-at91.c
+++ b/drivers/mmc/host/sdhci-of-at91.c
@@ -31,6 +31,7 @@
31 31
32#define SDMMC_MC1R 0x204 32#define SDMMC_MC1R 0x204
33#define SDMMC_MC1R_DDR BIT(3) 33#define SDMMC_MC1R_DDR BIT(3)
34#define SDMMC_MC1R_FCD BIT(7)
34#define SDMMC_CACR 0x230 35#define SDMMC_CACR 0x230
35#define SDMMC_CACR_CAPWREN BIT(0) 36#define SDMMC_CACR_CAPWREN BIT(0)
36#define SDMMC_CACR_KEY (0x46 << 8) 37#define SDMMC_CACR_KEY (0x46 << 8)
@@ -43,6 +44,15 @@ struct sdhci_at91_priv {
43 struct clk *mainck; 44 struct clk *mainck;
44}; 45};
45 46
47static void sdhci_at91_set_force_card_detect(struct sdhci_host *host)
48{
49 u8 mc1r;
50
51 mc1r = readb(host->ioaddr + SDMMC_MC1R);
52 mc1r |= SDMMC_MC1R_FCD;
53 writeb(mc1r, host->ioaddr + SDMMC_MC1R);
54}
55
46static void sdhci_at91_set_clock(struct sdhci_host *host, unsigned int clock) 56static void sdhci_at91_set_clock(struct sdhci_host *host, unsigned int clock)
47{ 57{
48 u16 clk; 58 u16 clk;
@@ -110,10 +120,18 @@ void sdhci_at91_set_uhs_signaling(struct sdhci_host *host, unsigned int timing)
110 sdhci_set_uhs_signaling(host, timing); 120 sdhci_set_uhs_signaling(host, timing);
111} 121}
112 122
123static void sdhci_at91_reset(struct sdhci_host *host, u8 mask)
124{
125 sdhci_reset(host, mask);
126
127 if (host->mmc->caps & MMC_CAP_NONREMOVABLE)
128 sdhci_at91_set_force_card_detect(host);
129}
130
113static const struct sdhci_ops sdhci_at91_sama5d2_ops = { 131static const struct sdhci_ops sdhci_at91_sama5d2_ops = {
114 .set_clock = sdhci_at91_set_clock, 132 .set_clock = sdhci_at91_set_clock,
115 .set_bus_width = sdhci_set_bus_width, 133 .set_bus_width = sdhci_set_bus_width,
116 .reset = sdhci_reset, 134 .reset = sdhci_at91_reset,
117 .set_uhs_signaling = sdhci_at91_set_uhs_signaling, 135 .set_uhs_signaling = sdhci_at91_set_uhs_signaling,
118 .set_power = sdhci_at91_set_power, 136 .set_power = sdhci_at91_set_power,
119}; 137};
@@ -324,6 +342,21 @@ static int sdhci_at91_probe(struct platform_device *pdev)
324 host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION; 342 host->quirks &= ~SDHCI_QUIRK_BROKEN_CARD_DETECTION;
325 } 343 }
326 344
345 /*
346 * If the device attached to the MMC bus is not removable, it is safer
347 * to set the Force Card Detect bit. People often don't connect the
348 * card detect signal and use this pin for another purpose. If the card
349 * detect pin is not muxed to SDHCI controller, a default value is
350 * used. This value can be different from a SoC revision to another
351 * one. Problems come when this default value is not card present. To
352 * avoid this case, if the device is non removable then the card
353 * detection procedure using the SDMCC_CD signal is bypassed.
354 * This bit is reset when a software reset for all command is performed
355 * so we need to implement our own reset function to set back this bit.
356 */
357 if (host->mmc->caps & MMC_CAP_NONREMOVABLE)
358 sdhci_at91_set_force_card_detect(host);
359
327 pm_runtime_put_autosuspend(&pdev->dev); 360 pm_runtime_put_autosuspend(&pdev->dev);
328 361
329 return 0; 362 return 0;
diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
index f336a9b85576..9ec8f033ac5f 100644
--- a/drivers/mtd/mtd_blkdevs.c
+++ b/drivers/mtd/mtd_blkdevs.c
@@ -113,6 +113,7 @@ static blk_status_t do_blktrans_request(struct mtd_blktrans_ops *tr,
113 for (; nsect > 0; nsect--, block++, buf += tr->blksize) 113 for (; nsect > 0; nsect--, block++, buf += tr->blksize)
114 if (tr->writesect(dev, block, buf)) 114 if (tr->writesect(dev, block, buf))
115 return BLK_STS_IOERR; 115 return BLK_STS_IOERR;
116 return BLK_STS_OK;
116 default: 117 default:
117 return BLK_STS_IOERR; 118 return BLK_STS_IOERR;
118 } 119 }
diff --git a/drivers/mtd/nand/atmel/nand-controller.c b/drivers/mtd/nand/atmel/nand-controller.c
index d922a88e407f..ceec21bd30c4 100644
--- a/drivers/mtd/nand/atmel/nand-controller.c
+++ b/drivers/mtd/nand/atmel/nand-controller.c
@@ -1201,7 +1201,7 @@ static int atmel_smc_nand_prepare_smcconf(struct atmel_nand *nand,
1201 * tRC < 30ns implies EDO mode. This controller does not support this 1201 * tRC < 30ns implies EDO mode. This controller does not support this
1202 * mode. 1202 * mode.
1203 */ 1203 */
1204 if (conf->timings.sdr.tRC_min < 30) 1204 if (conf->timings.sdr.tRC_min < 30000)
1205 return -ENOTSUPP; 1205 return -ENOTSUPP;
1206 1206
1207 atmel_smc_cs_conf_init(smcconf); 1207 atmel_smc_cs_conf_init(smcconf);
@@ -1364,7 +1364,18 @@ static int atmel_smc_nand_prepare_smcconf(struct atmel_nand *nand,
1364 ret = atmel_smc_cs_conf_set_timing(smcconf, 1364 ret = atmel_smc_cs_conf_set_timing(smcconf,
1365 ATMEL_HSMC_TIMINGS_TADL_SHIFT, 1365 ATMEL_HSMC_TIMINGS_TADL_SHIFT,
1366 ncycles); 1366 ncycles);
1367 if (ret) 1367 /*
1368 * Version 4 of the ONFI spec mandates that tADL be at least 400
1369 * nanoseconds, but, depending on the master clock rate, 400 ns may not
1370 * fit in the tADL field of the SMC reg. We need to relax the check and
1371 * accept the -ERANGE return code.
1372 *
1373 * Note that previous versions of the ONFI spec had a lower tADL_min
1374 * (100 or 200 ns). It's not clear why this timing constraint got
1375 * increased but it seems most NANDs are fine with values lower than
1376 * 400ns, so we should be safe.
1377 */
1378 if (ret && ret != -ERANGE)
1368 return ret; 1379 return ret;
1369 1380
1370 ncycles = DIV_ROUND_UP(conf->timings.sdr.tAR_min, mckperiodps); 1381 ncycles = DIV_ROUND_UP(conf->timings.sdr.tAR_min, mckperiodps);
diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel/pmecc.c
index 55a8ee5306ea..8c210a5776bc 100644
--- a/drivers/mtd/nand/atmel/pmecc.c
+++ b/drivers/mtd/nand/atmel/pmecc.c
@@ -945,6 +945,7 @@ struct atmel_pmecc *devm_atmel_pmecc_get(struct device *userdev)
945 */ 945 */
946 struct platform_device *pdev = to_platform_device(userdev); 946 struct platform_device *pdev = to_platform_device(userdev);
947 const struct atmel_pmecc_caps *caps; 947 const struct atmel_pmecc_caps *caps;
948 const struct of_device_id *match;
948 949
949 /* No PMECC engine available. */ 950 /* No PMECC engine available. */
950 if (!of_property_read_bool(userdev->of_node, 951 if (!of_property_read_bool(userdev->of_node,
@@ -953,21 +954,11 @@ struct atmel_pmecc *devm_atmel_pmecc_get(struct device *userdev)
953 954
954 caps = &at91sam9g45_caps; 955 caps = &at91sam9g45_caps;
955 956
956 /* 957 /* Find the caps associated to the NAND dev node. */
957 * Try to find the NFC subnode and extract the associated caps 958 match = of_match_node(atmel_pmecc_legacy_match,
958 * from there. 959 userdev->of_node);
959 */ 960 if (match && match->data)
960 np = of_find_compatible_node(userdev->of_node, NULL, 961 caps = match->data;
961 "atmel,sama5d3-nfc");
962 if (np) {
963 const struct of_device_id *match;
964
965 match = of_match_node(atmel_pmecc_legacy_match, np);
966 if (match && match->data)
967 caps = match->data;
968
969 of_node_put(np);
970 }
971 962
972 pmecc = atmel_pmecc_create(pdev, caps, 1, 2); 963 pmecc = atmel_pmecc_create(pdev, caps, 1, 2);
973 } 964 }
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 5fa5ddc94834..c6c18b82f8f4 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -65,8 +65,14 @@ static int nand_ooblayout_ecc_sp(struct mtd_info *mtd, int section,
65 65
66 if (!section) { 66 if (!section) {
67 oobregion->offset = 0; 67 oobregion->offset = 0;
68 oobregion->length = 4; 68 if (mtd->oobsize == 16)
69 oobregion->length = 4;
70 else
71 oobregion->length = 3;
69 } else { 72 } else {
73 if (mtd->oobsize == 8)
74 return -ERANGE;
75
70 oobregion->offset = 6; 76 oobregion->offset = 6;
71 oobregion->length = ecc->total - 4; 77 oobregion->length = ecc->total - 4;
72 } 78 }
@@ -1125,7 +1131,9 @@ static int nand_setup_data_interface(struct nand_chip *chip, int chipnr)
1125 * Ensure the timing mode has been changed on the chip side 1131 * Ensure the timing mode has been changed on the chip side
1126 * before changing timings on the controller side. 1132 * before changing timings on the controller side.
1127 */ 1133 */
1128 if (chip->onfi_version) { 1134 if (chip->onfi_version &&
1135 (le16_to_cpu(chip->onfi_params.opt_cmd) &
1136 ONFI_OPT_CMD_SET_GET_FEATURES)) {
1129 u8 tmode_param[ONFI_SUBFEATURE_PARAM_LEN] = { 1137 u8 tmode_param[ONFI_SUBFEATURE_PARAM_LEN] = {
1130 chip->onfi_timing_mode_default, 1138 chip->onfi_timing_mode_default,
1131 }; 1139 };
@@ -2741,7 +2749,6 @@ static int nand_write_page_syndrome(struct mtd_info *mtd,
2741 * @buf: the data to write 2749 * @buf: the data to write
2742 * @oob_required: must write chip->oob_poi to OOB 2750 * @oob_required: must write chip->oob_poi to OOB
2743 * @page: page number to write 2751 * @page: page number to write
2744 * @cached: cached programming
2745 * @raw: use _raw version of write_page 2752 * @raw: use _raw version of write_page
2746 */ 2753 */
2747static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip, 2754static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,
diff --git a/drivers/mtd/nand/nand_timings.c b/drivers/mtd/nand/nand_timings.c
index f06312df3669..7e36d7d13c26 100644
--- a/drivers/mtd/nand/nand_timings.c
+++ b/drivers/mtd/nand/nand_timings.c
@@ -311,9 +311,9 @@ int onfi_init_data_interface(struct nand_chip *chip,
311 struct nand_sdr_timings *timings = &iface->timings.sdr; 311 struct nand_sdr_timings *timings = &iface->timings.sdr;
312 312
313 /* microseconds -> picoseconds */ 313 /* microseconds -> picoseconds */
314 timings->tPROG_max = 1000000UL * le16_to_cpu(params->t_prog); 314 timings->tPROG_max = 1000000ULL * le16_to_cpu(params->t_prog);
315 timings->tBERS_max = 1000000UL * le16_to_cpu(params->t_bers); 315 timings->tBERS_max = 1000000ULL * le16_to_cpu(params->t_bers);
316 timings->tR_max = 1000000UL * le16_to_cpu(params->t_r); 316 timings->tR_max = 1000000ULL * le16_to_cpu(params->t_r);
317 317
318 /* nanoseconds -> picoseconds */ 318 /* nanoseconds -> picoseconds */
319 timings->tCCS_min = 1000UL * le16_to_cpu(params->t_ccs); 319 timings->tCCS_min = 1000UL * le16_to_cpu(params->t_ccs);
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index 03a0d057bf2f..e4211c3cc49b 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -2373,6 +2373,7 @@ static int __init ns_init_module(void)
2373 return 0; 2373 return 0;
2374 2374
2375err_exit: 2375err_exit:
2376 nandsim_debugfs_remove(nand);
2376 free_nandsim(nand); 2377 free_nandsim(nand);
2377 nand_release(nsmtd); 2378 nand_release(nsmtd);
2378 for (i = 0;i < ARRAY_SIZE(nand->partitions); ++i) 2379 for (i = 0;i < ARRAY_SIZE(nand->partitions); ++i)
diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index d0b6f8f9f297..6abd142b1324 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -1728,6 +1728,10 @@ static int sunxi_nfc_setup_data_interface(struct mtd_info *mtd, int csline,
1728 */ 1728 */
1729 chip->clk_rate = NSEC_PER_SEC / min_clk_period; 1729 chip->clk_rate = NSEC_PER_SEC / min_clk_period;
1730 real_clk_rate = clk_round_rate(nfc->mod_clk, chip->clk_rate); 1730 real_clk_rate = clk_round_rate(nfc->mod_clk, chip->clk_rate);
1731 if (real_clk_rate <= 0) {
1732 dev_err(nfc->dev, "Unable to round clk %lu\n", chip->clk_rate);
1733 return -EINVAL;
1734 }
1731 1735
1732 /* 1736 /*
1733 * ONFI specification 3.1, paragraph 4.15.2 dictates that EDO data 1737 * ONFI specification 3.1, paragraph 4.15.2 dictates that EDO data
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 181839d6fbea..fc63992ab0e0 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1569,7 +1569,8 @@ int bond_enslave(struct net_device *bond_dev, struct net_device *slave_dev)
1569 new_slave->delay = 0; 1569 new_slave->delay = 0;
1570 new_slave->link_failure_count = 0; 1570 new_slave->link_failure_count = 0;
1571 1571
1572 if (bond_update_speed_duplex(new_slave)) 1572 if (bond_update_speed_duplex(new_slave) &&
1573 bond_needs_speed_duplex(bond))
1573 new_slave->link = BOND_LINK_DOWN; 1574 new_slave->link = BOND_LINK_DOWN;
1574 1575
1575 new_slave->last_rx = jiffies - 1576 new_slave->last_rx = jiffies -
@@ -2050,6 +2051,7 @@ static int bond_miimon_inspect(struct bonding *bond)
2050 continue; 2051 continue;
2051 2052
2052 bond_propose_link_state(slave, BOND_LINK_FAIL); 2053 bond_propose_link_state(slave, BOND_LINK_FAIL);
2054 commit++;
2053 slave->delay = bond->params.downdelay; 2055 slave->delay = bond->params.downdelay;
2054 if (slave->delay) { 2056 if (slave->delay) {
2055 netdev_info(bond->dev, "link status down for %sinterface %s, disabling it in %d ms\n", 2057 netdev_info(bond->dev, "link status down for %sinterface %s, disabling it in %d ms\n",
@@ -2088,6 +2090,7 @@ static int bond_miimon_inspect(struct bonding *bond)
2088 continue; 2090 continue;
2089 2091
2090 bond_propose_link_state(slave, BOND_LINK_BACK); 2092 bond_propose_link_state(slave, BOND_LINK_BACK);
2093 commit++;
2091 slave->delay = bond->params.updelay; 2094 slave->delay = bond->params.updelay;
2092 2095
2093 if (slave->delay) { 2096 if (slave->delay) {
@@ -2138,11 +2141,13 @@ static void bond_miimon_commit(struct bonding *bond)
2138 continue; 2141 continue;
2139 2142
2140 case BOND_LINK_UP: 2143 case BOND_LINK_UP:
2141 if (bond_update_speed_duplex(slave)) { 2144 if (bond_update_speed_duplex(slave) &&
2145 bond_needs_speed_duplex(bond)) {
2142 slave->link = BOND_LINK_DOWN; 2146 slave->link = BOND_LINK_DOWN;
2143 netdev_warn(bond->dev, 2147 if (net_ratelimit())
2144 "failed to get link speed/duplex for %s\n", 2148 netdev_warn(bond->dev,
2145 slave->dev->name); 2149 "failed to get link speed/duplex for %s\n",
2150 slave->dev->name);
2146 continue; 2151 continue;
2147 } 2152 }
2148 bond_set_slave_link_state(slave, BOND_LINK_UP, 2153 bond_set_slave_link_state(slave, BOND_LINK_UP,
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 1e46418a3b74..264b281eb86b 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -625,6 +625,44 @@ static void mt7530_adjust_link(struct dsa_switch *ds, int port,
625 * all finished. 625 * all finished.
626 */ 626 */
627 mt7623_pad_clk_setup(ds); 627 mt7623_pad_clk_setup(ds);
628 } else {
629 u16 lcl_adv = 0, rmt_adv = 0;
630 u8 flowctrl;
631 u32 mcr = PMCR_USERP_LINK | PMCR_FORCE_MODE;
632
633 switch (phydev->speed) {
634 case SPEED_1000:
635 mcr |= PMCR_FORCE_SPEED_1000;
636 break;
637 case SPEED_100:
638 mcr |= PMCR_FORCE_SPEED_100;
639 break;
640 };
641
642 if (phydev->link)
643 mcr |= PMCR_FORCE_LNK;
644
645 if (phydev->duplex) {
646 mcr |= PMCR_FORCE_FDX;
647
648 if (phydev->pause)
649 rmt_adv = LPA_PAUSE_CAP;
650 if (phydev->asym_pause)
651 rmt_adv |= LPA_PAUSE_ASYM;
652
653 if (phydev->advertising & ADVERTISED_Pause)
654 lcl_adv |= ADVERTISE_PAUSE_CAP;
655 if (phydev->advertising & ADVERTISED_Asym_Pause)
656 lcl_adv |= ADVERTISE_PAUSE_ASYM;
657
658 flowctrl = mii_resolve_flowctrl_fdx(lcl_adv, rmt_adv);
659
660 if (flowctrl & FLOW_CTRL_TX)
661 mcr |= PMCR_TX_FC_EN;
662 if (flowctrl & FLOW_CTRL_RX)
663 mcr |= PMCR_RX_FC_EN;
664 }
665 mt7530_write(priv, MT7530_PMCR_P(port), mcr);
628 } 666 }
629} 667}
630 668
diff --git a/drivers/net/dsa/mt7530.h b/drivers/net/dsa/mt7530.h
index b83d76b99802..74db9822eb40 100644
--- a/drivers/net/dsa/mt7530.h
+++ b/drivers/net/dsa/mt7530.h
@@ -151,6 +151,7 @@ enum mt7530_stp_state {
151#define PMCR_TX_FC_EN BIT(5) 151#define PMCR_TX_FC_EN BIT(5)
152#define PMCR_RX_FC_EN BIT(4) 152#define PMCR_RX_FC_EN BIT(4)
153#define PMCR_FORCE_SPEED_1000 BIT(3) 153#define PMCR_FORCE_SPEED_1000 BIT(3)
154#define PMCR_FORCE_SPEED_100 BIT(2)
154#define PMCR_FORCE_FDX BIT(1) 155#define PMCR_FORCE_FDX BIT(1)
155#define PMCR_FORCE_LNK BIT(0) 156#define PMCR_FORCE_LNK BIT(0)
156#define PMCR_COMMON_LINK (PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | \ 157#define PMCR_COMMON_LINK (PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | \
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
index 86058a9f3417..1d307f2def2d 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c
@@ -1785,9 +1785,9 @@ static int xgene_enet_get_resources(struct xgene_enet_pdata *pdata)
1785 1785
1786 xgene_enet_gpiod_get(pdata); 1786 xgene_enet_gpiod_get(pdata);
1787 1787
1788 if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) { 1788 pdata->clk = devm_clk_get(&pdev->dev, NULL);
1789 pdata->clk = devm_clk_get(&pdev->dev, NULL); 1789 if (IS_ERR(pdata->clk)) {
1790 if (IS_ERR(pdata->clk)) { 1790 if (pdata->phy_mode != PHY_INTERFACE_MODE_SGMII) {
1791 /* Abort if the clock is defined but couldn't be 1791 /* Abort if the clock is defined but couldn't be
1792 * retrived. Always abort if the clock is missing on 1792 * retrived. Always abort if the clock is missing on
1793 * DT system as the driver can't cope with this case. 1793 * DT system as the driver can't cope with this case.
diff --git a/drivers/net/ethernet/aurora/nb8800.c b/drivers/net/ethernet/aurora/nb8800.c
index 041cfb7952f8..e94159507847 100644
--- a/drivers/net/ethernet/aurora/nb8800.c
+++ b/drivers/net/ethernet/aurora/nb8800.c
@@ -609,7 +609,7 @@ static void nb8800_mac_config(struct net_device *dev)
609 mac_mode |= HALF_DUPLEX; 609 mac_mode |= HALF_DUPLEX;
610 610
611 if (gigabit) { 611 if (gigabit) {
612 if (priv->phy_mode == PHY_INTERFACE_MODE_RGMII) 612 if (phy_interface_is_rgmii(dev->phydev))
613 mac_mode |= RGMII_MODE; 613 mac_mode |= RGMII_MODE;
614 614
615 mac_mode |= GMAC_MODE; 615 mac_mode |= GMAC_MODE;
@@ -1268,11 +1268,10 @@ static int nb8800_tangox_init(struct net_device *dev)
1268 break; 1268 break;
1269 1269
1270 case PHY_INTERFACE_MODE_RGMII: 1270 case PHY_INTERFACE_MODE_RGMII:
1271 pad_mode = PAD_MODE_RGMII; 1271 case PHY_INTERFACE_MODE_RGMII_ID:
1272 break; 1272 case PHY_INTERFACE_MODE_RGMII_RXID:
1273
1274 case PHY_INTERFACE_MODE_RGMII_TXID: 1273 case PHY_INTERFACE_MODE_RGMII_TXID:
1275 pad_mode = PAD_MODE_RGMII | PAD_MODE_GTX_CLK_DELAY; 1274 pad_mode = PAD_MODE_RGMII;
1276 break; 1275 break;
1277 1276
1278 default: 1277 default:
diff --git a/drivers/net/ethernet/broadcom/b44.c b/drivers/net/ethernet/broadcom/b44.c
index f411936b744c..a1125d10c825 100644
--- a/drivers/net/ethernet/broadcom/b44.c
+++ b/drivers/net/ethernet/broadcom/b44.c
@@ -2368,6 +2368,7 @@ static int b44_init_one(struct ssb_device *sdev,
2368 bp->msg_enable = netif_msg_init(b44_debug, B44_DEF_MSG_ENABLE); 2368 bp->msg_enable = netif_msg_init(b44_debug, B44_DEF_MSG_ENABLE);
2369 2369
2370 spin_lock_init(&bp->lock); 2370 spin_lock_init(&bp->lock);
2371 u64_stats_init(&bp->hw_stats.syncp);
2371 2372
2372 bp->rx_pending = B44_DEF_RX_RING_PENDING; 2373 bp->rx_pending = B44_DEF_RX_RING_PENDING;
2373 bp->tx_pending = B44_DEF_TX_RING_PENDING; 2374 bp->tx_pending = B44_DEF_TX_RING_PENDING;
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c
index 5333601f855f..dc3052751bc1 100644
--- a/drivers/net/ethernet/broadcom/bcmsysport.c
+++ b/drivers/net/ethernet/broadcom/bcmsysport.c
@@ -449,6 +449,10 @@ static void bcm_sysport_get_stats(struct net_device *dev,
449 p = (char *)&dev->stats; 449 p = (char *)&dev->stats;
450 else 450 else
451 p = (char *)priv; 451 p = (char *)priv;
452
453 if (priv->is_lite && !bcm_sysport_lite_stat_valid(s->type))
454 continue;
455
452 p += s->stat_offset; 456 p += s->stat_offset;
453 data[j] = *(unsigned long *)p; 457 data[j] = *(unsigned long *)p;
454 j++; 458 j++;
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 7b0b399aaedd..a981c4ee9d72 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -3669,7 +3669,7 @@ static int bcmgenet_resume(struct device *d)
3669 3669
3670 phy_init_hw(priv->phydev); 3670 phy_init_hw(priv->phydev);
3671 /* Speed settings must be restored */ 3671 /* Speed settings must be restored */
3672 bcmgenet_mii_config(priv->dev); 3672 bcmgenet_mii_config(priv->dev, false);
3673 3673
3674 /* disable ethernet MAC while updating its registers */ 3674 /* disable ethernet MAC while updating its registers */
3675 umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, false); 3675 umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, false);
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.h b/drivers/net/ethernet/broadcom/genet/bcmgenet.h
index b9344de669f8..3a34fdba5301 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.h
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.h
@@ -698,7 +698,7 @@ GENET_IO_MACRO(rbuf, GENET_RBUF_OFF);
698 698
699/* MDIO routines */ 699/* MDIO routines */
700int bcmgenet_mii_init(struct net_device *dev); 700int bcmgenet_mii_init(struct net_device *dev);
701int bcmgenet_mii_config(struct net_device *dev); 701int bcmgenet_mii_config(struct net_device *dev, bool init);
702int bcmgenet_mii_probe(struct net_device *dev); 702int bcmgenet_mii_probe(struct net_device *dev);
703void bcmgenet_mii_exit(struct net_device *dev); 703void bcmgenet_mii_exit(struct net_device *dev);
704void bcmgenet_mii_reset(struct net_device *dev); 704void bcmgenet_mii_reset(struct net_device *dev);
diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
index 071fcbd14e6a..30cb97b4a1d7 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -238,7 +238,7 @@ static void bcmgenet_moca_phy_setup(struct bcmgenet_priv *priv)
238 bcmgenet_fixed_phy_link_update); 238 bcmgenet_fixed_phy_link_update);
239} 239}
240 240
241int bcmgenet_mii_config(struct net_device *dev) 241int bcmgenet_mii_config(struct net_device *dev, bool init)
242{ 242{
243 struct bcmgenet_priv *priv = netdev_priv(dev); 243 struct bcmgenet_priv *priv = netdev_priv(dev);
244 struct phy_device *phydev = priv->phydev; 244 struct phy_device *phydev = priv->phydev;
@@ -327,7 +327,8 @@ int bcmgenet_mii_config(struct net_device *dev)
327 bcmgenet_ext_writel(priv, reg, EXT_RGMII_OOB_CTRL); 327 bcmgenet_ext_writel(priv, reg, EXT_RGMII_OOB_CTRL);
328 } 328 }
329 329
330 dev_info_once(kdev, "configuring instance for %s\n", phy_name); 330 if (init)
331 dev_info(kdev, "configuring instance for %s\n", phy_name);
331 332
332 return 0; 333 return 0;
333} 334}
@@ -375,7 +376,7 @@ int bcmgenet_mii_probe(struct net_device *dev)
375 * PHY speed which is needed for bcmgenet_mii_config() to configure 376 * PHY speed which is needed for bcmgenet_mii_config() to configure
376 * things appropriately. 377 * things appropriately.
377 */ 378 */
378 ret = bcmgenet_mii_config(dev); 379 ret = bcmgenet_mii_config(dev, true);
379 if (ret) { 380 if (ret) {
380 phy_disconnect(priv->phydev); 381 phy_disconnect(priv->phydev);
381 return ret; 382 return ret;
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
index 79112563a25a..5e5c4d7796b8 100644
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
@@ -292,11 +292,30 @@ static void bgx_sgmii_change_link_state(struct lmac *lmac)
292 u64 cmr_cfg; 292 u64 cmr_cfg;
293 u64 port_cfg = 0; 293 u64 port_cfg = 0;
294 u64 misc_ctl = 0; 294 u64 misc_ctl = 0;
295 bool tx_en, rx_en;
295 296
296 cmr_cfg = bgx_reg_read(bgx, lmac->lmacid, BGX_CMRX_CFG); 297 cmr_cfg = bgx_reg_read(bgx, lmac->lmacid, BGX_CMRX_CFG);
297 cmr_cfg &= ~CMR_EN; 298 tx_en = cmr_cfg & CMR_PKT_TX_EN;
299 rx_en = cmr_cfg & CMR_PKT_RX_EN;
300 cmr_cfg &= ~(CMR_PKT_RX_EN | CMR_PKT_TX_EN);
298 bgx_reg_write(bgx, lmac->lmacid, BGX_CMRX_CFG, cmr_cfg); 301 bgx_reg_write(bgx, lmac->lmacid, BGX_CMRX_CFG, cmr_cfg);
299 302
303 /* Wait for BGX RX to be idle */
304 if (bgx_poll_reg(bgx, lmac->lmacid, BGX_GMP_GMI_PRTX_CFG,
305 GMI_PORT_CFG_RX_IDLE, false)) {
306 dev_err(&bgx->pdev->dev, "BGX%d LMAC%d GMI RX not idle\n",
307 bgx->bgx_id, lmac->lmacid);
308 return;
309 }
310
311 /* Wait for BGX TX to be idle */
312 if (bgx_poll_reg(bgx, lmac->lmacid, BGX_GMP_GMI_PRTX_CFG,
313 GMI_PORT_CFG_TX_IDLE, false)) {
314 dev_err(&bgx->pdev->dev, "BGX%d LMAC%d GMI TX not idle\n",
315 bgx->bgx_id, lmac->lmacid);
316 return;
317 }
318
300 port_cfg = bgx_reg_read(bgx, lmac->lmacid, BGX_GMP_GMI_PRTX_CFG); 319 port_cfg = bgx_reg_read(bgx, lmac->lmacid, BGX_GMP_GMI_PRTX_CFG);
301 misc_ctl = bgx_reg_read(bgx, lmac->lmacid, BGX_GMP_PCS_MISCX_CTL); 320 misc_ctl = bgx_reg_read(bgx, lmac->lmacid, BGX_GMP_PCS_MISCX_CTL);
302 321
@@ -347,10 +366,8 @@ static void bgx_sgmii_change_link_state(struct lmac *lmac)
347 bgx_reg_write(bgx, lmac->lmacid, BGX_GMP_PCS_MISCX_CTL, misc_ctl); 366 bgx_reg_write(bgx, lmac->lmacid, BGX_GMP_PCS_MISCX_CTL, misc_ctl);
348 bgx_reg_write(bgx, lmac->lmacid, BGX_GMP_GMI_PRTX_CFG, port_cfg); 367 bgx_reg_write(bgx, lmac->lmacid, BGX_GMP_GMI_PRTX_CFG, port_cfg);
349 368
350 port_cfg = bgx_reg_read(bgx, lmac->lmacid, BGX_GMP_GMI_PRTX_CFG); 369 /* Restore CMR config settings */
351 370 cmr_cfg |= (rx_en ? CMR_PKT_RX_EN : 0) | (tx_en ? CMR_PKT_TX_EN : 0);
352 /* Re-enable lmac */
353 cmr_cfg |= CMR_EN;
354 bgx_reg_write(bgx, lmac->lmacid, BGX_CMRX_CFG, cmr_cfg); 371 bgx_reg_write(bgx, lmac->lmacid, BGX_CMRX_CFG, cmr_cfg);
355 372
356 if (bgx->is_rgx && (cmr_cfg & (CMR_PKT_RX_EN | CMR_PKT_TX_EN))) 373 if (bgx->is_rgx && (cmr_cfg & (CMR_PKT_RX_EN | CMR_PKT_TX_EN)))
diff --git a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
index 6b7fe6fdd13b..23acdc5ab896 100644
--- a/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
+++ b/drivers/net/ethernet/cavium/thunder/thunder_bgx.h
@@ -170,6 +170,8 @@
170#define GMI_PORT_CFG_DUPLEX BIT_ULL(2) 170#define GMI_PORT_CFG_DUPLEX BIT_ULL(2)
171#define GMI_PORT_CFG_SLOT_TIME BIT_ULL(3) 171#define GMI_PORT_CFG_SLOT_TIME BIT_ULL(3)
172#define GMI_PORT_CFG_SPEED_MSB BIT_ULL(8) 172#define GMI_PORT_CFG_SPEED_MSB BIT_ULL(8)
173#define GMI_PORT_CFG_RX_IDLE BIT_ULL(12)
174#define GMI_PORT_CFG_TX_IDLE BIT_ULL(13)
173#define BGX_GMP_GMI_RXX_JABBER 0x38038 175#define BGX_GMP_GMI_RXX_JABBER 0x38038
174#define BGX_GMP_GMI_TXX_THRESH 0x38210 176#define BGX_GMP_GMI_TXX_THRESH 0x38210
175#define BGX_GMP_GMI_TXX_APPEND 0x38218 177#define BGX_GMP_GMI_TXX_APPEND 0x38218
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
index ef4be781fd05..09ea62ee96d3 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4.h
@@ -529,6 +529,7 @@ enum { /* adapter flags */
529 USING_SOFT_PARAMS = (1 << 6), 529 USING_SOFT_PARAMS = (1 << 6),
530 MASTER_PF = (1 << 7), 530 MASTER_PF = (1 << 7),
531 FW_OFLD_CONN = (1 << 9), 531 FW_OFLD_CONN = (1 << 9),
532 ROOT_NO_RELAXED_ORDERING = (1 << 10),
532}; 533};
533 534
534enum { 535enum {
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index e403fa18f1b1..33bb8678833a 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -4654,11 +4654,6 @@ static void print_port_info(const struct net_device *dev)
4654 dev->name, adap->params.vpd.id, adap->name, buf); 4654 dev->name, adap->params.vpd.id, adap->name, buf);
4655} 4655}
4656 4656
4657static void enable_pcie_relaxed_ordering(struct pci_dev *dev)
4658{
4659 pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_DEVCTL_RELAX_EN);
4660}
4661
4662/* 4657/*
4663 * Free the following resources: 4658 * Free the following resources:
4664 * - memory used for tables 4659 * - memory used for tables
@@ -4908,7 +4903,6 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
4908 } 4903 }
4909 4904
4910 pci_enable_pcie_error_reporting(pdev); 4905 pci_enable_pcie_error_reporting(pdev);
4911 enable_pcie_relaxed_ordering(pdev);
4912 pci_set_master(pdev); 4906 pci_set_master(pdev);
4913 pci_save_state(pdev); 4907 pci_save_state(pdev);
4914 4908
@@ -4947,6 +4941,23 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
4947 adapter->msg_enable = DFLT_MSG_ENABLE; 4941 adapter->msg_enable = DFLT_MSG_ENABLE;
4948 memset(adapter->chan_map, 0xff, sizeof(adapter->chan_map)); 4942 memset(adapter->chan_map, 0xff, sizeof(adapter->chan_map));
4949 4943
4944 /* If possible, we use PCIe Relaxed Ordering Attribute to deliver
4945 * Ingress Packet Data to Free List Buffers in order to allow for
4946 * chipset performance optimizations between the Root Complex and
4947 * Memory Controllers. (Messages to the associated Ingress Queue
4948 * notifying new Packet Placement in the Free Lists Buffers will be
4949 * send without the Relaxed Ordering Attribute thus guaranteeing that
4950 * all preceding PCIe Transaction Layer Packets will be processed
4951 * first.) But some Root Complexes have various issues with Upstream
4952 * Transaction Layer Packets with the Relaxed Ordering Attribute set.
4953 * The PCIe devices which under the Root Complexes will be cleared the
4954 * Relaxed Ordering bit in the configuration space, So we check our
4955 * PCIe configuration space to see if it's flagged with advice against
4956 * using Relaxed Ordering.
4957 */
4958 if (!pcie_relaxed_ordering_enabled(pdev))
4959 adapter->flags |= ROOT_NO_RELAXED_ORDERING;
4960
4950 spin_lock_init(&adapter->stats_lock); 4961 spin_lock_init(&adapter->stats_lock);
4951 spin_lock_init(&adapter->tid_release_lock); 4962 spin_lock_init(&adapter->tid_release_lock);
4952 spin_lock_init(&adapter->win0_lock); 4963 spin_lock_init(&adapter->win0_lock);
diff --git a/drivers/net/ethernet/chelsio/cxgb4/sge.c b/drivers/net/ethernet/chelsio/cxgb4/sge.c
index ede12209f20b..4ef68f69b58c 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/sge.c
@@ -2719,6 +2719,7 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
2719 struct fw_iq_cmd c; 2719 struct fw_iq_cmd c;
2720 struct sge *s = &adap->sge; 2720 struct sge *s = &adap->sge;
2721 struct port_info *pi = netdev_priv(dev); 2721 struct port_info *pi = netdev_priv(dev);
2722 int relaxed = !(adap->flags & ROOT_NO_RELAXED_ORDERING);
2722 2723
2723 /* Size needs to be multiple of 16, including status entry. */ 2724 /* Size needs to be multiple of 16, including status entry. */
2724 iq->size = roundup(iq->size, 16); 2725 iq->size = roundup(iq->size, 16);
@@ -2772,8 +2773,8 @@ int t4_sge_alloc_rxq(struct adapter *adap, struct sge_rspq *iq, bool fwevtq,
2772 2773
2773 flsz = fl->size / 8 + s->stat_len / sizeof(struct tx_desc); 2774 flsz = fl->size / 8 + s->stat_len / sizeof(struct tx_desc);
2774 c.iqns_to_fl0congen |= htonl(FW_IQ_CMD_FL0PACKEN_F | 2775 c.iqns_to_fl0congen |= htonl(FW_IQ_CMD_FL0PACKEN_F |
2775 FW_IQ_CMD_FL0FETCHRO_F | 2776 FW_IQ_CMD_FL0FETCHRO_V(relaxed) |
2776 FW_IQ_CMD_FL0DATARO_F | 2777 FW_IQ_CMD_FL0DATARO_V(relaxed) |
2777 FW_IQ_CMD_FL0PADEN_F); 2778 FW_IQ_CMD_FL0PADEN_F);
2778 if (cong >= 0) 2779 if (cong >= 0)
2779 c.iqns_to_fl0congen |= 2780 c.iqns_to_fl0congen |=
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
index 109bc630408b..08c6ddb84a04 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/adapter.h
@@ -408,6 +408,7 @@ enum { /* adapter flags */
408 USING_MSI = (1UL << 1), 408 USING_MSI = (1UL << 1),
409 USING_MSIX = (1UL << 2), 409 USING_MSIX = (1UL << 2),
410 QUEUES_BOUND = (1UL << 3), 410 QUEUES_BOUND = (1UL << 3),
411 ROOT_NO_RELAXED_ORDERING = (1UL << 4),
411}; 412};
412 413
413/* 414/*
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
index ac7a150c54e9..2b85b874fd0d 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/cxgb4vf_main.c
@@ -2888,6 +2888,24 @@ static int cxgb4vf_pci_probe(struct pci_dev *pdev,
2888 */ 2888 */
2889 adapter->name = pci_name(pdev); 2889 adapter->name = pci_name(pdev);
2890 adapter->msg_enable = DFLT_MSG_ENABLE; 2890 adapter->msg_enable = DFLT_MSG_ENABLE;
2891
2892 /* If possible, we use PCIe Relaxed Ordering Attribute to deliver
2893 * Ingress Packet Data to Free List Buffers in order to allow for
2894 * chipset performance optimizations between the Root Complex and
2895 * Memory Controllers. (Messages to the associated Ingress Queue
2896 * notifying new Packet Placement in the Free Lists Buffers will be
2897 * send without the Relaxed Ordering Attribute thus guaranteeing that
2898 * all preceding PCIe Transaction Layer Packets will be processed
2899 * first.) But some Root Complexes have various issues with Upstream
2900 * Transaction Layer Packets with the Relaxed Ordering Attribute set.
2901 * The PCIe devices which under the Root Complexes will be cleared the
2902 * Relaxed Ordering bit in the configuration space, So we check our
2903 * PCIe configuration space to see if it's flagged with advice against
2904 * using Relaxed Ordering.
2905 */
2906 if (!pcie_relaxed_ordering_enabled(pdev))
2907 adapter->flags |= ROOT_NO_RELAXED_ORDERING;
2908
2891 err = adap_init0(adapter); 2909 err = adap_init0(adapter);
2892 if (err) 2910 if (err)
2893 goto err_unmap_bar; 2911 goto err_unmap_bar;
diff --git a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
index e37dde2ba97f..05498e7f2840 100644
--- a/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb4vf/sge.c
@@ -2205,6 +2205,7 @@ int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq,
2205 struct port_info *pi = netdev_priv(dev); 2205 struct port_info *pi = netdev_priv(dev);
2206 struct fw_iq_cmd cmd, rpl; 2206 struct fw_iq_cmd cmd, rpl;
2207 int ret, iqandst, flsz = 0; 2207 int ret, iqandst, flsz = 0;
2208 int relaxed = !(adapter->flags & ROOT_NO_RELAXED_ORDERING);
2208 2209
2209 /* 2210 /*
2210 * If we're using MSI interrupts and we're not initializing the 2211 * If we're using MSI interrupts and we're not initializing the
@@ -2300,6 +2301,8 @@ int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq,
2300 cpu_to_be32( 2301 cpu_to_be32(
2301 FW_IQ_CMD_FL0HOSTFCMODE_V(SGE_HOSTFCMODE_NONE) | 2302 FW_IQ_CMD_FL0HOSTFCMODE_V(SGE_HOSTFCMODE_NONE) |
2302 FW_IQ_CMD_FL0PACKEN_F | 2303 FW_IQ_CMD_FL0PACKEN_F |
2304 FW_IQ_CMD_FL0FETCHRO_V(relaxed) |
2305 FW_IQ_CMD_FL0DATARO_V(relaxed) |
2303 FW_IQ_CMD_FL0PADEN_F); 2306 FW_IQ_CMD_FL0PADEN_F);
2304 2307
2305 /* In T6, for egress queue type FL there is internal overhead 2308 /* In T6, for egress queue type FL there is internal overhead
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 95bf5e89cfd1..34dae51effd4 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -125,7 +125,7 @@ static int ftgmac100_reset_mac(struct ftgmac100 *priv, u32 maccr)
125 iowrite32(maccr, priv->base + FTGMAC100_OFFSET_MACCR); 125 iowrite32(maccr, priv->base + FTGMAC100_OFFSET_MACCR);
126 iowrite32(maccr | FTGMAC100_MACCR_SW_RST, 126 iowrite32(maccr | FTGMAC100_MACCR_SW_RST,
127 priv->base + FTGMAC100_OFFSET_MACCR); 127 priv->base + FTGMAC100_OFFSET_MACCR);
128 for (i = 0; i < 50; i++) { 128 for (i = 0; i < 200; i++) {
129 unsigned int maccr; 129 unsigned int maccr;
130 130
131 maccr = ioread32(priv->base + FTGMAC100_OFFSET_MACCR); 131 maccr = ioread32(priv->base + FTGMAC100_OFFSET_MACCR);
@@ -392,7 +392,7 @@ static int ftgmac100_alloc_rx_buf(struct ftgmac100 *priv, unsigned int entry,
392 struct net_device *netdev = priv->netdev; 392 struct net_device *netdev = priv->netdev;
393 struct sk_buff *skb; 393 struct sk_buff *skb;
394 dma_addr_t map; 394 dma_addr_t map;
395 int err; 395 int err = 0;
396 396
397 skb = netdev_alloc_skb_ip_align(netdev, RX_BUF_SIZE); 397 skb = netdev_alloc_skb_ip_align(netdev, RX_BUF_SIZE);
398 if (unlikely(!skb)) { 398 if (unlikely(!skb)) {
@@ -428,7 +428,7 @@ static int ftgmac100_alloc_rx_buf(struct ftgmac100 *priv, unsigned int entry,
428 else 428 else
429 rxdes->rxdes0 = 0; 429 rxdes->rxdes0 = 0;
430 430
431 return 0; 431 return err;
432} 432}
433 433
434static unsigned int ftgmac100_next_rx_pointer(struct ftgmac100 *priv, 434static unsigned int ftgmac100_next_rx_pointer(struct ftgmac100 *priv,
@@ -1682,6 +1682,7 @@ static int ftgmac100_setup_mdio(struct net_device *netdev)
1682 priv->mii_bus->name = "ftgmac100_mdio"; 1682 priv->mii_bus->name = "ftgmac100_mdio";
1683 snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%d", 1683 snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%d",
1684 pdev->name, pdev->id); 1684 pdev->name, pdev->id);
1685 priv->mii_bus->parent = priv->dev;
1685 priv->mii_bus->priv = priv->netdev; 1686 priv->mii_bus->priv = priv->netdev;
1686 priv->mii_bus->read = ftgmac100_mdiobus_read; 1687 priv->mii_bus->read = ftgmac100_mdiobus_read;
1687 priv->mii_bus->write = ftgmac100_mdiobus_write; 1688 priv->mii_bus->write = ftgmac100_mdiobus_write;
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index a3e694679635..c45e8e3b82d3 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -111,6 +111,7 @@ static void send_request_map(struct ibmvnic_adapter *, dma_addr_t, __be32, u8);
111static void send_request_unmap(struct ibmvnic_adapter *, u8); 111static void send_request_unmap(struct ibmvnic_adapter *, u8);
112static void send_login(struct ibmvnic_adapter *adapter); 112static void send_login(struct ibmvnic_adapter *adapter);
113static void send_cap_queries(struct ibmvnic_adapter *adapter); 113static void send_cap_queries(struct ibmvnic_adapter *adapter);
114static int init_sub_crqs(struct ibmvnic_adapter *);
114static int init_sub_crq_irqs(struct ibmvnic_adapter *adapter); 115static int init_sub_crq_irqs(struct ibmvnic_adapter *adapter);
115static int ibmvnic_init(struct ibmvnic_adapter *); 116static int ibmvnic_init(struct ibmvnic_adapter *);
116static void release_crq_queue(struct ibmvnic_adapter *); 117static void release_crq_queue(struct ibmvnic_adapter *);
@@ -651,6 +652,7 @@ static int ibmvnic_login(struct net_device *netdev)
651 struct ibmvnic_adapter *adapter = netdev_priv(netdev); 652 struct ibmvnic_adapter *adapter = netdev_priv(netdev);
652 unsigned long timeout = msecs_to_jiffies(30000); 653 unsigned long timeout = msecs_to_jiffies(30000);
653 struct device *dev = &adapter->vdev->dev; 654 struct device *dev = &adapter->vdev->dev;
655 int rc;
654 656
655 do { 657 do {
656 if (adapter->renegotiate) { 658 if (adapter->renegotiate) {
@@ -664,6 +666,18 @@ static int ibmvnic_login(struct net_device *netdev)
664 dev_err(dev, "Capabilities query timeout\n"); 666 dev_err(dev, "Capabilities query timeout\n");
665 return -1; 667 return -1;
666 } 668 }
669 rc = init_sub_crqs(adapter);
670 if (rc) {
671 dev_err(dev,
672 "Initialization of SCRQ's failed\n");
673 return -1;
674 }
675 rc = init_sub_crq_irqs(adapter);
676 if (rc) {
677 dev_err(dev,
678 "Initialization of SCRQ's irqs failed\n");
679 return -1;
680 }
667 } 681 }
668 682
669 reinit_completion(&adapter->init_done); 683 reinit_completion(&adapter->init_done);
@@ -3004,7 +3018,6 @@ static void handle_request_cap_rsp(union ibmvnic_crq *crq,
3004 *req_value, 3018 *req_value,
3005 (long int)be64_to_cpu(crq->request_capability_rsp. 3019 (long int)be64_to_cpu(crq->request_capability_rsp.
3006 number), name); 3020 number), name);
3007 release_sub_crqs(adapter);
3008 *req_value = be64_to_cpu(crq->request_capability_rsp.number); 3021 *req_value = be64_to_cpu(crq->request_capability_rsp.number);
3009 ibmvnic_send_req_caps(adapter, 1); 3022 ibmvnic_send_req_caps(adapter, 1);
3010 return; 3023 return;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index b936febc315a..2194960d5855 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1113,6 +1113,8 @@ int i40e_setup_tx_descriptors(struct i40e_ring *tx_ring)
1113 if (!tx_ring->tx_bi) 1113 if (!tx_ring->tx_bi)
1114 goto err; 1114 goto err;
1115 1115
1116 u64_stats_init(&tx_ring->syncp);
1117
1116 /* round up to nearest 4K */ 1118 /* round up to nearest 4K */
1117 tx_ring->size = tx_ring->count * sizeof(struct i40e_tx_desc); 1119 tx_ring->size = tx_ring->count * sizeof(struct i40e_tx_desc);
1118 /* add u32 for head writeback, align after this takes care of 1120 /* add u32 for head writeback, align after this takes care of
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index 084c53582793..032f8ac06357 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -2988,6 +2988,8 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_ring *tx_ring)
2988 if (!tx_ring->tx_buffer_info) 2988 if (!tx_ring->tx_buffer_info)
2989 goto err; 2989 goto err;
2990 2990
2991 u64_stats_init(&tx_ring->syncp);
2992
2991 /* round up to nearest 4K */ 2993 /* round up to nearest 4K */
2992 tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc); 2994 tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc);
2993 tx_ring->size = ALIGN(tx_ring->size, 4096); 2995 tx_ring->size = ALIGN(tx_ring->size, 4096);
@@ -3046,6 +3048,8 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_ring *rx_ring)
3046 if (!rx_ring->rx_buffer_info) 3048 if (!rx_ring->rx_buffer_info)
3047 goto err; 3049 goto err;
3048 3050
3051 u64_stats_init(&rx_ring->syncp);
3052
3049 /* Round up to nearest 4K */ 3053 /* Round up to nearest 4K */
3050 rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc); 3054 rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc);
3051 rx_ring->size = ALIGN(rx_ring->size, 4096); 3055 rx_ring->size = ALIGN(rx_ring->size, 4096);
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index 5794d98d946f..9c94ea9b2b80 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2734,7 +2734,7 @@ static int mv643xx_eth_shared_of_add_port(struct platform_device *pdev,
2734 ppd.shared = pdev; 2734 ppd.shared = pdev;
2735 2735
2736 memset(&res, 0, sizeof(res)); 2736 memset(&res, 0, sizeof(res));
2737 if (!of_irq_to_resource(pnp, 0, &res)) { 2737 if (of_irq_to_resource(pnp, 0, &res) <= 0) {
2738 dev_err(&pdev->dev, "missing interrupt on %s\n", pnp->name); 2738 dev_err(&pdev->dev, "missing interrupt on %s\n", pnp->name);
2739 return -EINVAL; 2739 return -EINVAL;
2740 } 2740 }
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index b3d0c2e6347a..e588a0cdb074 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -22,6 +22,7 @@
22#include <linux/if_vlan.h> 22#include <linux/if_vlan.h>
23#include <linux/reset.h> 23#include <linux/reset.h>
24#include <linux/tcp.h> 24#include <linux/tcp.h>
25#include <linux/interrupt.h>
25 26
26#include "mtk_eth_soc.h" 27#include "mtk_eth_soc.h"
27 28
@@ -947,6 +948,10 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,
947 RX_DMA_FPORT_MASK; 948 RX_DMA_FPORT_MASK;
948 mac--; 949 mac--;
949 950
951 if (unlikely(mac < 0 || mac >= MTK_MAC_COUNT ||
952 !eth->netdev[mac]))
953 goto release_desc;
954
950 netdev = eth->netdev[mac]; 955 netdev = eth->netdev[mac];
951 956
952 if (unlikely(test_bit(MTK_RESETTING, &eth->state))) 957 if (unlikely(test_bit(MTK_RESETTING, &eth->state)))
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
index c751a1d434ad..3d4e4a5d00d1 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -223,6 +223,7 @@ static void mlx4_en_get_wol(struct net_device *netdev,
223 struct ethtool_wolinfo *wol) 223 struct ethtool_wolinfo *wol)
224{ 224{
225 struct mlx4_en_priv *priv = netdev_priv(netdev); 225 struct mlx4_en_priv *priv = netdev_priv(netdev);
226 struct mlx4_caps *caps = &priv->mdev->dev->caps;
226 int err = 0; 227 int err = 0;
227 u64 config = 0; 228 u64 config = 0;
228 u64 mask; 229 u64 mask;
@@ -235,24 +236,24 @@ static void mlx4_en_get_wol(struct net_device *netdev,
235 mask = (priv->port == 1) ? MLX4_DEV_CAP_FLAG_WOL_PORT1 : 236 mask = (priv->port == 1) ? MLX4_DEV_CAP_FLAG_WOL_PORT1 :
236 MLX4_DEV_CAP_FLAG_WOL_PORT2; 237 MLX4_DEV_CAP_FLAG_WOL_PORT2;
237 238
238 if (!(priv->mdev->dev->caps.flags & mask)) { 239 if (!(caps->flags & mask)) {
239 wol->supported = 0; 240 wol->supported = 0;
240 wol->wolopts = 0; 241 wol->wolopts = 0;
241 return; 242 return;
242 } 243 }
243 244
245 if (caps->wol_port[priv->port])
246 wol->supported = WAKE_MAGIC;
247 else
248 wol->supported = 0;
249
244 err = mlx4_wol_read(priv->mdev->dev, &config, priv->port); 250 err = mlx4_wol_read(priv->mdev->dev, &config, priv->port);
245 if (err) { 251 if (err) {
246 en_err(priv, "Failed to get WoL information\n"); 252 en_err(priv, "Failed to get WoL information\n");
247 return; 253 return;
248 } 254 }
249 255
250 if (config & MLX4_EN_WOL_MAGIC) 256 if ((config & MLX4_EN_WOL_ENABLED) && (config & MLX4_EN_WOL_MAGIC))
251 wol->supported = WAKE_MAGIC;
252 else
253 wol->supported = 0;
254
255 if (config & MLX4_EN_WOL_ENABLED)
256 wol->wolopts = WAKE_MAGIC; 257 wol->wolopts = WAKE_MAGIC;
257 else 258 else
258 wol->wolopts = 0; 259 wol->wolopts = 0;
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 436f7689a032..bf1638044a7a 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -574,16 +574,21 @@ static inline __wsum get_fixed_vlan_csum(__wsum hw_checksum,
574 * header, the HW adds it. To address that, we are subtracting the pseudo 574 * header, the HW adds it. To address that, we are subtracting the pseudo
575 * header checksum from the checksum value provided by the HW. 575 * header checksum from the checksum value provided by the HW.
576 */ 576 */
577static void get_fixed_ipv4_csum(__wsum hw_checksum, struct sk_buff *skb, 577static int get_fixed_ipv4_csum(__wsum hw_checksum, struct sk_buff *skb,
578 struct iphdr *iph) 578 struct iphdr *iph)
579{ 579{
580 __u16 length_for_csum = 0; 580 __u16 length_for_csum = 0;
581 __wsum csum_pseudo_header = 0; 581 __wsum csum_pseudo_header = 0;
582 __u8 ipproto = iph->protocol;
583
584 if (unlikely(ipproto == IPPROTO_SCTP))
585 return -1;
582 586
583 length_for_csum = (be16_to_cpu(iph->tot_len) - (iph->ihl << 2)); 587 length_for_csum = (be16_to_cpu(iph->tot_len) - (iph->ihl << 2));
584 csum_pseudo_header = csum_tcpudp_nofold(iph->saddr, iph->daddr, 588 csum_pseudo_header = csum_tcpudp_nofold(iph->saddr, iph->daddr,
585 length_for_csum, iph->protocol, 0); 589 length_for_csum, ipproto, 0);
586 skb->csum = csum_sub(hw_checksum, csum_pseudo_header); 590 skb->csum = csum_sub(hw_checksum, csum_pseudo_header);
591 return 0;
587} 592}
588 593
589#if IS_ENABLED(CONFIG_IPV6) 594#if IS_ENABLED(CONFIG_IPV6)
@@ -594,17 +599,20 @@ static void get_fixed_ipv4_csum(__wsum hw_checksum, struct sk_buff *skb,
594static int get_fixed_ipv6_csum(__wsum hw_checksum, struct sk_buff *skb, 599static int get_fixed_ipv6_csum(__wsum hw_checksum, struct sk_buff *skb,
595 struct ipv6hdr *ipv6h) 600 struct ipv6hdr *ipv6h)
596{ 601{
602 __u8 nexthdr = ipv6h->nexthdr;
597 __wsum csum_pseudo_hdr = 0; 603 __wsum csum_pseudo_hdr = 0;
598 604
599 if (unlikely(ipv6h->nexthdr == IPPROTO_FRAGMENT || 605 if (unlikely(nexthdr == IPPROTO_FRAGMENT ||
600 ipv6h->nexthdr == IPPROTO_HOPOPTS)) 606 nexthdr == IPPROTO_HOPOPTS ||
607 nexthdr == IPPROTO_SCTP))
601 return -1; 608 return -1;
602 hw_checksum = csum_add(hw_checksum, (__force __wsum)htons(ipv6h->nexthdr)); 609 hw_checksum = csum_add(hw_checksum, (__force __wsum)htons(nexthdr));
603 610
604 csum_pseudo_hdr = csum_partial(&ipv6h->saddr, 611 csum_pseudo_hdr = csum_partial(&ipv6h->saddr,
605 sizeof(ipv6h->saddr) + sizeof(ipv6h->daddr), 0); 612 sizeof(ipv6h->saddr) + sizeof(ipv6h->daddr), 0);
606 csum_pseudo_hdr = csum_add(csum_pseudo_hdr, (__force __wsum)ipv6h->payload_len); 613 csum_pseudo_hdr = csum_add(csum_pseudo_hdr, (__force __wsum)ipv6h->payload_len);
607 csum_pseudo_hdr = csum_add(csum_pseudo_hdr, (__force __wsum)ntohs(ipv6h->nexthdr)); 614 csum_pseudo_hdr = csum_add(csum_pseudo_hdr,
615 (__force __wsum)htons(nexthdr));
608 616
609 skb->csum = csum_sub(hw_checksum, csum_pseudo_hdr); 617 skb->csum = csum_sub(hw_checksum, csum_pseudo_hdr);
610 skb->csum = csum_add(skb->csum, csum_partial(ipv6h, sizeof(struct ipv6hdr), 0)); 618 skb->csum = csum_add(skb->csum, csum_partial(ipv6h, sizeof(struct ipv6hdr), 0));
@@ -627,11 +635,10 @@ static int check_csum(struct mlx4_cqe *cqe, struct sk_buff *skb, void *va,
627 } 635 }
628 636
629 if (cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV4)) 637 if (cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV4))
630 get_fixed_ipv4_csum(hw_checksum, skb, hdr); 638 return get_fixed_ipv4_csum(hw_checksum, skb, hdr);
631#if IS_ENABLED(CONFIG_IPV6) 639#if IS_ENABLED(CONFIG_IPV6)
632 else if (cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV6)) 640 if (cqe->status & cpu_to_be16(MLX4_CQE_STATUS_IPV6))
633 if (unlikely(get_fixed_ipv6_csum(hw_checksum, skb, hdr))) 641 return get_fixed_ipv6_csum(hw_checksum, skb, hdr);
634 return -1;
635#endif 642#endif
636 return 0; 643 return 0;
637} 644}
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c
index 37e84a59e751..041c0ed65929 100644
--- a/drivers/net/ethernet/mellanox/mlx4/fw.c
+++ b/drivers/net/ethernet/mellanox/mlx4/fw.c
@@ -159,8 +159,9 @@ static void dump_dev_cap_flags2(struct mlx4_dev *dev, u64 flags)
159 [32] = "Loopback source checks support", 159 [32] = "Loopback source checks support",
160 [33] = "RoCEv2 support", 160 [33] = "RoCEv2 support",
161 [34] = "DMFS Sniffer support (UC & MC)", 161 [34] = "DMFS Sniffer support (UC & MC)",
162 [35] = "QinQ VST mode support", 162 [35] = "Diag counters per port",
163 [36] = "sl to vl mapping table change event support" 163 [36] = "QinQ VST mode support",
164 [37] = "sl to vl mapping table change event support",
164 }; 165 };
165 int i; 166 int i;
166 167
@@ -764,6 +765,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
764#define QUERY_DEV_CAP_CQ_TS_SUPPORT_OFFSET 0x3e 765#define QUERY_DEV_CAP_CQ_TS_SUPPORT_OFFSET 0x3e
765#define QUERY_DEV_CAP_MAX_PKEY_OFFSET 0x3f 766#define QUERY_DEV_CAP_MAX_PKEY_OFFSET 0x3f
766#define QUERY_DEV_CAP_EXT_FLAGS_OFFSET 0x40 767#define QUERY_DEV_CAP_EXT_FLAGS_OFFSET 0x40
768#define QUERY_DEV_CAP_WOL_OFFSET 0x43
767#define QUERY_DEV_CAP_FLAGS_OFFSET 0x44 769#define QUERY_DEV_CAP_FLAGS_OFFSET 0x44
768#define QUERY_DEV_CAP_RSVD_UAR_OFFSET 0x48 770#define QUERY_DEV_CAP_RSVD_UAR_OFFSET 0x48
769#define QUERY_DEV_CAP_UAR_SZ_OFFSET 0x49 771#define QUERY_DEV_CAP_UAR_SZ_OFFSET 0x49
@@ -920,6 +922,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
920 MLX4_GET(ext_flags, outbox, QUERY_DEV_CAP_EXT_FLAGS_OFFSET); 922 MLX4_GET(ext_flags, outbox, QUERY_DEV_CAP_EXT_FLAGS_OFFSET);
921 MLX4_GET(flags, outbox, QUERY_DEV_CAP_FLAGS_OFFSET); 923 MLX4_GET(flags, outbox, QUERY_DEV_CAP_FLAGS_OFFSET);
922 dev_cap->flags = flags | (u64)ext_flags << 32; 924 dev_cap->flags = flags | (u64)ext_flags << 32;
925 MLX4_GET(field, outbox, QUERY_DEV_CAP_WOL_OFFSET);
926 dev_cap->wol_port[1] = !!(field & 0x20);
927 dev_cap->wol_port[2] = !!(field & 0x40);
923 MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_UAR_OFFSET); 928 MLX4_GET(field, outbox, QUERY_DEV_CAP_RSVD_UAR_OFFSET);
924 dev_cap->reserved_uars = field >> 4; 929 dev_cap->reserved_uars = field >> 4;
925 MLX4_GET(field, outbox, QUERY_DEV_CAP_UAR_SZ_OFFSET); 930 MLX4_GET(field, outbox, QUERY_DEV_CAP_UAR_SZ_OFFSET);
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.h b/drivers/net/ethernet/mellanox/mlx4/fw.h
index 5343a0599253..b52ba01aa486 100644
--- a/drivers/net/ethernet/mellanox/mlx4/fw.h
+++ b/drivers/net/ethernet/mellanox/mlx4/fw.h
@@ -129,6 +129,7 @@ struct mlx4_dev_cap {
129 u32 dmfs_high_rate_qpn_range; 129 u32 dmfs_high_rate_qpn_range;
130 struct mlx4_rate_limit_caps rl_caps; 130 struct mlx4_rate_limit_caps rl_caps;
131 struct mlx4_port_cap port_cap[MLX4_MAX_PORTS + 1]; 131 struct mlx4_port_cap port_cap[MLX4_MAX_PORTS + 1];
132 bool wol_port[MLX4_MAX_PORTS + 1];
132}; 133};
133 134
134struct mlx4_func_cap { 135struct mlx4_func_cap {
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index a27c9c13a36e..5fe5cdc51357 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -424,13 +424,15 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
424 dev->caps.stat_rate_support = dev_cap->stat_rate_support; 424 dev->caps.stat_rate_support = dev_cap->stat_rate_support;
425 dev->caps.max_gso_sz = dev_cap->max_gso_sz; 425 dev->caps.max_gso_sz = dev_cap->max_gso_sz;
426 dev->caps.max_rss_tbl_sz = dev_cap->max_rss_tbl_sz; 426 dev->caps.max_rss_tbl_sz = dev_cap->max_rss_tbl_sz;
427 dev->caps.wol_port[1] = dev_cap->wol_port[1];
428 dev->caps.wol_port[2] = dev_cap->wol_port[2];
427 429
428 /* Save uar page shift */ 430 /* Save uar page shift */
429 if (!mlx4_is_slave(dev)) { 431 if (!mlx4_is_slave(dev)) {
430 /* Virtual PCI function needs to determine UAR page size from 432 /* Virtual PCI function needs to determine UAR page size from
431 * firmware. Only master PCI function can set the uar page size 433 * firmware. Only master PCI function can set the uar page size
432 */ 434 */
433 if (enable_4k_uar) 435 if (enable_4k_uar || !dev->persist->num_vfs)
434 dev->uar_page_shift = DEFAULT_UAR_PAGE_SHIFT; 436 dev->uar_page_shift = DEFAULT_UAR_PAGE_SHIFT;
435 else 437 else
436 dev->uar_page_shift = PAGE_SHIFT; 438 dev->uar_page_shift = PAGE_SHIFT;
@@ -2275,7 +2277,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
2275 2277
2276 dev->caps.max_fmr_maps = (1 << (32 - ilog2(dev->caps.num_mpts))) - 1; 2278 dev->caps.max_fmr_maps = (1 << (32 - ilog2(dev->caps.num_mpts))) - 1;
2277 2279
2278 if (enable_4k_uar) { 2280 if (enable_4k_uar || !dev->persist->num_vfs) {
2279 init_hca.log_uar_sz = ilog2(dev->caps.num_uars) + 2281 init_hca.log_uar_sz = ilog2(dev->caps.num_uars) +
2280 PAGE_SHIFT - DEFAULT_UAR_PAGE_SHIFT; 2282 PAGE_SHIFT - DEFAULT_UAR_PAGE_SHIFT;
2281 init_hca.uar_page_sz = DEFAULT_UAR_PAGE_SHIFT - 12; 2283 init_hca.uar_page_sz = DEFAULT_UAR_PAGE_SHIFT - 12;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
index f5a2c605749f..31cbe5e86a01 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c
@@ -786,6 +786,10 @@ static void cb_timeout_handler(struct work_struct *work)
786 mlx5_cmd_comp_handler(dev, 1UL << ent->idx, true); 786 mlx5_cmd_comp_handler(dev, 1UL << ent->idx, true);
787} 787}
788 788
789static void free_msg(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *msg);
790static void mlx5_free_cmd_msg(struct mlx5_core_dev *dev,
791 struct mlx5_cmd_msg *msg);
792
789static void cmd_work_handler(struct work_struct *work) 793static void cmd_work_handler(struct work_struct *work)
790{ 794{
791 struct mlx5_cmd_work_ent *ent = container_of(work, struct mlx5_cmd_work_ent, work); 795 struct mlx5_cmd_work_ent *ent = container_of(work, struct mlx5_cmd_work_ent, work);
@@ -796,17 +800,28 @@ static void cmd_work_handler(struct work_struct *work)
796 struct semaphore *sem; 800 struct semaphore *sem;
797 unsigned long flags; 801 unsigned long flags;
798 bool poll_cmd = ent->polling; 802 bool poll_cmd = ent->polling;
803 int alloc_ret;
799 804
800 805
801 sem = ent->page_queue ? &cmd->pages_sem : &cmd->sem; 806 sem = ent->page_queue ? &cmd->pages_sem : &cmd->sem;
802 down(sem); 807 down(sem);
803 if (!ent->page_queue) { 808 if (!ent->page_queue) {
804 ent->idx = alloc_ent(cmd); 809 alloc_ret = alloc_ent(cmd);
805 if (ent->idx < 0) { 810 if (alloc_ret < 0) {
806 mlx5_core_err(dev, "failed to allocate command entry\n"); 811 mlx5_core_err(dev, "failed to allocate command entry\n");
812 if (ent->callback) {
813 ent->callback(-EAGAIN, ent->context);
814 mlx5_free_cmd_msg(dev, ent->out);
815 free_msg(dev, ent->in);
816 free_cmd(ent);
817 } else {
818 ent->ret = -EAGAIN;
819 complete(&ent->done);
820 }
807 up(sem); 821 up(sem);
808 return; 822 return;
809 } 823 }
824 ent->idx = alloc_ret;
810 } else { 825 } else {
811 ent->idx = cmd->max_reg_cmds; 826 ent->idx = cmd->max_reg_cmds;
812 spin_lock_irqsave(&cmd->alloc_lock, flags); 827 spin_lock_irqsave(&cmd->alloc_lock, flags);
@@ -967,7 +982,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in,
967 982
968 err = wait_func(dev, ent); 983 err = wait_func(dev, ent);
969 if (err == -ETIMEDOUT) 984 if (err == -ETIMEDOUT)
970 goto out_free; 985 goto out;
971 986
972 ds = ent->ts2 - ent->ts1; 987 ds = ent->ts2 - ent->ts1;
973 op = MLX5_GET(mbox_in, in->first.data, opcode); 988 op = MLX5_GET(mbox_in, in->first.data, opcode);
@@ -1430,6 +1445,7 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool forced)
1430 mlx5_core_err(dev, "Command completion arrived after timeout (entry idx = %d).\n", 1445 mlx5_core_err(dev, "Command completion arrived after timeout (entry idx = %d).\n",
1431 ent->idx); 1446 ent->idx);
1432 free_ent(cmd, ent->idx); 1447 free_ent(cmd, ent->idx);
1448 free_cmd(ent);
1433 } 1449 }
1434 continue; 1450 continue;
1435 } 1451 }
@@ -1488,7 +1504,8 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool forced)
1488 free_msg(dev, ent->in); 1504 free_msg(dev, ent->in);
1489 1505
1490 err = err ? err : ent->status; 1506 err = err ? err : ent->status;
1491 free_cmd(ent); 1507 if (!forced)
1508 free_cmd(ent);
1492 callback(err, context); 1509 callback(err, context);
1493 } else { 1510 } else {
1494 complete(&ent->done); 1511 complete(&ent->done);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index e1b7ddfecd01..0039b4725405 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -266,6 +266,14 @@ struct mlx5e_dcbx {
266}; 266};
267#endif 267#endif
268 268
269#define MAX_PIN_NUM 8
270struct mlx5e_pps {
271 u8 pin_caps[MAX_PIN_NUM];
272 struct work_struct out_work;
273 u64 start[MAX_PIN_NUM];
274 u8 enabled;
275};
276
269struct mlx5e_tstamp { 277struct mlx5e_tstamp {
270 rwlock_t lock; 278 rwlock_t lock;
271 struct cyclecounter cycles; 279 struct cyclecounter cycles;
@@ -277,7 +285,7 @@ struct mlx5e_tstamp {
277 struct mlx5_core_dev *mdev; 285 struct mlx5_core_dev *mdev;
278 struct ptp_clock *ptp; 286 struct ptp_clock *ptp;
279 struct ptp_clock_info ptp_info; 287 struct ptp_clock_info ptp_info;
280 u8 *pps_pin_caps; 288 struct mlx5e_pps pps_info;
281}; 289};
282 290
283enum { 291enum {
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c b/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
index 66f432385dbb..84dd63e74041 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_clock.c
@@ -53,6 +53,15 @@ enum {
53 MLX5E_EVENT_MODE_ONCE_TILL_ARM = 0x2, 53 MLX5E_EVENT_MODE_ONCE_TILL_ARM = 0x2,
54}; 54};
55 55
56enum {
57 MLX5E_MTPPS_FS_ENABLE = BIT(0x0),
58 MLX5E_MTPPS_FS_PATTERN = BIT(0x2),
59 MLX5E_MTPPS_FS_PIN_MODE = BIT(0x3),
60 MLX5E_MTPPS_FS_TIME_STAMP = BIT(0x4),
61 MLX5E_MTPPS_FS_OUT_PULSE_DURATION = BIT(0x5),
62 MLX5E_MTPPS_FS_ENH_OUT_PER_ADJ = BIT(0x7),
63};
64
56void mlx5e_fill_hwstamp(struct mlx5e_tstamp *tstamp, u64 timestamp, 65void mlx5e_fill_hwstamp(struct mlx5e_tstamp *tstamp, u64 timestamp,
57 struct skb_shared_hwtstamps *hwts) 66 struct skb_shared_hwtstamps *hwts)
58{ 67{
@@ -73,17 +82,46 @@ static u64 mlx5e_read_internal_timer(const struct cyclecounter *cc)
73 return mlx5_read_internal_timer(tstamp->mdev) & cc->mask; 82 return mlx5_read_internal_timer(tstamp->mdev) & cc->mask;
74} 83}
75 84
85static void mlx5e_pps_out(struct work_struct *work)
86{
87 struct mlx5e_pps *pps_info = container_of(work, struct mlx5e_pps,
88 out_work);
89 struct mlx5e_tstamp *tstamp = container_of(pps_info, struct mlx5e_tstamp,
90 pps_info);
91 u32 in[MLX5_ST_SZ_DW(mtpps_reg)] = {0};
92 unsigned long flags;
93 int i;
94
95 for (i = 0; i < tstamp->ptp_info.n_pins; i++) {
96 u64 tstart;
97
98 write_lock_irqsave(&tstamp->lock, flags);
99 tstart = tstamp->pps_info.start[i];
100 tstamp->pps_info.start[i] = 0;
101 write_unlock_irqrestore(&tstamp->lock, flags);
102 if (!tstart)
103 continue;
104
105 MLX5_SET(mtpps_reg, in, pin, i);
106 MLX5_SET64(mtpps_reg, in, time_stamp, tstart);
107 MLX5_SET(mtpps_reg, in, field_select, MLX5E_MTPPS_FS_TIME_STAMP);
108 mlx5_set_mtpps(tstamp->mdev, in, sizeof(in));
109 }
110}
111
76static void mlx5e_timestamp_overflow(struct work_struct *work) 112static void mlx5e_timestamp_overflow(struct work_struct *work)
77{ 113{
78 struct delayed_work *dwork = to_delayed_work(work); 114 struct delayed_work *dwork = to_delayed_work(work);
79 struct mlx5e_tstamp *tstamp = container_of(dwork, struct mlx5e_tstamp, 115 struct mlx5e_tstamp *tstamp = container_of(dwork, struct mlx5e_tstamp,
80 overflow_work); 116 overflow_work);
117 struct mlx5e_priv *priv = container_of(tstamp, struct mlx5e_priv, tstamp);
81 unsigned long flags; 118 unsigned long flags;
82 119
83 write_lock_irqsave(&tstamp->lock, flags); 120 write_lock_irqsave(&tstamp->lock, flags);
84 timecounter_read(&tstamp->clock); 121 timecounter_read(&tstamp->clock);
85 write_unlock_irqrestore(&tstamp->lock, flags); 122 write_unlock_irqrestore(&tstamp->lock, flags);
86 schedule_delayed_work(&tstamp->overflow_work, tstamp->overflow_period); 123 queue_delayed_work(priv->wq, &tstamp->overflow_work,
124 msecs_to_jiffies(tstamp->overflow_period * 1000));
87} 125}
88 126
89int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr) 127int mlx5e_hwstamp_set(struct mlx5e_priv *priv, struct ifreq *ifr)
@@ -213,18 +251,6 @@ static int mlx5e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 delta)
213 int neg_adj = 0; 251 int neg_adj = 0;
214 struct mlx5e_tstamp *tstamp = container_of(ptp, struct mlx5e_tstamp, 252 struct mlx5e_tstamp *tstamp = container_of(ptp, struct mlx5e_tstamp,
215 ptp_info); 253 ptp_info);
216 struct mlx5e_priv *priv =
217 container_of(tstamp, struct mlx5e_priv, tstamp);
218
219 if (MLX5_CAP_GEN(priv->mdev, pps_modify)) {
220 u32 in[MLX5_ST_SZ_DW(mtpps_reg)] = {0};
221
222 /* For future use need to add a loop for finding all 1PPS out pins */
223 MLX5_SET(mtpps_reg, in, pin_mode, MLX5E_PIN_MODE_OUT);
224 MLX5_SET(mtpps_reg, in, out_periodic_adjustment, delta & 0xFFFF);
225
226 mlx5_set_mtpps(priv->mdev, in, sizeof(in));
227 }
228 254
229 if (delta < 0) { 255 if (delta < 0) {
230 neg_adj = 1; 256 neg_adj = 1;
@@ -253,12 +279,13 @@ static int mlx5e_extts_configure(struct ptp_clock_info *ptp,
253 struct mlx5e_priv *priv = 279 struct mlx5e_priv *priv =
254 container_of(tstamp, struct mlx5e_priv, tstamp); 280 container_of(tstamp, struct mlx5e_priv, tstamp);
255 u32 in[MLX5_ST_SZ_DW(mtpps_reg)] = {0}; 281 u32 in[MLX5_ST_SZ_DW(mtpps_reg)] = {0};
282 u32 field_select = 0;
283 u8 pin_mode = 0;
256 u8 pattern = 0; 284 u8 pattern = 0;
257 int pin = -1; 285 int pin = -1;
258 int err = 0; 286 int err = 0;
259 287
260 if (!MLX5_CAP_GEN(priv->mdev, pps) || 288 if (!MLX5_PPS_CAP(priv->mdev))
261 !MLX5_CAP_GEN(priv->mdev, pps_modify))
262 return -EOPNOTSUPP; 289 return -EOPNOTSUPP;
263 290
264 if (rq->extts.index >= tstamp->ptp_info.n_pins) 291 if (rq->extts.index >= tstamp->ptp_info.n_pins)
@@ -268,15 +295,21 @@ static int mlx5e_extts_configure(struct ptp_clock_info *ptp,
268 pin = ptp_find_pin(tstamp->ptp, PTP_PF_EXTTS, rq->extts.index); 295 pin = ptp_find_pin(tstamp->ptp, PTP_PF_EXTTS, rq->extts.index);
269 if (pin < 0) 296 if (pin < 0)
270 return -EBUSY; 297 return -EBUSY;
298 pin_mode = MLX5E_PIN_MODE_IN;
299 pattern = !!(rq->extts.flags & PTP_FALLING_EDGE);
300 field_select = MLX5E_MTPPS_FS_PIN_MODE |
301 MLX5E_MTPPS_FS_PATTERN |
302 MLX5E_MTPPS_FS_ENABLE;
303 } else {
304 pin = rq->extts.index;
305 field_select = MLX5E_MTPPS_FS_ENABLE;
271 } 306 }
272 307
273 if (rq->extts.flags & PTP_FALLING_EDGE)
274 pattern = 1;
275
276 MLX5_SET(mtpps_reg, in, pin, pin); 308 MLX5_SET(mtpps_reg, in, pin, pin);
277 MLX5_SET(mtpps_reg, in, pin_mode, MLX5E_PIN_MODE_IN); 309 MLX5_SET(mtpps_reg, in, pin_mode, pin_mode);
278 MLX5_SET(mtpps_reg, in, pattern, pattern); 310 MLX5_SET(mtpps_reg, in, pattern, pattern);
279 MLX5_SET(mtpps_reg, in, enable, on); 311 MLX5_SET(mtpps_reg, in, enable, on);
312 MLX5_SET(mtpps_reg, in, field_select, field_select);
280 313
281 err = mlx5_set_mtpps(priv->mdev, in, sizeof(in)); 314 err = mlx5_set_mtpps(priv->mdev, in, sizeof(in));
282 if (err) 315 if (err)
@@ -295,14 +328,18 @@ static int mlx5e_perout_configure(struct ptp_clock_info *ptp,
295 struct mlx5e_priv *priv = 328 struct mlx5e_priv *priv =
296 container_of(tstamp, struct mlx5e_priv, tstamp); 329 container_of(tstamp, struct mlx5e_priv, tstamp);
297 u32 in[MLX5_ST_SZ_DW(mtpps_reg)] = {0}; 330 u32 in[MLX5_ST_SZ_DW(mtpps_reg)] = {0};
298 u64 nsec_now, nsec_delta, time_stamp; 331 u64 nsec_now, nsec_delta, time_stamp = 0;
299 u64 cycles_now, cycles_delta; 332 u64 cycles_now, cycles_delta;
300 struct timespec64 ts; 333 struct timespec64 ts;
301 unsigned long flags; 334 unsigned long flags;
335 u32 field_select = 0;
336 u8 pin_mode = 0;
337 u8 pattern = 0;
302 int pin = -1; 338 int pin = -1;
339 int err = 0;
303 s64 ns; 340 s64 ns;
304 341
305 if (!MLX5_CAP_GEN(priv->mdev, pps_modify)) 342 if (!MLX5_PPS_CAP(priv->mdev))
306 return -EOPNOTSUPP; 343 return -EOPNOTSUPP;
307 344
308 if (rq->perout.index >= tstamp->ptp_info.n_pins) 345 if (rq->perout.index >= tstamp->ptp_info.n_pins)
@@ -313,32 +350,60 @@ static int mlx5e_perout_configure(struct ptp_clock_info *ptp,
313 rq->perout.index); 350 rq->perout.index);
314 if (pin < 0) 351 if (pin < 0)
315 return -EBUSY; 352 return -EBUSY;
316 }
317 353
318 ts.tv_sec = rq->perout.period.sec; 354 pin_mode = MLX5E_PIN_MODE_OUT;
319 ts.tv_nsec = rq->perout.period.nsec; 355 pattern = MLX5E_OUT_PATTERN_PERIODIC;
320 ns = timespec64_to_ns(&ts); 356 ts.tv_sec = rq->perout.period.sec;
321 if (on) 357 ts.tv_nsec = rq->perout.period.nsec;
358 ns = timespec64_to_ns(&ts);
359
322 if ((ns >> 1) != 500000000LL) 360 if ((ns >> 1) != 500000000LL)
323 return -EINVAL; 361 return -EINVAL;
324 ts.tv_sec = rq->perout.start.sec; 362
325 ts.tv_nsec = rq->perout.start.nsec; 363 ts.tv_sec = rq->perout.start.sec;
326 ns = timespec64_to_ns(&ts); 364 ts.tv_nsec = rq->perout.start.nsec;
327 cycles_now = mlx5_read_internal_timer(tstamp->mdev); 365 ns = timespec64_to_ns(&ts);
328 write_lock_irqsave(&tstamp->lock, flags); 366 cycles_now = mlx5_read_internal_timer(tstamp->mdev);
329 nsec_now = timecounter_cyc2time(&tstamp->clock, cycles_now); 367 write_lock_irqsave(&tstamp->lock, flags);
330 nsec_delta = ns - nsec_now; 368 nsec_now = timecounter_cyc2time(&tstamp->clock, cycles_now);
331 cycles_delta = div64_u64(nsec_delta << tstamp->cycles.shift, 369 nsec_delta = ns - nsec_now;
332 tstamp->cycles.mult); 370 cycles_delta = div64_u64(nsec_delta << tstamp->cycles.shift,
333 write_unlock_irqrestore(&tstamp->lock, flags); 371 tstamp->cycles.mult);
334 time_stamp = cycles_now + cycles_delta; 372 write_unlock_irqrestore(&tstamp->lock, flags);
373 time_stamp = cycles_now + cycles_delta;
374 field_select = MLX5E_MTPPS_FS_PIN_MODE |
375 MLX5E_MTPPS_FS_PATTERN |
376 MLX5E_MTPPS_FS_ENABLE |
377 MLX5E_MTPPS_FS_TIME_STAMP;
378 } else {
379 pin = rq->perout.index;
380 field_select = MLX5E_MTPPS_FS_ENABLE;
381 }
382
335 MLX5_SET(mtpps_reg, in, pin, pin); 383 MLX5_SET(mtpps_reg, in, pin, pin);
336 MLX5_SET(mtpps_reg, in, pin_mode, MLX5E_PIN_MODE_OUT); 384 MLX5_SET(mtpps_reg, in, pin_mode, pin_mode);
337 MLX5_SET(mtpps_reg, in, pattern, MLX5E_OUT_PATTERN_PERIODIC); 385 MLX5_SET(mtpps_reg, in, pattern, pattern);
338 MLX5_SET(mtpps_reg, in, enable, on); 386 MLX5_SET(mtpps_reg, in, enable, on);
339 MLX5_SET64(mtpps_reg, in, time_stamp, time_stamp); 387 MLX5_SET64(mtpps_reg, in, time_stamp, time_stamp);
388 MLX5_SET(mtpps_reg, in, field_select, field_select);
389
390 err = mlx5_set_mtpps(priv->mdev, in, sizeof(in));
391 if (err)
392 return err;
340 393
341 return mlx5_set_mtpps(priv->mdev, in, sizeof(in)); 394 return mlx5_set_mtppse(priv->mdev, pin, 0,
395 MLX5E_EVENT_MODE_REPETETIVE & on);
396}
397
398static int mlx5e_pps_configure(struct ptp_clock_info *ptp,
399 struct ptp_clock_request *rq,
400 int on)
401{
402 struct mlx5e_tstamp *tstamp =
403 container_of(ptp, struct mlx5e_tstamp, ptp_info);
404
405 tstamp->pps_info.enabled = !!on;
406 return 0;
342} 407}
343 408
344static int mlx5e_ptp_enable(struct ptp_clock_info *ptp, 409static int mlx5e_ptp_enable(struct ptp_clock_info *ptp,
@@ -350,6 +415,8 @@ static int mlx5e_ptp_enable(struct ptp_clock_info *ptp,
350 return mlx5e_extts_configure(ptp, rq, on); 415 return mlx5e_extts_configure(ptp, rq, on);
351 case PTP_CLK_REQ_PEROUT: 416 case PTP_CLK_REQ_PEROUT:
352 return mlx5e_perout_configure(ptp, rq, on); 417 return mlx5e_perout_configure(ptp, rq, on);
418 case PTP_CLK_REQ_PPS:
419 return mlx5e_pps_configure(ptp, rq, on);
353 default: 420 default:
354 return -EOPNOTSUPP; 421 return -EOPNOTSUPP;
355 } 422 }
@@ -395,6 +462,7 @@ static int mlx5e_init_pin_config(struct mlx5e_tstamp *tstamp)
395 return -ENOMEM; 462 return -ENOMEM;
396 tstamp->ptp_info.enable = mlx5e_ptp_enable; 463 tstamp->ptp_info.enable = mlx5e_ptp_enable;
397 tstamp->ptp_info.verify = mlx5e_ptp_verify; 464 tstamp->ptp_info.verify = mlx5e_ptp_verify;
465 tstamp->ptp_info.pps = 1;
398 466
399 for (i = 0; i < tstamp->ptp_info.n_pins; i++) { 467 for (i = 0; i < tstamp->ptp_info.n_pins; i++) {
400 snprintf(tstamp->ptp_info.pin_config[i].name, 468 snprintf(tstamp->ptp_info.pin_config[i].name,
@@ -422,22 +490,56 @@ static void mlx5e_get_pps_caps(struct mlx5e_priv *priv,
422 tstamp->ptp_info.n_per_out = MLX5_GET(mtpps_reg, out, 490 tstamp->ptp_info.n_per_out = MLX5_GET(mtpps_reg, out,
423 cap_max_num_of_pps_out_pins); 491 cap_max_num_of_pps_out_pins);
424 492
425 tstamp->pps_pin_caps[0] = MLX5_GET(mtpps_reg, out, cap_pin_0_mode); 493 tstamp->pps_info.pin_caps[0] = MLX5_GET(mtpps_reg, out, cap_pin_0_mode);
426 tstamp->pps_pin_caps[1] = MLX5_GET(mtpps_reg, out, cap_pin_1_mode); 494 tstamp->pps_info.pin_caps[1] = MLX5_GET(mtpps_reg, out, cap_pin_1_mode);
427 tstamp->pps_pin_caps[2] = MLX5_GET(mtpps_reg, out, cap_pin_2_mode); 495 tstamp->pps_info.pin_caps[2] = MLX5_GET(mtpps_reg, out, cap_pin_2_mode);
428 tstamp->pps_pin_caps[3] = MLX5_GET(mtpps_reg, out, cap_pin_3_mode); 496 tstamp->pps_info.pin_caps[3] = MLX5_GET(mtpps_reg, out, cap_pin_3_mode);
429 tstamp->pps_pin_caps[4] = MLX5_GET(mtpps_reg, out, cap_pin_4_mode); 497 tstamp->pps_info.pin_caps[4] = MLX5_GET(mtpps_reg, out, cap_pin_4_mode);
430 tstamp->pps_pin_caps[5] = MLX5_GET(mtpps_reg, out, cap_pin_5_mode); 498 tstamp->pps_info.pin_caps[5] = MLX5_GET(mtpps_reg, out, cap_pin_5_mode);
431 tstamp->pps_pin_caps[6] = MLX5_GET(mtpps_reg, out, cap_pin_6_mode); 499 tstamp->pps_info.pin_caps[6] = MLX5_GET(mtpps_reg, out, cap_pin_6_mode);
432 tstamp->pps_pin_caps[7] = MLX5_GET(mtpps_reg, out, cap_pin_7_mode); 500 tstamp->pps_info.pin_caps[7] = MLX5_GET(mtpps_reg, out, cap_pin_7_mode);
433} 501}
434 502
435void mlx5e_pps_event_handler(struct mlx5e_priv *priv, 503void mlx5e_pps_event_handler(struct mlx5e_priv *priv,
436 struct ptp_clock_event *event) 504 struct ptp_clock_event *event)
437{ 505{
506 struct net_device *netdev = priv->netdev;
438 struct mlx5e_tstamp *tstamp = &priv->tstamp; 507 struct mlx5e_tstamp *tstamp = &priv->tstamp;
508 struct timespec64 ts;
509 u64 nsec_now, nsec_delta;
510 u64 cycles_now, cycles_delta;
511 int pin = event->index;
512 s64 ns;
513 unsigned long flags;
439 514
440 ptp_clock_event(tstamp->ptp, event); 515 switch (tstamp->ptp_info.pin_config[pin].func) {
516 case PTP_PF_EXTTS:
517 if (tstamp->pps_info.enabled) {
518 event->type = PTP_CLOCK_PPSUSR;
519 event->pps_times.ts_real = ns_to_timespec64(event->timestamp);
520 } else {
521 event->type = PTP_CLOCK_EXTTS;
522 }
523 ptp_clock_event(tstamp->ptp, event);
524 break;
525 case PTP_PF_PEROUT:
526 mlx5e_ptp_gettime(&tstamp->ptp_info, &ts);
527 cycles_now = mlx5_read_internal_timer(tstamp->mdev);
528 ts.tv_sec += 1;
529 ts.tv_nsec = 0;
530 ns = timespec64_to_ns(&ts);
531 write_lock_irqsave(&tstamp->lock, flags);
532 nsec_now = timecounter_cyc2time(&tstamp->clock, cycles_now);
533 nsec_delta = ns - nsec_now;
534 cycles_delta = div64_u64(nsec_delta << tstamp->cycles.shift,
535 tstamp->cycles.mult);
536 tstamp->pps_info.start[pin] = cycles_now + cycles_delta;
537 queue_work(priv->wq, &tstamp->pps_info.out_work);
538 write_unlock_irqrestore(&tstamp->lock, flags);
539 break;
540 default:
541 netdev_err(netdev, "%s: Unhandled event\n", __func__);
542 }
441} 543}
442 544
443void mlx5e_timestamp_init(struct mlx5e_priv *priv) 545void mlx5e_timestamp_init(struct mlx5e_priv *priv)
@@ -473,9 +575,10 @@ void mlx5e_timestamp_init(struct mlx5e_priv *priv)
473 do_div(ns, NSEC_PER_SEC / 2 / HZ); 575 do_div(ns, NSEC_PER_SEC / 2 / HZ);
474 tstamp->overflow_period = ns; 576 tstamp->overflow_period = ns;
475 577
578 INIT_WORK(&tstamp->pps_info.out_work, mlx5e_pps_out);
476 INIT_DELAYED_WORK(&tstamp->overflow_work, mlx5e_timestamp_overflow); 579 INIT_DELAYED_WORK(&tstamp->overflow_work, mlx5e_timestamp_overflow);
477 if (tstamp->overflow_period) 580 if (tstamp->overflow_period)
478 schedule_delayed_work(&tstamp->overflow_work, 0); 581 queue_delayed_work(priv->wq, &tstamp->overflow_work, 0);
479 else 582 else
480 mlx5_core_warn(priv->mdev, "invalid overflow period, overflow_work is not scheduled\n"); 583 mlx5_core_warn(priv->mdev, "invalid overflow period, overflow_work is not scheduled\n");
481 584
@@ -484,16 +587,10 @@ void mlx5e_timestamp_init(struct mlx5e_priv *priv)
484 snprintf(tstamp->ptp_info.name, 16, "mlx5 ptp"); 587 snprintf(tstamp->ptp_info.name, 16, "mlx5 ptp");
485 588
486 /* Initialize 1PPS data structures */ 589 /* Initialize 1PPS data structures */
487#define MAX_PIN_NUM 8 590 if (MLX5_PPS_CAP(priv->mdev))
488 tstamp->pps_pin_caps = kzalloc(sizeof(u8) * MAX_PIN_NUM, GFP_KERNEL); 591 mlx5e_get_pps_caps(priv, tstamp);
489 if (tstamp->pps_pin_caps) { 592 if (tstamp->ptp_info.n_pins)
490 if (MLX5_CAP_GEN(priv->mdev, pps)) 593 mlx5e_init_pin_config(tstamp);
491 mlx5e_get_pps_caps(priv, tstamp);
492 if (tstamp->ptp_info.n_pins)
493 mlx5e_init_pin_config(tstamp);
494 } else {
495 mlx5_core_warn(priv->mdev, "1PPS initialization failed\n");
496 }
497 594
498 tstamp->ptp = ptp_clock_register(&tstamp->ptp_info, 595 tstamp->ptp = ptp_clock_register(&tstamp->ptp_info,
499 &priv->mdev->pdev->dev); 596 &priv->mdev->pdev->dev);
@@ -516,8 +613,7 @@ void mlx5e_timestamp_cleanup(struct mlx5e_priv *priv)
516 priv->tstamp.ptp = NULL; 613 priv->tstamp.ptp = NULL;
517 } 614 }
518 615
519 kfree(tstamp->pps_pin_caps); 616 cancel_work_sync(&tstamp->pps_info.out_work);
520 kfree(tstamp->ptp_info.pin_config);
521
522 cancel_delayed_work_sync(&tstamp->overflow_work); 617 cancel_delayed_work_sync(&tstamp->overflow_work);
618 kfree(tstamp->ptp_info.pin_config);
523} 619}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
index bdd82c9b3992..eafc59280ada 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c
@@ -276,7 +276,7 @@ static void add_rule_to_list(struct mlx5e_priv *priv,
276 276
277static bool outer_header_zero(u32 *match_criteria) 277static bool outer_header_zero(u32 *match_criteria)
278{ 278{
279 int size = MLX5_ST_SZ_BYTES(fte_match_param); 279 int size = MLX5_FLD_SZ_BYTES(fte_match_param, outer_headers);
280 char *outer_headers_c = MLX5_ADDR_OF(fte_match_param, match_criteria, 280 char *outer_headers_c = MLX5_ADDR_OF(fte_match_param, match_criteria,
281 outer_headers); 281 outer_headers);
282 282
@@ -320,7 +320,7 @@ add_ethtool_flow_rule(struct mlx5e_priv *priv,
320 320
321 spec->match_criteria_enable = (!outer_header_zero(spec->match_criteria)); 321 spec->match_criteria_enable = (!outer_header_zero(spec->match_criteria));
322 flow_act.flow_tag = MLX5_FS_DEFAULT_FLOW_TAG; 322 flow_act.flow_tag = MLX5_FS_DEFAULT_FLOW_TAG;
323 rule = mlx5_add_flow_rules(ft, spec, &flow_act, dst, 1); 323 rule = mlx5_add_flow_rules(ft, spec, &flow_act, dst, dst ? 1 : 0);
324 if (IS_ERR(rule)) { 324 if (IS_ERR(rule)) {
325 err = PTR_ERR(rule); 325 err = PTR_ERR(rule);
326 netdev_err(priv->netdev, "%s: failed to add ethtool steering rule: %d\n", 326 netdev_err(priv->netdev, "%s: failed to add ethtool steering rule: %d\n",
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 1eac5003084f..57f31fa478ce 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -377,7 +377,6 @@ static void mlx5e_async_event(struct mlx5_core_dev *mdev, void *vpriv,
377 break; 377 break;
378 case MLX5_DEV_EVENT_PPS: 378 case MLX5_DEV_EVENT_PPS:
379 eqe = (struct mlx5_eqe *)param; 379 eqe = (struct mlx5_eqe *)param;
380 ptp_event.type = PTP_CLOCK_EXTTS;
381 ptp_event.index = eqe->data.pps.pin; 380 ptp_event.index = eqe->data.pps.pin;
382 ptp_event.timestamp = 381 ptp_event.timestamp =
383 timecounter_cyc2time(&priv->tstamp.clock, 382 timecounter_cyc2time(&priv->tstamp.clock,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
index af51a5d2b912..52b9a64cd3a2 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c
@@ -698,7 +698,7 @@ int mlx5_start_eqs(struct mlx5_core_dev *dev)
698 else 698 else
699 mlx5_core_dbg(dev, "port_module_event is not set\n"); 699 mlx5_core_dbg(dev, "port_module_event is not set\n");
700 700
701 if (MLX5_CAP_GEN(dev, pps)) 701 if (MLX5_PPS_CAP(dev))
702 async_event_mask |= (1ull << MLX5_EVENT_TYPE_PPS_EVENT); 702 async_event_mask |= (1ull << MLX5_EVENT_TYPE_PPS_EVENT);
703 703
704 if (MLX5_CAP_GEN(dev, fpga)) 704 if (MLX5_CAP_GEN(dev, fpga))
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
index 89bfda419efe..8b18cc9ec026 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
@@ -1668,7 +1668,8 @@ void mlx5_eswitch_disable_sriov(struct mlx5_eswitch *esw)
1668 int i; 1668 int i;
1669 1669
1670 if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager) || 1670 if (!esw || !MLX5_CAP_GEN(esw->dev, vport_group_manager) ||
1671 MLX5_CAP_GEN(esw->dev, port_type) != MLX5_CAP_PORT_TYPE_ETH) 1671 MLX5_CAP_GEN(esw->dev, port_type) != MLX5_CAP_PORT_TYPE_ETH ||
1672 esw->mode == SRIOV_NONE)
1672 return; 1673 return;
1673 1674
1674 esw_info(esw->dev, "disable SRIOV: active vports(%d) mode(%d)\n", 1675 esw_info(esw->dev, "disable SRIOV: active vports(%d) mode(%d)\n",
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
index 1ee5bce85901..85298051a3e4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c
@@ -178,8 +178,6 @@ out:
178 178
179static void mlx5i_destroy_underlay_qp(struct mlx5_core_dev *mdev, struct mlx5_core_qp *qp) 179static void mlx5i_destroy_underlay_qp(struct mlx5_core_dev *mdev, struct mlx5_core_qp *qp)
180{ 180{
181 mlx5_fs_remove_rx_underlay_qpn(mdev, qp->qpn);
182
183 mlx5_core_destroy_qp(mdev, qp); 181 mlx5_core_destroy_qp(mdev, qp);
184} 182}
185 183
@@ -194,8 +192,6 @@ static int mlx5i_init_tx(struct mlx5e_priv *priv)
194 return err; 192 return err;
195 } 193 }
196 194
197 mlx5_fs_add_rx_underlay_qpn(priv->mdev, ipriv->qp.qpn);
198
199 err = mlx5e_create_tis(priv->mdev, 0 /* tc */, ipriv->qp.qpn, &priv->tisn[0]); 195 err = mlx5e_create_tis(priv->mdev, 0 /* tc */, ipriv->qp.qpn, &priv->tisn[0]);
200 if (err) { 196 if (err) {
201 mlx5_core_warn(priv->mdev, "create tis failed, %d\n", err); 197 mlx5_core_warn(priv->mdev, "create tis failed, %d\n", err);
@@ -253,6 +249,7 @@ static void mlx5i_destroy_flow_steering(struct mlx5e_priv *priv)
253 249
254static int mlx5i_init_rx(struct mlx5e_priv *priv) 250static int mlx5i_init_rx(struct mlx5e_priv *priv)
255{ 251{
252 struct mlx5i_priv *ipriv = priv->ppriv;
256 int err; 253 int err;
257 254
258 err = mlx5e_create_indirect_rqt(priv); 255 err = mlx5e_create_indirect_rqt(priv);
@@ -271,12 +268,18 @@ static int mlx5i_init_rx(struct mlx5e_priv *priv)
271 if (err) 268 if (err)
272 goto err_destroy_indirect_tirs; 269 goto err_destroy_indirect_tirs;
273 270
274 err = mlx5i_create_flow_steering(priv); 271 err = mlx5_fs_add_rx_underlay_qpn(priv->mdev, ipriv->qp.qpn);
275 if (err) 272 if (err)
276 goto err_destroy_direct_tirs; 273 goto err_destroy_direct_tirs;
277 274
275 err = mlx5i_create_flow_steering(priv);
276 if (err)
277 goto err_remove_rx_underlay_qpn;
278
278 return 0; 279 return 0;
279 280
281err_remove_rx_underlay_qpn:
282 mlx5_fs_remove_rx_underlay_qpn(priv->mdev, ipriv->qp.qpn);
280err_destroy_direct_tirs: 283err_destroy_direct_tirs:
281 mlx5e_destroy_direct_tirs(priv); 284 mlx5e_destroy_direct_tirs(priv);
282err_destroy_indirect_tirs: 285err_destroy_indirect_tirs:
@@ -290,6 +293,9 @@ err_destroy_indirect_rqts:
290 293
291static void mlx5i_cleanup_rx(struct mlx5e_priv *priv) 294static void mlx5i_cleanup_rx(struct mlx5e_priv *priv)
292{ 295{
296 struct mlx5i_priv *ipriv = priv->ppriv;
297
298 mlx5_fs_remove_rx_underlay_qpn(priv->mdev, ipriv->qp.qpn);
293 mlx5i_destroy_flow_steering(priv); 299 mlx5i_destroy_flow_steering(priv);
294 mlx5e_destroy_direct_tirs(priv); 300 mlx5e_destroy_direct_tirs(priv);
295 mlx5e_destroy_indirect_tirs(priv); 301 mlx5e_destroy_indirect_tirs(priv);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag.c b/drivers/net/ethernet/mellanox/mlx5/core/lag.c
index a3a836bdcfd2..f26f97fe4666 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lag.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lag.c
@@ -162,22 +162,17 @@ static bool mlx5_lag_is_bonded(struct mlx5_lag *ldev)
162static void mlx5_infer_tx_affinity_mapping(struct lag_tracker *tracker, 162static void mlx5_infer_tx_affinity_mapping(struct lag_tracker *tracker,
163 u8 *port1, u8 *port2) 163 u8 *port1, u8 *port2)
164{ 164{
165 if (tracker->tx_type == NETDEV_LAG_TX_TYPE_ACTIVEBACKUP) { 165 *port1 = 1;
166 if (tracker->netdev_state[0].tx_enabled) { 166 *port2 = 2;
167 *port1 = 1; 167 if (!tracker->netdev_state[0].tx_enabled ||
168 *port2 = 1; 168 !tracker->netdev_state[0].link_up) {
169 } else { 169 *port1 = 2;
170 *port1 = 2; 170 return;
171 *port2 = 2;
172 }
173 } else {
174 *port1 = 1;
175 *port2 = 2;
176 if (!tracker->netdev_state[0].link_up)
177 *port1 = 2;
178 else if (!tracker->netdev_state[1].link_up)
179 *port2 = 1;
180 } 171 }
172
173 if (!tracker->netdev_state[1].tx_enabled ||
174 !tracker->netdev_state[1].link_up)
175 *port2 = 1;
181} 176}
182 177
183static void mlx5_activate_lag(struct mlx5_lag *ldev, 178static void mlx5_activate_lag(struct mlx5_lag *ldev,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
index 6a3d6bef7dd4..6a263e8d883a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
@@ -154,6 +154,11 @@ int mlx5_set_mtpps(struct mlx5_core_dev *mdev, u32 *mtpps, u32 mtpps_size);
154int mlx5_query_mtppse(struct mlx5_core_dev *mdev, u8 pin, u8 *arm, u8 *mode); 154int mlx5_query_mtppse(struct mlx5_core_dev *mdev, u8 pin, u8 *arm, u8 *mode);
155int mlx5_set_mtppse(struct mlx5_core_dev *mdev, u8 pin, u8 arm, u8 mode); 155int mlx5_set_mtppse(struct mlx5_core_dev *mdev, u8 pin, u8 arm, u8 mode);
156 156
157#define MLX5_PPS_CAP(mdev) (MLX5_CAP_GEN((mdev), pps) && \
158 MLX5_CAP_GEN((mdev), pps_modify) && \
159 MLX5_CAP_MCAM_FEATURE((mdev), mtpps_fs) && \
160 MLX5_CAP_MCAM_FEATURE((mdev), mtpps_enh_out_per_adj))
161
157int mlx5_firmware_flash(struct mlx5_core_dev *dev, const struct firmware *fw); 162int mlx5_firmware_flash(struct mlx5_core_dev *dev, const struct firmware *fw);
158 163
159void mlx5e_init(void); 164void mlx5e_init(void);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sriov.c b/drivers/net/ethernet/mellanox/mlx5/core/sriov.c
index bcdf7779c48d..bf99d40e30b4 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/sriov.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/sriov.c
@@ -88,7 +88,11 @@ static void mlx5_device_disable_sriov(struct mlx5_core_dev *dev)
88 int vf; 88 int vf;
89 89
90 if (!sriov->enabled_vfs) 90 if (!sriov->enabled_vfs)
91#ifdef CONFIG_MLX5_CORE_EN
92 goto disable_sriov_resources;
93#else
91 return; 94 return;
95#endif
92 96
93 for (vf = 0; vf < sriov->num_vfs; vf++) { 97 for (vf = 0; vf < sriov->num_vfs; vf++) {
94 if (!sriov->vfs_ctx[vf].enabled) 98 if (!sriov->vfs_ctx[vf].enabled)
@@ -103,6 +107,7 @@ static void mlx5_device_disable_sriov(struct mlx5_core_dev *dev)
103 } 107 }
104 108
105#ifdef CONFIG_MLX5_CORE_EN 109#ifdef CONFIG_MLX5_CORE_EN
110disable_sriov_resources:
106 mlx5_eswitch_disable_sriov(dev->priv.eswitch); 111 mlx5_eswitch_disable_sriov(dev->priv.eswitch);
107#endif 112#endif
108 113
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 383fef5a8e24..4b2e0fd7d51e 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -1512,6 +1512,10 @@ mlxsw_sp_nexthop_group_mac_update(struct mlxsw_sp *mlxsw_sp,
1512static int mlxsw_sp_fib_entry_update(struct mlxsw_sp *mlxsw_sp, 1512static int mlxsw_sp_fib_entry_update(struct mlxsw_sp *mlxsw_sp,
1513 struct mlxsw_sp_fib_entry *fib_entry); 1513 struct mlxsw_sp_fib_entry *fib_entry);
1514 1514
1515static bool
1516mlxsw_sp_fib_node_entry_is_first(const struct mlxsw_sp_fib_node *fib_node,
1517 const struct mlxsw_sp_fib_entry *fib_entry);
1518
1515static int 1519static int
1516mlxsw_sp_nexthop_fib_entries_update(struct mlxsw_sp *mlxsw_sp, 1520mlxsw_sp_nexthop_fib_entries_update(struct mlxsw_sp *mlxsw_sp,
1517 struct mlxsw_sp_nexthop_group *nh_grp) 1521 struct mlxsw_sp_nexthop_group *nh_grp)
@@ -1520,6 +1524,9 @@ mlxsw_sp_nexthop_fib_entries_update(struct mlxsw_sp *mlxsw_sp,
1520 int err; 1524 int err;
1521 1525
1522 list_for_each_entry(fib_entry, &nh_grp->fib_list, nexthop_group_node) { 1526 list_for_each_entry(fib_entry, &nh_grp->fib_list, nexthop_group_node) {
1527 if (!mlxsw_sp_fib_node_entry_is_first(fib_entry->fib_node,
1528 fib_entry))
1529 continue;
1523 err = mlxsw_sp_fib_entry_update(mlxsw_sp, fib_entry); 1530 err = mlxsw_sp_fib_entry_update(mlxsw_sp, fib_entry);
1524 if (err) 1531 if (err)
1525 return err; 1532 return err;
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index 656b2d3f1bee..5eb1606765c5 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -626,8 +626,8 @@ static int mlxsw_sp_port_attr_br_flags_set(struct mlxsw_sp_port *mlxsw_sp_port,
626 626
627 bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp_port->mlxsw_sp->bridge, 627 bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp_port->mlxsw_sp->bridge,
628 orig_dev); 628 orig_dev);
629 if (WARN_ON(!bridge_port)) 629 if (!bridge_port)
630 return -EINVAL; 630 return 0;
631 631
632 err = mlxsw_sp_bridge_port_flood_table_set(mlxsw_sp_port, bridge_port, 632 err = mlxsw_sp_bridge_port_flood_table_set(mlxsw_sp_port, bridge_port,
633 MLXSW_SP_FLOOD_TYPE_UC, 633 MLXSW_SP_FLOOD_TYPE_UC,
@@ -711,8 +711,8 @@ static int mlxsw_sp_port_attr_mc_router_set(struct mlxsw_sp_port *mlxsw_sp_port,
711 711
712 bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp_port->mlxsw_sp->bridge, 712 bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp_port->mlxsw_sp->bridge,
713 orig_dev); 713 orig_dev);
714 if (WARN_ON(!bridge_port)) 714 if (!bridge_port)
715 return -EINVAL; 715 return 0;
716 716
717 if (!bridge_port->bridge_device->multicast_enabled) 717 if (!bridge_port->bridge_device->multicast_enabled)
718 return 0; 718 return 0;
@@ -1283,15 +1283,15 @@ static int mlxsw_sp_port_mdb_add(struct mlxsw_sp_port *mlxsw_sp_port,
1283 return 0; 1283 return 0;
1284 1284
1285 bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp->bridge, orig_dev); 1285 bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp->bridge, orig_dev);
1286 if (WARN_ON(!bridge_port)) 1286 if (!bridge_port)
1287 return -EINVAL; 1287 return 0;
1288 1288
1289 bridge_device = bridge_port->bridge_device; 1289 bridge_device = bridge_port->bridge_device;
1290 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_bridge(mlxsw_sp_port, 1290 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_bridge(mlxsw_sp_port,
1291 bridge_device, 1291 bridge_device,
1292 mdb->vid); 1292 mdb->vid);
1293 if (WARN_ON(!mlxsw_sp_port_vlan)) 1293 if (!mlxsw_sp_port_vlan)
1294 return -EINVAL; 1294 return 0;
1295 1295
1296 fid_index = mlxsw_sp_fid_index(mlxsw_sp_port_vlan->fid); 1296 fid_index = mlxsw_sp_fid_index(mlxsw_sp_port_vlan->fid);
1297 1297
@@ -1407,15 +1407,15 @@ static int mlxsw_sp_port_mdb_del(struct mlxsw_sp_port *mlxsw_sp_port,
1407 int err = 0; 1407 int err = 0;
1408 1408
1409 bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp->bridge, orig_dev); 1409 bridge_port = mlxsw_sp_bridge_port_find(mlxsw_sp->bridge, orig_dev);
1410 if (WARN_ON(!bridge_port)) 1410 if (!bridge_port)
1411 return -EINVAL; 1411 return 0;
1412 1412
1413 bridge_device = bridge_port->bridge_device; 1413 bridge_device = bridge_port->bridge_device;
1414 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_bridge(mlxsw_sp_port, 1414 mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_find_by_bridge(mlxsw_sp_port,
1415 bridge_device, 1415 bridge_device,
1416 mdb->vid); 1416 mdb->vid);
1417 if (WARN_ON(!mlxsw_sp_port_vlan)) 1417 if (!mlxsw_sp_port_vlan)
1418 return -EINVAL; 1418 return 0;
1419 1419
1420 fid_index = mlxsw_sp_fid_index(mlxsw_sp_port_vlan->fid); 1420 fid_index = mlxsw_sp_fid_index(mlxsw_sp_port_vlan->fid);
1421 1421
@@ -1974,6 +1974,17 @@ static void mlxsw_sp_fdb_fini(struct mlxsw_sp *mlxsw_sp)
1974 1974
1975} 1975}
1976 1976
1977static void mlxsw_sp_mids_fini(struct mlxsw_sp *mlxsw_sp)
1978{
1979 struct mlxsw_sp_mid *mid, *tmp;
1980
1981 list_for_each_entry_safe(mid, tmp, &mlxsw_sp->bridge->mids_list, list) {
1982 list_del(&mid->list);
1983 clear_bit(mid->mid, mlxsw_sp->bridge->mids_bitmap);
1984 kfree(mid);
1985 }
1986}
1987
1977int mlxsw_sp_switchdev_init(struct mlxsw_sp *mlxsw_sp) 1988int mlxsw_sp_switchdev_init(struct mlxsw_sp *mlxsw_sp)
1978{ 1989{
1979 struct mlxsw_sp_bridge *bridge; 1990 struct mlxsw_sp_bridge *bridge;
@@ -1996,7 +2007,7 @@ int mlxsw_sp_switchdev_init(struct mlxsw_sp *mlxsw_sp)
1996void mlxsw_sp_switchdev_fini(struct mlxsw_sp *mlxsw_sp) 2007void mlxsw_sp_switchdev_fini(struct mlxsw_sp *mlxsw_sp)
1997{ 2008{
1998 mlxsw_sp_fdb_fini(mlxsw_sp); 2009 mlxsw_sp_fdb_fini(mlxsw_sp);
1999 WARN_ON(!list_empty(&mlxsw_sp->bridge->mids_list)); 2010 mlxsw_sp_mids_fini(mlxsw_sp);
2000 WARN_ON(!list_empty(&mlxsw_sp->bridge->bridges_list)); 2011 WARN_ON(!list_empty(&mlxsw_sp->bridge->bridges_list));
2001 kfree(mlxsw_sp->bridge); 2012 kfree(mlxsw_sp->bridge);
2002} 2013}
diff --git a/drivers/net/ethernet/netronome/nfp/flower/cmsg.c b/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
index dd7fa9cf225f..b0837b58c3a1 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
+++ b/drivers/net/ethernet/netronome/nfp/flower/cmsg.c
@@ -115,14 +115,10 @@ nfp_flower_cmsg_portmod_rx(struct nfp_app *app, struct sk_buff *skb)
115 return; 115 return;
116 } 116 }
117 117
118 if (link) { 118 if (link)
119 netif_carrier_on(netdev); 119 netif_carrier_on(netdev);
120 rtnl_lock(); 120 else
121 dev_set_mtu(netdev, be16_to_cpu(msg->mtu));
122 rtnl_unlock();
123 } else {
124 netif_carrier_off(netdev); 121 netif_carrier_off(netdev);
125 }
126 rcu_read_unlock(); 122 rcu_read_unlock();
127} 123}
128 124
diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
index 18750ff0ede6..9f77ce038a4a 100644
--- a/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
+++ b/drivers/net/ethernet/netronome/nfp/nfp_net_common.c
@@ -513,6 +513,7 @@ nfp_net_tx_ring_init(struct nfp_net_tx_ring *tx_ring,
513 tx_ring->idx = idx; 513 tx_ring->idx = idx;
514 tx_ring->r_vec = r_vec; 514 tx_ring->r_vec = r_vec;
515 tx_ring->is_xdp = is_xdp; 515 tx_ring->is_xdp = is_xdp;
516 u64_stats_init(&tx_ring->r_vec->tx_sync);
516 517
517 tx_ring->qcidx = tx_ring->idx * nn->stride_tx; 518 tx_ring->qcidx = tx_ring->idx * nn->stride_tx;
518 tx_ring->qcp_q = nn->tx_bar + NFP_QCP_QUEUE_OFF(tx_ring->qcidx); 519 tx_ring->qcp_q = nn->tx_bar + NFP_QCP_QUEUE_OFF(tx_ring->qcidx);
@@ -532,6 +533,7 @@ nfp_net_rx_ring_init(struct nfp_net_rx_ring *rx_ring,
532 533
533 rx_ring->idx = idx; 534 rx_ring->idx = idx;
534 rx_ring->r_vec = r_vec; 535 rx_ring->r_vec = r_vec;
536 u64_stats_init(&rx_ring->r_vec->rx_sync);
535 537
536 rx_ring->fl_qcidx = rx_ring->idx * nn->stride_rx; 538 rx_ring->fl_qcidx = rx_ring->idx * nn->stride_rx;
537 rx_ring->qcp_fl = nn->rx_bar + NFP_QCP_QUEUE_OFF(rx_ring->fl_qcidx); 539 rx_ring->qcp_fl = nn->rx_bar + NFP_QCP_QUEUE_OFF(rx_ring->fl_qcidx);
@@ -906,8 +908,7 @@ static int nfp_net_tx(struct sk_buff *skb, struct net_device *netdev)
906 return NETDEV_TX_OK; 908 return NETDEV_TX_OK;
907 909
908err_unmap: 910err_unmap:
909 --f; 911 while (--f >= 0) {
910 while (f >= 0) {
911 frag = &skb_shinfo(skb)->frags[f]; 912 frag = &skb_shinfo(skb)->frags[f];
912 dma_unmap_page(dp->dev, tx_ring->txbufs[wr_idx].dma_addr, 913 dma_unmap_page(dp->dev, tx_ring->txbufs[wr_idx].dma_addr,
913 skb_frag_size(frag), DMA_TO_DEVICE); 914 skb_frag_size(frag), DMA_TO_DEVICE);
diff --git a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
index 66ff15d08bad..0a66389c06c2 100644
--- a/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
+++ b/drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c
@@ -2311,7 +2311,7 @@ netxen_md_rdqueue(struct netxen_adapter *adapter,
2311 loop_cnt++) { 2311 loop_cnt++) {
2312 NX_WR_DUMP_REG(select_addr, adapter->ahw.pci_base0, queue_id); 2312 NX_WR_DUMP_REG(select_addr, adapter->ahw.pci_base0, queue_id);
2313 read_addr = queueEntry->read_addr; 2313 read_addr = queueEntry->read_addr;
2314 for (k = 0; k < read_cnt; k--) { 2314 for (k = 0; k < read_cnt; k++) {
2315 NX_RD_DUMP_REG(read_addr, adapter->ahw.pci_base0, 2315 NX_RD_DUMP_REG(read_addr, adapter->ahw.pci_base0,
2316 &read_value); 2316 &read_value);
2317 *data_buff++ = read_value; 2317 *data_buff++ = read_value;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_mcp.c b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
index 9da91045d167..3eb241657368 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_mcp.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_mcp.c
@@ -253,7 +253,7 @@ int qed_mcp_cmd_init(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
253 size = MFW_DRV_MSG_MAX_DWORDS(p_info->mfw_mb_length) * sizeof(u32); 253 size = MFW_DRV_MSG_MAX_DWORDS(p_info->mfw_mb_length) * sizeof(u32);
254 p_info->mfw_mb_cur = kzalloc(size, GFP_KERNEL); 254 p_info->mfw_mb_cur = kzalloc(size, GFP_KERNEL);
255 p_info->mfw_mb_shadow = kzalloc(size, GFP_KERNEL); 255 p_info->mfw_mb_shadow = kzalloc(size, GFP_KERNEL);
256 if (!p_info->mfw_mb_shadow || !p_info->mfw_mb_addr) 256 if (!p_info->mfw_mb_cur || !p_info->mfw_mb_shadow)
257 goto err; 257 goto err;
258 258
259 return 0; 259 return 0;
diff --git a/drivers/net/ethernet/sfc/mcdi_port.c b/drivers/net/ethernet/sfc/mcdi_port.c
index c905971c5f3a..990a63d7fcb7 100644
--- a/drivers/net/ethernet/sfc/mcdi_port.c
+++ b/drivers/net/ethernet/sfc/mcdi_port.c
@@ -938,7 +938,6 @@ enum efx_stats_action {
938static int efx_mcdi_mac_stats(struct efx_nic *efx, 938static int efx_mcdi_mac_stats(struct efx_nic *efx,
939 enum efx_stats_action action, int clear) 939 enum efx_stats_action action, int clear)
940{ 940{
941 struct efx_ef10_nic_data *nic_data = efx->nic_data;
942 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAC_STATS_IN_LEN); 941 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAC_STATS_IN_LEN);
943 int rc; 942 int rc;
944 int change = action == EFX_STATS_PULL ? 0 : 1; 943 int change = action == EFX_STATS_PULL ? 0 : 1;
@@ -960,7 +959,12 @@ static int efx_mcdi_mac_stats(struct efx_nic *efx,
960 MAC_STATS_IN_PERIODIC_NOEVENT, 1, 959 MAC_STATS_IN_PERIODIC_NOEVENT, 1,
961 MAC_STATS_IN_PERIOD_MS, period); 960 MAC_STATS_IN_PERIOD_MS, period);
962 MCDI_SET_DWORD(inbuf, MAC_STATS_IN_DMA_LEN, dma_len); 961 MCDI_SET_DWORD(inbuf, MAC_STATS_IN_DMA_LEN, dma_len);
963 MCDI_SET_DWORD(inbuf, MAC_STATS_IN_PORT_ID, nic_data->vport_id); 962
963 if (efx_nic_rev(efx) >= EFX_REV_HUNT_A0) {
964 struct efx_ef10_nic_data *nic_data = efx->nic_data;
965
966 MCDI_SET_DWORD(inbuf, MAC_STATS_IN_PORT_ID, nic_data->vport_id);
967 }
964 968
965 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_MAC_STATS, inbuf, sizeof(inbuf), 969 rc = efx_mcdi_rpc_quiet(efx, MC_CMD_MAC_STATS, inbuf, sizeof(inbuf),
966 NULL, 0, NULL); 970 NULL, 0, NULL);
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
index 22cf6353ba04..7ecf549c7f1c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c
@@ -205,7 +205,7 @@ static void dwmac1000_dump_dma_regs(void __iomem *ioaddr, u32 *reg_space)
205{ 205{
206 int i; 206 int i;
207 207
208 for (i = 0; i < 23; i++) 208 for (i = 0; i < NUM_DWMAC1000_DMA_REGS; i++)
209 if ((i < 12) || (i > 17)) 209 if ((i < 12) || (i > 17))
210 reg_space[DMA_BUS_MODE / 4 + i] = 210 reg_space[DMA_BUS_MODE / 4 + i] =
211 readl(ioaddr + DMA_BUS_MODE + i * 4); 211 readl(ioaddr + DMA_BUS_MODE + i * 4);
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
index eef2f222ce9a..6502b9aa3bf5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac100_dma.c
@@ -70,7 +70,7 @@ static void dwmac100_dump_dma_regs(void __iomem *ioaddr, u32 *reg_space)
70{ 70{
71 int i; 71 int i;
72 72
73 for (i = 0; i < 9; i++) 73 for (i = 0; i < NUM_DWMAC100_DMA_REGS; i++)
74 reg_space[DMA_BUS_MODE / 4 + i] = 74 reg_space[DMA_BUS_MODE / 4 + i] =
75 readl(ioaddr + DMA_BUS_MODE + i * 4); 75 readl(ioaddr + DMA_BUS_MODE + i * 4);
76 76
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h b/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h
index 9091df86723a..adc54006f884 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac_dma.h
@@ -136,6 +136,9 @@
136#define DMA_STATUS_TI 0x00000001 /* Transmit Interrupt */ 136#define DMA_STATUS_TI 0x00000001 /* Transmit Interrupt */
137#define DMA_CONTROL_FTF 0x00100000 /* Flush transmit FIFO */ 137#define DMA_CONTROL_FTF 0x00100000 /* Flush transmit FIFO */
138 138
139#define NUM_DWMAC100_DMA_REGS 9
140#define NUM_DWMAC1000_DMA_REGS 23
141
139void dwmac_enable_dma_transmission(void __iomem *ioaddr); 142void dwmac_enable_dma_transmission(void __iomem *ioaddr);
140void dwmac_enable_dma_irq(void __iomem *ioaddr, u32 chan); 143void dwmac_enable_dma_irq(void __iomem *ioaddr, u32 chan);
141void dwmac_disable_dma_irq(void __iomem *ioaddr, u32 chan); 144void dwmac_disable_dma_irq(void __iomem *ioaddr, u32 chan);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
index babb39c646ff..af30b4857c3b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
@@ -33,6 +33,8 @@
33#define MAC100_ETHTOOL_NAME "st_mac100" 33#define MAC100_ETHTOOL_NAME "st_mac100"
34#define GMAC_ETHTOOL_NAME "st_gmac" 34#define GMAC_ETHTOOL_NAME "st_gmac"
35 35
36#define ETHTOOL_DMA_OFFSET 55
37
36struct stmmac_stats { 38struct stmmac_stats {
37 char stat_string[ETH_GSTRING_LEN]; 39 char stat_string[ETH_GSTRING_LEN];
38 int sizeof_stat; 40 int sizeof_stat;
@@ -442,6 +444,9 @@ static void stmmac_ethtool_gregs(struct net_device *dev,
442 444
443 priv->hw->mac->dump_regs(priv->hw, reg_space); 445 priv->hw->mac->dump_regs(priv->hw, reg_space);
444 priv->hw->dma->dump_regs(priv->ioaddr, reg_space); 446 priv->hw->dma->dump_regs(priv->ioaddr, reg_space);
447 /* Copy DMA registers to where ethtool expects them */
448 memcpy(&reg_space[ETHTOOL_DMA_OFFSET], &reg_space[DMA_BUS_MODE / 4],
449 NUM_DWMAC1000_DMA_REGS * 4);
445} 450}
446 451
447static void 452static void
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index db157a47000c..72ec711fcba2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -204,6 +204,7 @@ int stmmac_mdio_register(struct net_device *ndev)
204 struct stmmac_priv *priv = netdev_priv(ndev); 204 struct stmmac_priv *priv = netdev_priv(ndev);
205 struct stmmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data; 205 struct stmmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data;
206 struct device_node *mdio_node = priv->plat->mdio_node; 206 struct device_node *mdio_node = priv->plat->mdio_node;
207 struct device *dev = ndev->dev.parent;
207 int addr, found; 208 int addr, found;
208 209
209 if (!mdio_bus_data) 210 if (!mdio_bus_data)
@@ -237,7 +238,7 @@ int stmmac_mdio_register(struct net_device *ndev)
237 else 238 else
238 err = mdiobus_register(new_bus); 239 err = mdiobus_register(new_bus);
239 if (err != 0) { 240 if (err != 0) {
240 netdev_err(ndev, "Cannot register the MDIO bus\n"); 241 dev_err(dev, "Cannot register the MDIO bus\n");
241 goto bus_register_fail; 242 goto bus_register_fail;
242 } 243 }
243 244
@@ -285,14 +286,12 @@ int stmmac_mdio_register(struct net_device *ndev)
285 irq_str = irq_num; 286 irq_str = irq_num;
286 break; 287 break;
287 } 288 }
288 netdev_info(ndev, "PHY ID %08x at %d IRQ %s (%s)%s\n", 289 phy_attached_info(phydev);
289 phydev->phy_id, addr, irq_str, phydev_name(phydev),
290 act ? " active" : "");
291 found = 1; 290 found = 1;
292 } 291 }
293 292
294 if (!found && !mdio_node) { 293 if (!found && !mdio_node) {
295 netdev_warn(ndev, "No PHY found\n"); 294 dev_warn(dev, "No PHY found\n");
296 mdiobus_unregister(new_bus); 295 mdiobus_unregister(new_bus);
297 mdiobus_free(new_bus); 296 mdiobus_free(new_bus);
298 return -ENODEV; 297 return -ENODEV;
diff --git a/drivers/net/ethernet/sun/sunhme.h b/drivers/net/ethernet/sun/sunhme.h
index 3af540adb3c5..fca1bca7f69d 100644
--- a/drivers/net/ethernet/sun/sunhme.h
+++ b/drivers/net/ethernet/sun/sunhme.h
@@ -13,9 +13,9 @@
13/* Happy Meal global registers. */ 13/* Happy Meal global registers. */
14#define GREG_SWRESET 0x000UL /* Software Reset */ 14#define GREG_SWRESET 0x000UL /* Software Reset */
15#define GREG_CFG 0x004UL /* Config Register */ 15#define GREG_CFG 0x004UL /* Config Register */
16#define GREG_STAT 0x108UL /* Status */ 16#define GREG_STAT 0x100UL /* Status */
17#define GREG_IMASK 0x10cUL /* Interrupt Mask */ 17#define GREG_IMASK 0x104UL /* Interrupt Mask */
18#define GREG_REG_SIZE 0x110UL 18#define GREG_REG_SIZE 0x108UL
19 19
20/* Global reset register. */ 20/* Global reset register. */
21#define GREG_RESET_ETX 0x01 21#define GREG_RESET_ETX 0x01
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
index 32279d21c836..c2121d214f08 100644
--- a/drivers/net/ethernet/ti/cpts.c
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -31,9 +31,18 @@
31 31
32#include "cpts.h" 32#include "cpts.h"
33 33
34#define CPTS_SKB_TX_WORK_TIMEOUT 1 /* jiffies */
35
36struct cpts_skb_cb_data {
37 unsigned long tmo;
38};
39
34#define cpts_read32(c, r) readl_relaxed(&c->reg->r) 40#define cpts_read32(c, r) readl_relaxed(&c->reg->r)
35#define cpts_write32(c, v, r) writel_relaxed(v, &c->reg->r) 41#define cpts_write32(c, v, r) writel_relaxed(v, &c->reg->r)
36 42
43static int cpts_match(struct sk_buff *skb, unsigned int ptp_class,
44 u16 ts_seqid, u8 ts_msgtype);
45
37static int event_expired(struct cpts_event *event) 46static int event_expired(struct cpts_event *event)
38{ 47{
39 return time_after(jiffies, event->tmo); 48 return time_after(jiffies, event->tmo);
@@ -77,6 +86,47 @@ static int cpts_purge_events(struct cpts *cpts)
77 return removed ? 0 : -1; 86 return removed ? 0 : -1;
78} 87}
79 88
89static bool cpts_match_tx_ts(struct cpts *cpts, struct cpts_event *event)
90{
91 struct sk_buff *skb, *tmp;
92 u16 seqid;
93 u8 mtype;
94 bool found = false;
95
96 mtype = (event->high >> MESSAGE_TYPE_SHIFT) & MESSAGE_TYPE_MASK;
97 seqid = (event->high >> SEQUENCE_ID_SHIFT) & SEQUENCE_ID_MASK;
98
99 /* no need to grab txq.lock as access is always done under cpts->lock */
100 skb_queue_walk_safe(&cpts->txq, skb, tmp) {
101 struct skb_shared_hwtstamps ssh;
102 unsigned int class = ptp_classify_raw(skb);
103 struct cpts_skb_cb_data *skb_cb =
104 (struct cpts_skb_cb_data *)skb->cb;
105
106 if (cpts_match(skb, class, seqid, mtype)) {
107 u64 ns = timecounter_cyc2time(&cpts->tc, event->low);
108
109 memset(&ssh, 0, sizeof(ssh));
110 ssh.hwtstamp = ns_to_ktime(ns);
111 skb_tstamp_tx(skb, &ssh);
112 found = true;
113 __skb_unlink(skb, &cpts->txq);
114 dev_consume_skb_any(skb);
115 dev_dbg(cpts->dev, "match tx timestamp mtype %u seqid %04x\n",
116 mtype, seqid);
117 } else if (time_after(jiffies, skb_cb->tmo)) {
118 /* timeout any expired skbs over 1s */
119 dev_dbg(cpts->dev,
120 "expiring tx timestamp mtype %u seqid %04x\n",
121 mtype, seqid);
122 __skb_unlink(skb, &cpts->txq);
123 dev_consume_skb_any(skb);
124 }
125 }
126
127 return found;
128}
129
80/* 130/*
81 * Returns zero if matching event type was found. 131 * Returns zero if matching event type was found.
82 */ 132 */
@@ -101,9 +151,15 @@ static int cpts_fifo_read(struct cpts *cpts, int match)
101 event->low = lo; 151 event->low = lo;
102 type = event_type(event); 152 type = event_type(event);
103 switch (type) { 153 switch (type) {
154 case CPTS_EV_TX:
155 if (cpts_match_tx_ts(cpts, event)) {
156 /* if the new event matches an existing skb,
157 * then don't queue it
158 */
159 break;
160 }
104 case CPTS_EV_PUSH: 161 case CPTS_EV_PUSH:
105 case CPTS_EV_RX: 162 case CPTS_EV_RX:
106 case CPTS_EV_TX:
107 list_del_init(&event->list); 163 list_del_init(&event->list);
108 list_add_tail(&event->list, &cpts->events); 164 list_add_tail(&event->list, &cpts->events);
109 break; 165 break;
@@ -224,6 +280,24 @@ static int cpts_ptp_enable(struct ptp_clock_info *ptp,
224 return -EOPNOTSUPP; 280 return -EOPNOTSUPP;
225} 281}
226 282
283static long cpts_overflow_check(struct ptp_clock_info *ptp)
284{
285 struct cpts *cpts = container_of(ptp, struct cpts, info);
286 unsigned long delay = cpts->ov_check_period;
287 struct timespec64 ts;
288 unsigned long flags;
289
290 spin_lock_irqsave(&cpts->lock, flags);
291 ts = ns_to_timespec64(timecounter_read(&cpts->tc));
292
293 if (!skb_queue_empty(&cpts->txq))
294 delay = CPTS_SKB_TX_WORK_TIMEOUT;
295 spin_unlock_irqrestore(&cpts->lock, flags);
296
297 pr_debug("cpts overflow check at %lld.%09lu\n", ts.tv_sec, ts.tv_nsec);
298 return (long)delay;
299}
300
227static struct ptp_clock_info cpts_info = { 301static struct ptp_clock_info cpts_info = {
228 .owner = THIS_MODULE, 302 .owner = THIS_MODULE,
229 .name = "CTPS timer", 303 .name = "CTPS timer",
@@ -236,18 +310,9 @@ static struct ptp_clock_info cpts_info = {
236 .gettime64 = cpts_ptp_gettime, 310 .gettime64 = cpts_ptp_gettime,
237 .settime64 = cpts_ptp_settime, 311 .settime64 = cpts_ptp_settime,
238 .enable = cpts_ptp_enable, 312 .enable = cpts_ptp_enable,
313 .do_aux_work = cpts_overflow_check,
239}; 314};
240 315
241static void cpts_overflow_check(struct work_struct *work)
242{
243 struct timespec64 ts;
244 struct cpts *cpts = container_of(work, struct cpts, overflow_work.work);
245
246 cpts_ptp_gettime(&cpts->info, &ts);
247 pr_debug("cpts overflow check at %lld.%09lu\n", ts.tv_sec, ts.tv_nsec);
248 schedule_delayed_work(&cpts->overflow_work, cpts->ov_check_period);
249}
250
251static int cpts_match(struct sk_buff *skb, unsigned int ptp_class, 316static int cpts_match(struct sk_buff *skb, unsigned int ptp_class,
252 u16 ts_seqid, u8 ts_msgtype) 317 u16 ts_seqid, u8 ts_msgtype)
253{ 318{
@@ -299,7 +364,7 @@ static u64 cpts_find_ts(struct cpts *cpts, struct sk_buff *skb, int ev_type)
299 return 0; 364 return 0;
300 365
301 spin_lock_irqsave(&cpts->lock, flags); 366 spin_lock_irqsave(&cpts->lock, flags);
302 cpts_fifo_read(cpts, CPTS_EV_PUSH); 367 cpts_fifo_read(cpts, -1);
303 list_for_each_safe(this, next, &cpts->events) { 368 list_for_each_safe(this, next, &cpts->events) {
304 event = list_entry(this, struct cpts_event, list); 369 event = list_entry(this, struct cpts_event, list);
305 if (event_expired(event)) { 370 if (event_expired(event)) {
@@ -317,6 +382,19 @@ static u64 cpts_find_ts(struct cpts *cpts, struct sk_buff *skb, int ev_type)
317 break; 382 break;
318 } 383 }
319 } 384 }
385
386 if (ev_type == CPTS_EV_TX && !ns) {
387 struct cpts_skb_cb_data *skb_cb =
388 (struct cpts_skb_cb_data *)skb->cb;
389 /* Not found, add frame to queue for processing later.
390 * The periodic FIFO check will handle this.
391 */
392 skb_get(skb);
393 /* get the timestamp for timeouts */
394 skb_cb->tmo = jiffies + msecs_to_jiffies(100);
395 __skb_queue_tail(&cpts->txq, skb);
396 ptp_schedule_worker(cpts->clock, 0);
397 }
320 spin_unlock_irqrestore(&cpts->lock, flags); 398 spin_unlock_irqrestore(&cpts->lock, flags);
321 399
322 return ns; 400 return ns;
@@ -358,6 +436,7 @@ int cpts_register(struct cpts *cpts)
358{ 436{
359 int err, i; 437 int err, i;
360 438
439 skb_queue_head_init(&cpts->txq);
361 INIT_LIST_HEAD(&cpts->events); 440 INIT_LIST_HEAD(&cpts->events);
362 INIT_LIST_HEAD(&cpts->pool); 441 INIT_LIST_HEAD(&cpts->pool);
363 for (i = 0; i < CPTS_MAX_EVENTS; i++) 442 for (i = 0; i < CPTS_MAX_EVENTS; i++)
@@ -378,7 +457,7 @@ int cpts_register(struct cpts *cpts)
378 } 457 }
379 cpts->phc_index = ptp_clock_index(cpts->clock); 458 cpts->phc_index = ptp_clock_index(cpts->clock);
380 459
381 schedule_delayed_work(&cpts->overflow_work, cpts->ov_check_period); 460 ptp_schedule_worker(cpts->clock, cpts->ov_check_period);
382 return 0; 461 return 0;
383 462
384err_ptp: 463err_ptp:
@@ -392,14 +471,15 @@ void cpts_unregister(struct cpts *cpts)
392 if (WARN_ON(!cpts->clock)) 471 if (WARN_ON(!cpts->clock))
393 return; 472 return;
394 473
395 cancel_delayed_work_sync(&cpts->overflow_work);
396
397 ptp_clock_unregister(cpts->clock); 474 ptp_clock_unregister(cpts->clock);
398 cpts->clock = NULL; 475 cpts->clock = NULL;
399 476
400 cpts_write32(cpts, 0, int_enable); 477 cpts_write32(cpts, 0, int_enable);
401 cpts_write32(cpts, 0, control); 478 cpts_write32(cpts, 0, control);
402 479
480 /* Drop all packet */
481 skb_queue_purge(&cpts->txq);
482
403 clk_disable(cpts->refclk); 483 clk_disable(cpts->refclk);
404} 484}
405EXPORT_SYMBOL_GPL(cpts_unregister); 485EXPORT_SYMBOL_GPL(cpts_unregister);
@@ -476,7 +556,6 @@ struct cpts *cpts_create(struct device *dev, void __iomem *regs,
476 cpts->dev = dev; 556 cpts->dev = dev;
477 cpts->reg = (struct cpsw_cpts __iomem *)regs; 557 cpts->reg = (struct cpsw_cpts __iomem *)regs;
478 spin_lock_init(&cpts->lock); 558 spin_lock_init(&cpts->lock);
479 INIT_DELAYED_WORK(&cpts->overflow_work, cpts_overflow_check);
480 559
481 ret = cpts_of_parse(cpts, node); 560 ret = cpts_of_parse(cpts, node);
482 if (ret) 561 if (ret)
diff --git a/drivers/net/ethernet/ti/cpts.h b/drivers/net/ethernet/ti/cpts.h
index 01ea82ba9cdc..73d73faf0f38 100644
--- a/drivers/net/ethernet/ti/cpts.h
+++ b/drivers/net/ethernet/ti/cpts.h
@@ -119,13 +119,13 @@ struct cpts {
119 u32 cc_mult; /* for the nominal frequency */ 119 u32 cc_mult; /* for the nominal frequency */
120 struct cyclecounter cc; 120 struct cyclecounter cc;
121 struct timecounter tc; 121 struct timecounter tc;
122 struct delayed_work overflow_work;
123 int phc_index; 122 int phc_index;
124 struct clk *refclk; 123 struct clk *refclk;
125 struct list_head events; 124 struct list_head events;
126 struct list_head pool; 125 struct list_head pool;
127 struct cpts_event pool_data[CPTS_MAX_EVENTS]; 126 struct cpts_event pool_data[CPTS_MAX_EVENTS];
128 unsigned long ov_check_period; 127 unsigned long ov_check_period;
128 struct sk_buff_head txq;
129}; 129};
130 130
131void cpts_rx_timestamp(struct cpts *cpts, struct sk_buff *skb); 131void cpts_rx_timestamp(struct cpts *cpts, struct sk_buff *skb);
diff --git a/drivers/net/ethernet/toshiba/tc35815.c b/drivers/net/ethernet/toshiba/tc35815.c
index d9db8a06afd2..cce9c9ed46aa 100644
--- a/drivers/net/ethernet/toshiba/tc35815.c
+++ b/drivers/net/ethernet/toshiba/tc35815.c
@@ -1338,7 +1338,7 @@ static int tc35815_send_packet(struct sk_buff *skb, struct net_device *dev)
1338static void tc35815_fatal_error_interrupt(struct net_device *dev, u32 status) 1338static void tc35815_fatal_error_interrupt(struct net_device *dev, u32 status)
1339{ 1339{
1340 static int count; 1340 static int count;
1341 printk(KERN_WARNING "%s: Fatal Error Intterrupt (%#x):", 1341 printk(KERN_WARNING "%s: Fatal Error Interrupt (%#x):",
1342 dev->name, status); 1342 dev->name, status);
1343 if (status & Int_IntPCI) 1343 if (status & Int_IntPCI)
1344 printk(" IntPCI"); 1344 printk(" IntPCI");
diff --git a/drivers/net/geneve.c b/drivers/net/geneve.c
index de8156c6b292..2bbda71818ad 100644
--- a/drivers/net/geneve.c
+++ b/drivers/net/geneve.c
@@ -1091,7 +1091,7 @@ static int geneve_validate(struct nlattr *tb[], struct nlattr *data[],
1091 if (data[IFLA_GENEVE_ID]) { 1091 if (data[IFLA_GENEVE_ID]) {
1092 __u32 vni = nla_get_u32(data[IFLA_GENEVE_ID]); 1092 __u32 vni = nla_get_u32(data[IFLA_GENEVE_ID]);
1093 1093
1094 if (vni >= GENEVE_VID_MASK) 1094 if (vni >= GENEVE_N_VID)
1095 return -ERANGE; 1095 return -ERANGE;
1096 } 1096 }
1097 1097
diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c
index 1542e837fdfa..f38e32a7ec9c 100644
--- a/drivers/net/gtp.c
+++ b/drivers/net/gtp.c
@@ -364,7 +364,7 @@ static int gtp_dev_init(struct net_device *dev)
364 364
365 gtp->dev = dev; 365 gtp->dev = dev;
366 366
367 dev->tstats = alloc_percpu(struct pcpu_sw_netstats); 367 dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
368 if (!dev->tstats) 368 if (!dev->tstats)
369 return -ENOMEM; 369 return -ENOMEM;
370 370
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index d6c25580f8dd..12cc64bfcff8 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -765,7 +765,8 @@ struct netvsc_device {
765 u32 max_chn; 765 u32 max_chn;
766 u32 num_chn; 766 u32 num_chn;
767 767
768 refcount_t sc_offered; 768 atomic_t open_chn;
769 wait_queue_head_t subchan_open;
769 770
770 struct rndis_device *extension; 771 struct rndis_device *extension;
771 772
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 0a9167dd72fb..d18c3326a1f7 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -78,6 +78,7 @@ static struct netvsc_device *alloc_net_device(void)
78 net_device->max_pkt = RNDIS_MAX_PKT_DEFAULT; 78 net_device->max_pkt = RNDIS_MAX_PKT_DEFAULT;
79 net_device->pkt_align = RNDIS_PKT_ALIGN_DEFAULT; 79 net_device->pkt_align = RNDIS_PKT_ALIGN_DEFAULT;
80 init_completion(&net_device->channel_init_wait); 80 init_completion(&net_device->channel_init_wait);
81 init_waitqueue_head(&net_device->subchan_open);
81 82
82 return net_device; 83 return net_device;
83} 84}
@@ -1302,6 +1303,8 @@ int netvsc_device_add(struct hv_device *device,
1302 struct netvsc_channel *nvchan = &net_device->chan_table[i]; 1303 struct netvsc_channel *nvchan = &net_device->chan_table[i];
1303 1304
1304 nvchan->channel = device->channel; 1305 nvchan->channel = device->channel;
1306 u64_stats_init(&nvchan->tx_stats.syncp);
1307 u64_stats_init(&nvchan->rx_stats.syncp);
1305 } 1308 }
1306 1309
1307 /* Enable NAPI handler before init callbacks */ 1310 /* Enable NAPI handler before init callbacks */
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 63c98bbbc596..0d78727f1a14 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -315,14 +315,34 @@ static u32 init_page_array(void *hdr, u32 len, struct sk_buff *skb,
315 return slots_used; 315 return slots_used;
316} 316}
317 317
318/* Estimate number of page buffers neede to transmit 318static int count_skb_frag_slots(struct sk_buff *skb)
319 * Need at most 2 for RNDIS header plus skb body and fragments. 319{
320 */ 320 int i, frags = skb_shinfo(skb)->nr_frags;
321static unsigned int netvsc_get_slots(const struct sk_buff *skb) 321 int pages = 0;
322
323 for (i = 0; i < frags; i++) {
324 skb_frag_t *frag = skb_shinfo(skb)->frags + i;
325 unsigned long size = skb_frag_size(frag);
326 unsigned long offset = frag->page_offset;
327
328 /* Skip unused frames from start of page */
329 offset &= ~PAGE_MASK;
330 pages += PFN_UP(offset + size);
331 }
332 return pages;
333}
334
335static int netvsc_get_slots(struct sk_buff *skb)
322{ 336{
323 return PFN_UP(offset_in_page(skb->data) + skb_headlen(skb)) 337 char *data = skb->data;
324 + skb_shinfo(skb)->nr_frags 338 unsigned int offset = offset_in_page(data);
325 + 2; 339 unsigned int len = skb_headlen(skb);
340 int slots;
341 int frag_slots;
342
343 slots = DIV_ROUND_UP(offset + len, PAGE_SIZE);
344 frag_slots = count_skb_frag_slots(skb);
345 return slots + frag_slots;
326} 346}
327 347
328static u32 net_checksum_info(struct sk_buff *skb) 348static u32 net_checksum_info(struct sk_buff *skb)
@@ -360,18 +380,21 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
360 struct hv_page_buffer page_buf[MAX_PAGE_BUFFER_COUNT]; 380 struct hv_page_buffer page_buf[MAX_PAGE_BUFFER_COUNT];
361 struct hv_page_buffer *pb = page_buf; 381 struct hv_page_buffer *pb = page_buf;
362 382
363 /* We can only transmit MAX_PAGE_BUFFER_COUNT number 383 /* We will atmost need two pages to describe the rndis
384 * header. We can only transmit MAX_PAGE_BUFFER_COUNT number
364 * of pages in a single packet. If skb is scattered around 385 * of pages in a single packet. If skb is scattered around
365 * more pages we try linearizing it. 386 * more pages we try linearizing it.
366 */ 387 */
367 num_data_pgs = netvsc_get_slots(skb); 388
389 num_data_pgs = netvsc_get_slots(skb) + 2;
390
368 if (unlikely(num_data_pgs > MAX_PAGE_BUFFER_COUNT)) { 391 if (unlikely(num_data_pgs > MAX_PAGE_BUFFER_COUNT)) {
369 ++net_device_ctx->eth_stats.tx_scattered; 392 ++net_device_ctx->eth_stats.tx_scattered;
370 393
371 if (skb_linearize(skb)) 394 if (skb_linearize(skb))
372 goto no_memory; 395 goto no_memory;
373 396
374 num_data_pgs = netvsc_get_slots(skb); 397 num_data_pgs = netvsc_get_slots(skb) + 2;
375 if (num_data_pgs > MAX_PAGE_BUFFER_COUNT) { 398 if (num_data_pgs > MAX_PAGE_BUFFER_COUNT) {
376 ++net_device_ctx->eth_stats.tx_too_big; 399 ++net_device_ctx->eth_stats.tx_too_big;
377 goto drop; 400 goto drop;
diff --git a/drivers/net/hyperv/rndis_filter.c b/drivers/net/hyperv/rndis_filter.c
index 85c00e1c52b6..d6308ffda53e 100644
--- a/drivers/net/hyperv/rndis_filter.c
+++ b/drivers/net/hyperv/rndis_filter.c
@@ -1048,8 +1048,8 @@ static void netvsc_sc_open(struct vmbus_channel *new_sc)
1048 else 1048 else
1049 netif_napi_del(&nvchan->napi); 1049 netif_napi_del(&nvchan->napi);
1050 1050
1051 if (refcount_dec_and_test(&nvscdev->sc_offered)) 1051 atomic_inc(&nvscdev->open_chn);
1052 complete(&nvscdev->channel_init_wait); 1052 wake_up(&nvscdev->subchan_open);
1053} 1053}
1054 1054
1055int rndis_filter_device_add(struct hv_device *dev, 1055int rndis_filter_device_add(struct hv_device *dev,
@@ -1090,8 +1090,6 @@ int rndis_filter_device_add(struct hv_device *dev,
1090 net_device->max_chn = 1; 1090 net_device->max_chn = 1;
1091 net_device->num_chn = 1; 1091 net_device->num_chn = 1;
1092 1092
1093 refcount_set(&net_device->sc_offered, 0);
1094
1095 net_device->extension = rndis_device; 1093 net_device->extension = rndis_device;
1096 rndis_device->ndev = net; 1094 rndis_device->ndev = net;
1097 1095
@@ -1221,11 +1219,11 @@ int rndis_filter_device_add(struct hv_device *dev,
1221 rndis_device->ind_table[i] = ethtool_rxfh_indir_default(i, 1219 rndis_device->ind_table[i] = ethtool_rxfh_indir_default(i,
1222 net_device->num_chn); 1220 net_device->num_chn);
1223 1221
1222 atomic_set(&net_device->open_chn, 1);
1224 num_rss_qs = net_device->num_chn - 1; 1223 num_rss_qs = net_device->num_chn - 1;
1225 if (num_rss_qs == 0) 1224 if (num_rss_qs == 0)
1226 return 0; 1225 return 0;
1227 1226
1228 refcount_set(&net_device->sc_offered, num_rss_qs);
1229 vmbus_set_sc_create_callback(dev->channel, netvsc_sc_open); 1227 vmbus_set_sc_create_callback(dev->channel, netvsc_sc_open);
1230 1228
1231 init_packet = &net_device->channel_init_pkt; 1229 init_packet = &net_device->channel_init_pkt;
@@ -1242,15 +1240,19 @@ int rndis_filter_device_add(struct hv_device *dev,
1242 if (ret) 1240 if (ret)
1243 goto out; 1241 goto out;
1244 1242
1243 wait_for_completion(&net_device->channel_init_wait);
1245 if (init_packet->msg.v5_msg.subchn_comp.status != NVSP_STAT_SUCCESS) { 1244 if (init_packet->msg.v5_msg.subchn_comp.status != NVSP_STAT_SUCCESS) {
1246 ret = -ENODEV; 1245 ret = -ENODEV;
1247 goto out; 1246 goto out;
1248 } 1247 }
1249 wait_for_completion(&net_device->channel_init_wait);
1250 1248
1251 net_device->num_chn = 1 + 1249 net_device->num_chn = 1 +
1252 init_packet->msg.v5_msg.subchn_comp.num_subchannels; 1250 init_packet->msg.v5_msg.subchn_comp.num_subchannels;
1253 1251
1252 /* wait for all sub channels to open */
1253 wait_event(net_device->subchan_open,
1254 atomic_read(&net_device->open_chn) == net_device->num_chn);
1255
1254 /* ignore failues from setting rss parameters, still have channels */ 1256 /* ignore failues from setting rss parameters, still have channels */
1255 rndis_filter_set_rss_param(rndis_device, netvsc_hash_key, 1257 rndis_filter_set_rss_param(rndis_device, netvsc_hash_key,
1256 net_device->num_chn); 1258 net_device->num_chn);
diff --git a/drivers/net/ipvlan/ipvlan_main.c b/drivers/net/ipvlan/ipvlan_main.c
index f37e3c1fd4e7..8dab74a81303 100644
--- a/drivers/net/ipvlan/ipvlan_main.c
+++ b/drivers/net/ipvlan/ipvlan_main.c
@@ -192,7 +192,7 @@ static int ipvlan_init(struct net_device *dev)
192 192
193 netdev_lockdep_set_classes(dev); 193 netdev_lockdep_set_classes(dev);
194 194
195 ipvlan->pcpu_stats = alloc_percpu(struct ipvl_pcpu_stats); 195 ipvlan->pcpu_stats = netdev_alloc_pcpu_stats(struct ipvl_pcpu_stats);
196 if (!ipvlan->pcpu_stats) 196 if (!ipvlan->pcpu_stats)
197 return -ENOMEM; 197 return -ENOMEM;
198 198
diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c
index 6f6ed75b63c9..765de3bedb88 100644
--- a/drivers/net/irda/mcs7780.c
+++ b/drivers/net/irda/mcs7780.c
@@ -141,9 +141,19 @@ static int mcs_set_reg(struct mcs_cb *mcs, __u16 reg, __u16 val)
141static int mcs_get_reg(struct mcs_cb *mcs, __u16 reg, __u16 * val) 141static int mcs_get_reg(struct mcs_cb *mcs, __u16 reg, __u16 * val)
142{ 142{
143 struct usb_device *dev = mcs->usbdev; 143 struct usb_device *dev = mcs->usbdev;
144 int ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), MCS_RDREQ, 144 void *dmabuf;
145 MCS_RD_RTYPE, 0, reg, val, 2, 145 int ret;
146 msecs_to_jiffies(MCS_CTRL_TIMEOUT)); 146
147 dmabuf = kmalloc(sizeof(__u16), GFP_KERNEL);
148 if (!dmabuf)
149 return -ENOMEM;
150
151 ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), MCS_RDREQ,
152 MCS_RD_RTYPE, 0, reg, dmabuf, 2,
153 msecs_to_jiffies(MCS_CTRL_TIMEOUT));
154
155 memcpy(val, dmabuf, sizeof(__u16));
156 kfree(dmabuf);
147 157
148 return ret; 158 return ret;
149} 159}
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index 2dda72004a7d..928fd892f167 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -7,7 +7,16 @@ menuconfig MDIO_DEVICE
7 help 7 help
8 MDIO devices and driver infrastructure code. 8 MDIO devices and driver infrastructure code.
9 9
10if MDIO_DEVICE 10config MDIO_BUS
11 tristate
12 default m if PHYLIB=m
13 default MDIO_DEVICE
14 help
15 This internal symbol is used for link time dependencies and it
16 reflects whether the mdio_bus/mdio_device code is built as a
17 loadable module or built-in.
18
19if MDIO_BUS
11 20
12config MDIO_BCM_IPROC 21config MDIO_BCM_IPROC
13 tristate "Broadcom iProc MDIO bus controller" 22 tristate "Broadcom iProc MDIO bus controller"
@@ -28,7 +37,6 @@ config MDIO_BCM_UNIMAC
28 37
29config MDIO_BITBANG 38config MDIO_BITBANG
30 tristate "Bitbanged MDIO buses" 39 tristate "Bitbanged MDIO buses"
31 depends on !(MDIO_DEVICE=y && PHYLIB=m)
32 help 40 help
33 This module implements the MDIO bus protocol in software, 41 This module implements the MDIO bus protocol in software,
34 for use by low level drivers that export the ability to 42 for use by low level drivers that export the ability to
@@ -127,7 +135,6 @@ config MDIO_THUNDER
127 tristate "ThunderX SOCs MDIO buses" 135 tristate "ThunderX SOCs MDIO buses"
128 depends on 64BIT 136 depends on 64BIT
129 depends on PCI 137 depends on PCI
130 depends on !(MDIO_DEVICE=y && PHYLIB=m)
131 select MDIO_CAVIUM 138 select MDIO_CAVIUM
132 help 139 help
133 This driver supports the MDIO interfaces found on Cavium 140 This driver supports the MDIO interfaces found on Cavium
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index d0626bf5c540..5068c582d502 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -749,6 +749,9 @@ void phy_stop_machine(struct phy_device *phydev)
749 if (phydev->state > PHY_UP && phydev->state != PHY_HALTED) 749 if (phydev->state > PHY_UP && phydev->state != PHY_HALTED)
750 phydev->state = PHY_UP; 750 phydev->state = PHY_UP;
751 mutex_unlock(&phydev->lock); 751 mutex_unlock(&phydev->lock);
752
753 /* Now we can run the state machine synchronously */
754 phy_state_machine(&phydev->state_queue.work);
752} 755}
753 756
754/** 757/**
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c
index bd4303944e44..a404552555d4 100644
--- a/drivers/net/ppp/ppp_generic.c
+++ b/drivers/net/ppp/ppp_generic.c
@@ -1915,21 +1915,23 @@ static void __ppp_channel_push(struct channel *pch)
1915 spin_unlock(&pch->downl); 1915 spin_unlock(&pch->downl);
1916 /* see if there is anything from the attached unit to be sent */ 1916 /* see if there is anything from the attached unit to be sent */
1917 if (skb_queue_empty(&pch->file.xq)) { 1917 if (skb_queue_empty(&pch->file.xq)) {
1918 read_lock(&pch->upl);
1919 ppp = pch->ppp; 1918 ppp = pch->ppp;
1920 if (ppp) 1919 if (ppp)
1921 ppp_xmit_process(ppp); 1920 __ppp_xmit_process(ppp);
1922 read_unlock(&pch->upl);
1923 } 1921 }
1924} 1922}
1925 1923
1926static void ppp_channel_push(struct channel *pch) 1924static void ppp_channel_push(struct channel *pch)
1927{ 1925{
1928 local_bh_disable(); 1926 read_lock_bh(&pch->upl);
1929 1927 if (pch->ppp) {
1930 __ppp_channel_push(pch); 1928 (*this_cpu_ptr(pch->ppp->xmit_recursion))++;
1931 1929 __ppp_channel_push(pch);
1932 local_bh_enable(); 1930 (*this_cpu_ptr(pch->ppp->xmit_recursion))--;
1931 } else {
1932 __ppp_channel_push(pch);
1933 }
1934 read_unlock_bh(&pch->upl);
1933} 1935}
1934 1936
1935/* 1937/*
diff --git a/drivers/net/ppp/pptp.c b/drivers/net/ppp/pptp.c
index eac499c58aa7..6dde9a0cfe76 100644
--- a/drivers/net/ppp/pptp.c
+++ b/drivers/net/ppp/pptp.c
@@ -131,7 +131,6 @@ static void del_chan(struct pppox_sock *sock)
131 clear_bit(sock->proto.pptp.src_addr.call_id, callid_bitmap); 131 clear_bit(sock->proto.pptp.src_addr.call_id, callid_bitmap);
132 RCU_INIT_POINTER(callid_sock[sock->proto.pptp.src_addr.call_id], NULL); 132 RCU_INIT_POINTER(callid_sock[sock->proto.pptp.src_addr.call_id], NULL);
133 spin_unlock(&chan_lock); 133 spin_unlock(&chan_lock);
134 synchronize_rcu();
135} 134}
136 135
137static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb) 136static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
@@ -520,6 +519,7 @@ static int pptp_release(struct socket *sock)
520 519
521 po = pppox_sk(sk); 520 po = pppox_sk(sk);
522 del_chan(po); 521 del_chan(po);
522 synchronize_rcu();
523 523
524 pppox_unbind_sock(sk); 524 pppox_unbind_sock(sk);
525 sk->sk_state = PPPOX_DEAD; 525 sk->sk_state = PPPOX_DEAD;
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index 464570409796..ae53e899259f 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -60,11 +60,11 @@ static struct team_port *team_port_get_rtnl(const struct net_device *dev)
60static int __set_port_dev_addr(struct net_device *port_dev, 60static int __set_port_dev_addr(struct net_device *port_dev,
61 const unsigned char *dev_addr) 61 const unsigned char *dev_addr)
62{ 62{
63 struct sockaddr addr; 63 struct sockaddr_storage addr;
64 64
65 memcpy(addr.sa_data, dev_addr, port_dev->addr_len); 65 memcpy(addr.__data, dev_addr, port_dev->addr_len);
66 addr.sa_family = port_dev->type; 66 addr.ss_family = port_dev->type;
67 return dev_set_mac_address(port_dev, &addr); 67 return dev_set_mac_address(port_dev, (struct sockaddr *)&addr);
68} 68}
69 69
70static int team_port_set_orig_dev_addr(struct team_port *port) 70static int team_port_set_orig_dev_addr(struct team_port *port)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 3d4c24572ecd..0a2c0a42283f 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1879,6 +1879,9 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
1879 1879
1880err_detach: 1880err_detach:
1881 tun_detach_all(dev); 1881 tun_detach_all(dev);
1882 /* register_netdevice() already called tun_free_netdev() */
1883 goto err_free_dev;
1884
1882err_free_flow: 1885err_free_flow:
1883 tun_flow_uninit(tun); 1886 tun_flow_uninit(tun);
1884 security_tun_dev_free_security(tun->security); 1887 security_tun_dev_free_security(tun->security);
@@ -2598,8 +2601,16 @@ static int __init tun_init(void)
2598 goto err_misc; 2601 goto err_misc;
2599 } 2602 }
2600 2603
2601 register_netdevice_notifier(&tun_notifier_block); 2604 ret = register_netdevice_notifier(&tun_notifier_block);
2605 if (ret) {
2606 pr_err("Can't register netdevice notifier\n");
2607 goto err_notifier;
2608 }
2609
2602 return 0; 2610 return 0;
2611
2612err_notifier:
2613 misc_deregister(&tun_miscdev);
2603err_misc: 2614err_misc:
2604 rtnl_link_unregister(&tun_link_ops); 2615 rtnl_link_unregister(&tun_link_ops);
2605err_linkops: 2616err_linkops:
diff --git a/drivers/net/usb/asix.h b/drivers/net/usb/asix.h
index d1092421aaa7..9a4171b90947 100644
--- a/drivers/net/usb/asix.h
+++ b/drivers/net/usb/asix.h
@@ -209,6 +209,7 @@ void asix_write_cmd_async(struct usbnet *dev, u8 cmd, u16 value,
209int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb, 209int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,
210 struct asix_rx_fixup_info *rx); 210 struct asix_rx_fixup_info *rx);
211int asix_rx_fixup_common(struct usbnet *dev, struct sk_buff *skb); 211int asix_rx_fixup_common(struct usbnet *dev, struct sk_buff *skb);
212void asix_rx_fixup_common_free(struct asix_common_private *dp);
212 213
213struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, 214struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
214 gfp_t flags); 215 gfp_t flags);
diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c
index 7847436c441e..522d2900cd1d 100644
--- a/drivers/net/usb/asix_common.c
+++ b/drivers/net/usb/asix_common.c
@@ -75,6 +75,27 @@ void asix_write_cmd_async(struct usbnet *dev, u8 cmd, u16 value, u16 index,
75 value, index, data, size); 75 value, index, data, size);
76} 76}
77 77
78static void reset_asix_rx_fixup_info(struct asix_rx_fixup_info *rx)
79{
80 /* Reset the variables that have a lifetime outside of
81 * asix_rx_fixup_internal() so that future processing starts from a
82 * known set of initial conditions.
83 */
84
85 if (rx->ax_skb) {
86 /* Discard any incomplete Ethernet frame in the netdev buffer */
87 kfree_skb(rx->ax_skb);
88 rx->ax_skb = NULL;
89 }
90
91 /* Assume the Data header 32-bit word is at the start of the current
92 * or next URB socket buffer so reset all the state variables.
93 */
94 rx->remaining = 0;
95 rx->split_head = false;
96 rx->header = 0;
97}
98
78int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb, 99int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,
79 struct asix_rx_fixup_info *rx) 100 struct asix_rx_fixup_info *rx)
80{ 101{
@@ -99,15 +120,7 @@ int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,
99 if (size != ((~rx->header >> 16) & 0x7ff)) { 120 if (size != ((~rx->header >> 16) & 0x7ff)) {
100 netdev_err(dev->net, "asix_rx_fixup() Data Header synchronisation was lost, remaining %d\n", 121 netdev_err(dev->net, "asix_rx_fixup() Data Header synchronisation was lost, remaining %d\n",
101 rx->remaining); 122 rx->remaining);
102 if (rx->ax_skb) { 123 reset_asix_rx_fixup_info(rx);
103 kfree_skb(rx->ax_skb);
104 rx->ax_skb = NULL;
105 /* Discard the incomplete netdev Ethernet frame
106 * and assume the Data header is at the start of
107 * the current URB socket buffer.
108 */
109 }
110 rx->remaining = 0;
111 } 124 }
112 } 125 }
113 126
@@ -139,11 +152,13 @@ int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,
139 if (size != ((~rx->header >> 16) & 0x7ff)) { 152 if (size != ((~rx->header >> 16) & 0x7ff)) {
140 netdev_err(dev->net, "asix_rx_fixup() Bad Header Length 0x%x, offset %d\n", 153 netdev_err(dev->net, "asix_rx_fixup() Bad Header Length 0x%x, offset %d\n",
141 rx->header, offset); 154 rx->header, offset);
155 reset_asix_rx_fixup_info(rx);
142 return 0; 156 return 0;
143 } 157 }
144 if (size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) { 158 if (size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) {
145 netdev_dbg(dev->net, "asix_rx_fixup() Bad RX Length %d\n", 159 netdev_dbg(dev->net, "asix_rx_fixup() Bad RX Length %d\n",
146 size); 160 size);
161 reset_asix_rx_fixup_info(rx);
147 return 0; 162 return 0;
148 } 163 }
149 164
@@ -168,8 +183,10 @@ int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,
168 if (rx->ax_skb) { 183 if (rx->ax_skb) {
169 skb_put_data(rx->ax_skb, skb->data + offset, 184 skb_put_data(rx->ax_skb, skb->data + offset,
170 copy_length); 185 copy_length);
171 if (!rx->remaining) 186 if (!rx->remaining) {
172 usbnet_skb_return(dev, rx->ax_skb); 187 usbnet_skb_return(dev, rx->ax_skb);
188 rx->ax_skb = NULL;
189 }
173 } 190 }
174 191
175 offset += (copy_length + 1) & 0xfffe; 192 offset += (copy_length + 1) & 0xfffe;
@@ -178,6 +195,7 @@ int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,
178 if (skb->len != offset) { 195 if (skb->len != offset) {
179 netdev_err(dev->net, "asix_rx_fixup() Bad SKB Length %d, %d\n", 196 netdev_err(dev->net, "asix_rx_fixup() Bad SKB Length %d, %d\n",
180 skb->len, offset); 197 skb->len, offset);
198 reset_asix_rx_fixup_info(rx);
181 return 0; 199 return 0;
182 } 200 }
183 201
@@ -192,6 +210,21 @@ int asix_rx_fixup_common(struct usbnet *dev, struct sk_buff *skb)
192 return asix_rx_fixup_internal(dev, skb, rx); 210 return asix_rx_fixup_internal(dev, skb, rx);
193} 211}
194 212
213void asix_rx_fixup_common_free(struct asix_common_private *dp)
214{
215 struct asix_rx_fixup_info *rx;
216
217 if (!dp)
218 return;
219
220 rx = &dp->rx_fixup_info;
221
222 if (rx->ax_skb) {
223 kfree_skb(rx->ax_skb);
224 rx->ax_skb = NULL;
225 }
226}
227
195struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, 228struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
196 gfp_t flags) 229 gfp_t flags)
197{ 230{
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index a3aa0a27dfe5..b2ff88e69a81 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -764,6 +764,7 @@ static int ax88772_bind(struct usbnet *dev, struct usb_interface *intf)
764 764
765static void ax88772_unbind(struct usbnet *dev, struct usb_interface *intf) 765static void ax88772_unbind(struct usbnet *dev, struct usb_interface *intf)
766{ 766{
767 asix_rx_fixup_common_free(dev->driver_priv);
767 kfree(dev->driver_priv); 768 kfree(dev->driver_priv);
768} 769}
769 770
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 5833f7e2a127..b99a7fb09f8e 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2367,9 +2367,6 @@ static int lan78xx_reset(struct lan78xx_net *dev)
2367 /* Init LTM */ 2367 /* Init LTM */
2368 lan78xx_init_ltm(dev); 2368 lan78xx_init_ltm(dev);
2369 2369
2370 dev->net->hard_header_len += TX_OVERHEAD;
2371 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
2372
2373 if (dev->udev->speed == USB_SPEED_SUPER) { 2370 if (dev->udev->speed == USB_SPEED_SUPER) {
2374 buf = DEFAULT_BURST_CAP_SIZE / SS_USB_PKT_SIZE; 2371 buf = DEFAULT_BURST_CAP_SIZE / SS_USB_PKT_SIZE;
2375 dev->rx_urb_size = DEFAULT_BURST_CAP_SIZE; 2372 dev->rx_urb_size = DEFAULT_BURST_CAP_SIZE;
@@ -2855,16 +2852,19 @@ static int lan78xx_bind(struct lan78xx_net *dev, struct usb_interface *intf)
2855 return ret; 2852 return ret;
2856 } 2853 }
2857 2854
2855 dev->net->hard_header_len += TX_OVERHEAD;
2856 dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
2857
2858 /* Init all registers */ 2858 /* Init all registers */
2859 ret = lan78xx_reset(dev); 2859 ret = lan78xx_reset(dev);
2860 2860
2861 lan78xx_mdio_init(dev); 2861 ret = lan78xx_mdio_init(dev);
2862 2862
2863 dev->net->flags |= IFF_MULTICAST; 2863 dev->net->flags |= IFF_MULTICAST;
2864 2864
2865 pdata->wol = WAKE_MAGIC; 2865 pdata->wol = WAKE_MAGIC;
2866 2866
2867 return 0; 2867 return ret;
2868} 2868}
2869 2869
2870static void lan78xx_unbind(struct lan78xx_net *dev, struct usb_interface *intf) 2870static void lan78xx_unbind(struct lan78xx_net *dev, struct usb_interface *intf)
@@ -3525,11 +3525,11 @@ static int lan78xx_probe(struct usb_interface *intf,
3525 udev = interface_to_usbdev(intf); 3525 udev = interface_to_usbdev(intf);
3526 udev = usb_get_dev(udev); 3526 udev = usb_get_dev(udev);
3527 3527
3528 ret = -ENOMEM;
3529 netdev = alloc_etherdev(sizeof(struct lan78xx_net)); 3528 netdev = alloc_etherdev(sizeof(struct lan78xx_net));
3530 if (!netdev) { 3529 if (!netdev) {
3531 dev_err(&intf->dev, "Error: OOM\n"); 3530 dev_err(&intf->dev, "Error: OOM\n");
3532 goto out1; 3531 ret = -ENOMEM;
3532 goto out1;
3533 } 3533 }
3534 3534
3535 /* netdev_printk() needs this */ 3535 /* netdev_printk() needs this */
@@ -3610,7 +3610,7 @@ static int lan78xx_probe(struct usb_interface *intf,
3610 ret = register_netdev(netdev); 3610 ret = register_netdev(netdev);
3611 if (ret != 0) { 3611 if (ret != 0) {
3612 netif_err(dev, probe, netdev, "couldn't register the device\n"); 3612 netif_err(dev, probe, netdev, "couldn't register the device\n");
3613 goto out2; 3613 goto out3;
3614 } 3614 }
3615 3615
3616 usb_set_intfdata(intf, dev); 3616 usb_set_intfdata(intf, dev);
diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
index 5894e3c9468f..8c3733608271 100644
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@ -1175,6 +1175,7 @@ static const struct usb_device_id products[] = {
1175 {QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */ 1175 {QMI_FIXED_INTF(0x19d2, 0x1428, 2)}, /* Telewell TW-LTE 4G v2 */
1176 {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */ 1176 {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */
1177 {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */ 1177 {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */
1178 {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */
1178 {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */ 1179 {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */
1179 {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */ 1180 {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */
1180 {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */ 1181 {QMI_FIXED_INTF(0x1199, 0x68a2, 8)}, /* Sierra Wireless MC7710 in QMI mode */
@@ -1340,10 +1341,14 @@ static int qmi_wwan_probe(struct usb_interface *intf,
1340static void qmi_wwan_disconnect(struct usb_interface *intf) 1341static void qmi_wwan_disconnect(struct usb_interface *intf)
1341{ 1342{
1342 struct usbnet *dev = usb_get_intfdata(intf); 1343 struct usbnet *dev = usb_get_intfdata(intf);
1343 struct qmi_wwan_state *info = (void *)&dev->data; 1344 struct qmi_wwan_state *info;
1344 struct list_head *iter; 1345 struct list_head *iter;
1345 struct net_device *ldev; 1346 struct net_device *ldev;
1346 1347
1348 /* called twice if separate control and data intf */
1349 if (!dev)
1350 return;
1351 info = (void *)&dev->data;
1347 if (info->flags & QMI_WWAN_FLAG_MUX) { 1352 if (info->flags & QMI_WWAN_FLAG_MUX) {
1348 if (!rtnl_trylock()) { 1353 if (!rtnl_trylock()) {
1349 restart_syscall(); 1354 restart_syscall();
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index f41ab0ea942a..98f17b05c68b 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -889,21 +889,20 @@ static int add_recvbuf_mergeable(struct virtnet_info *vi,
889 889
890 buf = (char *)page_address(alloc_frag->page) + alloc_frag->offset; 890 buf = (char *)page_address(alloc_frag->page) + alloc_frag->offset;
891 buf += headroom; /* advance address leaving hole at front of pkt */ 891 buf += headroom; /* advance address leaving hole at front of pkt */
892 ctx = (void *)(unsigned long)len;
893 get_page(alloc_frag->page); 892 get_page(alloc_frag->page);
894 alloc_frag->offset += len + headroom; 893 alloc_frag->offset += len + headroom;
895 hole = alloc_frag->size - alloc_frag->offset; 894 hole = alloc_frag->size - alloc_frag->offset;
896 if (hole < len + headroom) { 895 if (hole < len + headroom) {
897 /* To avoid internal fragmentation, if there is very likely not 896 /* To avoid internal fragmentation, if there is very likely not
898 * enough space for another buffer, add the remaining space to 897 * enough space for another buffer, add the remaining space to
899 * the current buffer. This extra space is not included in 898 * the current buffer.
900 * the truesize stored in ctx.
901 */ 899 */
902 len += hole; 900 len += hole;
903 alloc_frag->offset += hole; 901 alloc_frag->offset += hole;
904 } 902 }
905 903
906 sg_init_one(rq->sg, buf, len); 904 sg_init_one(rq->sg, buf, len);
905 ctx = (void *)(unsigned long)len;
907 err = virtqueue_add_inbuf_ctx(rq->vq, rq->sg, 1, buf, ctx, gfp); 906 err = virtqueue_add_inbuf_ctx(rq->vq, rq->sg, 1, buf, ctx, gfp);
908 if (err < 0) 907 if (err < 0)
909 put_page(virt_to_head_page(buf)); 908 put_page(virt_to_head_page(buf));
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 96aa7e6cf214..e17baac70f43 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -623,6 +623,7 @@ static struct sk_buff **vxlan_gro_receive(struct sock *sk,
623 623
624out: 624out:
625 skb_gro_remcsum_cleanup(skb, &grc); 625 skb_gro_remcsum_cleanup(skb, &grc);
626 skb->remcsum_offload = 0;
626 NAPI_GRO_CB(skb)->flush |= flush; 627 NAPI_GRO_CB(skb)->flush |= flush;
627 628
628 return pp; 629 return pp;
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index 2153e8062b4c..5cc3a07dda9e 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -214,7 +214,7 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
214 214
215 /* Make sure there's enough writeable headroom */ 215 /* Make sure there's enough writeable headroom */
216 if (skb_headroom(skb) < drvr->hdrlen || skb_header_cloned(skb)) { 216 if (skb_headroom(skb) < drvr->hdrlen || skb_header_cloned(skb)) {
217 head_delta = drvr->hdrlen - skb_headroom(skb); 217 head_delta = max_t(int, drvr->hdrlen - skb_headroom(skb), 0);
218 218
219 brcmf_dbg(INFO, "%s: insufficient headroom (%d)\n", 219 brcmf_dbg(INFO, "%s: insufficient headroom (%d)\n",
220 brcmf_ifname(ifp), head_delta); 220 brcmf_ifname(ifp), head_delta);
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
index d21258d277ce..f1b60740e020 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
@@ -159,8 +159,10 @@ void brcmf_feat_attach(struct brcmf_pub *drvr)
159 159
160 brcmf_feat_firmware_capabilities(ifp); 160 brcmf_feat_firmware_capabilities(ifp);
161 memset(&gscan_cfg, 0, sizeof(gscan_cfg)); 161 memset(&gscan_cfg, 0, sizeof(gscan_cfg));
162 brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN, "pfn_gscan_cfg", 162 if (drvr->bus_if->chip != BRCM_CC_43430_CHIP_ID)
163 &gscan_cfg, sizeof(gscan_cfg)); 163 brcmf_feat_iovar_data_set(ifp, BRCMF_FEAT_GSCAN,
164 "pfn_gscan_cfg",
165 &gscan_cfg, sizeof(gscan_cfg));
164 brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn"); 166 brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_PNO, "pfn");
165 if (drvr->bus_if->wowl_supported) 167 if (drvr->bus_if->wowl_supported)
166 brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl"); 168 brcmf_feat_iovar_int_get(ifp, BRCMF_FEAT_WOWL, "wowl");
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index fbcbb4325936..f3556122c6ac 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -2053,12 +2053,13 @@ static int brcmf_sdio_txpkt_hdalign(struct brcmf_sdio *bus, struct sk_buff *pkt)
2053 atomic_inc(&stats->pktcow_failed); 2053 atomic_inc(&stats->pktcow_failed);
2054 return -ENOMEM; 2054 return -ENOMEM;
2055 } 2055 }
2056 head_pad = 0;
2056 } 2057 }
2057 skb_push(pkt, head_pad); 2058 skb_push(pkt, head_pad);
2058 dat_buf = (u8 *)(pkt->data); 2059 dat_buf = (u8 *)(pkt->data);
2059 } 2060 }
2060 memset(dat_buf, 0, head_pad + bus->tx_hdrlen); 2061 memset(dat_buf, 0, head_pad + bus->tx_hdrlen);
2061 return 0; 2062 return head_pad;
2062} 2063}
2063 2064
2064/** 2065/**
@@ -4174,11 +4175,6 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
4174 goto fail; 4175 goto fail;
4175 } 4176 }
4176 4177
4177 /* allocate scatter-gather table. sg support
4178 * will be disabled upon allocation failure.
4179 */
4180 brcmf_sdiod_sgtable_alloc(bus->sdiodev);
4181
4182 /* Query the F2 block size, set roundup accordingly */ 4178 /* Query the F2 block size, set roundup accordingly */
4183 bus->blocksize = bus->sdiodev->func[2]->cur_blksize; 4179 bus->blocksize = bus->sdiodev->func[2]->cur_blksize;
4184 bus->roundup = min(max_roundup, bus->blocksize); 4180 bus->roundup = min(max_roundup, bus->blocksize);
diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c
index b4ecd1fe1374..97208ce19f92 100644
--- a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c
+++ b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c
@@ -154,7 +154,7 @@ static const struct iwl_tt_params iwl9000_tt_params = {
154const struct iwl_cfg iwl9160_2ac_cfg = { 154const struct iwl_cfg iwl9160_2ac_cfg = {
155 .name = "Intel(R) Dual Band Wireless AC 9160", 155 .name = "Intel(R) Dual Band Wireless AC 9160",
156 .fw_name_pre = IWL9260A_FW_PRE, 156 .fw_name_pre = IWL9260A_FW_PRE,
157 .fw_name_pre_next_step = IWL9260B_FW_PRE, 157 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
158 IWL_DEVICE_9000, 158 IWL_DEVICE_9000,
159 .ht_params = &iwl9000_ht_params, 159 .ht_params = &iwl9000_ht_params,
160 .nvm_ver = IWL9000_NVM_VERSION, 160 .nvm_ver = IWL9000_NVM_VERSION,
@@ -165,7 +165,7 @@ const struct iwl_cfg iwl9160_2ac_cfg = {
165const struct iwl_cfg iwl9260_2ac_cfg = { 165const struct iwl_cfg iwl9260_2ac_cfg = {
166 .name = "Intel(R) Dual Band Wireless AC 9260", 166 .name = "Intel(R) Dual Band Wireless AC 9260",
167 .fw_name_pre = IWL9260A_FW_PRE, 167 .fw_name_pre = IWL9260A_FW_PRE,
168 .fw_name_pre_next_step = IWL9260B_FW_PRE, 168 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
169 IWL_DEVICE_9000, 169 IWL_DEVICE_9000,
170 .ht_params = &iwl9000_ht_params, 170 .ht_params = &iwl9000_ht_params,
171 .nvm_ver = IWL9000_NVM_VERSION, 171 .nvm_ver = IWL9000_NVM_VERSION,
@@ -176,7 +176,7 @@ const struct iwl_cfg iwl9260_2ac_cfg = {
176const struct iwl_cfg iwl9270_2ac_cfg = { 176const struct iwl_cfg iwl9270_2ac_cfg = {
177 .name = "Intel(R) Dual Band Wireless AC 9270", 177 .name = "Intel(R) Dual Band Wireless AC 9270",
178 .fw_name_pre = IWL9260A_FW_PRE, 178 .fw_name_pre = IWL9260A_FW_PRE,
179 .fw_name_pre_next_step = IWL9260B_FW_PRE, 179 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
180 IWL_DEVICE_9000, 180 IWL_DEVICE_9000,
181 .ht_params = &iwl9000_ht_params, 181 .ht_params = &iwl9000_ht_params,
182 .nvm_ver = IWL9000_NVM_VERSION, 182 .nvm_ver = IWL9000_NVM_VERSION,
@@ -186,8 +186,8 @@ const struct iwl_cfg iwl9270_2ac_cfg = {
186 186
187const struct iwl_cfg iwl9460_2ac_cfg = { 187const struct iwl_cfg iwl9460_2ac_cfg = {
188 .name = "Intel(R) Dual Band Wireless AC 9460", 188 .name = "Intel(R) Dual Band Wireless AC 9460",
189 .fw_name_pre = IWL9000_FW_PRE, 189 .fw_name_pre = IWL9260A_FW_PRE,
190 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 190 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
191 IWL_DEVICE_9000, 191 IWL_DEVICE_9000,
192 .ht_params = &iwl9000_ht_params, 192 .ht_params = &iwl9000_ht_params,
193 .nvm_ver = IWL9000_NVM_VERSION, 193 .nvm_ver = IWL9000_NVM_VERSION,
@@ -198,8 +198,8 @@ const struct iwl_cfg iwl9460_2ac_cfg = {
198 198
199const struct iwl_cfg iwl9560_2ac_cfg = { 199const struct iwl_cfg iwl9560_2ac_cfg = {
200 .name = "Intel(R) Dual Band Wireless AC 9560", 200 .name = "Intel(R) Dual Band Wireless AC 9560",
201 .fw_name_pre = IWL9000_FW_PRE, 201 .fw_name_pre = IWL9260A_FW_PRE,
202 .fw_name_pre_rf_next_step = IWL9000RFB_FW_PRE, 202 .fw_name_pre_b_or_c_step = IWL9260B_FW_PRE,
203 IWL_DEVICE_9000, 203 IWL_DEVICE_9000,
204 .ht_params = &iwl9000_ht_params, 204 .ht_params = &iwl9000_ht_params,
205 .nvm_ver = IWL9000_NVM_VERSION, 205 .nvm_ver = IWL9000_NVM_VERSION,
diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/tx.c b/drivers/net/wireless/intel/iwlwifi/dvm/tx.c
index adaa2f0097cc..fb40ddfced99 100644
--- a/drivers/net/wireless/intel/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/dvm/tx.c
@@ -1189,11 +1189,11 @@ void iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb)
1189 next_reclaimed; 1189 next_reclaimed;
1190 IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n", 1190 IWL_DEBUG_TX_REPLY(priv, "Next reclaimed packet:%d\n",
1191 next_reclaimed); 1191 next_reclaimed);
1192 iwlagn_check_ratid_empty(priv, sta_id, tid);
1192 } 1193 }
1193 1194
1194 iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs); 1195 iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);
1195 1196
1196 iwlagn_check_ratid_empty(priv, sta_id, tid);
1197 freed = 0; 1197 freed = 0;
1198 1198
1199 /* process frames */ 1199 /* process frames */
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/file.h b/drivers/net/wireless/intel/iwlwifi/fw/file.h
index 0fa8c473f1e2..c73a6438ce8f 100644
--- a/drivers/net/wireless/intel/iwlwifi/fw/file.h
+++ b/drivers/net/wireless/intel/iwlwifi/fw/file.h
@@ -328,6 +328,7 @@ typedef unsigned int __bitwise iwl_ucode_tlv_capa_t;
328 * @IWL_UCODE_TLV_CAPA_TX_POWER_ACK: reduced TX power API has larger 328 * @IWL_UCODE_TLV_CAPA_TX_POWER_ACK: reduced TX power API has larger
329 * command size (command version 4) that supports toggling ACK TX 329 * command size (command version 4) that supports toggling ACK TX
330 * power reduction. 330 * power reduction.
331 * @IWL_UCODE_TLV_CAPA_MLME_OFFLOAD: supports MLME offload
331 * 332 *
332 * @NUM_IWL_UCODE_TLV_CAPA: number of bits used 333 * @NUM_IWL_UCODE_TLV_CAPA: number of bits used
333 */ 334 */
@@ -373,6 +374,7 @@ enum iwl_ucode_tlv_capa {
373 IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG = (__force iwl_ucode_tlv_capa_t)80, 374 IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG = (__force iwl_ucode_tlv_capa_t)80,
374 IWL_UCODE_TLV_CAPA_LQM_SUPPORT = (__force iwl_ucode_tlv_capa_t)81, 375 IWL_UCODE_TLV_CAPA_LQM_SUPPORT = (__force iwl_ucode_tlv_capa_t)81,
375 IWL_UCODE_TLV_CAPA_TX_POWER_ACK = (__force iwl_ucode_tlv_capa_t)84, 376 IWL_UCODE_TLV_CAPA_TX_POWER_ACK = (__force iwl_ucode_tlv_capa_t)84,
377 IWL_UCODE_TLV_CAPA_MLME_OFFLOAD = (__force iwl_ucode_tlv_capa_t)96,
376 378
377 NUM_IWL_UCODE_TLV_CAPA 379 NUM_IWL_UCODE_TLV_CAPA
378#ifdef __CHECKER__ 380#ifdef __CHECKER__
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
index c52623cb7c2a..d19c74827fbb 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h
@@ -276,10 +276,10 @@ struct iwl_pwr_tx_backoff {
276 * @fw_name_pre: Firmware filename prefix. The api version and extension 276 * @fw_name_pre: Firmware filename prefix. The api version and extension
277 * (.ucode) will be added to filename before loading from disk. The 277 * (.ucode) will be added to filename before loading from disk. The
278 * filename is constructed as fw_name_pre<api>.ucode. 278 * filename is constructed as fw_name_pre<api>.ucode.
279 * @fw_name_pre_next_step: same as @fw_name_pre, only for next step 279 * @fw_name_pre_b_or_c_step: same as @fw_name_pre, only for b or c steps
280 * (if supported) 280 * (if supported)
281 * @fw_name_pre_rf_next_step: same as @fw_name_pre_next_step, only for rf next 281 * @fw_name_pre_rf_next_step: same as @fw_name_pre_b_or_c_step, only for rf
282 * step. Supported only in integrated solutions. 282 * next step. Supported only in integrated solutions.
283 * @ucode_api_max: Highest version of uCode API supported by driver. 283 * @ucode_api_max: Highest version of uCode API supported by driver.
284 * @ucode_api_min: Lowest version of uCode API supported by driver. 284 * @ucode_api_min: Lowest version of uCode API supported by driver.
285 * @max_inst_size: The maximal length of the fw inst section 285 * @max_inst_size: The maximal length of the fw inst section
@@ -330,7 +330,7 @@ struct iwl_cfg {
330 /* params specific to an individual device within a device family */ 330 /* params specific to an individual device within a device family */
331 const char *name; 331 const char *name;
332 const char *fw_name_pre; 332 const char *fw_name_pre;
333 const char *fw_name_pre_next_step; 333 const char *fw_name_pre_b_or_c_step;
334 const char *fw_name_pre_rf_next_step; 334 const char *fw_name_pre_rf_next_step;
335 /* params not likely to change within a device family */ 335 /* params not likely to change within a device family */
336 const struct iwl_base_params *base_params; 336 const struct iwl_base_params *base_params;
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h
index 545d14b0bc92..f5c1127253cb 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-devtrace.h
@@ -55,8 +55,8 @@ static inline bool iwl_trace_data(struct sk_buff *skb)
55 /* also account for the RFC 1042 header, of course */ 55 /* also account for the RFC 1042 header, of course */
56 offs += 6; 56 offs += 6;
57 57
58 return skb->len > offs + 2 && 58 return skb->len <= offs + 2 ||
59 *(__be16 *)(skb->data + offs) == cpu_to_be16(ETH_P_PAE); 59 *(__be16 *)(skb->data + offs) != cpu_to_be16(ETH_P_PAE);
60} 60}
61 61
62static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans, 62static inline size_t iwl_rx_trace_len(const struct iwl_trans *trans,
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
index 6fdb5921e17f..4e0f86fe0a6f 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c
@@ -216,8 +216,9 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first)
216 const char *fw_pre_name; 216 const char *fw_pre_name;
217 217
218 if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 && 218 if (drv->trans->cfg->device_family == IWL_DEVICE_FAMILY_9000 &&
219 CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_B_STEP) 219 (CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_B_STEP ||
220 fw_pre_name = cfg->fw_name_pre_next_step; 220 CSR_HW_REV_STEP(drv->trans->hw_rev) == SILICON_C_STEP))
221 fw_pre_name = cfg->fw_name_pre_b_or_c_step;
221 else if (drv->trans->cfg->integrated && 222 else if (drv->trans->cfg->integrated &&
222 CSR_HW_RFID_STEP(drv->trans->hw_rf_id) == SILICON_B_STEP && 223 CSR_HW_RFID_STEP(drv->trans->hw_rf_id) == SILICON_B_STEP &&
223 cfg->fw_name_pre_rf_next_step) 224 cfg->fw_name_pre_rf_next_step)
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
index 5c08f4d40f6a..3ee6767392b6 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c
@@ -785,7 +785,8 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
785 int num_of_ch, __le32 *channels, u16 fw_mcc) 785 int num_of_ch, __le32 *channels, u16 fw_mcc)
786{ 786{
787 int ch_idx; 787 int ch_idx;
788 u16 ch_flags, prev_ch_flags = 0; 788 u16 ch_flags;
789 u32 reg_rule_flags, prev_reg_rule_flags = 0;
789 const u8 *nvm_chan = cfg->ext_nvm ? 790 const u8 *nvm_chan = cfg->ext_nvm ?
790 iwl_ext_nvm_channels : iwl_nvm_channels; 791 iwl_ext_nvm_channels : iwl_nvm_channels;
791 struct ieee80211_regdomain *regd; 792 struct ieee80211_regdomain *regd;
@@ -834,8 +835,11 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
834 continue; 835 continue;
835 } 836 }
836 837
838 reg_rule_flags = iwl_nvm_get_regdom_bw_flags(nvm_chan, ch_idx,
839 ch_flags, cfg);
840
837 /* we can't continue the same rule */ 841 /* we can't continue the same rule */
838 if (ch_idx == 0 || prev_ch_flags != ch_flags || 842 if (ch_idx == 0 || prev_reg_rule_flags != reg_rule_flags ||
839 center_freq - prev_center_freq > 20) { 843 center_freq - prev_center_freq > 20) {
840 valid_rules++; 844 valid_rules++;
841 new_rule = true; 845 new_rule = true;
@@ -854,18 +858,17 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
854 rule->power_rule.max_eirp = 858 rule->power_rule.max_eirp =
855 DBM_TO_MBM(IWL_DEFAULT_MAX_TX_POWER); 859 DBM_TO_MBM(IWL_DEFAULT_MAX_TX_POWER);
856 860
857 rule->flags = iwl_nvm_get_regdom_bw_flags(nvm_chan, ch_idx, 861 rule->flags = reg_rule_flags;
858 ch_flags, cfg);
859 862
860 /* rely on auto-calculation to merge BW of contiguous chans */ 863 /* rely on auto-calculation to merge BW of contiguous chans */
861 rule->flags |= NL80211_RRF_AUTO_BW; 864 rule->flags |= NL80211_RRF_AUTO_BW;
862 rule->freq_range.max_bandwidth_khz = 0; 865 rule->freq_range.max_bandwidth_khz = 0;
863 866
864 prev_ch_flags = ch_flags;
865 prev_center_freq = center_freq; 867 prev_center_freq = center_freq;
868 prev_reg_rule_flags = reg_rule_flags;
866 869
867 IWL_DEBUG_DEV(dev, IWL_DL_LAR, 870 IWL_DEBUG_DEV(dev, IWL_DL_LAR,
868 "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x): Ad-Hoc %ssupported\n", 871 "Ch. %d [%sGHz] %s%s%s%s%s%s%s%s%s(0x%02x) reg_flags 0x%x: %s\n",
869 center_freq, 872 center_freq,
870 band == NL80211_BAND_5GHZ ? "5.2" : "2.4", 873 band == NL80211_BAND_5GHZ ? "5.2" : "2.4",
871 CHECK_AND_PRINT_I(VALID), 874 CHECK_AND_PRINT_I(VALID),
@@ -877,10 +880,10 @@ iwl_parse_nvm_mcc_info(struct device *dev, const struct iwl_cfg *cfg,
877 CHECK_AND_PRINT_I(160MHZ), 880 CHECK_AND_PRINT_I(160MHZ),
878 CHECK_AND_PRINT_I(INDOOR_ONLY), 881 CHECK_AND_PRINT_I(INDOOR_ONLY),
879 CHECK_AND_PRINT_I(GO_CONCURRENT), 882 CHECK_AND_PRINT_I(GO_CONCURRENT),
880 ch_flags, 883 ch_flags, reg_rule_flags,
881 ((ch_flags & NVM_CHANNEL_ACTIVE) && 884 ((ch_flags & NVM_CHANNEL_ACTIVE) &&
882 !(ch_flags & NVM_CHANNEL_RADAR)) 885 !(ch_flags & NVM_CHANNEL_RADAR))
883 ? "" : "not "); 886 ? "Ad-Hoc" : "");
884 } 887 }
885 888
886 regd->n_reg_rules = valid_rules; 889 regd->n_reg_rules = valid_rules;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
index 79e7a7a285dc..82863e9273eb 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c
@@ -1275,8 +1275,10 @@ static int iwl_mvm_sar_get_wgds_table(struct iwl_mvm *mvm)
1275 1275
1276 entry = &wifi_pkg->package.elements[idx++]; 1276 entry = &wifi_pkg->package.elements[idx++];
1277 if ((entry->type != ACPI_TYPE_INTEGER) || 1277 if ((entry->type != ACPI_TYPE_INTEGER) ||
1278 (entry->integer.value > U8_MAX)) 1278 (entry->integer.value > U8_MAX)) {
1279 return -EINVAL; 1279 ret = -EINVAL;
1280 goto out_free;
1281 }
1280 1282
1281 mvm->geo_profiles[i].values[j] = entry->integer.value; 1283 mvm->geo_profiles[i].values[j] = entry->integer.value;
1282 } 1284 }
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
index bcde1ba0f1c8..ce901be5fba8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -1084,7 +1084,13 @@ int __iwl_mvm_mac_start(struct iwl_mvm *mvm)
1084 1084
1085 lockdep_assert_held(&mvm->mutex); 1085 lockdep_assert_held(&mvm->mutex);
1086 1086
1087 if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { 1087 if (test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status)) {
1088 /*
1089 * Now convert the HW_RESTART_REQUESTED flag to IN_HW_RESTART
1090 * so later code will - from now on - see that we're doing it.
1091 */
1092 set_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
1093 clear_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status);
1088 /* Clean up some internal and mac80211 state on restart */ 1094 /* Clean up some internal and mac80211 state on restart */
1089 iwl_mvm_restart_cleanup(mvm); 1095 iwl_mvm_restart_cleanup(mvm);
1090 } else { 1096 } else {
@@ -2591,8 +2597,18 @@ static void iwl_mvm_purge_deferred_tx_frames(struct iwl_mvm *mvm,
2591 spin_lock_bh(&mvm_sta->lock); 2597 spin_lock_bh(&mvm_sta->lock);
2592 for (i = 0; i <= IWL_MAX_TID_COUNT; i++) { 2598 for (i = 0; i <= IWL_MAX_TID_COUNT; i++) {
2593 tid_data = &mvm_sta->tid_data[i]; 2599 tid_data = &mvm_sta->tid_data[i];
2594 while ((skb = __skb_dequeue(&tid_data->deferred_tx_frames))) 2600
2601 while ((skb = __skb_dequeue(&tid_data->deferred_tx_frames))) {
2602 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
2603
2604 /*
2605 * The first deferred frame should've stopped the MAC
2606 * queues, so we should never get a second deferred
2607 * frame for the RA/TID.
2608 */
2609 iwl_mvm_start_mac_queues(mvm, info->hw_queue);
2595 ieee80211_free_txskb(mvm->hw, skb); 2610 ieee80211_free_txskb(mvm->hw, skb);
2611 }
2596 } 2612 }
2597 spin_unlock_bh(&mvm_sta->lock); 2613 spin_unlock_bh(&mvm_sta->lock);
2598} 2614}
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
index eaacfaf37206..ddd8719f27b8 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
@@ -1090,6 +1090,7 @@ struct iwl_mvm {
1090 * @IWL_MVM_STATUS_HW_RFKILL: HW RF-kill is asserted 1090 * @IWL_MVM_STATUS_HW_RFKILL: HW RF-kill is asserted
1091 * @IWL_MVM_STATUS_HW_CTKILL: CT-kill is active 1091 * @IWL_MVM_STATUS_HW_CTKILL: CT-kill is active
1092 * @IWL_MVM_STATUS_ROC_RUNNING: remain-on-channel is running 1092 * @IWL_MVM_STATUS_ROC_RUNNING: remain-on-channel is running
1093 * @IWL_MVM_STATUS_HW_RESTART_REQUESTED: HW restart was requested
1093 * @IWL_MVM_STATUS_IN_HW_RESTART: HW restart is active 1094 * @IWL_MVM_STATUS_IN_HW_RESTART: HW restart is active
1094 * @IWL_MVM_STATUS_IN_D0I3: NIC is in D0i3 1095 * @IWL_MVM_STATUS_IN_D0I3: NIC is in D0i3
1095 * @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running 1096 * @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running
@@ -1101,6 +1102,7 @@ enum iwl_mvm_status {
1101 IWL_MVM_STATUS_HW_RFKILL, 1102 IWL_MVM_STATUS_HW_RFKILL,
1102 IWL_MVM_STATUS_HW_CTKILL, 1103 IWL_MVM_STATUS_HW_CTKILL,
1103 IWL_MVM_STATUS_ROC_RUNNING, 1104 IWL_MVM_STATUS_ROC_RUNNING,
1105 IWL_MVM_STATUS_HW_RESTART_REQUESTED,
1104 IWL_MVM_STATUS_IN_HW_RESTART, 1106 IWL_MVM_STATUS_IN_HW_RESTART,
1105 IWL_MVM_STATUS_IN_D0I3, 1107 IWL_MVM_STATUS_IN_D0I3,
1106 IWL_MVM_STATUS_ROC_AUX_RUNNING, 1108 IWL_MVM_STATUS_ROC_AUX_RUNNING,
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index 4d1188b8736a..9c175d5e9d67 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -1235,9 +1235,8 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
1235 */ 1235 */
1236 if (!mvm->fw_restart && fw_error) { 1236 if (!mvm->fw_restart && fw_error) {
1237 iwl_mvm_fw_dbg_collect_desc(mvm, &iwl_mvm_dump_desc_assert, 1237 iwl_mvm_fw_dbg_collect_desc(mvm, &iwl_mvm_dump_desc_assert,
1238 NULL); 1238 NULL);
1239 } else if (test_and_set_bit(IWL_MVM_STATUS_IN_HW_RESTART, 1239 } else if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) {
1240 &mvm->status)) {
1241 struct iwl_mvm_reprobe *reprobe; 1240 struct iwl_mvm_reprobe *reprobe;
1242 1241
1243 IWL_ERR(mvm, 1242 IWL_ERR(mvm,
@@ -1268,6 +1267,7 @@ void iwl_mvm_nic_restart(struct iwl_mvm *mvm, bool fw_error)
1268 1267
1269 if (fw_error && mvm->fw_restart > 0) 1268 if (fw_error && mvm->fw_restart > 0)
1270 mvm->fw_restart--; 1269 mvm->fw_restart--;
1270 set_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status);
1271 ieee80211_restart_hw(mvm->hw); 1271 ieee80211_restart_hw(mvm->hw);
1272 } 1272 }
1273} 1273}
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
index 65beca3a457a..8999a1199d60 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c
@@ -1291,7 +1291,7 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
1291 * first index into rate scale table. 1291 * first index into rate scale table.
1292 */ 1292 */
1293 if (info->flags & IEEE80211_TX_STAT_AMPDU) { 1293 if (info->flags & IEEE80211_TX_STAT_AMPDU) {
1294 rs_collect_tpc_data(mvm, lq_sta, curr_tbl, lq_rate.index, 1294 rs_collect_tpc_data(mvm, lq_sta, curr_tbl, tx_resp_rate.index,
1295 info->status.ampdu_len, 1295 info->status.ampdu_len,
1296 info->status.ampdu_ack_len, 1296 info->status.ampdu_ack_len,
1297 reduced_txp); 1297 reduced_txp);
@@ -1312,7 +1312,7 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
1312 if (info->status.ampdu_ack_len == 0) 1312 if (info->status.ampdu_ack_len == 0)
1313 info->status.ampdu_len = 1; 1313 info->status.ampdu_len = 1;
1314 1314
1315 rs_collect_tlc_data(mvm, lq_sta, curr_tbl, lq_rate.index, 1315 rs_collect_tlc_data(mvm, lq_sta, curr_tbl, tx_resp_rate.index,
1316 info->status.ampdu_len, 1316 info->status.ampdu_len,
1317 info->status.ampdu_ack_len); 1317 info->status.ampdu_ack_len);
1318 1318
@@ -1348,11 +1348,11 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
1348 continue; 1348 continue;
1349 1349
1350 rs_collect_tpc_data(mvm, lq_sta, tmp_tbl, 1350 rs_collect_tpc_data(mvm, lq_sta, tmp_tbl,
1351 lq_rate.index, 1, 1351 tx_resp_rate.index, 1,
1352 i < retries ? 0 : legacy_success, 1352 i < retries ? 0 : legacy_success,
1353 reduced_txp); 1353 reduced_txp);
1354 rs_collect_tlc_data(mvm, lq_sta, tmp_tbl, 1354 rs_collect_tlc_data(mvm, lq_sta, tmp_tbl,
1355 lq_rate.index, 1, 1355 tx_resp_rate.index, 1,
1356 i < retries ? 0 : legacy_success); 1356 i < retries ? 0 : legacy_success);
1357 } 1357 }
1358 1358
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
index f3e608196369..71c8b800ffa9 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
@@ -636,9 +636,9 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
636 636
637 baid_data = rcu_dereference(mvm->baid_map[baid]); 637 baid_data = rcu_dereference(mvm->baid_map[baid]);
638 if (!baid_data) { 638 if (!baid_data) {
639 WARN(!(reorder & IWL_RX_MPDU_REORDER_BA_OLD_SN), 639 IWL_DEBUG_RX(mvm,
640 "Received baid %d, but no data exists for this BAID\n", 640 "Got valid BAID but no baid allocated, bypass the re-ordering buffer. Baid %d reorder 0x%x\n",
641 baid); 641 baid, reorder);
642 return false; 642 return false;
643 } 643 }
644 644
@@ -759,7 +759,9 @@ static void iwl_mvm_agg_rx_received(struct iwl_mvm *mvm,
759 759
760 data = rcu_dereference(mvm->baid_map[baid]); 760 data = rcu_dereference(mvm->baid_map[baid]);
761 if (!data) { 761 if (!data) {
762 WARN_ON(!(reorder_data & IWL_RX_MPDU_REORDER_BA_OLD_SN)); 762 IWL_DEBUG_RX(mvm,
763 "Got valid BAID but no baid allocated, bypass the re-ordering buffer. Baid %d reorder 0x%x\n",
764 baid, reorder_data);
763 goto out; 765 goto out;
764 } 766 }
765 767
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 4df5f13fcdae..027ee5e72172 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -121,7 +121,8 @@ int iwl_mvm_sta_send_to_fw(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
121 .mac_id_n_color = cpu_to_le32(mvm_sta->mac_id_n_color), 121 .mac_id_n_color = cpu_to_le32(mvm_sta->mac_id_n_color),
122 .add_modify = update ? 1 : 0, 122 .add_modify = update ? 1 : 0,
123 .station_flags_msk = cpu_to_le32(STA_FLG_FAT_EN_MSK | 123 .station_flags_msk = cpu_to_le32(STA_FLG_FAT_EN_MSK |
124 STA_FLG_MIMO_EN_MSK), 124 STA_FLG_MIMO_EN_MSK |
125 STA_FLG_RTS_MIMO_PROT),
125 .tid_disable_tx = cpu_to_le16(mvm_sta->tid_disable_agg), 126 .tid_disable_tx = cpu_to_le16(mvm_sta->tid_disable_agg),
126 }; 127 };
127 int ret; 128 int ret;
@@ -277,9 +278,21 @@ static void iwl_mvm_rx_agg_session_expired(unsigned long data)
277 278
278 /* Timer expired */ 279 /* Timer expired */
279 sta = rcu_dereference(ba_data->mvm->fw_id_to_mac_id[ba_data->sta_id]); 280 sta = rcu_dereference(ba_data->mvm->fw_id_to_mac_id[ba_data->sta_id]);
281
282 /*
283 * sta should be valid unless the following happens:
284 * The firmware asserts which triggers a reconfig flow, but
285 * the reconfig fails before we set the pointer to sta into
286 * the fw_id_to_mac_id pointer table. Mac80211 can't stop
287 * A-MDPU and hence the timer continues to run. Then, the
288 * timer expires and sta is NULL.
289 */
290 if (!sta)
291 goto unlock;
292
280 mvm_sta = iwl_mvm_sta_from_mac80211(sta); 293 mvm_sta = iwl_mvm_sta_from_mac80211(sta);
281 ieee80211_stop_rx_ba_session_offl(mvm_sta->vif, 294 ieee80211_rx_ba_timer_expired(mvm_sta->vif,
282 sta->addr, ba_data->tid); 295 sta->addr, ba_data->tid);
283unlock: 296unlock:
284 rcu_read_unlock(); 297 rcu_read_unlock();
285} 298}
@@ -2015,7 +2028,8 @@ int iwl_mvm_send_add_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
2015 IWL_MAX_TID_COUNT, 2028 IWL_MAX_TID_COUNT,
2016 wdg_timeout); 2029 wdg_timeout);
2017 2030
2018 if (vif->type == NL80211_IFTYPE_AP) 2031 if (vif->type == NL80211_IFTYPE_AP ||
2032 vif->type == NL80211_IFTYPE_ADHOC)
2019 mvm->probe_queue = queue; 2033 mvm->probe_queue = queue;
2020 else if (vif->type == NL80211_IFTYPE_P2P_DEVICE) 2034 else if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
2021 mvm->p2p_dev_queue = queue; 2035 mvm->p2p_dev_queue = queue;
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 60360ed73f26..5fcc9dd6be56 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -185,8 +185,14 @@ static u16 iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb,
185 else 185 else
186 udp_hdr(skb)->check = 0; 186 udp_hdr(skb)->check = 0;
187 187
188 /* mac header len should include IV, size is in words */ 188 /*
189 if (info->control.hw_key) 189 * mac header len should include IV, size is in words unless
190 * the IV is added by the firmware like in WEP.
191 * In new Tx API, the IV is always added by the firmware.
192 */
193 if (!iwl_mvm_has_new_tx_api(mvm) && info->control.hw_key &&
194 info->control.hw_key->cipher != WLAN_CIPHER_SUITE_WEP40 &&
195 info->control.hw_key->cipher != WLAN_CIPHER_SUITE_WEP104)
190 mh_len += info->control.hw_key->iv_len; 196 mh_len += info->control.hw_key->iv_len;
191 mh_len /= 2; 197 mh_len /= 2;
192 offload_assist |= mh_len << TX_CMD_OFFLD_MH_SIZE; 198 offload_assist |= mh_len << TX_CMD_OFFLD_MH_SIZE;
@@ -1815,6 +1821,8 @@ void iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
1815 struct iwl_mvm_tid_data *tid_data; 1821 struct iwl_mvm_tid_data *tid_data;
1816 struct iwl_mvm_sta *mvmsta; 1822 struct iwl_mvm_sta *mvmsta;
1817 1823
1824 ba_info.flags = IEEE80211_TX_STAT_AMPDU;
1825
1818 if (iwl_mvm_has_new_tx_api(mvm)) { 1826 if (iwl_mvm_has_new_tx_api(mvm)) {
1819 struct iwl_mvm_compressed_ba_notif *ba_res = 1827 struct iwl_mvm_compressed_ba_notif *ba_res =
1820 (void *)pkt->data; 1828 (void *)pkt->data;
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index f16c1bb9bf94..84f4ba01e14f 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -510,9 +510,17 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
510 510
511/* 9000 Series */ 511/* 9000 Series */
512 {IWL_PCI_DEVICE(0x271B, 0x0010, iwl9160_2ac_cfg)}, 512 {IWL_PCI_DEVICE(0x271B, 0x0010, iwl9160_2ac_cfg)},
513 {IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)},
514 {IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)},
513 {IWL_PCI_DEVICE(0x2526, 0x0000, iwl9260_2ac_cfg)}, 515 {IWL_PCI_DEVICE(0x2526, 0x0000, iwl9260_2ac_cfg)},
514 {IWL_PCI_DEVICE(0x2526, 0x0010, iwl9260_2ac_cfg)}, 516 {IWL_PCI_DEVICE(0x2526, 0x0010, iwl9260_2ac_cfg)},
517 {IWL_PCI_DEVICE(0x2526, 0x0014, iwl9260_2ac_cfg)},
518 {IWL_PCI_DEVICE(0x2526, 0xA014, iwl9260_2ac_cfg)},
519 {IWL_PCI_DEVICE(0x2526, 0x4010, iwl9260_2ac_cfg)},
520 {IWL_PCI_DEVICE(0x2526, 0x0210, iwl9260_2ac_cfg)},
521 {IWL_PCI_DEVICE(0x2526, 0x0214, iwl9260_2ac_cfg)},
515 {IWL_PCI_DEVICE(0x2526, 0x1410, iwl9270_2ac_cfg)}, 522 {IWL_PCI_DEVICE(0x2526, 0x1410, iwl9270_2ac_cfg)},
523 {IWL_PCI_DEVICE(0x2526, 0x1610, iwl9270_2ac_cfg)},
516 {IWL_PCI_DEVICE(0x9DF0, 0x0A10, iwl9460_2ac_cfg)}, 524 {IWL_PCI_DEVICE(0x9DF0, 0x0A10, iwl9460_2ac_cfg)},
517 {IWL_PCI_DEVICE(0x9DF0, 0x0010, iwl9460_2ac_cfg)}, 525 {IWL_PCI_DEVICE(0x9DF0, 0x0010, iwl9460_2ac_cfg)},
518 {IWL_PCI_DEVICE(0x9DF0, 0x0210, iwl9460_2ac_cfg)}, 526 {IWL_PCI_DEVICE(0x9DF0, 0x0210, iwl9460_2ac_cfg)},
@@ -527,10 +535,22 @@ static const struct pci_device_id iwl_hw_card_ids[] = {
527 {IWL_PCI_DEVICE(0x9DF0, 0x2A10, iwl9460_2ac_cfg)}, 535 {IWL_PCI_DEVICE(0x9DF0, 0x2A10, iwl9460_2ac_cfg)},
528 {IWL_PCI_DEVICE(0x30DC, 0x0060, iwl9460_2ac_cfg)}, 536 {IWL_PCI_DEVICE(0x30DC, 0x0060, iwl9460_2ac_cfg)},
529 {IWL_PCI_DEVICE(0x2526, 0x0060, iwl9460_2ac_cfg)}, 537 {IWL_PCI_DEVICE(0x2526, 0x0060, iwl9460_2ac_cfg)},
538 {IWL_PCI_DEVICE(0x2526, 0x0260, iwl9460_2ac_cfg)},
539 {IWL_PCI_DEVICE(0x2526, 0x0064, iwl9460_2ac_cfg)},
540 {IWL_PCI_DEVICE(0x2526, 0x00A4, iwl9460_2ac_cfg)},
541 {IWL_PCI_DEVICE(0x2526, 0x40A4, iwl9460_2ac_cfg)},
542 {IWL_PCI_DEVICE(0x2526, 0x02A4, iwl9460_2ac_cfg)},
543 {IWL_PCI_DEVICE(0x2526, 0x00A0, iwl9460_2ac_cfg)},
544 {IWL_PCI_DEVICE(0x2526, 0x02A0, iwl9460_2ac_cfg)},
530 {IWL_PCI_DEVICE(0x9DF0, 0x0060, iwl9460_2ac_cfg)}, 545 {IWL_PCI_DEVICE(0x9DF0, 0x0060, iwl9460_2ac_cfg)},
531 {IWL_PCI_DEVICE(0xA370, 0x0060, iwl9460_2ac_cfg)}, 546 {IWL_PCI_DEVICE(0xA370, 0x0060, iwl9460_2ac_cfg)},
532 {IWL_PCI_DEVICE(0x31DC, 0x0060, iwl9460_2ac_cfg)}, 547 {IWL_PCI_DEVICE(0x31DC, 0x0060, iwl9460_2ac_cfg)},
533 {IWL_PCI_DEVICE(0x2526, 0x0030, iwl9560_2ac_cfg)}, 548 {IWL_PCI_DEVICE(0x2526, 0x0030, iwl9560_2ac_cfg)},
549 {IWL_PCI_DEVICE(0x2526, 0x4030, iwl9560_2ac_cfg)},
550 {IWL_PCI_DEVICE(0x2526, 0x0230, iwl9560_2ac_cfg)},
551 {IWL_PCI_DEVICE(0x2526, 0x0234, iwl9560_2ac_cfg)},
552 {IWL_PCI_DEVICE(0x2526, 0x0238, iwl9560_2ac_cfg)},
553 {IWL_PCI_DEVICE(0x2526, 0x023C, iwl9560_2ac_cfg)},
534 {IWL_PCI_DEVICE(0x9DF0, 0x0030, iwl9560_2ac_cfg)}, 554 {IWL_PCI_DEVICE(0x9DF0, 0x0030, iwl9560_2ac_cfg)},
535 {IWL_PCI_DEVICE(0xA370, 0x0030, iwl9560_2ac_cfg)}, 555 {IWL_PCI_DEVICE(0xA370, 0x0030, iwl9560_2ac_cfg)},
536 {IWL_PCI_DEVICE(0x31DC, 0x0030, iwl9560_2ac_cfg)}, 556 {IWL_PCI_DEVICE(0x31DC, 0x0030, iwl9560_2ac_cfg)},
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index 92b3a55d0fbc..f95eec52508e 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -3150,7 +3150,8 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
3150 init_waitqueue_head(&trans_pcie->d0i3_waitq); 3150 init_waitqueue_head(&trans_pcie->d0i3_waitq);
3151 3151
3152 if (trans_pcie->msix_enabled) { 3152 if (trans_pcie->msix_enabled) {
3153 if (iwl_pcie_init_msix_handler(pdev, trans_pcie)) 3153 ret = iwl_pcie_init_msix_handler(pdev, trans_pcie);
3154 if (ret)
3154 goto out_no_pci; 3155 goto out_no_pci;
3155 } else { 3156 } else {
3156 ret = iwl_pcie_alloc_ict(trans); 3157 ret = iwl_pcie_alloc_ict(trans);
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
index de50418adae5..034bdb4a0b06 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c
@@ -298,6 +298,9 @@ void iwl_pcie_txq_check_wrptrs(struct iwl_trans *trans)
298 for (i = 0; i < trans->cfg->base_params->num_of_queues; i++) { 298 for (i = 0; i < trans->cfg->base_params->num_of_queues; i++) {
299 struct iwl_txq *txq = trans_pcie->txq[i]; 299 struct iwl_txq *txq = trans_pcie->txq[i];
300 300
301 if (!test_bit(i, trans_pcie->queue_used))
302 continue;
303
301 spin_lock_bh(&txq->lock); 304 spin_lock_bh(&txq->lock);
302 if (txq->need_update) { 305 if (txq->need_update) {
303 iwl_pcie_txq_inc_wr_ptr(trans, txq); 306 iwl_pcie_txq_inc_wr_ptr(trans, txq);
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
index 2a7ad5ffe997..cd5dc6dcb19f 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/hw.c
@@ -846,9 +846,6 @@ static bool _rtl8723be_init_mac(struct ieee80211_hw *hw)
846 return false; 846 return false;
847 } 847 }
848 848
849 if (rtlpriv->cfg->ops->get_btc_status())
850 rtlpriv->btcoexist.btc_ops->btc_power_on_setting(rtlpriv);
851
852 bytetmp = rtl_read_byte(rtlpriv, REG_MULTI_FUNC_CTRL); 849 bytetmp = rtl_read_byte(rtlpriv, REG_MULTI_FUNC_CTRL);
853 rtl_write_byte(rtlpriv, REG_MULTI_FUNC_CTRL, bytetmp | BIT(3)); 850 rtl_write_byte(rtlpriv, REG_MULTI_FUNC_CTRL, bytetmp | BIT(3));
854 851
diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/drivers/net/wireless/realtek/rtlwifi/wifi.h
index fb1ebb01133f..70723e67b7d7 100644
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
@@ -2547,7 +2547,6 @@ struct bt_coexist_info {
2547struct rtl_btc_ops { 2547struct rtl_btc_ops {
2548 void (*btc_init_variables) (struct rtl_priv *rtlpriv); 2548 void (*btc_init_variables) (struct rtl_priv *rtlpriv);
2549 void (*btc_init_hal_vars) (struct rtl_priv *rtlpriv); 2549 void (*btc_init_hal_vars) (struct rtl_priv *rtlpriv);
2550 void (*btc_power_on_setting)(struct rtl_priv *rtlpriv);
2551 void (*btc_init_hw_config) (struct rtl_priv *rtlpriv); 2550 void (*btc_init_hw_config) (struct rtl_priv *rtlpriv);
2552 void (*btc_ips_notify) (struct rtl_priv *rtlpriv, u8 type); 2551 void (*btc_ips_notify) (struct rtl_priv *rtlpriv, u8 type);
2553 void (*btc_lps_notify)(struct rtl_priv *rtlpriv, u8 type); 2552 void (*btc_lps_notify)(struct rtl_priv *rtlpriv, u8 type);
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
index 9a03c5871efe..f58d8e305323 100644
--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -924,10 +924,8 @@ out1:
924 ntb_free_mw(nt, i); 924 ntb_free_mw(nt, i);
925 925
926 /* if there's an actual failure, we should just bail */ 926 /* if there's an actual failure, we should just bail */
927 if (rc < 0) { 927 if (rc < 0)
928 ntb_link_disable(ndev);
929 return; 928 return;
930 }
931 929
932out: 930out:
933 if (ntb_link_is_up(ndev, NULL, NULL) == 1) 931 if (ntb_link_is_up(ndev, NULL, NULL) == 1)
@@ -1059,7 +1057,7 @@ static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev)
1059 int node; 1057 int node;
1060 int rc, i; 1058 int rc, i;
1061 1059
1062 mw_count = ntb_mw_count(ndev, PIDX); 1060 mw_count = ntb_peer_mw_count(ndev);
1063 1061
1064 if (!ndev->ops->mw_set_trans) { 1062 if (!ndev->ops->mw_set_trans) {
1065 dev_err(&ndev->dev, "Inbound MW based NTB API is required\n"); 1063 dev_err(&ndev->dev, "Inbound MW based NTB API is required\n");
diff --git a/drivers/ntb/test/ntb_tool.c b/drivers/ntb/test/ntb_tool.c
index f002bf48a08d..a69815c45ce6 100644
--- a/drivers/ntb/test/ntb_tool.c
+++ b/drivers/ntb/test/ntb_tool.c
@@ -959,7 +959,7 @@ static int tool_probe(struct ntb_client *self, struct ntb_dev *ntb)
959 tc->ntb = ntb; 959 tc->ntb = ntb;
960 init_waitqueue_head(&tc->link_wq); 960 init_waitqueue_head(&tc->link_wq);
961 961
962 tc->mw_count = min(ntb_mw_count(tc->ntb, PIDX), MAX_MWS); 962 tc->mw_count = min(ntb_peer_mw_count(tc->ntb), MAX_MWS);
963 for (i = 0; i < tc->mw_count; i++) { 963 for (i = 0; i < tc->mw_count; i++) {
964 rc = tool_init_mw(tc, i); 964 rc = tool_init_mw(tc, i);
965 if (rc) 965 if (rc)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index c49f1f8b2e57..37046ac2c441 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -336,7 +336,7 @@ static int nvme_get_stream_params(struct nvme_ctrl *ctrl,
336 336
337 c.directive.opcode = nvme_admin_directive_recv; 337 c.directive.opcode = nvme_admin_directive_recv;
338 c.directive.nsid = cpu_to_le32(nsid); 338 c.directive.nsid = cpu_to_le32(nsid);
339 c.directive.numd = cpu_to_le32(sizeof(*s)); 339 c.directive.numd = cpu_to_le32((sizeof(*s) >> 2) - 1);
340 c.directive.doper = NVME_DIR_RCV_ST_OP_PARAM; 340 c.directive.doper = NVME_DIR_RCV_ST_OP_PARAM;
341 c.directive.dtype = NVME_DIR_STREAMS; 341 c.directive.dtype = NVME_DIR_STREAMS;
342 342
@@ -1509,7 +1509,7 @@ static void nvme_set_queue_limits(struct nvme_ctrl *ctrl,
1509 blk_queue_write_cache(q, vwc, vwc); 1509 blk_queue_write_cache(q, vwc, vwc);
1510} 1510}
1511 1511
1512static void nvme_configure_apst(struct nvme_ctrl *ctrl) 1512static int nvme_configure_apst(struct nvme_ctrl *ctrl)
1513{ 1513{
1514 /* 1514 /*
1515 * APST (Autonomous Power State Transition) lets us program a 1515 * APST (Autonomous Power State Transition) lets us program a
@@ -1538,16 +1538,16 @@ static void nvme_configure_apst(struct nvme_ctrl *ctrl)
1538 * then don't do anything. 1538 * then don't do anything.
1539 */ 1539 */
1540 if (!ctrl->apsta) 1540 if (!ctrl->apsta)
1541 return; 1541 return 0;
1542 1542
1543 if (ctrl->npss > 31) { 1543 if (ctrl->npss > 31) {
1544 dev_warn(ctrl->device, "NPSS is invalid; not using APST\n"); 1544 dev_warn(ctrl->device, "NPSS is invalid; not using APST\n");
1545 return; 1545 return 0;
1546 } 1546 }
1547 1547
1548 table = kzalloc(sizeof(*table), GFP_KERNEL); 1548 table = kzalloc(sizeof(*table), GFP_KERNEL);
1549 if (!table) 1549 if (!table)
1550 return; 1550 return 0;
1551 1551
1552 if (!ctrl->apst_enabled || ctrl->ps_max_latency_us == 0) { 1552 if (!ctrl->apst_enabled || ctrl->ps_max_latency_us == 0) {
1553 /* Turn off APST. */ 1553 /* Turn off APST. */
@@ -1629,6 +1629,7 @@ static void nvme_configure_apst(struct nvme_ctrl *ctrl)
1629 dev_err(ctrl->device, "failed to set APST feature (%d)\n", ret); 1629 dev_err(ctrl->device, "failed to set APST feature (%d)\n", ret);
1630 1630
1631 kfree(table); 1631 kfree(table);
1632 return ret;
1632} 1633}
1633 1634
1634static void nvme_set_latency_tolerance(struct device *dev, s32 val) 1635static void nvme_set_latency_tolerance(struct device *dev, s32 val)
@@ -1835,13 +1836,16 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
1835 * In fabrics we need to verify the cntlid matches the 1836 * In fabrics we need to verify the cntlid matches the
1836 * admin connect 1837 * admin connect
1837 */ 1838 */
1838 if (ctrl->cntlid != le16_to_cpu(id->cntlid)) 1839 if (ctrl->cntlid != le16_to_cpu(id->cntlid)) {
1839 ret = -EINVAL; 1840 ret = -EINVAL;
1841 goto out_free;
1842 }
1840 1843
1841 if (!ctrl->opts->discovery_nqn && !ctrl->kas) { 1844 if (!ctrl->opts->discovery_nqn && !ctrl->kas) {
1842 dev_err(ctrl->device, 1845 dev_err(ctrl->device,
1843 "keep-alive support is mandatory for fabrics\n"); 1846 "keep-alive support is mandatory for fabrics\n");
1844 ret = -EINVAL; 1847 ret = -EINVAL;
1848 goto out_free;
1845 } 1849 }
1846 } else { 1850 } else {
1847 ctrl->cntlid = le16_to_cpu(id->cntlid); 1851 ctrl->cntlid = le16_to_cpu(id->cntlid);
@@ -1856,11 +1860,20 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
1856 else if (!ctrl->apst_enabled && prev_apst_enabled) 1860 else if (!ctrl->apst_enabled && prev_apst_enabled)
1857 dev_pm_qos_hide_latency_tolerance(ctrl->device); 1861 dev_pm_qos_hide_latency_tolerance(ctrl->device);
1858 1862
1859 nvme_configure_apst(ctrl); 1863 ret = nvme_configure_apst(ctrl);
1860 nvme_configure_directives(ctrl); 1864 if (ret < 0)
1865 return ret;
1866
1867 ret = nvme_configure_directives(ctrl);
1868 if (ret < 0)
1869 return ret;
1861 1870
1862 ctrl->identified = true; 1871 ctrl->identified = true;
1863 1872
1873 return 0;
1874
1875out_free:
1876 kfree(id);
1864 return ret; 1877 return ret;
1865} 1878}
1866EXPORT_SYMBOL_GPL(nvme_init_identify); 1879EXPORT_SYMBOL_GPL(nvme_init_identify);
@@ -2004,9 +2017,11 @@ static ssize_t wwid_show(struct device *dev, struct device_attribute *attr,
2004 if (memchr_inv(ns->eui, 0, sizeof(ns->eui))) 2017 if (memchr_inv(ns->eui, 0, sizeof(ns->eui)))
2005 return sprintf(buf, "eui.%8phN\n", ns->eui); 2018 return sprintf(buf, "eui.%8phN\n", ns->eui);
2006 2019
2007 while (ctrl->serial[serial_len - 1] == ' ') 2020 while (serial_len > 0 && (ctrl->serial[serial_len - 1] == ' ' ||
2021 ctrl->serial[serial_len - 1] == '\0'))
2008 serial_len--; 2022 serial_len--;
2009 while (ctrl->model[model_len - 1] == ' ') 2023 while (model_len > 0 && (ctrl->model[model_len - 1] == ' ' ||
2024 ctrl->model[model_len - 1] == '\0'))
2010 model_len--; 2025 model_len--;
2011 2026
2012 return sprintf(buf, "nvme.%04x-%*phN-%*phN-%08x\n", ctrl->vid, 2027 return sprintf(buf, "nvme.%04x-%*phN-%*phN-%08x\n", ctrl->vid,
diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c
index 2e582a240943..5f5cd306f76d 100644
--- a/drivers/nvme/host/fabrics.c
+++ b/drivers/nvme/host/fabrics.c
@@ -794,7 +794,8 @@ static int nvmf_check_allowed_opts(struct nvmf_ctrl_options *opts,
794 int i; 794 int i;
795 795
796 for (i = 0; i < ARRAY_SIZE(opt_tokens); i++) { 796 for (i = 0; i < ARRAY_SIZE(opt_tokens); i++) {
797 if (opt_tokens[i].token & ~allowed_opts) { 797 if ((opt_tokens[i].token & opts->mask) &&
798 (opt_tokens[i].token & ~allowed_opts)) {
798 pr_warn("invalid parameter '%s'\n", 799 pr_warn("invalid parameter '%s'\n",
799 opt_tokens[i].pattern); 800 opt_tokens[i].pattern);
800 } 801 }
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index cd888a47d0fc..925467b31a33 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -801,6 +801,7 @@ static inline void nvme_handle_cqe(struct nvme_queue *nvmeq,
801 return; 801 return;
802 } 802 }
803 803
804 nvmeq->cqe_seen = 1;
804 req = blk_mq_tag_to_rq(*nvmeq->tags, cqe->command_id); 805 req = blk_mq_tag_to_rq(*nvmeq->tags, cqe->command_id);
805 nvme_end_request(req, cqe->status, cqe->result); 806 nvme_end_request(req, cqe->status, cqe->result);
806} 807}
@@ -830,10 +831,8 @@ static void nvme_process_cq(struct nvme_queue *nvmeq)
830 consumed++; 831 consumed++;
831 } 832 }
832 833
833 if (consumed) { 834 if (consumed)
834 nvme_ring_cq_doorbell(nvmeq); 835 nvme_ring_cq_doorbell(nvmeq);
835 nvmeq->cqe_seen = 1;
836 }
837} 836}
838 837
839static irqreturn_t nvme_irq(int irq, void *data) 838static irqreturn_t nvme_irq(int irq, void *data)
@@ -1558,11 +1557,9 @@ static inline void nvme_release_cmb(struct nvme_dev *dev)
1558 if (dev->cmb) { 1557 if (dev->cmb) {
1559 iounmap(dev->cmb); 1558 iounmap(dev->cmb);
1560 dev->cmb = NULL; 1559 dev->cmb = NULL;
1561 if (dev->cmbsz) { 1560 sysfs_remove_file_from_group(&dev->ctrl.device->kobj,
1562 sysfs_remove_file_from_group(&dev->ctrl.device->kobj, 1561 &dev_attr_cmb.attr, NULL);
1563 &dev_attr_cmb.attr, NULL); 1562 dev->cmbsz = 0;
1564 dev->cmbsz = 0;
1565 }
1566 } 1563 }
1567} 1564}
1568 1565
@@ -1953,16 +1950,14 @@ static int nvme_pci_enable(struct nvme_dev *dev)
1953 1950
1954 /* 1951 /*
1955 * CMBs can currently only exist on >=1.2 PCIe devices. We only 1952 * CMBs can currently only exist on >=1.2 PCIe devices. We only
1956 * populate sysfs if a CMB is implemented. Note that we add the 1953 * populate sysfs if a CMB is implemented. Since nvme_dev_attrs_group
1957 * CMB attribute to the nvme_ctrl kobj which removes the need to remove 1954 * has no name we can pass NULL as final argument to
1958 * it on exit. Since nvme_dev_attrs_group has no name we can pass 1955 * sysfs_add_file_to_group.
1959 * NULL as final argument to sysfs_add_file_to_group.
1960 */ 1956 */
1961 1957
1962 if (readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 2, 0)) { 1958 if (readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 2, 0)) {
1963 dev->cmb = nvme_map_cmb(dev); 1959 dev->cmb = nvme_map_cmb(dev);
1964 1960 if (dev->cmb) {
1965 if (dev->cmbsz) {
1966 if (sysfs_add_file_to_group(&dev->ctrl.device->kobj, 1961 if (sysfs_add_file_to_group(&dev->ctrl.device->kobj,
1967 &dev_attr_cmb.attr, NULL)) 1962 &dev_attr_cmb.attr, NULL))
1968 dev_warn(dev->ctrl.device, 1963 dev_warn(dev->ctrl.device,
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 2d7a98ab53fb..a53bb6635b83 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -199,12 +199,6 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
199 copy_and_pad(id->mn, sizeof(id->mn), model, sizeof(model) - 1); 199 copy_and_pad(id->mn, sizeof(id->mn), model, sizeof(model) - 1);
200 copy_and_pad(id->fr, sizeof(id->fr), UTS_RELEASE, strlen(UTS_RELEASE)); 200 copy_and_pad(id->fr, sizeof(id->fr), UTS_RELEASE, strlen(UTS_RELEASE));
201 201
202 memset(id->mn, ' ', sizeof(id->mn));
203 strncpy((char *)id->mn, "Linux", sizeof(id->mn));
204
205 memset(id->fr, ' ', sizeof(id->fr));
206 strncpy((char *)id->fr, UTS_RELEASE, sizeof(id->fr));
207
208 id->rab = 6; 202 id->rab = 6;
209 203
210 /* 204 /*
diff --git a/drivers/nvme/target/fc.c b/drivers/nvme/target/fc.c
index 31ca55dfcb1d..309c84aa7595 100644
--- a/drivers/nvme/target/fc.c
+++ b/drivers/nvme/target/fc.c
@@ -114,6 +114,11 @@ struct nvmet_fc_tgtport {
114 struct kref ref; 114 struct kref ref;
115}; 115};
116 116
117struct nvmet_fc_defer_fcp_req {
118 struct list_head req_list;
119 struct nvmefc_tgt_fcp_req *fcp_req;
120};
121
117struct nvmet_fc_tgt_queue { 122struct nvmet_fc_tgt_queue {
118 bool ninetypercent; 123 bool ninetypercent;
119 u16 qid; 124 u16 qid;
@@ -132,6 +137,8 @@ struct nvmet_fc_tgt_queue {
132 struct nvmet_fc_tgt_assoc *assoc; 137 struct nvmet_fc_tgt_assoc *assoc;
133 struct nvmet_fc_fcp_iod *fod; /* array of fcp_iods */ 138 struct nvmet_fc_fcp_iod *fod; /* array of fcp_iods */
134 struct list_head fod_list; 139 struct list_head fod_list;
140 struct list_head pending_cmd_list;
141 struct list_head avail_defer_list;
135 struct workqueue_struct *work_q; 142 struct workqueue_struct *work_q;
136 struct kref ref; 143 struct kref ref;
137} __aligned(sizeof(unsigned long long)); 144} __aligned(sizeof(unsigned long long));
@@ -223,6 +230,8 @@ static void nvmet_fc_tgt_q_put(struct nvmet_fc_tgt_queue *queue);
223static int nvmet_fc_tgt_q_get(struct nvmet_fc_tgt_queue *queue); 230static int nvmet_fc_tgt_q_get(struct nvmet_fc_tgt_queue *queue);
224static void nvmet_fc_tgtport_put(struct nvmet_fc_tgtport *tgtport); 231static void nvmet_fc_tgtport_put(struct nvmet_fc_tgtport *tgtport);
225static int nvmet_fc_tgtport_get(struct nvmet_fc_tgtport *tgtport); 232static int nvmet_fc_tgtport_get(struct nvmet_fc_tgtport *tgtport);
233static void nvmet_fc_handle_fcp_rqst(struct nvmet_fc_tgtport *tgtport,
234 struct nvmet_fc_fcp_iod *fod);
226 235
227 236
228/* *********************** FC-NVME DMA Handling **************************** */ 237/* *********************** FC-NVME DMA Handling **************************** */
@@ -385,7 +394,7 @@ nvmet_fc_free_ls_iodlist(struct nvmet_fc_tgtport *tgtport)
385static struct nvmet_fc_ls_iod * 394static struct nvmet_fc_ls_iod *
386nvmet_fc_alloc_ls_iod(struct nvmet_fc_tgtport *tgtport) 395nvmet_fc_alloc_ls_iod(struct nvmet_fc_tgtport *tgtport)
387{ 396{
388 static struct nvmet_fc_ls_iod *iod; 397 struct nvmet_fc_ls_iod *iod;
389 unsigned long flags; 398 unsigned long flags;
390 399
391 spin_lock_irqsave(&tgtport->lock, flags); 400 spin_lock_irqsave(&tgtport->lock, flags);
@@ -462,10 +471,10 @@ nvmet_fc_destroy_fcp_iodlist(struct nvmet_fc_tgtport *tgtport,
462static struct nvmet_fc_fcp_iod * 471static struct nvmet_fc_fcp_iod *
463nvmet_fc_alloc_fcp_iod(struct nvmet_fc_tgt_queue *queue) 472nvmet_fc_alloc_fcp_iod(struct nvmet_fc_tgt_queue *queue)
464{ 473{
465 static struct nvmet_fc_fcp_iod *fod; 474 struct nvmet_fc_fcp_iod *fod;
466 unsigned long flags; 475
476 lockdep_assert_held(&queue->qlock);
467 477
468 spin_lock_irqsave(&queue->qlock, flags);
469 fod = list_first_entry_or_null(&queue->fod_list, 478 fod = list_first_entry_or_null(&queue->fod_list,
470 struct nvmet_fc_fcp_iod, fcp_list); 479 struct nvmet_fc_fcp_iod, fcp_list);
471 if (fod) { 480 if (fod) {
@@ -477,17 +486,37 @@ nvmet_fc_alloc_fcp_iod(struct nvmet_fc_tgt_queue *queue)
477 * will "inherit" that reference. 486 * will "inherit" that reference.
478 */ 487 */
479 } 488 }
480 spin_unlock_irqrestore(&queue->qlock, flags);
481 return fod; 489 return fod;
482} 490}
483 491
484 492
485static void 493static void
494nvmet_fc_queue_fcp_req(struct nvmet_fc_tgtport *tgtport,
495 struct nvmet_fc_tgt_queue *queue,
496 struct nvmefc_tgt_fcp_req *fcpreq)
497{
498 struct nvmet_fc_fcp_iod *fod = fcpreq->nvmet_fc_private;
499
500 /*
501 * put all admin cmds on hw queue id 0. All io commands go to
502 * the respective hw queue based on a modulo basis
503 */
504 fcpreq->hwqid = queue->qid ?
505 ((queue->qid - 1) % tgtport->ops->max_hw_queues) : 0;
506
507 if (tgtport->ops->target_features & NVMET_FCTGTFEAT_CMD_IN_ISR)
508 queue_work_on(queue->cpu, queue->work_q, &fod->work);
509 else
510 nvmet_fc_handle_fcp_rqst(tgtport, fod);
511}
512
513static void
486nvmet_fc_free_fcp_iod(struct nvmet_fc_tgt_queue *queue, 514nvmet_fc_free_fcp_iod(struct nvmet_fc_tgt_queue *queue,
487 struct nvmet_fc_fcp_iod *fod) 515 struct nvmet_fc_fcp_iod *fod)
488{ 516{
489 struct nvmefc_tgt_fcp_req *fcpreq = fod->fcpreq; 517 struct nvmefc_tgt_fcp_req *fcpreq = fod->fcpreq;
490 struct nvmet_fc_tgtport *tgtport = fod->tgtport; 518 struct nvmet_fc_tgtport *tgtport = fod->tgtport;
519 struct nvmet_fc_defer_fcp_req *deferfcp;
491 unsigned long flags; 520 unsigned long flags;
492 521
493 fc_dma_sync_single_for_cpu(tgtport->dev, fod->rspdma, 522 fc_dma_sync_single_for_cpu(tgtport->dev, fod->rspdma,
@@ -495,21 +524,56 @@ nvmet_fc_free_fcp_iod(struct nvmet_fc_tgt_queue *queue,
495 524
496 fcpreq->nvmet_fc_private = NULL; 525 fcpreq->nvmet_fc_private = NULL;
497 526
498 spin_lock_irqsave(&queue->qlock, flags);
499 list_add_tail(&fod->fcp_list, &fod->queue->fod_list);
500 fod->active = false; 527 fod->active = false;
501 fod->abort = false; 528 fod->abort = false;
502 fod->aborted = false; 529 fod->aborted = false;
503 fod->writedataactive = false; 530 fod->writedataactive = false;
504 fod->fcpreq = NULL; 531 fod->fcpreq = NULL;
532
533 tgtport->ops->fcp_req_release(&tgtport->fc_target_port, fcpreq);
534
535 spin_lock_irqsave(&queue->qlock, flags);
536 deferfcp = list_first_entry_or_null(&queue->pending_cmd_list,
537 struct nvmet_fc_defer_fcp_req, req_list);
538 if (!deferfcp) {
539 list_add_tail(&fod->fcp_list, &fod->queue->fod_list);
540 spin_unlock_irqrestore(&queue->qlock, flags);
541
542 /* Release reference taken at queue lookup and fod allocation */
543 nvmet_fc_tgt_q_put(queue);
544 return;
545 }
546
547 /* Re-use the fod for the next pending cmd that was deferred */
548 list_del(&deferfcp->req_list);
549
550 fcpreq = deferfcp->fcp_req;
551
552 /* deferfcp can be reused for another IO at a later date */
553 list_add_tail(&deferfcp->req_list, &queue->avail_defer_list);
554
505 spin_unlock_irqrestore(&queue->qlock, flags); 555 spin_unlock_irqrestore(&queue->qlock, flags);
506 556
557 /* Save NVME CMD IO in fod */
558 memcpy(&fod->cmdiubuf, fcpreq->rspaddr, fcpreq->rsplen);
559
560 /* Setup new fcpreq to be processed */
561 fcpreq->rspaddr = NULL;
562 fcpreq->rsplen = 0;
563 fcpreq->nvmet_fc_private = fod;
564 fod->fcpreq = fcpreq;
565 fod->active = true;
566
567 /* inform LLDD IO is now being processed */
568 tgtport->ops->defer_rcv(&tgtport->fc_target_port, fcpreq);
569
570 /* Submit deferred IO for processing */
571 nvmet_fc_queue_fcp_req(tgtport, queue, fcpreq);
572
507 /* 573 /*
508 * release the reference taken at queue lookup and fod allocation 574 * Leave the queue lookup get reference taken when
575 * fod was originally allocated.
509 */ 576 */
510 nvmet_fc_tgt_q_put(queue);
511
512 tgtport->ops->fcp_req_release(&tgtport->fc_target_port, fcpreq);
513} 577}
514 578
515static int 579static int
@@ -569,6 +633,8 @@ nvmet_fc_alloc_target_queue(struct nvmet_fc_tgt_assoc *assoc,
569 queue->port = assoc->tgtport->port; 633 queue->port = assoc->tgtport->port;
570 queue->cpu = nvmet_fc_queue_to_cpu(assoc->tgtport, qid); 634 queue->cpu = nvmet_fc_queue_to_cpu(assoc->tgtport, qid);
571 INIT_LIST_HEAD(&queue->fod_list); 635 INIT_LIST_HEAD(&queue->fod_list);
636 INIT_LIST_HEAD(&queue->avail_defer_list);
637 INIT_LIST_HEAD(&queue->pending_cmd_list);
572 atomic_set(&queue->connected, 0); 638 atomic_set(&queue->connected, 0);
573 atomic_set(&queue->sqtail, 0); 639 atomic_set(&queue->sqtail, 0);
574 atomic_set(&queue->rsn, 1); 640 atomic_set(&queue->rsn, 1);
@@ -638,6 +704,7 @@ nvmet_fc_delete_target_queue(struct nvmet_fc_tgt_queue *queue)
638{ 704{
639 struct nvmet_fc_tgtport *tgtport = queue->assoc->tgtport; 705 struct nvmet_fc_tgtport *tgtport = queue->assoc->tgtport;
640 struct nvmet_fc_fcp_iod *fod = queue->fod; 706 struct nvmet_fc_fcp_iod *fod = queue->fod;
707 struct nvmet_fc_defer_fcp_req *deferfcp, *tempptr;
641 unsigned long flags; 708 unsigned long flags;
642 int i, writedataactive; 709 int i, writedataactive;
643 bool disconnect; 710 bool disconnect;
@@ -666,6 +733,36 @@ nvmet_fc_delete_target_queue(struct nvmet_fc_tgt_queue *queue)
666 } 733 }
667 } 734 }
668 } 735 }
736
737 /* Cleanup defer'ed IOs in queue */
738 list_for_each_entry_safe(deferfcp, tempptr, &queue->avail_defer_list,
739 req_list) {
740 list_del(&deferfcp->req_list);
741 kfree(deferfcp);
742 }
743
744 for (;;) {
745 deferfcp = list_first_entry_or_null(&queue->pending_cmd_list,
746 struct nvmet_fc_defer_fcp_req, req_list);
747 if (!deferfcp)
748 break;
749
750 list_del(&deferfcp->req_list);
751 spin_unlock_irqrestore(&queue->qlock, flags);
752
753 tgtport->ops->defer_rcv(&tgtport->fc_target_port,
754 deferfcp->fcp_req);
755
756 tgtport->ops->fcp_abort(&tgtport->fc_target_port,
757 deferfcp->fcp_req);
758
759 tgtport->ops->fcp_req_release(&tgtport->fc_target_port,
760 deferfcp->fcp_req);
761
762 kfree(deferfcp);
763
764 spin_lock_irqsave(&queue->qlock, flags);
765 }
669 spin_unlock_irqrestore(&queue->qlock, flags); 766 spin_unlock_irqrestore(&queue->qlock, flags);
670 767
671 flush_workqueue(queue->work_q); 768 flush_workqueue(queue->work_q);
@@ -2172,11 +2269,38 @@ nvmet_fc_handle_fcp_rqst_work(struct work_struct *work)
2172 * Pass a FC-NVME FCP CMD IU received from the FC link to the nvmet-fc 2269 * Pass a FC-NVME FCP CMD IU received from the FC link to the nvmet-fc
2173 * layer for processing. 2270 * layer for processing.
2174 * 2271 *
2175 * The nvmet-fc layer will copy cmd payload to an internal structure for 2272 * The nvmet_fc layer allocates a local job structure (struct
2176 * processing. As such, upon completion of the routine, the LLDD may 2273 * nvmet_fc_fcp_iod) from the queue for the io and copies the
2177 * immediately free/reuse the CMD IU buffer passed in the call. 2274 * CMD IU buffer to the job structure. As such, on a successful
2275 * completion (returns 0), the LLDD may immediately free/reuse
2276 * the CMD IU buffer passed in the call.
2178 * 2277 *
2179 * If this routine returns error, the lldd should abort the exchange. 2278 * However, in some circumstances, due to the packetized nature of FC
2279 * and the api of the FC LLDD which may issue a hw command to send the
2280 * response, but the LLDD may not get the hw completion for that command
2281 * and upcall the nvmet_fc layer before a new command may be
2282 * asynchronously received - its possible for a command to be received
2283 * before the LLDD and nvmet_fc have recycled the job structure. It gives
2284 * the appearance of more commands received than fits in the sq.
2285 * To alleviate this scenario, a temporary queue is maintained in the
2286 * transport for pending LLDD requests waiting for a queue job structure.
2287 * In these "overrun" cases, a temporary queue element is allocated
2288 * the LLDD request and CMD iu buffer information remembered, and the
2289 * routine returns a -EOVERFLOW status. Subsequently, when a queue job
2290 * structure is freed, it is immediately reallocated for anything on the
2291 * pending request list. The LLDDs defer_rcv() callback is called,
2292 * informing the LLDD that it may reuse the CMD IU buffer, and the io
2293 * is then started normally with the transport.
2294 *
2295 * The LLDD, when receiving an -EOVERFLOW completion status, is to treat
2296 * the completion as successful but must not reuse the CMD IU buffer
2297 * until the LLDD's defer_rcv() callback has been called for the
2298 * corresponding struct nvmefc_tgt_fcp_req pointer.
2299 *
2300 * If there is any other condition in which an error occurs, the
2301 * transport will return a non-zero status indicating the error.
2302 * In all cases other than -EOVERFLOW, the transport has not accepted the
2303 * request and the LLDD should abort the exchange.
2180 * 2304 *
2181 * @target_port: pointer to the (registered) target port the FCP CMD IU 2305 * @target_port: pointer to the (registered) target port the FCP CMD IU
2182 * was received on. 2306 * was received on.
@@ -2194,6 +2318,8 @@ nvmet_fc_rcv_fcp_req(struct nvmet_fc_target_port *target_port,
2194 struct nvme_fc_cmd_iu *cmdiu = cmdiubuf; 2318 struct nvme_fc_cmd_iu *cmdiu = cmdiubuf;
2195 struct nvmet_fc_tgt_queue *queue; 2319 struct nvmet_fc_tgt_queue *queue;
2196 struct nvmet_fc_fcp_iod *fod; 2320 struct nvmet_fc_fcp_iod *fod;
2321 struct nvmet_fc_defer_fcp_req *deferfcp;
2322 unsigned long flags;
2197 2323
2198 /* validate iu, so the connection id can be used to find the queue */ 2324 /* validate iu, so the connection id can be used to find the queue */
2199 if ((cmdiubuf_len != sizeof(*cmdiu)) || 2325 if ((cmdiubuf_len != sizeof(*cmdiu)) ||
@@ -2214,29 +2340,60 @@ nvmet_fc_rcv_fcp_req(struct nvmet_fc_target_port *target_port,
2214 * when the fod is freed. 2340 * when the fod is freed.
2215 */ 2341 */
2216 2342
2343 spin_lock_irqsave(&queue->qlock, flags);
2344
2217 fod = nvmet_fc_alloc_fcp_iod(queue); 2345 fod = nvmet_fc_alloc_fcp_iod(queue);
2218 if (!fod) { 2346 if (fod) {
2347 spin_unlock_irqrestore(&queue->qlock, flags);
2348
2349 fcpreq->nvmet_fc_private = fod;
2350 fod->fcpreq = fcpreq;
2351
2352 memcpy(&fod->cmdiubuf, cmdiubuf, cmdiubuf_len);
2353
2354 nvmet_fc_queue_fcp_req(tgtport, queue, fcpreq);
2355
2356 return 0;
2357 }
2358
2359 if (!tgtport->ops->defer_rcv) {
2360 spin_unlock_irqrestore(&queue->qlock, flags);
2219 /* release the queue lookup reference */ 2361 /* release the queue lookup reference */
2220 nvmet_fc_tgt_q_put(queue); 2362 nvmet_fc_tgt_q_put(queue);
2221 return -ENOENT; 2363 return -ENOENT;
2222 } 2364 }
2223 2365
2224 fcpreq->nvmet_fc_private = fod; 2366 deferfcp = list_first_entry_or_null(&queue->avail_defer_list,
2225 fod->fcpreq = fcpreq; 2367 struct nvmet_fc_defer_fcp_req, req_list);
2226 /* 2368 if (deferfcp) {
2227 * put all admin cmds on hw queue id 0. All io commands go to 2369 /* Just re-use one that was previously allocated */
2228 * the respective hw queue based on a modulo basis 2370 list_del(&deferfcp->req_list);
2229 */ 2371 } else {
2230 fcpreq->hwqid = queue->qid ? 2372 spin_unlock_irqrestore(&queue->qlock, flags);
2231 ((queue->qid - 1) % tgtport->ops->max_hw_queues) : 0;
2232 memcpy(&fod->cmdiubuf, cmdiubuf, cmdiubuf_len);
2233 2373
2234 if (tgtport->ops->target_features & NVMET_FCTGTFEAT_CMD_IN_ISR) 2374 /* Now we need to dynamically allocate one */
2235 queue_work_on(queue->cpu, queue->work_q, &fod->work); 2375 deferfcp = kmalloc(sizeof(*deferfcp), GFP_KERNEL);
2236 else 2376 if (!deferfcp) {
2237 nvmet_fc_handle_fcp_rqst(tgtport, fod); 2377 /* release the queue lookup reference */
2378 nvmet_fc_tgt_q_put(queue);
2379 return -ENOMEM;
2380 }
2381 spin_lock_irqsave(&queue->qlock, flags);
2382 }
2238 2383
2239 return 0; 2384 /* For now, use rspaddr / rsplen to save payload information */
2385 fcpreq->rspaddr = cmdiubuf;
2386 fcpreq->rsplen = cmdiubuf_len;
2387 deferfcp->fcp_req = fcpreq;
2388
2389 /* defer processing till a fod becomes available */
2390 list_add_tail(&deferfcp->req_list, &queue->pending_cmd_list);
2391
2392 /* NOTE: the queue lookup reference is still valid */
2393
2394 spin_unlock_irqrestore(&queue->qlock, flags);
2395
2396 return -EOVERFLOW;
2240} 2397}
2241EXPORT_SYMBOL_GPL(nvmet_fc_rcv_fcp_req); 2398EXPORT_SYMBOL_GPL(nvmet_fc_rcv_fcp_req);
2242 2399
diff --git a/drivers/of/device.c b/drivers/of/device.c
index 28c38c756f92..e0a28ea341fe 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -89,6 +89,7 @@ int of_dma_configure(struct device *dev, struct device_node *np)
89 bool coherent; 89 bool coherent;
90 unsigned long offset; 90 unsigned long offset;
91 const struct iommu_ops *iommu; 91 const struct iommu_ops *iommu;
92 u64 mask;
92 93
93 /* 94 /*
94 * Set default coherent_dma_mask to 32 bit. Drivers are expected to 95 * Set default coherent_dma_mask to 32 bit. Drivers are expected to
@@ -134,10 +135,9 @@ int of_dma_configure(struct device *dev, struct device_node *np)
134 * Limit coherent and dma mask based on size and default mask 135 * Limit coherent and dma mask based on size and default mask
135 * set by the driver. 136 * set by the driver.
136 */ 137 */
137 dev->coherent_dma_mask = min(dev->coherent_dma_mask, 138 mask = DMA_BIT_MASK(ilog2(dma_addr + size - 1) + 1);
138 DMA_BIT_MASK(ilog2(dma_addr + size))); 139 dev->coherent_dma_mask &= mask;
139 *dev->dma_mask = min((*dev->dma_mask), 140 *dev->dma_mask &= mask;
140 DMA_BIT_MASK(ilog2(dma_addr + size)));
141 141
142 coherent = of_dma_is_coherent(np); 142 coherent = of_dma_is_coherent(np);
143 dev_dbg(dev, "device is%sdma coherent\n", 143 dev_dbg(dev, "device is%sdma coherent\n",
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index 5c63b920b471..ed92c1254cff 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -956,7 +956,7 @@ static int __init dino_probe(struct parisc_device *dev)
956 956
957 dino_dev->hba.dev = dev; 957 dino_dev->hba.dev = dev;
958 dino_dev->hba.base_addr = ioremap_nocache(hpa, 4096); 958 dino_dev->hba.base_addr = ioremap_nocache(hpa, 4096);
959 dino_dev->hba.lmmio_space_offset = 0; /* CPU addrs == bus addrs */ 959 dino_dev->hba.lmmio_space_offset = PCI_F_EXTEND;
960 spin_lock_init(&dino_dev->dinosaur_pen); 960 spin_lock_init(&dino_dev->dinosaur_pen);
961 dino_dev->hba.iommu = ccio_get_iommu(dev); 961 dino_dev->hba.iommu = ccio_get_iommu(dev);
962 962
diff --git a/drivers/parisc/pdc_stable.c b/drivers/parisc/pdc_stable.c
index 7147aa53e9a2..b1ff46fe4547 100644
--- a/drivers/parisc/pdc_stable.c
+++ b/drivers/parisc/pdc_stable.c
@@ -333,11 +333,11 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
333 333
334 /* Update the symlink to the real device */ 334 /* Update the symlink to the real device */
335 sysfs_remove_link(&entry->kobj, "device"); 335 sysfs_remove_link(&entry->kobj, "device");
336 write_unlock(&entry->rw_lock);
337
336 ret = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device"); 338 ret = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device");
337 WARN_ON(ret); 339 WARN_ON(ret);
338 340
339 write_unlock(&entry->rw_lock);
340
341 printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n", 341 printk(KERN_INFO PDCS_PREFIX ": changed \"%s\" path to \"%s\"\n",
342 entry->name, buf); 342 entry->name, buf);
343 343
@@ -998,6 +998,7 @@ pdcs_register_pathentries(void)
998 /* kobject is now registered */ 998 /* kobject is now registered */
999 write_lock(&entry->rw_lock); 999 write_lock(&entry->rw_lock);
1000 entry->ready = 2; 1000 entry->ready = 2;
1001 write_unlock(&entry->rw_lock);
1001 1002
1002 /* Add a nice symlink to the real device */ 1003 /* Add a nice symlink to the real device */
1003 if (entry->dev) { 1004 if (entry->dev) {
@@ -1005,7 +1006,6 @@ pdcs_register_pathentries(void)
1005 WARN_ON(err); 1006 WARN_ON(err);
1006 } 1007 }
1007 1008
1008 write_unlock(&entry->rw_lock);
1009 kobject_uevent(&entry->kobj, KOBJ_ADD); 1009 kobject_uevent(&entry->kobj, KOBJ_ADD);
1010 } 1010 }
1011 1011
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 253d92409bb3..2225afc1cbbb 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -538,12 +538,9 @@ msi_setup_entry(struct pci_dev *dev, int nvec, const struct irq_affinity *affd)
538 struct msi_desc *entry; 538 struct msi_desc *entry;
539 u16 control; 539 u16 control;
540 540
541 if (affd) { 541 if (affd)
542 masks = irq_create_affinity_masks(nvec, affd); 542 masks = irq_create_affinity_masks(nvec, affd);
543 if (!masks) 543
544 dev_err(&dev->dev, "can't allocate MSI affinity masks for %d vectors\n",
545 nvec);
546 }
547 544
548 /* MSI Entry Initialization */ 545 /* MSI Entry Initialization */
549 entry = alloc_msi_entry(&dev->dev, nvec, masks); 546 entry = alloc_msi_entry(&dev->dev, nvec, masks);
@@ -679,12 +676,8 @@ static int msix_setup_entries(struct pci_dev *dev, void __iomem *base,
679 struct msi_desc *entry; 676 struct msi_desc *entry;
680 int ret, i; 677 int ret, i;
681 678
682 if (affd) { 679 if (affd)
683 masks = irq_create_affinity_masks(nvec, affd); 680 masks = irq_create_affinity_masks(nvec, affd);
684 if (!masks)
685 dev_err(&dev->dev, "can't allocate MSI-X affinity masks for %d vectors\n",
686 nvec);
687 }
688 681
689 for (i = 0, curmsk = masks; i < nvec; i++) { 682 for (i = 0, curmsk = masks; i < nvec; i++) {
690 entry = alloc_msi_entry(&dev->dev, 1, curmsk); 683 entry = alloc_msi_entry(&dev->dev, 1, curmsk);
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index af0cc3456dc1..fdf65a6c13f6 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -514,7 +514,7 @@ EXPORT_SYMBOL(pci_find_resource);
514 */ 514 */
515struct pci_dev *pci_find_pcie_root_port(struct pci_dev *dev) 515struct pci_dev *pci_find_pcie_root_port(struct pci_dev *dev)
516{ 516{
517 struct pci_dev *bridge, *highest_pcie_bridge = NULL; 517 struct pci_dev *bridge, *highest_pcie_bridge = dev;
518 518
519 bridge = pci_upstream_bridge(dev); 519 bridge = pci_upstream_bridge(dev);
520 while (bridge && pci_is_pcie(bridge)) { 520 while (bridge && pci_is_pcie(bridge)) {
@@ -4260,6 +4260,41 @@ int pci_reset_function(struct pci_dev *dev)
4260EXPORT_SYMBOL_GPL(pci_reset_function); 4260EXPORT_SYMBOL_GPL(pci_reset_function);
4261 4261
4262/** 4262/**
4263 * pci_reset_function_locked - quiesce and reset a PCI device function
4264 * @dev: PCI device to reset
4265 *
4266 * Some devices allow an individual function to be reset without affecting
4267 * other functions in the same device. The PCI device must be responsive
4268 * to PCI config space in order to use this function.
4269 *
4270 * This function does not just reset the PCI portion of a device, but
4271 * clears all the state associated with the device. This function differs
4272 * from __pci_reset_function() in that it saves and restores device state
4273 * over the reset. It also differs from pci_reset_function() in that it
4274 * requires the PCI device lock to be held.
4275 *
4276 * Returns 0 if the device function was successfully reset or negative if the
4277 * device doesn't support resetting a single function.
4278 */
4279int pci_reset_function_locked(struct pci_dev *dev)
4280{
4281 int rc;
4282
4283 rc = pci_probe_reset_function(dev);
4284 if (rc)
4285 return rc;
4286
4287 pci_dev_save_and_disable(dev);
4288
4289 rc = __pci_reset_function_locked(dev);
4290
4291 pci_dev_restore(dev);
4292
4293 return rc;
4294}
4295EXPORT_SYMBOL_GPL(pci_reset_function_locked);
4296
4297/**
4263 * pci_try_reset_function - quiesce and reset a PCI device function 4298 * pci_try_reset_function - quiesce and reset a PCI device function
4264 * @dev: PCI device to reset 4299 * @dev: PCI device to reset
4265 * 4300 *
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index c31310db0404..e6a917b4acd3 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1762,6 +1762,48 @@ static void pci_configure_extended_tags(struct pci_dev *dev)
1762 PCI_EXP_DEVCTL_EXT_TAG); 1762 PCI_EXP_DEVCTL_EXT_TAG);
1763} 1763}
1764 1764
1765/**
1766 * pcie_relaxed_ordering_enabled - Probe for PCIe relaxed ordering enable
1767 * @dev: PCI device to query
1768 *
1769 * Returns true if the device has enabled relaxed ordering attribute.
1770 */
1771bool pcie_relaxed_ordering_enabled(struct pci_dev *dev)
1772{
1773 u16 v;
1774
1775 pcie_capability_read_word(dev, PCI_EXP_DEVCTL, &v);
1776
1777 return !!(v & PCI_EXP_DEVCTL_RELAX_EN);
1778}
1779EXPORT_SYMBOL(pcie_relaxed_ordering_enabled);
1780
1781static void pci_configure_relaxed_ordering(struct pci_dev *dev)
1782{
1783 struct pci_dev *root;
1784
1785 /* PCI_EXP_DEVICE_RELAX_EN is RsvdP in VFs */
1786 if (dev->is_virtfn)
1787 return;
1788
1789 if (!pcie_relaxed_ordering_enabled(dev))
1790 return;
1791
1792 /*
1793 * For now, we only deal with Relaxed Ordering issues with Root
1794 * Ports. Peer-to-Peer DMA is another can of worms.
1795 */
1796 root = pci_find_pcie_root_port(dev);
1797 if (!root)
1798 return;
1799
1800 if (root->dev_flags & PCI_DEV_FLAGS_NO_RELAXED_ORDERING) {
1801 pcie_capability_clear_word(dev, PCI_EXP_DEVCTL,
1802 PCI_EXP_DEVCTL_RELAX_EN);
1803 dev_info(&dev->dev, "Disable Relaxed Ordering because the Root Port didn't support it\n");
1804 }
1805}
1806
1765static void pci_configure_device(struct pci_dev *dev) 1807static void pci_configure_device(struct pci_dev *dev)
1766{ 1808{
1767 struct hotplug_params hpp; 1809 struct hotplug_params hpp;
@@ -1769,6 +1811,7 @@ static void pci_configure_device(struct pci_dev *dev)
1769 1811
1770 pci_configure_mps(dev); 1812 pci_configure_mps(dev);
1771 pci_configure_extended_tags(dev); 1813 pci_configure_extended_tags(dev);
1814 pci_configure_relaxed_ordering(dev);
1772 1815
1773 memset(&hpp, 0, sizeof(hpp)); 1816 memset(&hpp, 0, sizeof(hpp));
1774 ret = pci_get_hp_params(dev, &hpp); 1817 ret = pci_get_hp_params(dev, &hpp);
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 6967c6b4cf6b..140760403f36 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -4016,6 +4016,95 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(0x1797, 0x6869, PCI_CLASS_NOT_DEFINED, 8,
4016 quirk_tw686x_class); 4016 quirk_tw686x_class);
4017 4017
4018/* 4018/*
4019 * Some devices have problems with Transaction Layer Packets with the Relaxed
4020 * Ordering Attribute set. Such devices should mark themselves and other
4021 * Device Drivers should check before sending TLPs with RO set.
4022 */
4023static void quirk_relaxedordering_disable(struct pci_dev *dev)
4024{
4025 dev->dev_flags |= PCI_DEV_FLAGS_NO_RELAXED_ORDERING;
4026 dev_info(&dev->dev, "Disable Relaxed Ordering Attributes to avoid PCIe Completion erratum\n");
4027}
4028
4029/*
4030 * Intel Xeon processors based on Broadwell/Haswell microarchitecture Root
4031 * Complex has a Flow Control Credit issue which can cause performance
4032 * problems with Upstream Transaction Layer Packets with Relaxed Ordering set.
4033 */
4034DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f01, PCI_CLASS_NOT_DEFINED, 8,
4035 quirk_relaxedordering_disable);
4036DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f02, PCI_CLASS_NOT_DEFINED, 8,
4037 quirk_relaxedordering_disable);
4038DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f03, PCI_CLASS_NOT_DEFINED, 8,
4039 quirk_relaxedordering_disable);
4040DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f04, PCI_CLASS_NOT_DEFINED, 8,
4041 quirk_relaxedordering_disable);
4042DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f05, PCI_CLASS_NOT_DEFINED, 8,
4043 quirk_relaxedordering_disable);
4044DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f06, PCI_CLASS_NOT_DEFINED, 8,
4045 quirk_relaxedordering_disable);
4046DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f07, PCI_CLASS_NOT_DEFINED, 8,
4047 quirk_relaxedordering_disable);
4048DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f08, PCI_CLASS_NOT_DEFINED, 8,
4049 quirk_relaxedordering_disable);
4050DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f09, PCI_CLASS_NOT_DEFINED, 8,
4051 quirk_relaxedordering_disable);
4052DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f0a, PCI_CLASS_NOT_DEFINED, 8,
4053 quirk_relaxedordering_disable);
4054DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f0b, PCI_CLASS_NOT_DEFINED, 8,
4055 quirk_relaxedordering_disable);
4056DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f0c, PCI_CLASS_NOT_DEFINED, 8,
4057 quirk_relaxedordering_disable);
4058DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f0d, PCI_CLASS_NOT_DEFINED, 8,
4059 quirk_relaxedordering_disable);
4060DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x6f0e, PCI_CLASS_NOT_DEFINED, 8,
4061 quirk_relaxedordering_disable);
4062DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f01, PCI_CLASS_NOT_DEFINED, 8,
4063 quirk_relaxedordering_disable);
4064DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f02, PCI_CLASS_NOT_DEFINED, 8,
4065 quirk_relaxedordering_disable);
4066DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f03, PCI_CLASS_NOT_DEFINED, 8,
4067 quirk_relaxedordering_disable);
4068DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f04, PCI_CLASS_NOT_DEFINED, 8,
4069 quirk_relaxedordering_disable);
4070DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f05, PCI_CLASS_NOT_DEFINED, 8,
4071 quirk_relaxedordering_disable);
4072DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f06, PCI_CLASS_NOT_DEFINED, 8,
4073 quirk_relaxedordering_disable);
4074DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f07, PCI_CLASS_NOT_DEFINED, 8,
4075 quirk_relaxedordering_disable);
4076DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f08, PCI_CLASS_NOT_DEFINED, 8,
4077 quirk_relaxedordering_disable);
4078DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f09, PCI_CLASS_NOT_DEFINED, 8,
4079 quirk_relaxedordering_disable);
4080DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f0a, PCI_CLASS_NOT_DEFINED, 8,
4081 quirk_relaxedordering_disable);
4082DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f0b, PCI_CLASS_NOT_DEFINED, 8,
4083 quirk_relaxedordering_disable);
4084DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f0c, PCI_CLASS_NOT_DEFINED, 8,
4085 quirk_relaxedordering_disable);
4086DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f0d, PCI_CLASS_NOT_DEFINED, 8,
4087 quirk_relaxedordering_disable);
4088DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_INTEL, 0x2f0e, PCI_CLASS_NOT_DEFINED, 8,
4089 quirk_relaxedordering_disable);
4090
4091/*
4092 * The AMD ARM A1100 (AKA "SEATTLE") SoC has a bug in its PCIe Root Complex
4093 * where Upstream Transaction Layer Packets with the Relaxed Ordering
4094 * Attribute clear are allowed to bypass earlier TLPs with Relaxed Ordering
4095 * set. This is a violation of the PCIe 3.0 Transaction Ordering Rules
4096 * outlined in Section 2.4.1 (PCI Express(r) Base Specification Revision 3.0
4097 * November 10, 2010). As a result, on this platform we can't use Relaxed
4098 * Ordering for Upstream TLPs.
4099 */
4100DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AMD, 0x1a00, PCI_CLASS_NOT_DEFINED, 8,
4101 quirk_relaxedordering_disable);
4102DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AMD, 0x1a01, PCI_CLASS_NOT_DEFINED, 8,
4103 quirk_relaxedordering_disable);
4104DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_AMD, 0x1a02, PCI_CLASS_NOT_DEFINED, 8,
4105 quirk_relaxedordering_disable);
4106
4107/*
4019 * Per PCIe r3.0, sec 2.2.9, "Completion headers must supply the same 4108 * Per PCIe r3.0, sec 2.2.9, "Completion headers must supply the same
4020 * values for the Attribute as were supplied in the header of the 4109 * values for the Attribute as were supplied in the header of the
4021 * corresponding Request, except as explicitly allowed when IDO is used." 4110 * corresponding Request, except as explicitly allowed when IDO is used."
diff --git a/drivers/phy/broadcom/Kconfig b/drivers/phy/broadcom/Kconfig
index 37371b89b14f..64fc59c3ae6d 100644
--- a/drivers/phy/broadcom/Kconfig
+++ b/drivers/phy/broadcom/Kconfig
@@ -30,8 +30,8 @@ config PHY_BCM_NS_USB3
30 tristate "Broadcom Northstar USB 3.0 PHY Driver" 30 tristate "Broadcom Northstar USB 3.0 PHY Driver"
31 depends on ARCH_BCM_IPROC || COMPILE_TEST 31 depends on ARCH_BCM_IPROC || COMPILE_TEST
32 depends on HAS_IOMEM && OF 32 depends on HAS_IOMEM && OF
33 depends on MDIO_BUS
33 select GENERIC_PHY 34 select GENERIC_PHY
34 select MDIO_DEVICE
35 help 35 help
36 Enable this to support Broadcom USB 3.0 PHY connected to the USB 36 Enable this to support Broadcom USB 3.0 PHY connected to the USB
37 controller on Northstar family. 37 controller on Northstar family.
diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index 20f1b4493994..04e929fd0ffe 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1548,6 +1548,13 @@ static const struct dmi_system_id chv_no_valid_mask[] = {
1548 }, 1548 },
1549 }, 1549 },
1550 { 1550 {
1551 .ident = "HP Chromebook 11 G5 (Setzer)",
1552 .matches = {
1553 DMI_MATCH(DMI_SYS_VENDOR, "HP"),
1554 DMI_MATCH(DMI_PRODUCT_NAME, "Setzer"),
1555 },
1556 },
1557 {
1551 .ident = "Acer Chromebook R11 (Cyan)", 1558 .ident = "Acer Chromebook R11 (Cyan)",
1552 .matches = { 1559 .matches = {
1553 DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"), 1560 DMI_MATCH(DMI_SYS_VENDOR, "GOOGLE"),
diff --git a/drivers/pinctrl/intel/pinctrl-merrifield.c b/drivers/pinctrl/intel/pinctrl-merrifield.c
index 4d4ef42a39b5..86c4b3fab7b0 100644
--- a/drivers/pinctrl/intel/pinctrl-merrifield.c
+++ b/drivers/pinctrl/intel/pinctrl-merrifield.c
@@ -343,9 +343,9 @@ static const struct pinctrl_pin_desc mrfld_pins[] = {
343 343
344static const unsigned int mrfld_sdio_pins[] = { 50, 51, 52, 53, 54, 55, 56 }; 344static const unsigned int mrfld_sdio_pins[] = { 50, 51, 52, 53, 54, 55, 56 };
345static const unsigned int mrfld_spi5_pins[] = { 90, 91, 92, 93, 94, 95, 96 }; 345static const unsigned int mrfld_spi5_pins[] = { 90, 91, 92, 93, 94, 95, 96 };
346static const unsigned int mrfld_uart0_pins[] = { 124, 125, 126, 127 }; 346static const unsigned int mrfld_uart0_pins[] = { 115, 116, 117, 118 };
347static const unsigned int mrfld_uart1_pins[] = { 128, 129, 130, 131 }; 347static const unsigned int mrfld_uart1_pins[] = { 119, 120, 121, 122 };
348static const unsigned int mrfld_uart2_pins[] = { 132, 133, 134, 135 }; 348static const unsigned int mrfld_uart2_pins[] = { 123, 124, 125, 126 };
349static const unsigned int mrfld_pwm0_pins[] = { 144 }; 349static const unsigned int mrfld_pwm0_pins[] = { 144 };
350static const unsigned int mrfld_pwm1_pins[] = { 145 }; 350static const unsigned int mrfld_pwm1_pins[] = { 145 };
351static const unsigned int mrfld_pwm2_pins[] = { 132 }; 351static const unsigned int mrfld_pwm2_pins[] = { 132 };
diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index f024e25787fc..0c6d7812d6fd 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -37,7 +37,7 @@
37#define IRQ_STATUS 0x10 37#define IRQ_STATUS 0x10
38#define IRQ_WKUP 0x18 38#define IRQ_WKUP 0x18
39 39
40#define NB_FUNCS 2 40#define NB_FUNCS 3
41#define GPIO_PER_REG 32 41#define GPIO_PER_REG 32
42 42
43/** 43/**
@@ -126,6 +126,16 @@ struct armada_37xx_pinctrl {
126 .funcs = {_func1, "gpio"} \ 126 .funcs = {_func1, "gpio"} \
127 } 127 }
128 128
129#define PIN_GRP_GPIO_3(_name, _start, _nr, _mask, _v1, _v2, _v3, _f1, _f2) \
130 { \
131 .name = _name, \
132 .start_pin = _start, \
133 .npins = _nr, \
134 .reg_mask = _mask, \
135 .val = {_v1, _v2, _v3}, \
136 .funcs = {_f1, _f2, "gpio"} \
137 }
138
129#define PIN_GRP_EXTRA(_name, _start, _nr, _mask, _v1, _v2, _start2, _nr2, \ 139#define PIN_GRP_EXTRA(_name, _start, _nr, _mask, _v1, _v2, _start2, _nr2, \
130 _f1, _f2) \ 140 _f1, _f2) \
131 { \ 141 { \
@@ -171,12 +181,13 @@ static struct armada_37xx_pin_group armada_37xx_sb_groups[] = {
171 PIN_GRP_GPIO("usb32_drvvbus0", 0, 1, BIT(0), "drvbus"), 181 PIN_GRP_GPIO("usb32_drvvbus0", 0, 1, BIT(0), "drvbus"),
172 PIN_GRP_GPIO("usb2_drvvbus1", 1, 1, BIT(1), "drvbus"), 182 PIN_GRP_GPIO("usb2_drvvbus1", 1, 1, BIT(1), "drvbus"),
173 PIN_GRP_GPIO("sdio_sb", 24, 6, BIT(2), "sdio"), 183 PIN_GRP_GPIO("sdio_sb", 24, 6, BIT(2), "sdio"),
174 PIN_GRP_EXTRA("rgmii", 6, 12, BIT(3), 0, BIT(3), 23, 1, "mii", "gpio"), 184 PIN_GRP_GPIO("rgmii", 6, 12, BIT(3), "mii"),
175 PIN_GRP_GPIO("pcie1", 3, 2, BIT(4), "pcie"), 185 PIN_GRP_GPIO("pcie1", 3, 2, BIT(4), "pcie"),
176 PIN_GRP_GPIO("ptp", 20, 3, BIT(5), "ptp"), 186 PIN_GRP_GPIO("ptp", 20, 3, BIT(5), "ptp"),
177 PIN_GRP("ptp_clk", 21, 1, BIT(6), "ptp", "mii"), 187 PIN_GRP("ptp_clk", 21, 1, BIT(6), "ptp", "mii"),
178 PIN_GRP("ptp_trig", 22, 1, BIT(7), "ptp", "mii"), 188 PIN_GRP("ptp_trig", 22, 1, BIT(7), "ptp", "mii"),
179 PIN_GRP("mii_col", 23, 1, BIT(8), "mii", "mii_err"), 189 PIN_GRP_GPIO_3("mii_col", 23, 1, BIT(8) | BIT(14), 0, BIT(8), BIT(14),
190 "mii", "mii_err"),
180}; 191};
181 192
182const struct armada_37xx_pin_data armada_37xx_pin_nb = { 193const struct armada_37xx_pin_data armada_37xx_pin_nb = {
@@ -187,7 +198,7 @@ const struct armada_37xx_pin_data armada_37xx_pin_nb = {
187}; 198};
188 199
189const struct armada_37xx_pin_data armada_37xx_pin_sb = { 200const struct armada_37xx_pin_data armada_37xx_pin_sb = {
190 .nr_pins = 29, 201 .nr_pins = 30,
191 .name = "GPIO2", 202 .name = "GPIO2",
192 .groups = armada_37xx_sb_groups, 203 .groups = armada_37xx_sb_groups,
193 .ngroups = ARRAY_SIZE(armada_37xx_sb_groups), 204 .ngroups = ARRAY_SIZE(armada_37xx_sb_groups),
@@ -208,7 +219,7 @@ static int armada_37xx_get_func_reg(struct armada_37xx_pin_group *grp,
208{ 219{
209 int f; 220 int f;
210 221
211 for (f = 0; f < NB_FUNCS; f++) 222 for (f = 0; (f < NB_FUNCS) && grp->funcs[f]; f++)
212 if (!strcmp(grp->funcs[f], func)) 223 if (!strcmp(grp->funcs[f], func))
213 return f; 224 return f;
214 225
@@ -795,7 +806,7 @@ static int armada_37xx_fill_group(struct armada_37xx_pinctrl *info)
795 for (j = 0; j < grp->extra_npins; j++) 806 for (j = 0; j < grp->extra_npins; j++)
796 grp->pins[i+j] = grp->extra_pin + j; 807 grp->pins[i+j] = grp->extra_pin + j;
797 808
798 for (f = 0; f < NB_FUNCS; f++) { 809 for (f = 0; (f < NB_FUNCS) && grp->funcs[f]; f++) {
799 int ret; 810 int ret;
800 /* check for unique functions and count groups */ 811 /* check for unique functions and count groups */
801 ret = armada_37xx_add_function(info->funcs, &funcsize, 812 ret = armada_37xx_add_function(info->funcs, &funcsize,
@@ -847,7 +858,7 @@ static int armada_37xx_fill_func(struct armada_37xx_pinctrl *info)
847 struct armada_37xx_pin_group *gp = &info->groups[g]; 858 struct armada_37xx_pin_group *gp = &info->groups[g];
848 int f; 859 int f;
849 860
850 for (f = 0; f < NB_FUNCS; f++) { 861 for (f = 0; (f < NB_FUNCS) && gp->funcs[f]; f++) {
851 if (strcmp(gp->funcs[f], name) == 0) { 862 if (strcmp(gp->funcs[f], name) == 0) {
852 *groups = gp->name; 863 *groups = gp->name;
853 groups++; 864 groups++;
diff --git a/drivers/pinctrl/stm32/Kconfig b/drivers/pinctrl/stm32/Kconfig
index 3b8026fca057..7e1fe39a56a5 100644
--- a/drivers/pinctrl/stm32/Kconfig
+++ b/drivers/pinctrl/stm32/Kconfig
@@ -6,29 +6,30 @@ config PINCTRL_STM32
6 select PINMUX 6 select PINMUX
7 select GENERIC_PINCONF 7 select GENERIC_PINCONF
8 select GPIOLIB 8 select GPIOLIB
9 select IRQ_DOMAIN_HIERARCHY
9 select MFD_SYSCON 10 select MFD_SYSCON
10 11
11config PINCTRL_STM32F429 12config PINCTRL_STM32F429
12 bool "STMicroelectronics STM32F429 pin control" if COMPILE_TEST && !MACH_STM32F429 13 bool "STMicroelectronics STM32F429 pin control" if COMPILE_TEST && !MACH_STM32F429
13 depends on OF && IRQ_DOMAIN_HIERARCHY 14 depends on OF
14 default MACH_STM32F429 15 default MACH_STM32F429
15 select PINCTRL_STM32 16 select PINCTRL_STM32
16 17
17config PINCTRL_STM32F469 18config PINCTRL_STM32F469
18 bool "STMicroelectronics STM32F469 pin control" if COMPILE_TEST && !MACH_STM32F469 19 bool "STMicroelectronics STM32F469 pin control" if COMPILE_TEST && !MACH_STM32F469
19 depends on OF && IRQ_DOMAIN_HIERARCHY 20 depends on OF
20 default MACH_STM32F469 21 default MACH_STM32F469
21 select PINCTRL_STM32 22 select PINCTRL_STM32
22 23
23config PINCTRL_STM32F746 24config PINCTRL_STM32F746
24 bool "STMicroelectronics STM32F746 pin control" if COMPILE_TEST && !MACH_STM32F746 25 bool "STMicroelectronics STM32F746 pin control" if COMPILE_TEST && !MACH_STM32F746
25 depends on OF && IRQ_DOMAIN_HIERARCHY 26 depends on OF
26 default MACH_STM32F746 27 default MACH_STM32F746
27 select PINCTRL_STM32 28 select PINCTRL_STM32
28 29
29config PINCTRL_STM32H743 30config PINCTRL_STM32H743
30 bool "STMicroelectronics STM32H743 pin control" if COMPILE_TEST && !MACH_STM32H743 31 bool "STMicroelectronics STM32H743 pin control" if COMPILE_TEST && !MACH_STM32H743
31 depends on OF && IRQ_DOMAIN_HIERARCHY 32 depends on OF
32 default MACH_STM32H743 33 default MACH_STM32H743
33 select PINCTRL_STM32 34 select PINCTRL_STM32
34endif 35endif
diff --git a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
index 159580c04b14..47a392bc73c8 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sun4i-a10.c
@@ -918,6 +918,7 @@ static const struct sunxi_desc_pin sun4i_a10_pins[] = {
918 SUNXI_FUNCTION_VARIANT(0x3, "emac", /* ETXD1 */ 918 SUNXI_FUNCTION_VARIANT(0x3, "emac", /* ETXD1 */
919 PINCTRL_SUN7I_A20), 919 PINCTRL_SUN7I_A20),
920 SUNXI_FUNCTION(0x4, "keypad"), /* IN6 */ 920 SUNXI_FUNCTION(0x4, "keypad"), /* IN6 */
921 SUNXI_FUNCTION(0x5, "sim"), /* DET */
921 SUNXI_FUNCTION_IRQ(0x6, 16), /* EINT16 */ 922 SUNXI_FUNCTION_IRQ(0x6, 16), /* EINT16 */
922 SUNXI_FUNCTION(0x7, "csi1")), /* D16 */ 923 SUNXI_FUNCTION(0x7, "csi1")), /* D16 */
923 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17), 924 SUNXI_PIN(SUNXI_PINCTRL_PIN(H, 17),
diff --git a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
index a433a306a2d0..c75e094b2d90 100644
--- a/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
+++ b/drivers/pinctrl/uniphier/pinctrl-uniphier-pro4.c
@@ -1084,7 +1084,7 @@ static const unsigned usb1_pins[] = {182, 183};
1084static const int usb1_muxvals[] = {0, 0}; 1084static const int usb1_muxvals[] = {0, 0};
1085static const unsigned usb2_pins[] = {184, 185}; 1085static const unsigned usb2_pins[] = {184, 185};
1086static const int usb2_muxvals[] = {0, 0}; 1086static const int usb2_muxvals[] = {0, 0};
1087static const unsigned usb3_pins[] = {186, 187}; 1087static const unsigned usb3_pins[] = {187, 188};
1088static const int usb3_muxvals[] = {0, 0}; 1088static const int usb3_muxvals[] = {0, 0};
1089static const unsigned port_range0_pins[] = { 1089static const unsigned port_range0_pins[] = {
1090 300, 301, 302, 303, 304, 305, 306, 307, /* PORT0x */ 1090 300, 301, 302, 303, 304, 305, 306, 307, /* PORT0x */
diff --git a/drivers/pinctrl/zte/pinctrl-zx.c b/drivers/pinctrl/zte/pinctrl-zx.c
index 787e3967bd5c..f828ee340a98 100644
--- a/drivers/pinctrl/zte/pinctrl-zx.c
+++ b/drivers/pinctrl/zte/pinctrl-zx.c
@@ -64,10 +64,8 @@ static int zx_set_mux(struct pinctrl_dev *pctldev, unsigned int func_selector,
64 struct zx_pinctrl_soc_info *info = zpctl->info; 64 struct zx_pinctrl_soc_info *info = zpctl->info;
65 const struct pinctrl_pin_desc *pindesc = info->pins + group_selector; 65 const struct pinctrl_pin_desc *pindesc = info->pins + group_selector;
66 struct zx_pin_data *data = pindesc->drv_data; 66 struct zx_pin_data *data = pindesc->drv_data;
67 struct zx_mux_desc *mux = data->muxes; 67 struct zx_mux_desc *mux;
68 u32 mask = (1 << data->width) - 1; 68 u32 mask, offset, bitpos;
69 u32 offset = data->offset;
70 u32 bitpos = data->bitpos;
71 struct function_desc *func; 69 struct function_desc *func;
72 unsigned long flags; 70 unsigned long flags;
73 u32 val, mval; 71 u32 val, mval;
@@ -76,6 +74,11 @@ static int zx_set_mux(struct pinctrl_dev *pctldev, unsigned int func_selector,
76 if (!data) 74 if (!data)
77 return -EINVAL; 75 return -EINVAL;
78 76
77 mux = data->muxes;
78 mask = (1 << data->width) - 1;
79 offset = data->offset;
80 bitpos = data->bitpos;
81
79 func = pinmux_generic_get_function(pctldev, func_selector); 82 func = pinmux_generic_get_function(pctldev, func_selector);
80 if (!func) 83 if (!func)
81 return -EINVAL; 84 return -EINVAL;
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index b04860703740..80b87954f6dd 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -675,6 +675,7 @@ config PEAQ_WMI
675 tristate "PEAQ 2-in-1 WMI hotkey driver" 675 tristate "PEAQ 2-in-1 WMI hotkey driver"
676 depends on ACPI_WMI 676 depends on ACPI_WMI
677 depends on INPUT 677 depends on INPUT
678 select INPUT_POLLDEV
678 help 679 help
679 Say Y here if you want to support WMI-based hotkeys on PEAQ 2-in-1s. 680 Say Y here if you want to support WMI-based hotkeys on PEAQ 2-in-1s.
680 681
diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/dell-wmi.c
index f8978464df31..dad8f4afa17c 100644
--- a/drivers/platform/x86/dell-wmi.c
+++ b/drivers/platform/x86/dell-wmi.c
@@ -626,7 +626,7 @@ static void dell_wmi_input_destroy(struct wmi_device *wdev)
626 * WMI Interface Version 8 4 <version> 626 * WMI Interface Version 8 4 <version>
627 * WMI buffer length 12 4 4096 627 * WMI buffer length 12 4 4096
628 */ 628 */
629static int __init dell_wmi_check_descriptor_buffer(void) 629static int dell_wmi_check_descriptor_buffer(void)
630{ 630{
631 struct acpi_buffer out = { ACPI_ALLOCATE_BUFFER, NULL }; 631 struct acpi_buffer out = { ACPI_ALLOCATE_BUFFER, NULL };
632 union acpi_object *obj; 632 union acpi_object *obj;
@@ -717,9 +717,15 @@ static int dell_wmi_events_set_enabled(bool enable)
717 717
718static int dell_wmi_probe(struct wmi_device *wdev) 718static int dell_wmi_probe(struct wmi_device *wdev)
719{ 719{
720 int err;
721
720 struct dell_wmi_priv *priv = devm_kzalloc( 722 struct dell_wmi_priv *priv = devm_kzalloc(
721 &wdev->dev, sizeof(struct dell_wmi_priv), GFP_KERNEL); 723 &wdev->dev, sizeof(struct dell_wmi_priv), GFP_KERNEL);
722 724
725 err = dell_wmi_check_descriptor_buffer();
726 if (err)
727 return err;
728
723 dev_set_drvdata(&wdev->dev, priv); 729 dev_set_drvdata(&wdev->dev, priv);
724 730
725 return dell_wmi_input_setup(wdev); 731 return dell_wmi_input_setup(wdev);
@@ -749,10 +755,6 @@ static int __init dell_wmi_init(void)
749{ 755{
750 int err; 756 int err;
751 757
752 err = dell_wmi_check_descriptor_buffer();
753 if (err)
754 return err;
755
756 dmi_check_system(dell_wmi_smbios_list); 758 dmi_check_system(dell_wmi_smbios_list);
757 759
758 if (wmi_requires_smbios_request) { 760 if (wmi_requires_smbios_request) {
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index 61f106377661..480926786cb8 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -36,8 +36,8 @@ static const struct acpi_device_id intel_vbtn_ids[] = {
36 36
37/* In theory, these are HID usages. */ 37/* In theory, these are HID usages. */
38static const struct key_entry intel_vbtn_keymap[] = { 38static const struct key_entry intel_vbtn_keymap[] = {
39 { KE_IGNORE, 0xC0, { KEY_POWER } }, /* power key press */ 39 { KE_KEY, 0xC0, { KEY_POWER } }, /* power key press */
40 { KE_KEY, 0xC1, { KEY_POWER } }, /* power key release */ 40 { KE_IGNORE, 0xC1, { KEY_POWER } }, /* power key release */
41 { KE_KEY, 0xC4, { KEY_VOLUMEUP } }, /* volume-up key press */ 41 { KE_KEY, 0xC4, { KEY_VOLUMEUP } }, /* volume-up key press */
42 { KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* volume-up key release */ 42 { KE_IGNORE, 0xC5, { KEY_VOLUMEUP } }, /* volume-up key release */
43 { KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press */ 43 { KE_KEY, 0xC6, { KEY_VOLUMEDOWN } }, /* volume-down key press */
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 1a764e311e11..e32ba575e8d9 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -1252,12 +1252,12 @@ static int __init acpi_wmi_init(void)
1252 1252
1253 return 0; 1253 return 0;
1254 1254
1255err_unreg_class:
1256 class_unregister(&wmi_bus_class);
1257
1258err_unreg_bus: 1255err_unreg_bus:
1259 bus_unregister(&wmi_bus_type); 1256 bus_unregister(&wmi_bus_type);
1260 1257
1258err_unreg_class:
1259 class_unregister(&wmi_bus_class);
1260
1261 return error; 1261 return error;
1262} 1262}
1263 1263
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index b77435783ef3..7eacc1c4b3b1 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -28,6 +28,7 @@
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/syscalls.h> 29#include <linux/syscalls.h>
30#include <linux/uaccess.h> 30#include <linux/uaccess.h>
31#include <uapi/linux/sched/types.h>
31 32
32#include "ptp_private.h" 33#include "ptp_private.h"
33 34
@@ -184,6 +185,19 @@ static void delete_ptp_clock(struct posix_clock *pc)
184 kfree(ptp); 185 kfree(ptp);
185} 186}
186 187
188static void ptp_aux_kworker(struct kthread_work *work)
189{
190 struct ptp_clock *ptp = container_of(work, struct ptp_clock,
191 aux_work.work);
192 struct ptp_clock_info *info = ptp->info;
193 long delay;
194
195 delay = info->do_aux_work(info);
196
197 if (delay >= 0)
198 kthread_queue_delayed_work(ptp->kworker, &ptp->aux_work, delay);
199}
200
187/* public interface */ 201/* public interface */
188 202
189struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, 203struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
@@ -217,6 +231,20 @@ struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
217 mutex_init(&ptp->pincfg_mux); 231 mutex_init(&ptp->pincfg_mux);
218 init_waitqueue_head(&ptp->tsev_wq); 232 init_waitqueue_head(&ptp->tsev_wq);
219 233
234 if (ptp->info->do_aux_work) {
235 char *worker_name = kasprintf(GFP_KERNEL, "ptp%d", ptp->index);
236
237 kthread_init_delayed_work(&ptp->aux_work, ptp_aux_kworker);
238 ptp->kworker = kthread_create_worker(0, worker_name ?
239 worker_name : info->name);
240 kfree(worker_name);
241 if (IS_ERR(ptp->kworker)) {
242 err = PTR_ERR(ptp->kworker);
243 pr_err("failed to create ptp aux_worker %d\n", err);
244 goto kworker_err;
245 }
246 }
247
220 err = ptp_populate_pin_groups(ptp); 248 err = ptp_populate_pin_groups(ptp);
221 if (err) 249 if (err)
222 goto no_pin_groups; 250 goto no_pin_groups;
@@ -259,6 +287,9 @@ no_pps:
259no_device: 287no_device:
260 ptp_cleanup_pin_groups(ptp); 288 ptp_cleanup_pin_groups(ptp);
261no_pin_groups: 289no_pin_groups:
290 if (ptp->kworker)
291 kthread_destroy_worker(ptp->kworker);
292kworker_err:
262 mutex_destroy(&ptp->tsevq_mux); 293 mutex_destroy(&ptp->tsevq_mux);
263 mutex_destroy(&ptp->pincfg_mux); 294 mutex_destroy(&ptp->pincfg_mux);
264 ida_simple_remove(&ptp_clocks_map, index); 295 ida_simple_remove(&ptp_clocks_map, index);
@@ -274,6 +305,11 @@ int ptp_clock_unregister(struct ptp_clock *ptp)
274 ptp->defunct = 1; 305 ptp->defunct = 1;
275 wake_up_interruptible(&ptp->tsev_wq); 306 wake_up_interruptible(&ptp->tsev_wq);
276 307
308 if (ptp->kworker) {
309 kthread_cancel_delayed_work_sync(&ptp->aux_work);
310 kthread_destroy_worker(ptp->kworker);
311 }
312
277 /* Release the clock's resources. */ 313 /* Release the clock's resources. */
278 if (ptp->pps_source) 314 if (ptp->pps_source)
279 pps_unregister_source(ptp->pps_source); 315 pps_unregister_source(ptp->pps_source);
@@ -339,6 +375,12 @@ int ptp_find_pin(struct ptp_clock *ptp,
339} 375}
340EXPORT_SYMBOL(ptp_find_pin); 376EXPORT_SYMBOL(ptp_find_pin);
341 377
378int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay)
379{
380 return kthread_mod_delayed_work(ptp->kworker, &ptp->aux_work, delay);
381}
382EXPORT_SYMBOL(ptp_schedule_worker);
383
342/* module operations */ 384/* module operations */
343 385
344static void __exit ptp_exit(void) 386static void __exit ptp_exit(void)
diff --git a/drivers/ptp/ptp_private.h b/drivers/ptp/ptp_private.h
index d95888974d0c..b86f1bfecd6f 100644
--- a/drivers/ptp/ptp_private.h
+++ b/drivers/ptp/ptp_private.h
@@ -22,6 +22,7 @@
22 22
23#include <linux/cdev.h> 23#include <linux/cdev.h>
24#include <linux/device.h> 24#include <linux/device.h>
25#include <linux/kthread.h>
25#include <linux/mutex.h> 26#include <linux/mutex.h>
26#include <linux/posix-clock.h> 27#include <linux/posix-clock.h>
27#include <linux/ptp_clock.h> 28#include <linux/ptp_clock.h>
@@ -56,6 +57,8 @@ struct ptp_clock {
56 struct attribute_group pin_attr_group; 57 struct attribute_group pin_attr_group;
57 /* 1st entry is a pointer to the real group, 2nd is NULL terminator */ 58 /* 1st entry is a pointer to the real group, 2nd is NULL terminator */
58 const struct attribute_group *pin_attr_groups[2]; 59 const struct attribute_group *pin_attr_groups[2];
60 struct kthread_worker *kworker;
61 struct kthread_delayed_work aux_work;
59}; 62};
60 63
61/* 64/*
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 4fac49e55d47..4b43aa62fbc7 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1301,7 +1301,6 @@ static void ds1307_clks_register(struct ds1307 *ds1307)
1301static const struct regmap_config regmap_config = { 1301static const struct regmap_config regmap_config = {
1302 .reg_bits = 8, 1302 .reg_bits = 8,
1303 .val_bits = 8, 1303 .val_bits = 8,
1304 .max_register = 0x12,
1305}; 1304};
1306 1305
1307static int ds1307_probe(struct i2c_client *client, 1306static int ds1307_probe(struct i2c_client *client,
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 8975cd321390..d42e758518ed 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -2512,7 +2512,7 @@ static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
2512 struct rtable *rt = (struct rtable *) dst; 2512 struct rtable *rt = (struct rtable *) dst;
2513 __be32 *pkey = &ip_hdr(skb)->daddr; 2513 __be32 *pkey = &ip_hdr(skb)->daddr;
2514 2514
2515 if (rt->rt_gateway) 2515 if (rt && rt->rt_gateway)
2516 pkey = &rt->rt_gateway; 2516 pkey = &rt->rt_gateway;
2517 2517
2518 /* IPv4 */ 2518 /* IPv4 */
@@ -2523,7 +2523,7 @@ static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
2523 struct rt6_info *rt = (struct rt6_info *) dst; 2523 struct rt6_info *rt = (struct rt6_info *) dst;
2524 struct in6_addr *pkey = &ipv6_hdr(skb)->daddr; 2524 struct in6_addr *pkey = &ipv6_hdr(skb)->daddr;
2525 2525
2526 if (!ipv6_addr_any(&rt->rt6i_gateway)) 2526 if (rt && !ipv6_addr_any(&rt->rt6i_gateway))
2527 pkey = &rt->rt6i_gateway; 2527 pkey = &rt->rt6i_gateway;
2528 2528
2529 /* IPv6 */ 2529 /* IPv6 */
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index 04efed171c88..f32765d3cbd8 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -212,8 +212,8 @@ static int d7s_probe(struct platform_device *op)
212 212
213 writeb(regs, p->regs); 213 writeb(regs, p->regs);
214 214
215 printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n", 215 printk(KERN_INFO PFX "7-Segment Display%pOF at [%s:0x%llx] %s\n",
216 op->dev.of_node->full_name, 216 op->dev.of_node,
217 (regs & D7S_FLIP) ? " (FLIPPED)" : "", 217 (regs & D7S_FLIP) ? " (FLIPPED)" : "",
218 op->resource[0].start, 218 op->resource[0].start,
219 sol_compat ? "in sol_compat mode" : ""); 219 sol_compat ? "in sol_compat mode" : "");
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 216f923161d1..a610b8d3d11f 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -181,8 +181,8 @@ static int flash_probe(struct platform_device *op)
181 } 181 }
182 flash.busy = 0; 182 flash.busy = 0;
183 183
184 printk(KERN_INFO "%s: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n", 184 printk(KERN_INFO "%pOF: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n",
185 op->dev.of_node->full_name, 185 op->dev.of_node,
186 flash.read_base, flash.read_size, 186 flash.read_base, flash.read_size,
187 flash.write_base, flash.write_size); 187 flash.write_base, flash.write_size);
188 188
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 57696fc0b482..0a5013350acd 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -379,8 +379,8 @@ static int uctrl_probe(struct platform_device *op)
379 } 379 }
380 380
381 sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, &p->regs->uctrl_intr); 381 sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, &p->regs->uctrl_intr);
382 printk(KERN_INFO "%s: uctrl regs[0x%p] (irq %d)\n", 382 printk(KERN_INFO "%pOF: uctrl regs[0x%p] (irq %d)\n",
383 op->dev.of_node->full_name, p->regs, p->irq); 383 op->dev.of_node, p->regs, p->irq);
384 uctrl_get_event_status(p); 384 uctrl_get_event_status(p);
385 uctrl_get_external_status(p); 385 uctrl_get_external_status(p);
386 386
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index d384f4f86c26..d145e0d90227 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -47,6 +47,17 @@ config SCSI_NETLINK
47 default n 47 default n
48 depends on NET 48 depends on NET
49 49
50config SCSI_MQ_DEFAULT
51 bool "SCSI: use blk-mq I/O path by default"
52 depends on SCSI
53 ---help---
54 This option enables the new blk-mq based I/O path for SCSI
55 devices by default. With the option the scsi_mod.use_blk_mq
56 module/boot option defaults to Y, without it to N, but it can
57 still be overridden either way.
58
59 If unsure say N.
60
50config SCSI_PROC_FS 61config SCSI_PROC_FS
51 bool "legacy /proc/scsi/ support" 62 bool "legacy /proc/scsi/ support"
52 depends on SCSI && PROC_FS 63 depends on SCSI && PROC_FS
@@ -1230,6 +1241,8 @@ config SCSI_LPFC
1230 tristate "Emulex LightPulse Fibre Channel Support" 1241 tristate "Emulex LightPulse Fibre Channel Support"
1231 depends on PCI && SCSI 1242 depends on PCI && SCSI
1232 depends on SCSI_FC_ATTRS 1243 depends on SCSI_FC_ATTRS
1244 depends on NVME_TARGET_FC || NVME_TARGET_FC=n
1245 depends on NVME_FC || NVME_FC=n
1233 select CRC_T10DIF 1246 select CRC_T10DIF
1234 ---help--- 1247 ---help---
1235 This lpfc driver supports the Emulex LightPulse 1248 This lpfc driver supports the Emulex LightPulse
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c
index 707ee2f5954d..a1a2c71e1626 100644
--- a/drivers/scsi/aacraid/aachba.c
+++ b/drivers/scsi/aacraid/aachba.c
@@ -549,7 +549,9 @@ static void get_container_name_callback(void *context, struct fib * fibptr)
549 if ((le32_to_cpu(get_name_reply->status) == CT_OK) 549 if ((le32_to_cpu(get_name_reply->status) == CT_OK)
550 && (get_name_reply->data[0] != '\0')) { 550 && (get_name_reply->data[0] != '\0')) {
551 char *sp = get_name_reply->data; 551 char *sp = get_name_reply->data;
552 sp[sizeof(((struct aac_get_name_resp *)NULL)->data)] = '\0'; 552 int data_size = FIELD_SIZEOF(struct aac_get_name_resp, data);
553
554 sp[data_size - 1] = '\0';
553 while (*sp == ' ') 555 while (*sp == ' ')
554 ++sp; 556 ++sp;
555 if (*sp) { 557 if (*sp) {
@@ -579,12 +581,15 @@ static void get_container_name_callback(void *context, struct fib * fibptr)
579static int aac_get_container_name(struct scsi_cmnd * scsicmd) 581static int aac_get_container_name(struct scsi_cmnd * scsicmd)
580{ 582{
581 int status; 583 int status;
584 int data_size;
582 struct aac_get_name *dinfo; 585 struct aac_get_name *dinfo;
583 struct fib * cmd_fibcontext; 586 struct fib * cmd_fibcontext;
584 struct aac_dev * dev; 587 struct aac_dev * dev;
585 588
586 dev = (struct aac_dev *)scsicmd->device->host->hostdata; 589 dev = (struct aac_dev *)scsicmd->device->host->hostdata;
587 590
591 data_size = FIELD_SIZEOF(struct aac_get_name_resp, data);
592
588 cmd_fibcontext = aac_fib_alloc_tag(dev, scsicmd); 593 cmd_fibcontext = aac_fib_alloc_tag(dev, scsicmd);
589 594
590 aac_fib_init(cmd_fibcontext); 595 aac_fib_init(cmd_fibcontext);
@@ -593,7 +598,7 @@ static int aac_get_container_name(struct scsi_cmnd * scsicmd)
593 dinfo->command = cpu_to_le32(VM_ContainerConfig); 598 dinfo->command = cpu_to_le32(VM_ContainerConfig);
594 dinfo->type = cpu_to_le32(CT_READ_NAME); 599 dinfo->type = cpu_to_le32(CT_READ_NAME);
595 dinfo->cid = cpu_to_le32(scmd_id(scsicmd)); 600 dinfo->cid = cpu_to_le32(scmd_id(scsicmd));
596 dinfo->count = cpu_to_le32(sizeof(((struct aac_get_name_resp *)NULL)->data)); 601 dinfo->count = cpu_to_le32(data_size - 1);
597 602
598 status = aac_fib_send(ContainerCommand, 603 status = aac_fib_send(ContainerCommand,
599 cmd_fibcontext, 604 cmd_fibcontext,
@@ -3198,10 +3203,11 @@ static int query_disk(struct aac_dev *dev, void __user *arg)
3198 return -EBUSY; 3203 return -EBUSY;
3199 if (copy_from_user(&qd, arg, sizeof (struct aac_query_disk))) 3204 if (copy_from_user(&qd, arg, sizeof (struct aac_query_disk)))
3200 return -EFAULT; 3205 return -EFAULT;
3201 if (qd.cnum == -1) 3206 if (qd.cnum == -1) {
3207 if (qd.id < 0 || qd.id >= dev->maximum_num_containers)
3208 return -EINVAL;
3202 qd.cnum = qd.id; 3209 qd.cnum = qd.id;
3203 else if ((qd.bus == -1) && (qd.id == -1) && (qd.lun == -1)) 3210 } else if ((qd.bus == -1) && (qd.id == -1) && (qd.lun == -1)) {
3204 {
3205 if (qd.cnum < 0 || qd.cnum >= dev->maximum_num_containers) 3211 if (qd.cnum < 0 || qd.cnum >= dev->maximum_num_containers)
3206 return -EINVAL; 3212 return -EINVAL;
3207 qd.instance = dev->scsi_host_ptr->host_no; 3213 qd.instance = dev->scsi_host_ptr->host_no;
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index d31a9bc2ba69..ee2667e20e42 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -2274,7 +2274,7 @@ struct aac_get_name_resp {
2274 __le32 parm3; 2274 __le32 parm3;
2275 __le32 parm4; 2275 __le32 parm4;
2276 __le32 parm5; 2276 __le32 parm5;
2277 u8 data[16]; 2277 u8 data[17];
2278}; 2278};
2279 2279
2280#define CT_CID_TO_32BITS_UID 165 2280#define CT_CID_TO_32BITS_UID 165
diff --git a/drivers/scsi/aic7xxx/Makefile b/drivers/scsi/aic7xxx/Makefile
index 741d81861d17..07b60a780c06 100644
--- a/drivers/scsi/aic7xxx/Makefile
+++ b/drivers/scsi/aic7xxx/Makefile
@@ -55,9 +55,9 @@ aicasm-7xxx-opts-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT) := \
55 55
56ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y) 56ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
57$(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm 57$(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg $(obj)/aicasm/aicasm
58 $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic7xxx_reg.h \ 58 $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic7xxx_reg.h \
59 $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \ 59 $(aicasm-7xxx-opts-y) -o $(obj)/aic7xxx_seq.h \
60 $(src)/aic7xxx.seq 60 $(srctree)/$(src)/aic7xxx.seq
61 61
62$(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h 62$(aic7xxx-gen-y): $(obj)/aic7xxx_seq.h
63else 63else
@@ -72,14 +72,14 @@ aicasm-79xx-opts-$(CONFIG_AIC79XX_REG_PRETTY_PRINT) := \
72 72
73ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y) 73ifeq ($(CONFIG_AIC79XX_BUILD_FIRMWARE),y)
74$(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm 74$(obj)/aic79xx_seq.h: $(src)/aic79xx.seq $(src)/aic79xx.reg $(obj)/aicasm/aicasm
75 $(obj)/aicasm/aicasm -I$(src) -r $(obj)/aic79xx_reg.h \ 75 $(obj)/aicasm/aicasm -I$(srctree)/$(src) -r $(obj)/aic79xx_reg.h \
76 $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \ 76 $(aicasm-79xx-opts-y) -o $(obj)/aic79xx_seq.h \
77 $(src)/aic79xx.seq 77 $(srctree)/$(src)/aic79xx.seq
78 78
79$(aic79xx-gen-y): $(obj)/aic79xx_seq.h 79$(aic79xx-gen-y): $(obj)/aic79xx_seq.h
80else 80else
81$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped 81$(obj)/aic79xx_reg_print.c: $(src)/aic79xx_reg_print.c_shipped
82endif 82endif
83 83
84$(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl] 84$(obj)/aicasm/aicasm: $(srctree)/$(src)/aicasm/*.[chyl]
85 $(MAKE) -C $(src)/aicasm 85 $(MAKE) -C $(srctree)/$(src)/aicasm OUTDIR=$(shell pwd)/$(obj)/aicasm/
diff --git a/drivers/scsi/aic7xxx/aicasm/Makefile b/drivers/scsi/aic7xxx/aicasm/Makefile
index b98c5c1056c3..45e2d49c1fff 100644
--- a/drivers/scsi/aic7xxx/aicasm/Makefile
+++ b/drivers/scsi/aic7xxx/aicasm/Makefile
@@ -1,19 +1,21 @@
1PROG= aicasm 1PROG= aicasm
2 2
3OUTDIR ?= ./
4
3.SUFFIXES= .l .y .c .h 5.SUFFIXES= .l .y .c .h
4 6
5CSRCS= aicasm.c aicasm_symbol.c 7CSRCS= aicasm.c aicasm_symbol.c
6YSRCS= aicasm_gram.y aicasm_macro_gram.y 8YSRCS= aicasm_gram.y aicasm_macro_gram.y
7LSRCS= aicasm_scan.l aicasm_macro_scan.l 9LSRCS= aicasm_scan.l aicasm_macro_scan.l
8 10
9GENHDRS= aicdb.h $(YSRCS:.y=.h) 11GENHDRS= $(addprefix ${OUTDIR}/,aicdb.h $(YSRCS:.y=.h))
10GENSRCS= $(YSRCS:.y=.c) $(LSRCS:.l=.c) 12GENSRCS= $(addprefix ${OUTDIR}/,$(YSRCS:.y=.c) $(LSRCS:.l=.c))
11 13
12SRCS= ${CSRCS} ${GENSRCS} 14SRCS= ${CSRCS} ${GENSRCS}
13LIBS= -ldb 15LIBS= -ldb
14clean-files:= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output) $(PROG) 16clean-files:= ${GENSRCS} ${GENHDRS} $(YSRCS:.y=.output) $(PROG)
15# Override default kernel CFLAGS. This is a userland app. 17# Override default kernel CFLAGS. This is a userland app.
16AICASM_CFLAGS:= -I/usr/include -I. 18AICASM_CFLAGS:= -I/usr/include -I. -I$(OUTDIR)
17LEX= flex 19LEX= flex
18YACC= bison 20YACC= bison
19YFLAGS= -d 21YFLAGS= -d
@@ -32,22 +34,25 @@ YFLAGS+= -t -v
32LFLAGS= -d 34LFLAGS= -d
33endif 35endif
34 36
35$(PROG): ${GENHDRS} $(SRCS) 37$(PROG): $(OUTDIR) ${GENHDRS} $(SRCS)
36 $(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(PROG) $(LIBS) 38 $(AICASM_CC) $(AICASM_CFLAGS) $(SRCS) -o $(OUTDIR)/$(PROG) $(LIBS)
39
40$(OUTDIR):
41 mkdir -p $(OUTDIR)
37 42
38aicdb.h: 43$(OUTDIR)/aicdb.h:
39 @if [ -e "/usr/include/db4/db_185.h" ]; then \ 44 @if [ -e "/usr/include/db4/db_185.h" ]; then \
40 echo "#include <db4/db_185.h>" > aicdb.h; \ 45 echo "#include <db4/db_185.h>" > $@; \
41 elif [ -e "/usr/include/db3/db_185.h" ]; then \ 46 elif [ -e "/usr/include/db3/db_185.h" ]; then \
42 echo "#include <db3/db_185.h>" > aicdb.h; \ 47 echo "#include <db3/db_185.h>" > $@; \
43 elif [ -e "/usr/include/db2/db_185.h" ]; then \ 48 elif [ -e "/usr/include/db2/db_185.h" ]; then \
44 echo "#include <db2/db_185.h>" > aicdb.h; \ 49 echo "#include <db2/db_185.h>" > $@; \
45 elif [ -e "/usr/include/db1/db_185.h" ]; then \ 50 elif [ -e "/usr/include/db1/db_185.h" ]; then \
46 echo "#include <db1/db_185.h>" > aicdb.h; \ 51 echo "#include <db1/db_185.h>" > $@; \
47 elif [ -e "/usr/include/db/db_185.h" ]; then \ 52 elif [ -e "/usr/include/db/db_185.h" ]; then \
48 echo "#include <db/db_185.h>" > aicdb.h; \ 53 echo "#include <db/db_185.h>" > $@; \
49 elif [ -e "/usr/include/db_185.h" ]; then \ 54 elif [ -e "/usr/include/db_185.h" ]; then \
50 echo "#include <db_185.h>" > aicdb.h; \ 55 echo "#include <db_185.h>" > $@; \
51 else \ 56 else \
52 echo "*** Install db development libraries"; \ 57 echo "*** Install db development libraries"; \
53 fi 58 fi
@@ -58,23 +63,23 @@ clean:
58# Create a dependency chain in generated files 63# Create a dependency chain in generated files
59# to avoid concurrent invocations of the single 64# to avoid concurrent invocations of the single
60# rule that builds them all. 65# rule that builds them all.
61aicasm_gram.c: aicasm_gram.h 66$(OUTDIR)/aicasm_gram.c: $(OUTDIR)/aicasm_gram.h
62aicasm_gram.c aicasm_gram.h: aicasm_gram.y 67$(OUTDIR)/aicasm_gram.c $(OUTDIR)/aicasm_gram.h: aicasm_gram.y
63 $(YACC) $(YFLAGS) -b $(<:.y=) $< 68 $(YACC) $(YFLAGS) -b $(<:.y=) $<
64 mv $(<:.y=).tab.c $(<:.y=.c) 69 mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
65 mv $(<:.y=).tab.h $(<:.y=.h) 70 mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
66 71
67# Create a dependency chain in generated files 72# Create a dependency chain in generated files
68# to avoid concurrent invocations of the single 73# to avoid concurrent invocations of the single
69# rule that builds them all. 74# rule that builds them all.
70aicasm_macro_gram.c: aicasm_macro_gram.h 75$(OUTDIR)/aicasm_macro_gram.c: $(OUTDIR)/aicasm_macro_gram.h
71aicasm_macro_gram.c aicasm_macro_gram.h: aicasm_macro_gram.y 76$(OUTDIR)/aicasm_macro_gram.c $(OUTDIR)/aicasm_macro_gram.h: aicasm_macro_gram.y
72 $(YACC) $(YFLAGS) -b $(<:.y=) -p mm $< 77 $(YACC) $(YFLAGS) -b $(<:.y=) -p mm $<
73 mv $(<:.y=).tab.c $(<:.y=.c) 78 mv $(<:.y=).tab.c $(OUTDIR)/$(<:.y=.c)
74 mv $(<:.y=).tab.h $(<:.y=.h) 79 mv $(<:.y=).tab.h $(OUTDIR)/$(<:.y=.h)
75 80
76aicasm_scan.c: aicasm_scan.l 81$(OUTDIR)/aicasm_scan.c: aicasm_scan.l
77 $(LEX) $(LFLAGS) -o$@ $< 82 $(LEX) $(LFLAGS) -o $@ $<
78 83
79aicasm_macro_scan.c: aicasm_macro_scan.l 84$(OUTDIR)/aicasm_macro_scan.c: aicasm_macro_scan.l
80 $(LEX) $(LFLAGS) -Pmm -o$@ $< 85 $(LEX) $(LFLAGS) -Pmm -o $@ $<
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 7dfe709a7138..6844ba361616 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -2624,12 +2624,11 @@ static struct fcoe_transport bnx2fc_transport = {
2624}; 2624};
2625 2625
2626/** 2626/**
2627 * bnx2fc_percpu_thread_create - Create a receive thread for an 2627 * bnx2fc_cpu_online - Create a receive thread for an online CPU
2628 * online CPU
2629 * 2628 *
2630 * @cpu: cpu index for the online cpu 2629 * @cpu: cpu index for the online cpu
2631 */ 2630 */
2632static void bnx2fc_percpu_thread_create(unsigned int cpu) 2631static int bnx2fc_cpu_online(unsigned int cpu)
2633{ 2632{
2634 struct bnx2fc_percpu_s *p; 2633 struct bnx2fc_percpu_s *p;
2635 struct task_struct *thread; 2634 struct task_struct *thread;
@@ -2639,15 +2638,17 @@ static void bnx2fc_percpu_thread_create(unsigned int cpu)
2639 thread = kthread_create_on_node(bnx2fc_percpu_io_thread, 2638 thread = kthread_create_on_node(bnx2fc_percpu_io_thread,
2640 (void *)p, cpu_to_node(cpu), 2639 (void *)p, cpu_to_node(cpu),
2641 "bnx2fc_thread/%d", cpu); 2640 "bnx2fc_thread/%d", cpu);
2641 if (IS_ERR(thread))
2642 return PTR_ERR(thread);
2643
2642 /* bind thread to the cpu */ 2644 /* bind thread to the cpu */
2643 if (likely(!IS_ERR(thread))) { 2645 kthread_bind(thread, cpu);
2644 kthread_bind(thread, cpu); 2646 p->iothread = thread;
2645 p->iothread = thread; 2647 wake_up_process(thread);
2646 wake_up_process(thread); 2648 return 0;
2647 }
2648} 2649}
2649 2650
2650static void bnx2fc_percpu_thread_destroy(unsigned int cpu) 2651static int bnx2fc_cpu_offline(unsigned int cpu)
2651{ 2652{
2652 struct bnx2fc_percpu_s *p; 2653 struct bnx2fc_percpu_s *p;
2653 struct task_struct *thread; 2654 struct task_struct *thread;
@@ -2661,7 +2662,6 @@ static void bnx2fc_percpu_thread_destroy(unsigned int cpu)
2661 thread = p->iothread; 2662 thread = p->iothread;
2662 p->iothread = NULL; 2663 p->iothread = NULL;
2663 2664
2664
2665 /* Free all work in the list */ 2665 /* Free all work in the list */
2666 list_for_each_entry_safe(work, tmp, &p->work_list, list) { 2666 list_for_each_entry_safe(work, tmp, &p->work_list, list) {
2667 list_del_init(&work->list); 2667 list_del_init(&work->list);
@@ -2673,20 +2673,6 @@ static void bnx2fc_percpu_thread_destroy(unsigned int cpu)
2673 2673
2674 if (thread) 2674 if (thread)
2675 kthread_stop(thread); 2675 kthread_stop(thread);
2676}
2677
2678
2679static int bnx2fc_cpu_online(unsigned int cpu)
2680{
2681 printk(PFX "CPU %x online: Create Rx thread\n", cpu);
2682 bnx2fc_percpu_thread_create(cpu);
2683 return 0;
2684}
2685
2686static int bnx2fc_cpu_dead(unsigned int cpu)
2687{
2688 printk(PFX "CPU %x offline: Remove Rx thread\n", cpu);
2689 bnx2fc_percpu_thread_destroy(cpu);
2690 return 0; 2676 return 0;
2691} 2677}
2692 2678
@@ -2761,30 +2747,16 @@ static int __init bnx2fc_mod_init(void)
2761 spin_lock_init(&p->fp_work_lock); 2747 spin_lock_init(&p->fp_work_lock);
2762 } 2748 }
2763 2749
2764 get_online_cpus(); 2750 rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "scsi/bnx2fc:online",
2765 2751 bnx2fc_cpu_online, bnx2fc_cpu_offline);
2766 for_each_online_cpu(cpu)
2767 bnx2fc_percpu_thread_create(cpu);
2768
2769 rc = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,
2770 "scsi/bnx2fc:online",
2771 bnx2fc_cpu_online, NULL);
2772 if (rc < 0) 2752 if (rc < 0)
2773 goto stop_threads; 2753 goto stop_thread;
2774 bnx2fc_online_state = rc; 2754 bnx2fc_online_state = rc;
2775 2755
2776 cpuhp_setup_state_nocalls(CPUHP_SCSI_BNX2FC_DEAD, "scsi/bnx2fc:dead",
2777 NULL, bnx2fc_cpu_dead);
2778 put_online_cpus();
2779
2780 cnic_register_driver(CNIC_ULP_FCOE, &bnx2fc_cnic_cb); 2756 cnic_register_driver(CNIC_ULP_FCOE, &bnx2fc_cnic_cb);
2781
2782 return 0; 2757 return 0;
2783 2758
2784stop_threads: 2759stop_thread:
2785 for_each_online_cpu(cpu)
2786 bnx2fc_percpu_thread_destroy(cpu);
2787 put_online_cpus();
2788 kthread_stop(l2_thread); 2760 kthread_stop(l2_thread);
2789free_wq: 2761free_wq:
2790 destroy_workqueue(bnx2fc_wq); 2762 destroy_workqueue(bnx2fc_wq);
@@ -2803,7 +2775,6 @@ static void __exit bnx2fc_mod_exit(void)
2803 struct fcoe_percpu_s *bg; 2775 struct fcoe_percpu_s *bg;
2804 struct task_struct *l2_thread; 2776 struct task_struct *l2_thread;
2805 struct sk_buff *skb; 2777 struct sk_buff *skb;
2806 unsigned int cpu = 0;
2807 2778
2808 /* 2779 /*
2809 * NOTE: Since cnic calls register_driver routine rtnl_lock, 2780 * NOTE: Since cnic calls register_driver routine rtnl_lock,
@@ -2844,16 +2815,7 @@ static void __exit bnx2fc_mod_exit(void)
2844 if (l2_thread) 2815 if (l2_thread)
2845 kthread_stop(l2_thread); 2816 kthread_stop(l2_thread);
2846 2817
2847 get_online_cpus(); 2818 cpuhp_remove_state(bnx2fc_online_state);
2848 /* Destroy per cpu threads */
2849 for_each_online_cpu(cpu) {
2850 bnx2fc_percpu_thread_destroy(cpu);
2851 }
2852
2853 cpuhp_remove_state_nocalls(bnx2fc_online_state);
2854 cpuhp_remove_state_nocalls(CPUHP_SCSI_BNX2FC_DEAD);
2855
2856 put_online_cpus();
2857 2819
2858 destroy_workqueue(bnx2fc_wq); 2820 destroy_workqueue(bnx2fc_wq);
2859 /* 2821 /*
diff --git a/drivers/scsi/bnx2fc/bnx2fc_hwi.c b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
index 913c750205ce..26de61d65a4d 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_hwi.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_hwi.c
@@ -1008,6 +1008,28 @@ static struct bnx2fc_work *bnx2fc_alloc_work(struct bnx2fc_rport *tgt, u16 wqe)
1008 return work; 1008 return work;
1009} 1009}
1010 1010
1011/* Pending work request completion */
1012static void bnx2fc_pending_work(struct bnx2fc_rport *tgt, unsigned int wqe)
1013{
1014 unsigned int cpu = wqe % num_possible_cpus();
1015 struct bnx2fc_percpu_s *fps;
1016 struct bnx2fc_work *work;
1017
1018 fps = &per_cpu(bnx2fc_percpu, cpu);
1019 spin_lock_bh(&fps->fp_work_lock);
1020 if (fps->iothread) {
1021 work = bnx2fc_alloc_work(tgt, wqe);
1022 if (work) {
1023 list_add_tail(&work->list, &fps->work_list);
1024 wake_up_process(fps->iothread);
1025 spin_unlock_bh(&fps->fp_work_lock);
1026 return;
1027 }
1028 }
1029 spin_unlock_bh(&fps->fp_work_lock);
1030 bnx2fc_process_cq_compl(tgt, wqe);
1031}
1032
1011int bnx2fc_process_new_cqes(struct bnx2fc_rport *tgt) 1033int bnx2fc_process_new_cqes(struct bnx2fc_rport *tgt)
1012{ 1034{
1013 struct fcoe_cqe *cq; 1035 struct fcoe_cqe *cq;
@@ -1042,28 +1064,7 @@ int bnx2fc_process_new_cqes(struct bnx2fc_rport *tgt)
1042 /* Unsolicited event notification */ 1064 /* Unsolicited event notification */
1043 bnx2fc_process_unsol_compl(tgt, wqe); 1065 bnx2fc_process_unsol_compl(tgt, wqe);
1044 } else { 1066 } else {
1045 /* Pending work request completion */ 1067 bnx2fc_pending_work(tgt, wqe);
1046 struct bnx2fc_work *work = NULL;
1047 struct bnx2fc_percpu_s *fps = NULL;
1048 unsigned int cpu = wqe % num_possible_cpus();
1049
1050 fps = &per_cpu(bnx2fc_percpu, cpu);
1051 spin_lock_bh(&fps->fp_work_lock);
1052 if (unlikely(!fps->iothread))
1053 goto unlock;
1054
1055 work = bnx2fc_alloc_work(tgt, wqe);
1056 if (work)
1057 list_add_tail(&work->list,
1058 &fps->work_list);
1059unlock:
1060 spin_unlock_bh(&fps->fp_work_lock);
1061
1062 /* Pending work request completion */
1063 if (fps->iothread && work)
1064 wake_up_process(fps->iothread);
1065 else
1066 bnx2fc_process_cq_compl(tgt, wqe);
1067 num_free_sqes++; 1068 num_free_sqes++;
1068 } 1069 }
1069 cqe++; 1070 cqe++;
diff --git a/drivers/scsi/bnx2i/bnx2i_init.c b/drivers/scsi/bnx2i/bnx2i_init.c
index 86afc002814c..4ebcda8d9500 100644
--- a/drivers/scsi/bnx2i/bnx2i_init.c
+++ b/drivers/scsi/bnx2i/bnx2i_init.c
@@ -404,12 +404,11 @@ int bnx2i_get_stats(void *handle)
404 404
405 405
406/** 406/**
407 * bnx2i_percpu_thread_create - Create a receive thread for an 407 * bnx2i_cpu_online - Create a receive thread for an online CPU
408 * online CPU
409 * 408 *
410 * @cpu: cpu index for the online cpu 409 * @cpu: cpu index for the online cpu
411 */ 410 */
412static void bnx2i_percpu_thread_create(unsigned int cpu) 411static int bnx2i_cpu_online(unsigned int cpu)
413{ 412{
414 struct bnx2i_percpu_s *p; 413 struct bnx2i_percpu_s *p;
415 struct task_struct *thread; 414 struct task_struct *thread;
@@ -419,16 +418,17 @@ static void bnx2i_percpu_thread_create(unsigned int cpu)
419 thread = kthread_create_on_node(bnx2i_percpu_io_thread, (void *)p, 418 thread = kthread_create_on_node(bnx2i_percpu_io_thread, (void *)p,
420 cpu_to_node(cpu), 419 cpu_to_node(cpu),
421 "bnx2i_thread/%d", cpu); 420 "bnx2i_thread/%d", cpu);
421 if (IS_ERR(thread))
422 return PTR_ERR(thread);
423
422 /* bind thread to the cpu */ 424 /* bind thread to the cpu */
423 if (likely(!IS_ERR(thread))) { 425 kthread_bind(thread, cpu);
424 kthread_bind(thread, cpu); 426 p->iothread = thread;
425 p->iothread = thread; 427 wake_up_process(thread);
426 wake_up_process(thread); 428 return 0;
427 }
428} 429}
429 430
430 431static int bnx2i_cpu_offline(unsigned int cpu)
431static void bnx2i_percpu_thread_destroy(unsigned int cpu)
432{ 432{
433 struct bnx2i_percpu_s *p; 433 struct bnx2i_percpu_s *p;
434 struct task_struct *thread; 434 struct task_struct *thread;
@@ -451,19 +451,6 @@ static void bnx2i_percpu_thread_destroy(unsigned int cpu)
451 spin_unlock_bh(&p->p_work_lock); 451 spin_unlock_bh(&p->p_work_lock);
452 if (thread) 452 if (thread)
453 kthread_stop(thread); 453 kthread_stop(thread);
454}
455
456static int bnx2i_cpu_online(unsigned int cpu)
457{
458 pr_info("bnx2i: CPU %x online: Create Rx thread\n", cpu);
459 bnx2i_percpu_thread_create(cpu);
460 return 0;
461}
462
463static int bnx2i_cpu_dead(unsigned int cpu)
464{
465 pr_info("CPU %x offline: Remove Rx thread\n", cpu);
466 bnx2i_percpu_thread_destroy(cpu);
467 return 0; 454 return 0;
468} 455}
469 456
@@ -511,27 +498,14 @@ static int __init bnx2i_mod_init(void)
511 p->iothread = NULL; 498 p->iothread = NULL;
512 } 499 }
513 500
514 get_online_cpus(); 501 err = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "scsi/bnx2i:online",
515 502 bnx2i_cpu_online, bnx2i_cpu_offline);
516 for_each_online_cpu(cpu)
517 bnx2i_percpu_thread_create(cpu);
518
519 err = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,
520 "scsi/bnx2i:online",
521 bnx2i_cpu_online, NULL);
522 if (err < 0) 503 if (err < 0)
523 goto remove_threads; 504 goto unreg_driver;
524 bnx2i_online_state = err; 505 bnx2i_online_state = err;
525
526 cpuhp_setup_state_nocalls(CPUHP_SCSI_BNX2I_DEAD, "scsi/bnx2i:dead",
527 NULL, bnx2i_cpu_dead);
528 put_online_cpus();
529 return 0; 506 return 0;
530 507
531remove_threads: 508unreg_driver:
532 for_each_online_cpu(cpu)
533 bnx2i_percpu_thread_destroy(cpu);
534 put_online_cpus();
535 cnic_unregister_driver(CNIC_ULP_ISCSI); 509 cnic_unregister_driver(CNIC_ULP_ISCSI);
536unreg_xport: 510unreg_xport:
537 iscsi_unregister_transport(&bnx2i_iscsi_transport); 511 iscsi_unregister_transport(&bnx2i_iscsi_transport);
@@ -551,7 +525,6 @@ out:
551static void __exit bnx2i_mod_exit(void) 525static void __exit bnx2i_mod_exit(void)
552{ 526{
553 struct bnx2i_hba *hba; 527 struct bnx2i_hba *hba;
554 unsigned cpu = 0;
555 528
556 mutex_lock(&bnx2i_dev_lock); 529 mutex_lock(&bnx2i_dev_lock);
557 while (!list_empty(&adapter_list)) { 530 while (!list_empty(&adapter_list)) {
@@ -569,14 +542,7 @@ static void __exit bnx2i_mod_exit(void)
569 } 542 }
570 mutex_unlock(&bnx2i_dev_lock); 543 mutex_unlock(&bnx2i_dev_lock);
571 544
572 get_online_cpus(); 545 cpuhp_remove_state(bnx2i_online_state);
573
574 for_each_online_cpu(cpu)
575 bnx2i_percpu_thread_destroy(cpu);
576
577 cpuhp_remove_state_nocalls(bnx2i_online_state);
578 cpuhp_remove_state_nocalls(CPUHP_SCSI_BNX2I_DEAD);
579 put_online_cpus();
580 546
581 iscsi_unregister_transport(&bnx2i_iscsi_transport); 547 iscsi_unregister_transport(&bnx2i_iscsi_transport);
582 cnic_unregister_driver(CNIC_ULP_ISCSI); 548 cnic_unregister_driver(CNIC_ULP_ISCSI);
diff --git a/drivers/scsi/csiostor/csio_hw.c b/drivers/scsi/csiostor/csio_hw.c
index 2029ad225121..5be0086142ca 100644
--- a/drivers/scsi/csiostor/csio_hw.c
+++ b/drivers/scsi/csiostor/csio_hw.c
@@ -3845,8 +3845,10 @@ csio_hw_start(struct csio_hw *hw)
3845 3845
3846 if (csio_is_hw_ready(hw)) 3846 if (csio_is_hw_ready(hw))
3847 return 0; 3847 return 0;
3848 else 3848 else if (csio_match_state(hw, csio_hws_uninit))
3849 return -EINVAL; 3849 return -EINVAL;
3850 else
3851 return -ENODEV;
3850} 3852}
3851 3853
3852int 3854int
diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
index ea0c31086cc6..dcd074169aa9 100644
--- a/drivers/scsi/csiostor/csio_init.c
+++ b/drivers/scsi/csiostor/csio_init.c
@@ -969,10 +969,14 @@ static int csio_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
969 969
970 pci_set_drvdata(pdev, hw); 970 pci_set_drvdata(pdev, hw);
971 971
972 if (csio_hw_start(hw) != 0) { 972 rv = csio_hw_start(hw);
973 dev_err(&pdev->dev, 973 if (rv) {
974 "Failed to start FW, continuing in debug mode.\n"); 974 if (rv == -EINVAL) {
975 return 0; 975 dev_err(&pdev->dev,
976 "Failed to start FW, continuing in debug mode.\n");
977 return 0;
978 }
979 goto err_lnode_exit;
976 } 980 }
977 981
978 sprintf(hw->fwrev_str, "%u.%u.%u.%u\n", 982 sprintf(hw->fwrev_str, "%u.%u.%u.%u\n",
diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
index a69a9ac836f5..1d02cf9fe06c 100644
--- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
+++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c
@@ -1635,6 +1635,9 @@ static int init_act_open(struct cxgbi_sock *csk)
1635 goto rel_resource; 1635 goto rel_resource;
1636 } 1636 }
1637 1637
1638 if (!(n->nud_state & NUD_VALID))
1639 neigh_event_send(n, NULL);
1640
1638 csk->atid = cxgb4_alloc_atid(lldi->tids, csk); 1641 csk->atid = cxgb4_alloc_atid(lldi->tids, csk);
1639 if (csk->atid < 0) { 1642 if (csk->atid < 0) {
1640 pr_err("%s, NO atid available.\n", ndev->name); 1643 pr_err("%s, NO atid available.\n", ndev->name);
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index e4c83b7c96a8..1a4cfa562a60 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -2128,6 +2128,13 @@ void cxgbi_cleanup_task(struct iscsi_task *task)
2128 struct iscsi_tcp_task *tcp_task = task->dd_data; 2128 struct iscsi_tcp_task *tcp_task = task->dd_data;
2129 struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task); 2129 struct cxgbi_task_data *tdata = iscsi_task_cxgbi_data(task);
2130 2130
2131 if (!tcp_task || !tdata || (tcp_task->dd_data != tdata)) {
2132 pr_info("task 0x%p,0x%p, tcp_task 0x%p, tdata 0x%p/0x%p.\n",
2133 task, task->sc, tcp_task,
2134 tcp_task ? tcp_task->dd_data : NULL, tdata);
2135 return;
2136 }
2137
2131 log_debug(1 << CXGBI_DBG_ISCSI, 2138 log_debug(1 << CXGBI_DBG_ISCSI,
2132 "task 0x%p, skb 0x%p, itt 0x%x.\n", 2139 "task 0x%p, skb 0x%p, itt 0x%x.\n",
2133 task, tdata->skb, task->hdr_itt); 2140 task, tdata->skb, task->hdr_itt);
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index b0c68d24db01..da5bdbdcce52 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -3351,6 +3351,16 @@ static void ipr_worker_thread(struct work_struct *work)
3351 return; 3351 return;
3352 } 3352 }
3353 3353
3354 if (ioa_cfg->scsi_unblock) {
3355 ioa_cfg->scsi_unblock = 0;
3356 ioa_cfg->scsi_blocked = 0;
3357 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
3358 scsi_unblock_requests(ioa_cfg->host);
3359 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
3360 if (ioa_cfg->scsi_blocked)
3361 scsi_block_requests(ioa_cfg->host);
3362 }
3363
3354 if (!ioa_cfg->scan_enabled) { 3364 if (!ioa_cfg->scan_enabled) {
3355 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 3365 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
3356 return; 3366 return;
@@ -7211,9 +7221,8 @@ static int ipr_ioa_bringdown_done(struct ipr_cmnd *ipr_cmd)
7211 ENTER; 7221 ENTER;
7212 if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) { 7222 if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
7213 ipr_trace; 7223 ipr_trace;
7214 spin_unlock_irq(ioa_cfg->host->host_lock); 7224 ioa_cfg->scsi_unblock = 1;
7215 scsi_unblock_requests(ioa_cfg->host); 7225 schedule_work(&ioa_cfg->work_q);
7216 spin_lock_irq(ioa_cfg->host->host_lock);
7217 } 7226 }
7218 7227
7219 ioa_cfg->in_reset_reload = 0; 7228 ioa_cfg->in_reset_reload = 0;
@@ -7287,13 +7296,7 @@ static int ipr_ioa_reset_done(struct ipr_cmnd *ipr_cmd)
7287 list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q); 7296 list_add_tail(&ipr_cmd->queue, &ipr_cmd->hrrq->hrrq_free_q);
7288 wake_up_all(&ioa_cfg->reset_wait_q); 7297 wake_up_all(&ioa_cfg->reset_wait_q);
7289 7298
7290 spin_unlock(ioa_cfg->host->host_lock); 7299 ioa_cfg->scsi_unblock = 1;
7291 scsi_unblock_requests(ioa_cfg->host);
7292 spin_lock(ioa_cfg->host->host_lock);
7293
7294 if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].allow_cmds)
7295 scsi_block_requests(ioa_cfg->host);
7296
7297 schedule_work(&ioa_cfg->work_q); 7300 schedule_work(&ioa_cfg->work_q);
7298 LEAVE; 7301 LEAVE;
7299 return IPR_RC_JOB_RETURN; 7302 return IPR_RC_JOB_RETURN;
@@ -9249,8 +9252,11 @@ static void _ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg,
9249 spin_unlock(&ioa_cfg->hrrq[i]._lock); 9252 spin_unlock(&ioa_cfg->hrrq[i]._lock);
9250 } 9253 }
9251 wmb(); 9254 wmb();
9252 if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) 9255 if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
9256 ioa_cfg->scsi_unblock = 0;
9257 ioa_cfg->scsi_blocked = 1;
9253 scsi_block_requests(ioa_cfg->host); 9258 scsi_block_requests(ioa_cfg->host);
9259 }
9254 9260
9255 ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg); 9261 ipr_cmd = ipr_get_free_ipr_cmnd(ioa_cfg);
9256 ioa_cfg->reset_cmd = ipr_cmd; 9262 ioa_cfg->reset_cmd = ipr_cmd;
@@ -9306,9 +9312,8 @@ static void ipr_initiate_ioa_reset(struct ipr_ioa_cfg *ioa_cfg,
9306 wake_up_all(&ioa_cfg->reset_wait_q); 9312 wake_up_all(&ioa_cfg->reset_wait_q);
9307 9313
9308 if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) { 9314 if (!ioa_cfg->hrrq[IPR_INIT_HRRQ].removing_ioa) {
9309 spin_unlock_irq(ioa_cfg->host->host_lock); 9315 ioa_cfg->scsi_unblock = 1;
9310 scsi_unblock_requests(ioa_cfg->host); 9316 schedule_work(&ioa_cfg->work_q);
9311 spin_lock_irq(ioa_cfg->host->host_lock);
9312 } 9317 }
9313 return; 9318 return;
9314 } else { 9319 } else {
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h
index e98a87a65335..c7f0e9e3cd7d 100644
--- a/drivers/scsi/ipr.h
+++ b/drivers/scsi/ipr.h
@@ -1488,6 +1488,8 @@ struct ipr_ioa_cfg {
1488 u8 cfg_locked:1; 1488 u8 cfg_locked:1;
1489 u8 clear_isr:1; 1489 u8 clear_isr:1;
1490 u8 probe_done:1; 1490 u8 probe_done:1;
1491 u8 scsi_unblock:1;
1492 u8 scsi_blocked:1;
1491 1493
1492 u8 revid; 1494 u8 revid;
1493 1495
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 4ed48ed38e79..7ee1a94c0b33 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -205,8 +205,10 @@ lpfc_nvme_info_show(struct device *dev, struct device_attribute *attr,
205 atomic_read(&tgtp->xmt_ls_rsp_error)); 205 atomic_read(&tgtp->xmt_ls_rsp_error));
206 206
207 len += snprintf(buf+len, PAGE_SIZE-len, 207 len += snprintf(buf+len, PAGE_SIZE-len,
208 "FCP: Rcv %08x Release %08x Drop %08x\n", 208 "FCP: Rcv %08x Defer %08x Release %08x "
209 "Drop %08x\n",
209 atomic_read(&tgtp->rcv_fcp_cmd_in), 210 atomic_read(&tgtp->rcv_fcp_cmd_in),
211 atomic_read(&tgtp->rcv_fcp_cmd_defer),
210 atomic_read(&tgtp->xmt_fcp_release), 212 atomic_read(&tgtp->xmt_fcp_release),
211 atomic_read(&tgtp->rcv_fcp_cmd_drop)); 213 atomic_read(&tgtp->rcv_fcp_cmd_drop));
212 214
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index 5cc8b0f7d885..744f3f395b64 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -782,8 +782,11 @@ lpfc_debugfs_nvmestat_data(struct lpfc_vport *vport, char *buf, int size)
782 atomic_read(&tgtp->xmt_ls_rsp_error)); 782 atomic_read(&tgtp->xmt_ls_rsp_error));
783 783
784 len += snprintf(buf + len, size - len, 784 len += snprintf(buf + len, size - len,
785 "FCP: Rcv %08x Drop %08x\n", 785 "FCP: Rcv %08x Defer %08x Release %08x "
786 "Drop %08x\n",
786 atomic_read(&tgtp->rcv_fcp_cmd_in), 787 atomic_read(&tgtp->rcv_fcp_cmd_in),
788 atomic_read(&tgtp->rcv_fcp_cmd_defer),
789 atomic_read(&tgtp->xmt_fcp_release),
787 atomic_read(&tgtp->rcv_fcp_cmd_drop)); 790 atomic_read(&tgtp->rcv_fcp_cmd_drop));
788 791
789 if (atomic_read(&tgtp->rcv_fcp_cmd_in) != 792 if (atomic_read(&tgtp->rcv_fcp_cmd_in) !=
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.c b/drivers/scsi/lpfc/lpfc_nvmet.c
index fbeec344c6cc..bbbd0f84160d 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.c
+++ b/drivers/scsi/lpfc/lpfc_nvmet.c
@@ -841,12 +841,31 @@ lpfc_nvmet_xmt_fcp_release(struct nvmet_fc_target_port *tgtport,
841 lpfc_nvmet_ctxbuf_post(phba, ctxp->ctxbuf); 841 lpfc_nvmet_ctxbuf_post(phba, ctxp->ctxbuf);
842} 842}
843 843
844static void
845lpfc_nvmet_defer_rcv(struct nvmet_fc_target_port *tgtport,
846 struct nvmefc_tgt_fcp_req *rsp)
847{
848 struct lpfc_nvmet_tgtport *tgtp;
849 struct lpfc_nvmet_rcv_ctx *ctxp =
850 container_of(rsp, struct lpfc_nvmet_rcv_ctx, ctx.fcp_req);
851 struct rqb_dmabuf *nvmebuf = ctxp->rqb_buffer;
852 struct lpfc_hba *phba = ctxp->phba;
853
854 lpfc_nvmeio_data(phba, "NVMET DEFERRCV: xri x%x sz %d CPU %02x\n",
855 ctxp->oxid, ctxp->size, smp_processor_id());
856
857 tgtp = phba->targetport->private;
858 atomic_inc(&tgtp->rcv_fcp_cmd_defer);
859 lpfc_rq_buf_free(phba, &nvmebuf->hbuf); /* repost */
860}
861
844static struct nvmet_fc_target_template lpfc_tgttemplate = { 862static struct nvmet_fc_target_template lpfc_tgttemplate = {
845 .targetport_delete = lpfc_nvmet_targetport_delete, 863 .targetport_delete = lpfc_nvmet_targetport_delete,
846 .xmt_ls_rsp = lpfc_nvmet_xmt_ls_rsp, 864 .xmt_ls_rsp = lpfc_nvmet_xmt_ls_rsp,
847 .fcp_op = lpfc_nvmet_xmt_fcp_op, 865 .fcp_op = lpfc_nvmet_xmt_fcp_op,
848 .fcp_abort = lpfc_nvmet_xmt_fcp_abort, 866 .fcp_abort = lpfc_nvmet_xmt_fcp_abort,
849 .fcp_req_release = lpfc_nvmet_xmt_fcp_release, 867 .fcp_req_release = lpfc_nvmet_xmt_fcp_release,
868 .defer_rcv = lpfc_nvmet_defer_rcv,
850 869
851 .max_hw_queues = 1, 870 .max_hw_queues = 1,
852 .max_sgl_segments = LPFC_NVMET_DEFAULT_SEGS, 871 .max_sgl_segments = LPFC_NVMET_DEFAULT_SEGS,
@@ -1504,6 +1523,17 @@ lpfc_nvmet_unsol_fcp_buffer(struct lpfc_hba *phba,
1504 return; 1523 return;
1505 } 1524 }
1506 1525
1526 /* Processing of FCP command is deferred */
1527 if (rc == -EOVERFLOW) {
1528 lpfc_nvmeio_data(phba,
1529 "NVMET RCV BUSY: xri x%x sz %d from %06x\n",
1530 oxid, size, sid);
1531 /* defer reposting rcv buffer till .defer_rcv callback */
1532 ctxp->rqb_buffer = nvmebuf;
1533 atomic_inc(&tgtp->rcv_fcp_cmd_out);
1534 return;
1535 }
1536
1507 atomic_inc(&tgtp->rcv_fcp_cmd_drop); 1537 atomic_inc(&tgtp->rcv_fcp_cmd_drop);
1508 lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR, 1538 lpfc_printf_log(phba, KERN_ERR, LOG_NVME_IOERR,
1509 "6159 FCP Drop IO x%x: err x%x: x%x x%x x%x\n", 1539 "6159 FCP Drop IO x%x: err x%x: x%x x%x x%x\n",
diff --git a/drivers/scsi/lpfc/lpfc_nvmet.h b/drivers/scsi/lpfc/lpfc_nvmet.h
index e675ef17be08..48a76788b003 100644
--- a/drivers/scsi/lpfc/lpfc_nvmet.h
+++ b/drivers/scsi/lpfc/lpfc_nvmet.h
@@ -49,6 +49,7 @@ struct lpfc_nvmet_tgtport {
49 atomic_t rcv_fcp_cmd_in; 49 atomic_t rcv_fcp_cmd_in;
50 atomic_t rcv_fcp_cmd_out; 50 atomic_t rcv_fcp_cmd_out;
51 atomic_t rcv_fcp_cmd_drop; 51 atomic_t rcv_fcp_cmd_drop;
52 atomic_t rcv_fcp_cmd_defer;
52 atomic_t xmt_fcp_release; 53 atomic_t xmt_fcp_release;
53 54
54 /* Stats counters - lpfc_nvmet_xmt_fcp_op */ 55 /* Stats counters - lpfc_nvmet_xmt_fcp_op */
diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 316c3df0c3fd..71c4746341ea 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -6228,8 +6228,8 @@ static int megasas_probe_one(struct pci_dev *pdev,
6228fail_start_aen: 6228fail_start_aen:
6229fail_io_attach: 6229fail_io_attach:
6230 megasas_mgmt_info.count--; 6230 megasas_mgmt_info.count--;
6231 megasas_mgmt_info.instance[megasas_mgmt_info.max_index] = NULL;
6232 megasas_mgmt_info.max_index--; 6231 megasas_mgmt_info.max_index--;
6232 megasas_mgmt_info.instance[megasas_mgmt_info.max_index] = NULL;
6233 6233
6234 instance->instancet->disable_intr(instance); 6234 instance->instancet->disable_intr(instance);
6235 megasas_destroy_irqs(instance); 6235 megasas_destroy_irqs(instance);
diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index f990ab4d45e1..985510628f56 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -425,7 +425,7 @@ static int megasas_create_sg_sense_fusion(struct megasas_instance *instance)
425int 425int
426megasas_alloc_cmdlist_fusion(struct megasas_instance *instance) 426megasas_alloc_cmdlist_fusion(struct megasas_instance *instance)
427{ 427{
428 u32 max_mpt_cmd, i; 428 u32 max_mpt_cmd, i, j;
429 struct fusion_context *fusion; 429 struct fusion_context *fusion;
430 430
431 fusion = instance->ctrl_context; 431 fusion = instance->ctrl_context;
@@ -450,11 +450,15 @@ megasas_alloc_cmdlist_fusion(struct megasas_instance *instance)
450 fusion->cmd_list[i] = kzalloc(sizeof(struct megasas_cmd_fusion), 450 fusion->cmd_list[i] = kzalloc(sizeof(struct megasas_cmd_fusion),
451 GFP_KERNEL); 451 GFP_KERNEL);
452 if (!fusion->cmd_list[i]) { 452 if (!fusion->cmd_list[i]) {
453 for (j = 0; j < i; j++)
454 kfree(fusion->cmd_list[j]);
455 kfree(fusion->cmd_list);
453 dev_err(&instance->pdev->dev, 456 dev_err(&instance->pdev->dev,
454 "Failed from %s %d\n", __func__, __LINE__); 457 "Failed from %s %d\n", __func__, __LINE__);
455 return -ENOMEM; 458 return -ENOMEM;
456 } 459 }
457 } 460 }
461
458 return 0; 462 return 0;
459} 463}
460int 464int
diff --git a/drivers/scsi/qedf/qedf.h b/drivers/scsi/qedf/qedf.h
index 4d038926a455..351f06dfc5a0 100644
--- a/drivers/scsi/qedf/qedf.h
+++ b/drivers/scsi/qedf/qedf.h
@@ -528,7 +528,8 @@ struct fip_vlan {
528#define QEDF_WRITE (1 << 0) 528#define QEDF_WRITE (1 << 0)
529#define MAX_FIBRE_LUNS 0xffffffff 529#define MAX_FIBRE_LUNS 0xffffffff
530 530
531#define QEDF_MAX_NUM_CQS 8 531#define MIN_NUM_CPUS_MSIX(x) min_t(u32, x->dev_info.num_cqs, \
532 num_online_cpus())
532 533
533/* 534/*
534 * PCI function probe defines 535 * PCI function probe defines
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 7786c97e033f..1d13c9ca517d 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -2760,11 +2760,9 @@ static int qedf_set_fcoe_pf_param(struct qedf_ctx *qedf)
2760 * we allocation is the minimum off: 2760 * we allocation is the minimum off:
2761 * 2761 *
2762 * Number of CPUs 2762 * Number of CPUs
2763 * Number of MSI-X vectors 2763 * Number allocated by qed for our PCI function
2764 * Max number allocated in hardware (QEDF_MAX_NUM_CQS)
2765 */ 2764 */
2766 qedf->num_queues = min((unsigned int)QEDF_MAX_NUM_CQS, 2765 qedf->num_queues = MIN_NUM_CPUS_MSIX(qedf);
2767 num_online_cpus());
2768 2766
2769 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "Number of CQs is %d.\n", 2767 QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC, "Number of CQs is %d.\n",
2770 qedf->num_queues); 2768 qedf->num_queues);
@@ -2962,6 +2960,13 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
2962 goto err1; 2960 goto err1;
2963 } 2961 }
2964 2962
2963 /* Learn information crucial for qedf to progress */
2964 rc = qed_ops->fill_dev_info(qedf->cdev, &qedf->dev_info);
2965 if (rc) {
2966 QEDF_ERR(&(qedf->dbg_ctx), "Failed to dev info.\n");
2967 goto err1;
2968 }
2969
2965 /* queue allocation code should come here 2970 /* queue allocation code should come here
2966 * order should be 2971 * order should be
2967 * slowpath_start 2972 * slowpath_start
@@ -2977,13 +2982,6 @@ static int __qedf_probe(struct pci_dev *pdev, int mode)
2977 } 2982 }
2978 qed_ops->common->update_pf_params(qedf->cdev, &qedf->pf_params); 2983 qed_ops->common->update_pf_params(qedf->cdev, &qedf->pf_params);
2979 2984
2980 /* Learn information crucial for qedf to progress */
2981 rc = qed_ops->fill_dev_info(qedf->cdev, &qedf->dev_info);
2982 if (rc) {
2983 QEDF_ERR(&(qedf->dbg_ctx), "Failed to dev info.\n");
2984 goto err1;
2985 }
2986
2987 /* Record BDQ producer doorbell addresses */ 2985 /* Record BDQ producer doorbell addresses */
2988 qedf->bdq_primary_prod = qedf->dev_info.primary_dbq_rq_addr; 2986 qedf->bdq_primary_prod = qedf->dev_info.primary_dbq_rq_addr;
2989 qedf->bdq_secondary_prod = qedf->dev_info.secondary_bdq_rq_addr; 2987 qedf->bdq_secondary_prod = qedf->dev_info.secondary_bdq_rq_addr;
diff --git a/drivers/scsi/qedi/Kconfig b/drivers/scsi/qedi/Kconfig
index 21331453db7b..2ff753ce6e27 100644
--- a/drivers/scsi/qedi/Kconfig
+++ b/drivers/scsi/qedi/Kconfig
@@ -5,6 +5,7 @@ config QEDI
5 select SCSI_ISCSI_ATTRS 5 select SCSI_ISCSI_ATTRS
6 select QED_LL2 6 select QED_LL2
7 select QED_ISCSI 7 select QED_ISCSI
8 select ISCSI_BOOT_SYSFS
8 ---help--- 9 ---help---
9 This driver supports iSCSI offload for the QLogic FastLinQ 10 This driver supports iSCSI offload for the QLogic FastLinQ
10 41000 Series Converged Network Adapters. 11 41000 Series Converged Network Adapters.
diff --git a/drivers/scsi/qedi/qedi_iscsi.c b/drivers/scsi/qedi/qedi_iscsi.c
index 80edd28b635f..37da9a8b43b1 100644
--- a/drivers/scsi/qedi/qedi_iscsi.c
+++ b/drivers/scsi/qedi/qedi_iscsi.c
@@ -824,7 +824,7 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
824 u32 iscsi_cid = QEDI_CID_RESERVED; 824 u32 iscsi_cid = QEDI_CID_RESERVED;
825 u16 len = 0; 825 u16 len = 0;
826 char *buf = NULL; 826 char *buf = NULL;
827 int ret; 827 int ret, tmp;
828 828
829 if (!shost) { 829 if (!shost) {
830 ret = -ENXIO; 830 ret = -ENXIO;
@@ -940,10 +940,10 @@ qedi_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
940 940
941ep_rel_conn: 941ep_rel_conn:
942 qedi->ep_tbl[iscsi_cid] = NULL; 942 qedi->ep_tbl[iscsi_cid] = NULL;
943 ret = qedi_ops->release_conn(qedi->cdev, qedi_ep->handle); 943 tmp = qedi_ops->release_conn(qedi->cdev, qedi_ep->handle);
944 if (ret) 944 if (tmp)
945 QEDI_WARN(&qedi->dbg_ctx, "release_conn returned %d\n", 945 QEDI_WARN(&qedi->dbg_ctx, "release_conn returned %d\n",
946 ret); 946 tmp);
947ep_free_sq: 947ep_free_sq:
948 qedi_free_sq(qedi, qedi_ep); 948 qedi_free_sq(qedi, qedi_ep);
949ep_conn_exit: 949ep_conn_exit:
diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c
index 33142610882f..b18646d6057f 100644
--- a/drivers/scsi/qla2xxx/qla_tmpl.c
+++ b/drivers/scsi/qla2xxx/qla_tmpl.c
@@ -401,9 +401,6 @@ qla27xx_fwdt_entry_t263(struct scsi_qla_host *vha,
401 for (i = 0; i < vha->hw->max_req_queues; i++) { 401 for (i = 0; i < vha->hw->max_req_queues; i++) {
402 struct req_que *req = vha->hw->req_q_map[i]; 402 struct req_que *req = vha->hw->req_q_map[i];
403 403
404 if (!test_bit(i, vha->hw->req_qid_map))
405 continue;
406
407 if (req || !buf) { 404 if (req || !buf) {
408 length = req ? 405 length = req ?
409 req->length : REQUEST_ENTRY_CNT_24XX; 406 req->length : REQUEST_ENTRY_CNT_24XX;
@@ -418,9 +415,6 @@ qla27xx_fwdt_entry_t263(struct scsi_qla_host *vha,
418 for (i = 0; i < vha->hw->max_rsp_queues; i++) { 415 for (i = 0; i < vha->hw->max_rsp_queues; i++) {
419 struct rsp_que *rsp = vha->hw->rsp_q_map[i]; 416 struct rsp_que *rsp = vha->hw->rsp_q_map[i];
420 417
421 if (!test_bit(i, vha->hw->rsp_qid_map))
422 continue;
423
424 if (rsp || !buf) { 418 if (rsp || !buf) {
425 length = rsp ? 419 length = rsp ?
426 rsp->length : RESPONSE_ENTRY_CNT_MQ; 420 rsp->length : RESPONSE_ENTRY_CNT_MQ;
@@ -660,9 +654,6 @@ qla27xx_fwdt_entry_t274(struct scsi_qla_host *vha,
660 for (i = 0; i < vha->hw->max_req_queues; i++) { 654 for (i = 0; i < vha->hw->max_req_queues; i++) {
661 struct req_que *req = vha->hw->req_q_map[i]; 655 struct req_que *req = vha->hw->req_q_map[i];
662 656
663 if (!test_bit(i, vha->hw->req_qid_map))
664 continue;
665
666 if (req || !buf) { 657 if (req || !buf) {
667 qla27xx_insert16(i, buf, len); 658 qla27xx_insert16(i, buf, len);
668 qla27xx_insert16(1, buf, len); 659 qla27xx_insert16(1, buf, len);
@@ -675,9 +666,6 @@ qla27xx_fwdt_entry_t274(struct scsi_qla_host *vha,
675 for (i = 0; i < vha->hw->max_rsp_queues; i++) { 666 for (i = 0; i < vha->hw->max_rsp_queues; i++) {
676 struct rsp_que *rsp = vha->hw->rsp_q_map[i]; 667 struct rsp_que *rsp = vha->hw->rsp_q_map[i];
677 668
678 if (!test_bit(i, vha->hw->rsp_qid_map))
679 continue;
680
681 if (rsp || !buf) { 669 if (rsp || !buf) {
682 qla27xx_insert16(i, buf, len); 670 qla27xx_insert16(i, buf, len);
683 qla27xx_insert16(1, buf, len); 671 qla27xx_insert16(1, buf, len);
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index b20da0d27ad7..3f82ea1b72dc 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -500,7 +500,6 @@ static int tcm_qla2xxx_handle_cmd(scsi_qla_host_t *vha, struct qla_tgt_cmd *cmd,
500static void tcm_qla2xxx_handle_data_work(struct work_struct *work) 500static void tcm_qla2xxx_handle_data_work(struct work_struct *work)
501{ 501{
502 struct qla_tgt_cmd *cmd = container_of(work, struct qla_tgt_cmd, work); 502 struct qla_tgt_cmd *cmd = container_of(work, struct qla_tgt_cmd, work);
503 unsigned long flags;
504 503
505 /* 504 /*
506 * Ensure that the complete FCP WRITE payload has been received. 505 * Ensure that the complete FCP WRITE payload has been received.
@@ -508,17 +507,6 @@ static void tcm_qla2xxx_handle_data_work(struct work_struct *work)
508 */ 507 */
509 cmd->cmd_in_wq = 0; 508 cmd->cmd_in_wq = 0;
510 509
511 spin_lock_irqsave(&cmd->cmd_lock, flags);
512 cmd->data_work = 1;
513 if (cmd->aborted) {
514 cmd->data_work_free = 1;
515 spin_unlock_irqrestore(&cmd->cmd_lock, flags);
516
517 tcm_qla2xxx_free_cmd(cmd);
518 return;
519 }
520 spin_unlock_irqrestore(&cmd->cmd_lock, flags);
521
522 cmd->qpair->tgt_counters.qla_core_ret_ctio++; 510 cmd->qpair->tgt_counters.qla_core_ret_ctio++;
523 if (!cmd->write_data_transferred) { 511 if (!cmd->write_data_transferred) {
524 /* 512 /*
@@ -765,31 +753,13 @@ static void tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd)
765 qlt_xmit_tm_rsp(mcmd); 753 qlt_xmit_tm_rsp(mcmd);
766} 754}
767 755
768#define DATA_WORK_NOT_FREE(_cmd) (_cmd->data_work && !_cmd->data_work_free)
769static void tcm_qla2xxx_aborted_task(struct se_cmd *se_cmd) 756static void tcm_qla2xxx_aborted_task(struct se_cmd *se_cmd)
770{ 757{
771 struct qla_tgt_cmd *cmd = container_of(se_cmd, 758 struct qla_tgt_cmd *cmd = container_of(se_cmd,
772 struct qla_tgt_cmd, se_cmd); 759 struct qla_tgt_cmd, se_cmd);
773 unsigned long flags;
774 760
775 if (qlt_abort_cmd(cmd)) 761 if (qlt_abort_cmd(cmd))
776 return; 762 return;
777
778 spin_lock_irqsave(&cmd->cmd_lock, flags);
779 if ((cmd->state == QLA_TGT_STATE_NEW)||
780 ((cmd->state == QLA_TGT_STATE_DATA_IN) &&
781 DATA_WORK_NOT_FREE(cmd))) {
782 cmd->data_work_free = 1;
783 spin_unlock_irqrestore(&cmd->cmd_lock, flags);
784 /*
785 * cmd has not reached fw, Use this trigger to free it.
786 */
787 tcm_qla2xxx_free_cmd(cmd);
788 return;
789 }
790 spin_unlock_irqrestore(&cmd->cmd_lock, flags);
791 return;
792
793} 763}
794 764
795static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *, 765static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *,
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index 3d38c6d463b8..1bf274e3b2b6 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -800,7 +800,11 @@ MODULE_LICENSE("GPL");
800module_param(scsi_logging_level, int, S_IRUGO|S_IWUSR); 800module_param(scsi_logging_level, int, S_IRUGO|S_IWUSR);
801MODULE_PARM_DESC(scsi_logging_level, "a bit mask of logging levels"); 801MODULE_PARM_DESC(scsi_logging_level, "a bit mask of logging levels");
802 802
803#ifdef CONFIG_SCSI_MQ_DEFAULT
803bool scsi_use_blk_mq = true; 804bool scsi_use_blk_mq = true;
805#else
806bool scsi_use_blk_mq = false;
807#endif
804module_param_named(use_blk_mq, scsi_use_blk_mq, bool, S_IWUSR | S_IRUGO); 808module_param_named(use_blk_mq, scsi_use_blk_mq, bool, S_IWUSR | S_IRUGO);
805 809
806static int __init init_scsi(void) 810static int __init init_scsi(void)
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
index 7e24aa30c3b0..892fbd9800d9 100644
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -1286,7 +1286,7 @@ store_fc_vport_delete(struct device *dev, struct device_attribute *attr,
1286 unsigned long flags; 1286 unsigned long flags;
1287 1287
1288 spin_lock_irqsave(shost->host_lock, flags); 1288 spin_lock_irqsave(shost->host_lock, flags);
1289 if (vport->flags & (FC_VPORT_DEL | FC_VPORT_CREATING)) { 1289 if (vport->flags & (FC_VPORT_DEL | FC_VPORT_CREATING | FC_VPORT_DELETING)) {
1290 spin_unlock_irqrestore(shost->host_lock, flags); 1290 spin_unlock_irqrestore(shost->host_lock, flags);
1291 return -EBUSY; 1291 return -EBUSY;
1292 } 1292 }
@@ -2430,8 +2430,10 @@ fc_remove_host(struct Scsi_Host *shost)
2430 spin_lock_irqsave(shost->host_lock, flags); 2430 spin_lock_irqsave(shost->host_lock, flags);
2431 2431
2432 /* Remove any vports */ 2432 /* Remove any vports */
2433 list_for_each_entry_safe(vport, next_vport, &fc_host->vports, peers) 2433 list_for_each_entry_safe(vport, next_vport, &fc_host->vports, peers) {
2434 vport->flags |= FC_VPORT_DELETING;
2434 fc_queue_work(shost, &vport->vport_delete_work); 2435 fc_queue_work(shost, &vport->vport_delete_work);
2436 }
2435 2437
2436 /* Remove any remote ports */ 2438 /* Remove any remote ports */
2437 list_for_each_entry_safe(rport, next_rport, 2439 list_for_each_entry_safe(rport, next_rport,
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index bea36adeee17..e2647f2d4430 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1277,6 +1277,9 @@ static void sd_uninit_command(struct scsi_cmnd *SCpnt)
1277{ 1277{
1278 struct request *rq = SCpnt->request; 1278 struct request *rq = SCpnt->request;
1279 1279
1280 if (SCpnt->flags & SCMD_ZONE_WRITE_LOCK)
1281 sd_zbc_write_unlock_zone(SCpnt);
1282
1280 if (rq->rq_flags & RQF_SPECIAL_PAYLOAD) 1283 if (rq->rq_flags & RQF_SPECIAL_PAYLOAD)
1281 __free_page(rq->special_vec.bv_page); 1284 __free_page(rq->special_vec.bv_page);
1282 1285
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 96855df9f49d..8aa54779aac1 100644
--- a/drivers/scsi/sd_zbc.c
+++ b/drivers/scsi/sd_zbc.c
@@ -294,6 +294,9 @@ int sd_zbc_write_lock_zone(struct scsi_cmnd *cmd)
294 test_and_set_bit(zno, sdkp->zones_wlock)) 294 test_and_set_bit(zno, sdkp->zones_wlock))
295 return BLKPREP_DEFER; 295 return BLKPREP_DEFER;
296 296
297 WARN_ON_ONCE(cmd->flags & SCMD_ZONE_WRITE_LOCK);
298 cmd->flags |= SCMD_ZONE_WRITE_LOCK;
299
297 return BLKPREP_OK; 300 return BLKPREP_OK;
298} 301}
299 302
@@ -302,9 +305,10 @@ void sd_zbc_write_unlock_zone(struct scsi_cmnd *cmd)
302 struct request *rq = cmd->request; 305 struct request *rq = cmd->request;
303 struct scsi_disk *sdkp = scsi_disk(rq->rq_disk); 306 struct scsi_disk *sdkp = scsi_disk(rq->rq_disk);
304 307
305 if (sdkp->zones_wlock) { 308 if (sdkp->zones_wlock && cmd->flags & SCMD_ZONE_WRITE_LOCK) {
306 unsigned int zno = sd_zbc_zone_no(sdkp, blk_rq_pos(rq)); 309 unsigned int zno = sd_zbc_zone_no(sdkp, blk_rq_pos(rq));
307 WARN_ON_ONCE(!test_bit(zno, sdkp->zones_wlock)); 310 WARN_ON_ONCE(!test_bit(zno, sdkp->zones_wlock));
311 cmd->flags &= ~SCMD_ZONE_WRITE_LOCK;
308 clear_bit_unlock(zno, sdkp->zones_wlock); 312 clear_bit_unlock(zno, sdkp->zones_wlock);
309 smp_mb__after_atomic(); 313 smp_mb__after_atomic();
310 } 314 }
@@ -335,9 +339,6 @@ void sd_zbc_complete(struct scsi_cmnd *cmd,
335 case REQ_OP_WRITE_ZEROES: 339 case REQ_OP_WRITE_ZEROES:
336 case REQ_OP_WRITE_SAME: 340 case REQ_OP_WRITE_SAME:
337 341
338 /* Unlock the zone */
339 sd_zbc_write_unlock_zone(cmd);
340
341 if (result && 342 if (result &&
342 sshdr->sense_key == ILLEGAL_REQUEST && 343 sshdr->sense_key == ILLEGAL_REQUEST &&
343 sshdr->asc == 0x21) 344 sshdr->asc == 0x21)
diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c
index f1cdf32d7514..8927f9f54ad9 100644
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -99,7 +99,7 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code,
99 99
100 ret = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen, 100 ret = scsi_execute_req(sdev, cmd, DMA_FROM_DEVICE, buf, bufflen,
101 NULL, SES_TIMEOUT, SES_RETRIES, NULL); 101 NULL, SES_TIMEOUT, SES_RETRIES, NULL);
102 if (unlikely(!ret)) 102 if (unlikely(ret))
103 return ret; 103 return ret;
104 104
105 recv_page_code = ((unsigned char *)buf)[0]; 105 recv_page_code = ((unsigned char *)buf)[0];
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 4fe606b000b4..d7ff71e0c85c 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -751,35 +751,6 @@ sg_new_write(Sg_fd *sfp, struct file *file, const char __user *buf,
751 return count; 751 return count;
752} 752}
753 753
754static bool sg_is_valid_dxfer(sg_io_hdr_t *hp)
755{
756 switch (hp->dxfer_direction) {
757 case SG_DXFER_NONE:
758 if (hp->dxferp || hp->dxfer_len > 0)
759 return false;
760 return true;
761 case SG_DXFER_FROM_DEV:
762 /*
763 * for SG_DXFER_FROM_DEV we always set dxfer_len to > 0. dxferp
764 * can either be NULL or != NULL so there's no point in checking
765 * it either. So just return true.
766 */
767 return true;
768 case SG_DXFER_TO_DEV:
769 case SG_DXFER_TO_FROM_DEV:
770 if (!hp->dxferp || hp->dxfer_len == 0)
771 return false;
772 return true;
773 case SG_DXFER_UNKNOWN:
774 if ((!hp->dxferp && hp->dxfer_len) ||
775 (hp->dxferp && hp->dxfer_len == 0))
776 return false;
777 return true;
778 default:
779 return false;
780 }
781}
782
783static int 754static int
784sg_common_write(Sg_fd * sfp, Sg_request * srp, 755sg_common_write(Sg_fd * sfp, Sg_request * srp,
785 unsigned char *cmnd, int timeout, int blocking) 756 unsigned char *cmnd, int timeout, int blocking)
@@ -800,7 +771,7 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
800 "sg_common_write: scsi opcode=0x%02x, cmd_size=%d\n", 771 "sg_common_write: scsi opcode=0x%02x, cmd_size=%d\n",
801 (int) cmnd[0], (int) hp->cmd_len)); 772 (int) cmnd[0], (int) hp->cmd_len));
802 773
803 if (!sg_is_valid_dxfer(hp)) 774 if (hp->dxfer_len >= SZ_256M)
804 return -EINVAL; 775 return -EINVAL;
805 776
806 k = sg_start_req(srp, cmnd); 777 k = sg_start_req(srp, cmnd);
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 8e5013d9cad4..94e402ed30f6 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -4299,11 +4299,11 @@ static int st_probe(struct device *dev)
4299 kref_init(&tpnt->kref); 4299 kref_init(&tpnt->kref);
4300 tpnt->disk = disk; 4300 tpnt->disk = disk;
4301 disk->private_data = &tpnt->driver; 4301 disk->private_data = &tpnt->driver;
4302 disk->queue = SDp->request_queue;
4303 /* SCSI tape doesn't register this gendisk via add_disk(). Manually 4302 /* SCSI tape doesn't register this gendisk via add_disk(). Manually
4304 * take queue reference that release_disk() expects. */ 4303 * take queue reference that release_disk() expects. */
4305 if (!blk_get_queue(disk->queue)) 4304 if (!blk_get_queue(SDp->request_queue))
4306 goto out_put_disk; 4305 goto out_put_disk;
4306 disk->queue = SDp->request_queue;
4307 tpnt->driver = &st_template; 4307 tpnt->driver = &st_template;
4308 4308
4309 tpnt->device = SDp; 4309 tpnt->device = SDp;
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 3039072911a5..afc7ecc3c187 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -200,16 +200,11 @@ static int imx7_pgc_domain_probe(struct platform_device *pdev)
200 200
201 domain->dev = &pdev->dev; 201 domain->dev = &pdev->dev;
202 202
203 ret = pm_genpd_init(&domain->genpd, NULL, true);
204 if (ret) {
205 dev_err(domain->dev, "Failed to init power domain\n");
206 return ret;
207 }
208
209 domain->regulator = devm_regulator_get_optional(domain->dev, "power"); 203 domain->regulator = devm_regulator_get_optional(domain->dev, "power");
210 if (IS_ERR(domain->regulator)) { 204 if (IS_ERR(domain->regulator)) {
211 if (PTR_ERR(domain->regulator) != -ENODEV) { 205 if (PTR_ERR(domain->regulator) != -ENODEV) {
212 dev_err(domain->dev, "Failed to get domain's regulator\n"); 206 if (PTR_ERR(domain->regulator) != -EPROBE_DEFER)
207 dev_err(domain->dev, "Failed to get domain's regulator\n");
213 return PTR_ERR(domain->regulator); 208 return PTR_ERR(domain->regulator);
214 } 209 }
215 } else { 210 } else {
@@ -217,6 +212,12 @@ static int imx7_pgc_domain_probe(struct platform_device *pdev)
217 domain->voltage, domain->voltage); 212 domain->voltage, domain->voltage);
218 } 213 }
219 214
215 ret = pm_genpd_init(&domain->genpd, NULL, true);
216 if (ret) {
217 dev_err(domain->dev, "Failed to init power domain\n");
218 return ret;
219 }
220
220 ret = of_genpd_add_provider_simple(domain->dev->of_node, 221 ret = of_genpd_add_provider_simple(domain->dev->of_node,
221 &domain->genpd); 222 &domain->genpd);
222 if (ret) { 223 if (ret) {
diff --git a/drivers/soc/ti/knav_qmss_queue.c b/drivers/soc/ti/knav_qmss_queue.c
index 279e7c5551dd..39225de9d7f1 100644
--- a/drivers/soc/ti/knav_qmss_queue.c
+++ b/drivers/soc/ti/knav_qmss_queue.c
@@ -745,6 +745,9 @@ void *knav_pool_create(const char *name,
745 bool slot_found; 745 bool slot_found;
746 int ret; 746 int ret;
747 747
748 if (!kdev)
749 return ERR_PTR(-EPROBE_DEFER);
750
748 if (!kdev->dev) 751 if (!kdev->dev)
749 return ERR_PTR(-ENODEV); 752 return ERR_PTR(-ENODEV);
750 753
diff --git a/drivers/soc/ti/ti_sci_pm_domains.c b/drivers/soc/ti/ti_sci_pm_domains.c
index b0b283810e72..de31b9389e2e 100644
--- a/drivers/soc/ti/ti_sci_pm_domains.c
+++ b/drivers/soc/ti/ti_sci_pm_domains.c
@@ -176,6 +176,8 @@ static int ti_sci_pm_domain_probe(struct platform_device *pdev)
176 176
177 ti_sci_pd->dev = dev; 177 ti_sci_pd->dev = dev;
178 178
179 ti_sci_pd->pd.name = "ti_sci_pd";
180
179 ti_sci_pd->pd.attach_dev = ti_sci_pd_attach_dev; 181 ti_sci_pd->pd.attach_dev = ti_sci_pd_attach_dev;
180 ti_sci_pd->pd.detach_dev = ti_sci_pd_detach_dev; 182 ti_sci_pd->pd.detach_dev = ti_sci_pd_detach_dev;
181 183
diff --git a/drivers/soc/zte/Kconfig b/drivers/soc/zte/Kconfig
index 20bde38ce2f9..e9d750c510cd 100644
--- a/drivers/soc/zte/Kconfig
+++ b/drivers/soc/zte/Kconfig
@@ -2,6 +2,7 @@
2# ZTE SoC drivers 2# ZTE SoC drivers
3# 3#
4menuconfig SOC_ZTE 4menuconfig SOC_ZTE
5 depends on ARCH_ZX || COMPILE_TEST
5 bool "ZTE SoC driver support" 6 bool "ZTE SoC driver support"
6 7
7if SOC_ZTE 8if SOC_ZTE
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index ca11be21f64b..34ca7823255d 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -2396,6 +2396,7 @@ static ssize_t comedi_write(struct file *file, const char __user *buf,
2396 continue; 2396 continue;
2397 } 2397 }
2398 2398
2399 set_current_state(TASK_RUNNING);
2399 wp = async->buf_write_ptr; 2400 wp = async->buf_write_ptr;
2400 n1 = min(n, async->prealloc_bufsz - wp); 2401 n1 = min(n, async->prealloc_bufsz - wp);
2401 n2 = n - n1; 2402 n2 = n - n1;
@@ -2528,6 +2529,8 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
2528 } 2529 }
2529 continue; 2530 continue;
2530 } 2531 }
2532
2533 set_current_state(TASK_RUNNING);
2531 rp = async->buf_read_ptr; 2534 rp = async->buf_read_ptr;
2532 n1 = min(n, async->prealloc_bufsz - rp); 2535 n1 = min(n, async->prealloc_bufsz - rp);
2533 n2 = n - n1; 2536 n2 = n - n1;
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
index b37a6f48225f..8ea3920400a0 100644
--- a/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
+++ b/drivers/staging/fsl-mc/bus/fsl-mc-allocator.c
@@ -16,9 +16,9 @@
16 16
17static bool __must_check fsl_mc_is_allocatable(const char *obj_type) 17static bool __must_check fsl_mc_is_allocatable(const char *obj_type)
18{ 18{
19 return strcmp(obj_type, "dpbp") || 19 return strcmp(obj_type, "dpbp") == 0 ||
20 strcmp(obj_type, "dpmcp") || 20 strcmp(obj_type, "dpmcp") == 0 ||
21 strcmp(obj_type, "dpcon"); 21 strcmp(obj_type, "dpcon") == 0;
22} 22}
23 23
24/** 24/**
diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index a6a8393d6664..3e00df74b18c 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -472,7 +472,7 @@ static int ad2s1210_read_raw(struct iio_dev *indio_dev,
472 long m) 472 long m)
473{ 473{
474 struct ad2s1210_state *st = iio_priv(indio_dev); 474 struct ad2s1210_state *st = iio_priv(indio_dev);
475 bool negative; 475 u16 negative;
476 int ret = 0; 476 int ret = 0;
477 u16 pos; 477 u16 pos;
478 s16 vel; 478 s16 vel;
diff --git a/drivers/staging/media/atomisp/i2c/ap1302.h b/drivers/staging/media/atomisp/i2c/ap1302.h
index 9341232c580d..4d0b181a9671 100644
--- a/drivers/staging/media/atomisp/i2c/ap1302.h
+++ b/drivers/staging/media/atomisp/i2c/ap1302.h
@@ -158,8 +158,8 @@ struct ap1302_res_struct {
158}; 158};
159 159
160struct ap1302_context_res { 160struct ap1302_context_res {
161 s32 res_num; 161 u32 res_num;
162 s32 cur_res; 162 u32 cur_res;
163 struct ap1302_res_struct *res_table; 163 struct ap1302_res_struct *res_table;
164}; 164};
165 165
diff --git a/drivers/staging/media/atomisp/i2c/gc0310.h b/drivers/staging/media/atomisp/i2c/gc0310.h
index f31eb277f542..7d8a0aeecb6c 100644
--- a/drivers/staging/media/atomisp/i2c/gc0310.h
+++ b/drivers/staging/media/atomisp/i2c/gc0310.h
@@ -454,6 +454,6 @@ struct gc0310_resolution gc0310_res_video[] = {
454#define N_RES_VIDEO (ARRAY_SIZE(gc0310_res_video)) 454#define N_RES_VIDEO (ARRAY_SIZE(gc0310_res_video))
455 455
456static struct gc0310_resolution *gc0310_res = gc0310_res_preview; 456static struct gc0310_resolution *gc0310_res = gc0310_res_preview;
457static int N_RES = N_RES_PREVIEW; 457static unsigned long N_RES = N_RES_PREVIEW;
458#endif 458#endif
459 459
diff --git a/drivers/staging/media/atomisp/i2c/gc2235.h b/drivers/staging/media/atomisp/i2c/gc2235.h
index ccbc757045a5..7c3d994180cc 100644
--- a/drivers/staging/media/atomisp/i2c/gc2235.h
+++ b/drivers/staging/media/atomisp/i2c/gc2235.h
@@ -668,5 +668,5 @@ struct gc2235_resolution gc2235_res_video[] = {
668#define N_RES_VIDEO (ARRAY_SIZE(gc2235_res_video)) 668#define N_RES_VIDEO (ARRAY_SIZE(gc2235_res_video))
669 669
670static struct gc2235_resolution *gc2235_res = gc2235_res_preview; 670static struct gc2235_resolution *gc2235_res = gc2235_res_preview;
671static int N_RES = N_RES_PREVIEW; 671static unsigned long N_RES = N_RES_PREVIEW;
672#endif 672#endif
diff --git a/drivers/staging/media/atomisp/i2c/imx/imx.h b/drivers/staging/media/atomisp/i2c/imx/imx.h
index 36b3f3a5a41f..41b4133ca995 100644
--- a/drivers/staging/media/atomisp/i2c/imx/imx.h
+++ b/drivers/staging/media/atomisp/i2c/imx/imx.h
@@ -480,7 +480,7 @@ struct imx_device {
480 struct imx_vcm *vcm_driver; 480 struct imx_vcm *vcm_driver;
481 struct imx_otp *otp_driver; 481 struct imx_otp *otp_driver;
482 const struct imx_resolution *curr_res_table; 482 const struct imx_resolution *curr_res_table;
483 int entries_curr_table; 483 unsigned long entries_curr_table;
484 const struct firmware *fw; 484 const struct firmware *fw;
485 struct imx_reg_addr *reg_addr; 485 struct imx_reg_addr *reg_addr;
486 const struct imx_reg *param_hold; 486 const struct imx_reg *param_hold;
diff --git a/drivers/staging/media/atomisp/i2c/ov2680.h b/drivers/staging/media/atomisp/i2c/ov2680.h
index 944fe8e3bcbf..ab8907e6c9ef 100644
--- a/drivers/staging/media/atomisp/i2c/ov2680.h
+++ b/drivers/staging/media/atomisp/i2c/ov2680.h
@@ -934,7 +934,6 @@ static struct ov2680_resolution ov2680_res_video[] = {
934#define N_RES_VIDEO (ARRAY_SIZE(ov2680_res_video)) 934#define N_RES_VIDEO (ARRAY_SIZE(ov2680_res_video))
935 935
936static struct ov2680_resolution *ov2680_res = ov2680_res_preview; 936static struct ov2680_resolution *ov2680_res = ov2680_res_preview;
937static int N_RES = N_RES_PREVIEW; 937static unsigned long N_RES = N_RES_PREVIEW;
938
939 938
940#endif 939#endif
diff --git a/drivers/staging/media/atomisp/i2c/ov2722.h b/drivers/staging/media/atomisp/i2c/ov2722.h
index b0d40965d89e..73ecb1679718 100644
--- a/drivers/staging/media/atomisp/i2c/ov2722.h
+++ b/drivers/staging/media/atomisp/i2c/ov2722.h
@@ -1263,5 +1263,5 @@ struct ov2722_resolution ov2722_res_video[] = {
1263#define N_RES_VIDEO (ARRAY_SIZE(ov2722_res_video)) 1263#define N_RES_VIDEO (ARRAY_SIZE(ov2722_res_video))
1264 1264
1265static struct ov2722_resolution *ov2722_res = ov2722_res_preview; 1265static struct ov2722_resolution *ov2722_res = ov2722_res_preview;
1266static int N_RES = N_RES_PREVIEW; 1266static unsigned long N_RES = N_RES_PREVIEW;
1267#endif 1267#endif
diff --git a/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h b/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h
index d88ac1777d86..8c2e6794463b 100644
--- a/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h
+++ b/drivers/staging/media/atomisp/i2c/ov5693/ov5693.h
@@ -1377,5 +1377,5 @@ struct ov5693_resolution ov5693_res_video[] = {
1377#define N_RES_VIDEO (ARRAY_SIZE(ov5693_res_video)) 1377#define N_RES_VIDEO (ARRAY_SIZE(ov5693_res_video))
1378 1378
1379static struct ov5693_resolution *ov5693_res = ov5693_res_preview; 1379static struct ov5693_resolution *ov5693_res = ov5693_res_preview;
1380static int N_RES = N_RES_PREVIEW; 1380static unsigned long N_RES = N_RES_PREVIEW;
1381#endif 1381#endif
diff --git a/drivers/staging/media/atomisp/i2c/ov8858.h b/drivers/staging/media/atomisp/i2c/ov8858.h
index 9be6a0e63861..d3fde200c013 100644
--- a/drivers/staging/media/atomisp/i2c/ov8858.h
+++ b/drivers/staging/media/atomisp/i2c/ov8858.h
@@ -266,7 +266,7 @@ struct ov8858_device {
266 const struct ov8858_reg *regs; 266 const struct ov8858_reg *regs;
267 struct ov8858_vcm *vcm_driver; 267 struct ov8858_vcm *vcm_driver;
268 const struct ov8858_resolution *curr_res_table; 268 const struct ov8858_resolution *curr_res_table;
269 int entries_curr_table; 269 unsigned long entries_curr_table;
270 270
271 struct v4l2_ctrl_handler ctrl_handler; 271 struct v4l2_ctrl_handler ctrl_handler;
272 struct v4l2_ctrl *run_mode; 272 struct v4l2_ctrl *run_mode;
diff --git a/drivers/staging/media/atomisp/i2c/ov8858_btns.h b/drivers/staging/media/atomisp/i2c/ov8858_btns.h
index 09e3cdc1a394..f9a3cf8fbf1a 100644
--- a/drivers/staging/media/atomisp/i2c/ov8858_btns.h
+++ b/drivers/staging/media/atomisp/i2c/ov8858_btns.h
@@ -266,7 +266,7 @@ struct ov8858_device {
266 const struct ov8858_reg *regs; 266 const struct ov8858_reg *regs;
267 struct ov8858_vcm *vcm_driver; 267 struct ov8858_vcm *vcm_driver;
268 const struct ov8858_resolution *curr_res_table; 268 const struct ov8858_resolution *curr_res_table;
269 int entries_curr_table; 269 unsigned long entries_curr_table;
270 270
271 struct v4l2_ctrl_handler ctrl_handler; 271 struct v4l2_ctrl_handler ctrl_handler;
272 struct v4l2_ctrl *run_mode; 272 struct v4l2_ctrl *run_mode;
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/Makefile b/drivers/staging/media/atomisp/pci/atomisp2/Makefile
index 726eaa293c55..2bd98f0667ec 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/Makefile
+++ b/drivers/staging/media/atomisp/pci/atomisp2/Makefile
@@ -354,7 +354,9 @@ ccflags-y += $(INCLUDES) $(DEFINES) -fno-common
354 354
355# HACK! While this driver is in bad shape, don't enable several warnings 355# HACK! While this driver is in bad shape, don't enable several warnings
356# that would be otherwise enabled with W=1 356# that would be otherwise enabled with W=1
357ccflags-y += -Wno-unused-const-variable -Wno-missing-prototypes \ 357ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
358 -Wno-unused-but-set-variable -Wno-missing-declarations \ 358ccflags-y += $(call cc-disable-warning, missing-prototypes)
359 -Wno-suggest-attribute=format -Wno-missing-prototypes \ 359ccflags-y += $(call cc-disable-warning, missing-declarations)
360 -Wno-implicit-fallthrough 360ccflags-y += $(call cc-disable-warning, suggest-attribute=format)
361ccflags-y += $(call cc-disable-warning, unused-const-variable)
362ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h
index d3667132851b..c8e0c4fe3717 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_internal.h
@@ -275,7 +275,7 @@ struct atomisp_device {
275 */ 275 */
276 struct mutex streamoff_mutex; 276 struct mutex streamoff_mutex;
277 277
278 int input_cnt; 278 unsigned int input_cnt;
279 struct atomisp_input_subdev inputs[ATOM_ISP_MAX_INPUTS]; 279 struct atomisp_input_subdev inputs[ATOM_ISP_MAX_INPUTS];
280 struct v4l2_subdev *flash; 280 struct v4l2_subdev *flash;
281 struct v4l2_subdev *motor; 281 struct v4l2_subdev *motor;
diff --git a/drivers/staging/media/cxd2099/cxd2099.c b/drivers/staging/media/cxd2099/cxd2099.c
index 370ecb959543..f28916ea69f1 100644
--- a/drivers/staging/media/cxd2099/cxd2099.c
+++ b/drivers/staging/media/cxd2099/cxd2099.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * cxd2099.c: Driver for the CXD2099AR Common Interface Controller 2 * cxd2099.c: Driver for the CXD2099AR Common Interface Controller
3 * 3 *
4 * Copyright (C) 2010-2011 Digital Devices GmbH 4 * Copyright (C) 2010-2013 Digital Devices GmbH
5 * 5 *
6 * 6 *
7 * This program is free software; you can redistribute it and/or 7 * This program is free software; you can redistribute it and/or
@@ -33,7 +33,10 @@
33 33
34#include "cxd2099.h" 34#include "cxd2099.h"
35 35
36#define MAX_BUFFER_SIZE 248 36/* comment this line to deactivate the cxd2099ar buffer mode */
37#define BUFFER_MODE 1
38
39static int read_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount);
37 40
38struct cxd { 41struct cxd {
39 struct dvb_ca_en50221 en; 42 struct dvb_ca_en50221 en;
@@ -48,6 +51,7 @@ struct cxd {
48 int mode; 51 int mode;
49 int ready; 52 int ready;
50 int dr; 53 int dr;
54 int write_busy;
51 int slot_stat; 55 int slot_stat;
52 56
53 u8 amem[1024]; 57 u8 amem[1024];
@@ -55,6 +59,9 @@ struct cxd {
55 59
56 int cammode; 60 int cammode;
57 struct mutex lock; 61 struct mutex lock;
62
63 u8 rbuf[1028];
64 u8 wbuf[1028];
58}; 65};
59 66
60static int i2c_write_reg(struct i2c_adapter *adapter, u8 adr, 67static int i2c_write_reg(struct i2c_adapter *adapter, u8 adr,
@@ -73,7 +80,7 @@ static int i2c_write_reg(struct i2c_adapter *adapter, u8 adr,
73} 80}
74 81
75static int i2c_write(struct i2c_adapter *adapter, u8 adr, 82static int i2c_write(struct i2c_adapter *adapter, u8 adr,
76 u8 *data, u8 len) 83 u8 *data, u16 len)
77{ 84{
78 struct i2c_msg msg = {.addr = adr, .flags = 0, .buf = data, .len = len}; 85 struct i2c_msg msg = {.addr = adr, .flags = 0, .buf = data, .len = len};
79 86
@@ -100,12 +107,12 @@ static int i2c_read_reg(struct i2c_adapter *adapter, u8 adr,
100} 107}
101 108
102static int i2c_read(struct i2c_adapter *adapter, u8 adr, 109static int i2c_read(struct i2c_adapter *adapter, u8 adr,
103 u8 reg, u8 *data, u8 n) 110 u8 reg, u8 *data, u16 n)
104{ 111{
105 struct i2c_msg msgs[2] = {{.addr = adr, .flags = 0, 112 struct i2c_msg msgs[2] = {{.addr = adr, .flags = 0,
106 .buf = &reg, .len = 1}, 113 .buf = &reg, .len = 1},
107 {.addr = adr, .flags = I2C_M_RD, 114 {.addr = adr, .flags = I2C_M_RD,
108 .buf = data, .len = n} }; 115 .buf = data, .len = n} };
109 116
110 if (i2c_transfer(adapter, msgs, 2) != 2) { 117 if (i2c_transfer(adapter, msgs, 2) != 2) {
111 dev_err(&adapter->dev, "error in i2c_read\n"); 118 dev_err(&adapter->dev, "error in i2c_read\n");
@@ -114,14 +121,26 @@ static int i2c_read(struct i2c_adapter *adapter, u8 adr,
114 return 0; 121 return 0;
115} 122}
116 123
117static int read_block(struct cxd *ci, u8 adr, u8 *data, u8 n) 124static int read_block(struct cxd *ci, u8 adr, u8 *data, u16 n)
118{ 125{
119 int status; 126 int status = 0;
120 127
121 status = i2c_write_reg(ci->i2c, ci->cfg.adr, 0, adr); 128 if (ci->lastaddress != adr)
129 status = i2c_write_reg(ci->i2c, ci->cfg.adr, 0, adr);
122 if (!status) { 130 if (!status) {
123 ci->lastaddress = adr; 131 ci->lastaddress = adr;
124 status = i2c_read(ci->i2c, ci->cfg.adr, 1, data, n); 132
133 while (n) {
134 int len = n;
135
136 if (ci->cfg.max_i2c && (len > ci->cfg.max_i2c))
137 len = ci->cfg.max_i2c;
138 status = i2c_read(ci->i2c, ci->cfg.adr, 1, data, len);
139 if (status)
140 return status;
141 data += len;
142 n -= len;
143 }
125 } 144 }
126 return status; 145 return status;
127} 146}
@@ -182,16 +201,16 @@ static int write_io(struct cxd *ci, u16 address, u8 val)
182 201
183static int write_regm(struct cxd *ci, u8 reg, u8 val, u8 mask) 202static int write_regm(struct cxd *ci, u8 reg, u8 val, u8 mask)
184{ 203{
185 int status; 204 int status = 0;
186 205
187 status = i2c_write_reg(ci->i2c, ci->cfg.adr, 0, reg); 206 if (ci->lastaddress != reg)
207 status = i2c_write_reg(ci->i2c, ci->cfg.adr, 0, reg);
188 if (!status && reg >= 6 && reg <= 8 && mask != 0xff) 208 if (!status && reg >= 6 && reg <= 8 && mask != 0xff)
189 status = i2c_read_reg(ci->i2c, ci->cfg.adr, 1, &ci->regs[reg]); 209 status = i2c_read_reg(ci->i2c, ci->cfg.adr, 1, &ci->regs[reg]);
210 ci->lastaddress = reg;
190 ci->regs[reg] = (ci->regs[reg] & (~mask)) | val; 211 ci->regs[reg] = (ci->regs[reg] & (~mask)) | val;
191 if (!status) { 212 if (!status)
192 ci->lastaddress = reg;
193 status = i2c_write_reg(ci->i2c, ci->cfg.adr, 1, ci->regs[reg]); 213 status = i2c_write_reg(ci->i2c, ci->cfg.adr, 1, ci->regs[reg]);
194 }
195 if (reg == 0x20) 214 if (reg == 0x20)
196 ci->regs[reg] &= 0x7f; 215 ci->regs[reg] &= 0x7f;
197 return status; 216 return status;
@@ -203,16 +222,29 @@ static int write_reg(struct cxd *ci, u8 reg, u8 val)
203} 222}
204 223
205#ifdef BUFFER_MODE 224#ifdef BUFFER_MODE
206static int write_block(struct cxd *ci, u8 adr, u8 *data, int n) 225static int write_block(struct cxd *ci, u8 adr, u8 *data, u16 n)
207{ 226{
208 int status; 227 int status = 0;
209 u8 buf[256] = {1}; 228 u8 *buf = ci->wbuf;
210 229
211 status = i2c_write_reg(ci->i2c, ci->cfg.adr, 0, adr); 230 if (ci->lastaddress != adr)
212 if (!status) { 231 status = i2c_write_reg(ci->i2c, ci->cfg.adr, 0, adr);
213 ci->lastaddress = adr; 232 if (status)
214 memcpy(buf + 1, data, n); 233 return status;
215 status = i2c_write(ci->i2c, ci->cfg.adr, buf, n + 1); 234
235 ci->lastaddress = adr;
236 buf[0] = 1;
237 while (n) {
238 int len = n;
239
240 if (ci->cfg.max_i2c && (len + 1 > ci->cfg.max_i2c))
241 len = ci->cfg.max_i2c - 1;
242 memcpy(buf + 1, data, len);
243 status = i2c_write(ci->i2c, ci->cfg.adr, buf, len + 1);
244 if (status)
245 return status;
246 n -= len;
247 data += len;
216 } 248 }
217 return status; 249 return status;
218} 250}
@@ -238,6 +270,8 @@ static void set_mode(struct cxd *ci, int mode)
238 270
239static void cam_mode(struct cxd *ci, int mode) 271static void cam_mode(struct cxd *ci, int mode)
240{ 272{
273 u8 dummy;
274
241 if (mode == ci->cammode) 275 if (mode == ci->cammode)
242 return; 276 return;
243 277
@@ -246,16 +280,15 @@ static void cam_mode(struct cxd *ci, int mode)
246 write_regm(ci, 0x20, 0x80, 0x80); 280 write_regm(ci, 0x20, 0x80, 0x80);
247 break; 281 break;
248 case 0x01: 282 case 0x01:
249#ifdef BUFFER_MODE
250 if (!ci->en.read_data) 283 if (!ci->en.read_data)
251 return; 284 return;
285 ci->write_busy = 0;
252 dev_info(&ci->i2c->dev, "enable cam buffer mode\n"); 286 dev_info(&ci->i2c->dev, "enable cam buffer mode\n");
253 /* write_reg(ci, 0x0d, 0x00); */ 287 write_reg(ci, 0x0d, 0x00);
254 /* write_reg(ci, 0x0e, 0x01); */ 288 write_reg(ci, 0x0e, 0x01);
255 write_regm(ci, 0x08, 0x40, 0x40); 289 write_regm(ci, 0x08, 0x40, 0x40);
256 /* read_reg(ci, 0x12, &dummy); */ 290 read_reg(ci, 0x12, &dummy);
257 write_regm(ci, 0x08, 0x80, 0x80); 291 write_regm(ci, 0x08, 0x80, 0x80);
258#endif
259 break; 292 break;
260 default: 293 default:
261 break; 294 break;
@@ -325,7 +358,10 @@ static int init(struct cxd *ci)
325 if (status < 0) 358 if (status < 0)
326 break; 359 break;
327 360
328 if (ci->cfg.clock_mode) { 361 if (ci->cfg.clock_mode == 2) {
362 /* bitrate*2^13/ 72000 */
363 u32 reg = ((ci->cfg.bitrate << 13) + 71999) / 72000;
364
329 if (ci->cfg.polarity) { 365 if (ci->cfg.polarity) {
330 status = write_reg(ci, 0x09, 0x6f); 366 status = write_reg(ci, 0x09, 0x6f);
331 if (status < 0) 367 if (status < 0)
@@ -335,6 +371,25 @@ static int init(struct cxd *ci)
335 if (status < 0) 371 if (status < 0)
336 break; 372 break;
337 } 373 }
374 status = write_reg(ci, 0x20, 0x08);
375 if (status < 0)
376 break;
377 status = write_reg(ci, 0x21, (reg >> 8) & 0xff);
378 if (status < 0)
379 break;
380 status = write_reg(ci, 0x22, reg & 0xff);
381 if (status < 0)
382 break;
383 } else if (ci->cfg.clock_mode == 1) {
384 if (ci->cfg.polarity) {
385 status = write_reg(ci, 0x09, 0x6f); /* D */
386 if (status < 0)
387 break;
388 } else {
389 status = write_reg(ci, 0x09, 0x6d);
390 if (status < 0)
391 break;
392 }
338 status = write_reg(ci, 0x20, 0x68); 393 status = write_reg(ci, 0x20, 0x68);
339 if (status < 0) 394 if (status < 0)
340 break; 395 break;
@@ -346,7 +401,7 @@ static int init(struct cxd *ci)
346 break; 401 break;
347 } else { 402 } else {
348 if (ci->cfg.polarity) { 403 if (ci->cfg.polarity) {
349 status = write_reg(ci, 0x09, 0x4f); 404 status = write_reg(ci, 0x09, 0x4f); /* C */
350 if (status < 0) 405 if (status < 0)
351 break; 406 break;
352 } else { 407 } else {
@@ -354,7 +409,6 @@ static int init(struct cxd *ci)
354 if (status < 0) 409 if (status < 0)
355 break; 410 break;
356 } 411 }
357
358 status = write_reg(ci, 0x20, 0x28); 412 status = write_reg(ci, 0x20, 0x28);
359 if (status < 0) 413 if (status < 0)
360 break; 414 break;
@@ -401,7 +455,6 @@ static int read_attribute_mem(struct dvb_ca_en50221 *ca,
401 set_mode(ci, 1); 455 set_mode(ci, 1);
402 read_pccard(ci, address, &val, 1); 456 read_pccard(ci, address, &val, 1);
403 mutex_unlock(&ci->lock); 457 mutex_unlock(&ci->lock);
404 /* printk(KERN_INFO "%02x:%02x\n", address,val); */
405 return val; 458 return val;
406} 459}
407 460
@@ -446,6 +499,9 @@ static int slot_reset(struct dvb_ca_en50221 *ca, int slot)
446{ 499{
447 struct cxd *ci = ca->data; 500 struct cxd *ci = ca->data;
448 501
502 if (ci->cammode)
503 read_data(ca, slot, ci->rbuf, 0);
504
449 mutex_lock(&ci->lock); 505 mutex_lock(&ci->lock);
450 cam_mode(ci, 0); 506 cam_mode(ci, 0);
451 write_reg(ci, 0x00, 0x21); 507 write_reg(ci, 0x00, 0x21);
@@ -465,7 +521,6 @@ static int slot_reset(struct dvb_ca_en50221 *ca, int slot)
465 } 521 }
466 } 522 }
467 mutex_unlock(&ci->lock); 523 mutex_unlock(&ci->lock);
468 /* msleep(500); */
469 return 0; 524 return 0;
470} 525}
471 526
@@ -474,11 +529,19 @@ static int slot_shutdown(struct dvb_ca_en50221 *ca, int slot)
474 struct cxd *ci = ca->data; 529 struct cxd *ci = ca->data;
475 530
476 dev_info(&ci->i2c->dev, "%s\n", __func__); 531 dev_info(&ci->i2c->dev, "%s\n", __func__);
532 if (ci->cammode)
533 read_data(ca, slot, ci->rbuf, 0);
477 mutex_lock(&ci->lock); 534 mutex_lock(&ci->lock);
535 write_reg(ci, 0x00, 0x21);
536 write_reg(ci, 0x06, 0x1F);
537 msleep(300);
538
478 write_regm(ci, 0x09, 0x08, 0x08); 539 write_regm(ci, 0x09, 0x08, 0x08);
479 write_regm(ci, 0x20, 0x80, 0x80); /* Reset CAM Mode */ 540 write_regm(ci, 0x20, 0x80, 0x80); /* Reset CAM Mode */
480 write_regm(ci, 0x06, 0x07, 0x07); /* Clear IO Mode */ 541 write_regm(ci, 0x06, 0x07, 0x07); /* Clear IO Mode */
542
481 ci->mode = -1; 543 ci->mode = -1;
544 ci->write_busy = 0;
482 mutex_unlock(&ci->lock); 545 mutex_unlock(&ci->lock);
483 return 0; 546 return 0;
484} 547}
@@ -490,9 +553,7 @@ static int slot_ts_enable(struct dvb_ca_en50221 *ca, int slot)
490 mutex_lock(&ci->lock); 553 mutex_lock(&ci->lock);
491 write_regm(ci, 0x09, 0x00, 0x08); 554 write_regm(ci, 0x09, 0x00, 0x08);
492 set_mode(ci, 0); 555 set_mode(ci, 0);
493#ifdef BUFFER_MODE
494 cam_mode(ci, 1); 556 cam_mode(ci, 1);
495#endif
496 mutex_unlock(&ci->lock); 557 mutex_unlock(&ci->lock);
497 return 0; 558 return 0;
498} 559}
@@ -506,12 +567,10 @@ static int campoll(struct cxd *ci)
506 return 0; 567 return 0;
507 write_reg(ci, 0x05, istat); 568 write_reg(ci, 0x05, istat);
508 569
509 if (istat & 0x40) { 570 if (istat & 0x40)
510 ci->dr = 1; 571 ci->dr = 1;
511 dev_info(&ci->i2c->dev, "DR\n");
512 }
513 if (istat & 0x20) 572 if (istat & 0x20)
514 dev_info(&ci->i2c->dev, "WC\n"); 573 ci->write_busy = 0;
515 574
516 if (istat & 2) { 575 if (istat & 2) {
517 u8 slotstat; 576 u8 slotstat;
@@ -519,7 +578,8 @@ static int campoll(struct cxd *ci)
519 read_reg(ci, 0x01, &slotstat); 578 read_reg(ci, 0x01, &slotstat);
520 if (!(2 & slotstat)) { 579 if (!(2 & slotstat)) {
521 if (!ci->slot_stat) { 580 if (!ci->slot_stat) {
522 ci->slot_stat = DVB_CA_EN50221_POLL_CAM_PRESENT; 581 ci->slot_stat |=
582 DVB_CA_EN50221_POLL_CAM_PRESENT;
523 write_regm(ci, 0x03, 0x08, 0x08); 583 write_regm(ci, 0x03, 0x08, 0x08);
524 } 584 }
525 585
@@ -531,8 +591,8 @@ static int campoll(struct cxd *ci)
531 ci->ready = 0; 591 ci->ready = 0;
532 } 592 }
533 } 593 }
534 if (istat & 8 && 594 if ((istat & 8) &&
535 ci->slot_stat == DVB_CA_EN50221_POLL_CAM_PRESENT) { 595 (ci->slot_stat == DVB_CA_EN50221_POLL_CAM_PRESENT)) {
536 ci->ready = 1; 596 ci->ready = 1;
537 ci->slot_stat |= DVB_CA_EN50221_POLL_CAM_READY; 597 ci->slot_stat |= DVB_CA_EN50221_POLL_CAM_READY;
538 } 598 }
@@ -553,7 +613,6 @@ static int poll_slot_status(struct dvb_ca_en50221 *ca, int slot, int open)
553 return ci->slot_stat; 613 return ci->slot_stat;
554} 614}
555 615
556#ifdef BUFFER_MODE
557static int read_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount) 616static int read_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount)
558{ 617{
559 struct cxd *ci = ca->data; 618 struct cxd *ci = ca->data;
@@ -564,30 +623,38 @@ static int read_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount)
564 campoll(ci); 623 campoll(ci);
565 mutex_unlock(&ci->lock); 624 mutex_unlock(&ci->lock);
566 625
567 dev_info(&ci->i2c->dev, "%s\n", __func__);
568 if (!ci->dr) 626 if (!ci->dr)
569 return 0; 627 return 0;
570 628
571 mutex_lock(&ci->lock); 629 mutex_lock(&ci->lock);
572 read_reg(ci, 0x0f, &msb); 630 read_reg(ci, 0x0f, &msb);
573 read_reg(ci, 0x10, &lsb); 631 read_reg(ci, 0x10, &lsb);
574 len = (msb << 8) | lsb; 632 len = ((u16)msb << 8) | lsb;
633 if (len > ecount || len < 2) {
634 /* read it anyway or cxd may hang */
635 read_block(ci, 0x12, ci->rbuf, len);
636 mutex_unlock(&ci->lock);
637 return -EIO;
638 }
575 read_block(ci, 0x12, ebuf, len); 639 read_block(ci, 0x12, ebuf, len);
576 ci->dr = 0; 640 ci->dr = 0;
577 mutex_unlock(&ci->lock); 641 mutex_unlock(&ci->lock);
578
579 return len; 642 return len;
580} 643}
581 644
645#ifdef BUFFER_MODE
646
582static int write_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount) 647static int write_data(struct dvb_ca_en50221 *ca, int slot, u8 *ebuf, int ecount)
583{ 648{
584 struct cxd *ci = ca->data; 649 struct cxd *ci = ca->data;
585 650
651 if (ci->write_busy)
652 return -EAGAIN;
586 mutex_lock(&ci->lock); 653 mutex_lock(&ci->lock);
587 dev_info(&ci->i2c->dev, "%s %d\n", __func__, ecount);
588 write_reg(ci, 0x0d, ecount >> 8); 654 write_reg(ci, 0x0d, ecount >> 8);
589 write_reg(ci, 0x0e, ecount & 0xff); 655 write_reg(ci, 0x0e, ecount & 0xff);
590 write_block(ci, 0x11, ebuf, ecount); 656 write_block(ci, 0x11, ebuf, ecount);
657 ci->write_busy = 1;
591 mutex_unlock(&ci->lock); 658 mutex_unlock(&ci->lock);
592 return ecount; 659 return ecount;
593} 660}
diff --git a/drivers/staging/media/cxd2099/cxd2099.h b/drivers/staging/media/cxd2099/cxd2099.h
index 0eb607c5b423..f4b29b1d6eb8 100644
--- a/drivers/staging/media/cxd2099/cxd2099.h
+++ b/drivers/staging/media/cxd2099/cxd2099.h
@@ -30,8 +30,10 @@
30struct cxd2099_cfg { 30struct cxd2099_cfg {
31 u32 bitrate; 31 u32 bitrate;
32 u8 adr; 32 u8 adr;
33 u8 polarity:1; 33 u8 polarity;
34 u8 clock_mode:1; 34 u8 clock_mode;
35
36 u32 max_i2c;
35}; 37};
36 38
37#if defined(CONFIG_DVB_CXD2099) || \ 39#if defined(CONFIG_DVB_CXD2099) || \
diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
index d283341cfe43..56cd4e5e51b2 100644
--- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c
+++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c
@@ -45,6 +45,7 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
45 {USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */ 45 {USB_DEVICE(0x2001, 0x3311)}, /* DLink GO-USB-N150 REV B1 */
46 {USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */ 46 {USB_DEVICE(0x2357, 0x010c)}, /* TP-Link TL-WN722N v2 */
47 {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */ 47 {USB_DEVICE(0x0df6, 0x0076)}, /* Sitecom N150 v2 */
48 {USB_DEVICE(USB_VENDER_ID_REALTEK, 0xffef)}, /* Rosewill RNX-N150NUB */
48 {} /* Terminating entry */ 49 {} /* Terminating entry */
49}; 50};
50 51
diff --git a/drivers/target/iscsi/cxgbit/cxgbit_cm.c b/drivers/target/iscsi/cxgbit/cxgbit_cm.c
index e583dd8a418b..d4fa41be80f9 100644
--- a/drivers/target/iscsi/cxgbit/cxgbit_cm.c
+++ b/drivers/target/iscsi/cxgbit/cxgbit_cm.c
@@ -1510,11 +1510,13 @@ cxgbit_pass_open_rpl(struct cxgbit_device *cdev, struct sk_buff *skb)
1510 1510
1511 if (!cnp) { 1511 if (!cnp) {
1512 pr_info("%s stid %d lookup failure\n", __func__, stid); 1512 pr_info("%s stid %d lookup failure\n", __func__, stid);
1513 return; 1513 goto rel_skb;
1514 } 1514 }
1515 1515
1516 cxgbit_wake_up(&cnp->com.wr_wait, __func__, rpl->status); 1516 cxgbit_wake_up(&cnp->com.wr_wait, __func__, rpl->status);
1517 cxgbit_put_cnp(cnp); 1517 cxgbit_put_cnp(cnp);
1518rel_skb:
1519 __kfree_skb(skb);
1518} 1520}
1519 1521
1520static void 1522static void
@@ -1530,11 +1532,13 @@ cxgbit_close_listsrv_rpl(struct cxgbit_device *cdev, struct sk_buff *skb)
1530 1532
1531 if (!cnp) { 1533 if (!cnp) {
1532 pr_info("%s stid %d lookup failure\n", __func__, stid); 1534 pr_info("%s stid %d lookup failure\n", __func__, stid);
1533 return; 1535 goto rel_skb;
1534 } 1536 }
1535 1537
1536 cxgbit_wake_up(&cnp->com.wr_wait, __func__, rpl->status); 1538 cxgbit_wake_up(&cnp->com.wr_wait, __func__, rpl->status);
1537 cxgbit_put_cnp(cnp); 1539 cxgbit_put_cnp(cnp);
1540rel_skb:
1541 __kfree_skb(skb);
1538} 1542}
1539 1543
1540static void 1544static void
@@ -1819,12 +1823,16 @@ static void cxgbit_set_tcb_rpl(struct cxgbit_device *cdev, struct sk_buff *skb)
1819 struct tid_info *t = lldi->tids; 1823 struct tid_info *t = lldi->tids;
1820 1824
1821 csk = lookup_tid(t, tid); 1825 csk = lookup_tid(t, tid);
1822 if (unlikely(!csk)) 1826 if (unlikely(!csk)) {
1823 pr_err("can't find connection for tid %u.\n", tid); 1827 pr_err("can't find connection for tid %u.\n", tid);
1824 else 1828 goto rel_skb;
1829 } else {
1825 cxgbit_wake_up(&csk->com.wr_wait, __func__, rpl->status); 1830 cxgbit_wake_up(&csk->com.wr_wait, __func__, rpl->status);
1831 }
1826 1832
1827 cxgbit_put_csk(csk); 1833 cxgbit_put_csk(csk);
1834rel_skb:
1835 __kfree_skb(skb);
1828} 1836}
1829 1837
1830static void cxgbit_rx_data(struct cxgbit_device *cdev, struct sk_buff *skb) 1838static void cxgbit_rx_data(struct cxgbit_device *cdev, struct sk_buff *skb)
diff --git a/drivers/target/iscsi/cxgbit/cxgbit_target.c b/drivers/target/iscsi/cxgbit/cxgbit_target.c
index dda13f1af38e..514986b57c2d 100644
--- a/drivers/target/iscsi/cxgbit/cxgbit_target.c
+++ b/drivers/target/iscsi/cxgbit/cxgbit_target.c
@@ -827,7 +827,7 @@ cxgbit_put_login_tx(struct iscsi_conn *conn, struct iscsi_login *login,
827 827
828static void 828static void
829cxgbit_skb_copy_to_sg(struct sk_buff *skb, struct scatterlist *sg, 829cxgbit_skb_copy_to_sg(struct sk_buff *skb, struct scatterlist *sg,
830 unsigned int nents) 830 unsigned int nents, u32 skip)
831{ 831{
832 struct skb_seq_state st; 832 struct skb_seq_state st;
833 const u8 *buf; 833 const u8 *buf;
@@ -846,7 +846,7 @@ cxgbit_skb_copy_to_sg(struct sk_buff *skb, struct scatterlist *sg,
846 } 846 }
847 847
848 consumed += sg_pcopy_from_buffer(sg, nents, (void *)buf, 848 consumed += sg_pcopy_from_buffer(sg, nents, (void *)buf,
849 buf_len, consumed); 849 buf_len, skip + consumed);
850 } 850 }
851} 851}
852 852
@@ -912,7 +912,7 @@ cxgbit_handle_immediate_data(struct iscsi_cmd *cmd, struct iscsi_scsi_req *hdr,
912 struct scatterlist *sg = &cmd->se_cmd.t_data_sg[0]; 912 struct scatterlist *sg = &cmd->se_cmd.t_data_sg[0];
913 u32 sg_nents = max(1UL, DIV_ROUND_UP(pdu_cb->dlen, PAGE_SIZE)); 913 u32 sg_nents = max(1UL, DIV_ROUND_UP(pdu_cb->dlen, PAGE_SIZE));
914 914
915 cxgbit_skb_copy_to_sg(csk->skb, sg, sg_nents); 915 cxgbit_skb_copy_to_sg(csk->skb, sg, sg_nents, 0);
916 } 916 }
917 917
918 cmd->write_data_done += pdu_cb->dlen; 918 cmd->write_data_done += pdu_cb->dlen;
@@ -1069,11 +1069,13 @@ static int cxgbit_handle_iscsi_dataout(struct cxgbit_sock *csk)
1069 cmd->se_cmd.data_length); 1069 cmd->se_cmd.data_length);
1070 1070
1071 if (!(pdu_cb->flags & PDUCBF_RX_DATA_DDPD)) { 1071 if (!(pdu_cb->flags & PDUCBF_RX_DATA_DDPD)) {
1072 u32 skip = data_offset % PAGE_SIZE;
1073
1072 sg_off = data_offset / PAGE_SIZE; 1074 sg_off = data_offset / PAGE_SIZE;
1073 sg_start = &cmd->se_cmd.t_data_sg[sg_off]; 1075 sg_start = &cmd->se_cmd.t_data_sg[sg_off];
1074 sg_nents = max(1UL, DIV_ROUND_UP(data_len, PAGE_SIZE)); 1076 sg_nents = max(1UL, DIV_ROUND_UP(skip + data_len, PAGE_SIZE));
1075 1077
1076 cxgbit_skb_copy_to_sg(csk->skb, sg_start, sg_nents); 1078 cxgbit_skb_copy_to_sg(csk->skb, sg_start, sg_nents, skip);
1077 } 1079 }
1078 1080
1079check_payload: 1081check_payload:
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 74e4975dd1b1..5001261f5d69 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -418,6 +418,7 @@ int iscsit_reset_np_thread(
418 return 0; 418 return 0;
419 } 419 }
420 np->np_thread_state = ISCSI_NP_THREAD_RESET; 420 np->np_thread_state = ISCSI_NP_THREAD_RESET;
421 atomic_inc(&np->np_reset_count);
421 422
422 if (np->np_thread) { 423 if (np->np_thread) {
423 spin_unlock_bh(&np->np_thread_lock); 424 spin_unlock_bh(&np->np_thread_lock);
@@ -2167,6 +2168,7 @@ iscsit_setup_text_cmd(struct iscsi_conn *conn, struct iscsi_cmd *cmd,
2167 cmd->cmd_sn = be32_to_cpu(hdr->cmdsn); 2168 cmd->cmd_sn = be32_to_cpu(hdr->cmdsn);
2168 cmd->exp_stat_sn = be32_to_cpu(hdr->exp_statsn); 2169 cmd->exp_stat_sn = be32_to_cpu(hdr->exp_statsn);
2169 cmd->data_direction = DMA_NONE; 2170 cmd->data_direction = DMA_NONE;
2171 kfree(cmd->text_in_ptr);
2170 cmd->text_in_ptr = NULL; 2172 cmd->text_in_ptr = NULL;
2171 2173
2172 return 0; 2174 return 0;
@@ -3487,9 +3489,9 @@ iscsit_build_text_rsp(struct iscsi_cmd *cmd, struct iscsi_conn *conn,
3487 return text_length; 3489 return text_length;
3488 3490
3489 if (completed) { 3491 if (completed) {
3490 hdr->flags |= ISCSI_FLAG_CMD_FINAL; 3492 hdr->flags = ISCSI_FLAG_CMD_FINAL;
3491 } else { 3493 } else {
3492 hdr->flags |= ISCSI_FLAG_TEXT_CONTINUE; 3494 hdr->flags = ISCSI_FLAG_TEXT_CONTINUE;
3493 cmd->read_data_done += text_length; 3495 cmd->read_data_done += text_length;
3494 if (cmd->targ_xfer_tag == 0xFFFFFFFF) 3496 if (cmd->targ_xfer_tag == 0xFFFFFFFF)
3495 cmd->targ_xfer_tag = session_get_next_ttt(conn->sess); 3497 cmd->targ_xfer_tag = session_get_next_ttt(conn->sess);
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index e9bdc8b86e7d..dc13afbd4c88 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -1243,9 +1243,11 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
1243 flush_signals(current); 1243 flush_signals(current);
1244 1244
1245 spin_lock_bh(&np->np_thread_lock); 1245 spin_lock_bh(&np->np_thread_lock);
1246 if (np->np_thread_state == ISCSI_NP_THREAD_RESET) { 1246 if (atomic_dec_if_positive(&np->np_reset_count) >= 0) {
1247 np->np_thread_state = ISCSI_NP_THREAD_ACTIVE; 1247 np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
1248 spin_unlock_bh(&np->np_thread_lock);
1248 complete(&np->np_restart_comp); 1249 complete(&np->np_restart_comp);
1250 return 1;
1249 } else if (np->np_thread_state == ISCSI_NP_THREAD_SHUTDOWN) { 1251 } else if (np->np_thread_state == ISCSI_NP_THREAD_SHUTDOWN) {
1250 spin_unlock_bh(&np->np_thread_lock); 1252 spin_unlock_bh(&np->np_thread_lock);
1251 goto exit; 1253 goto exit;
@@ -1278,7 +1280,8 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
1278 goto exit; 1280 goto exit;
1279 } else if (rc < 0) { 1281 } else if (rc < 0) {
1280 spin_lock_bh(&np->np_thread_lock); 1282 spin_lock_bh(&np->np_thread_lock);
1281 if (np->np_thread_state == ISCSI_NP_THREAD_RESET) { 1283 if (atomic_dec_if_positive(&np->np_reset_count) >= 0) {
1284 np->np_thread_state = ISCSI_NP_THREAD_ACTIVE;
1282 spin_unlock_bh(&np->np_thread_lock); 1285 spin_unlock_bh(&np->np_thread_lock);
1283 complete(&np->np_restart_comp); 1286 complete(&np->np_restart_comp);
1284 iscsit_put_transport(conn->conn_transport); 1287 iscsit_put_transport(conn->conn_transport);
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index 36913734c6bc..02e8a5d86658 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -364,7 +364,7 @@ void core_tpg_del_initiator_node_acl(struct se_node_acl *acl)
364 mutex_lock(&tpg->acl_node_mutex); 364 mutex_lock(&tpg->acl_node_mutex);
365 if (acl->dynamic_node_acl) 365 if (acl->dynamic_node_acl)
366 acl->dynamic_node_acl = 0; 366 acl->dynamic_node_acl = 0;
367 list_del(&acl->acl_list); 367 list_del_init(&acl->acl_list);
368 mutex_unlock(&tpg->acl_node_mutex); 368 mutex_unlock(&tpg->acl_node_mutex);
369 369
370 target_shutdown_sessions(acl); 370 target_shutdown_sessions(acl);
@@ -548,7 +548,7 @@ int core_tpg_deregister(struct se_portal_group *se_tpg)
548 * in transport_deregister_session(). 548 * in transport_deregister_session().
549 */ 549 */
550 list_for_each_entry_safe(nacl, nacl_tmp, &node_list, acl_list) { 550 list_for_each_entry_safe(nacl, nacl_tmp, &node_list, acl_list) {
551 list_del(&nacl->acl_list); 551 list_del_init(&nacl->acl_list);
552 552
553 core_tpg_wait_for_nacl_pr_ref(nacl); 553 core_tpg_wait_for_nacl_pr_ref(nacl);
554 core_free_device_list_for_node(nacl, se_tpg); 554 core_free_device_list_for_node(nacl, se_tpg);
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 97fed9a298bd..836d552b0385 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -466,7 +466,7 @@ static void target_complete_nacl(struct kref *kref)
466 } 466 }
467 467
468 mutex_lock(&se_tpg->acl_node_mutex); 468 mutex_lock(&se_tpg->acl_node_mutex);
469 list_del(&nacl->acl_list); 469 list_del_init(&nacl->acl_list);
470 mutex_unlock(&se_tpg->acl_node_mutex); 470 mutex_unlock(&se_tpg->acl_node_mutex);
471 471
472 core_tpg_wait_for_nacl_pr_ref(nacl); 472 core_tpg_wait_for_nacl_pr_ref(nacl);
@@ -538,7 +538,7 @@ void transport_free_session(struct se_session *se_sess)
538 spin_unlock_irqrestore(&se_nacl->nacl_sess_lock, flags); 538 spin_unlock_irqrestore(&se_nacl->nacl_sess_lock, flags);
539 539
540 if (se_nacl->dynamic_stop) 540 if (se_nacl->dynamic_stop)
541 list_del(&se_nacl->acl_list); 541 list_del_init(&se_nacl->acl_list);
542 } 542 }
543 mutex_unlock(&se_tpg->acl_node_mutex); 543 mutex_unlock(&se_tpg->acl_node_mutex);
544 544
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 80ee130f8253..942d094269fb 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -563,8 +563,6 @@ static int scatter_data_area(struct tcmu_dev *udev,
563 block_remaining); 563 block_remaining);
564 to_offset = get_block_offset_user(udev, dbi, 564 to_offset = get_block_offset_user(udev, dbi,
565 block_remaining); 565 block_remaining);
566 offset = DATA_BLOCK_SIZE - block_remaining;
567 to += offset;
568 566
569 if (*iov_cnt != 0 && 567 if (*iov_cnt != 0 &&
570 to_offset == iov_tail(*iov)) { 568 to_offset == iov_tail(*iov)) {
@@ -575,8 +573,10 @@ static int scatter_data_area(struct tcmu_dev *udev,
575 (*iov)->iov_len = copy_bytes; 573 (*iov)->iov_len = copy_bytes;
576 } 574 }
577 if (copy_data) { 575 if (copy_data) {
578 memcpy(to, from + sg->length - sg_remaining, 576 offset = DATA_BLOCK_SIZE - block_remaining;
579 copy_bytes); 577 memcpy(to + offset,
578 from + sg->length - sg_remaining,
579 copy_bytes);
580 tcmu_flush_dcache_range(to, copy_bytes); 580 tcmu_flush_dcache_range(to, copy_bytes);
581 } 581 }
582 sg_remaining -= copy_bytes; 582 sg_remaining -= copy_bytes;
@@ -637,9 +637,8 @@ static void gather_data_area(struct tcmu_dev *udev, struct tcmu_cmd *cmd,
637 copy_bytes = min_t(size_t, sg_remaining, 637 copy_bytes = min_t(size_t, sg_remaining,
638 block_remaining); 638 block_remaining);
639 offset = DATA_BLOCK_SIZE - block_remaining; 639 offset = DATA_BLOCK_SIZE - block_remaining;
640 from += offset;
641 tcmu_flush_dcache_range(from, copy_bytes); 640 tcmu_flush_dcache_range(from, copy_bytes);
642 memcpy(to + sg->length - sg_remaining, from, 641 memcpy(to + sg->length - sg_remaining, from + offset,
643 copy_bytes); 642 copy_bytes);
644 643
645 sg_remaining -= copy_bytes; 644 sg_remaining -= copy_bytes;
@@ -1433,6 +1432,8 @@ static int tcmu_update_uio_info(struct tcmu_dev *udev)
1433 if (udev->dev_config[0]) 1432 if (udev->dev_config[0])
1434 snprintf(str + used, size - used, "/%s", udev->dev_config); 1433 snprintf(str + used, size - used, "/%s", udev->dev_config);
1435 1434
1435 /* If the old string exists, free it */
1436 kfree(info->name);
1436 info->name = str; 1437 info->name = str;
1437 1438
1438 return 0; 1439 return 0;
diff --git a/drivers/thunderbolt/eeprom.c b/drivers/thunderbolt/eeprom.c
index 308b6e17c88a..fe2f00ceafc5 100644
--- a/drivers/thunderbolt/eeprom.c
+++ b/drivers/thunderbolt/eeprom.c
@@ -333,6 +333,15 @@ static int tb_drom_parse_entry_port(struct tb_switch *sw,
333 int res; 333 int res;
334 enum tb_port_type type; 334 enum tb_port_type type;
335 335
336 /*
337 * Some DROMs list more ports than the controller actually has
338 * so we skip those but allow the parser to continue.
339 */
340 if (header->index > sw->config.max_port_number) {
341 dev_info_once(&sw->dev, "ignoring unnecessary extra entries in DROM\n");
342 return 0;
343 }
344
336 port = &sw->ports[header->index]; 345 port = &sw->ports[header->index];
337 port->disabled = header->port_disabled; 346 port->disabled = header->port_disabled;
338 if (port->disabled) 347 if (port->disabled)
diff --git a/drivers/thunderbolt/icm.c b/drivers/thunderbolt/icm.c
index 8ee340290219..bdaac1ff00a5 100644
--- a/drivers/thunderbolt/icm.c
+++ b/drivers/thunderbolt/icm.c
@@ -904,7 +904,14 @@ static int icm_driver_ready(struct tb *tb)
904 904
905static int icm_suspend(struct tb *tb) 905static int icm_suspend(struct tb *tb)
906{ 906{
907 return nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_SAVE_DEVS, 0); 907 int ret;
908
909 ret = nhi_mailbox_cmd(tb->nhi, NHI_MAILBOX_SAVE_DEVS, 0);
910 if (ret)
911 tb_info(tb, "Ignoring mailbox command error (%d) in %s\n",
912 ret, __func__);
913
914 return 0;
908} 915}
909 916
910/* 917/*
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index 284749fb0f6b..a6d5164c33a9 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -69,13 +69,8 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
69#ifdef CONFIG_UNIX98_PTYS 69#ifdef CONFIG_UNIX98_PTYS
70 if (tty->driver == ptm_driver) { 70 if (tty->driver == ptm_driver) {
71 mutex_lock(&devpts_mutex); 71 mutex_lock(&devpts_mutex);
72 if (tty->link->driver_data) { 72 if (tty->link->driver_data)
73 struct path *path = tty->link->driver_data; 73 devpts_pty_kill(tty->link->driver_data);
74
75 devpts_pty_kill(path->dentry);
76 path_put(path);
77 kfree(path);
78 }
79 mutex_unlock(&devpts_mutex); 74 mutex_unlock(&devpts_mutex);
80 } 75 }
81#endif 76#endif
@@ -607,25 +602,24 @@ static inline void legacy_pty_init(void) { }
607static struct cdev ptmx_cdev; 602static struct cdev ptmx_cdev;
608 603
609/** 604/**
610 * pty_open_peer - open the peer of a pty 605 * ptm_open_peer - open the peer of a pty
611 * @tty: the peer of the pty being opened 606 * @master: the open struct file of the ptmx device node
607 * @tty: the master of the pty being opened
608 * @flags: the flags for open
612 * 609 *
613 * Open the cached dentry in tty->link, providing a safe way for userspace 610 * Provide a race free way for userspace to open the slave end of a pty
614 * to get the slave end of a pty (where they have the master fd and cannot 611 * (where they have the master fd and cannot access or trust the mount
615 * access or trust the mount namespace /dev/pts was mounted inside). 612 * namespace /dev/pts was mounted inside).
616 */ 613 */
617static struct file *pty_open_peer(struct tty_struct *tty, int flags) 614int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags)
618{
619 if (tty->driver->subtype != PTY_TYPE_MASTER)
620 return ERR_PTR(-EIO);
621 return dentry_open(tty->link->driver_data, flags, current_cred());
622}
623
624static int pty_get_peer(struct tty_struct *tty, int flags)
625{ 615{
626 int fd = -1; 616 int fd = -1;
627 struct file *filp = NULL; 617 struct file *filp;
628 int retval = -EINVAL; 618 int retval = -EINVAL;
619 struct path path;
620
621 if (tty->driver != ptm_driver)
622 return -EIO;
629 623
630 fd = get_unused_fd_flags(0); 624 fd = get_unused_fd_flags(0);
631 if (fd < 0) { 625 if (fd < 0) {
@@ -633,7 +627,16 @@ static int pty_get_peer(struct tty_struct *tty, int flags)
633 goto err; 627 goto err;
634 } 628 }
635 629
636 filp = pty_open_peer(tty, flags); 630 /* Compute the slave's path */
631 path.mnt = devpts_mntget(master, tty->driver_data);
632 if (IS_ERR(path.mnt)) {
633 retval = PTR_ERR(path.mnt);
634 goto err_put;
635 }
636 path.dentry = tty->link->driver_data;
637
638 filp = dentry_open(&path, flags, current_cred());
639 mntput(path.mnt);
637 if (IS_ERR(filp)) { 640 if (IS_ERR(filp)) {
638 retval = PTR_ERR(filp); 641 retval = PTR_ERR(filp);
639 goto err_put; 642 goto err_put;
@@ -662,8 +665,6 @@ static int pty_unix98_ioctl(struct tty_struct *tty,
662 return pty_get_pktmode(tty, (int __user *)arg); 665 return pty_get_pktmode(tty, (int __user *)arg);
663 case TIOCGPTN: /* Get PT Number */ 666 case TIOCGPTN: /* Get PT Number */
664 return put_user(tty->index, (unsigned int __user *)arg); 667 return put_user(tty->index, (unsigned int __user *)arg);
665 case TIOCGPTPEER: /* Open the other end */
666 return pty_get_peer(tty, (int) arg);
667 case TIOCSIG: /* Send signal to other side of pty */ 668 case TIOCSIG: /* Send signal to other side of pty */
668 return pty_signal(tty, (int) arg); 669 return pty_signal(tty, (int) arg);
669 } 670 }
@@ -791,7 +792,6 @@ static int ptmx_open(struct inode *inode, struct file *filp)
791{ 792{
792 struct pts_fs_info *fsi; 793 struct pts_fs_info *fsi;
793 struct tty_struct *tty; 794 struct tty_struct *tty;
794 struct path *pts_path;
795 struct dentry *dentry; 795 struct dentry *dentry;
796 int retval; 796 int retval;
797 int index; 797 int index;
@@ -845,26 +845,16 @@ static int ptmx_open(struct inode *inode, struct file *filp)
845 retval = PTR_ERR(dentry); 845 retval = PTR_ERR(dentry);
846 goto err_release; 846 goto err_release;
847 } 847 }
848 /* We need to cache a fake path for TIOCGPTPEER. */ 848 tty->link->driver_data = dentry;
849 pts_path = kmalloc(sizeof(struct path), GFP_KERNEL);
850 if (!pts_path)
851 goto err_release;
852 pts_path->mnt = filp->f_path.mnt;
853 pts_path->dentry = dentry;
854 path_get(pts_path);
855 tty->link->driver_data = pts_path;
856 849
857 retval = ptm_driver->ops->open(tty, filp); 850 retval = ptm_driver->ops->open(tty, filp);
858 if (retval) 851 if (retval)
859 goto err_path_put; 852 goto err_release;
860 853
861 tty_debug_hangup(tty, "opening (count=%d)\n", tty->count); 854 tty_debug_hangup(tty, "opening (count=%d)\n", tty->count);
862 855
863 tty_unlock(tty); 856 tty_unlock(tty);
864 return 0; 857 return 0;
865err_path_put:
866 path_put(pts_path);
867 kfree(pts_path);
868err_release: 858err_release:
869 tty_unlock(tty); 859 tty_unlock(tty);
870 // This will also put-ref the fsi 860 // This will also put-ref the fsi
diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c
index b5def356af63..1aab3010fbfa 100644
--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -1043,13 +1043,24 @@ int serial8250_register_8250_port(struct uart_8250_port *up)
1043 if (up->dl_write) 1043 if (up->dl_write)
1044 uart->dl_write = up->dl_write; 1044 uart->dl_write = up->dl_write;
1045 1045
1046 if (serial8250_isa_config != NULL) 1046 if (uart->port.type != PORT_8250_CIR) {
1047 serial8250_isa_config(0, &uart->port, 1047 if (serial8250_isa_config != NULL)
1048 &uart->capabilities); 1048 serial8250_isa_config(0, &uart->port,
1049 &uart->capabilities);
1050
1051 ret = uart_add_one_port(&serial8250_reg,
1052 &uart->port);
1053 if (ret == 0)
1054 ret = uart->port.line;
1055 } else {
1056 dev_info(uart->port.dev,
1057 "skipping CIR port at 0x%lx / 0x%llx, IRQ %d\n",
1058 uart->port.iobase,
1059 (unsigned long long)uart->port.mapbase,
1060 uart->port.irq);
1049 1061
1050 ret = uart_add_one_port(&serial8250_reg, &uart->port); 1062 ret = 0;
1051 if (ret == 0) 1063 }
1052 ret = uart->port.line;
1053 } 1064 }
1054 mutex_unlock(&serial_mutex); 1065 mutex_unlock(&serial_mutex);
1055 1066
diff --git a/drivers/tty/serial/8250/8250_exar.c b/drivers/tty/serial/8250/8250_exar.c
index b5c98e5bf524..c6360fbdf808 100644
--- a/drivers/tty/serial/8250/8250_exar.c
+++ b/drivers/tty/serial/8250/8250_exar.c
@@ -261,7 +261,7 @@ __xr17v35x_register_gpio(struct pci_dev *pcidev,
261} 261}
262 262
263static const struct property_entry exar_gpio_properties[] = { 263static const struct property_entry exar_gpio_properties[] = {
264 PROPERTY_ENTRY_U32("linux,first-pin", 0), 264 PROPERTY_ENTRY_U32("exar,first-pin", 0),
265 PROPERTY_ENTRY_U32("ngpios", 16), 265 PROPERTY_ENTRY_U32("ngpios", 16),
266 { } 266 { }
267}; 267};
@@ -326,7 +326,7 @@ static int iot2040_rs485_config(struct uart_port *port,
326} 326}
327 327
328static const struct property_entry iot2040_gpio_properties[] = { 328static const struct property_entry iot2040_gpio_properties[] = {
329 PROPERTY_ENTRY_U32("linux,first-pin", 10), 329 PROPERTY_ENTRY_U32("exar,first-pin", 10),
330 PROPERTY_ENTRY_U32("ngpios", 1), 330 PROPERTY_ENTRY_U32("ngpios", 1),
331 { } 331 { }
332}; 332};
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 8a857bb34fbb..1888d168a41c 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -142,15 +142,7 @@ static struct vendor_data vendor_sbsa = {
142 .fixed_options = true, 142 .fixed_options = true,
143}; 143};
144 144
145/* 145#ifdef CONFIG_ACPI_SPCR_TABLE
146 * Erratum 44 for QDF2432v1 and QDF2400v1 SoCs describes the BUSY bit as
147 * occasionally getting stuck as 1. To avoid the potential for a hang, check
148 * TXFE == 0 instead of BUSY == 1. This may not be suitable for all UART
149 * implementations, so only do so if an affected platform is detected in
150 * parse_spcr().
151 */
152static bool qdf2400_e44_present = false;
153
154static struct vendor_data vendor_qdt_qdf2400_e44 = { 146static struct vendor_data vendor_qdt_qdf2400_e44 = {
155 .reg_offset = pl011_std_offsets, 147 .reg_offset = pl011_std_offsets,
156 .fr_busy = UART011_FR_TXFE, 148 .fr_busy = UART011_FR_TXFE,
@@ -165,6 +157,7 @@ static struct vendor_data vendor_qdt_qdf2400_e44 = {
165 .always_enabled = true, 157 .always_enabled = true,
166 .fixed_options = true, 158 .fixed_options = true,
167}; 159};
160#endif
168 161
169static u16 pl011_st_offsets[REG_ARRAY_SIZE] = { 162static u16 pl011_st_offsets[REG_ARRAY_SIZE] = {
170 [REG_DR] = UART01x_DR, 163 [REG_DR] = UART01x_DR,
@@ -2375,12 +2368,14 @@ static int __init pl011_console_match(struct console *co, char *name, int idx,
2375 resource_size_t addr; 2368 resource_size_t addr;
2376 int i; 2369 int i;
2377 2370
2378 if (strcmp(name, "qdf2400_e44") == 0) { 2371 /*
2379 pr_info_once("UART: Working around QDF2400 SoC erratum 44"); 2372 * Systems affected by the Qualcomm Technologies QDF2400 E44 erratum
2380 qdf2400_e44_present = true; 2373 * have a distinct console name, so make sure we check for that.
2381 } else if (strcmp(name, "pl011") != 0) { 2374 * The actual implementation of the erratum occurs in the probe
2375 * function.
2376 */
2377 if ((strcmp(name, "qdf2400_e44") != 0) && (strcmp(name, "pl011") != 0))
2382 return -ENODEV; 2378 return -ENODEV;
2383 }
2384 2379
2385 if (uart_parse_earlycon(options, &iotype, &addr, &options)) 2380 if (uart_parse_earlycon(options, &iotype, &addr, &options))
2386 return -ENODEV; 2381 return -ENODEV;
@@ -2734,11 +2729,17 @@ static int sbsa_uart_probe(struct platform_device *pdev)
2734 } 2729 }
2735 uap->port.irq = ret; 2730 uap->port.irq = ret;
2736 2731
2737 uap->reg_offset = vendor_sbsa.reg_offset; 2732#ifdef CONFIG_ACPI_SPCR_TABLE
2738 uap->vendor = qdf2400_e44_present ? 2733 if (qdf2400_e44_present) {
2739 &vendor_qdt_qdf2400_e44 : &vendor_sbsa; 2734 dev_info(&pdev->dev, "working around QDF2400 SoC erratum 44\n");
2735 uap->vendor = &vendor_qdt_qdf2400_e44;
2736 } else
2737#endif
2738 uap->vendor = &vendor_sbsa;
2739
2740 uap->reg_offset = uap->vendor->reg_offset;
2740 uap->fifosize = 32; 2741 uap->fifosize = 32;
2741 uap->port.iotype = vendor_sbsa.access_32b ? UPIO_MEM32 : UPIO_MEM; 2742 uap->port.iotype = uap->vendor->access_32b ? UPIO_MEM32 : UPIO_MEM;
2742 uap->port.ops = &sbsa_uart_pops; 2743 uap->port.ops = &sbsa_uart_pops;
2743 uap->fixed_baud = baudrate; 2744 uap->fixed_baud = baudrate;
2744 2745
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 974b13d24401..10c4038c0e8d 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2518,6 +2518,9 @@ long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
2518 case TIOCSSERIAL: 2518 case TIOCSSERIAL:
2519 tty_warn_deprecated_flags(p); 2519 tty_warn_deprecated_flags(p);
2520 break; 2520 break;
2521 case TIOCGPTPEER:
2522 /* Special because the struct file is needed */
2523 return ptm_open_peer(file, tty, (int)arg);
2521 default: 2524 default:
2522 retval = tty_jobctrl_ioctl(tty, real_tty, file, cmd, arg); 2525 retval = tty_jobctrl_ioctl(tty, real_tty, file, cmd, arg);
2523 if (retval != -ENOIOCTLCMD) 2526 if (retval != -ENOIOCTLCMD)
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index ab1bb3b538ac..7f277b092b5b 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -1888,7 +1888,7 @@ void usb_hcd_flush_endpoint(struct usb_device *udev,
1888 /* No more submits can occur */ 1888 /* No more submits can occur */
1889 spin_lock_irq(&hcd_urb_list_lock); 1889 spin_lock_irq(&hcd_urb_list_lock);
1890rescan: 1890rescan:
1891 list_for_each_entry (urb, &ep->urb_list, urb_list) { 1891 list_for_each_entry_reverse(urb, &ep->urb_list, urb_list) {
1892 int is_in; 1892 int is_in;
1893 1893
1894 if (urb->unlinked) 1894 if (urb->unlinked)
@@ -2485,6 +2485,8 @@ void usb_hc_died (struct usb_hcd *hcd)
2485 } 2485 }
2486 if (usb_hcd_is_primary_hcd(hcd) && hcd->shared_hcd) { 2486 if (usb_hcd_is_primary_hcd(hcd) && hcd->shared_hcd) {
2487 hcd = hcd->shared_hcd; 2487 hcd = hcd->shared_hcd;
2488 clear_bit(HCD_FLAG_RH_RUNNING, &hcd->flags);
2489 set_bit(HCD_FLAG_DEAD, &hcd->flags);
2488 if (hcd->rh_registered) { 2490 if (hcd->rh_registered) {
2489 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags); 2491 clear_bit(HCD_FLAG_POLL_RH, &hcd->flags);
2490 2492
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 6e6797d145dd..822f8c50e423 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -4725,7 +4725,8 @@ hub_power_remaining(struct usb_hub *hub)
4725static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus, 4725static void hub_port_connect(struct usb_hub *hub, int port1, u16 portstatus,
4726 u16 portchange) 4726 u16 portchange)
4727{ 4727{
4728 int status, i; 4728 int status = -ENODEV;
4729 int i;
4729 unsigned unit_load; 4730 unsigned unit_load;
4730 struct usb_device *hdev = hub->hdev; 4731 struct usb_device *hdev = hub->hdev;
4731 struct usb_hcd *hcd = bus_to_hcd(hdev->bus); 4732 struct usb_hcd *hcd = bus_to_hcd(hdev->bus);
@@ -4929,9 +4930,10 @@ loop:
4929 4930
4930done: 4931done:
4931 hub_port_disable(hub, port1, 1); 4932 hub_port_disable(hub, port1, 1);
4932 if (hcd->driver->relinquish_port && !hub->hdev->parent) 4933 if (hcd->driver->relinquish_port && !hub->hdev->parent) {
4933 hcd->driver->relinquish_port(hcd, port1); 4934 if (status != -ENOTCONN && status != -ENODEV)
4934 4935 hcd->driver->relinquish_port(hcd, port1);
4936 }
4935} 4937}
4936 4938
4937/* Handle physical or logical connection change events. 4939/* Handle physical or logical connection change events.
diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c
index 3116edfcdc18..574da2b4529c 100644
--- a/drivers/usb/core/quirks.c
+++ b/drivers/usb/core/quirks.c
@@ -150,6 +150,9 @@ static const struct usb_device_id usb_quirk_list[] = {
150 /* appletouch */ 150 /* appletouch */
151 { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, 151 { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME },
152 152
153 /* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */
154 { USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM },
155
153 /* Avision AV600U */ 156 /* Avision AV600U */
154 { USB_DEVICE(0x0638, 0x0a13), .driver_info = 157 { USB_DEVICE(0x0638, 0x0a13), .driver_info =
155 USB_QUIRK_STRING_FETCH_255 }, 158 USB_QUIRK_STRING_FETCH_255 },
@@ -249,6 +252,7 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = {
249 { USB_DEVICE(0x093a, 0x2500), .driver_info = USB_QUIRK_RESET_RESUME }, 252 { USB_DEVICE(0x093a, 0x2500), .driver_info = USB_QUIRK_RESET_RESUME },
250 { USB_DEVICE(0x093a, 0x2510), .driver_info = USB_QUIRK_RESET_RESUME }, 253 { USB_DEVICE(0x093a, 0x2510), .driver_info = USB_QUIRK_RESET_RESUME },
251 { USB_DEVICE(0x093a, 0x2521), .driver_info = USB_QUIRK_RESET_RESUME }, 254 { USB_DEVICE(0x093a, 0x2521), .driver_info = USB_QUIRK_RESET_RESUME },
255 { USB_DEVICE(0x03f0, 0x2b4a), .driver_info = USB_QUIRK_RESET_RESUME },
252 256
253 /* Logitech Optical Mouse M90/M100 */ 257 /* Logitech Optical Mouse M90/M100 */
254 { USB_DEVICE(0x046d, 0xc05a), .driver_info = USB_QUIRK_RESET_RESUME }, 258 { USB_DEVICE(0x046d, 0xc05a), .driver_info = USB_QUIRK_RESET_RESUME },
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 6b299c7b7656..f064f1549333 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -896,9 +896,40 @@ static void __dwc3_prepare_one_trb(struct dwc3_ep *dep, struct dwc3_trb *trb,
896 if (!node) { 896 if (!node) {
897 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS_FIRST; 897 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS_FIRST;
898 898
899 /*
900 * USB Specification 2.0 Section 5.9.2 states that: "If
901 * there is only a single transaction in the microframe,
902 * only a DATA0 data packet PID is used. If there are
903 * two transactions per microframe, DATA1 is used for
904 * the first transaction data packet and DATA0 is used
905 * for the second transaction data packet. If there are
906 * three transactions per microframe, DATA2 is used for
907 * the first transaction data packet, DATA1 is used for
908 * the second, and DATA0 is used for the third."
909 *
910 * IOW, we should satisfy the following cases:
911 *
912 * 1) length <= maxpacket
913 * - DATA0
914 *
915 * 2) maxpacket < length <= (2 * maxpacket)
916 * - DATA1, DATA0
917 *
918 * 3) (2 * maxpacket) < length <= (3 * maxpacket)
919 * - DATA2, DATA1, DATA0
920 */
899 if (speed == USB_SPEED_HIGH) { 921 if (speed == USB_SPEED_HIGH) {
900 struct usb_ep *ep = &dep->endpoint; 922 struct usb_ep *ep = &dep->endpoint;
901 trb->size |= DWC3_TRB_SIZE_PCM1(ep->mult - 1); 923 unsigned int mult = ep->mult - 1;
924 unsigned int maxp = usb_endpoint_maxp(ep->desc);
925
926 if (length <= (2 * maxp))
927 mult--;
928
929 if (length <= maxp)
930 mult--;
931
932 trb->size |= DWC3_TRB_SIZE_PCM1(mult);
902 } 933 }
903 } else { 934 } else {
904 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS; 935 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS;
diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c
index 62dc9c7798e7..e1de8fe599a3 100644
--- a/drivers/usb/gadget/udc/renesas_usb3.c
+++ b/drivers/usb/gadget/udc/renesas_usb3.c
@@ -838,21 +838,32 @@ static struct renesas_usb3_request *usb3_get_request(struct renesas_usb3_ep
838 return usb3_req; 838 return usb3_req;
839} 839}
840 840
841static void usb3_request_done(struct renesas_usb3_ep *usb3_ep, 841static void __usb3_request_done(struct renesas_usb3_ep *usb3_ep,
842 struct renesas_usb3_request *usb3_req, int status) 842 struct renesas_usb3_request *usb3_req,
843 int status)
843{ 844{
844 struct renesas_usb3 *usb3 = usb3_ep_to_usb3(usb3_ep); 845 struct renesas_usb3 *usb3 = usb3_ep_to_usb3(usb3_ep);
845 unsigned long flags;
846 846
847 dev_dbg(usb3_to_dev(usb3), "giveback: ep%2d, %u, %u, %d\n", 847 dev_dbg(usb3_to_dev(usb3), "giveback: ep%2d, %u, %u, %d\n",
848 usb3_ep->num, usb3_req->req.length, usb3_req->req.actual, 848 usb3_ep->num, usb3_req->req.length, usb3_req->req.actual,
849 status); 849 status);
850 usb3_req->req.status = status; 850 usb3_req->req.status = status;
851 spin_lock_irqsave(&usb3->lock, flags);
852 usb3_ep->started = false; 851 usb3_ep->started = false;
853 list_del_init(&usb3_req->queue); 852 list_del_init(&usb3_req->queue);
854 spin_unlock_irqrestore(&usb3->lock, flags); 853 spin_unlock(&usb3->lock);
855 usb_gadget_giveback_request(&usb3_ep->ep, &usb3_req->req); 854 usb_gadget_giveback_request(&usb3_ep->ep, &usb3_req->req);
855 spin_lock(&usb3->lock);
856}
857
858static void usb3_request_done(struct renesas_usb3_ep *usb3_ep,
859 struct renesas_usb3_request *usb3_req, int status)
860{
861 struct renesas_usb3 *usb3 = usb3_ep_to_usb3(usb3_ep);
862 unsigned long flags;
863
864 spin_lock_irqsave(&usb3->lock, flags);
865 __usb3_request_done(usb3_ep, usb3_req, status);
866 spin_unlock_irqrestore(&usb3->lock, flags);
856} 867}
857 868
858static void usb3_irq_epc_pipe0_status_end(struct renesas_usb3 *usb3) 869static void usb3_irq_epc_pipe0_status_end(struct renesas_usb3 *usb3)
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index c8989c62a262..c8f38649f749 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -98,6 +98,7 @@ enum amd_chipset_gen {
98 AMD_CHIPSET_HUDSON2, 98 AMD_CHIPSET_HUDSON2,
99 AMD_CHIPSET_BOLTON, 99 AMD_CHIPSET_BOLTON,
100 AMD_CHIPSET_YANGTZE, 100 AMD_CHIPSET_YANGTZE,
101 AMD_CHIPSET_TAISHAN,
101 AMD_CHIPSET_UNKNOWN, 102 AMD_CHIPSET_UNKNOWN,
102}; 103};
103 104
@@ -141,6 +142,11 @@ static int amd_chipset_sb_type_init(struct amd_chipset_info *pinfo)
141 pinfo->sb_type.gen = AMD_CHIPSET_SB700; 142 pinfo->sb_type.gen = AMD_CHIPSET_SB700;
142 else if (rev >= 0x40 && rev <= 0x4f) 143 else if (rev >= 0x40 && rev <= 0x4f)
143 pinfo->sb_type.gen = AMD_CHIPSET_SB800; 144 pinfo->sb_type.gen = AMD_CHIPSET_SB800;
145 }
146 pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
147 0x145c, NULL);
148 if (pinfo->smbus_dev) {
149 pinfo->sb_type.gen = AMD_CHIPSET_TAISHAN;
144 } else { 150 } else {
145 pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD, 151 pinfo->smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
146 PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL); 152 PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL);
@@ -260,11 +266,12 @@ int usb_hcd_amd_remote_wakeup_quirk(struct pci_dev *pdev)
260{ 266{
261 /* Make sure amd chipset type has already been initialized */ 267 /* Make sure amd chipset type has already been initialized */
262 usb_amd_find_chipset_info(); 268 usb_amd_find_chipset_info();
263 if (amd_chipset.sb_type.gen != AMD_CHIPSET_YANGTZE) 269 if (amd_chipset.sb_type.gen == AMD_CHIPSET_YANGTZE ||
264 return 0; 270 amd_chipset.sb_type.gen == AMD_CHIPSET_TAISHAN) {
265 271 dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n");
266 dev_dbg(&pdev->dev, "QUIRK: Enable AMD remote wakeup fix\n"); 272 return 1;
267 return 1; 273 }
274 return 0;
268} 275}
269EXPORT_SYMBOL_GPL(usb_hcd_amd_remote_wakeup_quirk); 276EXPORT_SYMBOL_GPL(usb_hcd_amd_remote_wakeup_quirk);
270 277
@@ -1150,3 +1157,23 @@ static void quirk_usb_early_handoff(struct pci_dev *pdev)
1150} 1157}
1151DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID, 1158DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
1152 PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff); 1159 PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff);
1160
1161bool usb_xhci_needs_pci_reset(struct pci_dev *pdev)
1162{
1163 /*
1164 * Our dear uPD72020{1,2} friend only partially resets when
1165 * asked to via the XHCI interface, and may end up doing DMA
1166 * at the wrong addresses, as it keeps the top 32bit of some
1167 * addresses from its previous programming under obscure
1168 * circumstances.
1169 * Give it a good wack at probe time. Unfortunately, this
1170 * needs to happen before we've had a chance to discover any
1171 * quirk, or the system will be in a rather bad state.
1172 */
1173 if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
1174 (pdev->device == 0x0014 || pdev->device == 0x0015))
1175 return true;
1176
1177 return false;
1178}
1179EXPORT_SYMBOL_GPL(usb_xhci_needs_pci_reset);
diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h
index 655994480198..5582cbafecd4 100644
--- a/drivers/usb/host/pci-quirks.h
+++ b/drivers/usb/host/pci-quirks.h
@@ -15,6 +15,7 @@ void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev);
15void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev); 15void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev);
16void usb_disable_xhci_ports(struct pci_dev *xhci_pdev); 16void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
17void sb800_prefetch(struct device *dev, int on); 17void sb800_prefetch(struct device *dev, int on);
18bool usb_xhci_needs_pci_reset(struct pci_dev *pdev);
18#else 19#else
19struct pci_dev; 20struct pci_dev;
20static inline void usb_amd_quirk_pll_disable(void) {} 21static inline void usb_amd_quirk_pll_disable(void) {}
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 5b0fa553c8bc..8071c8fdd15e 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -284,6 +284,13 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
284 284
285 driver = (struct hc_driver *)id->driver_data; 285 driver = (struct hc_driver *)id->driver_data;
286 286
287 /* For some HW implementation, a XHCI reset is just not enough... */
288 if (usb_xhci_needs_pci_reset(dev)) {
289 dev_info(&dev->dev, "Resetting\n");
290 if (pci_reset_function_locked(dev))
291 dev_warn(&dev->dev, "Reset failed");
292 }
293
287 /* Prevent runtime suspending between USB-2 and USB-3 initialization */ 294 /* Prevent runtime suspending between USB-2 and USB-3 initialization */
288 pm_runtime_get_noresume(&dev->dev); 295 pm_runtime_get_noresume(&dev->dev);
289 296
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 76decb8011eb..3344ffd5bb13 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -139,6 +139,7 @@ static void musb_h_tx_flush_fifo(struct musb_hw_ep *ep)
139 "Could not flush host TX%d fifo: csr: %04x\n", 139 "Could not flush host TX%d fifo: csr: %04x\n",
140 ep->epnum, csr)) 140 ep->epnum, csr))
141 return; 141 return;
142 mdelay(1);
142 } 143 }
143} 144}
144 145
diff --git a/drivers/usb/phy/phy-msm-usb.c b/drivers/usb/phy/phy-msm-usb.c
index 8fb86a5f458e..3d0dd2f97415 100644
--- a/drivers/usb/phy/phy-msm-usb.c
+++ b/drivers/usb/phy/phy-msm-usb.c
@@ -197,6 +197,7 @@ struct msm_otg {
197 struct regulator *v3p3; 197 struct regulator *v3p3;
198 struct regulator *v1p8; 198 struct regulator *v1p8;
199 struct regulator *vddcx; 199 struct regulator *vddcx;
200 struct regulator_bulk_data supplies[3];
200 201
201 struct reset_control *phy_rst; 202 struct reset_control *phy_rst;
202 struct reset_control *link_rst; 203 struct reset_control *link_rst;
@@ -1731,7 +1732,6 @@ static int msm_otg_reboot_notify(struct notifier_block *this,
1731 1732
1732static int msm_otg_probe(struct platform_device *pdev) 1733static int msm_otg_probe(struct platform_device *pdev)
1733{ 1734{
1734 struct regulator_bulk_data regs[3];
1735 int ret = 0; 1735 int ret = 0;
1736 struct device_node *np = pdev->dev.of_node; 1736 struct device_node *np = pdev->dev.of_node;
1737 struct msm_otg_platform_data *pdata; 1737 struct msm_otg_platform_data *pdata;
@@ -1817,17 +1817,18 @@ static int msm_otg_probe(struct platform_device *pdev)
1817 return motg->irq; 1817 return motg->irq;
1818 } 1818 }
1819 1819
1820 regs[0].supply = "vddcx"; 1820 motg->supplies[0].supply = "vddcx";
1821 regs[1].supply = "v3p3"; 1821 motg->supplies[1].supply = "v3p3";
1822 regs[2].supply = "v1p8"; 1822 motg->supplies[2].supply = "v1p8";
1823 1823
1824 ret = devm_regulator_bulk_get(motg->phy.dev, ARRAY_SIZE(regs), regs); 1824 ret = devm_regulator_bulk_get(motg->phy.dev, ARRAY_SIZE(motg->supplies),
1825 motg->supplies);
1825 if (ret) 1826 if (ret)
1826 return ret; 1827 return ret;
1827 1828
1828 motg->vddcx = regs[0].consumer; 1829 motg->vddcx = motg->supplies[0].consumer;
1829 motg->v3p3 = regs[1].consumer; 1830 motg->v3p3 = motg->supplies[1].consumer;
1830 motg->v1p8 = regs[2].consumer; 1831 motg->v1p8 = motg->supplies[2].consumer;
1831 1832
1832 clk_set_rate(motg->clk, 60000000); 1833 clk_set_rate(motg->clk, 60000000);
1833 1834
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
index 93fba9033b00..2c8161bcf5b5 100644
--- a/drivers/usb/renesas_usbhs/mod_gadget.c
+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
@@ -639,14 +639,11 @@ static int usbhsg_ep_disable(struct usb_ep *ep)
639 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); 639 struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
640 struct usbhs_pipe *pipe; 640 struct usbhs_pipe *pipe;
641 unsigned long flags; 641 unsigned long flags;
642 int ret = 0;
643 642
644 spin_lock_irqsave(&uep->lock, flags); 643 spin_lock_irqsave(&uep->lock, flags);
645 pipe = usbhsg_uep_to_pipe(uep); 644 pipe = usbhsg_uep_to_pipe(uep);
646 if (!pipe) { 645 if (!pipe)
647 ret = -EINVAL;
648 goto out; 646 goto out;
649 }
650 647
651 usbhsg_pipe_disable(uep); 648 usbhsg_pipe_disable(uep);
652 usbhs_pipe_free(pipe); 649 usbhs_pipe_free(pipe);
diff --git a/drivers/usb/renesas_usbhs/rcar3.c b/drivers/usb/renesas_usbhs/rcar3.c
index d544b331c9f2..02b67abfc2a1 100644
--- a/drivers/usb/renesas_usbhs/rcar3.c
+++ b/drivers/usb/renesas_usbhs/rcar3.c
@@ -20,9 +20,13 @@
20/* Low Power Status register (LPSTS) */ 20/* Low Power Status register (LPSTS) */
21#define LPSTS_SUSPM 0x4000 21#define LPSTS_SUSPM 0x4000
22 22
23/* USB General control register 2 (UGCTRL2), bit[31:6] should be 0 */ 23/*
24 * USB General control register 2 (UGCTRL2)
25 * Remarks: bit[31:11] and bit[9:6] should be 0
26 */
24#define UGCTRL2_RESERVED_3 0x00000001 /* bit[3:0] should be B'0001 */ 27#define UGCTRL2_RESERVED_3 0x00000001 /* bit[3:0] should be B'0001 */
25#define UGCTRL2_USB0SEL_OTG 0x00000030 28#define UGCTRL2_USB0SEL_OTG 0x00000030
29#define UGCTRL2_VBUSSEL 0x00000400
26 30
27static void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data) 31static void usbhs_write32(struct usbhs_priv *priv, u32 reg, u32 data)
28{ 32{
@@ -34,7 +38,8 @@ static int usbhs_rcar3_power_ctrl(struct platform_device *pdev,
34{ 38{
35 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev); 39 struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
36 40
37 usbhs_write32(priv, UGCTRL2, UGCTRL2_RESERVED_3 | UGCTRL2_USB0SEL_OTG); 41 usbhs_write32(priv, UGCTRL2, UGCTRL2_RESERVED_3 | UGCTRL2_USB0SEL_OTG |
42 UGCTRL2_VBUSSEL);
38 43
39 if (enable) { 44 if (enable) {
40 usbhs_bset(priv, LPSTS, LPSTS_SUSPM, LPSTS_SUSPM); 45 usbhs_bset(priv, LPSTS, LPSTS_SUSPM, LPSTS_SUSPM);
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index f64e914a8985..2d945c9f975c 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -142,6 +142,7 @@ static const struct usb_device_id id_table[] = {
142 { USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */ 142 { USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
143 { USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */ 143 { USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */
144 { USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */ 144 { USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */
145 { USB_DEVICE(0x10C4, 0x8B34) }, /* Qivicon ZigBee USB Radio Stick */
145 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ 146 { USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
146 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */ 147 { USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
147 { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */ 148 { USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index ebe51f11105d..fe123153b1a5 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -2025,6 +2025,8 @@ static const struct usb_device_id option_ids[] = {
2025 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */ 2025 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d04, 0xff) }, /* D-Link DWM-158 */
2026 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */ 2026 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e19, 0xff), /* D-Link DWM-221 B1 */
2027 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 2027 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
2028 { USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7e35, 0xff), /* D-Link DWM-222 */
2029 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
2028 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ 2030 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
2029 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ 2031 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
2030 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */ 2032 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index c9ebefd8f35f..a585b477415d 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -52,6 +52,8 @@ static const struct usb_device_id id_table[] = {
52 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) }, 52 { USB_DEVICE(IODATA_VENDOR_ID, IODATA_PRODUCT_ID_RSAQ5) },
53 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID), 53 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID),
54 .driver_info = PL2303_QUIRK_ENDPOINT_HACK }, 54 .driver_info = PL2303_QUIRK_ENDPOINT_HACK },
55 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_UC485),
56 .driver_info = PL2303_QUIRK_ENDPOINT_HACK },
55 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID2) }, 57 { USB_DEVICE(ATEN_VENDOR_ID, ATEN_PRODUCT_ID2) },
56 { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) }, 58 { USB_DEVICE(ATEN_VENDOR_ID2, ATEN_PRODUCT_ID) },
57 { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) }, 59 { USB_DEVICE(ELCOM_VENDOR_ID, ELCOM_PRODUCT_ID) },
diff --git a/drivers/usb/serial/pl2303.h b/drivers/usb/serial/pl2303.h
index 09d9be88209e..3b5a15d1dc0d 100644
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -27,6 +27,7 @@
27#define ATEN_VENDOR_ID 0x0557 27#define ATEN_VENDOR_ID 0x0557
28#define ATEN_VENDOR_ID2 0x0547 28#define ATEN_VENDOR_ID2 0x0547
29#define ATEN_PRODUCT_ID 0x2008 29#define ATEN_PRODUCT_ID 0x2008
30#define ATEN_PRODUCT_UC485 0x2021
30#define ATEN_PRODUCT_ID2 0x2118 31#define ATEN_PRODUCT_ID2 0x2118
31 32
32#define IODATA_VENDOR_ID 0x04bb 33#define IODATA_VENDOR_ID 0x04bb
diff --git a/drivers/usb/storage/unusual_uas.h b/drivers/usb/storage/unusual_uas.h
index cbea9f329e71..cde115359793 100644
--- a/drivers/usb/storage/unusual_uas.h
+++ b/drivers/usb/storage/unusual_uas.h
@@ -124,9 +124,9 @@ UNUSUAL_DEV(0x0bc2, 0xab2a, 0x0000, 0x9999,
124/* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */ 124/* Reported-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> */
125UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999, 125UNUSUAL_DEV(0x13fd, 0x3940, 0x0000, 0x9999,
126 "Initio Corporation", 126 "Initio Corporation",
127 "", 127 "INIC-3069",
128 USB_SC_DEVICE, USB_PR_DEVICE, NULL, 128 USB_SC_DEVICE, USB_PR_DEVICE, NULL,
129 US_FL_NO_ATA_1X), 129 US_FL_NO_ATA_1X | US_FL_IGNORE_RESIDUE),
130 130
131/* Reported-by: Tom Arild Naess <tanaess@gmail.com> */ 131/* Reported-by: Tom Arild Naess <tanaess@gmail.com> */
132UNUSUAL_DEV(0x152d, 0x0539, 0x0000, 0x9999, 132UNUSUAL_DEV(0x152d, 0x0539, 0x0000, 0x9999,
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 06615934fed1..0dceb9fa3a06 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -315,6 +315,7 @@ static int usb_stor_control_thread(void * __us)
315{ 315{
316 struct us_data *us = (struct us_data *)__us; 316 struct us_data *us = (struct us_data *)__us;
317 struct Scsi_Host *host = us_to_host(us); 317 struct Scsi_Host *host = us_to_host(us);
318 struct scsi_cmnd *srb;
318 319
319 for (;;) { 320 for (;;) {
320 usb_stor_dbg(us, "*** thread sleeping\n"); 321 usb_stor_dbg(us, "*** thread sleeping\n");
@@ -330,6 +331,7 @@ static int usb_stor_control_thread(void * __us)
330 scsi_lock(host); 331 scsi_lock(host);
331 332
332 /* When we are called with no command pending, we're done */ 333 /* When we are called with no command pending, we're done */
334 srb = us->srb;
333 if (us->srb == NULL) { 335 if (us->srb == NULL) {
334 scsi_unlock(host); 336 scsi_unlock(host);
335 mutex_unlock(&us->dev_mutex); 337 mutex_unlock(&us->dev_mutex);
@@ -398,14 +400,11 @@ static int usb_stor_control_thread(void * __us)
398 /* lock access to the state */ 400 /* lock access to the state */
399 scsi_lock(host); 401 scsi_lock(host);
400 402
401 /* indicate that the command is done */ 403 /* was the command aborted? */
402 if (us->srb->result != DID_ABORT << 16) { 404 if (us->srb->result == DID_ABORT << 16) {
403 usb_stor_dbg(us, "scsi cmd done, result=0x%x\n",
404 us->srb->result);
405 us->srb->scsi_done(us->srb);
406 } else {
407SkipForAbort: 405SkipForAbort:
408 usb_stor_dbg(us, "scsi command aborted\n"); 406 usb_stor_dbg(us, "scsi command aborted\n");
407 srb = NULL; /* Don't call srb->scsi_done() */
409 } 408 }
410 409
411 /* 410 /*
@@ -429,6 +428,13 @@ SkipForAbort:
429 428
430 /* unlock the device pointers */ 429 /* unlock the device pointers */
431 mutex_unlock(&us->dev_mutex); 430 mutex_unlock(&us->dev_mutex);
431
432 /* now that the locks are released, notify the SCSI core */
433 if (srb) {
434 usb_stor_dbg(us, "scsi cmd done, result=0x%x\n",
435 srb->result);
436 srb->scsi_done(srb);
437 }
432 } /* for (;;) */ 438 } /* for (;;) */
433 439
434 /* Wait until we are told to stop */ 440 /* Wait until we are told to stop */
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c
index 063c1ce6fa42..f041b1a6cf66 100644
--- a/drivers/vfio/pci/vfio_pci.c
+++ b/drivers/vfio/pci/vfio_pci.c
@@ -226,7 +226,14 @@ static int vfio_pci_enable(struct vfio_pci_device *vdev)
226 if (ret) 226 if (ret)
227 return ret; 227 return ret;
228 228
229 vdev->reset_works = (pci_reset_function(pdev) == 0); 229 /* If reset fails because of the device lock, fail this path entirely */
230 ret = pci_try_reset_function(pdev);
231 if (ret == -EAGAIN) {
232 pci_disable_device(pdev);
233 return ret;
234 }
235
236 vdev->reset_works = !ret;
230 pci_save_state(pdev); 237 pci_save_state(pdev);
231 vdev->pci_saved_state = pci_store_saved_state(pdev); 238 vdev->pci_saved_state = pci_store_saved_state(pdev);
232 if (!vdev->pci_saved_state) 239 if (!vdev->pci_saved_state)
diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c
index 330a57024cbc..5628fe114347 100644
--- a/drivers/vfio/pci/vfio_pci_config.c
+++ b/drivers/vfio/pci/vfio_pci_config.c
@@ -839,7 +839,7 @@ static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos,
839/* Permissions for PCI Express capability */ 839/* Permissions for PCI Express capability */
840static int __init init_pci_cap_exp_perm(struct perm_bits *perm) 840static int __init init_pci_cap_exp_perm(struct perm_bits *perm)
841{ 841{
842 /* Alloc larger of two possible sizes */ 842 /* Alloc largest of possible sizes */
843 if (alloc_perm_bits(perm, PCI_CAP_EXP_ENDPOINT_SIZEOF_V2)) 843 if (alloc_perm_bits(perm, PCI_CAP_EXP_ENDPOINT_SIZEOF_V2))
844 return -ENOMEM; 844 return -ENOMEM;
845 845
@@ -1243,11 +1243,16 @@ static int vfio_cap_len(struct vfio_pci_device *vdev, u8 cap, u8 pos)
1243 vdev->extended_caps = (dword != 0); 1243 vdev->extended_caps = (dword != 0);
1244 } 1244 }
1245 1245
1246 /* length based on version */ 1246 /* length based on version and type */
1247 if ((pcie_caps_reg(pdev) & PCI_EXP_FLAGS_VERS) == 1) 1247 if ((pcie_caps_reg(pdev) & PCI_EXP_FLAGS_VERS) == 1) {
1248 if (pci_pcie_type(pdev) == PCI_EXP_TYPE_RC_END)
1249 return 0xc; /* "All Devices" only, no link */
1248 return PCI_CAP_EXP_ENDPOINT_SIZEOF_V1; 1250 return PCI_CAP_EXP_ENDPOINT_SIZEOF_V1;
1249 else 1251 } else {
1252 if (pci_pcie_type(pdev) == PCI_EXP_TYPE_RC_END)
1253 return 0x2c; /* No link */
1250 return PCI_CAP_EXP_ENDPOINT_SIZEOF_V2; 1254 return PCI_CAP_EXP_ENDPOINT_SIZEOF_V2;
1255 }
1251 case PCI_CAP_ID_HT: 1256 case PCI_CAP_ID_HT:
1252 ret = pci_read_config_byte(pdev, pos + 3, &byte); 1257 ret = pci_read_config_byte(pdev, pos + 3, &byte);
1253 if (ret) 1258 if (ret)
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index e4613a3c362d..9cb3f722dce1 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -308,7 +308,6 @@ static void vhost_vq_reset(struct vhost_dev *dev,
308 vq->avail = NULL; 308 vq->avail = NULL;
309 vq->used = NULL; 309 vq->used = NULL;
310 vq->last_avail_idx = 0; 310 vq->last_avail_idx = 0;
311 vq->last_used_event = 0;
312 vq->avail_idx = 0; 311 vq->avail_idx = 0;
313 vq->last_used_idx = 0; 312 vq->last_used_idx = 0;
314 vq->signalled_used = 0; 313 vq->signalled_used = 0;
@@ -1402,7 +1401,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)
1402 r = -EINVAL; 1401 r = -EINVAL;
1403 break; 1402 break;
1404 } 1403 }
1405 vq->last_avail_idx = vq->last_used_event = s.num; 1404 vq->last_avail_idx = s.num;
1406 /* Forget the cached index value. */ 1405 /* Forget the cached index value. */
1407 vq->avail_idx = vq->last_avail_idx; 1406 vq->avail_idx = vq->last_avail_idx;
1408 break; 1407 break;
@@ -2241,6 +2240,10 @@ static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq)
2241 __u16 old, new; 2240 __u16 old, new;
2242 __virtio16 event; 2241 __virtio16 event;
2243 bool v; 2242 bool v;
2243 /* Flush out used index updates. This is paired
2244 * with the barrier that the Guest executes when enabling
2245 * interrupts. */
2246 smp_mb();
2244 2247
2245 if (vhost_has_feature(vq, VIRTIO_F_NOTIFY_ON_EMPTY) && 2248 if (vhost_has_feature(vq, VIRTIO_F_NOTIFY_ON_EMPTY) &&
2246 unlikely(vq->avail_idx == vq->last_avail_idx)) 2249 unlikely(vq->avail_idx == vq->last_avail_idx))
@@ -2248,10 +2251,6 @@ static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq)
2248 2251
2249 if (!vhost_has_feature(vq, VIRTIO_RING_F_EVENT_IDX)) { 2252 if (!vhost_has_feature(vq, VIRTIO_RING_F_EVENT_IDX)) {
2250 __virtio16 flags; 2253 __virtio16 flags;
2251 /* Flush out used index updates. This is paired
2252 * with the barrier that the Guest executes when enabling
2253 * interrupts. */
2254 smp_mb();
2255 if (vhost_get_avail(vq, flags, &vq->avail->flags)) { 2254 if (vhost_get_avail(vq, flags, &vq->avail->flags)) {
2256 vq_err(vq, "Failed to get flags"); 2255 vq_err(vq, "Failed to get flags");
2257 return true; 2256 return true;
@@ -2266,26 +2265,11 @@ static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq)
2266 if (unlikely(!v)) 2265 if (unlikely(!v))
2267 return true; 2266 return true;
2268 2267
2269 /* We're sure if the following conditions are met, there's no
2270 * need to notify guest:
2271 * 1) cached used event is ahead of new
2272 * 2) old to new updating does not cross cached used event. */
2273 if (vring_need_event(vq->last_used_event, new + vq->num, new) &&
2274 !vring_need_event(vq->last_used_event, new, old))
2275 return false;
2276
2277 /* Flush out used index updates. This is paired
2278 * with the barrier that the Guest executes when enabling
2279 * interrupts. */
2280 smp_mb();
2281
2282 if (vhost_get_avail(vq, event, vhost_used_event(vq))) { 2268 if (vhost_get_avail(vq, event, vhost_used_event(vq))) {
2283 vq_err(vq, "Failed to get used event idx"); 2269 vq_err(vq, "Failed to get used event idx");
2284 return true; 2270 return true;
2285 } 2271 }
2286 vq->last_used_event = vhost16_to_cpu(vq, event); 2272 return vring_need_event(vhost16_to_cpu(vq, event), new, old);
2287
2288 return vring_need_event(vq->last_used_event, new, old);
2289} 2273}
2290 2274
2291/* This actually signals the guest, using eventfd. */ 2275/* This actually signals the guest, using eventfd. */
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index f72095868b93..bb7c29b8b9fc 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -115,9 +115,6 @@ struct vhost_virtqueue {
115 /* Last index we used. */ 115 /* Last index we used. */
116 u16 last_used_idx; 116 u16 last_used_idx;
117 117
118 /* Last used evet we've seen */
119 u16 last_used_event;
120
121 /* Used flags */ 118 /* Used flags */
122 u16 used_flags; 119 u16 used_flags;
123 120
diff --git a/drivers/video/fbdev/efifb.c b/drivers/video/fbdev/efifb.c
index ff01bed7112f..1e784adb89b1 100644
--- a/drivers/video/fbdev/efifb.c
+++ b/drivers/video/fbdev/efifb.c
@@ -17,6 +17,7 @@
17#include <asm/efi.h> 17#include <asm/efi.h>
18 18
19static bool request_mem_succeeded = false; 19static bool request_mem_succeeded = false;
20static bool nowc = false;
20 21
21static struct fb_var_screeninfo efifb_defined = { 22static struct fb_var_screeninfo efifb_defined = {
22 .activate = FB_ACTIVATE_NOW, 23 .activate = FB_ACTIVATE_NOW,
@@ -99,6 +100,8 @@ static int efifb_setup(char *options)
99 screen_info.lfb_height = simple_strtoul(this_opt+7, NULL, 0); 100 screen_info.lfb_height = simple_strtoul(this_opt+7, NULL, 0);
100 else if (!strncmp(this_opt, "width:", 6)) 101 else if (!strncmp(this_opt, "width:", 6))
101 screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0); 102 screen_info.lfb_width = simple_strtoul(this_opt+6, NULL, 0);
103 else if (!strcmp(this_opt, "nowc"))
104 nowc = true;
102 } 105 }
103 } 106 }
104 107
@@ -255,7 +258,10 @@ static int efifb_probe(struct platform_device *dev)
255 info->apertures->ranges[0].base = efifb_fix.smem_start; 258 info->apertures->ranges[0].base = efifb_fix.smem_start;
256 info->apertures->ranges[0].size = size_remap; 259 info->apertures->ranges[0].size = size_remap;
257 260
258 info->screen_base = ioremap_wc(efifb_fix.smem_start, efifb_fix.smem_len); 261 if (nowc)
262 info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len);
263 else
264 info->screen_base = ioremap_wc(efifb_fix.smem_start, efifb_fix.smem_len);
259 if (!info->screen_base) { 265 if (!info->screen_base) {
260 pr_err("efifb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n", 266 pr_err("efifb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n",
261 efifb_fix.smem_len, efifb_fix.smem_start); 267 efifb_fix.smem_len, efifb_fix.smem_start);
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index c166e0725be5..ba82f97fb42b 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -1073,20 +1073,16 @@ static int imxfb_remove(struct platform_device *pdev)
1073 imxfb_disable_controller(fbi); 1073 imxfb_disable_controller(fbi);
1074 1074
1075 unregister_framebuffer(info); 1075 unregister_framebuffer(info);
1076 1076 fb_dealloc_cmap(&info->cmap);
1077 pdata = dev_get_platdata(&pdev->dev); 1077 pdata = dev_get_platdata(&pdev->dev);
1078 if (pdata && pdata->exit) 1078 if (pdata && pdata->exit)
1079 pdata->exit(fbi->pdev); 1079 pdata->exit(fbi->pdev);
1080
1081 fb_dealloc_cmap(&info->cmap);
1082 kfree(info->pseudo_palette);
1083 framebuffer_release(info);
1084
1085 dma_free_wc(&pdev->dev, fbi->map_size, info->screen_base, 1080 dma_free_wc(&pdev->dev, fbi->map_size, info->screen_base,
1086 fbi->map_dma); 1081 fbi->map_dma);
1087
1088 iounmap(fbi->regs); 1082 iounmap(fbi->regs);
1089 release_mem_region(res->start, resource_size(res)); 1083 release_mem_region(res->start, resource_size(res));
1084 kfree(info->pseudo_palette);
1085 framebuffer_release(info);
1090 1086
1091 return 0; 1087 return 0;
1092} 1088}
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/core.c b/drivers/video/fbdev/omap2/omapfb/dss/core.c
index eecf695c16f4..09e5bb013d28 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/core.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/core.c
@@ -193,7 +193,6 @@ static struct notifier_block omap_dss_pm_notif_block = {
193 193
194static int __init omap_dss_probe(struct platform_device *pdev) 194static int __init omap_dss_probe(struct platform_device *pdev)
195{ 195{
196 struct omap_dss_board_info *pdata = pdev->dev.platform_data;
197 int r; 196 int r;
198 197
199 core.pdev = pdev; 198 core.pdev = pdev;
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index 007a4f366086..1c4797e53f68 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -107,6 +107,7 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
107{ 107{
108 struct virtio_pci_device *vp_dev = to_vp_device(vdev); 108 struct virtio_pci_device *vp_dev = to_vp_device(vdev);
109 const char *name = dev_name(&vp_dev->vdev.dev); 109 const char *name = dev_name(&vp_dev->vdev.dev);
110 unsigned flags = PCI_IRQ_MSIX;
110 unsigned i, v; 111 unsigned i, v;
111 int err = -ENOMEM; 112 int err = -ENOMEM;
112 113
@@ -126,10 +127,13 @@ static int vp_request_msix_vectors(struct virtio_device *vdev, int nvectors,
126 GFP_KERNEL)) 127 GFP_KERNEL))
127 goto error; 128 goto error;
128 129
130 if (desc) {
131 flags |= PCI_IRQ_AFFINITY;
132 desc->pre_vectors++; /* virtio config vector */
133 }
134
129 err = pci_alloc_irq_vectors_affinity(vp_dev->pci_dev, nvectors, 135 err = pci_alloc_irq_vectors_affinity(vp_dev->pci_dev, nvectors,
130 nvectors, PCI_IRQ_MSIX | 136 nvectors, flags, desc);
131 (desc ? PCI_IRQ_AFFINITY : 0),
132 desc);
133 if (err < 0) 137 if (err < 0)
134 goto error; 138 goto error;
135 vp_dev->msix_enabled = 1; 139 vp_dev->msix_enabled = 1;
diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile
index 8feab810aed9..7f188b8d0c67 100644
--- a/drivers/xen/Makefile
+++ b/drivers/xen/Makefile
@@ -7,9 +7,6 @@ obj-y += xenbus/
7nostackp := $(call cc-option, -fno-stack-protector) 7nostackp := $(call cc-option, -fno-stack-protector)
8CFLAGS_features.o := $(nostackp) 8CFLAGS_features.o := $(nostackp)
9 9
10CFLAGS_efi.o += -fshort-wchar
11LDFLAGS += $(call ld-option, --no-wchar-size-warning)
12
13dom0-$(CONFIG_ARM64) += arm-device.o 10dom0-$(CONFIG_ARM64) += arm-device.o
14dom0-$(CONFIG_PCI) += pci.o 11dom0-$(CONFIG_PCI) += pci.o
15dom0-$(CONFIG_USB_SUPPORT) += dbgp.o 12dom0-$(CONFIG_USB_SUPPORT) += dbgp.o
diff --git a/drivers/xen/biomerge.c b/drivers/xen/biomerge.c
index 4da69dbf7dca..1bdd02a6d6ac 100644
--- a/drivers/xen/biomerge.c
+++ b/drivers/xen/biomerge.c
@@ -10,8 +10,7 @@ bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
10 unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page)); 10 unsigned long bfn1 = pfn_to_bfn(page_to_pfn(vec1->bv_page));
11 unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page)); 11 unsigned long bfn2 = pfn_to_bfn(page_to_pfn(vec2->bv_page));
12 12
13 return __BIOVEC_PHYS_MERGEABLE(vec1, vec2) && 13 return bfn1 + PFN_DOWN(vec1->bv_offset + vec1->bv_len) == bfn2;
14 ((bfn1 == bfn2) || ((bfn1+1) == bfn2));
15#else 14#else
16 /* 15 /*
17 * XXX: Add support for merging bio_vec when using different page 16 * XXX: Add support for merging bio_vec when using different page
diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c
index bae1f5d36c26..2d43118077e4 100644
--- a/drivers/xen/events/events_base.c
+++ b/drivers/xen/events/events_base.c
@@ -574,7 +574,7 @@ static void shutdown_pirq(struct irq_data *data)
574 574
575static void enable_pirq(struct irq_data *data) 575static void enable_pirq(struct irq_data *data)
576{ 576{
577 startup_pirq(data); 577 enable_dynirq(data);
578} 578}
579 579
580static void disable_pirq(struct irq_data *data) 580static void disable_pirq(struct irq_data *data)
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index e46080214955..3e59590c7254 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -857,6 +857,8 @@ static int xenwatch_thread(void *unused)
857 struct list_head *ent; 857 struct list_head *ent;
858 struct xs_watch_event *event; 858 struct xs_watch_event *event;
859 859
860 xenwatch_pid = current->pid;
861
860 for (;;) { 862 for (;;) {
861 wait_event_interruptible(watch_events_waitq, 863 wait_event_interruptible(watch_events_waitq,
862 !list_empty(&watch_events)); 864 !list_empty(&watch_events));
@@ -925,7 +927,6 @@ int xs_init(void)
925 task = kthread_run(xenwatch_thread, NULL, "xenwatch"); 927 task = kthread_run(xenwatch_thread, NULL, "xenwatch");
926 if (IS_ERR(task)) 928 if (IS_ERR(task))
927 return PTR_ERR(task); 929 return PTR_ERR(task);
928 xenwatch_pid = task->pid;
929 930
930 /* shutdown watches for kexec boot */ 931 /* shutdown watches for kexec boot */
931 xs_reset_watches(); 932 xs_reset_watches();
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 879ff9c7ffd0..6466153f2bf0 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -664,8 +664,7 @@ static unsigned long randomize_stack_top(unsigned long stack_top)
664{ 664{
665 unsigned long random_variable = 0; 665 unsigned long random_variable = 0;
666 666
667 if ((current->flags & PF_RANDOMIZE) && 667 if (current->flags & PF_RANDOMIZE) {
668 !(current->personality & ADDR_NO_RANDOMIZE)) {
669 random_variable = get_random_long(); 668 random_variable = get_random_long();
670 random_variable &= STACK_RND_MASK; 669 random_variable &= STACK_RND_MASK;
671 random_variable <<= PAGE_SHIFT; 670 random_variable <<= PAGE_SHIFT;
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 080e2ebb8aa0..f45b61fe9a9a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3516,7 +3516,7 @@ static blk_status_t wait_dev_flush(struct btrfs_device *device)
3516 struct bio *bio = device->flush_bio; 3516 struct bio *bio = device->flush_bio;
3517 3517
3518 if (!device->flush_bio_sent) 3518 if (!device->flush_bio_sent)
3519 return 0; 3519 return BLK_STS_OK;
3520 3520
3521 device->flush_bio_sent = 0; 3521 device->flush_bio_sent = 0;
3522 wait_for_completion_io(&device->flush_wait); 3522 wait_for_completion_io(&device->flush_wait);
@@ -3563,7 +3563,7 @@ static int barrier_all_devices(struct btrfs_fs_info *info)
3563 continue; 3563 continue;
3564 3564
3565 write_dev_flush(dev); 3565 write_dev_flush(dev);
3566 dev->last_flush_error = 0; 3566 dev->last_flush_error = BLK_STS_OK;
3567 } 3567 }
3568 3568
3569 /* wait for all the barriers */ 3569 /* wait for all the barriers */
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 95c212037095..24bcd5cd9cf2 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7924,11 +7924,12 @@ err:
7924 return ret; 7924 return ret;
7925} 7925}
7926 7926
7927static inline int submit_dio_repair_bio(struct inode *inode, struct bio *bio, 7927static inline blk_status_t submit_dio_repair_bio(struct inode *inode,
7928 int mirror_num) 7928 struct bio *bio,
7929 int mirror_num)
7929{ 7930{
7930 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); 7931 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
7931 int ret; 7932 blk_status_t ret;
7932 7933
7933 BUG_ON(bio_op(bio) == REQ_OP_WRITE); 7934 BUG_ON(bio_op(bio) == REQ_OP_WRITE);
7934 7935
@@ -7980,10 +7981,10 @@ static int btrfs_check_dio_repairable(struct inode *inode,
7980 return 1; 7981 return 1;
7981} 7982}
7982 7983
7983static int dio_read_error(struct inode *inode, struct bio *failed_bio, 7984static blk_status_t dio_read_error(struct inode *inode, struct bio *failed_bio,
7984 struct page *page, unsigned int pgoff, 7985 struct page *page, unsigned int pgoff,
7985 u64 start, u64 end, int failed_mirror, 7986 u64 start, u64 end, int failed_mirror,
7986 bio_end_io_t *repair_endio, void *repair_arg) 7987 bio_end_io_t *repair_endio, void *repair_arg)
7987{ 7988{
7988 struct io_failure_record *failrec; 7989 struct io_failure_record *failrec;
7989 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; 7990 struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree;
@@ -7993,18 +7994,19 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio,
7993 int read_mode = 0; 7994 int read_mode = 0;
7994 int segs; 7995 int segs;
7995 int ret; 7996 int ret;
7997 blk_status_t status;
7996 7998
7997 BUG_ON(bio_op(failed_bio) == REQ_OP_WRITE); 7999 BUG_ON(bio_op(failed_bio) == REQ_OP_WRITE);
7998 8000
7999 ret = btrfs_get_io_failure_record(inode, start, end, &failrec); 8001 ret = btrfs_get_io_failure_record(inode, start, end, &failrec);
8000 if (ret) 8002 if (ret)
8001 return ret; 8003 return errno_to_blk_status(ret);
8002 8004
8003 ret = btrfs_check_dio_repairable(inode, failed_bio, failrec, 8005 ret = btrfs_check_dio_repairable(inode, failed_bio, failrec,
8004 failed_mirror); 8006 failed_mirror);
8005 if (!ret) { 8007 if (!ret) {
8006 free_io_failure(failure_tree, io_tree, failrec); 8008 free_io_failure(failure_tree, io_tree, failrec);
8007 return -EIO; 8009 return BLK_STS_IOERR;
8008 } 8010 }
8009 8011
8010 segs = bio_segments(failed_bio); 8012 segs = bio_segments(failed_bio);
@@ -8022,13 +8024,13 @@ static int dio_read_error(struct inode *inode, struct bio *failed_bio,
8022 "Repair DIO Read Error: submitting new dio read[%#x] to this_mirror=%d, in_validation=%d\n", 8024 "Repair DIO Read Error: submitting new dio read[%#x] to this_mirror=%d, in_validation=%d\n",
8023 read_mode, failrec->this_mirror, failrec->in_validation); 8025 read_mode, failrec->this_mirror, failrec->in_validation);
8024 8026
8025 ret = submit_dio_repair_bio(inode, bio, failrec->this_mirror); 8027 status = submit_dio_repair_bio(inode, bio, failrec->this_mirror);
8026 if (ret) { 8028 if (status) {
8027 free_io_failure(failure_tree, io_tree, failrec); 8029 free_io_failure(failure_tree, io_tree, failrec);
8028 bio_put(bio); 8030 bio_put(bio);
8029 } 8031 }
8030 8032
8031 return ret; 8033 return status;
8032} 8034}
8033 8035
8034struct btrfs_retry_complete { 8036struct btrfs_retry_complete {
@@ -8065,8 +8067,8 @@ end:
8065 bio_put(bio); 8067 bio_put(bio);
8066} 8068}
8067 8069
8068static int __btrfs_correct_data_nocsum(struct inode *inode, 8070static blk_status_t __btrfs_correct_data_nocsum(struct inode *inode,
8069 struct btrfs_io_bio *io_bio) 8071 struct btrfs_io_bio *io_bio)
8070{ 8072{
8071 struct btrfs_fs_info *fs_info; 8073 struct btrfs_fs_info *fs_info;
8072 struct bio_vec bvec; 8074 struct bio_vec bvec;
@@ -8076,8 +8078,8 @@ static int __btrfs_correct_data_nocsum(struct inode *inode,
8076 unsigned int pgoff; 8078 unsigned int pgoff;
8077 u32 sectorsize; 8079 u32 sectorsize;
8078 int nr_sectors; 8080 int nr_sectors;
8079 int ret; 8081 blk_status_t ret;
8080 int err = 0; 8082 blk_status_t err = BLK_STS_OK;
8081 8083
8082 fs_info = BTRFS_I(inode)->root->fs_info; 8084 fs_info = BTRFS_I(inode)->root->fs_info;
8083 sectorsize = fs_info->sectorsize; 8085 sectorsize = fs_info->sectorsize;
@@ -8183,11 +8185,12 @@ static blk_status_t __btrfs_subio_endio_read(struct inode *inode,
8183 int csum_pos; 8185 int csum_pos;
8184 bool uptodate = (err == 0); 8186 bool uptodate = (err == 0);
8185 int ret; 8187 int ret;
8188 blk_status_t status;
8186 8189
8187 fs_info = BTRFS_I(inode)->root->fs_info; 8190 fs_info = BTRFS_I(inode)->root->fs_info;
8188 sectorsize = fs_info->sectorsize; 8191 sectorsize = fs_info->sectorsize;
8189 8192
8190 err = 0; 8193 err = BLK_STS_OK;
8191 start = io_bio->logical; 8194 start = io_bio->logical;
8192 done.inode = inode; 8195 done.inode = inode;
8193 io_bio->bio.bi_iter = io_bio->iter; 8196 io_bio->bio.bi_iter = io_bio->iter;
@@ -8209,12 +8212,12 @@ try_again:
8209 done.start = start; 8212 done.start = start;
8210 init_completion(&done.done); 8213 init_completion(&done.done);
8211 8214
8212 ret = dio_read_error(inode, &io_bio->bio, bvec.bv_page, 8215 status = dio_read_error(inode, &io_bio->bio, bvec.bv_page,
8213 pgoff, start, start + sectorsize - 1, 8216 pgoff, start, start + sectorsize - 1,
8214 io_bio->mirror_num, 8217 io_bio->mirror_num, btrfs_retry_endio,
8215 btrfs_retry_endio, &done); 8218 &done);
8216 if (ret) { 8219 if (status) {
8217 err = errno_to_blk_status(ret); 8220 err = status;
8218 goto next; 8221 goto next;
8219 } 8222 }
8220 8223
@@ -8250,7 +8253,7 @@ static blk_status_t btrfs_subio_endio_read(struct inode *inode,
8250 if (unlikely(err)) 8253 if (unlikely(err))
8251 return __btrfs_correct_data_nocsum(inode, io_bio); 8254 return __btrfs_correct_data_nocsum(inode, io_bio);
8252 else 8255 else
8253 return 0; 8256 return BLK_STS_OK;
8254 } else { 8257 } else {
8255 return __btrfs_subio_endio_read(inode, io_bio, err); 8258 return __btrfs_subio_endio_read(inode, io_bio, err);
8256 } 8259 }
@@ -8423,9 +8426,9 @@ static inline blk_status_t btrfs_lookup_and_bind_dio_csum(struct inode *inode,
8423 return 0; 8426 return 0;
8424} 8427}
8425 8428
8426static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode, 8429static inline blk_status_t
8427 u64 file_offset, int skip_sum, 8430__btrfs_submit_dio_bio(struct bio *bio, struct inode *inode, u64 file_offset,
8428 int async_submit) 8431 int skip_sum, int async_submit)
8429{ 8432{
8430 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); 8433 struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
8431 struct btrfs_dio_private *dip = bio->bi_private; 8434 struct btrfs_dio_private *dip = bio->bi_private;
@@ -8488,6 +8491,7 @@ static int btrfs_submit_direct_hook(struct btrfs_dio_private *dip,
8488 int clone_offset = 0; 8491 int clone_offset = 0;
8489 int clone_len; 8492 int clone_len;
8490 int ret; 8493 int ret;
8494 blk_status_t status;
8491 8495
8492 map_length = orig_bio->bi_iter.bi_size; 8496 map_length = orig_bio->bi_iter.bi_size;
8493 submit_len = map_length; 8497 submit_len = map_length;
@@ -8537,9 +8541,9 @@ static int btrfs_submit_direct_hook(struct btrfs_dio_private *dip,
8537 */ 8541 */
8538 atomic_inc(&dip->pending_bios); 8542 atomic_inc(&dip->pending_bios);
8539 8543
8540 ret = __btrfs_submit_dio_bio(bio, inode, file_offset, skip_sum, 8544 status = __btrfs_submit_dio_bio(bio, inode, file_offset, skip_sum,
8541 async_submit); 8545 async_submit);
8542 if (ret) { 8546 if (status) {
8543 bio_put(bio); 8547 bio_put(bio);
8544 atomic_dec(&dip->pending_bios); 8548 atomic_dec(&dip->pending_bios);
8545 goto out_err; 8549 goto out_err;
@@ -8557,9 +8561,9 @@ static int btrfs_submit_direct_hook(struct btrfs_dio_private *dip,
8557 } while (submit_len > 0); 8561 } while (submit_len > 0);
8558 8562
8559submit: 8563submit:
8560 ret = __btrfs_submit_dio_bio(bio, inode, file_offset, skip_sum, 8564 status = __btrfs_submit_dio_bio(bio, inode, file_offset, skip_sum,
8561 async_submit); 8565 async_submit);
8562 if (!ret) 8566 if (!status)
8563 return 0; 8567 return 0;
8564 8568
8565 bio_put(bio); 8569 bio_put(bio);
diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c
index 208638384cd2..2cf6ba40f7c4 100644
--- a/fs/btrfs/raid56.c
+++ b/fs/btrfs/raid56.c
@@ -905,7 +905,7 @@ static void raid_write_end_io(struct bio *bio)
905 if (!atomic_dec_and_test(&rbio->stripes_pending)) 905 if (!atomic_dec_and_test(&rbio->stripes_pending))
906 return; 906 return;
907 907
908 err = 0; 908 err = BLK_STS_OK;
909 909
910 /* OK, we have read all the stripes we need to. */ 910 /* OK, we have read all the stripes we need to. */
911 max_errors = (rbio->operation == BTRFS_RBIO_PARITY_SCRUB) ? 911 max_errors = (rbio->operation == BTRFS_RBIO_PARITY_SCRUB) ?
@@ -1324,7 +1324,7 @@ write_data:
1324 return; 1324 return;
1325 1325
1326cleanup: 1326cleanup:
1327 rbio_orig_end_io(rbio, -EIO); 1327 rbio_orig_end_io(rbio, BLK_STS_IOERR);
1328} 1328}
1329 1329
1330/* 1330/*
@@ -1475,7 +1475,7 @@ static void raid_rmw_end_io(struct bio *bio)
1475 1475
1476cleanup: 1476cleanup:
1477 1477
1478 rbio_orig_end_io(rbio, -EIO); 1478 rbio_orig_end_io(rbio, BLK_STS_IOERR);
1479} 1479}
1480 1480
1481static void async_rmw_stripe(struct btrfs_raid_bio *rbio) 1481static void async_rmw_stripe(struct btrfs_raid_bio *rbio)
@@ -1579,7 +1579,7 @@ static int raid56_rmw_stripe(struct btrfs_raid_bio *rbio)
1579 return 0; 1579 return 0;
1580 1580
1581cleanup: 1581cleanup:
1582 rbio_orig_end_io(rbio, -EIO); 1582 rbio_orig_end_io(rbio, BLK_STS_IOERR);
1583 return -EIO; 1583 return -EIO;
1584 1584
1585finish: 1585finish:
@@ -1795,12 +1795,12 @@ static void __raid_recover_end_io(struct btrfs_raid_bio *rbio)
1795 void **pointers; 1795 void **pointers;
1796 int faila = -1, failb = -1; 1796 int faila = -1, failb = -1;
1797 struct page *page; 1797 struct page *page;
1798 int err; 1798 blk_status_t err;
1799 int i; 1799 int i;
1800 1800
1801 pointers = kcalloc(rbio->real_stripes, sizeof(void *), GFP_NOFS); 1801 pointers = kcalloc(rbio->real_stripes, sizeof(void *), GFP_NOFS);
1802 if (!pointers) { 1802 if (!pointers) {
1803 err = -ENOMEM; 1803 err = BLK_STS_RESOURCE;
1804 goto cleanup_io; 1804 goto cleanup_io;
1805 } 1805 }
1806 1806
@@ -1856,7 +1856,7 @@ static void __raid_recover_end_io(struct btrfs_raid_bio *rbio)
1856 * a bad data or Q stripe. 1856 * a bad data or Q stripe.
1857 * TODO, we should redo the xor here. 1857 * TODO, we should redo the xor here.
1858 */ 1858 */
1859 err = -EIO; 1859 err = BLK_STS_IOERR;
1860 goto cleanup; 1860 goto cleanup;
1861 } 1861 }
1862 /* 1862 /*
@@ -1882,7 +1882,7 @@ static void __raid_recover_end_io(struct btrfs_raid_bio *rbio)
1882 if (rbio->bbio->raid_map[failb] == RAID6_Q_STRIPE) { 1882 if (rbio->bbio->raid_map[failb] == RAID6_Q_STRIPE) {
1883 if (rbio->bbio->raid_map[faila] == 1883 if (rbio->bbio->raid_map[faila] ==
1884 RAID5_P_STRIPE) { 1884 RAID5_P_STRIPE) {
1885 err = -EIO; 1885 err = BLK_STS_IOERR;
1886 goto cleanup; 1886 goto cleanup;
1887 } 1887 }
1888 /* 1888 /*
@@ -1954,13 +1954,13 @@ pstripe:
1954 } 1954 }
1955 } 1955 }
1956 1956
1957 err = 0; 1957 err = BLK_STS_OK;
1958cleanup: 1958cleanup:
1959 kfree(pointers); 1959 kfree(pointers);
1960 1960
1961cleanup_io: 1961cleanup_io:
1962 if (rbio->operation == BTRFS_RBIO_READ_REBUILD) { 1962 if (rbio->operation == BTRFS_RBIO_READ_REBUILD) {
1963 if (err == 0) 1963 if (err == BLK_STS_OK)
1964 cache_rbio_pages(rbio); 1964 cache_rbio_pages(rbio);
1965 else 1965 else
1966 clear_bit(RBIO_CACHE_READY_BIT, &rbio->flags); 1966 clear_bit(RBIO_CACHE_READY_BIT, &rbio->flags);
@@ -1968,7 +1968,7 @@ cleanup_io:
1968 rbio_orig_end_io(rbio, err); 1968 rbio_orig_end_io(rbio, err);
1969 } else if (rbio->operation == BTRFS_RBIO_REBUILD_MISSING) { 1969 } else if (rbio->operation == BTRFS_RBIO_REBUILD_MISSING) {
1970 rbio_orig_end_io(rbio, err); 1970 rbio_orig_end_io(rbio, err);
1971 } else if (err == 0) { 1971 } else if (err == BLK_STS_OK) {
1972 rbio->faila = -1; 1972 rbio->faila = -1;
1973 rbio->failb = -1; 1973 rbio->failb = -1;
1974 1974
@@ -2005,7 +2005,7 @@ static void raid_recover_end_io(struct bio *bio)
2005 return; 2005 return;
2006 2006
2007 if (atomic_read(&rbio->error) > rbio->bbio->max_errors) 2007 if (atomic_read(&rbio->error) > rbio->bbio->max_errors)
2008 rbio_orig_end_io(rbio, -EIO); 2008 rbio_orig_end_io(rbio, BLK_STS_IOERR);
2009 else 2009 else
2010 __raid_recover_end_io(rbio); 2010 __raid_recover_end_io(rbio);
2011} 2011}
@@ -2104,7 +2104,7 @@ out:
2104cleanup: 2104cleanup:
2105 if (rbio->operation == BTRFS_RBIO_READ_REBUILD || 2105 if (rbio->operation == BTRFS_RBIO_READ_REBUILD ||
2106 rbio->operation == BTRFS_RBIO_REBUILD_MISSING) 2106 rbio->operation == BTRFS_RBIO_REBUILD_MISSING)
2107 rbio_orig_end_io(rbio, -EIO); 2107 rbio_orig_end_io(rbio, BLK_STS_IOERR);
2108 return -EIO; 2108 return -EIO;
2109} 2109}
2110 2110
@@ -2431,7 +2431,7 @@ submit_write:
2431 nr_data = bio_list_size(&bio_list); 2431 nr_data = bio_list_size(&bio_list);
2432 if (!nr_data) { 2432 if (!nr_data) {
2433 /* Every parity is right */ 2433 /* Every parity is right */
2434 rbio_orig_end_io(rbio, 0); 2434 rbio_orig_end_io(rbio, BLK_STS_OK);
2435 return; 2435 return;
2436 } 2436 }
2437 2437
@@ -2451,7 +2451,7 @@ submit_write:
2451 return; 2451 return;
2452 2452
2453cleanup: 2453cleanup:
2454 rbio_orig_end_io(rbio, -EIO); 2454 rbio_orig_end_io(rbio, BLK_STS_IOERR);
2455} 2455}
2456 2456
2457static inline int is_data_stripe(struct btrfs_raid_bio *rbio, int stripe) 2457static inline int is_data_stripe(struct btrfs_raid_bio *rbio, int stripe)
@@ -2519,7 +2519,7 @@ static void validate_rbio_for_parity_scrub(struct btrfs_raid_bio *rbio)
2519 return; 2519 return;
2520 2520
2521cleanup: 2521cleanup:
2522 rbio_orig_end_io(rbio, -EIO); 2522 rbio_orig_end_io(rbio, BLK_STS_IOERR);
2523} 2523}
2524 2524
2525/* 2525/*
@@ -2633,7 +2633,7 @@ static void raid56_parity_scrub_stripe(struct btrfs_raid_bio *rbio)
2633 return; 2633 return;
2634 2634
2635cleanup: 2635cleanup:
2636 rbio_orig_end_io(rbio, -EIO); 2636 rbio_orig_end_io(rbio, BLK_STS_IOERR);
2637 return; 2637 return;
2638 2638
2639finish: 2639finish:
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index e8b9a269fdde..bd679bc7a1a9 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -6212,8 +6212,8 @@ static void bbio_error(struct btrfs_bio *bbio, struct bio *bio, u64 logical)
6212 } 6212 }
6213} 6213}
6214 6214
6215int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio, 6215blk_status_t btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
6216 int mirror_num, int async_submit) 6216 int mirror_num, int async_submit)
6217{ 6217{
6218 struct btrfs_device *dev; 6218 struct btrfs_device *dev;
6219 struct bio *first_bio = bio; 6219 struct bio *first_bio = bio;
@@ -6233,7 +6233,7 @@ int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
6233 &map_length, &bbio, mirror_num, 1); 6233 &map_length, &bbio, mirror_num, 1);
6234 if (ret) { 6234 if (ret) {
6235 btrfs_bio_counter_dec(fs_info); 6235 btrfs_bio_counter_dec(fs_info);
6236 return ret; 6236 return errno_to_blk_status(ret);
6237 } 6237 }
6238 6238
6239 total_devs = bbio->num_stripes; 6239 total_devs = bbio->num_stripes;
@@ -6256,7 +6256,7 @@ int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
6256 } 6256 }
6257 6257
6258 btrfs_bio_counter_dec(fs_info); 6258 btrfs_bio_counter_dec(fs_info);
6259 return ret; 6259 return errno_to_blk_status(ret);
6260 } 6260 }
6261 6261
6262 if (map_length < length) { 6262 if (map_length < length) {
@@ -6283,7 +6283,7 @@ int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
6283 dev_nr, async_submit); 6283 dev_nr, async_submit);
6284 } 6284 }
6285 btrfs_bio_counter_dec(fs_info); 6285 btrfs_bio_counter_dec(fs_info);
6286 return 0; 6286 return BLK_STS_OK;
6287} 6287}
6288 6288
6289struct btrfs_device *btrfs_find_device(struct btrfs_fs_info *fs_info, u64 devid, 6289struct btrfs_device *btrfs_find_device(struct btrfs_fs_info *fs_info, u64 devid,
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index 6f45fd60d15a..93277fc60930 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -74,7 +74,7 @@ struct btrfs_device {
74 int missing; 74 int missing;
75 int can_discard; 75 int can_discard;
76 int is_tgtdev_for_dev_replace; 76 int is_tgtdev_for_dev_replace;
77 int last_flush_error; 77 blk_status_t last_flush_error;
78 int flush_bio_sent; 78 int flush_bio_sent;
79 79
80#ifdef __BTRFS_NEED_DEVICE_DATA_ORDERED 80#ifdef __BTRFS_NEED_DEVICE_DATA_ORDERED
@@ -416,8 +416,8 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
416 struct btrfs_fs_info *fs_info, u64 type); 416 struct btrfs_fs_info *fs_info, u64 type);
417void btrfs_mapping_init(struct btrfs_mapping_tree *tree); 417void btrfs_mapping_init(struct btrfs_mapping_tree *tree);
418void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree); 418void btrfs_mapping_tree_free(struct btrfs_mapping_tree *tree);
419int btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio, 419blk_status_t btrfs_map_bio(struct btrfs_fs_info *fs_info, struct bio *bio,
420 int mirror_num, int async_submit); 420 int mirror_num, int async_submit);
421int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, 421int btrfs_open_devices(struct btrfs_fs_devices *fs_devices,
422 fmode_t flags, void *holder); 422 fmode_t flags, void *holder);
423int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder, 423int btrfs_scan_one_device(const char *path, fmode_t flags, void *holder,
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index 56366e984076..569d3fb736be 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -194,15 +194,20 @@ cifs_bp_rename_retry:
194} 194}
195 195
196/* 196/*
197 * Don't allow path components longer than the server max.
197 * Don't allow the separator character in a path component. 198 * Don't allow the separator character in a path component.
198 * The VFS will not allow "/", but "\" is allowed by posix. 199 * The VFS will not allow "/", but "\" is allowed by posix.
199 */ 200 */
200static int 201static int
201check_name(struct dentry *direntry) 202check_name(struct dentry *direntry, struct cifs_tcon *tcon)
202{ 203{
203 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb); 204 struct cifs_sb_info *cifs_sb = CIFS_SB(direntry->d_sb);
204 int i; 205 int i;
205 206
207 if (unlikely(direntry->d_name.len >
208 tcon->fsAttrInfo.MaxPathNameComponentLength))
209 return -ENAMETOOLONG;
210
206 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)) { 211 if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)) {
207 for (i = 0; i < direntry->d_name.len; i++) { 212 for (i = 0; i < direntry->d_name.len; i++) {
208 if (direntry->d_name.name[i] == '\\') { 213 if (direntry->d_name.name[i] == '\\') {
@@ -500,10 +505,6 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
500 return finish_no_open(file, res); 505 return finish_no_open(file, res);
501 } 506 }
502 507
503 rc = check_name(direntry);
504 if (rc)
505 return rc;
506
507 xid = get_xid(); 508 xid = get_xid();
508 509
509 cifs_dbg(FYI, "parent inode = 0x%p name is: %pd and dentry = 0x%p\n", 510 cifs_dbg(FYI, "parent inode = 0x%p name is: %pd and dentry = 0x%p\n",
@@ -516,6 +517,11 @@ cifs_atomic_open(struct inode *inode, struct dentry *direntry,
516 } 517 }
517 518
518 tcon = tlink_tcon(tlink); 519 tcon = tlink_tcon(tlink);
520
521 rc = check_name(direntry, tcon);
522 if (rc)
523 goto out_free_xid;
524
519 server = tcon->ses->server; 525 server = tcon->ses->server;
520 526
521 if (server->ops->new_lease_key) 527 if (server->ops->new_lease_key)
@@ -776,7 +782,7 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
776 } 782 }
777 pTcon = tlink_tcon(tlink); 783 pTcon = tlink_tcon(tlink);
778 784
779 rc = check_name(direntry); 785 rc = check_name(direntry, pTcon);
780 if (rc) 786 if (rc)
781 goto lookup_out; 787 goto lookup_out;
782 788
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
index 5fb2fc2d0080..97edb4d376cd 100644
--- a/fs/cifs/smb2pdu.c
+++ b/fs/cifs/smb2pdu.c
@@ -3219,8 +3219,8 @@ copy_fs_info_to_kstatfs(struct smb2_fs_full_size_info *pfs_inf,
3219 kst->f_bsize = le32_to_cpu(pfs_inf->BytesPerSector) * 3219 kst->f_bsize = le32_to_cpu(pfs_inf->BytesPerSector) *
3220 le32_to_cpu(pfs_inf->SectorsPerAllocationUnit); 3220 le32_to_cpu(pfs_inf->SectorsPerAllocationUnit);
3221 kst->f_blocks = le64_to_cpu(pfs_inf->TotalAllocationUnits); 3221 kst->f_blocks = le64_to_cpu(pfs_inf->TotalAllocationUnits);
3222 kst->f_bfree = le64_to_cpu(pfs_inf->ActualAvailableAllocationUnits); 3222 kst->f_bfree = kst->f_bavail =
3223 kst->f_bavail = le64_to_cpu(pfs_inf->CallerAvailableAllocationUnits); 3223 le64_to_cpu(pfs_inf->CallerAvailableAllocationUnits);
3224 return; 3224 return;
3225} 3225}
3226 3226
diff --git a/fs/dax.c b/fs/dax.c
index 306c2b603fb8..865d42c63e23 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -1383,6 +1383,16 @@ static int dax_iomap_pmd_fault(struct vm_fault *vmf,
1383 1383
1384 trace_dax_pmd_fault(inode, vmf, max_pgoff, 0); 1384 trace_dax_pmd_fault(inode, vmf, max_pgoff, 0);
1385 1385
1386 /*
1387 * Make sure that the faulting address's PMD offset (color) matches
1388 * the PMD offset from the start of the file. This is necessary so
1389 * that a PMD range in the page table overlaps exactly with a PMD
1390 * range in the radix tree.
1391 */
1392 if ((vmf->pgoff & PG_PMD_COLOUR) !=
1393 ((vmf->address >> PAGE_SHIFT) & PG_PMD_COLOUR))
1394 goto fallback;
1395
1386 /* Fall back to PTEs if we're going to COW */ 1396 /* Fall back to PTEs if we're going to COW */
1387 if (write && !(vma->vm_flags & VM_SHARED)) 1397 if (write && !(vma->vm_flags & VM_SHARED))
1388 goto fallback; 1398 goto fallback;
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 108df2e3602c..7eae33ffa3fc 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -133,6 +133,50 @@ static inline struct pts_fs_info *DEVPTS_SB(struct super_block *sb)
133 return sb->s_fs_info; 133 return sb->s_fs_info;
134} 134}
135 135
136static int devpts_ptmx_path(struct path *path)
137{
138 struct super_block *sb;
139 int err;
140
141 /* Has the devpts filesystem already been found? */
142 if (path->mnt->mnt_sb->s_magic == DEVPTS_SUPER_MAGIC)
143 return 0;
144
145 /* Is a devpts filesystem at "pts" in the same directory? */
146 err = path_pts(path);
147 if (err)
148 return err;
149
150 /* Is the path the root of a devpts filesystem? */
151 sb = path->mnt->mnt_sb;
152 if ((sb->s_magic != DEVPTS_SUPER_MAGIC) ||
153 (path->mnt->mnt_root != sb->s_root))
154 return -ENODEV;
155
156 return 0;
157}
158
159struct vfsmount *devpts_mntget(struct file *filp, struct pts_fs_info *fsi)
160{
161 struct path path;
162 int err;
163
164 path = filp->f_path;
165 path_get(&path);
166
167 err = devpts_ptmx_path(&path);
168 dput(path.dentry);
169 if (err) {
170 mntput(path.mnt);
171 path.mnt = ERR_PTR(err);
172 }
173 if (DEVPTS_SB(path.mnt->mnt_sb) != fsi) {
174 mntput(path.mnt);
175 path.mnt = ERR_PTR(-ENODEV);
176 }
177 return path.mnt;
178}
179
136struct pts_fs_info *devpts_acquire(struct file *filp) 180struct pts_fs_info *devpts_acquire(struct file *filp)
137{ 181{
138 struct pts_fs_info *result; 182 struct pts_fs_info *result;
@@ -143,27 +187,16 @@ struct pts_fs_info *devpts_acquire(struct file *filp)
143 path = filp->f_path; 187 path = filp->f_path;
144 path_get(&path); 188 path_get(&path);
145 189
146 /* Has the devpts filesystem already been found? */ 190 err = devpts_ptmx_path(&path);
147 sb = path.mnt->mnt_sb; 191 if (err) {
148 if (sb->s_magic != DEVPTS_SUPER_MAGIC) { 192 result = ERR_PTR(err);
149 /* Is a devpts filesystem at "pts" in the same directory? */ 193 goto out;
150 err = path_pts(&path);
151 if (err) {
152 result = ERR_PTR(err);
153 goto out;
154 }
155
156 /* Is the path the root of a devpts filesystem? */
157 result = ERR_PTR(-ENODEV);
158 sb = path.mnt->mnt_sb;
159 if ((sb->s_magic != DEVPTS_SUPER_MAGIC) ||
160 (path.mnt->mnt_root != sb->s_root))
161 goto out;
162 } 194 }
163 195
164 /* 196 /*
165 * pty code needs to hold extra references in case of last /dev/tty close 197 * pty code needs to hold extra references in case of last /dev/tty close
166 */ 198 */
199 sb = path.mnt->mnt_sb;
167 atomic_inc(&sb->s_active); 200 atomic_inc(&sb->s_active);
168 result = DEVPTS_SB(sb); 201 result = DEVPTS_SB(sb);
169 202
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c
index 09441ae07a5b..46ff2229ff5e 100644
--- a/fs/ext4/acl.c
+++ b/fs/ext4/acl.c
@@ -193,13 +193,6 @@ __ext4_set_acl(handle_t *handle, struct inode *inode, int type,
193 switch (type) { 193 switch (type) {
194 case ACL_TYPE_ACCESS: 194 case ACL_TYPE_ACCESS:
195 name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; 195 name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS;
196 if (acl) {
197 error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
198 if (error)
199 return error;
200 inode->i_ctime = current_time(inode);
201 ext4_mark_inode_dirty(handle, inode);
202 }
203 break; 196 break;
204 197
205 case ACL_TYPE_DEFAULT: 198 case ACL_TYPE_DEFAULT:
@@ -221,8 +214,9 @@ __ext4_set_acl(handle_t *handle, struct inode *inode, int type,
221 value, size, xattr_flags); 214 value, size, xattr_flags);
222 215
223 kfree(value); 216 kfree(value);
224 if (!error) 217 if (!error) {
225 set_cached_acl(inode, type, acl); 218 set_cached_acl(inode, type, acl);
219 }
226 220
227 return error; 221 return error;
228} 222}
@@ -233,6 +227,8 @@ ext4_set_acl(struct inode *inode, struct posix_acl *acl, int type)
233 handle_t *handle; 227 handle_t *handle;
234 int error, credits, retries = 0; 228 int error, credits, retries = 0;
235 size_t acl_size = acl ? ext4_acl_size(acl->a_count) : 0; 229 size_t acl_size = acl ? ext4_acl_size(acl->a_count) : 0;
230 umode_t mode = inode->i_mode;
231 int update_mode = 0;
236 232
237 error = dquot_initialize(inode); 233 error = dquot_initialize(inode);
238 if (error) 234 if (error)
@@ -247,7 +243,20 @@ retry:
247 if (IS_ERR(handle)) 243 if (IS_ERR(handle))
248 return PTR_ERR(handle); 244 return PTR_ERR(handle);
249 245
246 if ((type == ACL_TYPE_ACCESS) && acl) {
247 error = posix_acl_update_mode(inode, &mode, &acl);
248 if (error)
249 goto out_stop;
250 update_mode = 1;
251 }
252
250 error = __ext4_set_acl(handle, inode, type, acl, 0 /* xattr_flags */); 253 error = __ext4_set_acl(handle, inode, type, acl, 0 /* xattr_flags */);
254 if (!error && update_mode) {
255 inode->i_mode = mode;
256 inode->i_ctime = current_time(inode);
257 ext4_mark_inode_dirty(handle, inode);
258 }
259out_stop:
251 ext4_journal_stop(handle); 260 ext4_journal_stop(handle);
252 if (error == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries)) 261 if (error == -ENOSPC && ext4_should_retry_alloc(inode->i_sb, &retries))
253 goto retry; 262 goto retry;
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 9ebde0cd632e..a2bb7d2870e4 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -961,7 +961,7 @@ struct ext4_inode_info {
961 /* 961 /*
962 * i_block_group is the number of the block group which contains 962 * i_block_group is the number of the block group which contains
963 * this file's inode. Constant across the lifetime of the inode, 963 * this file's inode. Constant across the lifetime of the inode,
964 * it is ued for making block allocation decisions - we try to 964 * it is used for making block allocation decisions - we try to
965 * place a file's data blocks near its inode block, and new inodes 965 * place a file's data blocks near its inode block, and new inodes
966 * near to their parent directory's inode. 966 * near to their parent directory's inode.
967 */ 967 */
@@ -1049,10 +1049,8 @@ struct ext4_inode_info {
1049 ext4_group_t i_last_alloc_group; 1049 ext4_group_t i_last_alloc_group;
1050 1050
1051 /* allocation reservation info for delalloc */ 1051 /* allocation reservation info for delalloc */
1052 /* In case of bigalloc, these refer to clusters rather than blocks */ 1052 /* In case of bigalloc, this refer to clusters rather than blocks */
1053 unsigned int i_reserved_data_blocks; 1053 unsigned int i_reserved_data_blocks;
1054 unsigned int i_reserved_meta_blocks;
1055 unsigned int i_allocated_meta_blocks;
1056 ext4_lblk_t i_da_metadata_calc_last_lblock; 1054 ext4_lblk_t i_da_metadata_calc_last_lblock;
1057 int i_da_metadata_calc_len; 1055 int i_da_metadata_calc_len;
1058 1056
@@ -2022,7 +2020,8 @@ static inline __le16 ext4_rec_len_to_disk(unsigned len, unsigned blocksize)
2022 2020
2023#define is_dx(dir) (ext4_has_feature_dir_index((dir)->i_sb) && \ 2021#define is_dx(dir) (ext4_has_feature_dir_index((dir)->i_sb) && \
2024 ext4_test_inode_flag((dir), EXT4_INODE_INDEX)) 2022 ext4_test_inode_flag((dir), EXT4_INODE_INDEX))
2025#define EXT4_DIR_LINK_MAX(dir) (!is_dx(dir) && (dir)->i_nlink >= EXT4_LINK_MAX) 2023#define EXT4_DIR_LINK_MAX(dir) unlikely((dir)->i_nlink >= EXT4_LINK_MAX && \
2024 !(ext4_has_feature_dir_nlink((dir)->i_sb) && is_dx(dir)))
2026#define EXT4_DIR_LINK_EMPTY(dir) ((dir)->i_nlink == 2 || (dir)->i_nlink == 1) 2025#define EXT4_DIR_LINK_EMPTY(dir) ((dir)->i_nlink == 2 || (dir)->i_nlink == 1)
2027 2026
2028/* Legal values for the dx_root hash_version field: */ 2027/* Legal values for the dx_root hash_version field: */
@@ -2462,6 +2461,8 @@ extern void ext4_process_freed_data(struct super_block *sb, tid_t commit_tid);
2462int ext4_inode_is_fast_symlink(struct inode *inode); 2461int ext4_inode_is_fast_symlink(struct inode *inode);
2463struct buffer_head *ext4_getblk(handle_t *, struct inode *, ext4_lblk_t, int); 2462struct buffer_head *ext4_getblk(handle_t *, struct inode *, ext4_lblk_t, int);
2464struct buffer_head *ext4_bread(handle_t *, struct inode *, ext4_lblk_t, int); 2463struct buffer_head *ext4_bread(handle_t *, struct inode *, ext4_lblk_t, int);
2464int ext4_bread_batch(struct inode *inode, ext4_lblk_t block, int bh_count,
2465 bool wait, struct buffer_head **bhs);
2465int ext4_get_block_unwritten(struct inode *inode, sector_t iblock, 2466int ext4_get_block_unwritten(struct inode *inode, sector_t iblock,
2466 struct buffer_head *bh_result, int create); 2467 struct buffer_head *bh_result, int create);
2467int ext4_get_block(struct inode *inode, sector_t iblock, 2468int ext4_get_block(struct inode *inode, sector_t iblock,
@@ -3074,7 +3075,7 @@ extern int ext4_handle_dirty_dirent_node(handle_t *handle,
3074 struct inode *inode, 3075 struct inode *inode,
3075 struct buffer_head *bh); 3076 struct buffer_head *bh);
3076#define S_SHIFT 12 3077#define S_SHIFT 12
3077static const unsigned char ext4_type_by_mode[S_IFMT >> S_SHIFT] = { 3078static const unsigned char ext4_type_by_mode[(S_IFMT >> S_SHIFT) + 1] = {
3078 [S_IFREG >> S_SHIFT] = EXT4_FT_REG_FILE, 3079 [S_IFREG >> S_SHIFT] = EXT4_FT_REG_FILE,
3079 [S_IFDIR >> S_SHIFT] = EXT4_FT_DIR, 3080 [S_IFDIR >> S_SHIFT] = EXT4_FT_DIR,
3080 [S_IFCHR >> S_SHIFT] = EXT4_FT_CHRDEV, 3081 [S_IFCHR >> S_SHIFT] = EXT4_FT_CHRDEV,
diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h
index dabad1bc8617..48143e32411c 100644
--- a/fs/ext4/ext4_jbd2.h
+++ b/fs/ext4/ext4_jbd2.h
@@ -227,6 +227,9 @@ int ext4_reserve_inode_write(handle_t *handle, struct inode *inode,
227 227
228int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode); 228int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode);
229 229
230int ext4_expand_extra_isize(struct inode *inode,
231 unsigned int new_extra_isize,
232 struct ext4_iloc *iloc);
230/* 233/*
231 * Wrapper functions with which ext4 calls into JBD. 234 * Wrapper functions with which ext4 calls into JBD.
232 */ 235 */
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index e0a8425ff74d..97f0fd06728d 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4652,7 +4652,7 @@ retry:
4652 4652
4653static int ext4_alloc_file_blocks(struct file *file, ext4_lblk_t offset, 4653static int ext4_alloc_file_blocks(struct file *file, ext4_lblk_t offset,
4654 ext4_lblk_t len, loff_t new_size, 4654 ext4_lblk_t len, loff_t new_size,
4655 int flags, int mode) 4655 int flags)
4656{ 4656{
4657 struct inode *inode = file_inode(file); 4657 struct inode *inode = file_inode(file);
4658 handle_t *handle; 4658 handle_t *handle;
@@ -4815,7 +4815,7 @@ static long ext4_zero_range(struct file *file, loff_t offset,
4815 round_down(offset, 1 << blkbits) >> blkbits, 4815 round_down(offset, 1 << blkbits) >> blkbits,
4816 (round_up((offset + len), 1 << blkbits) - 4816 (round_up((offset + len), 1 << blkbits) -
4817 round_down(offset, 1 << blkbits)) >> blkbits, 4817 round_down(offset, 1 << blkbits)) >> blkbits,
4818 new_size, flags, mode); 4818 new_size, flags);
4819 if (ret) 4819 if (ret)
4820 goto out_dio; 4820 goto out_dio;
4821 4821
@@ -4841,7 +4841,7 @@ static long ext4_zero_range(struct file *file, loff_t offset,
4841 inode->i_mtime = inode->i_ctime = current_time(inode); 4841 inode->i_mtime = inode->i_ctime = current_time(inode);
4842 4842
4843 ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size, 4843 ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size,
4844 flags, mode); 4844 flags);
4845 up_write(&EXT4_I(inode)->i_mmap_sem); 4845 up_write(&EXT4_I(inode)->i_mmap_sem);
4846 if (ret) 4846 if (ret)
4847 goto out_dio; 4847 goto out_dio;
@@ -4976,8 +4976,7 @@ long ext4_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
4976 ext4_inode_block_unlocked_dio(inode); 4976 ext4_inode_block_unlocked_dio(inode);
4977 inode_dio_wait(inode); 4977 inode_dio_wait(inode);
4978 4978
4979 ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size, 4979 ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size, flags);
4980 flags, mode);
4981 ext4_inode_resume_unlocked_dio(inode); 4980 ext4_inode_resume_unlocked_dio(inode);
4982 if (ret) 4981 if (ret)
4983 goto out; 4982 goto out;
@@ -5837,7 +5836,7 @@ ext4_swap_extents(handle_t *handle, struct inode *inode1,
5837 if (e1_blk > lblk1) 5836 if (e1_blk > lblk1)
5838 next1 = e1_blk; 5837 next1 = e1_blk;
5839 if (e2_blk > lblk2) 5838 if (e2_blk > lblk2)
5840 next2 = e1_blk; 5839 next2 = e2_blk;
5841 /* Do we have something to swap */ 5840 /* Do we have something to swap */
5842 if (next1 == EXT_MAX_BLOCKS || next2 == EXT_MAX_BLOCKS) 5841 if (next1 == EXT_MAX_BLOCKS || next2 == EXT_MAX_BLOCKS)
5843 goto finish; 5842 goto finish;
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 58294c9a7e1d..0d7cf0cc9b87 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -537,6 +537,8 @@ static int ext4_find_unwritten_pgoff(struct inode *inode,
537 lastoff = page_offset(page); 537 lastoff = page_offset(page);
538 bh = head = page_buffers(page); 538 bh = head = page_buffers(page);
539 do { 539 do {
540 if (lastoff + bh->b_size <= startoff)
541 goto next;
540 if (buffer_uptodate(bh) || 542 if (buffer_uptodate(bh) ||
541 buffer_unwritten(bh)) { 543 buffer_unwritten(bh)) {
542 if (whence == SEEK_DATA) 544 if (whence == SEEK_DATA)
@@ -551,6 +553,7 @@ static int ext4_find_unwritten_pgoff(struct inode *inode,
551 unlock_page(page); 553 unlock_page(page);
552 goto out; 554 goto out;
553 } 555 }
556next:
554 lastoff += bh->b_size; 557 lastoff += bh->b_size;
555 bh = bh->b_this_page; 558 bh = bh->b_this_page;
556 } while (bh != head); 559 } while (bh != head);
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 3c600f02673f..c774bdc22759 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -892,7 +892,7 @@ static int ext4_dio_get_block_unwritten_async(struct inode *inode,
892/* 892/*
893 * Get block function for non-AIO DIO writes when we create unwritten extent if 893 * Get block function for non-AIO DIO writes when we create unwritten extent if
894 * blocks are not allocated yet. The extent will be converted to written 894 * blocks are not allocated yet. The extent will be converted to written
895 * after IO is complete from ext4_ext_direct_IO() function. 895 * after IO is complete by ext4_direct_IO_write().
896 */ 896 */
897static int ext4_dio_get_block_unwritten_sync(struct inode *inode, 897static int ext4_dio_get_block_unwritten_sync(struct inode *inode,
898 sector_t iblock, struct buffer_head *bh_result, int create) 898 sector_t iblock, struct buffer_head *bh_result, int create)
@@ -907,7 +907,7 @@ static int ext4_dio_get_block_unwritten_sync(struct inode *inode,
907 907
908 /* 908 /*
909 * Mark inode as having pending DIO writes to unwritten extents. 909 * Mark inode as having pending DIO writes to unwritten extents.
910 * ext4_ext_direct_IO() checks this flag and converts extents to 910 * ext4_direct_IO_write() checks this flag and converts extents to
911 * written. 911 * written.
912 */ 912 */
913 if (!ret && buffer_unwritten(bh_result)) 913 if (!ret && buffer_unwritten(bh_result))
@@ -1015,6 +1015,50 @@ struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode,
1015 return ERR_PTR(-EIO); 1015 return ERR_PTR(-EIO);
1016} 1016}
1017 1017
1018/* Read a contiguous batch of blocks. */
1019int ext4_bread_batch(struct inode *inode, ext4_lblk_t block, int bh_count,
1020 bool wait, struct buffer_head **bhs)
1021{
1022 int i, err;
1023
1024 for (i = 0; i < bh_count; i++) {
1025 bhs[i] = ext4_getblk(NULL, inode, block + i, 0 /* map_flags */);
1026 if (IS_ERR(bhs[i])) {
1027 err = PTR_ERR(bhs[i]);
1028 bh_count = i;
1029 goto out_brelse;
1030 }
1031 }
1032
1033 for (i = 0; i < bh_count; i++)
1034 /* Note that NULL bhs[i] is valid because of holes. */
1035 if (bhs[i] && !buffer_uptodate(bhs[i]))
1036 ll_rw_block(REQ_OP_READ, REQ_META | REQ_PRIO, 1,
1037 &bhs[i]);
1038
1039 if (!wait)
1040 return 0;
1041
1042 for (i = 0; i < bh_count; i++)
1043 if (bhs[i])
1044 wait_on_buffer(bhs[i]);
1045
1046 for (i = 0; i < bh_count; i++) {
1047 if (bhs[i] && !buffer_uptodate(bhs[i])) {
1048 err = -EIO;
1049 goto out_brelse;
1050 }
1051 }
1052 return 0;
1053
1054out_brelse:
1055 for (i = 0; i < bh_count; i++) {
1056 brelse(bhs[i]);
1057 bhs[i] = NULL;
1058 }
1059 return err;
1060}
1061
1018int ext4_walk_page_buffers(handle_t *handle, 1062int ext4_walk_page_buffers(handle_t *handle,
1019 struct buffer_head *head, 1063 struct buffer_head *head,
1020 unsigned from, 1064 unsigned from,
@@ -5658,22 +5702,16 @@ ext4_reserve_inode_write(handle_t *handle, struct inode *inode,
5658 return err; 5702 return err;
5659} 5703}
5660 5704
5661/* 5705static int __ext4_expand_extra_isize(struct inode *inode,
5662 * Expand an inode by new_extra_isize bytes. 5706 unsigned int new_extra_isize,
5663 * Returns 0 on success or negative error number on failure. 5707 struct ext4_iloc *iloc,
5664 */ 5708 handle_t *handle, int *no_expand)
5665static int ext4_expand_extra_isize(struct inode *inode,
5666 unsigned int new_extra_isize,
5667 struct ext4_iloc iloc,
5668 handle_t *handle)
5669{ 5709{
5670 struct ext4_inode *raw_inode; 5710 struct ext4_inode *raw_inode;
5671 struct ext4_xattr_ibody_header *header; 5711 struct ext4_xattr_ibody_header *header;
5712 int error;
5672 5713
5673 if (EXT4_I(inode)->i_extra_isize >= new_extra_isize) 5714 raw_inode = ext4_raw_inode(iloc);
5674 return 0;
5675
5676 raw_inode = ext4_raw_inode(&iloc);
5677 5715
5678 header = IHDR(inode, raw_inode); 5716 header = IHDR(inode, raw_inode);
5679 5717
@@ -5688,8 +5726,98 @@ static int ext4_expand_extra_isize(struct inode *inode,
5688 } 5726 }
5689 5727
5690 /* try to expand with EAs present */ 5728 /* try to expand with EAs present */
5691 return ext4_expand_extra_isize_ea(inode, new_extra_isize, 5729 error = ext4_expand_extra_isize_ea(inode, new_extra_isize,
5692 raw_inode, handle); 5730 raw_inode, handle);
5731 if (error) {
5732 /*
5733 * Inode size expansion failed; don't try again
5734 */
5735 *no_expand = 1;
5736 }
5737
5738 return error;
5739}
5740
5741/*
5742 * Expand an inode by new_extra_isize bytes.
5743 * Returns 0 on success or negative error number on failure.
5744 */
5745static int ext4_try_to_expand_extra_isize(struct inode *inode,
5746 unsigned int new_extra_isize,
5747 struct ext4_iloc iloc,
5748 handle_t *handle)
5749{
5750 int no_expand;
5751 int error;
5752
5753 if (ext4_test_inode_state(inode, EXT4_STATE_NO_EXPAND))
5754 return -EOVERFLOW;
5755
5756 /*
5757 * In nojournal mode, we can immediately attempt to expand
5758 * the inode. When journaled, we first need to obtain extra
5759 * buffer credits since we may write into the EA block
5760 * with this same handle. If journal_extend fails, then it will
5761 * only result in a minor loss of functionality for that inode.
5762 * If this is felt to be critical, then e2fsck should be run to
5763 * force a large enough s_min_extra_isize.
5764 */
5765 if (ext4_handle_valid(handle) &&
5766 jbd2_journal_extend(handle,
5767 EXT4_DATA_TRANS_BLOCKS(inode->i_sb)) != 0)
5768 return -ENOSPC;
5769
5770 if (ext4_write_trylock_xattr(inode, &no_expand) == 0)
5771 return -EBUSY;
5772
5773 error = __ext4_expand_extra_isize(inode, new_extra_isize, &iloc,
5774 handle, &no_expand);
5775 ext4_write_unlock_xattr(inode, &no_expand);
5776
5777 return error;
5778}
5779
5780int ext4_expand_extra_isize(struct inode *inode,
5781 unsigned int new_extra_isize,
5782 struct ext4_iloc *iloc)
5783{
5784 handle_t *handle;
5785 int no_expand;
5786 int error, rc;
5787
5788 if (ext4_test_inode_state(inode, EXT4_STATE_NO_EXPAND)) {
5789 brelse(iloc->bh);
5790 return -EOVERFLOW;
5791 }
5792
5793 handle = ext4_journal_start(inode, EXT4_HT_INODE,
5794 EXT4_DATA_TRANS_BLOCKS(inode->i_sb));
5795 if (IS_ERR(handle)) {
5796 error = PTR_ERR(handle);
5797 brelse(iloc->bh);
5798 return error;
5799 }
5800
5801 ext4_write_lock_xattr(inode, &no_expand);
5802
5803 BUFFER_TRACE(iloc.bh, "get_write_access");
5804 error = ext4_journal_get_write_access(handle, iloc->bh);
5805 if (error) {
5806 brelse(iloc->bh);
5807 goto out_stop;
5808 }
5809
5810 error = __ext4_expand_extra_isize(inode, new_extra_isize, iloc,
5811 handle, &no_expand);
5812
5813 rc = ext4_mark_iloc_dirty(handle, inode, iloc);
5814 if (!error)
5815 error = rc;
5816
5817 ext4_write_unlock_xattr(inode, &no_expand);
5818out_stop:
5819 ext4_journal_stop(handle);
5820 return error;
5693} 5821}
5694 5822
5695/* 5823/*
@@ -5709,44 +5837,18 @@ int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode)
5709{ 5837{
5710 struct ext4_iloc iloc; 5838 struct ext4_iloc iloc;
5711 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb); 5839 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
5712 static unsigned int mnt_count; 5840 int err;
5713 int err, ret;
5714 5841
5715 might_sleep(); 5842 might_sleep();
5716 trace_ext4_mark_inode_dirty(inode, _RET_IP_); 5843 trace_ext4_mark_inode_dirty(inode, _RET_IP_);
5717 err = ext4_reserve_inode_write(handle, inode, &iloc); 5844 err = ext4_reserve_inode_write(handle, inode, &iloc);
5718 if (err) 5845 if (err)
5719 return err; 5846 return err;
5720 if (EXT4_I(inode)->i_extra_isize < sbi->s_want_extra_isize && 5847
5721 !ext4_test_inode_state(inode, EXT4_STATE_NO_EXPAND)) { 5848 if (EXT4_I(inode)->i_extra_isize < sbi->s_want_extra_isize)
5722 /* 5849 ext4_try_to_expand_extra_isize(inode, sbi->s_want_extra_isize,
5723 * In nojournal mode, we can immediately attempt to expand 5850 iloc, handle);
5724 * the inode. When journaled, we first need to obtain extra 5851
5725 * buffer credits since we may write into the EA block
5726 * with this same handle. If journal_extend fails, then it will
5727 * only result in a minor loss of functionality for that inode.
5728 * If this is felt to be critical, then e2fsck should be run to
5729 * force a large enough s_min_extra_isize.
5730 */
5731 if (!ext4_handle_valid(handle) ||
5732 jbd2_journal_extend(handle,
5733 EXT4_DATA_TRANS_BLOCKS(inode->i_sb)) == 0) {
5734 ret = ext4_expand_extra_isize(inode,
5735 sbi->s_want_extra_isize,
5736 iloc, handle);
5737 if (ret) {
5738 if (mnt_count !=
5739 le16_to_cpu(sbi->s_es->s_mnt_count)) {
5740 ext4_warning(inode->i_sb,
5741 "Unable to expand inode %lu. Delete"
5742 " some EAs or run e2fsck.",
5743 inode->i_ino);
5744 mnt_count =
5745 le16_to_cpu(sbi->s_es->s_mnt_count);
5746 }
5747 }
5748 }
5749 }
5750 return ext4_mark_iloc_dirty(handle, inode, &iloc); 5852 return ext4_mark_iloc_dirty(handle, inode, &iloc);
5751} 5853}
5752 5854
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 42b3a73143cf..afb66d4ab5cf 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -64,18 +64,16 @@ static void swap_inode_data(struct inode *inode1, struct inode *inode2)
64 ei1 = EXT4_I(inode1); 64 ei1 = EXT4_I(inode1);
65 ei2 = EXT4_I(inode2); 65 ei2 = EXT4_I(inode2);
66 66
67 memswap(&inode1->i_flags, &inode2->i_flags, sizeof(inode1->i_flags)); 67 swap(inode1->i_flags, inode2->i_flags);
68 memswap(&inode1->i_version, &inode2->i_version, 68 swap(inode1->i_version, inode2->i_version);
69 sizeof(inode1->i_version)); 69 swap(inode1->i_blocks, inode2->i_blocks);
70 memswap(&inode1->i_blocks, &inode2->i_blocks, 70 swap(inode1->i_bytes, inode2->i_bytes);
71 sizeof(inode1->i_blocks)); 71 swap(inode1->i_atime, inode2->i_atime);
72 memswap(&inode1->i_bytes, &inode2->i_bytes, sizeof(inode1->i_bytes)); 72 swap(inode1->i_mtime, inode2->i_mtime);
73 memswap(&inode1->i_atime, &inode2->i_atime, sizeof(inode1->i_atime));
74 memswap(&inode1->i_mtime, &inode2->i_mtime, sizeof(inode1->i_mtime));
75 73
76 memswap(ei1->i_data, ei2->i_data, sizeof(ei1->i_data)); 74 memswap(ei1->i_data, ei2->i_data, sizeof(ei1->i_data));
77 memswap(&ei1->i_flags, &ei2->i_flags, sizeof(ei1->i_flags)); 75 swap(ei1->i_flags, ei2->i_flags);
78 memswap(&ei1->i_disksize, &ei2->i_disksize, sizeof(ei1->i_disksize)); 76 swap(ei1->i_disksize, ei2->i_disksize);
79 ext4_es_remove_extent(inode1, 0, EXT_MAX_BLOCKS); 77 ext4_es_remove_extent(inode1, 0, EXT_MAX_BLOCKS);
80 ext4_es_remove_extent(inode2, 0, EXT_MAX_BLOCKS); 78 ext4_es_remove_extent(inode2, 0, EXT_MAX_BLOCKS);
81 79
@@ -351,11 +349,14 @@ static int ext4_ioctl_setproject(struct file *filp, __u32 projid)
351 349
352 raw_inode = ext4_raw_inode(&iloc); 350 raw_inode = ext4_raw_inode(&iloc);
353 if (!EXT4_FITS_IN_INODE(raw_inode, ei, i_projid)) { 351 if (!EXT4_FITS_IN_INODE(raw_inode, ei, i_projid)) {
354 err = -EOVERFLOW; 352 err = ext4_expand_extra_isize(inode,
353 EXT4_SB(sb)->s_want_extra_isize,
354 &iloc);
355 if (err)
356 goto out_unlock;
357 } else {
355 brelse(iloc.bh); 358 brelse(iloc.bh);
356 goto out_unlock;
357 } 359 }
358 brelse(iloc.bh);
359 360
360 dquot_initialize(inode); 361 dquot_initialize(inode);
361 362
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index 581e357e8406..701085620cd8 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -2295,6 +2295,9 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
2295 int err, buddy_loaded = 0; 2295 int err, buddy_loaded = 0;
2296 struct ext4_buddy e4b; 2296 struct ext4_buddy e4b;
2297 struct ext4_group_info *grinfo; 2297 struct ext4_group_info *grinfo;
2298 unsigned char blocksize_bits = min_t(unsigned char,
2299 sb->s_blocksize_bits,
2300 EXT4_MAX_BLOCK_LOG_SIZE);
2298 struct sg { 2301 struct sg {
2299 struct ext4_group_info info; 2302 struct ext4_group_info info;
2300 ext4_grpblk_t counters[EXT4_MAX_BLOCK_LOG_SIZE + 2]; 2303 ext4_grpblk_t counters[EXT4_MAX_BLOCK_LOG_SIZE + 2];
@@ -2306,8 +2309,9 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
2306 " 2^0 2^1 2^2 2^3 2^4 2^5 2^6 " 2309 " 2^0 2^1 2^2 2^3 2^4 2^5 2^6 "
2307 " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]\n"); 2310 " 2^7 2^8 2^9 2^10 2^11 2^12 2^13 ]\n");
2308 2311
2309 i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) + 2312 i = (blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) +
2310 sizeof(struct ext4_group_info); 2313 sizeof(struct ext4_group_info);
2314
2311 grinfo = ext4_get_group_info(sb, group); 2315 grinfo = ext4_get_group_info(sb, group);
2312 /* Load the group info in memory only if not already loaded. */ 2316 /* Load the group info in memory only if not already loaded. */
2313 if (unlikely(EXT4_MB_GRP_NEED_INIT(grinfo))) { 2317 if (unlikely(EXT4_MB_GRP_NEED_INIT(grinfo))) {
@@ -2327,7 +2331,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
2327 seq_printf(seq, "#%-5u: %-5u %-5u %-5u [", group, sg.info.bb_free, 2331 seq_printf(seq, "#%-5u: %-5u %-5u %-5u [", group, sg.info.bb_free,
2328 sg.info.bb_fragments, sg.info.bb_first_free); 2332 sg.info.bb_fragments, sg.info.bb_first_free);
2329 for (i = 0; i <= 13; i++) 2333 for (i = 0; i <= 13; i++)
2330 seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ? 2334 seq_printf(seq, " %-5u", i <= blocksize_bits + 1 ?
2331 sg.info.bb_counters[i] : 0); 2335 sg.info.bb_counters[i] : 0);
2332 seq_printf(seq, " ]\n"); 2336 seq_printf(seq, " ]\n");
2333 2337
@@ -2892,8 +2896,10 @@ void ext4_process_freed_data(struct super_block *sb, tid_t commit_tid)
2892 break; 2896 break;
2893 } 2897 }
2894 2898
2895 if (discard_bio) 2899 if (discard_bio) {
2896 submit_bio_wait(discard_bio); 2900 submit_bio_wait(discard_bio);
2901 bio_put(discard_bio);
2902 }
2897 } 2903 }
2898 2904
2899 list_for_each_entry_safe(entry, tmp, &freed_data_list, efd_list) 2905 list_for_each_entry_safe(entry, tmp, &freed_data_list, efd_list)
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 13f0cadb1238..c1cf020d1889 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -1342,13 +1342,12 @@ static struct buffer_head * ext4_find_entry (struct inode *dir,
1342 struct super_block *sb; 1342 struct super_block *sb;
1343 struct buffer_head *bh_use[NAMEI_RA_SIZE]; 1343 struct buffer_head *bh_use[NAMEI_RA_SIZE];
1344 struct buffer_head *bh, *ret = NULL; 1344 struct buffer_head *bh, *ret = NULL;
1345 ext4_lblk_t start, block, b; 1345 ext4_lblk_t start, block;
1346 const u8 *name = d_name->name; 1346 const u8 *name = d_name->name;
1347 int ra_max = 0; /* Number of bh's in the readahead 1347 size_t ra_max = 0; /* Number of bh's in the readahead
1348 buffer, bh_use[] */ 1348 buffer, bh_use[] */
1349 int ra_ptr = 0; /* Current index into readahead 1349 size_t ra_ptr = 0; /* Current index into readahead
1350 buffer */ 1350 buffer */
1351 int num = 0;
1352 ext4_lblk_t nblocks; 1351 ext4_lblk_t nblocks;
1353 int i, namelen, retval; 1352 int i, namelen, retval;
1354 struct ext4_filename fname; 1353 struct ext4_filename fname;
@@ -1411,31 +1410,17 @@ restart:
1411 if (ra_ptr >= ra_max) { 1410 if (ra_ptr >= ra_max) {
1412 /* Refill the readahead buffer */ 1411 /* Refill the readahead buffer */
1413 ra_ptr = 0; 1412 ra_ptr = 0;
1414 b = block; 1413 if (block < start)
1415 for (ra_max = 0; ra_max < NAMEI_RA_SIZE; ra_max++) { 1414 ra_max = start - block;
1416 /* 1415 else
1417 * Terminate if we reach the end of the 1416 ra_max = nblocks - block;
1418 * directory and must wrap, or if our 1417 ra_max = min(ra_max, ARRAY_SIZE(bh_use));
1419 * search has finished at this block. 1418 retval = ext4_bread_batch(dir, block, ra_max,
1420 */ 1419 false /* wait */, bh_use);
1421 if (b >= nblocks || (num && block == start)) { 1420 if (retval) {
1422 bh_use[ra_max] = NULL; 1421 ret = ERR_PTR(retval);
1423 break; 1422 ra_max = 0;
1424 } 1423 goto cleanup_and_exit;
1425 num++;
1426 bh = ext4_getblk(NULL, dir, b++, 0);
1427 if (IS_ERR(bh)) {
1428 if (ra_max == 0) {
1429 ret = bh;
1430 goto cleanup_and_exit;
1431 }
1432 break;
1433 }
1434 bh_use[ra_max] = bh;
1435 if (bh)
1436 ll_rw_block(REQ_OP_READ,
1437 REQ_META | REQ_PRIO,
1438 1, &bh);
1439 } 1424 }
1440 } 1425 }
1441 if ((bh = bh_use[ra_ptr++]) == NULL) 1426 if ((bh = bh_use[ra_ptr++]) == NULL)
@@ -2395,19 +2380,22 @@ out:
2395} 2380}
2396 2381
2397/* 2382/*
2398 * DIR_NLINK feature is set if 1) nlinks > EXT4_LINK_MAX or 2) nlinks == 2, 2383 * Set directory link count to 1 if nlinks > EXT4_LINK_MAX, or if nlinks == 2
2399 * since this indicates that nlinks count was previously 1. 2384 * since this indicates that nlinks count was previously 1 to avoid overflowing
2385 * the 16-bit i_links_count field on disk. Directories with i_nlink == 1 mean
2386 * that subdirectory link counts are not being maintained accurately.
2387 *
2388 * The caller has already checked for i_nlink overflow in case the DIR_LINK
2389 * feature is not enabled and returned -EMLINK. The is_dx() check is a proxy
2390 * for checking S_ISDIR(inode) (since the INODE_INDEX feature will not be set
2391 * on regular files) and to avoid creating huge/slow non-HTREE directories.
2400 */ 2392 */
2401static void ext4_inc_count(handle_t *handle, struct inode *inode) 2393static void ext4_inc_count(handle_t *handle, struct inode *inode)
2402{ 2394{
2403 inc_nlink(inode); 2395 inc_nlink(inode);
2404 if (is_dx(inode) && inode->i_nlink > 1) { 2396 if (is_dx(inode) &&
2405 /* limit is 16-bit i_links_count */ 2397 (inode->i_nlink > EXT4_LINK_MAX || inode->i_nlink == 2))
2406 if (inode->i_nlink >= EXT4_LINK_MAX || inode->i_nlink == 2) { 2398 set_nlink(inode, 1);
2407 set_nlink(inode, 1);
2408 ext4_set_feature_dir_nlink(inode->i_sb);
2409 }
2410 }
2411} 2399}
2412 2400
2413/* 2401/*
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c
index c3ed9021b781..035cd3f4785e 100644
--- a/fs/ext4/resize.c
+++ b/fs/ext4/resize.c
@@ -1927,7 +1927,8 @@ retry:
1927 n_desc_blocks = o_desc_blocks + 1927 n_desc_blocks = o_desc_blocks +
1928 le16_to_cpu(es->s_reserved_gdt_blocks); 1928 le16_to_cpu(es->s_reserved_gdt_blocks);
1929 n_group = n_desc_blocks * EXT4_DESC_PER_BLOCK(sb); 1929 n_group = n_desc_blocks * EXT4_DESC_PER_BLOCK(sb);
1930 n_blocks_count = n_group * EXT4_BLOCKS_PER_GROUP(sb); 1930 n_blocks_count = (ext4_fsblk_t)n_group *
1931 EXT4_BLOCKS_PER_GROUP(sb);
1931 n_group--; /* set to last group number */ 1932 n_group--; /* set to last group number */
1932 } 1933 }
1933 1934
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 0886fe82e9c4..d61a70e2193a 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -978,8 +978,6 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
978 ei->i_es_shk_nr = 0; 978 ei->i_es_shk_nr = 0;
979 ei->i_es_shrink_lblk = 0; 979 ei->i_es_shrink_lblk = 0;
980 ei->i_reserved_data_blocks = 0; 980 ei->i_reserved_data_blocks = 0;
981 ei->i_reserved_meta_blocks = 0;
982 ei->i_allocated_meta_blocks = 0;
983 ei->i_da_metadata_calc_len = 0; 981 ei->i_da_metadata_calc_len = 0;
984 ei->i_da_metadata_calc_last_lblock = 0; 982 ei->i_da_metadata_calc_last_lblock = 0;
985 spin_lock_init(&(ei->i_block_reservation_lock)); 983 spin_lock_init(&(ei->i_block_reservation_lock));
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index cff4f41ced61..3dd970168448 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -317,28 +317,41 @@ static void ext4_xattr_inode_set_hash(struct inode *ea_inode, u32 hash)
317 */ 317 */
318static int ext4_xattr_inode_read(struct inode *ea_inode, void *buf, size_t size) 318static int ext4_xattr_inode_read(struct inode *ea_inode, void *buf, size_t size)
319{ 319{
320 unsigned long block = 0; 320 int blocksize = 1 << ea_inode->i_blkbits;
321 struct buffer_head *bh; 321 int bh_count = (size + blocksize - 1) >> ea_inode->i_blkbits;
322 int blocksize = ea_inode->i_sb->s_blocksize; 322 int tail_size = (size % blocksize) ?: blocksize;
323 size_t csize, copied = 0; 323 struct buffer_head *bhs_inline[8];
324 void *copy_pos = buf; 324 struct buffer_head **bhs = bhs_inline;
325 325 int i, ret;
326 while (copied < size) { 326
327 csize = (size - copied) > blocksize ? blocksize : size - copied; 327 if (bh_count > ARRAY_SIZE(bhs_inline)) {
328 bh = ext4_bread(NULL, ea_inode, block, 0); 328 bhs = kmalloc_array(bh_count, sizeof(*bhs), GFP_NOFS);
329 if (IS_ERR(bh)) 329 if (!bhs)
330 return PTR_ERR(bh); 330 return -ENOMEM;
331 if (!bh) 331 }
332 return -EFSCORRUPTED;
333 332
334 memcpy(copy_pos, bh->b_data, csize); 333 ret = ext4_bread_batch(ea_inode, 0 /* block */, bh_count,
335 brelse(bh); 334 true /* wait */, bhs);
335 if (ret)
336 goto free_bhs;
336 337
337 copy_pos += csize; 338 for (i = 0; i < bh_count; i++) {
338 block += 1; 339 /* There shouldn't be any holes in ea_inode. */
339 copied += csize; 340 if (!bhs[i]) {
341 ret = -EFSCORRUPTED;
342 goto put_bhs;
343 }
344 memcpy((char *)buf + blocksize * i, bhs[i]->b_data,
345 i < bh_count - 1 ? blocksize : tail_size);
340 } 346 }
341 return 0; 347 ret = 0;
348put_bhs:
349 for (i = 0; i < bh_count; i++)
350 brelse(bhs[i]);
351free_bhs:
352 if (bhs != bhs_inline)
353 kfree(bhs);
354 return ret;
342} 355}
343 356
344static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino, 357static int ext4_xattr_inode_iget(struct inode *parent, unsigned long ea_ino,
@@ -451,6 +464,7 @@ ext4_xattr_inode_get(struct inode *inode, struct ext4_xattr_entry *entry,
451 } 464 }
452 /* Do not add ea_inode to the cache. */ 465 /* Do not add ea_inode to the cache. */
453 ea_inode_cache = NULL; 466 ea_inode_cache = NULL;
467 err = 0;
454 } else if (err) 468 } else if (err)
455 goto out; 469 goto out;
456 470
@@ -1529,7 +1543,7 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i,
1529 /* Clear padding bytes. */ 1543 /* Clear padding bytes. */
1530 memset(val + i->value_len, 0, new_size - i->value_len); 1544 memset(val + i->value_len, 0, new_size - i->value_len);
1531 } 1545 }
1532 return 0; 1546 goto update_hash;
1533 } 1547 }
1534 1548
1535 /* Compute min_offs and last. */ 1549 /* Compute min_offs and last. */
@@ -1693,6 +1707,7 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i,
1693 here->e_value_size = cpu_to_le32(i->value_len); 1707 here->e_value_size = cpu_to_le32(i->value_len);
1694 } 1708 }
1695 1709
1710update_hash:
1696 if (i->value) { 1711 if (i->value) {
1697 __le32 hash = 0; 1712 __le32 hash = 0;
1698 1713
@@ -1711,7 +1726,8 @@ static int ext4_xattr_set_entry(struct ext4_xattr_info *i,
1711 here->e_name_len, 1726 here->e_name_len,
1712 &crc32c_hash, 1); 1727 &crc32c_hash, 1);
1713 } else if (is_block) { 1728 } else if (is_block) {
1714 __le32 *value = s->base + min_offs - new_size; 1729 __le32 *value = s->base + le16_to_cpu(
1730 here->e_value_offs);
1715 1731
1716 hash = ext4_xattr_hash_entry(here->e_name, 1732 hash = ext4_xattr_hash_entry(here->e_name,
1717 here->e_name_len, value, 1733 here->e_name_len, value,
@@ -1815,9 +1831,6 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
1815 ea_bdebug(bs->bh, "modifying in-place"); 1831 ea_bdebug(bs->bh, "modifying in-place");
1816 error = ext4_xattr_set_entry(i, s, handle, inode, 1832 error = ext4_xattr_set_entry(i, s, handle, inode,
1817 true /* is_block */); 1833 true /* is_block */);
1818 if (!error)
1819 ext4_xattr_block_cache_insert(ea_block_cache,
1820 bs->bh);
1821 ext4_xattr_block_csum_set(inode, bs->bh); 1834 ext4_xattr_block_csum_set(inode, bs->bh);
1822 unlock_buffer(bs->bh); 1835 unlock_buffer(bs->bh);
1823 if (error == -EFSCORRUPTED) 1836 if (error == -EFSCORRUPTED)
@@ -1973,6 +1986,7 @@ inserted:
1973 } else if (bs->bh && s->base == bs->bh->b_data) { 1986 } else if (bs->bh && s->base == bs->bh->b_data) {
1974 /* We were modifying this block in-place. */ 1987 /* We were modifying this block in-place. */
1975 ea_bdebug(bs->bh, "keeping this block"); 1988 ea_bdebug(bs->bh, "keeping this block");
1989 ext4_xattr_block_cache_insert(ea_block_cache, bs->bh);
1976 new_bh = bs->bh; 1990 new_bh = bs->bh;
1977 get_bh(new_bh); 1991 get_bh(new_bh);
1978 } else { 1992 } else {
@@ -2625,23 +2639,21 @@ int ext4_expand_extra_isize_ea(struct inode *inode, int new_extra_isize,
2625 struct ext4_inode *raw_inode, handle_t *handle) 2639 struct ext4_inode *raw_inode, handle_t *handle)
2626{ 2640{
2627 struct ext4_xattr_ibody_header *header; 2641 struct ext4_xattr_ibody_header *header;
2628 struct buffer_head *bh = NULL; 2642 struct buffer_head *bh;
2643 struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
2644 static unsigned int mnt_count;
2629 size_t min_offs; 2645 size_t min_offs;
2630 size_t ifree, bfree; 2646 size_t ifree, bfree;
2631 int total_ino; 2647 int total_ino;
2632 void *base, *end; 2648 void *base, *end;
2633 int error = 0, tried_min_extra_isize = 0; 2649 int error = 0, tried_min_extra_isize = 0;
2634 int s_min_extra_isize = le16_to_cpu(EXT4_SB(inode->i_sb)->s_es->s_min_extra_isize); 2650 int s_min_extra_isize = le16_to_cpu(sbi->s_es->s_min_extra_isize);
2635 int isize_diff; /* How much do we need to grow i_extra_isize */ 2651 int isize_diff; /* How much do we need to grow i_extra_isize */
2636 int no_expand;
2637
2638 if (ext4_write_trylock_xattr(inode, &no_expand) == 0)
2639 return 0;
2640 2652
2641retry: 2653retry:
2642 isize_diff = new_extra_isize - EXT4_I(inode)->i_extra_isize; 2654 isize_diff = new_extra_isize - EXT4_I(inode)->i_extra_isize;
2643 if (EXT4_I(inode)->i_extra_isize >= new_extra_isize) 2655 if (EXT4_I(inode)->i_extra_isize >= new_extra_isize)
2644 goto out; 2656 return 0;
2645 2657
2646 header = IHDR(inode, raw_inode); 2658 header = IHDR(inode, raw_inode);
2647 2659
@@ -2676,6 +2688,7 @@ retry:
2676 EXT4_ERROR_INODE(inode, "bad block %llu", 2688 EXT4_ERROR_INODE(inode, "bad block %llu",
2677 EXT4_I(inode)->i_file_acl); 2689 EXT4_I(inode)->i_file_acl);
2678 error = -EFSCORRUPTED; 2690 error = -EFSCORRUPTED;
2691 brelse(bh);
2679 goto cleanup; 2692 goto cleanup;
2680 } 2693 }
2681 base = BHDR(bh); 2694 base = BHDR(bh);
@@ -2683,11 +2696,11 @@ retry:
2683 min_offs = end - base; 2696 min_offs = end - base;
2684 bfree = ext4_xattr_free_space(BFIRST(bh), &min_offs, base, 2697 bfree = ext4_xattr_free_space(BFIRST(bh), &min_offs, base,
2685 NULL); 2698 NULL);
2699 brelse(bh);
2686 if (bfree + ifree < isize_diff) { 2700 if (bfree + ifree < isize_diff) {
2687 if (!tried_min_extra_isize && s_min_extra_isize) { 2701 if (!tried_min_extra_isize && s_min_extra_isize) {
2688 tried_min_extra_isize++; 2702 tried_min_extra_isize++;
2689 new_extra_isize = s_min_extra_isize; 2703 new_extra_isize = s_min_extra_isize;
2690 brelse(bh);
2691 goto retry; 2704 goto retry;
2692 } 2705 }
2693 error = -ENOSPC; 2706 error = -ENOSPC;
@@ -2705,7 +2718,6 @@ retry:
2705 s_min_extra_isize) { 2718 s_min_extra_isize) {
2706 tried_min_extra_isize++; 2719 tried_min_extra_isize++;
2707 new_extra_isize = s_min_extra_isize; 2720 new_extra_isize = s_min_extra_isize;
2708 brelse(bh);
2709 goto retry; 2721 goto retry;
2710 } 2722 }
2711 goto cleanup; 2723 goto cleanup;
@@ -2717,18 +2729,13 @@ shift:
2717 EXT4_GOOD_OLD_INODE_SIZE + new_extra_isize, 2729 EXT4_GOOD_OLD_INODE_SIZE + new_extra_isize,
2718 (void *)header, total_ino); 2730 (void *)header, total_ino);
2719 EXT4_I(inode)->i_extra_isize = new_extra_isize; 2731 EXT4_I(inode)->i_extra_isize = new_extra_isize;
2720 brelse(bh);
2721out:
2722 ext4_write_unlock_xattr(inode, &no_expand);
2723 return 0;
2724 2732
2725cleanup: 2733cleanup:
2726 brelse(bh); 2734 if (error && (mnt_count != le16_to_cpu(sbi->s_es->s_mnt_count))) {
2727 /* 2735 ext4_warning(inode->i_sb, "Unable to expand inode %lu. Delete some EAs or run e2fsck.",
2728 * Inode size expansion failed; don't try again 2736 inode->i_ino);
2729 */ 2737 mnt_count = le16_to_cpu(sbi->s_es->s_mnt_count);
2730 no_expand = 1; 2738 }
2731 ext4_write_unlock_xattr(inode, &no_expand);
2732 return error; 2739 return error;
2733} 2740}
2734 2741
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 3ee4fdc3da9e..ab60051be6e5 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -46,7 +46,7 @@ struct fuse_file *fuse_file_alloc(struct fuse_conn *fc)
46{ 46{
47 struct fuse_file *ff; 47 struct fuse_file *ff;
48 48
49 ff = kmalloc(sizeof(struct fuse_file), GFP_KERNEL); 49 ff = kzalloc(sizeof(struct fuse_file), GFP_KERNEL);
50 if (unlikely(!ff)) 50 if (unlikely(!ff))
51 return NULL; 51 return NULL;
52 52
@@ -609,7 +609,7 @@ static void fuse_aio_complete_req(struct fuse_conn *fc, struct fuse_req *req)
609 struct fuse_io_priv *io = req->io; 609 struct fuse_io_priv *io = req->io;
610 ssize_t pos = -1; 610 ssize_t pos = -1;
611 611
612 fuse_release_user_pages(req, !io->write); 612 fuse_release_user_pages(req, io->should_dirty);
613 613
614 if (io->write) { 614 if (io->write) {
615 if (req->misc.write.in.size != req->misc.write.out.size) 615 if (req->misc.write.in.size != req->misc.write.out.size)
@@ -1316,7 +1316,6 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter,
1316 loff_t *ppos, int flags) 1316 loff_t *ppos, int flags)
1317{ 1317{
1318 int write = flags & FUSE_DIO_WRITE; 1318 int write = flags & FUSE_DIO_WRITE;
1319 bool should_dirty = !write && iter_is_iovec(iter);
1320 int cuse = flags & FUSE_DIO_CUSE; 1319 int cuse = flags & FUSE_DIO_CUSE;
1321 struct file *file = io->file; 1320 struct file *file = io->file;
1322 struct inode *inode = file->f_mapping->host; 1321 struct inode *inode = file->f_mapping->host;
@@ -1346,6 +1345,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter,
1346 inode_unlock(inode); 1345 inode_unlock(inode);
1347 } 1346 }
1348 1347
1348 io->should_dirty = !write && iter_is_iovec(iter);
1349 while (count) { 1349 while (count) {
1350 size_t nres; 1350 size_t nres;
1351 fl_owner_t owner = current->files; 1351 fl_owner_t owner = current->files;
@@ -1360,7 +1360,7 @@ ssize_t fuse_direct_io(struct fuse_io_priv *io, struct iov_iter *iter,
1360 nres = fuse_send_read(req, io, pos, nbytes, owner); 1360 nres = fuse_send_read(req, io, pos, nbytes, owner);
1361 1361
1362 if (!io->async) 1362 if (!io->async)
1363 fuse_release_user_pages(req, should_dirty); 1363 fuse_release_user_pages(req, io->should_dirty);
1364 if (req->out.h.error) { 1364 if (req->out.h.error) {
1365 err = req->out.h.error; 1365 err = req->out.h.error;
1366 break; 1366 break;
@@ -1669,6 +1669,7 @@ err_nofile:
1669err_free: 1669err_free:
1670 fuse_request_free(req); 1670 fuse_request_free(req);
1671err: 1671err:
1672 mapping_set_error(page->mapping, error);
1672 end_page_writeback(page); 1673 end_page_writeback(page);
1673 return error; 1674 return error;
1674} 1675}
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 1bd7ffdad593..bd4d2a3e1ec1 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -249,6 +249,7 @@ struct fuse_io_priv {
249 size_t size; 249 size_t size;
250 __u64 offset; 250 __u64 offset;
251 bool write; 251 bool write;
252 bool should_dirty;
252 int err; 253 int err;
253 struct kiocb *iocb; 254 struct kiocb *iocb;
254 struct file *file; 255 struct file *file;
diff --git a/fs/iomap.c b/fs/iomap.c
index 039266128b7f..59cc98ad7577 100644
--- a/fs/iomap.c
+++ b/fs/iomap.c
@@ -278,7 +278,7 @@ iomap_dirty_actor(struct inode *inode, loff_t pos, loff_t length, void *data,
278 unsigned long bytes; /* Bytes to write to page */ 278 unsigned long bytes; /* Bytes to write to page */
279 279
280 offset = (pos & (PAGE_SIZE - 1)); 280 offset = (pos & (PAGE_SIZE - 1));
281 bytes = min_t(unsigned long, PAGE_SIZE - offset, length); 281 bytes = min_t(loff_t, PAGE_SIZE - offset, length);
282 282
283 rpage = __iomap_read_page(inode, pos); 283 rpage = __iomap_read_page(inode, pos);
284 if (IS_ERR(rpage)) 284 if (IS_ERR(rpage))
@@ -373,7 +373,7 @@ iomap_zero_range_actor(struct inode *inode, loff_t pos, loff_t count,
373 unsigned offset, bytes; 373 unsigned offset, bytes;
374 374
375 offset = pos & (PAGE_SIZE - 1); /* Within page */ 375 offset = pos & (PAGE_SIZE - 1); /* Within page */
376 bytes = min_t(unsigned, PAGE_SIZE - offset, count); 376 bytes = min_t(loff_t, PAGE_SIZE - offset, count);
377 377
378 if (IS_DAX(inode)) 378 if (IS_DAX(inode))
379 status = iomap_dax_zero(pos, offset, bytes, iomap); 379 status = iomap_dax_zero(pos, offset, bytes, iomap);
diff --git a/fs/nfs/Kconfig b/fs/nfs/Kconfig
index 69d02cf8cf37..5f93cfacb3d1 100644
--- a/fs/nfs/Kconfig
+++ b/fs/nfs/Kconfig
@@ -121,6 +121,7 @@ config PNFS_FILE_LAYOUT
121config PNFS_BLOCK 121config PNFS_BLOCK
122 tristate 122 tristate
123 depends on NFS_V4_1 && BLK_DEV_DM 123 depends on NFS_V4_1 && BLK_DEV_DM
124 depends on 64BIT || LBDAF
124 default NFS_V4 125 default NFS_V4
125 126
126config PNFS_FLEXFILE_LAYOUT 127config PNFS_FLEXFILE_LAYOUT
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index 6df7a0cf5660..f32c58bbe556 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -32,6 +32,7 @@ void nfs4_ff_layout_free_deviceid(struct nfs4_ff_layout_ds *mirror_ds)
32{ 32{
33 nfs4_print_deviceid(&mirror_ds->id_node.deviceid); 33 nfs4_print_deviceid(&mirror_ds->id_node.deviceid);
34 nfs4_pnfs_ds_put(mirror_ds->ds); 34 nfs4_pnfs_ds_put(mirror_ds->ds);
35 kfree(mirror_ds->ds_versions);
35 kfree_rcu(mirror_ds, id_node.rcu); 36 kfree_rcu(mirror_ds, id_node.rcu);
36} 37}
37 38
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 50566acb5469..e9bea90dc017 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -660,9 +660,6 @@ int nfs4_detect_session_trunking(struct nfs_client *clp,
660 if (!nfs4_check_server_scope(clp->cl_serverscope, res->server_scope)) 660 if (!nfs4_check_server_scope(clp->cl_serverscope, res->server_scope))
661 goto out_err; 661 goto out_err;
662 662
663 /* Session trunking passed, add the xprt */
664 rpc_clnt_xprt_switch_add_xprt(clp->cl_rpcclient, xprt);
665
666 pr_info("NFS: %s: Session trunking succeeded for %s\n", 663 pr_info("NFS: %s: Session trunking succeeded for %s\n",
667 clp->cl_hostname, 664 clp->cl_hostname,
668 xprt->address_strings[RPC_DISPLAY_ADDR]); 665 xprt->address_strings[RPC_DISPLAY_ADDR]);
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 18ca6879d8de..d90132642340 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2553,9 +2553,8 @@ static int nfs41_check_open_stateid(struct nfs4_state *state)
2553 clear_bit(NFS_O_RDWR_STATE, &state->flags); 2553 clear_bit(NFS_O_RDWR_STATE, &state->flags);
2554 clear_bit(NFS_OPEN_STATE, &state->flags); 2554 clear_bit(NFS_OPEN_STATE, &state->flags);
2555 stateid->type = NFS4_INVALID_STATEID_TYPE; 2555 stateid->type = NFS4_INVALID_STATEID_TYPE;
2556 }
2557 if (status != NFS_OK)
2558 return status; 2556 return status;
2557 }
2559 if (nfs_open_stateid_recover_openmode(state)) 2558 if (nfs_open_stateid_recover_openmode(state))
2560 return -NFS4ERR_OPENMODE; 2559 return -NFS4ERR_OPENMODE;
2561 return NFS_OK; 2560 return NFS_OK;
@@ -7461,7 +7460,7 @@ static void nfs4_exchange_id_done(struct rpc_task *task, void *data)
7461 cdata->res.server_scope = NULL; 7460 cdata->res.server_scope = NULL;
7462 } 7461 }
7463 /* Save the EXCHANGE_ID verifier session trunk tests */ 7462 /* Save the EXCHANGE_ID verifier session trunk tests */
7464 memcpy(clp->cl_confirm.data, cdata->args.verifier->data, 7463 memcpy(clp->cl_confirm.data, cdata->args.verifier.data,
7465 sizeof(clp->cl_confirm.data)); 7464 sizeof(clp->cl_confirm.data));
7466 } 7465 }
7467out: 7466out:
@@ -7474,10 +7473,6 @@ static void nfs4_exchange_id_release(void *data)
7474 struct nfs41_exchange_id_data *cdata = 7473 struct nfs41_exchange_id_data *cdata =
7475 (struct nfs41_exchange_id_data *)data; 7474 (struct nfs41_exchange_id_data *)data;
7476 7475
7477 if (cdata->xprt) {
7478 xprt_put(cdata->xprt);
7479 rpc_clnt_xprt_switch_put(cdata->args.client->cl_rpcclient);
7480 }
7481 nfs_put_client(cdata->args.client); 7476 nfs_put_client(cdata->args.client);
7482 kfree(cdata->res.impl_id); 7477 kfree(cdata->res.impl_id);
7483 kfree(cdata->res.server_scope); 7478 kfree(cdata->res.server_scope);
@@ -7498,7 +7493,6 @@ static const struct rpc_call_ops nfs4_exchange_id_call_ops = {
7498static int _nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred, 7493static int _nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred,
7499 u32 sp4_how, struct rpc_xprt *xprt) 7494 u32 sp4_how, struct rpc_xprt *xprt)
7500{ 7495{
7501 nfs4_verifier verifier;
7502 struct rpc_message msg = { 7496 struct rpc_message msg = {
7503 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_EXCHANGE_ID], 7497 .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_EXCHANGE_ID],
7504 .rpc_cred = cred, 7498 .rpc_cred = cred,
@@ -7507,7 +7501,7 @@ static int _nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred,
7507 .rpc_client = clp->cl_rpcclient, 7501 .rpc_client = clp->cl_rpcclient,
7508 .callback_ops = &nfs4_exchange_id_call_ops, 7502 .callback_ops = &nfs4_exchange_id_call_ops,
7509 .rpc_message = &msg, 7503 .rpc_message = &msg,
7510 .flags = RPC_TASK_ASYNC | RPC_TASK_TIMEOUT, 7504 .flags = RPC_TASK_TIMEOUT,
7511 }; 7505 };
7512 struct nfs41_exchange_id_data *calldata; 7506 struct nfs41_exchange_id_data *calldata;
7513 struct rpc_task *task; 7507 struct rpc_task *task;
@@ -7522,8 +7516,7 @@ static int _nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred,
7522 return -ENOMEM; 7516 return -ENOMEM;
7523 } 7517 }
7524 7518
7525 if (!xprt) 7519 nfs4_init_boot_verifier(clp, &calldata->args.verifier);
7526 nfs4_init_boot_verifier(clp, &verifier);
7527 7520
7528 status = nfs4_init_uniform_client_string(clp); 7521 status = nfs4_init_uniform_client_string(clp);
7529 if (status) 7522 if (status)
@@ -7562,11 +7555,9 @@ static int _nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred,
7562 if (xprt) { 7555 if (xprt) {
7563 calldata->xprt = xprt; 7556 calldata->xprt = xprt;
7564 task_setup_data.rpc_xprt = xprt; 7557 task_setup_data.rpc_xprt = xprt;
7565 task_setup_data.flags = 7558 task_setup_data.flags |= RPC_TASK_SOFTCONN;
7566 RPC_TASK_SOFT|RPC_TASK_SOFTCONN|RPC_TASK_ASYNC; 7559 memcpy(calldata->args.verifier.data, clp->cl_confirm.data,
7567 calldata->args.verifier = &clp->cl_confirm; 7560 sizeof(calldata->args.verifier.data));
7568 } else {
7569 calldata->args.verifier = &verifier;
7570 } 7561 }
7571 calldata->args.client = clp; 7562 calldata->args.client = clp;
7572#ifdef CONFIG_NFS_V4_1_MIGRATION 7563#ifdef CONFIG_NFS_V4_1_MIGRATION
@@ -7585,12 +7576,7 @@ static int _nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred,
7585 if (IS_ERR(task)) 7576 if (IS_ERR(task))
7586 return PTR_ERR(task); 7577 return PTR_ERR(task);
7587 7578
7588 if (!xprt) { 7579 status = calldata->rpc_status;
7589 status = rpc_wait_for_completion_task(task);
7590 if (!status)
7591 status = calldata->rpc_status;
7592 } else /* session trunking test */
7593 status = calldata->rpc_status;
7594 7580
7595 rpc_put_task(task); 7581 rpc_put_task(task);
7596out: 7582out:
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index fa3eb361d4f8..37c8af003275 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -1785,7 +1785,7 @@ static void encode_exchange_id(struct xdr_stream *xdr,
1785 int len = 0; 1785 int len = 0;
1786 1786
1787 encode_op_hdr(xdr, OP_EXCHANGE_ID, decode_exchange_id_maxsz, hdr); 1787 encode_op_hdr(xdr, OP_EXCHANGE_ID, decode_exchange_id_maxsz, hdr);
1788 encode_nfs4_verifier(xdr, args->verifier); 1788 encode_nfs4_verifier(xdr, &args->verifier);
1789 1789
1790 encode_string(xdr, strlen(args->client->cl_owner_id), 1790 encode_string(xdr, strlen(args->client->cl_owner_id),
1791 args->client->cl_owner_id); 1791 args->client->cl_owner_id);
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 20fbcab97753..5f940d2a136b 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -144,7 +144,7 @@ static void next_decode_page(struct nfsd4_compoundargs *argp)
144 argp->p = page_address(argp->pagelist[0]); 144 argp->p = page_address(argp->pagelist[0]);
145 argp->pagelist++; 145 argp->pagelist++;
146 if (argp->pagelen < PAGE_SIZE) { 146 if (argp->pagelen < PAGE_SIZE) {
147 argp->end = argp->p + (argp->pagelen>>2); 147 argp->end = argp->p + XDR_QUADLEN(argp->pagelen);
148 argp->pagelen = 0; 148 argp->pagelen = 0;
149 } else { 149 } else {
150 argp->end = argp->p + (PAGE_SIZE>>2); 150 argp->end = argp->p + (PAGE_SIZE>>2);
@@ -1279,9 +1279,7 @@ nfsd4_decode_write(struct nfsd4_compoundargs *argp, struct nfsd4_write *write)
1279 argp->pagelen -= pages * PAGE_SIZE; 1279 argp->pagelen -= pages * PAGE_SIZE;
1280 len -= pages * PAGE_SIZE; 1280 len -= pages * PAGE_SIZE;
1281 1281
1282 argp->p = (__be32 *)page_address(argp->pagelist[0]); 1282 next_decode_page(argp);
1283 argp->pagelist++;
1284 argp->end = argp->p + XDR_QUADLEN(PAGE_SIZE);
1285 } 1283 }
1286 argp->p += XDR_QUADLEN(len); 1284 argp->p += XDR_QUADLEN(len);
1287 1285
diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c
index dc22ba8c710f..e50a387959bf 100644
--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -240,18 +240,6 @@ int ocfs2_set_acl(handle_t *handle,
240 switch (type) { 240 switch (type) {
241 case ACL_TYPE_ACCESS: 241 case ACL_TYPE_ACCESS:
242 name_index = OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS; 242 name_index = OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS;
243 if (acl) {
244 umode_t mode;
245
246 ret = posix_acl_update_mode(inode, &mode, &acl);
247 if (ret)
248 return ret;
249
250 ret = ocfs2_acl_set_mode(inode, di_bh,
251 handle, mode);
252 if (ret)
253 return ret;
254 }
255 break; 243 break;
256 case ACL_TYPE_DEFAULT: 244 case ACL_TYPE_DEFAULT:
257 name_index = OCFS2_XATTR_INDEX_POSIX_ACL_DEFAULT; 245 name_index = OCFS2_XATTR_INDEX_POSIX_ACL_DEFAULT;
@@ -289,7 +277,19 @@ int ocfs2_iop_set_acl(struct inode *inode, struct posix_acl *acl, int type)
289 had_lock = ocfs2_inode_lock_tracker(inode, &bh, 1, &oh); 277 had_lock = ocfs2_inode_lock_tracker(inode, &bh, 1, &oh);
290 if (had_lock < 0) 278 if (had_lock < 0)
291 return had_lock; 279 return had_lock;
280 if (type == ACL_TYPE_ACCESS && acl) {
281 umode_t mode;
282
283 status = posix_acl_update_mode(inode, &mode, &acl);
284 if (status)
285 goto unlock;
286
287 status = ocfs2_acl_set_mode(inode, bh, NULL, mode);
288 if (status)
289 goto unlock;
290 }
292 status = ocfs2_set_acl(NULL, inode, bh, type, acl, NULL, NULL); 291 status = ocfs2_set_acl(NULL, inode, bh, type, acl, NULL, NULL);
292unlock:
293 ocfs2_inode_unlock_tracker(inode, 1, &oh, had_lock); 293 ocfs2_inode_unlock_tracker(inode, 1, &oh, had_lock);
294 brelse(bh); 294 brelse(bh);
295 return status; 295 return status;
diff --git a/fs/proc/meminfo.c b/fs/proc/meminfo.c
index 8a428498d6b2..509a61668d90 100644
--- a/fs/proc/meminfo.c
+++ b/fs/proc/meminfo.c
@@ -106,13 +106,13 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
106 global_node_page_state(NR_FILE_MAPPED)); 106 global_node_page_state(NR_FILE_MAPPED));
107 show_val_kb(m, "Shmem: ", i.sharedram); 107 show_val_kb(m, "Shmem: ", i.sharedram);
108 show_val_kb(m, "Slab: ", 108 show_val_kb(m, "Slab: ",
109 global_page_state(NR_SLAB_RECLAIMABLE) + 109 global_node_page_state(NR_SLAB_RECLAIMABLE) +
110 global_page_state(NR_SLAB_UNRECLAIMABLE)); 110 global_node_page_state(NR_SLAB_UNRECLAIMABLE));
111 111
112 show_val_kb(m, "SReclaimable: ", 112 show_val_kb(m, "SReclaimable: ",
113 global_page_state(NR_SLAB_RECLAIMABLE)); 113 global_node_page_state(NR_SLAB_RECLAIMABLE));
114 show_val_kb(m, "SUnreclaim: ", 114 show_val_kb(m, "SUnreclaim: ",
115 global_page_state(NR_SLAB_UNRECLAIMABLE)); 115 global_node_page_state(NR_SLAB_UNRECLAIMABLE));
116 seq_printf(m, "KernelStack: %8lu kB\n", 116 seq_printf(m, "KernelStack: %8lu kB\n",
117 global_page_state(NR_KERNEL_STACK_KB)); 117 global_page_state(NR_KERNEL_STACK_KB));
118 show_val_kb(m, "PageTables: ", 118 show_val_kb(m, "PageTables: ",
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index b836fd61ed87..fe8f3265e877 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -16,9 +16,10 @@
16#include <linux/mmu_notifier.h> 16#include <linux/mmu_notifier.h>
17#include <linux/page_idle.h> 17#include <linux/page_idle.h>
18#include <linux/shmem_fs.h> 18#include <linux/shmem_fs.h>
19#include <linux/uaccess.h>
19 20
20#include <asm/elf.h> 21#include <asm/elf.h>
21#include <linux/uaccess.h> 22#include <asm/tlb.h>
22#include <asm/tlbflush.h> 23#include <asm/tlbflush.h>
23#include "internal.h" 24#include "internal.h"
24 25
@@ -1008,6 +1009,7 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
1008 struct mm_struct *mm; 1009 struct mm_struct *mm;
1009 struct vm_area_struct *vma; 1010 struct vm_area_struct *vma;
1010 enum clear_refs_types type; 1011 enum clear_refs_types type;
1012 struct mmu_gather tlb;
1011 int itype; 1013 int itype;
1012 int rv; 1014 int rv;
1013 1015
@@ -1054,6 +1056,7 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
1054 } 1056 }
1055 1057
1056 down_read(&mm->mmap_sem); 1058 down_read(&mm->mmap_sem);
1059 tlb_gather_mmu(&tlb, mm, 0, -1);
1057 if (type == CLEAR_REFS_SOFT_DIRTY) { 1060 if (type == CLEAR_REFS_SOFT_DIRTY) {
1058 for (vma = mm->mmap; vma; vma = vma->vm_next) { 1061 for (vma = mm->mmap; vma; vma = vma->vm_next) {
1059 if (!(vma->vm_flags & VM_SOFTDIRTY)) 1062 if (!(vma->vm_flags & VM_SOFTDIRTY))
@@ -1075,7 +1078,7 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf,
1075 walk_page_range(0, mm->highest_vm_end, &clear_refs_walk); 1078 walk_page_range(0, mm->highest_vm_end, &clear_refs_walk);
1076 if (type == CLEAR_REFS_SOFT_DIRTY) 1079 if (type == CLEAR_REFS_SOFT_DIRTY)
1077 mmu_notifier_invalidate_range_end(mm, 0, -1); 1080 mmu_notifier_invalidate_range_end(mm, 0, -1);
1078 flush_tlb_mm(mm); 1081 tlb_finish_mmu(&tlb, 0, -1);
1079 up_read(&mm->mmap_sem); 1082 up_read(&mm->mmap_sem);
1080out_mm: 1083out_mm:
1081 mmput(mm); 1084 mmput(mm);
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 53a17496c5c5..566e6ef99f07 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -1124,6 +1124,10 @@ void dquot_free_reserved_space(struct dquot *dquot, qsize_t number)
1124 WARN_ON_ONCE(1); 1124 WARN_ON_ONCE(1);
1125 dquot->dq_dqb.dqb_rsvspace = 0; 1125 dquot->dq_dqb.dqb_rsvspace = 0;
1126 } 1126 }
1127 if (dquot->dq_dqb.dqb_curspace + dquot->dq_dqb.dqb_rsvspace <=
1128 dquot->dq_dqb.dqb_bsoftlimit)
1129 dquot->dq_dqb.dqb_btime = (time64_t) 0;
1130 clear_bit(DQ_BLKS_B, &dquot->dq_flags);
1127} 1131}
1128 1132
1129static void dquot_decr_inodes(struct dquot *dquot, qsize_t number) 1133static void dquot_decr_inodes(struct dquot *dquot, qsize_t number)
@@ -1145,7 +1149,8 @@ static void dquot_decr_space(struct dquot *dquot, qsize_t number)
1145 dquot->dq_dqb.dqb_curspace -= number; 1149 dquot->dq_dqb.dqb_curspace -= number;
1146 else 1150 else
1147 dquot->dq_dqb.dqb_curspace = 0; 1151 dquot->dq_dqb.dqb_curspace = 0;
1148 if (dquot->dq_dqb.dqb_curspace <= dquot->dq_dqb.dqb_bsoftlimit) 1152 if (dquot->dq_dqb.dqb_curspace + dquot->dq_dqb.dqb_rsvspace <=
1153 dquot->dq_dqb.dqb_bsoftlimit)
1149 dquot->dq_dqb.dqb_btime = (time64_t) 0; 1154 dquot->dq_dqb.dqb_btime = (time64_t) 0;
1150 clear_bit(DQ_BLKS_B, &dquot->dq_flags); 1155 clear_bit(DQ_BLKS_B, &dquot->dq_flags);
1151} 1156}
@@ -1381,14 +1386,18 @@ static int info_idq_free(struct dquot *dquot, qsize_t inodes)
1381 1386
1382static int info_bdq_free(struct dquot *dquot, qsize_t space) 1387static int info_bdq_free(struct dquot *dquot, qsize_t space)
1383{ 1388{
1389 qsize_t tspace;
1390
1391 tspace = dquot->dq_dqb.dqb_curspace + dquot->dq_dqb.dqb_rsvspace;
1392
1384 if (test_bit(DQ_FAKE_B, &dquot->dq_flags) || 1393 if (test_bit(DQ_FAKE_B, &dquot->dq_flags) ||
1385 dquot->dq_dqb.dqb_curspace <= dquot->dq_dqb.dqb_bsoftlimit) 1394 tspace <= dquot->dq_dqb.dqb_bsoftlimit)
1386 return QUOTA_NL_NOWARN; 1395 return QUOTA_NL_NOWARN;
1387 1396
1388 if (dquot->dq_dqb.dqb_curspace - space <= dquot->dq_dqb.dqb_bsoftlimit) 1397 if (tspace - space <= dquot->dq_dqb.dqb_bsoftlimit)
1389 return QUOTA_NL_BSOFTBELOW; 1398 return QUOTA_NL_BSOFTBELOW;
1390 if (dquot->dq_dqb.dqb_curspace >= dquot->dq_dqb.dqb_bhardlimit && 1399 if (tspace >= dquot->dq_dqb.dqb_bhardlimit &&
1391 dquot->dq_dqb.dqb_curspace - space < dquot->dq_dqb.dqb_bhardlimit) 1400 tspace - space < dquot->dq_dqb.dqb_bhardlimit)
1392 return QUOTA_NL_BHARDBELOW; 1401 return QUOTA_NL_BHARDBELOW;
1393 return QUOTA_NL_NOWARN; 1402 return QUOTA_NL_NOWARN;
1394} 1403}
@@ -2681,7 +2690,7 @@ static int do_set_dqblk(struct dquot *dquot, struct qc_dqblk *di)
2681 2690
2682 if (check_blim) { 2691 if (check_blim) {
2683 if (!dm->dqb_bsoftlimit || 2692 if (!dm->dqb_bsoftlimit ||
2684 dm->dqb_curspace < dm->dqb_bsoftlimit) { 2693 dm->dqb_curspace + dm->dqb_rsvspace < dm->dqb_bsoftlimit) {
2685 dm->dqb_btime = 0; 2694 dm->dqb_btime = 0;
2686 clear_bit(DQ_BLKS_B, &dquot->dq_flags); 2695 clear_bit(DQ_BLKS_B, &dquot->dq_flags);
2687 } else if (!(di->d_fieldmask & QC_SPC_TIMER)) 2696 } else if (!(di->d_fieldmask & QC_SPC_TIMER))
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index cadcd12a3d35..b0d5897bc4e6 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -854,6 +854,9 @@ wakeup:
854 __wake_up_locked_key(&ctx->fault_wqh, TASK_NORMAL, &range); 854 __wake_up_locked_key(&ctx->fault_wqh, TASK_NORMAL, &range);
855 spin_unlock(&ctx->fault_pending_wqh.lock); 855 spin_unlock(&ctx->fault_pending_wqh.lock);
856 856
857 /* Flush pending events that may still wait on event_wqh */
858 wake_up_all(&ctx->event_wqh);
859
857 wake_up_poll(&ctx->fd_wqh, POLLHUP); 860 wake_up_poll(&ctx->fd_wqh, POLLHUP);
858 userfaultfd_ctx_put(ctx); 861 userfaultfd_ctx_put(ctx);
859 return 0; 862 return 0;
@@ -1597,7 +1600,7 @@ static int userfaultfd_copy(struct userfaultfd_ctx *ctx,
1597 uffdio_copy.len); 1600 uffdio_copy.len);
1598 mmput(ctx->mm); 1601 mmput(ctx->mm);
1599 } else { 1602 } else {
1600 return -ENOSPC; 1603 return -ESRCH;
1601 } 1604 }
1602 if (unlikely(put_user(ret, &user_uffdio_copy->copy))) 1605 if (unlikely(put_user(ret, &user_uffdio_copy->copy)))
1603 return -EFAULT; 1606 return -EFAULT;
@@ -1643,6 +1646,8 @@ static int userfaultfd_zeropage(struct userfaultfd_ctx *ctx,
1643 ret = mfill_zeropage(ctx->mm, uffdio_zeropage.range.start, 1646 ret = mfill_zeropage(ctx->mm, uffdio_zeropage.range.start,
1644 uffdio_zeropage.range.len); 1647 uffdio_zeropage.range.len);
1645 mmput(ctx->mm); 1648 mmput(ctx->mm);
1649 } else {
1650 return -ESRCH;
1646 } 1651 }
1647 if (unlikely(put_user(ret, &user_uffdio_zeropage->zeropage))) 1652 if (unlikely(put_user(ret, &user_uffdio_zeropage->zeropage)))
1648 return -EFAULT; 1653 return -EFAULT;
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index ffd5a15d1bb6..abf5beaae907 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -1246,13 +1246,13 @@ xfs_dialloc_ag_inobt(
1246 1246
1247 /* free inodes to the left? */ 1247 /* free inodes to the left? */
1248 if (useleft && trec.ir_freecount) { 1248 if (useleft && trec.ir_freecount) {
1249 rec = trec;
1250 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR); 1249 xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR);
1251 cur = tcur; 1250 cur = tcur;
1252 1251
1253 pag->pagl_leftrec = trec.ir_startino; 1252 pag->pagl_leftrec = trec.ir_startino;
1254 pag->pagl_rightrec = rec.ir_startino; 1253 pag->pagl_rightrec = rec.ir_startino;
1255 pag->pagl_pagino = pagino; 1254 pag->pagl_pagino = pagino;
1255 rec = trec;
1256 goto alloc_inode; 1256 goto alloc_inode;
1257 } 1257 }
1258 1258
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index ceef77c0416a..ff48f0096810 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -874,7 +874,6 @@ xfs_ialloc(
874 case S_IFREG: 874 case S_IFREG:
875 case S_IFDIR: 875 case S_IFDIR:
876 if (pip && (pip->i_d.di_flags & XFS_DIFLAG_ANY)) { 876 if (pip && (pip->i_d.di_flags & XFS_DIFLAG_ANY)) {
877 uint64_t di_flags2 = 0;
878 uint di_flags = 0; 877 uint di_flags = 0;
879 878
880 if (S_ISDIR(mode)) { 879 if (S_ISDIR(mode)) {
@@ -911,20 +910,23 @@ xfs_ialloc(
911 di_flags |= XFS_DIFLAG_NODEFRAG; 910 di_flags |= XFS_DIFLAG_NODEFRAG;
912 if (pip->i_d.di_flags & XFS_DIFLAG_FILESTREAM) 911 if (pip->i_d.di_flags & XFS_DIFLAG_FILESTREAM)
913 di_flags |= XFS_DIFLAG_FILESTREAM; 912 di_flags |= XFS_DIFLAG_FILESTREAM;
914 if (pip->i_d.di_flags2 & XFS_DIFLAG2_DAX)
915 di_flags2 |= XFS_DIFLAG2_DAX;
916 913
917 ip->i_d.di_flags |= di_flags; 914 ip->i_d.di_flags |= di_flags;
918 ip->i_d.di_flags2 |= di_flags2;
919 } 915 }
920 if (pip && 916 if (pip &&
921 (pip->i_d.di_flags2 & XFS_DIFLAG2_ANY) && 917 (pip->i_d.di_flags2 & XFS_DIFLAG2_ANY) &&
922 pip->i_d.di_version == 3 && 918 pip->i_d.di_version == 3 &&
923 ip->i_d.di_version == 3) { 919 ip->i_d.di_version == 3) {
920 uint64_t di_flags2 = 0;
921
924 if (pip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE) { 922 if (pip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE) {
925 ip->i_d.di_flags2 |= XFS_DIFLAG2_COWEXTSIZE; 923 di_flags2 |= XFS_DIFLAG2_COWEXTSIZE;
926 ip->i_d.di_cowextsize = pip->i_d.di_cowextsize; 924 ip->i_d.di_cowextsize = pip->i_d.di_cowextsize;
927 } 925 }
926 if (pip->i_d.di_flags2 & XFS_DIFLAG2_DAX)
927 di_flags2 |= XFS_DIFLAG2_DAX;
928
929 ip->i_d.di_flags2 |= di_flags2;
928 } 930 }
929 /* FALLTHROUGH */ 931 /* FALLTHROUGH */
930 case S_IFLNK: 932 case S_IFLNK:
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 0053bcf2b10a..4ebd0bafc914 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -749,9 +749,20 @@ xfs_log_mount_finish(
749 return 0; 749 return 0;
750 } 750 }
751 751
752 /*
753 * During the second phase of log recovery, we need iget and
754 * iput to behave like they do for an active filesystem.
755 * xfs_fs_drop_inode needs to be able to prevent the deletion
756 * of inodes before we're done replaying log items on those
757 * inodes. Turn it off immediately after recovery finishes
758 * so that we don't leak the quota inodes if subsequent mount
759 * activities fail.
760 */
761 mp->m_super->s_flags |= MS_ACTIVE;
752 error = xlog_recover_finish(mp->m_log); 762 error = xlog_recover_finish(mp->m_log);
753 if (!error) 763 if (!error)
754 xfs_log_work_queue(mp); 764 xfs_log_work_queue(mp);
765 mp->m_super->s_flags &= ~MS_ACTIVE;
755 766
756 return error; 767 return error;
757} 768}
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c
index fbe72b134bef..43aa42a3a5d3 100644
--- a/fs/xfs/xfs_log_cil.c
+++ b/fs/xfs/xfs_log_cil.c
@@ -539,6 +539,7 @@ xlog_discard_endio(
539 539
540 INIT_WORK(&ctx->discard_endio_work, xlog_discard_endio_work); 540 INIT_WORK(&ctx->discard_endio_work, xlog_discard_endio_work);
541 queue_work(xfs_discard_wq, &ctx->discard_endio_work); 541 queue_work(xfs_discard_wq, &ctx->discard_endio_work);
542 bio_put(bio);
542} 543}
543 544
544static void 545static void
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 40d4e8b4e193..ea7d4b4e50d0 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -945,15 +945,6 @@ xfs_mountfs(
945 } 945 }
946 946
947 /* 947 /*
948 * During the second phase of log recovery, we need iget and
949 * iput to behave like they do for an active filesystem.
950 * xfs_fs_drop_inode needs to be able to prevent the deletion
951 * of inodes before we're done replaying log items on those
952 * inodes.
953 */
954 mp->m_super->s_flags |= MS_ACTIVE;
955
956 /*
957 * Finish recovering the file system. This part needed to be delayed 948 * Finish recovering the file system. This part needed to be delayed
958 * until after the root and real-time bitmap inodes were consistently 949 * until after the root and real-time bitmap inodes were consistently
959 * read in. 950 * read in.
@@ -1028,12 +1019,13 @@ xfs_mountfs(
1028 out_quota: 1019 out_quota:
1029 xfs_qm_unmount_quotas(mp); 1020 xfs_qm_unmount_quotas(mp);
1030 out_rtunmount: 1021 out_rtunmount:
1031 mp->m_super->s_flags &= ~MS_ACTIVE;
1032 xfs_rtunmount_inodes(mp); 1022 xfs_rtunmount_inodes(mp);
1033 out_rele_rip: 1023 out_rele_rip:
1034 IRELE(rip); 1024 IRELE(rip);
1035 cancel_delayed_work_sync(&mp->m_reclaim_work); 1025 cancel_delayed_work_sync(&mp->m_reclaim_work);
1036 xfs_reclaim_inodes(mp, SYNC_WAIT); 1026 xfs_reclaim_inodes(mp, SYNC_WAIT);
1027 /* Clean out dquots that might be in memory after quotacheck. */
1028 xfs_qm_unmount(mp);
1037 out_log_dealloc: 1029 out_log_dealloc:
1038 mp->m_flags |= XFS_MOUNT_UNMOUNTING; 1030 mp->m_flags |= XFS_MOUNT_UNMOUNTING;
1039 xfs_log_mount_cancel(mp); 1031 xfs_log_mount_cancel(mp);
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h
index 8afa4335e5b2..faddde44de8c 100644
--- a/include/asm-generic/tlb.h
+++ b/include/asm-generic/tlb.h
@@ -112,10 +112,11 @@ struct mmu_gather {
112 112
113#define HAVE_GENERIC_MMU_GATHER 113#define HAVE_GENERIC_MMU_GATHER
114 114
115void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end); 115void arch_tlb_gather_mmu(struct mmu_gather *tlb,
116 struct mm_struct *mm, unsigned long start, unsigned long end);
116void tlb_flush_mmu(struct mmu_gather *tlb); 117void tlb_flush_mmu(struct mmu_gather *tlb);
117void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, 118void arch_tlb_finish_mmu(struct mmu_gather *tlb,
118 unsigned long end); 119 unsigned long start, unsigned long end, bool force);
119extern bool __tlb_remove_page_size(struct mmu_gather *tlb, struct page *page, 120extern bool __tlb_remove_page_size(struct mmu_gather *tlb, struct page *page,
120 int page_size); 121 int page_size);
121 122
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index da0be9a8d1de..9623d78f8494 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -60,6 +60,22 @@
60#define ALIGN_FUNCTION() . = ALIGN(8) 60#define ALIGN_FUNCTION() . = ALIGN(8)
61 61
62/* 62/*
63 * LD_DEAD_CODE_DATA_ELIMINATION option enables -fdata-sections, which
64 * generates .data.identifier sections, which need to be pulled in with
65 * .data. We don't want to pull in .data..other sections, which Linux
66 * has defined. Same for text and bss.
67 */
68#ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION
69#define TEXT_MAIN .text .text.[0-9a-zA-Z_]*
70#define DATA_MAIN .data .data.[0-9a-zA-Z_]*
71#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]*
72#else
73#define TEXT_MAIN .text
74#define DATA_MAIN .data
75#define BSS_MAIN .bss
76#endif
77
78/*
63 * Align to a 32 byte boundary equal to the 79 * Align to a 32 byte boundary equal to the
64 * alignment gcc 4.5 uses for a struct 80 * alignment gcc 4.5 uses for a struct
65 */ 81 */
@@ -198,12 +214,9 @@
198 214
199/* 215/*
200 * .data section 216 * .data section
201 * LD_DEAD_CODE_DATA_ELIMINATION option enables -fdata-sections generates
202 * .data.identifier which needs to be pulled in with .data, but don't want to
203 * pull in .data..stuff which has its own requirements. Same for bss.
204 */ 217 */
205#define DATA_DATA \ 218#define DATA_DATA \
206 *(.data .data.[0-9a-zA-Z_]*) \ 219 *(DATA_MAIN) \
207 *(.ref.data) \ 220 *(.ref.data) \
208 *(.data..shared_aligned) /* percpu related */ \ 221 *(.data..shared_aligned) /* percpu related */ \
209 MEM_KEEP(init.data) \ 222 MEM_KEEP(init.data) \
@@ -434,16 +447,17 @@
434 VMLINUX_SYMBOL(__security_initcall_end) = .; \ 447 VMLINUX_SYMBOL(__security_initcall_end) = .; \
435 } 448 }
436 449
437/* .text section. Map to function alignment to avoid address changes 450/*
451 * .text section. Map to function alignment to avoid address changes
438 * during second ld run in second ld pass when generating System.map 452 * during second ld run in second ld pass when generating System.map
439 * LD_DEAD_CODE_DATA_ELIMINATION option enables -ffunction-sections generates 453 *
440 * .text.identifier which needs to be pulled in with .text , but some 454 * TEXT_MAIN here will match .text.fixup and .text.unlikely if dead
441 * architectures define .text.foo which is not intended to be pulled in here. 455 * code elimination is enabled, so these sections should be converted
442 * Those enabling LD_DEAD_CODE_DATA_ELIMINATION must ensure they don't have 456 * to use ".." first.
443 * conflicting section names, and must pull in .text.[0-9a-zA-Z_]* */ 457 */
444#define TEXT_TEXT \ 458#define TEXT_TEXT \
445 ALIGN_FUNCTION(); \ 459 ALIGN_FUNCTION(); \
446 *(.text.hot .text .text.fixup .text.unlikely) \ 460 *(.text.hot TEXT_MAIN .text.fixup .text.unlikely) \
447 *(.ref.text) \ 461 *(.ref.text) \
448 MEM_KEEP(init.text) \ 462 MEM_KEEP(init.text) \
449 MEM_KEEP(exit.text) \ 463 MEM_KEEP(exit.text) \
@@ -613,7 +627,7 @@
613 BSS_FIRST_SECTIONS \ 627 BSS_FIRST_SECTIONS \
614 *(.bss..page_aligned) \ 628 *(.bss..page_aligned) \
615 *(.dynbss) \ 629 *(.dynbss) \
616 *(.bss .bss.[0-9a-zA-Z_]*) \ 630 *(BSS_MAIN) \
617 *(COMMON) \ 631 *(COMMON) \
618 } 632 }
619 633
diff --git a/include/kvm/arm_pmu.h b/include/kvm/arm_pmu.h
index f6e030617467..f87fe20fcb05 100644
--- a/include/kvm/arm_pmu.h
+++ b/include/kvm/arm_pmu.h
@@ -48,7 +48,6 @@ void kvm_pmu_vcpu_reset(struct kvm_vcpu *vcpu);
48void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu); 48void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu);
49void kvm_pmu_disable_counter(struct kvm_vcpu *vcpu, u64 val); 49void kvm_pmu_disable_counter(struct kvm_vcpu *vcpu, u64 val);
50void kvm_pmu_enable_counter(struct kvm_vcpu *vcpu, u64 val); 50void kvm_pmu_enable_counter(struct kvm_vcpu *vcpu, u64 val);
51void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val);
52void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu); 51void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu);
53void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu); 52void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu);
54bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu); 53bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu);
@@ -86,7 +85,6 @@ static inline void kvm_pmu_vcpu_reset(struct kvm_vcpu *vcpu) {}
86static inline void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu) {} 85static inline void kvm_pmu_vcpu_destroy(struct kvm_vcpu *vcpu) {}
87static inline void kvm_pmu_disable_counter(struct kvm_vcpu *vcpu, u64 val) {} 86static inline void kvm_pmu_disable_counter(struct kvm_vcpu *vcpu, u64 val) {}
88static inline void kvm_pmu_enable_counter(struct kvm_vcpu *vcpu, u64 val) {} 87static inline void kvm_pmu_enable_counter(struct kvm_vcpu *vcpu, u64 val) {}
89static inline void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val) {}
90static inline void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu) {} 88static inline void kvm_pmu_flush_hwstate(struct kvm_vcpu *vcpu) {}
91static inline void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu) {} 89static inline void kvm_pmu_sync_hwstate(struct kvm_vcpu *vcpu) {}
92static inline bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu) 90static inline bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu)
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index c749eef1daa1..27b4b6615263 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1209,6 +1209,7 @@ static inline bool acpi_has_watchdog(void) { return false; }
1209#endif 1209#endif
1210 1210
1211#ifdef CONFIG_ACPI_SPCR_TABLE 1211#ifdef CONFIG_ACPI_SPCR_TABLE
1212extern bool qdf2400_e44_present;
1212int parse_spcr(bool earlycon); 1213int parse_spcr(bool earlycon);
1213#else 1214#else
1214static inline int parse_spcr(bool earlycon) { return 0; } 1215static inline int parse_spcr(bool earlycon) { return 0; }
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 25f6a0cb27d3..2a5d52fa90f5 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -568,7 +568,6 @@ struct request_queue {
568 568
569#if defined(CONFIG_BLK_DEV_BSG) 569#if defined(CONFIG_BLK_DEV_BSG)
570 bsg_job_fn *bsg_job_fn; 570 bsg_job_fn *bsg_job_fn;
571 int bsg_job_size;
572 struct bsg_class_device bsg_dev; 571 struct bsg_class_device bsg_dev;
573#endif 572#endif
574 573
diff --git a/include/linux/bsg-lib.h b/include/linux/bsg-lib.h
index e34dde2da0ef..637a20cfb237 100644
--- a/include/linux/bsg-lib.h
+++ b/include/linux/bsg-lib.h
@@ -24,6 +24,7 @@
24#define _BLK_BSG_ 24#define _BLK_BSG_
25 25
26#include <linux/blkdev.h> 26#include <linux/blkdev.h>
27#include <scsi/scsi_request.h>
27 28
28struct request; 29struct request;
29struct device; 30struct device;
@@ -37,6 +38,7 @@ struct bsg_buffer {
37}; 38};
38 39
39struct bsg_job { 40struct bsg_job {
41 struct scsi_request sreq;
40 struct device *dev; 42 struct device *dev;
41 struct request *req; 43 struct request *req;
42 44
diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
index c6d96a5f46fd..adf670ecaf94 100644
--- a/include/linux/ceph/osd_client.h
+++ b/include/linux/ceph/osd_client.h
@@ -148,6 +148,7 @@ struct ceph_osd_request_target {
148 int size; 148 int size;
149 int min_size; 149 int min_size;
150 bool sort_bitwise; 150 bool sort_bitwise;
151 bool recovery_deletes;
151 152
152 unsigned int flags; /* CEPH_OSD_FLAG_* */ 153 unsigned int flags; /* CEPH_OSD_FLAG_* */
153 bool paused; 154 bool paused;
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h
index a0996cb9faed..af3444a5bfdd 100644
--- a/include/linux/ceph/osdmap.h
+++ b/include/linux/ceph/osdmap.h
@@ -272,6 +272,8 @@ bool ceph_is_new_interval(const struct ceph_osds *old_acting,
272 u32 new_pg_num, 272 u32 new_pg_num,
273 bool old_sort_bitwise, 273 bool old_sort_bitwise,
274 bool new_sort_bitwise, 274 bool new_sort_bitwise,
275 bool old_recovery_deletes,
276 bool new_recovery_deletes,
275 const struct ceph_pg *pgid); 277 const struct ceph_pg *pgid);
276bool ceph_osds_changed(const struct ceph_osds *old_acting, 278bool ceph_osds_changed(const struct ceph_osds *old_acting,
277 const struct ceph_osds *new_acting, 279 const struct ceph_osds *new_acting,
diff --git a/include/linux/ceph/rados.h b/include/linux/ceph/rados.h
index 385db08bb8b2..b8281feda9c7 100644
--- a/include/linux/ceph/rados.h
+++ b/include/linux/ceph/rados.h
@@ -158,6 +158,10 @@ extern const char *ceph_osd_state_name(int s);
158#define CEPH_OSDMAP_NOTIERAGENT (1<<13) /* disable tiering agent */ 158#define CEPH_OSDMAP_NOTIERAGENT (1<<13) /* disable tiering agent */
159#define CEPH_OSDMAP_NOREBALANCE (1<<14) /* block osd backfill unless pg is degraded */ 159#define CEPH_OSDMAP_NOREBALANCE (1<<14) /* block osd backfill unless pg is degraded */
160#define CEPH_OSDMAP_SORTBITWISE (1<<15) /* use bitwise hobject_t sort */ 160#define CEPH_OSDMAP_SORTBITWISE (1<<15) /* use bitwise hobject_t sort */
161#define CEPH_OSDMAP_REQUIRE_JEWEL (1<<16) /* require jewel for booting osds */
162#define CEPH_OSDMAP_REQUIRE_KRAKEN (1<<17) /* require kraken for booting osds */
163#define CEPH_OSDMAP_REQUIRE_LUMINOUS (1<<18) /* require l for booting osds */
164#define CEPH_OSDMAP_RECOVERY_DELETES (1<<19) /* deletes performed during recovery instead of peering */
161 165
162/* 166/*
163 * The error code to return when an OSD can't handle a write 167 * The error code to return when an OSD can't handle a write
diff --git a/include/linux/cpuhotplug.h b/include/linux/cpuhotplug.h
index b56573bf440d..82b30e638430 100644
--- a/include/linux/cpuhotplug.h
+++ b/include/linux/cpuhotplug.h
@@ -39,8 +39,6 @@ enum cpuhp_state {
39 CPUHP_PCI_XGENE_DEAD, 39 CPUHP_PCI_XGENE_DEAD,
40 CPUHP_IOMMU_INTEL_DEAD, 40 CPUHP_IOMMU_INTEL_DEAD,
41 CPUHP_LUSTRE_CFS_DEAD, 41 CPUHP_LUSTRE_CFS_DEAD,
42 CPUHP_SCSI_BNX2FC_DEAD,
43 CPUHP_SCSI_BNX2I_DEAD,
44 CPUHP_WORKQUEUE_PREP, 42 CPUHP_WORKQUEUE_PREP,
45 CPUHP_POWER_NUMA_PREPARE, 43 CPUHP_POWER_NUMA_PREPARE,
46 CPUHP_HRTIMERS_PREPARE, 44 CPUHP_HRTIMERS_PREPARE,
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index 119a3f9604b0..898cfe2eeb42 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -18,6 +18,19 @@
18 18
19#ifdef CONFIG_CPUSETS 19#ifdef CONFIG_CPUSETS
20 20
21/*
22 * Static branch rewrites can happen in an arbitrary order for a given
23 * key. In code paths where we need to loop with read_mems_allowed_begin() and
24 * read_mems_allowed_retry() to get a consistent view of mems_allowed, we need
25 * to ensure that begin() always gets rewritten before retry() in the
26 * disabled -> enabled transition. If not, then if local irqs are disabled
27 * around the loop, we can deadlock since retry() would always be
28 * comparing the latest value of the mems_allowed seqcount against 0 as
29 * begin() still would see cpusets_enabled() as false. The enabled -> disabled
30 * transition should happen in reverse order for the same reasons (want to stop
31 * looking at real value of mems_allowed.sequence in retry() first).
32 */
33extern struct static_key_false cpusets_pre_enable_key;
21extern struct static_key_false cpusets_enabled_key; 34extern struct static_key_false cpusets_enabled_key;
22static inline bool cpusets_enabled(void) 35static inline bool cpusets_enabled(void)
23{ 36{
@@ -32,12 +45,14 @@ static inline int nr_cpusets(void)
32 45
33static inline void cpuset_inc(void) 46static inline void cpuset_inc(void)
34{ 47{
48 static_branch_inc(&cpusets_pre_enable_key);
35 static_branch_inc(&cpusets_enabled_key); 49 static_branch_inc(&cpusets_enabled_key);
36} 50}
37 51
38static inline void cpuset_dec(void) 52static inline void cpuset_dec(void)
39{ 53{
40 static_branch_dec(&cpusets_enabled_key); 54 static_branch_dec(&cpusets_enabled_key);
55 static_branch_dec(&cpusets_pre_enable_key);
41} 56}
42 57
43extern int cpuset_init(void); 58extern int cpuset_init(void);
@@ -115,7 +130,7 @@ extern void cpuset_print_current_mems_allowed(void);
115 */ 130 */
116static inline unsigned int read_mems_allowed_begin(void) 131static inline unsigned int read_mems_allowed_begin(void)
117{ 132{
118 if (!cpusets_enabled()) 133 if (!static_branch_unlikely(&cpusets_pre_enable_key))
119 return 0; 134 return 0;
120 135
121 return read_seqcount_begin(&current->mems_allowed_seq); 136 return read_seqcount_begin(&current->mems_allowed_seq);
@@ -129,7 +144,7 @@ static inline unsigned int read_mems_allowed_begin(void)
129 */ 144 */
130static inline bool read_mems_allowed_retry(unsigned int seq) 145static inline bool read_mems_allowed_retry(unsigned int seq)
131{ 146{
132 if (!cpusets_enabled()) 147 if (!static_branch_unlikely(&cpusets_enabled_key))
133 return false; 148 return false;
134 149
135 return read_seqcount_retry(&current->mems_allowed_seq, seq); 150 return read_seqcount_retry(&current->mems_allowed_seq, seq);
diff --git a/include/linux/crush/crush.h b/include/linux/crush/crush.h
index 92e165d417a6..07eed95e10c7 100644
--- a/include/linux/crush/crush.h
+++ b/include/linux/crush/crush.h
@@ -193,7 +193,7 @@ struct crush_choose_arg {
193struct crush_choose_arg_map { 193struct crush_choose_arg_map {
194#ifdef __KERNEL__ 194#ifdef __KERNEL__
195 struct rb_node node; 195 struct rb_node node;
196 u64 choose_args_index; 196 s64 choose_args_index;
197#endif 197#endif
198 struct crush_choose_arg *args; /*!< replacement for each bucket 198 struct crush_choose_arg *args; /*!< replacement for each bucket
199 in the crushmap */ 199 in the crushmap */
diff --git a/include/linux/device.h b/include/linux/device.h
index 723cd54b94da..beabdbc08420 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -843,7 +843,7 @@ struct dev_links_info {
843 * hibernation, system resume and during runtime PM transitions 843 * hibernation, system resume and during runtime PM transitions
844 * along with subsystem-level and driver-level callbacks. 844 * along with subsystem-level and driver-level callbacks.
845 * @pins: For device pin management. 845 * @pins: For device pin management.
846 * See Documentation/pinctrl.txt for details. 846 * See Documentation/driver-api/pinctl.rst for details.
847 * @msi_list: Hosts MSI descriptors 847 * @msi_list: Hosts MSI descriptors
848 * @msi_domain: The generic MSI domain this device is using. 848 * @msi_domain: The generic MSI domain this device is using.
849 * @numa_node: NUMA node this device is close to. 849 * @numa_node: NUMA node this device is close to.
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h
index 277ab9af9ac2..100cb4343763 100644
--- a/include/linux/devpts_fs.h
+++ b/include/linux/devpts_fs.h
@@ -19,6 +19,7 @@
19 19
20struct pts_fs_info; 20struct pts_fs_info;
21 21
22struct vfsmount *devpts_mntget(struct file *, struct pts_fs_info *);
22struct pts_fs_info *devpts_acquire(struct file *); 23struct pts_fs_info *devpts_acquire(struct file *);
23void devpts_release(struct pts_fs_info *); 24void devpts_release(struct pts_fs_info *);
24 25
@@ -32,6 +33,15 @@ void *devpts_get_priv(struct dentry *);
32/* unlink */ 33/* unlink */
33void devpts_pty_kill(struct dentry *); 34void devpts_pty_kill(struct dentry *);
34 35
36/* in pty.c */
37int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags);
38
39#else
40static inline int
41ptm_open_peer(struct file *master, struct tty_struct *tty, int flags)
42{
43 return -EIO;
44}
35#endif 45#endif
36 46
37 47
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 6e1fd5d21248..cbfe127bccf8 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -907,9 +907,9 @@ static inline struct file *get_file(struct file *f)
907/* Page cache limit. The filesystems should put that into their s_maxbytes 907/* Page cache limit. The filesystems should put that into their s_maxbytes
908 limits, otherwise bad things can happen in VM. */ 908 limits, otherwise bad things can happen in VM. */
909#if BITS_PER_LONG==32 909#if BITS_PER_LONG==32
910#define MAX_LFS_FILESIZE (((loff_t)PAGE_SIZE << (BITS_PER_LONG-1))-1) 910#define MAX_LFS_FILESIZE ((loff_t)ULONG_MAX << PAGE_SHIFT)
911#elif BITS_PER_LONG==64 911#elif BITS_PER_LONG==64
912#define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL) 912#define MAX_LFS_FILESIZE ((loff_t)LLONG_MAX)
913#endif 913#endif
914 914
915#define FL_POSIX 1 915#define FL_POSIX 1
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 00ca5b86a753..d501d3956f13 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -689,7 +689,8 @@ i2c_unlock_adapter(struct i2c_adapter *adapter)
689#define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */ 689#define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */
690#define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */ 690#define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */
691#define I2C_CLASS_SPD (1<<7) /* Memory modules */ 691#define I2C_CLASS_SPD (1<<7) /* Memory modules */
692#define I2C_CLASS_DEPRECATED (1<<8) /* Warn users that adapter will stop using classes */ 692/* Warn users that the adapter doesn't support classes anymore */
693#define I2C_CLASS_DEPRECATED (1<<8)
693 694
694/* Internal numbers to terminate lists */ 695/* Internal numbers to terminate lists */
695#define I2C_CLIENT_END 0xfffeU 696#define I2C_CLIENT_END 0xfffeU
diff --git a/include/linux/iio/common/st_sensors.h b/include/linux/iio/common/st_sensors.h
index 497f2b3a5a62..97f1b465d04f 100644
--- a/include/linux/iio/common/st_sensors.h
+++ b/include/linux/iio/common/st_sensors.h
@@ -105,6 +105,11 @@ struct st_sensor_fullscale {
105 struct st_sensor_fullscale_avl fs_avl[ST_SENSORS_FULLSCALE_AVL_MAX]; 105 struct st_sensor_fullscale_avl fs_avl[ST_SENSORS_FULLSCALE_AVL_MAX];
106}; 106};
107 107
108struct st_sensor_sim {
109 u8 addr;
110 u8 value;
111};
112
108/** 113/**
109 * struct st_sensor_bdu - ST sensor device block data update 114 * struct st_sensor_bdu - ST sensor device block data update
110 * @addr: address of the register. 115 * @addr: address of the register.
@@ -197,6 +202,7 @@ struct st_sensor_transfer_function {
197 * @bdu: Block data update register. 202 * @bdu: Block data update register.
198 * @das: Data Alignment Selection register. 203 * @das: Data Alignment Selection register.
199 * @drdy_irq: Data ready register of the sensor. 204 * @drdy_irq: Data ready register of the sensor.
205 * @sim: SPI serial interface mode register of the sensor.
200 * @multi_read_bit: Use or not particular bit for [I2C/SPI] multi-read. 206 * @multi_read_bit: Use or not particular bit for [I2C/SPI] multi-read.
201 * @bootime: samples to discard when sensor passing from power-down to power-up. 207 * @bootime: samples to discard when sensor passing from power-down to power-up.
202 */ 208 */
@@ -213,6 +219,7 @@ struct st_sensor_settings {
213 struct st_sensor_bdu bdu; 219 struct st_sensor_bdu bdu;
214 struct st_sensor_das das; 220 struct st_sensor_das das;
215 struct st_sensor_data_ready_irq drdy_irq; 221 struct st_sensor_data_ready_irq drdy_irq;
222 struct st_sensor_sim sim;
216 bool multi_read_bit; 223 bool multi_read_bit;
217 unsigned int bootime; 224 unsigned int bootime;
218}; 225};
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index d68bec297a45..c380daa40c0e 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -535,7 +535,7 @@ struct iio_buffer_setup_ops {
535 * @scan_timestamp: [INTERN] set if any buffers have requested timestamp 535 * @scan_timestamp: [INTERN] set if any buffers have requested timestamp
536 * @scan_index_timestamp:[INTERN] cache of the index to the timestamp 536 * @scan_index_timestamp:[INTERN] cache of the index to the timestamp
537 * @trig: [INTERN] current device trigger (buffer modes) 537 * @trig: [INTERN] current device trigger (buffer modes)
538 * @trig_readonly [INTERN] mark the current trigger immutable 538 * @trig_readonly: [INTERN] mark the current trigger immutable
539 * @pollfunc: [DRIVER] function run on trigger being received 539 * @pollfunc: [DRIVER] function run on trigger being received
540 * @pollfunc_event: [DRIVER] function run on events trigger being received 540 * @pollfunc_event: [DRIVER] function run on events trigger being received
541 * @channels: [DRIVER] channel specification structure table 541 * @channels: [DRIVER] channel specification structure table
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
index ea08302f2d7b..7142d8d6e470 100644
--- a/include/linux/iio/trigger.h
+++ b/include/linux/iio/trigger.h
@@ -144,8 +144,8 @@ void devm_iio_trigger_unregister(struct device *dev,
144/** 144/**
145 * iio_trigger_set_immutable() - set an immutable trigger on destination 145 * iio_trigger_set_immutable() - set an immutable trigger on destination
146 * 146 *
147 * @indio_dev - IIO device structure containing the device 147 * @indio_dev: IIO device structure containing the device
148 * @trig - trigger to assign to device 148 * @trig: trigger to assign to device
149 * 149 *
150 **/ 150 **/
151int iio_trigger_set_immutable(struct iio_dev *indio_dev, struct iio_trigger *trig); 151int iio_trigger_set_immutable(struct iio_dev *indio_dev, struct iio_trigger *trig);
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 2cb54adc4a33..176f7569d874 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -240,7 +240,7 @@ struct iommu_device {
240 struct list_head list; 240 struct list_head list;
241 const struct iommu_ops *ops; 241 const struct iommu_ops *ops;
242 struct fwnode_handle *fwnode; 242 struct fwnode_handle *fwnode;
243 struct device dev; 243 struct device *dev;
244}; 244};
245 245
246int iommu_device_register(struct iommu_device *iommu); 246int iommu_device_register(struct iommu_device *iommu);
@@ -265,6 +265,11 @@ static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
265 iommu->fwnode = fwnode; 265 iommu->fwnode = fwnode;
266} 266}
267 267
268static inline struct iommu_device *dev_to_iommu_device(struct device *dev)
269{
270 return (struct iommu_device *)dev_get_drvdata(dev);
271}
272
268#define IOMMU_GROUP_NOTIFY_ADD_DEVICE 1 /* Device added */ 273#define IOMMU_GROUP_NOTIFY_ADD_DEVICE 1 /* Device added */
269#define IOMMU_GROUP_NOTIFY_DEL_DEVICE 2 /* Pre Device removed */ 274#define IOMMU_GROUP_NOTIFY_DEL_DEVICE 2 /* Pre Device removed */
270#define IOMMU_GROUP_NOTIFY_BIND_DRIVER 3 /* Pre Driver bind */ 275#define IOMMU_GROUP_NOTIFY_BIND_DRIVER 3 /* Pre Driver bind */
@@ -589,6 +594,11 @@ static inline void iommu_device_set_fwnode(struct iommu_device *iommu,
589{ 594{
590} 595}
591 596
597static inline struct iommu_device *dev_to_iommu_device(struct device *dev)
598{
599 return NULL;
600}
601
592static inline void iommu_device_unregister(struct iommu_device *iommu) 602static inline void iommu_device_unregister(struct iommu_device *iommu)
593{ 603{
594} 604}
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index e1b442996f81..474d6bbc158c 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -128,6 +128,7 @@ struct inet6_skb_parm {
128#define IP6SKB_FRAGMENTED 16 128#define IP6SKB_FRAGMENTED 16
129#define IP6SKB_HOPBYHOP 32 129#define IP6SKB_HOPBYHOP 32
130#define IP6SKB_L3SLAVE 64 130#define IP6SKB_L3SLAVE 64
131#define IP6SKB_JUMBOGRAM 128
131}; 132};
132 133
133#if defined(CONFIG_NET_L3_MASTER_DEV) 134#if defined(CONFIG_NET_L3_MASTER_DEV)
@@ -152,6 +153,11 @@ static inline int inet6_iif(const struct sk_buff *skb)
152 return l3_slave ? skb->skb_iif : IP6CB(skb)->iif; 153 return l3_slave ? skb->skb_iif : IP6CB(skb)->iif;
153} 154}
154 155
156static inline bool inet6_is_jumbogram(const struct sk_buff *skb)
157{
158 return !!(IP6CB(skb)->flags & IP6SKB_JUMBOGRAM);
159}
160
155/* can not be used in TCP layer after tcp_v6_fill_cb */ 161/* can not be used in TCP layer after tcp_v6_fill_cb */
156static inline bool inet6_exact_dif_match(struct net *net, struct sk_buff *skb) 162static inline bool inet6_exact_dif_match(struct net *net, struct sk_buff *skb)
157{ 163{
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 4fec8b775895..82e197eeac91 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -15,7 +15,7 @@ struct task_struct *kthread_create_on_node(int (*threadfn)(void *data),
15 * @threadfn: the function to run in the thread 15 * @threadfn: the function to run in the thread
16 * @data: data pointer for @threadfn() 16 * @data: data pointer for @threadfn()
17 * @namefmt: printf-style format string for the thread name 17 * @namefmt: printf-style format string for the thread name
18 * @...: arguments for @namefmt. 18 * @arg...: arguments for @namefmt.
19 * 19 *
20 * This macro will create a kthread on the current node, leaving it in 20 * This macro will create a kthread on the current node, leaving it in
21 * the stopped state. This is just a helper for kthread_create_on_node(); 21 * the stopped state. This is just a helper for kthread_create_on_node();
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 890b706d1943..21a6fd6c44af 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -477,7 +477,8 @@ struct kvm {
477static inline struct kvm_io_bus *kvm_get_bus(struct kvm *kvm, enum kvm_bus idx) 477static inline struct kvm_io_bus *kvm_get_bus(struct kvm *kvm, enum kvm_bus idx)
478{ 478{
479 return srcu_dereference_check(kvm->buses[idx], &kvm->srcu, 479 return srcu_dereference_check(kvm->buses[idx], &kvm->srcu,
480 lockdep_is_held(&kvm->slots_lock)); 480 lockdep_is_held(&kvm->slots_lock) ||
481 !refcount_read(&kvm->users_count));
481} 482}
482 483
483static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i) 484static inline struct kvm_vcpu *kvm_get_vcpu(struct kvm *kvm, int i)
@@ -570,7 +571,8 @@ void kvm_put_kvm(struct kvm *kvm);
570static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id) 571static inline struct kvm_memslots *__kvm_memslots(struct kvm *kvm, int as_id)
571{ 572{
572 return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu, 573 return srcu_dereference_check(kvm->memslots[as_id], &kvm->srcu,
573 lockdep_is_held(&kvm->slots_lock)); 574 lockdep_is_held(&kvm->slots_lock) ||
575 !refcount_read(&kvm->users_count));
574} 576}
575 577
576static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm) 578static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm)
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 55de3da58b1c..931c32f1f18d 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -435,7 +435,7 @@ enum {
435 ATA_HORKAGE_NOLPM = (1 << 20), /* don't use LPM */ 435 ATA_HORKAGE_NOLPM = (1 << 20), /* don't use LPM */
436 ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */ 436 ATA_HORKAGE_WD_BROKEN_LPM = (1 << 21), /* some WDs have broken LPM */
437 ATA_HORKAGE_ZERO_AFTER_TRIM = (1 << 22),/* guarantees zero after trim */ 437 ATA_HORKAGE_ZERO_AFTER_TRIM = (1 << 22),/* guarantees zero after trim */
438 ATA_HORKAGE_NO_NCQ_LOG = (1 << 23), /* don't use NCQ for log read */ 438 ATA_HORKAGE_NO_DMA_LOG = (1 << 23), /* don't use DMA for log read */
439 ATA_HORKAGE_NOTRIM = (1 << 24), /* don't use TRIM */ 439 ATA_HORKAGE_NOTRIM = (1 << 24), /* don't use TRIM */
440 ATA_HORKAGE_MAX_SEC_1024 = (1 << 25), /* Limit max sects to 1024 */ 440 ATA_HORKAGE_MAX_SEC_1024 = (1 << 25), /* Limit max sects to 1024 */
441 441
diff --git a/include/linux/memblock.h b/include/linux/memblock.h
index 77d427974f57..bae11c7e7bf3 100644
--- a/include/linux/memblock.h
+++ b/include/linux/memblock.h
@@ -61,6 +61,7 @@ extern int memblock_debug;
61#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK 61#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
62#define __init_memblock __meminit 62#define __init_memblock __meminit
63#define __initdata_memblock __meminitdata 63#define __initdata_memblock __meminitdata
64void memblock_discard(void);
64#else 65#else
65#define __init_memblock 66#define __init_memblock
66#define __initdata_memblock 67#define __initdata_memblock
@@ -74,8 +75,6 @@ phys_addr_t memblock_find_in_range_node(phys_addr_t size, phys_addr_t align,
74 int nid, ulong flags); 75 int nid, ulong flags);
75phys_addr_t memblock_find_in_range(phys_addr_t start, phys_addr_t end, 76phys_addr_t memblock_find_in_range(phys_addr_t start, phys_addr_t end,
76 phys_addr_t size, phys_addr_t align); 77 phys_addr_t size, phys_addr_t align);
77phys_addr_t get_allocated_memblock_reserved_regions_info(phys_addr_t *addr);
78phys_addr_t get_allocated_memblock_memory_regions_info(phys_addr_t *addr);
79void memblock_allow_resize(void); 78void memblock_allow_resize(void);
80int memblock_add_node(phys_addr_t base, phys_addr_t size, int nid); 79int memblock_add_node(phys_addr_t base, phys_addr_t size, int nid);
81int memblock_add(phys_addr_t base, phys_addr_t size); 80int memblock_add(phys_addr_t base, phys_addr_t size);
@@ -110,6 +109,9 @@ void __next_mem_range_rev(u64 *idx, int nid, ulong flags,
110void __next_reserved_mem_region(u64 *idx, phys_addr_t *out_start, 109void __next_reserved_mem_region(u64 *idx, phys_addr_t *out_start,
111 phys_addr_t *out_end); 110 phys_addr_t *out_end);
112 111
112void __memblock_free_early(phys_addr_t base, phys_addr_t size);
113void __memblock_free_late(phys_addr_t base, phys_addr_t size);
114
113/** 115/**
114 * for_each_mem_range - iterate through memblock areas from type_a and not 116 * for_each_mem_range - iterate through memblock areas from type_a and not
115 * included in type_b. Or just type_a if type_b is NULL. 117 * included in type_b. Or just type_a if type_b is NULL.
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 3914e3dd6168..9b15a4bcfa77 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -484,7 +484,8 @@ bool mem_cgroup_oom_synchronize(bool wait);
484extern int do_swap_account; 484extern int do_swap_account;
485#endif 485#endif
486 486
487void lock_page_memcg(struct page *page); 487struct mem_cgroup *lock_page_memcg(struct page *page);
488void __unlock_page_memcg(struct mem_cgroup *memcg);
488void unlock_page_memcg(struct page *page); 489void unlock_page_memcg(struct page *page);
489 490
490static inline unsigned long memcg_page_state(struct mem_cgroup *memcg, 491static inline unsigned long memcg_page_state(struct mem_cgroup *memcg,
@@ -809,7 +810,12 @@ mem_cgroup_print_oom_info(struct mem_cgroup *memcg, struct task_struct *p)
809{ 810{
810} 811}
811 812
812static inline void lock_page_memcg(struct page *page) 813static inline struct mem_cgroup *lock_page_memcg(struct page *page)
814{
815 return NULL;
816}
817
818static inline void __unlock_page_memcg(struct mem_cgroup *memcg)
813{ 819{
814} 820}
815 821
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index aad5d81dfb44..b54517c05e9a 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -620,6 +620,7 @@ struct mlx4_caps {
620 u32 dmfs_high_rate_qpn_base; 620 u32 dmfs_high_rate_qpn_base;
621 u32 dmfs_high_rate_qpn_range; 621 u32 dmfs_high_rate_qpn_range;
622 u32 vf_caps; 622 u32 vf_caps;
623 bool wol_port[MLX4_MAX_PORTS + 1];
623 struct mlx4_rate_limit_caps rl_caps; 624 struct mlx4_rate_limit_caps rl_caps;
624}; 625};
625 626
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h
index 87869c04849a..3030121b4746 100644
--- a/include/linux/mlx5/mlx5_ifc.h
+++ b/include/linux/mlx5/mlx5_ifc.h
@@ -7749,8 +7749,10 @@ struct mlx5_ifc_pcam_reg_bits {
7749}; 7749};
7750 7750
7751struct mlx5_ifc_mcam_enhanced_features_bits { 7751struct mlx5_ifc_mcam_enhanced_features_bits {
7752 u8 reserved_at_0[0x7f]; 7752 u8 reserved_at_0[0x7d];
7753 7753
7754 u8 mtpps_enh_out_per_adj[0x1];
7755 u8 mtpps_fs[0x1];
7754 u8 pcie_performance_group[0x1]; 7756 u8 pcie_performance_group[0x1];
7755}; 7757};
7756 7758
@@ -8159,7 +8161,8 @@ struct mlx5_ifc_mtpps_reg_bits {
8159 u8 reserved_at_78[0x4]; 8161 u8 reserved_at_78[0x4];
8160 u8 cap_pin_4_mode[0x4]; 8162 u8 cap_pin_4_mode[0x4];
8161 8163
8162 u8 reserved_at_80[0x80]; 8164 u8 field_select[0x20];
8165 u8 reserved_at_a0[0x60];
8163 8166
8164 u8 enable[0x1]; 8167 u8 enable[0x1];
8165 u8 reserved_at_101[0xb]; 8168 u8 reserved_at_101[0xb];
@@ -8174,8 +8177,9 @@ struct mlx5_ifc_mtpps_reg_bits {
8174 8177
8175 u8 out_pulse_duration[0x10]; 8178 u8 out_pulse_duration[0x10];
8176 u8 out_periodic_adjustment[0x10]; 8179 u8 out_periodic_adjustment[0x10];
8180 u8 enhanced_out_periodic_adjustment[0x20];
8177 8181
8178 u8 reserved_at_1a0[0x60]; 8182 u8 reserved_at_1c0[0x20];
8179}; 8183};
8180 8184
8181struct mlx5_ifc_mtppse_reg_bits { 8185struct mlx5_ifc_mtppse_reg_bits {
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h
index 6f41270d80c0..f378dc0e7eaf 100644
--- a/include/linux/mlx5/qp.h
+++ b/include/linux/mlx5/qp.h
@@ -212,7 +212,6 @@ struct mlx5_wqe_ctrl_seg {
212#define MLX5_WQE_CTRL_OPCODE_MASK 0xff 212#define MLX5_WQE_CTRL_OPCODE_MASK 0xff
213#define MLX5_WQE_CTRL_WQE_INDEX_MASK 0x00ffff00 213#define MLX5_WQE_CTRL_WQE_INDEX_MASK 0x00ffff00
214#define MLX5_WQE_CTRL_WQE_INDEX_SHIFT 8 214#define MLX5_WQE_CTRL_WQE_INDEX_SHIFT 8
215#define MLX5_WQE_AV_EXT 0x80000000
216 215
217enum { 216enum {
218 MLX5_ETH_WQE_L3_INNER_CSUM = 1 << 4, 217 MLX5_ETH_WQE_L3_INNER_CSUM = 1 << 4,
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index ff151814a02d..3cadee0a3508 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -487,13 +487,15 @@ struct mm_struct {
487 /* numa_scan_seq prevents two threads setting pte_numa */ 487 /* numa_scan_seq prevents two threads setting pte_numa */
488 int numa_scan_seq; 488 int numa_scan_seq;
489#endif 489#endif
490#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
491 /* 490 /*
492 * An operation with batched TLB flushing is going on. Anything that 491 * An operation with batched TLB flushing is going on. Anything that
493 * can move process memory needs to flush the TLB when moving a 492 * can move process memory needs to flush the TLB when moving a
494 * PROT_NONE or PROT_NUMA mapped page. 493 * PROT_NONE or PROT_NUMA mapped page.
495 */ 494 */
496 bool tlb_flush_pending; 495 atomic_t tlb_flush_pending;
496#ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
497 /* See flush_tlb_batched_pending() */
498 bool tlb_flush_batched;
497#endif 499#endif
498 struct uprobes_state uprobes_state; 500 struct uprobes_state uprobes_state;
499#ifdef CONFIG_HUGETLB_PAGE 501#ifdef CONFIG_HUGETLB_PAGE
@@ -518,46 +520,60 @@ static inline cpumask_t *mm_cpumask(struct mm_struct *mm)
518 return mm->cpu_vm_mask_var; 520 return mm->cpu_vm_mask_var;
519} 521}
520 522
521#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION) 523struct mmu_gather;
524extern void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
525 unsigned long start, unsigned long end);
526extern void tlb_finish_mmu(struct mmu_gather *tlb,
527 unsigned long start, unsigned long end);
528
522/* 529/*
523 * Memory barriers to keep this state in sync are graciously provided by 530 * Memory barriers to keep this state in sync are graciously provided by
524 * the page table locks, outside of which no page table modifications happen. 531 * the page table locks, outside of which no page table modifications happen.
525 * The barriers below prevent the compiler from re-ordering the instructions 532 * The barriers are used to ensure the order between tlb_flush_pending updates,
526 * around the memory barriers that are already present in the code. 533 * which happen while the lock is not taken, and the PTE updates, which happen
534 * while the lock is taken, are serialized.
527 */ 535 */
528static inline bool mm_tlb_flush_pending(struct mm_struct *mm) 536static inline bool mm_tlb_flush_pending(struct mm_struct *mm)
529{ 537{
530 barrier(); 538 return atomic_read(&mm->tlb_flush_pending) > 0;
531 return mm->tlb_flush_pending;
532} 539}
533static inline void set_tlb_flush_pending(struct mm_struct *mm) 540
541/*
542 * Returns true if there are two above TLB batching threads in parallel.
543 */
544static inline bool mm_tlb_flush_nested(struct mm_struct *mm)
534{ 545{
535 mm->tlb_flush_pending = true; 546 return atomic_read(&mm->tlb_flush_pending) > 1;
547}
548
549static inline void init_tlb_flush_pending(struct mm_struct *mm)
550{
551 atomic_set(&mm->tlb_flush_pending, 0);
552}
553
554static inline void inc_tlb_flush_pending(struct mm_struct *mm)
555{
556 atomic_inc(&mm->tlb_flush_pending);
536 557
537 /* 558 /*
538 * Guarantee that the tlb_flush_pending store does not leak into the 559 * Guarantee that the tlb_flush_pending increase does not leak into the
539 * critical section updating the page tables 560 * critical section updating the page tables
540 */ 561 */
541 smp_mb__before_spinlock(); 562 smp_mb__before_spinlock();
542} 563}
564
543/* Clearing is done after a TLB flush, which also provides a barrier. */ 565/* Clearing is done after a TLB flush, which also provides a barrier. */
544static inline void clear_tlb_flush_pending(struct mm_struct *mm) 566static inline void dec_tlb_flush_pending(struct mm_struct *mm)
545{
546 barrier();
547 mm->tlb_flush_pending = false;
548}
549#else
550static inline bool mm_tlb_flush_pending(struct mm_struct *mm)
551{
552 return false;
553}
554static inline void set_tlb_flush_pending(struct mm_struct *mm)
555{
556}
557static inline void clear_tlb_flush_pending(struct mm_struct *mm)
558{ 567{
568 /*
569 * Guarantee that the tlb_flush_pending does not not leak into the
570 * critical section, since we must order the PTE change and changes to
571 * the pending TLB flush indication. We could have relied on TLB flush
572 * as a memory barrier, but this behavior is not clearly documented.
573 */
574 smp_mb__before_atomic();
575 atomic_dec(&mm->tlb_flush_pending);
559} 576}
560#endif
561 577
562struct vm_fault; 578struct vm_fault;
563 579
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 892148c448cc..5216d2eb2289 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -681,10 +681,10 @@ struct nand_buffers {
681 * @tWW_min: WP# transition to WE# low 681 * @tWW_min: WP# transition to WE# low
682 */ 682 */
683struct nand_sdr_timings { 683struct nand_sdr_timings {
684 u32 tBERS_max; 684 u64 tBERS_max;
685 u32 tCCS_min; 685 u32 tCCS_min;
686 u32 tPROG_max; 686 u64 tPROG_max;
687 u32 tR_max; 687 u64 tR_max;
688 u32 tALH_min; 688 u32 tALH_min;
689 u32 tADL_min; 689 u32 tADL_min;
690 u32 tALS_min; 690 u32 tALS_min;
diff --git a/include/linux/net.h b/include/linux/net.h
index dda2cc939a53..ebeb48c92005 100644
--- a/include/linux/net.h
+++ b/include/linux/net.h
@@ -37,7 +37,7 @@ struct net;
37 37
38/* Historically, SOCKWQ_ASYNC_NOSPACE & SOCKWQ_ASYNC_WAITDATA were located 38/* Historically, SOCKWQ_ASYNC_NOSPACE & SOCKWQ_ASYNC_WAITDATA were located
39 * in sock->flags, but moved into sk->sk_wq->flags to be RCU protected. 39 * in sock->flags, but moved into sk->sk_wq->flags to be RCU protected.
40 * Eventually all flags will be in sk->sk_wq_flags. 40 * Eventually all flags will be in sk->sk_wq->flags.
41 */ 41 */
42#define SOCKWQ_ASYNC_NOSPACE 0 42#define SOCKWQ_ASYNC_NOSPACE 0
43#define SOCKWQ_ASYNC_WAITDATA 1 43#define SOCKWQ_ASYNC_WAITDATA 1
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index ca3bcc4ed4e5..62cbcb842f99 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -1235,7 +1235,7 @@ struct nfs41_state_protection {
1235 1235
1236struct nfs41_exchange_id_args { 1236struct nfs41_exchange_id_args {
1237 struct nfs_client *client; 1237 struct nfs_client *client;
1238 nfs4_verifier *verifier; 1238 nfs4_verifier verifier;
1239 u32 flags; 1239 u32 flags;
1240 struct nfs41_state_protection state_protect; 1240 struct nfs41_state_protection state_protect;
1241}; 1241};
diff --git a/include/linux/nmi.h b/include/linux/nmi.h
index 8aa01fd859fb..a36abe2da13e 100644
--- a/include/linux/nmi.h
+++ b/include/linux/nmi.h
@@ -168,6 +168,14 @@ extern int sysctl_hardlockup_all_cpu_backtrace;
168#define sysctl_softlockup_all_cpu_backtrace 0 168#define sysctl_softlockup_all_cpu_backtrace 0
169#define sysctl_hardlockup_all_cpu_backtrace 0 169#define sysctl_hardlockup_all_cpu_backtrace 0
170#endif 170#endif
171
172#if defined(CONFIG_HARDLOCKUP_CHECK_TIMESTAMP) && \
173 defined(CONFIG_HARDLOCKUP_DETECTOR)
174void watchdog_update_hrtimer_threshold(u64 period);
175#else
176static inline void watchdog_update_hrtimer_threshold(u64 period) { }
177#endif
178
171extern bool is_hardlockup(void); 179extern bool is_hardlockup(void);
172struct ctl_table; 180struct ctl_table;
173extern int proc_watchdog(struct ctl_table *, int , 181extern int proc_watchdog(struct ctl_table *, int ,
diff --git a/include/linux/nvme-fc-driver.h b/include/linux/nvme-fc-driver.h
index 6c8c5d8041b7..2591878c1d48 100644
--- a/include/linux/nvme-fc-driver.h
+++ b/include/linux/nvme-fc-driver.h
@@ -346,6 +346,11 @@ struct nvme_fc_remote_port {
346 * indicating an FC transport Aborted status. 346 * indicating an FC transport Aborted status.
347 * Entrypoint is Mandatory. 347 * Entrypoint is Mandatory.
348 * 348 *
349 * @defer_rcv: Called by the transport to signal the LLLD that it has
350 * begun processing of a previously received NVME CMD IU. The LLDD
351 * is now free to re-use the rcv buffer associated with the
352 * nvmefc_tgt_fcp_req.
353 *
349 * @max_hw_queues: indicates the maximum number of hw queues the LLDD 354 * @max_hw_queues: indicates the maximum number of hw queues the LLDD
350 * supports for cpu affinitization. 355 * supports for cpu affinitization.
351 * Value is Mandatory. Must be at least 1. 356 * Value is Mandatory. Must be at least 1.
@@ -846,6 +851,8 @@ struct nvmet_fc_target_template {
846 struct nvmefc_tgt_fcp_req *fcpreq); 851 struct nvmefc_tgt_fcp_req *fcpreq);
847 void (*fcp_req_release)(struct nvmet_fc_target_port *tgtport, 852 void (*fcp_req_release)(struct nvmet_fc_target_port *tgtport,
848 struct nvmefc_tgt_fcp_req *fcpreq); 853 struct nvmefc_tgt_fcp_req *fcpreq);
854 void (*defer_rcv)(struct nvmet_fc_target_port *tgtport,
855 struct nvmefc_tgt_fcp_req *fcpreq);
849 856
850 u32 max_hw_queues; 857 u32 max_hw_queues;
851 u16 max_sgl_segments; 858 u16 max_sgl_segments;
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 8a266e2be5a6..76aac4ce39bc 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -6,6 +6,8 @@
6#include <linux/types.h> 6#include <linux/types.h>
7#include <linux/nodemask.h> 7#include <linux/nodemask.h>
8#include <uapi/linux/oom.h> 8#include <uapi/linux/oom.h>
9#include <linux/sched/coredump.h> /* MMF_* */
10#include <linux/mm.h> /* VM_FAULT* */
9 11
10struct zonelist; 12struct zonelist;
11struct notifier_block; 13struct notifier_block;
@@ -63,6 +65,26 @@ static inline bool tsk_is_oom_victim(struct task_struct * tsk)
63 return tsk->signal->oom_mm; 65 return tsk->signal->oom_mm;
64} 66}
65 67
68/*
69 * Checks whether a page fault on the given mm is still reliable.
70 * This is no longer true if the oom reaper started to reap the
71 * address space which is reflected by MMF_UNSTABLE flag set in
72 * the mm. At that moment any !shared mapping would lose the content
73 * and could cause a memory corruption (zero pages instead of the
74 * original content).
75 *
76 * User should call this before establishing a page table entry for
77 * a !shared mapping and under the proper page table lock.
78 *
79 * Return 0 when the PF is safe VM_FAULT_SIGBUS otherwise.
80 */
81static inline int check_stable_address_space(struct mm_struct *mm)
82{
83 if (unlikely(test_bit(MMF_UNSTABLE, &mm->flags)))
84 return VM_FAULT_SIGBUS;
85 return 0;
86}
87
66extern unsigned long oom_badness(struct task_struct *p, 88extern unsigned long oom_badness(struct task_struct *p,
67 struct mem_cgroup *memcg, const nodemask_t *nodemask, 89 struct mem_cgroup *memcg, const nodemask_t *nodemask,
68 unsigned long totalpages); 90 unsigned long totalpages);
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index baa9344dcd10..79b36f57c3ba 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -163,8 +163,6 @@ void release_pages(struct page **pages, int nr, bool cold);
163 */ 163 */
164static inline int page_cache_get_speculative(struct page *page) 164static inline int page_cache_get_speculative(struct page *page)
165{ 165{
166 VM_BUG_ON(in_interrupt());
167
168#ifdef CONFIG_TINY_RCU 166#ifdef CONFIG_TINY_RCU
169# ifdef CONFIG_PREEMPT_COUNT 167# ifdef CONFIG_PREEMPT_COUNT
170 VM_BUG_ON(!in_atomic() && !irqs_disabled()); 168 VM_BUG_ON(!in_atomic() && !irqs_disabled());
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 4869e66dd659..f958d0732af6 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -188,6 +188,8 @@ enum pci_dev_flags {
188 * the direct_complete optimization. 188 * the direct_complete optimization.
189 */ 189 */
190 PCI_DEV_FLAGS_NEEDS_RESUME = (__force pci_dev_flags_t) (1 << 11), 190 PCI_DEV_FLAGS_NEEDS_RESUME = (__force pci_dev_flags_t) (1 << 11),
191 /* Don't use Relaxed Ordering for TLPs directed at this device */
192 PCI_DEV_FLAGS_NO_RELAXED_ORDERING = (__force pci_dev_flags_t) (1 << 12),
191}; 193};
192 194
193enum pci_irq_reroute_variant { 195enum pci_irq_reroute_variant {
@@ -1067,6 +1069,7 @@ void pcie_flr(struct pci_dev *dev);
1067int __pci_reset_function(struct pci_dev *dev); 1069int __pci_reset_function(struct pci_dev *dev);
1068int __pci_reset_function_locked(struct pci_dev *dev); 1070int __pci_reset_function_locked(struct pci_dev *dev);
1069int pci_reset_function(struct pci_dev *dev); 1071int pci_reset_function(struct pci_dev *dev);
1072int pci_reset_function_locked(struct pci_dev *dev);
1070int pci_try_reset_function(struct pci_dev *dev); 1073int pci_try_reset_function(struct pci_dev *dev);
1071int pci_probe_reset_slot(struct pci_slot *slot); 1074int pci_probe_reset_slot(struct pci_slot *slot);
1072int pci_reset_slot(struct pci_slot *slot); 1075int pci_reset_slot(struct pci_slot *slot);
@@ -1125,6 +1128,7 @@ bool pci_check_pme_status(struct pci_dev *dev);
1125void pci_pme_wakeup_bus(struct pci_bus *bus); 1128void pci_pme_wakeup_bus(struct pci_bus *bus);
1126void pci_d3cold_enable(struct pci_dev *dev); 1129void pci_d3cold_enable(struct pci_dev *dev);
1127void pci_d3cold_disable(struct pci_dev *dev); 1130void pci_d3cold_disable(struct pci_dev *dev);
1131bool pcie_relaxed_ordering_enabled(struct pci_dev *dev);
1128 1132
1129/* PCI Virtual Channel */ 1133/* PCI Virtual Channel */
1130int pci_save_vc_state(struct pci_dev *dev); 1134int pci_save_vc_state(struct pci_dev *dev);
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index a3b873fc59e4..b14095bcf4bb 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -310,8 +310,8 @@ struct pmu {
310 * Notification that the event was mapped or unmapped. Called 310 * Notification that the event was mapped or unmapped. Called
311 * in the context of the mapping task. 311 * in the context of the mapping task.
312 */ 312 */
313 void (*event_mapped) (struct perf_event *event); /*optional*/ 313 void (*event_mapped) (struct perf_event *event, struct mm_struct *mm); /* optional */
314 void (*event_unmapped) (struct perf_event *event); /*optional*/ 314 void (*event_unmapped) (struct perf_event *event, struct mm_struct *mm); /* optional */
315 315
316 /* 316 /*
317 * Flags for ->add()/->del()/ ->start()/->stop(). There are 317 * Flags for ->add()/->del()/ ->start()/->stop(). There are
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 2a9567bb8186..0bb5b212ab42 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -830,7 +830,7 @@ static inline int phy_read_status(struct phy_device *phydev)
830 dev_err(&_phydev->mdio.dev, format, ##args) 830 dev_err(&_phydev->mdio.dev, format, ##args)
831 831
832#define phydev_dbg(_phydev, format, args...) \ 832#define phydev_dbg(_phydev, format, args...) \
833 dev_dbg(&_phydev->mdio.dev, format, ##args); 833 dev_dbg(&_phydev->mdio.dev, format, ##args)
834 834
835static inline const char *phydev_name(const struct phy_device *phydev) 835static inline const char *phydev_name(const struct phy_device *phydev)
836{ 836{
diff --git a/include/linux/pid.h b/include/linux/pid.h
index 4d179316e431..719582744a2e 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -8,7 +8,9 @@ enum pid_type
8 PIDTYPE_PID, 8 PIDTYPE_PID,
9 PIDTYPE_PGID, 9 PIDTYPE_PGID,
10 PIDTYPE_SID, 10 PIDTYPE_SID,
11 PIDTYPE_MAX 11 PIDTYPE_MAX,
12 /* only valid to __task_pid_nr_ns() */
13 __PIDTYPE_TGID
12}; 14};
13 15
14/* 16/*
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h
index 231d3075815a..e91d1b6a260d 100644
--- a/include/linux/pinctrl/pinconf-generic.h
+++ b/include/linux/pinctrl/pinconf-generic.h
@@ -81,8 +81,8 @@
81 * it. 81 * it.
82 * @PIN_CONFIG_OUTPUT: this will configure the pin as an output and drive a 82 * @PIN_CONFIG_OUTPUT: this will configure the pin as an output and drive a
83 * value on the line. Use argument 1 to indicate high level, argument 0 to 83 * value on the line. Use argument 1 to indicate high level, argument 0 to
84 * indicate low level. (Please see Documentation/pinctrl.txt, section 84 * indicate low level. (Please see Documentation/driver-api/pinctl.rst,
85 * "GPIO mode pitfalls" for a discussion around this parameter.) 85 * section "GPIO mode pitfalls" for a discussion around this parameter.)
86 * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power 86 * @PIN_CONFIG_POWER_SOURCE: if the pin can select between different power
87 * supplies, the argument to this parameter (on a custom format) tells 87 * supplies, the argument to this parameter (on a custom format) tells
88 * the driver which alternative power source to use. 88 * the driver which alternative power source to use.
diff --git a/include/linux/platform_data/st_sensors_pdata.h b/include/linux/platform_data/st_sensors_pdata.h
index 79b0e4cdb814..f8274b0c6888 100644
--- a/include/linux/platform_data/st_sensors_pdata.h
+++ b/include/linux/platform_data/st_sensors_pdata.h
@@ -17,10 +17,12 @@
17 * Available only for accelerometer and pressure sensors. 17 * Available only for accelerometer and pressure sensors.
18 * Accelerometer DRDY on LSM330 available only on pin 1 (see datasheet). 18 * Accelerometer DRDY on LSM330 available only on pin 1 (see datasheet).
19 * @open_drain: set the interrupt line to be open drain if possible. 19 * @open_drain: set the interrupt line to be open drain if possible.
20 * @spi_3wire: enable spi-3wire mode.
20 */ 21 */
21struct st_sensors_platform_data { 22struct st_sensors_platform_data {
22 u8 drdy_int_pin; 23 u8 drdy_int_pin;
23 bool open_drain; 24 bool open_drain;
25 bool spi_3wire;
24}; 26};
25 27
26#endif /* ST_SENSORS_PDATA_H */ 28#endif /* ST_SENSORS_PDATA_H */
diff --git a/include/linux/ptp_clock_kernel.h b/include/linux/ptp_clock_kernel.h
index a026bfd089db..51349d124ee5 100644
--- a/include/linux/ptp_clock_kernel.h
+++ b/include/linux/ptp_clock_kernel.h
@@ -99,6 +99,11 @@ struct system_device_crosststamp;
99 * parameter func: the desired function to use. 99 * parameter func: the desired function to use.
100 * parameter chan: the function channel index to use. 100 * parameter chan: the function channel index to use.
101 * 101 *
102 * @do_work: Request driver to perform auxiliary (periodic) operations
103 * Driver should return delay of the next auxiliary work scheduling
104 * time (>=0) or negative value in case further scheduling
105 * is not required.
106 *
102 * Drivers should embed their ptp_clock_info within a private 107 * Drivers should embed their ptp_clock_info within a private
103 * structure, obtaining a reference to it using container_of(). 108 * structure, obtaining a reference to it using container_of().
104 * 109 *
@@ -126,6 +131,7 @@ struct ptp_clock_info {
126 struct ptp_clock_request *request, int on); 131 struct ptp_clock_request *request, int on);
127 int (*verify)(struct ptp_clock_info *ptp, unsigned int pin, 132 int (*verify)(struct ptp_clock_info *ptp, unsigned int pin,
128 enum ptp_pin_function func, unsigned int chan); 133 enum ptp_pin_function func, unsigned int chan);
134 long (*do_aux_work)(struct ptp_clock_info *ptp);
129}; 135};
130 136
131struct ptp_clock; 137struct ptp_clock;
@@ -211,6 +217,16 @@ extern int ptp_clock_index(struct ptp_clock *ptp);
211int ptp_find_pin(struct ptp_clock *ptp, 217int ptp_find_pin(struct ptp_clock *ptp,
212 enum ptp_pin_function func, unsigned int chan); 218 enum ptp_pin_function func, unsigned int chan);
213 219
220/**
221 * ptp_schedule_worker() - schedule ptp auxiliary work
222 *
223 * @ptp: The clock obtained from ptp_clock_register().
224 * @delay: number of jiffies to wait before queuing
225 * See kthread_queue_delayed_work() for more info.
226 */
227
228int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay);
229
214#else 230#else
215static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info, 231static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
216 struct device *parent) 232 struct device *parent)
@@ -225,6 +241,10 @@ static inline int ptp_clock_index(struct ptp_clock *ptp)
225static inline int ptp_find_pin(struct ptp_clock *ptp, 241static inline int ptp_find_pin(struct ptp_clock *ptp,
226 enum ptp_pin_function func, unsigned int chan) 242 enum ptp_pin_function func, unsigned int chan)
227{ return -1; } 243{ return -1; }
244static inline int ptp_schedule_worker(struct ptp_clock *ptp,
245 unsigned long delay)
246{ return -EOPNOTSUPP; }
247
228#endif 248#endif
229 249
230#endif 250#endif
diff --git a/include/linux/ptr_ring.h b/include/linux/ptr_ring.h
index d8c97ec8a8e6..37b4bb2545b3 100644
--- a/include/linux/ptr_ring.h
+++ b/include/linux/ptr_ring.h
@@ -436,9 +436,9 @@ static inline int ptr_ring_consume_batched_bh(struct ptr_ring *r,
436 __PTR_RING_PEEK_CALL_v; \ 436 __PTR_RING_PEEK_CALL_v; \
437}) 437})
438 438
439static inline void **__ptr_ring_init_queue_alloc(int size, gfp_t gfp) 439static inline void **__ptr_ring_init_queue_alloc(unsigned int size, gfp_t gfp)
440{ 440{
441 return kzalloc(ALIGN(size * sizeof(void *), SMP_CACHE_BYTES), gfp); 441 return kcalloc(size, sizeof(void *), gfp);
442} 442}
443 443
444static inline void __ptr_ring_set_size(struct ptr_ring *r, int size) 444static inline void __ptr_ring_set_size(struct ptr_ring *r, int size)
@@ -582,7 +582,8 @@ static inline int ptr_ring_resize(struct ptr_ring *r, int size, gfp_t gfp,
582 * In particular if you consume ring in interrupt or BH context, you must 582 * In particular if you consume ring in interrupt or BH context, you must
583 * disable interrupts/BH when doing so. 583 * disable interrupts/BH when doing so.
584 */ 584 */
585static inline int ptr_ring_resize_multiple(struct ptr_ring **rings, int nrings, 585static inline int ptr_ring_resize_multiple(struct ptr_ring **rings,
586 unsigned int nrings,
586 int size, 587 int size,
587 gfp_t gfp, void (*destroy)(void *)) 588 gfp_t gfp, void (*destroy)(void *))
588{ 589{
@@ -590,7 +591,7 @@ static inline int ptr_ring_resize_multiple(struct ptr_ring **rings, int nrings,
590 void ***queues; 591 void ***queues;
591 int i; 592 int i;
592 593
593 queues = kmalloc(nrings * sizeof *queues, gfp); 594 queues = kmalloc_array(nrings, sizeof(*queues), gfp);
594 if (!queues) 595 if (!queues)
595 goto noqueues; 596 goto noqueues;
596 597
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 8337e2db0bb2..c05ac5f5aa03 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1163,13 +1163,6 @@ static inline pid_t task_tgid_nr(struct task_struct *tsk)
1163 return tsk->tgid; 1163 return tsk->tgid;
1164} 1164}
1165 1165
1166extern pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns);
1167
1168static inline pid_t task_tgid_vnr(struct task_struct *tsk)
1169{
1170 return pid_vnr(task_tgid(tsk));
1171}
1172
1173/** 1166/**
1174 * pid_alive - check that a task structure is not stale 1167 * pid_alive - check that a task structure is not stale
1175 * @p: Task structure to be checked. 1168 * @p: Task structure to be checked.
@@ -1185,23 +1178,6 @@ static inline int pid_alive(const struct task_struct *p)
1185 return p->pids[PIDTYPE_PID].pid != NULL; 1178 return p->pids[PIDTYPE_PID].pid != NULL;
1186} 1179}
1187 1180
1188static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns)
1189{
1190 pid_t pid = 0;
1191
1192 rcu_read_lock();
1193 if (pid_alive(tsk))
1194 pid = task_tgid_nr_ns(rcu_dereference(tsk->real_parent), ns);
1195 rcu_read_unlock();
1196
1197 return pid;
1198}
1199
1200static inline pid_t task_ppid_nr(const struct task_struct *tsk)
1201{
1202 return task_ppid_nr_ns(tsk, &init_pid_ns);
1203}
1204
1205static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) 1181static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
1206{ 1182{
1207 return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns); 1183 return __task_pid_nr_ns(tsk, PIDTYPE_PGID, ns);
@@ -1223,6 +1199,33 @@ static inline pid_t task_session_vnr(struct task_struct *tsk)
1223 return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL); 1199 return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL);
1224} 1200}
1225 1201
1202static inline pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
1203{
1204 return __task_pid_nr_ns(tsk, __PIDTYPE_TGID, ns);
1205}
1206
1207static inline pid_t task_tgid_vnr(struct task_struct *tsk)
1208{
1209 return __task_pid_nr_ns(tsk, __PIDTYPE_TGID, NULL);
1210}
1211
1212static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns)
1213{
1214 pid_t pid = 0;
1215
1216 rcu_read_lock();
1217 if (pid_alive(tsk))
1218 pid = task_tgid_nr_ns(rcu_dereference(tsk->real_parent), ns);
1219 rcu_read_unlock();
1220
1221 return pid;
1222}
1223
1224static inline pid_t task_ppid_nr(const struct task_struct *tsk)
1225{
1226 return task_ppid_nr_ns(tsk, &init_pid_ns);
1227}
1228
1226/* Obsolete, do not use: */ 1229/* Obsolete, do not use: */
1227static inline pid_t task_pgrp_nr(struct task_struct *tsk) 1230static inline pid_t task_pgrp_nr(struct task_struct *tsk)
1228{ 1231{
diff --git a/include/linux/skb_array.h b/include/linux/skb_array.h
index 35226cd4efb0..8621ffdeecbf 100644
--- a/include/linux/skb_array.h
+++ b/include/linux/skb_array.h
@@ -193,7 +193,8 @@ static inline int skb_array_resize(struct skb_array *a, int size, gfp_t gfp)
193} 193}
194 194
195static inline int skb_array_resize_multiple(struct skb_array **rings, 195static inline int skb_array_resize_multiple(struct skb_array **rings,
196 int nrings, int size, gfp_t gfp) 196 int nrings, unsigned int size,
197 gfp_t gfp)
197{ 198{
198 BUILD_BUG_ON(offsetof(struct skb_array, ring)); 199 BUILD_BUG_ON(offsetof(struct skb_array, ring));
199 return ptr_ring_resize_multiple((struct ptr_ring **)rings, 200 return ptr_ring_resize_multiple((struct ptr_ring **)rings,
diff --git a/include/linux/sync_file.h b/include/linux/sync_file.h
index 5726107963b2..0ad87c434ae6 100644
--- a/include/linux/sync_file.h
+++ b/include/linux/sync_file.h
@@ -43,12 +43,13 @@ struct sync_file {
43#endif 43#endif
44 44
45 wait_queue_head_t wq; 45 wait_queue_head_t wq;
46 unsigned long flags;
46 47
47 struct dma_fence *fence; 48 struct dma_fence *fence;
48 struct dma_fence_cb cb; 49 struct dma_fence_cb cb;
49}; 50};
50 51
51#define POLL_ENABLED DMA_FENCE_FLAG_USER_BITS 52#define POLL_ENABLED 0
52 53
53struct sync_file *sync_file_create(struct dma_fence *fence); 54struct sync_file *sync_file_create(struct dma_fence *fence);
54struct dma_fence *sync_file_get_fence(int fd); 55struct dma_fence *sync_file_get_fence(int fd);
diff --git a/include/linux/vfio.h b/include/linux/vfio.h
index 586809abb273..a47b985341d1 100644
--- a/include/linux/vfio.h
+++ b/include/linux/vfio.h
@@ -152,7 +152,7 @@ extern int vfio_set_irqs_validate_and_prepare(struct vfio_irq_set *hdr,
152 size_t *data_size); 152 size_t *data_size);
153 153
154struct pci_dev; 154struct pci_dev;
155#ifdef CONFIG_EEH 155#if IS_ENABLED(CONFIG_VFIO_SPAPR_EEH)
156extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev); 156extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev);
157extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev); 157extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev);
158extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, 158extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
@@ -173,7 +173,7 @@ static inline long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
173{ 173{
174 return -ENOTTY; 174 return -ENOTTY;
175} 175}
176#endif /* CONFIG_EEH */ 176#endif /* CONFIG_VFIO_SPAPR_EEH */
177 177
178/* 178/*
179 * IRQfd - generic 179 * IRQfd - generic
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 5b74e36c0ca8..dc19880c02f5 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -757,6 +757,43 @@ extern int do_wait_intr_irq(wait_queue_head_t *, wait_queue_entry_t *);
757 __ret; \ 757 __ret; \
758}) 758})
759 759
760#define __wait_event_killable_timeout(wq_head, condition, timeout) \
761 ___wait_event(wq_head, ___wait_cond_timeout(condition), \
762 TASK_KILLABLE, 0, timeout, \
763 __ret = schedule_timeout(__ret))
764
765/**
766 * wait_event_killable_timeout - sleep until a condition gets true or a timeout elapses
767 * @wq_head: the waitqueue to wait on
768 * @condition: a C expression for the event to wait for
769 * @timeout: timeout, in jiffies
770 *
771 * The process is put to sleep (TASK_KILLABLE) until the
772 * @condition evaluates to true or a kill signal is received.
773 * The @condition is checked each time the waitqueue @wq_head is woken up.
774 *
775 * wake_up() has to be called after changing any variable that could
776 * change the result of the wait condition.
777 *
778 * Returns:
779 * 0 if the @condition evaluated to %false after the @timeout elapsed,
780 * 1 if the @condition evaluated to %true after the @timeout elapsed,
781 * the remaining jiffies (at least 1) if the @condition evaluated
782 * to %true before the @timeout elapsed, or -%ERESTARTSYS if it was
783 * interrupted by a kill signal.
784 *
785 * Only kill signals interrupt this process.
786 */
787#define wait_event_killable_timeout(wq_head, condition, timeout) \
788({ \
789 long __ret = timeout; \
790 might_sleep(); \
791 if (!___wait_cond_timeout(condition)) \
792 __ret = __wait_event_killable_timeout(wq_head, \
793 condition, timeout); \
794 __ret; \
795})
796
760 797
761#define __wait_event_lock_irq(wq_head, condition, lock, cmd) \ 798#define __wait_event_lock_irq(wq_head, condition, lock, cmd) \
762 (void)___wait_event(wq_head, condition, TASK_UNINTERRUPTIBLE, 0, 0, \ 799 (void)___wait_event(wq_head, condition, TASK_UNINTERRUPTIBLE, 0, 0, \
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index c102ef65cb64..db6dc9dc0482 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -323,6 +323,7 @@ enum {
323 323
324 __WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */ 324 __WQ_DRAINING = 1 << 16, /* internal: workqueue is draining */
325 __WQ_ORDERED = 1 << 17, /* internal: workqueue is ordered */ 325 __WQ_ORDERED = 1 << 17, /* internal: workqueue is ordered */
326 __WQ_ORDERED_EXPLICIT = 1 << 18, /* internal: alloc_ordered_workqueue() */
326 __WQ_LEGACY = 1 << 18, /* internal: create*_workqueue() */ 327 __WQ_LEGACY = 1 << 18, /* internal: create*_workqueue() */
327 328
328 WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */ 329 WQ_MAX_ACTIVE = 512, /* I like 512, better ideas? */
@@ -422,7 +423,8 @@ __alloc_workqueue_key(const char *fmt, unsigned int flags, int max_active,
422 * Pointer to the allocated workqueue on success, %NULL on failure. 423 * Pointer to the allocated workqueue on success, %NULL on failure.
423 */ 424 */
424#define alloc_ordered_workqueue(fmt, flags, args...) \ 425#define alloc_ordered_workqueue(fmt, flags, args...) \
425 alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | (flags), 1, ##args) 426 alloc_workqueue(fmt, WQ_UNBOUND | __WQ_ORDERED | \
427 __WQ_ORDERED_EXPLICIT | (flags), 1, ##args)
426 428
427#define create_workqueue(name) \ 429#define create_workqueue(name) \
428 alloc_workqueue("%s", __WQ_LEGACY | WQ_MEM_RECLAIM, 1, (name)) 430 alloc_workqueue("%s", __WQ_LEGACY | WQ_MEM_RECLAIM, 1, (name))
diff --git a/include/media/cec-notifier.h b/include/media/cec-notifier.h
index 298f996969df..a4f7429c4ae5 100644
--- a/include/media/cec-notifier.h
+++ b/include/media/cec-notifier.h
@@ -57,6 +57,7 @@ void cec_notifier_put(struct cec_notifier *n);
57 * @pa: the CEC physical address 57 * @pa: the CEC physical address
58 * 58 *
59 * Set a new CEC physical address. 59 * Set a new CEC physical address.
60 * Does nothing if @n == NULL.
60 */ 61 */
61void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa); 62void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa);
62 63
@@ -66,6 +67,7 @@ void cec_notifier_set_phys_addr(struct cec_notifier *n, u16 pa);
66 * @edid: the struct edid pointer 67 * @edid: the struct edid pointer
67 * 68 *
68 * Parses the EDID to obtain the new CEC physical address and set it. 69 * Parses the EDID to obtain the new CEC physical address and set it.
70 * Does nothing if @n == NULL.
69 */ 71 */
70void cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n, 72void cec_notifier_set_phys_addr_from_edid(struct cec_notifier *n,
71 const struct edid *edid); 73 const struct edid *edid);
@@ -118,4 +120,17 @@ static inline void cec_notifier_unregister(struct cec_notifier *n)
118 120
119#endif 121#endif
120 122
123/**
124 * cec_notifier_phys_addr_invalidate() - set the physical address to INVALID
125 *
126 * @n: the CEC notifier
127 *
128 * This is a simple helper function to invalidate the physical
129 * address. Does nothing if @n == NULL.
130 */
131static inline void cec_notifier_phys_addr_invalidate(struct cec_notifier *n)
132{
133 cec_notifier_set_phys_addr(n, CEC_PHYS_ADDR_INVALID);
134}
135
121#endif 136#endif
diff --git a/include/media/davinci/dm644x_ccdc.h b/include/media/davinci/dm644x_ccdc.h
index 7c909da29d43..6ea2ce241851 100644
--- a/include/media/davinci/dm644x_ccdc.h
+++ b/include/media/davinci/dm644x_ccdc.h
@@ -103,16 +103,6 @@ struct ccdc_black_compensation {
103 char gb; 103 char gb;
104}; 104};
105 105
106/* structure for fault pixel correction */
107struct ccdc_fault_pixel {
108 /* Enable or Disable fault pixel correction */
109 unsigned char enable;
110 /* Number of fault pixel */
111 unsigned short fp_num;
112 /* Address of fault pixel table */
113 unsigned long fpc_table_addr;
114};
115
116/* Structure for CCDC configuration parameters for raw capture mode passed 106/* Structure for CCDC configuration parameters for raw capture mode passed
117 * by application 107 * by application
118 */ 108 */
@@ -125,8 +115,6 @@ struct ccdc_config_params_raw {
125 struct ccdc_black_clamp blk_clamp; 115 struct ccdc_black_clamp blk_clamp;
126 /* Structure for Black Compensation */ 116 /* Structure for Black Compensation */
127 struct ccdc_black_compensation blk_comp; 117 struct ccdc_black_compensation blk_comp;
128 /* Structure for Fault Pixel Module Configuration */
129 struct ccdc_fault_pixel fault_pxl;
130}; 118};
131 119
132 120
diff --git a/include/media/davinci/vpfe_capture.h b/include/media/davinci/vpfe_capture.h
index 8e1a4d88daa0..f003533602d0 100644
--- a/include/media/davinci/vpfe_capture.h
+++ b/include/media/davinci/vpfe_capture.h
@@ -183,14 +183,4 @@ struct vpfe_config_params {
183}; 183};
184 184
185#endif /* End of __KERNEL__ */ 185#endif /* End of __KERNEL__ */
186/**
187 * VPFE_CMD_S_CCDC_RAW_PARAMS - EXPERIMENTAL IOCTL to set raw capture params
188 * This can be used to configure modules such as defect pixel correction,
189 * color space conversion, culling etc. This is an experimental ioctl that
190 * will change in future kernels. So use this ioctl with care !
191 * TODO: This is to be split into multiple ioctls and also explore the
192 * possibility of extending the v4l2 api to include this
193 **/
194#define VPFE_CMD_S_CCDC_RAW_PARAMS _IOW('V', BASE_VIDIOC_PRIVATE + 1, \
195 void *)
196#endif /* _DAVINCI_VPFE_H */ 186#endif /* _DAVINCI_VPFE_H */
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index 6df79e96a780..f44ff2476758 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -336,6 +336,16 @@ static inline void in6_dev_put(struct inet6_dev *idev)
336 in6_dev_finish_destroy(idev); 336 in6_dev_finish_destroy(idev);
337} 337}
338 338
339static inline void in6_dev_put_clear(struct inet6_dev **pidev)
340{
341 struct inet6_dev *idev = *pidev;
342
343 if (idev) {
344 in6_dev_put(idev);
345 *pidev = NULL;
346 }
347}
348
339static inline void __in6_dev_put(struct inet6_dev *idev) 349static inline void __in6_dev_put(struct inet6_dev *idev)
340{ 350{
341 refcount_dec(&idev->refcnt); 351 refcount_dec(&idev->refcnt);
diff --git a/include/net/bonding.h b/include/net/bonding.h
index b00508d22e0a..b2e68657a216 100644
--- a/include/net/bonding.h
+++ b/include/net/bonding.h
@@ -277,6 +277,11 @@ static inline bool bond_is_lb(const struct bonding *bond)
277 BOND_MODE(bond) == BOND_MODE_ALB; 277 BOND_MODE(bond) == BOND_MODE_ALB;
278} 278}
279 279
280static inline bool bond_needs_speed_duplex(const struct bonding *bond)
281{
282 return BOND_MODE(bond) == BOND_MODE_8023AD || bond_is_lb(bond);
283}
284
280static inline bool bond_is_nondyn_tlb(const struct bonding *bond) 285static inline bool bond_is_nondyn_tlb(const struct bonding *bond)
281{ 286{
282 return (BOND_MODE(bond) == BOND_MODE_TLB) && 287 return (BOND_MODE(bond) == BOND_MODE_TLB) &&
diff --git a/include/net/busy_poll.h b/include/net/busy_poll.h
index 8ffd434676b7..71c72a939bf8 100644
--- a/include/net/busy_poll.h
+++ b/include/net/busy_poll.h
@@ -29,18 +29,18 @@
29#include <linux/sched/signal.h> 29#include <linux/sched/signal.h>
30#include <net/ip.h> 30#include <net/ip.h>
31 31
32#ifdef CONFIG_NET_RX_BUSY_POLL
33
34struct napi_struct;
35extern unsigned int sysctl_net_busy_read __read_mostly;
36extern unsigned int sysctl_net_busy_poll __read_mostly;
37
38/* 0 - Reserved to indicate value not set 32/* 0 - Reserved to indicate value not set
39 * 1..NR_CPUS - Reserved for sender_cpu 33 * 1..NR_CPUS - Reserved for sender_cpu
40 * NR_CPUS+1..~0 - Region available for NAPI IDs 34 * NR_CPUS+1..~0 - Region available for NAPI IDs
41 */ 35 */
42#define MIN_NAPI_ID ((unsigned int)(NR_CPUS + 1)) 36#define MIN_NAPI_ID ((unsigned int)(NR_CPUS + 1))
43 37
38#ifdef CONFIG_NET_RX_BUSY_POLL
39
40struct napi_struct;
41extern unsigned int sysctl_net_busy_read __read_mostly;
42extern unsigned int sysctl_net_busy_poll __read_mostly;
43
44static inline bool net_busy_loop_on(void) 44static inline bool net_busy_loop_on(void)
45{ 45{
46 return sysctl_net_busy_poll; 46 return sysctl_net_busy_poll;
diff --git a/include/net/ip.h b/include/net/ip.h
index 821cedcc8e73..0cf7f5a65fe6 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -352,7 +352,7 @@ static inline unsigned int ip_dst_mtu_maybe_forward(const struct dst_entry *dst,
352 !forwarding) 352 !forwarding)
353 return dst_mtu(dst); 353 return dst_mtu(dst);
354 354
355 return min(dst->dev->mtu, IP_MAX_MTU); 355 return min(READ_ONCE(dst->dev->mtu), IP_MAX_MTU);
356} 356}
357 357
358static inline unsigned int ip_skb_dst_mtu(struct sock *sk, 358static inline unsigned int ip_skb_dst_mtu(struct sock *sk,
@@ -364,7 +364,7 @@ static inline unsigned int ip_skb_dst_mtu(struct sock *sk,
364 return ip_dst_mtu_maybe_forward(skb_dst(skb), forwarding); 364 return ip_dst_mtu_maybe_forward(skb_dst(skb), forwarding);
365 } 365 }
366 366
367 return min(skb_dst(skb)->dev->mtu, IP_MAX_MTU); 367 return min(READ_ONCE(skb_dst(skb)->dev->mtu), IP_MAX_MTU);
368} 368}
369 369
370u32 ip_idents_reserve(u32 hash, int segs); 370u32 ip_idents_reserve(u32 hash, int segs);
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index b2b5419467cc..f8149ca192b4 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -5499,6 +5499,21 @@ static inline void ieee80211_stop_rx_ba_session_offl(struct ieee80211_vif *vif,
5499 ieee80211_manage_rx_ba_offl(vif, addr, tid + IEEE80211_NUM_TIDS); 5499 ieee80211_manage_rx_ba_offl(vif, addr, tid + IEEE80211_NUM_TIDS);
5500} 5500}
5501 5501
5502/**
5503 * ieee80211_rx_ba_timer_expired - stop a Rx BA session due to timeout
5504 *
5505 * Some device drivers do not offload AddBa/DelBa negotiation, but handle rx
5506 * buffer reording internally, and therefore also handle the session timer.
5507 *
5508 * Trigger the timeout flow, which sends a DelBa.
5509 *
5510 * @vif: &struct ieee80211_vif pointer from the add_interface callback
5511 * @addr: station mac address
5512 * @tid: the rx tid
5513 */
5514void ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif,
5515 const u8 *addr, unsigned int tid);
5516
5502/* Rate control API */ 5517/* Rate control API */
5503 5518
5504/** 5519/**
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 1c123e2b2415..67f815e5d525 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -806,8 +806,11 @@ static inline struct Qdisc *qdisc_replace(struct Qdisc *sch, struct Qdisc *new,
806 old = *pold; 806 old = *pold;
807 *pold = new; 807 *pold = new;
808 if (old != NULL) { 808 if (old != NULL) {
809 qdisc_tree_reduce_backlog(old, old->q.qlen, old->qstats.backlog); 809 unsigned int qlen = old->q.qlen;
810 unsigned int backlog = old->qstats.backlog;
811
810 qdisc_reset(old); 812 qdisc_reset(old);
813 qdisc_tree_reduce_backlog(old, qlen, backlog);
811 } 814 }
812 sch_tree_unlock(sch); 815 sch_tree_unlock(sch);
813 816
diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 980807d7506f..45fd4c6056b5 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -469,7 +469,7 @@ _sctp_walk_params((pos), (chunk), ntohs((chunk)->chunk_hdr.length), member)
469 469
470#define _sctp_walk_params(pos, chunk, end, member)\ 470#define _sctp_walk_params(pos, chunk, end, member)\
471for (pos.v = chunk->member;\ 471for (pos.v = chunk->member;\
472 (pos.v + offsetof(struct sctp_paramhdr, length) + sizeof(pos.p->length) <\ 472 (pos.v + offsetof(struct sctp_paramhdr, length) + sizeof(pos.p->length) <=\
473 (void *)chunk + end) &&\ 473 (void *)chunk + end) &&\
474 pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\ 474 pos.v <= (void *)chunk + end - ntohs(pos.p->length) &&\
475 ntohs(pos.p->length) >= sizeof(struct sctp_paramhdr);\ 475 ntohs(pos.p->length) >= sizeof(struct sctp_paramhdr);\
@@ -481,7 +481,7 @@ _sctp_walk_errors((err), (chunk_hdr), ntohs((chunk_hdr)->length))
481#define _sctp_walk_errors(err, chunk_hdr, end)\ 481#define _sctp_walk_errors(err, chunk_hdr, end)\
482for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \ 482for (err = (sctp_errhdr_t *)((void *)chunk_hdr + \
483 sizeof(struct sctp_chunkhdr));\ 483 sizeof(struct sctp_chunkhdr));\
484 ((void *)err + offsetof(sctp_errhdr_t, length) + sizeof(err->length) <\ 484 ((void *)err + offsetof(sctp_errhdr_t, length) + sizeof(err->length) <=\
485 (void *)chunk_hdr + end) &&\ 485 (void *)chunk_hdr + end) &&\
486 (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\ 486 (void *)err <= (void *)chunk_hdr + end - ntohs(err->length) &&\
487 ntohs(err->length) >= sizeof(sctp_errhdr_t); \ 487 ntohs(err->length) >= sizeof(sctp_errhdr_t); \
diff --git a/include/net/sock.h b/include/net/sock.h
index 7c0632c7e870..aeeec62992ca 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -507,9 +507,7 @@ int sk_set_peek_off(struct sock *sk, int val);
507static inline int sk_peek_offset(struct sock *sk, int flags) 507static inline int sk_peek_offset(struct sock *sk, int flags)
508{ 508{
509 if (unlikely(flags & MSG_PEEK)) { 509 if (unlikely(flags & MSG_PEEK)) {
510 s32 off = READ_ONCE(sk->sk_peek_off); 510 return READ_ONCE(sk->sk_peek_off);
511 if (off >= 0)
512 return off;
513 } 511 }
514 512
515 return 0; 513 return 0;
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 70483296157f..ada65e767b28 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1916,6 +1916,16 @@ extern void tcp_rack_advance(struct tcp_sock *tp, u8 sacked, u32 end_seq,
1916 u64 xmit_time); 1916 u64 xmit_time);
1917extern void tcp_rack_reo_timeout(struct sock *sk); 1917extern void tcp_rack_reo_timeout(struct sock *sk);
1918 1918
1919/* At how many usecs into the future should the RTO fire? */
1920static inline s64 tcp_rto_delta_us(const struct sock *sk)
1921{
1922 const struct sk_buff *skb = tcp_write_queue_head(sk);
1923 u32 rto = inet_csk(sk)->icsk_rto;
1924 u64 rto_time_stamp_us = skb->skb_mstamp + jiffies_to_usecs(rto);
1925
1926 return rto_time_stamp_us - tcp_sk(sk)->tcp_mstamp;
1927}
1928
1919/* 1929/*
1920 * Save and compile IPv4 options, return a pointer to it 1930 * Save and compile IPv4 options, return a pointer to it
1921 */ 1931 */
diff --git a/include/net/udp.h b/include/net/udp.h
index 972ce4baab6b..586de4b811b5 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -260,6 +260,7 @@ static inline struct sk_buff *skb_recv_udp(struct sock *sk, unsigned int flags,
260} 260}
261 261
262void udp_v4_early_demux(struct sk_buff *skb); 262void udp_v4_early_demux(struct sk_buff *skb);
263void udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst);
263int udp_get_port(struct sock *sk, unsigned short snum, 264int udp_get_port(struct sock *sk, unsigned short snum,
264 int (*saddr_cmp)(const struct sock *, 265 int (*saddr_cmp)(const struct sock *,
265 const struct sock *)); 266 const struct sock *));
@@ -305,33 +306,44 @@ struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
305/* UDP uses skb->dev_scratch to cache as much information as possible and avoid 306/* UDP uses skb->dev_scratch to cache as much information as possible and avoid
306 * possibly multiple cache miss on dequeue() 307 * possibly multiple cache miss on dequeue()
307 */ 308 */
308#if BITS_PER_LONG == 64
309
310/* truesize, len and the bit needed to compute skb_csum_unnecessary will be on
311 * cold cache lines at recvmsg time.
312 * skb->len can be stored on 16 bits since the udp header has been already
313 * validated and pulled.
314 */
315struct udp_dev_scratch { 309struct udp_dev_scratch {
316 u32 truesize; 310 /* skb->truesize and the stateless bit are embedded in a single field;
311 * do not use a bitfield since the compiler emits better/smaller code
312 * this way
313 */
314 u32 _tsize_state;
315
316#if BITS_PER_LONG == 64
317 /* len and the bit needed to compute skb_csum_unnecessary
318 * will be on cold cache lines at recvmsg time.
319 * skb->len can be stored on 16 bits since the udp header has been
320 * already validated and pulled.
321 */
317 u16 len; 322 u16 len;
318 bool is_linear; 323 bool is_linear;
319 bool csum_unnecessary; 324 bool csum_unnecessary;
325#endif
320}; 326};
321 327
328static inline struct udp_dev_scratch *udp_skb_scratch(struct sk_buff *skb)
329{
330 return (struct udp_dev_scratch *)&skb->dev_scratch;
331}
332
333#if BITS_PER_LONG == 64
322static inline unsigned int udp_skb_len(struct sk_buff *skb) 334static inline unsigned int udp_skb_len(struct sk_buff *skb)
323{ 335{
324 return ((struct udp_dev_scratch *)&skb->dev_scratch)->len; 336 return udp_skb_scratch(skb)->len;
325} 337}
326 338
327static inline bool udp_skb_csum_unnecessary(struct sk_buff *skb) 339static inline bool udp_skb_csum_unnecessary(struct sk_buff *skb)
328{ 340{
329 return ((struct udp_dev_scratch *)&skb->dev_scratch)->csum_unnecessary; 341 return udp_skb_scratch(skb)->csum_unnecessary;
330} 342}
331 343
332static inline bool udp_skb_is_linear(struct sk_buff *skb) 344static inline bool udp_skb_is_linear(struct sk_buff *skb)
333{ 345{
334 return ((struct udp_dev_scratch *)&skb->dev_scratch)->is_linear; 346 return udp_skb_scratch(skb)->is_linear;
335} 347}
336 348
337#else 349#else
@@ -354,12 +366,13 @@ static inline bool udp_skb_is_linear(struct sk_buff *skb)
354static inline int copy_linear_skb(struct sk_buff *skb, int len, int off, 366static inline int copy_linear_skb(struct sk_buff *skb, int len, int off,
355 struct iov_iter *to) 367 struct iov_iter *to)
356{ 368{
357 int n, copy = len - off; 369 int n;
358 370
359 n = copy_to_iter(skb->data + off, copy, to); 371 n = copy_to_iter(skb->data + off, len, to);
360 if (n == copy) 372 if (n == len)
361 return 0; 373 return 0;
362 374
375 iov_iter_revert(to, n);
363 return -EFAULT; 376 return -EFAULT;
364} 377}
365 378
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index b5732432bb29..88c32aba32f7 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -1683,6 +1683,7 @@ struct ib_qp {
1683 enum ib_qp_type qp_type; 1683 enum ib_qp_type qp_type;
1684 struct ib_rwq_ind_table *rwq_ind_tbl; 1684 struct ib_rwq_ind_table *rwq_ind_tbl;
1685 struct ib_qp_security *qp_sec; 1685 struct ib_qp_security *qp_sec;
1686 u8 port;
1686}; 1687};
1687 1688
1688struct ib_mr { 1689struct ib_mr {
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index a1266d318c85..6af198d8120b 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -57,6 +57,7 @@ struct scsi_pointer {
57/* for scmd->flags */ 57/* for scmd->flags */
58#define SCMD_TAGGED (1 << 0) 58#define SCMD_TAGGED (1 << 0)
59#define SCMD_UNCHECKED_ISA_DMA (1 << 1) 59#define SCMD_UNCHECKED_ISA_DMA (1 << 1)
60#define SCMD_ZONE_WRITE_LOCK (1 << 2)
60 61
61struct scsi_cmnd { 62struct scsi_cmnd {
62 struct scsi_request req; 63 struct scsi_request req;
diff --git a/include/sound/rt5663.h b/include/sound/rt5663.h
new file mode 100644
index 000000000000..7d00e5849706
--- /dev/null
+++ b/include/sound/rt5663.h
@@ -0,0 +1,22 @@
1/*
2 * linux/sound/rt5663.h -- Platform data for RT5663
3 *
4 * Copyright 2017 Realtek Semiconductor Corp.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __LINUX_SND_RT5663_H
12#define __LINUX_SND_RT5663_H
13
14struct rt5663_platform_data {
15 unsigned int dc_offset_l_manual;
16 unsigned int dc_offset_r_manual;
17 unsigned int dc_offset_l_manual_mic;
18 unsigned int dc_offset_r_manual_mic;
19};
20
21#endif
22
diff --git a/include/sound/soc.h b/include/sound/soc.h
index c4a8b1947566..d22de9712c45 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -469,10 +469,10 @@ int snd_soc_register_codec(struct device *dev,
469 struct snd_soc_dai_driver *dai_drv, int num_dai); 469 struct snd_soc_dai_driver *dai_drv, int num_dai);
470void snd_soc_unregister_codec(struct device *dev); 470void snd_soc_unregister_codec(struct device *dev);
471int snd_soc_register_component(struct device *dev, 471int snd_soc_register_component(struct device *dev,
472 const struct snd_soc_component_driver *cmpnt_drv, 472 const struct snd_soc_component_driver *component_driver,
473 struct snd_soc_dai_driver *dai_drv, int num_dai); 473 struct snd_soc_dai_driver *dai_drv, int num_dai);
474int devm_snd_soc_register_component(struct device *dev, 474int devm_snd_soc_register_component(struct device *dev,
475 const struct snd_soc_component_driver *cmpnt_drv, 475 const struct snd_soc_component_driver *component_driver,
476 struct snd_soc_dai_driver *dai_drv, int num_dai); 476 struct snd_soc_dai_driver *dai_drv, int num_dai);
477void snd_soc_unregister_component(struct device *dev); 477void snd_soc_unregister_component(struct device *dev);
478int snd_soc_cache_init(struct snd_soc_codec *codec); 478int snd_soc_cache_init(struct snd_soc_codec *codec);
@@ -795,6 +795,14 @@ struct snd_soc_component_driver {
795 int (*suspend)(struct snd_soc_component *); 795 int (*suspend)(struct snd_soc_component *);
796 int (*resume)(struct snd_soc_component *); 796 int (*resume)(struct snd_soc_component *);
797 797
798 /* component wide operations */
799 int (*set_sysclk)(struct snd_soc_component *component,
800 int clk_id, int source, unsigned int freq, int dir);
801 int (*set_pll)(struct snd_soc_component *component, int pll_id,
802 int source, unsigned int freq_in, unsigned int freq_out);
803 int (*set_jack)(struct snd_soc_component *component,
804 struct snd_soc_jack *jack, void *data);
805
798 /* DT */ 806 /* DT */
799 int (*of_xlate_dai_name)(struct snd_soc_component *component, 807 int (*of_xlate_dai_name)(struct snd_soc_component *component,
800 struct of_phandle_args *args, 808 struct of_phandle_args *args,
@@ -858,12 +866,6 @@ struct snd_soc_component {
858 /* Don't use these, use snd_soc_component_get_dapm() */ 866 /* Don't use these, use snd_soc_component_get_dapm() */
859 struct snd_soc_dapm_context dapm; 867 struct snd_soc_dapm_context dapm;
860 868
861 const struct snd_kcontrol_new *controls;
862 unsigned int num_controls;
863 const struct snd_soc_dapm_widget *dapm_widgets;
864 unsigned int num_dapm_widgets;
865 const struct snd_soc_dapm_route *dapm_routes;
866 unsigned int num_dapm_routes;
867 struct snd_soc_codec *codec; 869 struct snd_soc_codec *codec;
868 870
869 int (*probe)(struct snd_soc_component *); 871 int (*probe)(struct snd_soc_component *);
@@ -871,6 +873,13 @@ struct snd_soc_component {
871 int (*suspend)(struct snd_soc_component *); 873 int (*suspend)(struct snd_soc_component *);
872 int (*resume)(struct snd_soc_component *); 874 int (*resume)(struct snd_soc_component *);
873 875
876 int (*set_sysclk)(struct snd_soc_component *component,
877 int clk_id, int source, unsigned int freq, int dir);
878 int (*set_pll)(struct snd_soc_component *component, int pll_id,
879 int source, unsigned int freq_in, unsigned int freq_out);
880 int (*set_jack)(struct snd_soc_component *component,
881 struct snd_soc_jack *jack, void *data);
882
874 /* machine specific init */ 883 /* machine specific init */
875 int (*init)(struct snd_soc_component *component); 884 int (*init)(struct snd_soc_component *component);
876 885
@@ -880,6 +889,18 @@ struct snd_soc_component {
880#endif 889#endif
881}; 890};
882 891
892struct snd_soc_rtdcom_list {
893 struct snd_soc_component *component;
894 struct list_head list; /* rtd::component_list */
895};
896struct snd_soc_component*
897snd_soc_rtdcom_lookup(struct snd_soc_pcm_runtime *rtd,
898 const char *driver_name);
899#define for_each_rtdcom(rtd, rtdcom) \
900 list_for_each_entry(rtdcom, &(rtd)->component_list, list)
901#define for_each_rtdcom_safe(rtd, rtdcom1, rtdcom2) \
902 list_for_each_entry_safe(rtdcom1, rtdcom2, &(rtd)->component_list, list)
903
883/* SoC Audio Codec device */ 904/* SoC Audio Codec device */
884struct snd_soc_codec { 905struct snd_soc_codec {
885 struct device *dev; 906 struct device *dev;
@@ -888,7 +909,6 @@ struct snd_soc_codec {
888 struct list_head list; 909 struct list_head list;
889 910
890 /* runtime */ 911 /* runtime */
891 unsigned int cache_bypass:1; /* Suppress access to the cache */
892 unsigned int cache_init:1; /* codec cache has been initialized */ 912 unsigned int cache_init:1; /* codec cache has been initialized */
893 913
894 /* codec IO */ 914 /* codec IO */
@@ -898,10 +918,6 @@ struct snd_soc_codec {
898 918
899 /* component */ 919 /* component */
900 struct snd_soc_component component; 920 struct snd_soc_component component;
901
902#ifdef CONFIG_DEBUG_FS
903 struct dentry *debugfs_reg;
904#endif
905}; 921};
906 922
907/* codec driver */ 923/* codec driver */
@@ -1224,7 +1240,7 @@ struct snd_soc_pcm_runtime {
1224 struct snd_pcm *pcm; 1240 struct snd_pcm *pcm;
1225 struct snd_compr *compr; 1241 struct snd_compr *compr;
1226 struct snd_soc_codec *codec; 1242 struct snd_soc_codec *codec;
1227 struct snd_soc_platform *platform; 1243 struct snd_soc_platform *platform; /* will be removed */
1228 struct snd_soc_dai *codec_dai; 1244 struct snd_soc_dai *codec_dai;
1229 struct snd_soc_dai *cpu_dai; 1245 struct snd_soc_dai *cpu_dai;
1230 1246
@@ -1234,11 +1250,11 @@ struct snd_soc_pcm_runtime {
1234 struct delayed_work delayed_work; 1250 struct delayed_work delayed_work;
1235#ifdef CONFIG_DEBUG_FS 1251#ifdef CONFIG_DEBUG_FS
1236 struct dentry *debugfs_dpcm_root; 1252 struct dentry *debugfs_dpcm_root;
1237 struct dentry *debugfs_dpcm_state;
1238#endif 1253#endif
1239 1254
1240 unsigned int num; /* 0-based and monotonic increasing */ 1255 unsigned int num; /* 0-based and monotonic increasing */
1241 struct list_head list; /* rtd list of the soc card */ 1256 struct list_head list; /* rtd list of the soc card */
1257 struct list_head component_list; /* list of connected components */
1242 1258
1243 /* bit field */ 1259 /* bit field */
1244 unsigned int dev_registered:1; 1260 unsigned int dev_registered:1;
@@ -1465,6 +1481,13 @@ void snd_soc_component_async_complete(struct snd_soc_component *component);
1465int snd_soc_component_test_bits(struct snd_soc_component *component, 1481int snd_soc_component_test_bits(struct snd_soc_component *component,
1466 unsigned int reg, unsigned int mask, unsigned int value); 1482 unsigned int reg, unsigned int mask, unsigned int value);
1467 1483
1484/* component wide operations */
1485int snd_soc_component_set_sysclk(struct snd_soc_component *component,
1486 int clk_id, int source, unsigned int freq, int dir);
1487int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
1488 int source, unsigned int freq_in,
1489 unsigned int freq_out);
1490
1468#ifdef CONFIG_REGMAP 1491#ifdef CONFIG_REGMAP
1469 1492
1470void snd_soc_component_init_regmap(struct snd_soc_component *component, 1493void snd_soc_component_init_regmap(struct snd_soc_component *component,
diff --git a/include/target/iscsi/iscsi_target_core.h b/include/target/iscsi/iscsi_target_core.h
index 0ca1fb08805b..fb87d32f5e51 100644
--- a/include/target/iscsi/iscsi_target_core.h
+++ b/include/target/iscsi/iscsi_target_core.h
@@ -786,6 +786,7 @@ struct iscsi_np {
786 int np_sock_type; 786 int np_sock_type;
787 enum np_thread_state_table np_thread_state; 787 enum np_thread_state_table np_thread_state;
788 bool enabled; 788 bool enabled;
789 atomic_t np_reset_count;
789 enum iscsi_timer_flags_table np_login_timer_flags; 790 enum iscsi_timer_flags_table np_login_timer_flags;
790 u32 np_exports; 791 u32 np_exports;
791 enum np_flags_table np_flags; 792 enum np_flags_table np_flags;
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index dfae175ddebc..9c3bc3883d2f 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -937,21 +937,19 @@ TRACE_EVENT(ext4_alloc_da_blocks,
937 TP_STRUCT__entry( 937 TP_STRUCT__entry(
938 __field( dev_t, dev ) 938 __field( dev_t, dev )
939 __field( ino_t, ino ) 939 __field( ino_t, ino )
940 __field( unsigned int, data_blocks ) 940 __field( unsigned int, data_blocks )
941 __field( unsigned int, meta_blocks )
942 ), 941 ),
943 942
944 TP_fast_assign( 943 TP_fast_assign(
945 __entry->dev = inode->i_sb->s_dev; 944 __entry->dev = inode->i_sb->s_dev;
946 __entry->ino = inode->i_ino; 945 __entry->ino = inode->i_ino;
947 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 946 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
948 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
949 ), 947 ),
950 948
951 TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", 949 TP_printk("dev %d,%d ino %lu reserved_data_blocks %u",
952 MAJOR(__entry->dev), MINOR(__entry->dev), 950 MAJOR(__entry->dev), MINOR(__entry->dev),
953 (unsigned long) __entry->ino, 951 (unsigned long) __entry->ino,
954 __entry->data_blocks, __entry->meta_blocks) 952 __entry->data_blocks)
955); 953);
956 954
957TRACE_EVENT(ext4_mballoc_alloc, 955TRACE_EVENT(ext4_mballoc_alloc,
@@ -1153,8 +1151,6 @@ TRACE_EVENT(ext4_da_update_reserve_space,
1153 __field( __u64, i_blocks ) 1151 __field( __u64, i_blocks )
1154 __field( int, used_blocks ) 1152 __field( int, used_blocks )
1155 __field( int, reserved_data_blocks ) 1153 __field( int, reserved_data_blocks )
1156 __field( int, reserved_meta_blocks )
1157 __field( int, allocated_meta_blocks )
1158 __field( int, quota_claim ) 1154 __field( int, quota_claim )
1159 __field( __u16, mode ) 1155 __field( __u16, mode )
1160 ), 1156 ),
@@ -1166,22 +1162,16 @@ TRACE_EVENT(ext4_da_update_reserve_space,
1166 __entry->used_blocks = used_blocks; 1162 __entry->used_blocks = used_blocks;
1167 __entry->reserved_data_blocks = 1163 __entry->reserved_data_blocks =
1168 EXT4_I(inode)->i_reserved_data_blocks; 1164 EXT4_I(inode)->i_reserved_data_blocks;
1169 __entry->reserved_meta_blocks =
1170 EXT4_I(inode)->i_reserved_meta_blocks;
1171 __entry->allocated_meta_blocks =
1172 EXT4_I(inode)->i_allocated_meta_blocks;
1173 __entry->quota_claim = quota_claim; 1165 __entry->quota_claim = quota_claim;
1174 __entry->mode = inode->i_mode; 1166 __entry->mode = inode->i_mode;
1175 ), 1167 ),
1176 1168
1177 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " 1169 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
1178 "reserved_data_blocks %d reserved_meta_blocks %d " 1170 "reserved_data_blocks %d quota_claim %d",
1179 "allocated_meta_blocks %d quota_claim %d",
1180 MAJOR(__entry->dev), MINOR(__entry->dev), 1171 MAJOR(__entry->dev), MINOR(__entry->dev),
1181 (unsigned long) __entry->ino, 1172 (unsigned long) __entry->ino,
1182 __entry->mode, __entry->i_blocks, 1173 __entry->mode, __entry->i_blocks,
1183 __entry->used_blocks, __entry->reserved_data_blocks, 1174 __entry->used_blocks, __entry->reserved_data_blocks,
1184 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks,
1185 __entry->quota_claim) 1175 __entry->quota_claim)
1186); 1176);
1187 1177
@@ -1195,7 +1185,6 @@ TRACE_EVENT(ext4_da_reserve_space,
1195 __field( ino_t, ino ) 1185 __field( ino_t, ino )
1196 __field( __u64, i_blocks ) 1186 __field( __u64, i_blocks )
1197 __field( int, reserved_data_blocks ) 1187 __field( int, reserved_data_blocks )
1198 __field( int, reserved_meta_blocks )
1199 __field( __u16, mode ) 1188 __field( __u16, mode )
1200 ), 1189 ),
1201 1190
@@ -1204,17 +1193,15 @@ TRACE_EVENT(ext4_da_reserve_space,
1204 __entry->ino = inode->i_ino; 1193 __entry->ino = inode->i_ino;
1205 __entry->i_blocks = inode->i_blocks; 1194 __entry->i_blocks = inode->i_blocks;
1206 __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 1195 __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
1207 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
1208 __entry->mode = inode->i_mode; 1196 __entry->mode = inode->i_mode;
1209 ), 1197 ),
1210 1198
1211 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu " 1199 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu "
1212 "reserved_data_blocks %d reserved_meta_blocks %d", 1200 "reserved_data_blocks %d",
1213 MAJOR(__entry->dev), MINOR(__entry->dev), 1201 MAJOR(__entry->dev), MINOR(__entry->dev),
1214 (unsigned long) __entry->ino, 1202 (unsigned long) __entry->ino,
1215 __entry->mode, __entry->i_blocks, 1203 __entry->mode, __entry->i_blocks,
1216 __entry->reserved_data_blocks, 1204 __entry->reserved_data_blocks)
1217 __entry->reserved_meta_blocks)
1218); 1205);
1219 1206
1220TRACE_EVENT(ext4_da_release_space, 1207TRACE_EVENT(ext4_da_release_space,
@@ -1228,8 +1215,6 @@ TRACE_EVENT(ext4_da_release_space,
1228 __field( __u64, i_blocks ) 1215 __field( __u64, i_blocks )
1229 __field( int, freed_blocks ) 1216 __field( int, freed_blocks )
1230 __field( int, reserved_data_blocks ) 1217 __field( int, reserved_data_blocks )
1231 __field( int, reserved_meta_blocks )
1232 __field( int, allocated_meta_blocks )
1233 __field( __u16, mode ) 1218 __field( __u16, mode )
1234 ), 1219 ),
1235 1220
@@ -1239,19 +1224,15 @@ TRACE_EVENT(ext4_da_release_space,
1239 __entry->i_blocks = inode->i_blocks; 1224 __entry->i_blocks = inode->i_blocks;
1240 __entry->freed_blocks = freed_blocks; 1225 __entry->freed_blocks = freed_blocks;
1241 __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 1226 __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
1242 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
1243 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
1244 __entry->mode = inode->i_mode; 1227 __entry->mode = inode->i_mode;
1245 ), 1228 ),
1246 1229
1247 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " 1230 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
1248 "reserved_data_blocks %d reserved_meta_blocks %d " 1231 "reserved_data_blocks %d",
1249 "allocated_meta_blocks %d",
1250 MAJOR(__entry->dev), MINOR(__entry->dev), 1232 MAJOR(__entry->dev), MINOR(__entry->dev),
1251 (unsigned long) __entry->ino, 1233 (unsigned long) __entry->ino,
1252 __entry->mode, __entry->i_blocks, 1234 __entry->mode, __entry->i_blocks,
1253 __entry->freed_blocks, __entry->reserved_data_blocks, 1235 __entry->freed_blocks, __entry->reserved_data_blocks)
1254 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
1255); 1236);
1256 1237
1257DECLARE_EVENT_CLASS(ext4__bitmap_load, 1238DECLARE_EVENT_CLASS(ext4__bitmap_load,
diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
index 26c54f6d595d..ad4eb2863e70 100644
--- a/include/uapi/drm/msm_drm.h
+++ b/include/uapi/drm/msm_drm.h
@@ -171,7 +171,7 @@ struct drm_msm_gem_submit_cmd {
171 __u32 size; /* in, cmdstream size */ 171 __u32 size; /* in, cmdstream size */
172 __u32 pad; 172 __u32 pad;
173 __u32 nr_relocs; /* in, number of submit_reloc's */ 173 __u32 nr_relocs; /* in, number of submit_reloc's */
174 __u64 __user relocs; /* in, ptr to array of submit_reloc's */ 174 __u64 relocs; /* in, ptr to array of submit_reloc's */
175}; 175};
176 176
177/* Each buffer referenced elsewhere in the cmdstream submit (ie. the 177/* Each buffer referenced elsewhere in the cmdstream submit (ie. the
@@ -215,8 +215,8 @@ struct drm_msm_gem_submit {
215 __u32 fence; /* out */ 215 __u32 fence; /* out */
216 __u32 nr_bos; /* in, number of submit_bo's */ 216 __u32 nr_bos; /* in, number of submit_bo's */
217 __u32 nr_cmds; /* in, number of submit_cmd's */ 217 __u32 nr_cmds; /* in, number of submit_cmd's */
218 __u64 __user bos; /* in, ptr to array of submit_bo's */ 218 __u64 bos; /* in, ptr to array of submit_bo's */
219 __u64 __user cmds; /* in, ptr to array of submit_cmd's */ 219 __u64 cmds; /* in, ptr to array of submit_cmd's */
220 __s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */ 220 __s32 fence_fd; /* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN/OUT) */
221}; 221};
222 222
diff --git a/include/uapi/linux/loop.h b/include/uapi/linux/loop.h
index a3960f98679c..c8125ec1f4f2 100644
--- a/include/uapi/linux/loop.h
+++ b/include/uapi/linux/loop.h
@@ -22,7 +22,6 @@ enum {
22 LO_FLAGS_AUTOCLEAR = 4, 22 LO_FLAGS_AUTOCLEAR = 4,
23 LO_FLAGS_PARTSCAN = 8, 23 LO_FLAGS_PARTSCAN = 8,
24 LO_FLAGS_DIRECT_IO = 16, 24 LO_FLAGS_DIRECT_IO = 16,
25 LO_FLAGS_BLOCKSIZE = 32,
26}; 25};
27 26
28#include <asm/posix_types.h> /* for __kernel_old_dev_t */ 27#include <asm/posix_types.h> /* for __kernel_old_dev_t */
@@ -60,8 +59,6 @@ struct loop_info64 {
60 __u64 lo_init[2]; 59 __u64 lo_init[2];
61}; 60};
62 61
63#define LO_INFO_BLOCKSIZE(l) (l)->lo_init[0]
64
65/* 62/*
66 * Loop filter types 63 * Loop filter types
67 */ 64 */
diff --git a/include/uapi/sound/snd_sst_tokens.h b/include/uapi/sound/snd_sst_tokens.h
index dedb2056160d..f691e421f5e8 100644
--- a/include/uapi/sound/snd_sst_tokens.h
+++ b/include/uapi/sound/snd_sst_tokens.h
@@ -163,8 +163,71 @@
163 * 163 *
164 * %SKL_TKN_U32_DMA_BUF_SIZE: DMA buffer size in millisec 164 * %SKL_TKN_U32_DMA_BUF_SIZE: DMA buffer size in millisec
165 * 165 *
166 * %SKL_TKN_U32_PIPE_DIR: Specifies pipe direction. Can be
167 * playback/capture.
168 *
169 * %SKL_TKN_U32_NUM_CONFIGS: Number of pipe configs
170 *
171 * %SKL_TKN_U32_PATH_MEM_PGS: Size of memory (in pages) required for pipeline
172 * and its data
173 *
174 * %SKL_TKN_U32_PIPE_CONFIG_ID: Config id for the modules in the pipe
175 * and PCM params supported by that pipe
176 * config. This is used as index to fill
177 * up the pipe config and module config
178 * structure.
179 *
180 * %SKL_TKN_U32_CFG_FREQ:
181 * %SKL_TKN_U8_CFG_CHAN:
182 * %SKL_TKN_U8_CFG_BPS: PCM params (freq, channels, bits per sample)
183 * supported for each of the pipe configs.
184 *
185 * %SKL_TKN_CFG_MOD_RES_ID: Module's resource index for each of the
186 * pipe config
187 *
188 * %SKL_TKN_CFG_MOD_FMT_ID: Module's interface index for each of the
189 * pipe config
190 *
191 * %SKL_TKN_U8_NUM_MOD: Number of modules in the manifest
192 *
193 * %SKL_TKN_MM_U8_MOD_IDX: Current index of the module in the manifest
194 *
195 * %SKL_TKN_MM_U8_NUM_RES: Number of resources for the module
196 *
197 * %SKL_TKN_MM_U8_NUM_INTF: Number of interfaces for the module
198 *
199 * %SKL_TKN_MM_U32_RES_ID: Resource index for the resource info to
200 * be filled into.
201 * A module can support multiple resource
202 * configuration and is represnted as a
203 * resource table. This index is used to
204 * fill information into appropriate index.
205 *
206 * %SKL_TKN_MM_U32_CPS: DSP cycles per second
207 *
208 * %SKL_TKN_MM_U32_DMA_SIZE: Allocated buffer size for gateway DMA
209 *
210 * %SKL_TKN_MM_U32_CPC: DSP cycles allocated per frame
211 *
212 * %SKL_TKN_MM_U32_RES_PIN_ID: Resource pin index in the module
213 *
214 * %SKL_TKN_MM_U32_INTF_PIN_ID: Interface index in the module
215 *
216 * %SKL_TKN_MM_U32_PIN_BUF: Buffer size of the module pin
217 *
218 * %SKL_TKN_MM_U32_FMT_ID: Format index for each of the interface/
219 * format information to be filled into.
220 *
221 * %SKL_TKN_MM_U32_NUM_IN_FMT: Number of input formats
222 * %SKL_TKN_MM_U32_NUM_OUT_FMT: Number of output formats
223 *
166 * module_id and loadable flags dont have tokens as these values will be 224 * module_id and loadable flags dont have tokens as these values will be
167 * read from the DSP FW manifest 225 * read from the DSP FW manifest
226 *
227 * Tokens defined can be used either in the manifest or widget private data.
228 *
229 * SKL_TKN_MM is used as a suffix for all tokens that represent
230 * module data in the manifest.
168 */ 231 */
169enum SKL_TKNS { 232enum SKL_TKNS {
170 SKL_TKN_UUID = 1, 233 SKL_TKN_UUID = 1,
@@ -218,7 +281,34 @@ enum SKL_TKNS {
218 SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */ 281 SKL_TKL_U32_D0I3_CAPS, /* Typo added at v4.10 */
219 SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS, 282 SKL_TKN_U32_D0I3_CAPS = SKL_TKL_U32_D0I3_CAPS,
220 SKL_TKN_U32_DMA_BUF_SIZE, 283 SKL_TKN_U32_DMA_BUF_SIZE,
221 SKL_TKN_MAX = SKL_TKN_U32_DMA_BUF_SIZE, 284
285 SKL_TKN_U32_PIPE_DIRECTION,
286 SKL_TKN_U32_PIPE_CONFIG_ID,
287 SKL_TKN_U32_NUM_CONFIGS,
288 SKL_TKN_U32_PATH_MEM_PGS,
289
290 SKL_TKN_U32_CFG_FREQ,
291 SKL_TKN_U8_CFG_CHAN,
292 SKL_TKN_U8_CFG_BPS,
293 SKL_TKN_CFG_MOD_RES_ID,
294 SKL_TKN_CFG_MOD_FMT_ID,
295 SKL_TKN_U8_NUM_MOD,
296
297 SKL_TKN_MM_U8_MOD_IDX,
298 SKL_TKN_MM_U8_NUM_RES,
299 SKL_TKN_MM_U8_NUM_INTF,
300 SKL_TKN_MM_U32_RES_ID,
301 SKL_TKN_MM_U32_CPS,
302 SKL_TKN_MM_U32_DMA_SIZE,
303 SKL_TKN_MM_U32_CPC,
304 SKL_TKN_MM_U32_RES_PIN_ID,
305 SKL_TKN_MM_U32_INTF_PIN_ID,
306 SKL_TKN_MM_U32_PIN_BUF,
307 SKL_TKN_MM_U32_FMT_ID,
308 SKL_TKN_MM_U32_NUM_IN_FMT,
309 SKL_TKN_MM_U32_NUM_OUT_FMT,
310
311 SKL_TKN_MAX = SKL_TKN_MM_U32_NUM_OUT_FMT,
222}; 312};
223 313
224#endif 314#endif
diff --git a/ipc/msg.c b/ipc/msg.c
index 5b25e0755656..2c38f10d1483 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -1034,7 +1034,8 @@ void msg_exit_ns(struct ipc_namespace *ns)
1034static int sysvipc_msg_proc_show(struct seq_file *s, void *it) 1034static int sysvipc_msg_proc_show(struct seq_file *s, void *it)
1035{ 1035{
1036 struct user_namespace *user_ns = seq_user_ns(s); 1036 struct user_namespace *user_ns = seq_user_ns(s);
1037 struct msg_queue *msq = it; 1037 struct kern_ipc_perm *ipcp = it;
1038 struct msg_queue *msq = container_of(ipcp, struct msg_queue, q_perm);
1038 1039
1039 seq_printf(s, 1040 seq_printf(s,
1040 "%10d %10d %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %10lu %10lu %10lu\n", 1041 "%10d %10d %4o %10lu %10lu %5u %5u %5u %5u %5u %5u %10lu %10lu %10lu\n",
diff --git a/ipc/sem.c b/ipc/sem.c
index 9e70cd7a17da..38371e93bfa5 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -2179,7 +2179,8 @@ void exit_sem(struct task_struct *tsk)
2179static int sysvipc_sem_proc_show(struct seq_file *s, void *it) 2179static int sysvipc_sem_proc_show(struct seq_file *s, void *it)
2180{ 2180{
2181 struct user_namespace *user_ns = seq_user_ns(s); 2181 struct user_namespace *user_ns = seq_user_ns(s);
2182 struct sem_array *sma = it; 2182 struct kern_ipc_perm *ipcp = it;
2183 struct sem_array *sma = container_of(ipcp, struct sem_array, sem_perm);
2183 time_t sem_otime; 2184 time_t sem_otime;
2184 2185
2185 /* 2186 /*
diff --git a/ipc/shm.c b/ipc/shm.c
index 28a444861a8f..8828b4c3a190 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -1380,9 +1380,11 @@ SYSCALL_DEFINE1(shmdt, char __user *, shmaddr)
1380static int sysvipc_shm_proc_show(struct seq_file *s, void *it) 1380static int sysvipc_shm_proc_show(struct seq_file *s, void *it)
1381{ 1381{
1382 struct user_namespace *user_ns = seq_user_ns(s); 1382 struct user_namespace *user_ns = seq_user_ns(s);
1383 struct shmid_kernel *shp = it; 1383 struct kern_ipc_perm *ipcp = it;
1384 struct shmid_kernel *shp;
1384 unsigned long rss = 0, swp = 0; 1385 unsigned long rss = 0, swp = 0;
1385 1386
1387 shp = container_of(ipcp, struct shmid_kernel, shm_perm);
1386 shm_add_rss_swap(shp, &rss, &swp); 1388 shm_add_rss_swap(shp, &rss, &swp);
1387 1389
1388#if BITS_PER_LONG <= 32 1390#if BITS_PER_LONG <= 32
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c
index 62d686d96581..9eb8b3511636 100644
--- a/kernel/audit_watch.c
+++ b/kernel/audit_watch.c
@@ -66,7 +66,7 @@ static struct fsnotify_group *audit_watch_group;
66 66
67/* fsnotify events we care about. */ 67/* fsnotify events we care about. */
68#define AUDIT_FS_WATCH (FS_MOVE | FS_CREATE | FS_DELETE | FS_DELETE_SELF |\ 68#define AUDIT_FS_WATCH (FS_MOVE | FS_CREATE | FS_DELETE | FS_DELETE_SELF |\
69 FS_MOVE_SELF | FS_EVENT_ON_CHILD) 69 FS_MOVE_SELF | FS_EVENT_ON_CHILD | FS_UNMOUNT)
70 70
71static void audit_free_parent(struct audit_parent *parent) 71static void audit_free_parent(struct audit_parent *parent)
72{ 72{
@@ -457,13 +457,15 @@ void audit_remove_watch_rule(struct audit_krule *krule)
457 list_del(&krule->rlist); 457 list_del(&krule->rlist);
458 458
459 if (list_empty(&watch->rules)) { 459 if (list_empty(&watch->rules)) {
460 /*
461 * audit_remove_watch() drops our reference to 'parent' which
462 * can get freed. Grab our own reference to be safe.
463 */
464 audit_get_parent(parent);
460 audit_remove_watch(watch); 465 audit_remove_watch(watch);
461 466 if (list_empty(&parent->watches))
462 if (list_empty(&parent->watches)) {
463 audit_get_parent(parent);
464 fsnotify_destroy_mark(&parent->mark, audit_watch_group); 467 fsnotify_destroy_mark(&parent->mark, audit_watch_group);
465 audit_put_parent(parent); 468 audit_put_parent(parent);
466 }
467 } 469 }
468} 470}
469 471
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 045646da97cc..6c772adabad2 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -1289,7 +1289,7 @@ static int bpf_prog_get_info_by_fd(struct bpf_prog *prog,
1289 info_len = min_t(u32, sizeof(info), info_len); 1289 info_len = min_t(u32, sizeof(info), info_len);
1290 1290
1291 if (copy_from_user(&info, uinfo, info_len)) 1291 if (copy_from_user(&info, uinfo, info_len))
1292 return err; 1292 return -EFAULT;
1293 1293
1294 info.type = prog->type; 1294 info.type = prog->type;
1295 info.id = prog->aux->id; 1295 info.id = prog->aux->id;
@@ -1312,7 +1312,7 @@ static int bpf_prog_get_info_by_fd(struct bpf_prog *prog,
1312 } 1312 }
1313 1313
1314 ulen = info.xlated_prog_len; 1314 ulen = info.xlated_prog_len;
1315 info.xlated_prog_len = bpf_prog_size(prog->len); 1315 info.xlated_prog_len = bpf_prog_insn_size(prog);
1316 if (info.xlated_prog_len && ulen) { 1316 if (info.xlated_prog_len && ulen) {
1317 uinsns = u64_to_user_ptr(info.xlated_prog_insns); 1317 uinsns = u64_to_user_ptr(info.xlated_prog_insns);
1318 ulen = min_t(u32, info.xlated_prog_len, ulen); 1318 ulen = min_t(u32, info.xlated_prog_len, ulen);
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index af9e84a4944e..664d93972373 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -1865,10 +1865,12 @@ static void adjust_reg_min_max_vals(struct bpf_verifier_env *env,
1865 * do our normal operations to the register, we need to set the values 1865 * do our normal operations to the register, we need to set the values
1866 * to the min/max since they are undefined. 1866 * to the min/max since they are undefined.
1867 */ 1867 */
1868 if (min_val == BPF_REGISTER_MIN_RANGE) 1868 if (opcode != BPF_SUB) {
1869 dst_reg->min_value = BPF_REGISTER_MIN_RANGE; 1869 if (min_val == BPF_REGISTER_MIN_RANGE)
1870 if (max_val == BPF_REGISTER_MAX_RANGE) 1870 dst_reg->min_value = BPF_REGISTER_MIN_RANGE;
1871 dst_reg->max_value = BPF_REGISTER_MAX_RANGE; 1871 if (max_val == BPF_REGISTER_MAX_RANGE)
1872 dst_reg->max_value = BPF_REGISTER_MAX_RANGE;
1873 }
1872 1874
1873 switch (opcode) { 1875 switch (opcode) {
1874 case BPF_ADD: 1876 case BPF_ADD:
@@ -1879,10 +1881,17 @@ static void adjust_reg_min_max_vals(struct bpf_verifier_env *env,
1879 dst_reg->min_align = min(src_align, dst_align); 1881 dst_reg->min_align = min(src_align, dst_align);
1880 break; 1882 break;
1881 case BPF_SUB: 1883 case BPF_SUB:
1884 /* If one of our values was at the end of our ranges, then the
1885 * _opposite_ value in the dst_reg goes to the end of our range.
1886 */
1887 if (min_val == BPF_REGISTER_MIN_RANGE)
1888 dst_reg->max_value = BPF_REGISTER_MAX_RANGE;
1889 if (max_val == BPF_REGISTER_MAX_RANGE)
1890 dst_reg->min_value = BPF_REGISTER_MIN_RANGE;
1882 if (dst_reg->min_value != BPF_REGISTER_MIN_RANGE) 1891 if (dst_reg->min_value != BPF_REGISTER_MIN_RANGE)
1883 dst_reg->min_value -= min_val; 1892 dst_reg->min_value -= max_val;
1884 if (dst_reg->max_value != BPF_REGISTER_MAX_RANGE) 1893 if (dst_reg->max_value != BPF_REGISTER_MAX_RANGE)
1885 dst_reg->max_value -= max_val; 1894 dst_reg->max_value -= min_val;
1886 dst_reg->min_align = min(src_align, dst_align); 1895 dst_reg->min_align = min(src_align, dst_align);
1887 break; 1896 break;
1888 case BPF_MUL: 1897 case BPF_MUL:
diff --git a/kernel/cgroup/cgroup-internal.h b/kernel/cgroup/cgroup-internal.h
index 793565c05742..8b4c3c2f2509 100644
--- a/kernel/cgroup/cgroup-internal.h
+++ b/kernel/cgroup/cgroup-internal.h
@@ -33,6 +33,9 @@ struct cgroup_taskset {
33 struct list_head src_csets; 33 struct list_head src_csets;
34 struct list_head dst_csets; 34 struct list_head dst_csets;
35 35
36 /* the number of tasks in the set */
37 int nr_tasks;
38
36 /* the subsys currently being processed */ 39 /* the subsys currently being processed */
37 int ssid; 40 int ssid;
38 41
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 620794a20a33..df2e0f14a95d 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -2006,6 +2006,8 @@ static void cgroup_migrate_add_task(struct task_struct *task,
2006 if (!cset->mg_src_cgrp) 2006 if (!cset->mg_src_cgrp)
2007 return; 2007 return;
2008 2008
2009 mgctx->tset.nr_tasks++;
2010
2009 list_move_tail(&task->cg_list, &cset->mg_tasks); 2011 list_move_tail(&task->cg_list, &cset->mg_tasks);
2010 if (list_empty(&cset->mg_node)) 2012 if (list_empty(&cset->mg_node))
2011 list_add_tail(&cset->mg_node, 2013 list_add_tail(&cset->mg_node,
@@ -2094,21 +2096,19 @@ static int cgroup_migrate_execute(struct cgroup_mgctx *mgctx)
2094 struct css_set *cset, *tmp_cset; 2096 struct css_set *cset, *tmp_cset;
2095 int ssid, failed_ssid, ret; 2097 int ssid, failed_ssid, ret;
2096 2098
2097 /* methods shouldn't be called if no task is actually migrating */
2098 if (list_empty(&tset->src_csets))
2099 return 0;
2100
2101 /* check that we can legitimately attach to the cgroup */ 2099 /* check that we can legitimately attach to the cgroup */
2102 do_each_subsys_mask(ss, ssid, mgctx->ss_mask) { 2100 if (tset->nr_tasks) {
2103 if (ss->can_attach) { 2101 do_each_subsys_mask(ss, ssid, mgctx->ss_mask) {
2104 tset->ssid = ssid; 2102 if (ss->can_attach) {
2105 ret = ss->can_attach(tset); 2103 tset->ssid = ssid;
2106 if (ret) { 2104 ret = ss->can_attach(tset);
2107 failed_ssid = ssid; 2105 if (ret) {
2108 goto out_cancel_attach; 2106 failed_ssid = ssid;
2107 goto out_cancel_attach;
2108 }
2109 } 2109 }
2110 } 2110 } while_each_subsys_mask();
2111 } while_each_subsys_mask(); 2111 }
2112 2112
2113 /* 2113 /*
2114 * Now that we're guaranteed success, proceed to move all tasks to 2114 * Now that we're guaranteed success, proceed to move all tasks to
@@ -2137,25 +2137,29 @@ static int cgroup_migrate_execute(struct cgroup_mgctx *mgctx)
2137 */ 2137 */
2138 tset->csets = &tset->dst_csets; 2138 tset->csets = &tset->dst_csets;
2139 2139
2140 do_each_subsys_mask(ss, ssid, mgctx->ss_mask) { 2140 if (tset->nr_tasks) {
2141 if (ss->attach) { 2141 do_each_subsys_mask(ss, ssid, mgctx->ss_mask) {
2142 tset->ssid = ssid; 2142 if (ss->attach) {
2143 ss->attach(tset); 2143 tset->ssid = ssid;
2144 } 2144 ss->attach(tset);
2145 } while_each_subsys_mask(); 2145 }
2146 } while_each_subsys_mask();
2147 }
2146 2148
2147 ret = 0; 2149 ret = 0;
2148 goto out_release_tset; 2150 goto out_release_tset;
2149 2151
2150out_cancel_attach: 2152out_cancel_attach:
2151 do_each_subsys_mask(ss, ssid, mgctx->ss_mask) { 2153 if (tset->nr_tasks) {
2152 if (ssid == failed_ssid) 2154 do_each_subsys_mask(ss, ssid, mgctx->ss_mask) {
2153 break; 2155 if (ssid == failed_ssid)
2154 if (ss->cancel_attach) { 2156 break;
2155 tset->ssid = ssid; 2157 if (ss->cancel_attach) {
2156 ss->cancel_attach(tset); 2158 tset->ssid = ssid;
2157 } 2159 ss->cancel_attach(tset);
2158 } while_each_subsys_mask(); 2160 }
2161 } while_each_subsys_mask();
2162 }
2159out_release_tset: 2163out_release_tset:
2160 spin_lock_irq(&css_set_lock); 2164 spin_lock_irq(&css_set_lock);
2161 list_splice_init(&tset->dst_csets, &tset->src_csets); 2165 list_splice_init(&tset->dst_csets, &tset->src_csets);
@@ -2997,11 +3001,11 @@ static ssize_t cgroup_subtree_control_write(struct kernfs_open_file *of,
2997 cgrp->subtree_control &= ~disable; 3001 cgrp->subtree_control &= ~disable;
2998 3002
2999 ret = cgroup_apply_control(cgrp); 3003 ret = cgroup_apply_control(cgrp);
3000
3001 cgroup_finalize_control(cgrp, ret); 3004 cgroup_finalize_control(cgrp, ret);
3005 if (ret)
3006 goto out_unlock;
3002 3007
3003 kernfs_activate(cgrp->kn); 3008 kernfs_activate(cgrp->kn);
3004 ret = 0;
3005out_unlock: 3009out_unlock:
3006 cgroup_kn_unlock(of->kn); 3010 cgroup_kn_unlock(of->kn);
3007 return ret ?: nbytes; 3011 return ret ?: nbytes;
@@ -4669,6 +4673,10 @@ int __init cgroup_init(void)
4669 4673
4670 if (ss->bind) 4674 if (ss->bind)
4671 ss->bind(init_css_set.subsys[ssid]); 4675 ss->bind(init_css_set.subsys[ssid]);
4676
4677 mutex_lock(&cgroup_mutex);
4678 css_populate_dir(init_css_set.subsys[ssid]);
4679 mutex_unlock(&cgroup_mutex);
4672 } 4680 }
4673 4681
4674 /* init_css_set.subsys[] has been updated, re-hash */ 4682 /* init_css_set.subsys[] has been updated, re-hash */
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index ca8376e5008c..8d5151688504 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -63,6 +63,7 @@
63#include <linux/cgroup.h> 63#include <linux/cgroup.h>
64#include <linux/wait.h> 64#include <linux/wait.h>
65 65
66DEFINE_STATIC_KEY_FALSE(cpusets_pre_enable_key);
66DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key); 67DEFINE_STATIC_KEY_FALSE(cpusets_enabled_key);
67 68
68/* See "Frequency meter" comments, below. */ 69/* See "Frequency meter" comments, below. */
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 426c2ffba16d..3504125871d2 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -2217,6 +2217,33 @@ static int group_can_go_on(struct perf_event *event,
2217 return can_add_hw; 2217 return can_add_hw;
2218} 2218}
2219 2219
2220/*
2221 * Complement to update_event_times(). This computes the tstamp_* values to
2222 * continue 'enabled' state from @now, and effectively discards the time
2223 * between the prior tstamp_stopped and now (as we were in the OFF state, or
2224 * just switched (context) time base).
2225 *
2226 * This further assumes '@event->state == INACTIVE' (we just came from OFF) and
2227 * cannot have been scheduled in yet. And going into INACTIVE state means
2228 * '@event->tstamp_stopped = @now'.
2229 *
2230 * Thus given the rules of update_event_times():
2231 *
2232 * total_time_enabled = tstamp_stopped - tstamp_enabled
2233 * total_time_running = tstamp_stopped - tstamp_running
2234 *
2235 * We can insert 'tstamp_stopped == now' and reverse them to compute new
2236 * tstamp_* values.
2237 */
2238static void __perf_event_enable_time(struct perf_event *event, u64 now)
2239{
2240 WARN_ON_ONCE(event->state != PERF_EVENT_STATE_INACTIVE);
2241
2242 event->tstamp_stopped = now;
2243 event->tstamp_enabled = now - event->total_time_enabled;
2244 event->tstamp_running = now - event->total_time_running;
2245}
2246
2220static void add_event_to_ctx(struct perf_event *event, 2247static void add_event_to_ctx(struct perf_event *event,
2221 struct perf_event_context *ctx) 2248 struct perf_event_context *ctx)
2222{ 2249{
@@ -2224,9 +2251,12 @@ static void add_event_to_ctx(struct perf_event *event,
2224 2251
2225 list_add_event(event, ctx); 2252 list_add_event(event, ctx);
2226 perf_group_attach(event); 2253 perf_group_attach(event);
2227 event->tstamp_enabled = tstamp; 2254 /*
2228 event->tstamp_running = tstamp; 2255 * We can be called with event->state == STATE_OFF when we create with
2229 event->tstamp_stopped = tstamp; 2256 * .disabled = 1. In that case the IOC_ENABLE will call this function.
2257 */
2258 if (event->state == PERF_EVENT_STATE_INACTIVE)
2259 __perf_event_enable_time(event, tstamp);
2230} 2260}
2231 2261
2232static void ctx_sched_out(struct perf_event_context *ctx, 2262static void ctx_sched_out(struct perf_event_context *ctx,
@@ -2471,10 +2501,11 @@ static void __perf_event_mark_enabled(struct perf_event *event)
2471 u64 tstamp = perf_event_time(event); 2501 u64 tstamp = perf_event_time(event);
2472 2502
2473 event->state = PERF_EVENT_STATE_INACTIVE; 2503 event->state = PERF_EVENT_STATE_INACTIVE;
2474 event->tstamp_enabled = tstamp - event->total_time_enabled; 2504 __perf_event_enable_time(event, tstamp);
2475 list_for_each_entry(sub, &event->sibling_list, group_entry) { 2505 list_for_each_entry(sub, &event->sibling_list, group_entry) {
2506 /* XXX should not be > INACTIVE if event isn't */
2476 if (sub->state >= PERF_EVENT_STATE_INACTIVE) 2507 if (sub->state >= PERF_EVENT_STATE_INACTIVE)
2477 sub->tstamp_enabled = tstamp - sub->total_time_enabled; 2508 __perf_event_enable_time(sub, tstamp);
2478 } 2509 }
2479} 2510}
2480 2511
@@ -5090,7 +5121,7 @@ static void perf_mmap_open(struct vm_area_struct *vma)
5090 atomic_inc(&event->rb->aux_mmap_count); 5121 atomic_inc(&event->rb->aux_mmap_count);
5091 5122
5092 if (event->pmu->event_mapped) 5123 if (event->pmu->event_mapped)
5093 event->pmu->event_mapped(event); 5124 event->pmu->event_mapped(event, vma->vm_mm);
5094} 5125}
5095 5126
5096static void perf_pmu_output_stop(struct perf_event *event); 5127static void perf_pmu_output_stop(struct perf_event *event);
@@ -5113,7 +5144,7 @@ static void perf_mmap_close(struct vm_area_struct *vma)
5113 unsigned long size = perf_data_size(rb); 5144 unsigned long size = perf_data_size(rb);
5114 5145
5115 if (event->pmu->event_unmapped) 5146 if (event->pmu->event_unmapped)
5116 event->pmu->event_unmapped(event); 5147 event->pmu->event_unmapped(event, vma->vm_mm);
5117 5148
5118 /* 5149 /*
5119 * rb->aux_mmap_count will always drop before rb->mmap_count and 5150 * rb->aux_mmap_count will always drop before rb->mmap_count and
@@ -5411,7 +5442,7 @@ aux_unlock:
5411 vma->vm_ops = &perf_mmap_vmops; 5442 vma->vm_ops = &perf_mmap_vmops;
5412 5443
5413 if (event->pmu->event_mapped) 5444 if (event->pmu->event_mapped)
5414 event->pmu->event_mapped(event); 5445 event->pmu->event_mapped(event, vma->vm_mm);
5415 5446
5416 return ret; 5447 return ret;
5417} 5448}
@@ -10001,28 +10032,27 @@ SYSCALL_DEFINE5(perf_event_open,
10001 goto err_context; 10032 goto err_context;
10002 10033
10003 /* 10034 /*
10004 * Do not allow to attach to a group in a different 10035 * Make sure we're both events for the same CPU;
10005 * task or CPU context: 10036 * grouping events for different CPUs is broken; since
10037 * you can never concurrently schedule them anyhow.
10006 */ 10038 */
10007 if (move_group) { 10039 if (group_leader->cpu != event->cpu)
10008 /* 10040 goto err_context;
10009 * Make sure we're both on the same task, or both
10010 * per-cpu events.
10011 */
10012 if (group_leader->ctx->task != ctx->task)
10013 goto err_context;
10014 10041
10015 /* 10042 /*
10016 * Make sure we're both events for the same CPU; 10043 * Make sure we're both on the same task, or both
10017 * grouping events for different CPUs is broken; since 10044 * per-CPU events.
10018 * you can never concurrently schedule them anyhow. 10045 */
10019 */ 10046 if (group_leader->ctx->task != ctx->task)
10020 if (group_leader->cpu != event->cpu) 10047 goto err_context;
10021 goto err_context; 10048
10022 } else { 10049 /*
10023 if (group_leader->ctx != ctx) 10050 * Do not allow to attach to a group in a different task
10024 goto err_context; 10051 * or CPU context. If we're moving SW events, we'll fix
10025 } 10052 * this up later, so allow that.
10053 */
10054 if (!move_group && group_leader->ctx != ctx)
10055 goto err_context;
10026 10056
10027 /* 10057 /*
10028 * Only a group leader can be exclusive or pinned 10058 * Only a group leader can be exclusive or pinned
diff --git a/kernel/fork.c b/kernel/fork.c
index 17921b0390b4..cbbea277b3fb 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -806,8 +806,9 @@ static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p,
806 mm_init_cpumask(mm); 806 mm_init_cpumask(mm);
807 mm_init_aio(mm); 807 mm_init_aio(mm);
808 mm_init_owner(mm, p); 808 mm_init_owner(mm, p);
809 RCU_INIT_POINTER(mm->exe_file, NULL);
809 mmu_notifier_mm_init(mm); 810 mmu_notifier_mm_init(mm);
810 clear_tlb_flush_pending(mm); 811 init_tlb_flush_pending(mm);
811#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS 812#if defined(CONFIG_TRANSPARENT_HUGEPAGE) && !USE_SPLIT_PMD_PTLOCKS
812 mm->pmd_huge_pte = NULL; 813 mm->pmd_huge_pte = NULL;
813#endif 814#endif
diff --git a/kernel/futex.c b/kernel/futex.c
index 16dbe4c93895..f50b434756c1 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -670,13 +670,14 @@ again:
670 * this reference was taken by ihold under the page lock 670 * this reference was taken by ihold under the page lock
671 * pinning the inode in place so i_lock was unnecessary. The 671 * pinning the inode in place so i_lock was unnecessary. The
672 * only way for this check to fail is if the inode was 672 * only way for this check to fail is if the inode was
673 * truncated in parallel so warn for now if this happens. 673 * truncated in parallel which is almost certainly an
674 * application bug. In such a case, just retry.
674 * 675 *
675 * We are not calling into get_futex_key_refs() in file-backed 676 * We are not calling into get_futex_key_refs() in file-backed
676 * cases, therefore a successful atomic_inc return below will 677 * cases, therefore a successful atomic_inc return below will
677 * guarantee that get_futex_key() will still imply smp_mb(); (B). 678 * guarantee that get_futex_key() will still imply smp_mb(); (B).
678 */ 679 */
679 if (WARN_ON_ONCE(!atomic_inc_not_zero(&inode->i_count))) { 680 if (!atomic_inc_not_zero(&inode->i_count)) {
680 rcu_read_unlock(); 681 rcu_read_unlock();
681 put_page(page); 682 put_page(page);
682 683
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index a3cc37c0c85e..3675c6004f2a 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1000,7 +1000,7 @@ EXPORT_SYMBOL_GPL(irq_set_chip_and_handler_name);
1000 1000
1001void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set) 1001void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
1002{ 1002{
1003 unsigned long flags; 1003 unsigned long flags, trigger, tmp;
1004 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0); 1004 struct irq_desc *desc = irq_get_desc_lock(irq, &flags, 0);
1005 1005
1006 if (!desc) 1006 if (!desc)
@@ -1014,6 +1014,8 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
1014 1014
1015 irq_settings_clr_and_set(desc, clr, set); 1015 irq_settings_clr_and_set(desc, clr, set);
1016 1016
1017 trigger = irqd_get_trigger_type(&desc->irq_data);
1018
1017 irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU | 1019 irqd_clear(&desc->irq_data, IRQD_NO_BALANCING | IRQD_PER_CPU |
1018 IRQD_TRIGGER_MASK | IRQD_LEVEL | IRQD_MOVE_PCNTXT); 1020 IRQD_TRIGGER_MASK | IRQD_LEVEL | IRQD_MOVE_PCNTXT);
1019 if (irq_settings_has_no_balance_set(desc)) 1021 if (irq_settings_has_no_balance_set(desc))
@@ -1025,7 +1027,11 @@ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
1025 if (irq_settings_is_level(desc)) 1027 if (irq_settings_is_level(desc))
1026 irqd_set(&desc->irq_data, IRQD_LEVEL); 1028 irqd_set(&desc->irq_data, IRQD_LEVEL);
1027 1029
1028 irqd_set(&desc->irq_data, irq_settings_get_trigger_mask(desc)); 1030 tmp = irq_settings_get_trigger_mask(desc);
1031 if (tmp != IRQ_TYPE_NONE)
1032 trigger = tmp;
1033
1034 irqd_set(&desc->irq_data, trigger);
1029 1035
1030 irq_put_desc_unlock(desc, flags); 1036 irq_put_desc_unlock(desc, flags);
1031} 1037}
diff --git a/kernel/irq/ipi.c b/kernel/irq/ipi.c
index 1a9abc1c8ea0..259a22aa9934 100644
--- a/kernel/irq/ipi.c
+++ b/kernel/irq/ipi.c
@@ -165,7 +165,7 @@ irq_hw_number_t ipi_get_hwirq(unsigned int irq, unsigned int cpu)
165 struct irq_data *data = irq_get_irq_data(irq); 165 struct irq_data *data = irq_get_irq_data(irq);
166 struct cpumask *ipimask = data ? irq_data_get_affinity_mask(data) : NULL; 166 struct cpumask *ipimask = data ? irq_data_get_affinity_mask(data) : NULL;
167 167
168 if (!data || !ipimask || cpu > nr_cpu_ids) 168 if (!data || !ipimask || cpu >= nr_cpu_ids)
169 return INVALID_HWIRQ; 169 return INVALID_HWIRQ;
170 170
171 if (!cpumask_test_cpu(cpu, ipimask)) 171 if (!cpumask_test_cpu(cpu, ipimask))
@@ -195,7 +195,7 @@ static int ipi_send_verify(struct irq_chip *chip, struct irq_data *data,
195 if (!chip->ipi_send_single && !chip->ipi_send_mask) 195 if (!chip->ipi_send_single && !chip->ipi_send_mask)
196 return -EINVAL; 196 return -EINVAL;
197 197
198 if (cpu > nr_cpu_ids) 198 if (cpu >= nr_cpu_ids)
199 return -EINVAL; 199 return -EINVAL;
200 200
201 if (dest) { 201 if (dest) {
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 6d016c5d97c8..2f37acde640b 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -71,6 +71,18 @@ static atomic_t kmod_concurrent_max = ATOMIC_INIT(MAX_KMOD_CONCURRENT);
71static DECLARE_WAIT_QUEUE_HEAD(kmod_wq); 71static DECLARE_WAIT_QUEUE_HEAD(kmod_wq);
72 72
73/* 73/*
74 * This is a restriction on having *all* MAX_KMOD_CONCURRENT threads
75 * running at the same time without returning. When this happens we
76 * believe you've somehow ended up with a recursive module dependency
77 * creating a loop.
78 *
79 * We have no option but to fail.
80 *
81 * Userspace should proactively try to detect and prevent these.
82 */
83#define MAX_KMOD_ALL_BUSY_TIMEOUT 5
84
85/*
74 modprobe_path is set via /proc/sys. 86 modprobe_path is set via /proc/sys.
75*/ 87*/
76char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe"; 88char modprobe_path[KMOD_PATH_LEN] = "/sbin/modprobe";
@@ -167,8 +179,17 @@ int __request_module(bool wait, const char *fmt, ...)
167 pr_warn_ratelimited("request_module: kmod_concurrent_max (%u) close to 0 (max_modprobes: %u), for module %s, throttling...", 179 pr_warn_ratelimited("request_module: kmod_concurrent_max (%u) close to 0 (max_modprobes: %u), for module %s, throttling...",
168 atomic_read(&kmod_concurrent_max), 180 atomic_read(&kmod_concurrent_max),
169 MAX_KMOD_CONCURRENT, module_name); 181 MAX_KMOD_CONCURRENT, module_name);
170 wait_event_interruptible(kmod_wq, 182 ret = wait_event_killable_timeout(kmod_wq,
171 atomic_dec_if_positive(&kmod_concurrent_max) >= 0); 183 atomic_dec_if_positive(&kmod_concurrent_max) >= 0,
184 MAX_KMOD_ALL_BUSY_TIMEOUT * HZ);
185 if (!ret) {
186 pr_warn_ratelimited("request_module: modprobe %s cannot be processed, kmod busy with %d threads for more than %d seconds now",
187 module_name, MAX_KMOD_CONCURRENT, MAX_KMOD_ALL_BUSY_TIMEOUT);
188 return -ETIME;
189 } else if (ret == -ERESTARTSYS) {
190 pr_warn_ratelimited("request_module: sigkill sent for modprobe %s, giving up", module_name);
191 return ret;
192 }
172 } 193 }
173 194
174 trace_module_request(module_name, wait, _RET_IP_); 195 trace_module_request(module_name, wait, _RET_IP_);
diff --git a/kernel/pid.c b/kernel/pid.c
index 731c4e528f4e..020dedbdf066 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -527,8 +527,11 @@ pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
527 if (!ns) 527 if (!ns)
528 ns = task_active_pid_ns(current); 528 ns = task_active_pid_ns(current);
529 if (likely(pid_alive(task))) { 529 if (likely(pid_alive(task))) {
530 if (type != PIDTYPE_PID) 530 if (type != PIDTYPE_PID) {
531 if (type == __PIDTYPE_TGID)
532 type = PIDTYPE_PID;
531 task = task->group_leader; 533 task = task->group_leader;
534 }
532 nr = pid_nr_ns(rcu_dereference(task->pids[type].pid), ns); 535 nr = pid_nr_ns(rcu_dereference(task->pids[type].pid), ns);
533 } 536 }
534 rcu_read_unlock(); 537 rcu_read_unlock();
@@ -537,12 +540,6 @@ pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
537} 540}
538EXPORT_SYMBOL(__task_pid_nr_ns); 541EXPORT_SYMBOL(__task_pid_nr_ns);
539 542
540pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
541{
542 return pid_nr_ns(task_tgid(tsk), ns);
543}
544EXPORT_SYMBOL(task_tgid_nr_ns);
545
546struct pid_namespace *task_active_pid_ns(struct task_struct *tsk) 543struct pid_namespace *task_active_pid_ns(struct task_struct *tsk)
547{ 544{
548 return ns_of_pid(task_pid(tsk)); 545 return ns_of_pid(task_pid(tsk));
@@ -575,13 +572,10 @@ struct pid *find_ge_pid(int nr, struct pid_namespace *ns)
575 */ 572 */
576void __init pidhash_init(void) 573void __init pidhash_init(void)
577{ 574{
578 unsigned int pidhash_size;
579
580 pid_hash = alloc_large_system_hash("PID", sizeof(*pid_hash), 0, 18, 575 pid_hash = alloc_large_system_hash("PID", sizeof(*pid_hash), 0, 18,
581 HASH_EARLY | HASH_SMALL | HASH_ZERO, 576 HASH_EARLY | HASH_SMALL | HASH_ZERO,
582 &pidhash_shift, NULL, 577 &pidhash_shift, NULL,
583 0, 4096); 578 0, 4096);
584 pidhash_size = 1U << pidhash_shift;
585} 579}
586 580
587void __init pidmap_init(void) 581void __init pidmap_init(void)
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 222317721c5a..0972a8e09d08 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -1650,7 +1650,7 @@ static unsigned long minimum_image_size(unsigned long saveable)
1650{ 1650{
1651 unsigned long size; 1651 unsigned long size;
1652 1652
1653 size = global_page_state(NR_SLAB_RECLAIMABLE) 1653 size = global_node_page_state(NR_SLAB_RECLAIMABLE)
1654 + global_node_page_state(NR_ACTIVE_ANON) 1654 + global_node_page_state(NR_ACTIVE_ANON)
1655 + global_node_page_state(NR_INACTIVE_ANON) 1655 + global_node_page_state(NR_INACTIVE_ANON)
1656 + global_node_page_state(NR_ACTIVE_FILE) 1656 + global_node_page_state(NR_ACTIVE_FILE)
diff --git a/kernel/sched/wait.c b/kernel/sched/wait.c
index 17f11c6b0a9f..d6afed6d0752 100644
--- a/kernel/sched/wait.c
+++ b/kernel/sched/wait.c
@@ -70,9 +70,10 @@ static void __wake_up_common(struct wait_queue_head *wq_head, unsigned int mode,
70 70
71 list_for_each_entry_safe(curr, next, &wq_head->head, entry) { 71 list_for_each_entry_safe(curr, next, &wq_head->head, entry) {
72 unsigned flags = curr->flags; 72 unsigned flags = curr->flags;
73 73 int ret = curr->func(curr, mode, wake_flags, key);
74 if (curr->func(curr, mode, wake_flags, key) && 74 if (ret < 0)
75 (flags & WQ_FLAG_EXCLUSIVE) && !--nr_exclusive) 75 break;
76 if (ret && (flags & WQ_FLAG_EXCLUSIVE) && !--nr_exclusive)
76 break; 77 break;
77 } 78 }
78} 79}
diff --git a/kernel/signal.c b/kernel/signal.c
index caed9133ae52..ed804a470dcd 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1194,7 +1194,11 @@ force_sig_info(int sig, struct siginfo *info, struct task_struct *t)
1194 recalc_sigpending_and_wake(t); 1194 recalc_sigpending_and_wake(t);
1195 } 1195 }
1196 } 1196 }
1197 if (action->sa.sa_handler == SIG_DFL) 1197 /*
1198 * Don't clear SIGNAL_UNKILLABLE for traced tasks, users won't expect
1199 * debugging to leave init killable.
1200 */
1201 if (action->sa.sa_handler == SIG_DFL && !t->ptrace)
1198 t->signal->flags &= ~SIGNAL_UNKILLABLE; 1202 t->signal->flags &= ~SIGNAL_UNKILLABLE;
1199 ret = specific_send_sig_info(sig, info, t); 1203 ret = specific_send_sig_info(sig, info, t);
1200 spin_unlock_irqrestore(&t->sighand->siglock, flags); 1204 spin_unlock_irqrestore(&t->sighand->siglock, flags);
@@ -3303,12 +3307,15 @@ SYSCALL_DEFINE1(sigpending, old_sigset_t __user *, set)
3303#ifdef CONFIG_COMPAT 3307#ifdef CONFIG_COMPAT
3304COMPAT_SYSCALL_DEFINE1(sigpending, compat_old_sigset_t __user *, set32) 3308COMPAT_SYSCALL_DEFINE1(sigpending, compat_old_sigset_t __user *, set32)
3305{ 3309{
3310#ifdef __BIG_ENDIAN
3306 sigset_t set; 3311 sigset_t set;
3307 int err = do_sigpending(&set, sizeof(old_sigset_t)); 3312 int err = do_sigpending(&set, sizeof(set.sig[0]));
3308 if (err == 0) 3313 if (!err)
3309 if (copy_to_user(set32, &set, sizeof(old_sigset_t))) 3314 err = put_user(set.sig[0], set32);
3310 err = -EFAULT;
3311 return err; 3315 return err;
3316#else
3317 return sys_rt_sigpending((sigset_t __user *)set32, sizeof(*set32));
3318#endif
3312} 3319}
3313#endif 3320#endif
3314 3321
diff --git a/kernel/time/timer.c b/kernel/time/timer.c
index 71ce3f4eead3..f2674a056c26 100644
--- a/kernel/time/timer.c
+++ b/kernel/time/timer.c
@@ -203,6 +203,7 @@ struct timer_base {
203 bool migration_enabled; 203 bool migration_enabled;
204 bool nohz_active; 204 bool nohz_active;
205 bool is_idle; 205 bool is_idle;
206 bool must_forward_clk;
206 DECLARE_BITMAP(pending_map, WHEEL_SIZE); 207 DECLARE_BITMAP(pending_map, WHEEL_SIZE);
207 struct hlist_head vectors[WHEEL_SIZE]; 208 struct hlist_head vectors[WHEEL_SIZE];
208} ____cacheline_aligned; 209} ____cacheline_aligned;
@@ -856,13 +857,19 @@ get_target_base(struct timer_base *base, unsigned tflags)
856 857
857static inline void forward_timer_base(struct timer_base *base) 858static inline void forward_timer_base(struct timer_base *base)
858{ 859{
859 unsigned long jnow = READ_ONCE(jiffies); 860 unsigned long jnow;
860 861
861 /* 862 /*
862 * We only forward the base when it's idle and we have a delta between 863 * We only forward the base when we are idle or have just come out of
863 * base clock and jiffies. 864 * idle (must_forward_clk logic), and have a delta between base clock
865 * and jiffies. In the common case, run_timers will take care of it.
864 */ 866 */
865 if (!base->is_idle || (long) (jnow - base->clk) < 2) 867 if (likely(!base->must_forward_clk))
868 return;
869
870 jnow = READ_ONCE(jiffies);
871 base->must_forward_clk = base->is_idle;
872 if ((long)(jnow - base->clk) < 2)
866 return; 873 return;
867 874
868 /* 875 /*
@@ -938,6 +945,11 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
938 * same array bucket then just return: 945 * same array bucket then just return:
939 */ 946 */
940 if (timer_pending(timer)) { 947 if (timer_pending(timer)) {
948 /*
949 * The downside of this optimization is that it can result in
950 * larger granularity than you would get from adding a new
951 * timer with this expiry.
952 */
941 if (timer->expires == expires) 953 if (timer->expires == expires)
942 return 1; 954 return 1;
943 955
@@ -948,6 +960,7 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
948 * dequeue/enqueue dance. 960 * dequeue/enqueue dance.
949 */ 961 */
950 base = lock_timer_base(timer, &flags); 962 base = lock_timer_base(timer, &flags);
963 forward_timer_base(base);
951 964
952 clk = base->clk; 965 clk = base->clk;
953 idx = calc_wheel_index(expires, clk); 966 idx = calc_wheel_index(expires, clk);
@@ -964,6 +977,7 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
964 } 977 }
965 } else { 978 } else {
966 base = lock_timer_base(timer, &flags); 979 base = lock_timer_base(timer, &flags);
980 forward_timer_base(base);
967 } 981 }
968 982
969 ret = detach_if_pending(timer, base, false); 983 ret = detach_if_pending(timer, base, false);
@@ -991,12 +1005,10 @@ __mod_timer(struct timer_list *timer, unsigned long expires, bool pending_only)
991 raw_spin_lock(&base->lock); 1005 raw_spin_lock(&base->lock);
992 WRITE_ONCE(timer->flags, 1006 WRITE_ONCE(timer->flags,
993 (timer->flags & ~TIMER_BASEMASK) | base->cpu); 1007 (timer->flags & ~TIMER_BASEMASK) | base->cpu);
1008 forward_timer_base(base);
994 } 1009 }
995 } 1010 }
996 1011
997 /* Try to forward a stale timer base clock */
998 forward_timer_base(base);
999
1000 timer->expires = expires; 1012 timer->expires = expires;
1001 /* 1013 /*
1002 * If 'idx' was calculated above and the base time did not advance 1014 * If 'idx' was calculated above and the base time did not advance
@@ -1112,6 +1124,7 @@ void add_timer_on(struct timer_list *timer, int cpu)
1112 WRITE_ONCE(timer->flags, 1124 WRITE_ONCE(timer->flags,
1113 (timer->flags & ~TIMER_BASEMASK) | cpu); 1125 (timer->flags & ~TIMER_BASEMASK) | cpu);
1114 } 1126 }
1127 forward_timer_base(base);
1115 1128
1116 debug_activate(timer, timer->expires); 1129 debug_activate(timer, timer->expires);
1117 internal_add_timer(base, timer); 1130 internal_add_timer(base, timer);
@@ -1495,12 +1508,18 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem)
1495 base->is_idle = false; 1508 base->is_idle = false;
1496 } else { 1509 } else {
1497 if (!is_max_delta) 1510 if (!is_max_delta)
1498 expires = basem + (nextevt - basej) * TICK_NSEC; 1511 expires = basem + (u64)(nextevt - basej) * TICK_NSEC;
1499 /* 1512 /*
1500 * If we expect to sleep more than a tick, mark the base idle: 1513 * If we expect to sleep more than a tick, mark the base idle.
1514 * Also the tick is stopped so any added timer must forward
1515 * the base clk itself to keep granularity small. This idle
1516 * logic is only maintained for the BASE_STD base, deferrable
1517 * timers may still see large granularity skew (by design).
1501 */ 1518 */
1502 if ((expires - basem) > TICK_NSEC) 1519 if ((expires - basem) > TICK_NSEC) {
1520 base->must_forward_clk = true;
1503 base->is_idle = true; 1521 base->is_idle = true;
1522 }
1504 } 1523 }
1505 raw_spin_unlock(&base->lock); 1524 raw_spin_unlock(&base->lock);
1506 1525
@@ -1611,6 +1630,19 @@ static __latent_entropy void run_timer_softirq(struct softirq_action *h)
1611{ 1630{
1612 struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]); 1631 struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]);
1613 1632
1633 /*
1634 * must_forward_clk must be cleared before running timers so that any
1635 * timer functions that call mod_timer will not try to forward the
1636 * base. idle trcking / clock forwarding logic is only used with
1637 * BASE_STD timers.
1638 *
1639 * The deferrable base does not do idle tracking at all, so we do
1640 * not forward it. This can result in very large variations in
1641 * granularity for deferrable timers, but they can be deferred for
1642 * long periods due to idle.
1643 */
1644 base->must_forward_clk = false;
1645
1614 __run_timers(base); 1646 __run_timers(base);
1615 if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && base->nohz_active) 1647 if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && base->nohz_active)
1616 __run_timers(this_cpu_ptr(&timer_bases[BASE_DEF])); 1648 __run_timers(this_cpu_ptr(&timer_bases[BASE_DEF]));
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index 37385193a608..dc498b605d5d 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -204,10 +204,36 @@ BPF_CALL_5(bpf_trace_printk, char *, fmt, u32, fmt_size, u64, arg1,
204 fmt_cnt++; 204 fmt_cnt++;
205 } 205 }
206 206
207 return __trace_printk(1/* fake ip will not be printed */, fmt, 207/* Horrid workaround for getting va_list handling working with different
208 mod[0] == 2 ? arg1 : mod[0] == 1 ? (long) arg1 : (u32) arg1, 208 * argument type combinations generically for 32 and 64 bit archs.
209 mod[1] == 2 ? arg2 : mod[1] == 1 ? (long) arg2 : (u32) arg2, 209 */
210 mod[2] == 2 ? arg3 : mod[2] == 1 ? (long) arg3 : (u32) arg3); 210#define __BPF_TP_EMIT() __BPF_ARG3_TP()
211#define __BPF_TP(...) \
212 __trace_printk(1 /* Fake ip will not be printed. */, \
213 fmt, ##__VA_ARGS__)
214
215#define __BPF_ARG1_TP(...) \
216 ((mod[0] == 2 || (mod[0] == 1 && __BITS_PER_LONG == 64)) \
217 ? __BPF_TP(arg1, ##__VA_ARGS__) \
218 : ((mod[0] == 1 || (mod[0] == 0 && __BITS_PER_LONG == 32)) \
219 ? __BPF_TP((long)arg1, ##__VA_ARGS__) \
220 : __BPF_TP((u32)arg1, ##__VA_ARGS__)))
221
222#define __BPF_ARG2_TP(...) \
223 ((mod[1] == 2 || (mod[1] == 1 && __BITS_PER_LONG == 64)) \
224 ? __BPF_ARG1_TP(arg2, ##__VA_ARGS__) \
225 : ((mod[1] == 1 || (mod[1] == 0 && __BITS_PER_LONG == 32)) \
226 ? __BPF_ARG1_TP((long)arg2, ##__VA_ARGS__) \
227 : __BPF_ARG1_TP((u32)arg2, ##__VA_ARGS__)))
228
229#define __BPF_ARG3_TP(...) \
230 ((mod[2] == 2 || (mod[2] == 1 && __BITS_PER_LONG == 64)) \
231 ? __BPF_ARG2_TP(arg3, ##__VA_ARGS__) \
232 : ((mod[2] == 1 || (mod[2] == 0 && __BITS_PER_LONG == 32)) \
233 ? __BPF_ARG2_TP((long)arg3, ##__VA_ARGS__) \
234 : __BPF_ARG2_TP((u32)arg3, ##__VA_ARGS__)))
235
236 return __BPF_TP_EMIT();
211} 237}
212 238
213static const struct bpf_func_proto bpf_trace_printk_proto = { 239static const struct bpf_func_proto bpf_trace_printk_proto = {
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 02004ae91860..96cea88fa00f 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -889,6 +889,10 @@ static int profile_graph_entry(struct ftrace_graph_ent *trace)
889 889
890 function_profile_call(trace->func, 0, NULL, NULL); 890 function_profile_call(trace->func, 0, NULL, NULL);
891 891
892 /* If function graph is shutting down, ret_stack can be NULL */
893 if (!current->ret_stack)
894 return 0;
895
892 if (index >= 0 && index < FTRACE_RETFUNC_DEPTH) 896 if (index >= 0 && index < FTRACE_RETFUNC_DEPTH)
893 current->ret_stack[index].subtime = 0; 897 current->ret_stack[index].subtime = 0;
894 898
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 529cc50d7243..81279c6602ff 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -4386,15 +4386,19 @@ EXPORT_SYMBOL_GPL(ring_buffer_swap_cpu);
4386 * the page that was allocated, with the read page of the buffer. 4386 * the page that was allocated, with the read page of the buffer.
4387 * 4387 *
4388 * Returns: 4388 * Returns:
4389 * The page allocated, or NULL on error. 4389 * The page allocated, or ERR_PTR
4390 */ 4390 */
4391void *ring_buffer_alloc_read_page(struct ring_buffer *buffer, int cpu) 4391void *ring_buffer_alloc_read_page(struct ring_buffer *buffer, int cpu)
4392{ 4392{
4393 struct ring_buffer_per_cpu *cpu_buffer = buffer->buffers[cpu]; 4393 struct ring_buffer_per_cpu *cpu_buffer;
4394 struct buffer_data_page *bpage = NULL; 4394 struct buffer_data_page *bpage = NULL;
4395 unsigned long flags; 4395 unsigned long flags;
4396 struct page *page; 4396 struct page *page;
4397 4397
4398 if (!cpumask_test_cpu(cpu, buffer->cpumask))
4399 return ERR_PTR(-ENODEV);
4400
4401 cpu_buffer = buffer->buffers[cpu];
4398 local_irq_save(flags); 4402 local_irq_save(flags);
4399 arch_spin_lock(&cpu_buffer->lock); 4403 arch_spin_lock(&cpu_buffer->lock);
4400 4404
@@ -4412,7 +4416,7 @@ void *ring_buffer_alloc_read_page(struct ring_buffer *buffer, int cpu)
4412 page = alloc_pages_node(cpu_to_node(cpu), 4416 page = alloc_pages_node(cpu_to_node(cpu),
4413 GFP_KERNEL | __GFP_NORETRY, 0); 4417 GFP_KERNEL | __GFP_NORETRY, 0);
4414 if (!page) 4418 if (!page)
4415 return NULL; 4419 return ERR_PTR(-ENOMEM);
4416 4420
4417 bpage = page_address(page); 4421 bpage = page_address(page);
4418 4422
@@ -4467,8 +4471,8 @@ EXPORT_SYMBOL_GPL(ring_buffer_free_read_page);
4467 * 4471 *
4468 * for example: 4472 * for example:
4469 * rpage = ring_buffer_alloc_read_page(buffer, cpu); 4473 * rpage = ring_buffer_alloc_read_page(buffer, cpu);
4470 * if (!rpage) 4474 * if (IS_ERR(rpage))
4471 * return error; 4475 * return PTR_ERR(rpage);
4472 * ret = ring_buffer_read_page(buffer, &rpage, len, cpu, 0); 4476 * ret = ring_buffer_read_page(buffer, &rpage, len, cpu, 0);
4473 * if (ret >= 0) 4477 * if (ret >= 0)
4474 * process_page(rpage, ret); 4478 * process_page(rpage, ret);
diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index 9fbcaf567886..68ee79afe31c 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -113,7 +113,7 @@ static enum event_status read_page(int cpu)
113 int i; 113 int i;
114 114
115 bpage = ring_buffer_alloc_read_page(buffer, cpu); 115 bpage = ring_buffer_alloc_read_page(buffer, cpu);
116 if (!bpage) 116 if (IS_ERR(bpage))
117 return EVENT_DROPPED; 117 return EVENT_DROPPED;
118 118
119 ret = ring_buffer_read_page(buffer, &bpage, PAGE_SIZE, cpu, 1); 119 ret = ring_buffer_read_page(buffer, &bpage, PAGE_SIZE, cpu, 1);
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 42b9355033d4..44004d8aa3b3 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6598,7 +6598,7 @@ tracing_buffers_read(struct file *filp, char __user *ubuf,
6598{ 6598{
6599 struct ftrace_buffer_info *info = filp->private_data; 6599 struct ftrace_buffer_info *info = filp->private_data;
6600 struct trace_iterator *iter = &info->iter; 6600 struct trace_iterator *iter = &info->iter;
6601 ssize_t ret; 6601 ssize_t ret = 0;
6602 ssize_t size; 6602 ssize_t size;
6603 6603
6604 if (!count) 6604 if (!count)
@@ -6612,10 +6612,15 @@ tracing_buffers_read(struct file *filp, char __user *ubuf,
6612 if (!info->spare) { 6612 if (!info->spare) {
6613 info->spare = ring_buffer_alloc_read_page(iter->trace_buffer->buffer, 6613 info->spare = ring_buffer_alloc_read_page(iter->trace_buffer->buffer,
6614 iter->cpu_file); 6614 iter->cpu_file);
6615 info->spare_cpu = iter->cpu_file; 6615 if (IS_ERR(info->spare)) {
6616 ret = PTR_ERR(info->spare);
6617 info->spare = NULL;
6618 } else {
6619 info->spare_cpu = iter->cpu_file;
6620 }
6616 } 6621 }
6617 if (!info->spare) 6622 if (!info->spare)
6618 return -ENOMEM; 6623 return ret;
6619 6624
6620 /* Do we have previous read data to read? */ 6625 /* Do we have previous read data to read? */
6621 if (info->read < PAGE_SIZE) 6626 if (info->read < PAGE_SIZE)
@@ -6790,8 +6795,9 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
6790 ref->ref = 1; 6795 ref->ref = 1;
6791 ref->buffer = iter->trace_buffer->buffer; 6796 ref->buffer = iter->trace_buffer->buffer;
6792 ref->page = ring_buffer_alloc_read_page(ref->buffer, iter->cpu_file); 6797 ref->page = ring_buffer_alloc_read_page(ref->buffer, iter->cpu_file);
6793 if (!ref->page) { 6798 if (IS_ERR(ref->page)) {
6794 ret = -ENOMEM; 6799 ret = PTR_ERR(ref->page);
6800 ref->page = NULL;
6795 kfree(ref); 6801 kfree(ref);
6796 break; 6802 break;
6797 } 6803 }
@@ -8293,6 +8299,7 @@ __init static int tracer_alloc_buffers(void)
8293 if (ret < 0) 8299 if (ret < 0)
8294 goto out_free_cpumask; 8300 goto out_free_cpumask;
8295 /* Used for event triggers */ 8301 /* Used for event triggers */
8302 ret = -ENOMEM;
8296 temp_buffer = ring_buffer_alloc(PAGE_SIZE, RB_FL_OVERWRITE); 8303 temp_buffer = ring_buffer_alloc(PAGE_SIZE, RB_FL_OVERWRITE);
8297 if (!temp_buffer) 8304 if (!temp_buffer)
8298 goto out_rm_hp_state; 8305 goto out_rm_hp_state;
@@ -8407,4 +8414,4 @@ __init static int clear_boot_tracer(void)
8407} 8414}
8408 8415
8409fs_initcall(tracer_init_tracefs); 8416fs_initcall(tracer_init_tracefs);
8410late_initcall(clear_boot_tracer); 8417late_initcall_sync(clear_boot_tracer);
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index 59a411ff60c7..181e139a8057 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -1959,6 +1959,10 @@ static int create_filter(struct trace_event_call *call,
1959 if (err && set_str) 1959 if (err && set_str)
1960 append_filter_err(ps, filter); 1960 append_filter_err(ps, filter);
1961 } 1961 }
1962 if (err && !set_str) {
1963 free_event_filter(filter);
1964 filter = NULL;
1965 }
1962 create_filter_finish(ps); 1966 create_filter_finish(ps);
1963 1967
1964 *filterp = filter; 1968 *filterp = filter;
diff --git a/kernel/trace/tracing_map.c b/kernel/trace/tracing_map.c
index 0a689bbb78ef..305039b122fa 100644
--- a/kernel/trace/tracing_map.c
+++ b/kernel/trace/tracing_map.c
@@ -221,16 +221,19 @@ void tracing_map_array_free(struct tracing_map_array *a)
221 if (!a) 221 if (!a)
222 return; 222 return;
223 223
224 if (!a->pages) { 224 if (!a->pages)
225 kfree(a); 225 goto free;
226 return;
227 }
228 226
229 for (i = 0; i < a->n_pages; i++) { 227 for (i = 0; i < a->n_pages; i++) {
230 if (!a->pages[i]) 228 if (!a->pages[i])
231 break; 229 break;
232 free_page((unsigned long)a->pages[i]); 230 free_page((unsigned long)a->pages[i]);
233 } 231 }
232
233 kfree(a->pages);
234
235 free:
236 kfree(a);
234} 237}
235 238
236struct tracing_map_array *tracing_map_array_alloc(unsigned int n_elts, 239struct tracing_map_array *tracing_map_array_alloc(unsigned int n_elts,
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 06d3389bca0d..f5d52024f6b7 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -240,6 +240,7 @@ static void set_sample_period(void)
240 * hardlockup detector generates a warning 240 * hardlockup detector generates a warning
241 */ 241 */
242 sample_period = get_softlockup_thresh() * ((u64)NSEC_PER_SEC / 5); 242 sample_period = get_softlockup_thresh() * ((u64)NSEC_PER_SEC / 5);
243 watchdog_update_hrtimer_threshold(sample_period);
243} 244}
244 245
245/* Commands for resetting the watchdog */ 246/* Commands for resetting the watchdog */
diff --git a/kernel/watchdog_hld.c b/kernel/watchdog_hld.c
index 295a0d84934c..3a09ea1b1d3d 100644
--- a/kernel/watchdog_hld.c
+++ b/kernel/watchdog_hld.c
@@ -37,6 +37,62 @@ void arch_touch_nmi_watchdog(void)
37} 37}
38EXPORT_SYMBOL(arch_touch_nmi_watchdog); 38EXPORT_SYMBOL(arch_touch_nmi_watchdog);
39 39
40#ifdef CONFIG_HARDLOCKUP_CHECK_TIMESTAMP
41static DEFINE_PER_CPU(ktime_t, last_timestamp);
42static DEFINE_PER_CPU(unsigned int, nmi_rearmed);
43static ktime_t watchdog_hrtimer_sample_threshold __read_mostly;
44
45void watchdog_update_hrtimer_threshold(u64 period)
46{
47 /*
48 * The hrtimer runs with a period of (watchdog_threshold * 2) / 5
49 *
50 * So it runs effectively with 2.5 times the rate of the NMI
51 * watchdog. That means the hrtimer should fire 2-3 times before
52 * the NMI watchdog expires. The NMI watchdog on x86 is based on
53 * unhalted CPU cycles, so if Turbo-Mode is enabled the CPU cycles
54 * might run way faster than expected and the NMI fires in a
55 * smaller period than the one deduced from the nominal CPU
56 * frequency. Depending on the Turbo-Mode factor this might be fast
57 * enough to get the NMI period smaller than the hrtimer watchdog
58 * period and trigger false positives.
59 *
60 * The sample threshold is used to check in the NMI handler whether
61 * the minimum time between two NMI samples has elapsed. That
62 * prevents false positives.
63 *
64 * Set this to 4/5 of the actual watchdog threshold period so the
65 * hrtimer is guaranteed to fire at least once within the real
66 * watchdog threshold.
67 */
68 watchdog_hrtimer_sample_threshold = period * 2;
69}
70
71static bool watchdog_check_timestamp(void)
72{
73 ktime_t delta, now = ktime_get_mono_fast_ns();
74
75 delta = now - __this_cpu_read(last_timestamp);
76 if (delta < watchdog_hrtimer_sample_threshold) {
77 /*
78 * If ktime is jiffies based, a stalled timer would prevent
79 * jiffies from being incremented and the filter would look
80 * at a stale timestamp and never trigger.
81 */
82 if (__this_cpu_inc_return(nmi_rearmed) < 10)
83 return false;
84 }
85 __this_cpu_write(nmi_rearmed, 0);
86 __this_cpu_write(last_timestamp, now);
87 return true;
88}
89#else
90static inline bool watchdog_check_timestamp(void)
91{
92 return true;
93}
94#endif
95
40static struct perf_event_attr wd_hw_attr = { 96static struct perf_event_attr wd_hw_attr = {
41 .type = PERF_TYPE_HARDWARE, 97 .type = PERF_TYPE_HARDWARE,
42 .config = PERF_COUNT_HW_CPU_CYCLES, 98 .config = PERF_COUNT_HW_CPU_CYCLES,
@@ -61,6 +117,9 @@ static void watchdog_overflow_callback(struct perf_event *event,
61 return; 117 return;
62 } 118 }
63 119
120 if (!watchdog_check_timestamp())
121 return;
122
64 /* check for a hardlockup 123 /* check for a hardlockup
65 * This is done by making sure our timer interrupt 124 * This is done by making sure our timer interrupt
66 * is incrementing. The timer interrupt should have 125 * is incrementing. The timer interrupt should have
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a86688fabc55..ca937b0c3a96 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -3577,6 +3577,13 @@ static bool wq_calc_node_cpumask(const struct workqueue_attrs *attrs, int node,
3577 3577
3578 /* yeap, return possible CPUs in @node that @attrs wants */ 3578 /* yeap, return possible CPUs in @node that @attrs wants */
3579 cpumask_and(cpumask, attrs->cpumask, wq_numa_possible_cpumask[node]); 3579 cpumask_and(cpumask, attrs->cpumask, wq_numa_possible_cpumask[node]);
3580
3581 if (cpumask_empty(cpumask)) {
3582 pr_warn_once("WARNING: workqueue cpumask: online intersect > "
3583 "possible intersect\n");
3584 return false;
3585 }
3586
3580 return !cpumask_equal(cpumask, attrs->cpumask); 3587 return !cpumask_equal(cpumask, attrs->cpumask);
3581 3588
3582use_dfl: 3589use_dfl:
@@ -3744,8 +3751,12 @@ static int apply_workqueue_attrs_locked(struct workqueue_struct *wq,
3744 return -EINVAL; 3751 return -EINVAL;
3745 3752
3746 /* creating multiple pwqs breaks ordering guarantee */ 3753 /* creating multiple pwqs breaks ordering guarantee */
3747 if (WARN_ON((wq->flags & __WQ_ORDERED) && !list_empty(&wq->pwqs))) 3754 if (!list_empty(&wq->pwqs)) {
3748 return -EINVAL; 3755 if (WARN_ON(wq->flags & __WQ_ORDERED_EXPLICIT))
3756 return -EINVAL;
3757
3758 wq->flags &= ~__WQ_ORDERED;
3759 }
3749 3760
3750 ctx = apply_wqattrs_prepare(wq, attrs); 3761 ctx = apply_wqattrs_prepare(wq, attrs);
3751 if (!ctx) 3762 if (!ctx)
@@ -3929,6 +3940,16 @@ struct workqueue_struct *__alloc_workqueue_key(const char *fmt,
3929 struct workqueue_struct *wq; 3940 struct workqueue_struct *wq;
3930 struct pool_workqueue *pwq; 3941 struct pool_workqueue *pwq;
3931 3942
3943 /*
3944 * Unbound && max_active == 1 used to imply ordered, which is no
3945 * longer the case on NUMA machines due to per-node pools. While
3946 * alloc_ordered_workqueue() is the right way to create an ordered
3947 * workqueue, keep the previous behavior to avoid subtle breakages
3948 * on NUMA.
3949 */
3950 if ((flags & WQ_UNBOUND) && max_active == 1)
3951 flags |= __WQ_ORDERED;
3952
3932 /* see the comment above the definition of WQ_POWER_EFFICIENT */ 3953 /* see the comment above the definition of WQ_POWER_EFFICIENT */
3933 if ((flags & WQ_POWER_EFFICIENT) && wq_power_efficient) 3954 if ((flags & WQ_POWER_EFFICIENT) && wq_power_efficient)
3934 flags |= WQ_UNBOUND; 3955 flags |= WQ_UNBOUND;
@@ -4119,13 +4140,14 @@ void workqueue_set_max_active(struct workqueue_struct *wq, int max_active)
4119 struct pool_workqueue *pwq; 4140 struct pool_workqueue *pwq;
4120 4141
4121 /* disallow meddling with max_active for ordered workqueues */ 4142 /* disallow meddling with max_active for ordered workqueues */
4122 if (WARN_ON(wq->flags & __WQ_ORDERED)) 4143 if (WARN_ON(wq->flags & __WQ_ORDERED_EXPLICIT))
4123 return; 4144 return;
4124 4145
4125 max_active = wq_clamp_max_active(max_active, wq->flags, wq->name); 4146 max_active = wq_clamp_max_active(max_active, wq->flags, wq->name);
4126 4147
4127 mutex_lock(&wq->mutex); 4148 mutex_lock(&wq->mutex);
4128 4149
4150 wq->flags &= ~__WQ_ORDERED;
4129 wq->saved_max_active = max_active; 4151 wq->saved_max_active = max_active;
4130 4152
4131 for_each_pwq(pwq, wq) 4153 for_each_pwq(pwq, wq)
@@ -5253,7 +5275,7 @@ int workqueue_sysfs_register(struct workqueue_struct *wq)
5253 * attributes breaks ordering guarantee. Disallow exposing ordered 5275 * attributes breaks ordering guarantee. Disallow exposing ordered
5254 * workqueues. 5276 * workqueues.
5255 */ 5277 */
5256 if (WARN_ON(wq->flags & __WQ_ORDERED)) 5278 if (WARN_ON(wq->flags & __WQ_ORDERED_EXPLICIT))
5257 return -EINVAL; 5279 return -EINVAL;
5258 5280
5259 wq->wq_dev = wq_dev = kzalloc(sizeof(*wq_dev), GFP_KERNEL); 5281 wq->wq_dev = wq_dev = kzalloc(sizeof(*wq_dev), GFP_KERNEL);
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 98fe715522e8..c617b9d1d6cb 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -798,6 +798,13 @@ config HARDLOCKUP_DETECTOR_PERF
798 select SOFTLOCKUP_DETECTOR 798 select SOFTLOCKUP_DETECTOR
799 799
800# 800#
801# Enables a timestamp based low pass filter to compensate for perf based
802# hard lockup detection which runs too fast due to turbo modes.
803#
804config HARDLOCKUP_CHECK_TIMESTAMP
805 bool
806
807#
801# arch/ can define HAVE_HARDLOCKUP_DETECTOR_ARCH to provide their own hard 808# arch/ can define HAVE_HARDLOCKUP_DETECTOR_ARCH to provide their own hard
802# lockup detector rather than the perf based detector. 809# lockup detector rather than the perf based detector.
803# 810#
diff --git a/lib/fault-inject.c b/lib/fault-inject.c
index 7d315fdb9f13..cf7b129b0b2b 100644
--- a/lib/fault-inject.c
+++ b/lib/fault-inject.c
@@ -110,10 +110,12 @@ bool should_fail(struct fault_attr *attr, ssize_t size)
110 if (in_task()) { 110 if (in_task()) {
111 unsigned int fail_nth = READ_ONCE(current->fail_nth); 111 unsigned int fail_nth = READ_ONCE(current->fail_nth);
112 112
113 if (fail_nth && !WRITE_ONCE(current->fail_nth, fail_nth - 1)) 113 if (fail_nth) {
114 goto fail; 114 if (!WRITE_ONCE(current->fail_nth, fail_nth - 1))
115 goto fail;
115 116
116 return false; 117 return false;
118 }
117 } 119 }
118 120
119 /* No need to check any other properties if the probability is 0 */ 121 /* No need to check any other properties if the probability is 0 */
diff --git a/lib/test_kmod.c b/lib/test_kmod.c
index 6c1d678bcf8b..ff9148969b92 100644
--- a/lib/test_kmod.c
+++ b/lib/test_kmod.c
@@ -485,7 +485,7 @@ static ssize_t config_show(struct device *dev,
485 config->test_driver); 485 config->test_driver);
486 else 486 else
487 len += snprintf(buf+len, PAGE_SIZE - len, 487 len += snprintf(buf+len, PAGE_SIZE - len,
488 "driver:\tEMTPY\n"); 488 "driver:\tEMPTY\n");
489 489
490 if (config->test_fs) 490 if (config->test_fs)
491 len += snprintf(buf+len, PAGE_SIZE - len, 491 len += snprintf(buf+len, PAGE_SIZE - len,
@@ -493,7 +493,7 @@ static ssize_t config_show(struct device *dev,
493 config->test_fs); 493 config->test_fs);
494 else 494 else
495 len += snprintf(buf+len, PAGE_SIZE - len, 495 len += snprintf(buf+len, PAGE_SIZE - len,
496 "fs:\tEMTPY\n"); 496 "fs:\tEMPTY\n");
497 497
498 mutex_unlock(&test_dev->config_mutex); 498 mutex_unlock(&test_dev->config_mutex);
499 499
@@ -746,11 +746,11 @@ static int trigger_config_run_type(struct kmod_test_device *test_dev,
746 strlen(test_str)); 746 strlen(test_str));
747 break; 747 break;
748 case TEST_KMOD_FS_TYPE: 748 case TEST_KMOD_FS_TYPE:
749 break;
750 kfree_const(config->test_fs); 749 kfree_const(config->test_fs);
751 config->test_driver = NULL; 750 config->test_driver = NULL;
752 copied = config_copy_test_fs(config, test_str, 751 copied = config_copy_test_fs(config, test_str,
753 strlen(test_str)); 752 strlen(test_str));
753 break;
754 default: 754 default:
755 mutex_unlock(&test_dev->config_mutex); 755 mutex_unlock(&test_dev->config_mutex);
756 return -EINVAL; 756 return -EINVAL;
@@ -880,10 +880,10 @@ static int test_dev_config_update_uint_sync(struct kmod_test_device *test_dev,
880 int (*test_sync)(struct kmod_test_device *test_dev)) 880 int (*test_sync)(struct kmod_test_device *test_dev))
881{ 881{
882 int ret; 882 int ret;
883 long new; 883 unsigned long new;
884 unsigned int old_val; 884 unsigned int old_val;
885 885
886 ret = kstrtol(buf, 10, &new); 886 ret = kstrtoul(buf, 10, &new);
887 if (ret) 887 if (ret)
888 return ret; 888 return ret;
889 889
@@ -918,9 +918,9 @@ static int test_dev_config_update_uint_range(struct kmod_test_device *test_dev,
918 unsigned int max) 918 unsigned int max)
919{ 919{
920 int ret; 920 int ret;
921 long new; 921 unsigned long new;
922 922
923 ret = kstrtol(buf, 10, &new); 923 ret = kstrtoul(buf, 10, &new);
924 if (ret) 924 if (ret)
925 return ret; 925 return ret;
926 926
@@ -1146,7 +1146,7 @@ static struct kmod_test_device *register_test_dev_kmod(void)
1146 struct kmod_test_device *test_dev = NULL; 1146 struct kmod_test_device *test_dev = NULL;
1147 int ret; 1147 int ret;
1148 1148
1149 mutex_unlock(&reg_dev_mutex); 1149 mutex_lock(&reg_dev_mutex);
1150 1150
1151 /* int should suffice for number of devices, test for wrap */ 1151 /* int should suffice for number of devices, test for wrap */
1152 if (unlikely(num_test_devs + 1) < 0) { 1152 if (unlikely(num_test_devs + 1) < 0) {
diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c
index 64e899b63337..0ffca990a833 100644
--- a/lib/test_rhashtable.c
+++ b/lib/test_rhashtable.c
@@ -56,8 +56,13 @@ static bool enomem_retry = false;
56module_param(enomem_retry, bool, 0); 56module_param(enomem_retry, bool, 0);
57MODULE_PARM_DESC(enomem_retry, "Retry insert even if -ENOMEM was returned (default: off)"); 57MODULE_PARM_DESC(enomem_retry, "Retry insert even if -ENOMEM was returned (default: off)");
58 58
59struct test_obj_val {
60 int id;
61 int tid;
62};
63
59struct test_obj { 64struct test_obj {
60 int value; 65 struct test_obj_val value;
61 struct rhash_head node; 66 struct rhash_head node;
62}; 67};
63 68
@@ -72,7 +77,7 @@ static struct test_obj array[MAX_ENTRIES];
72static struct rhashtable_params test_rht_params = { 77static struct rhashtable_params test_rht_params = {
73 .head_offset = offsetof(struct test_obj, node), 78 .head_offset = offsetof(struct test_obj, node),
74 .key_offset = offsetof(struct test_obj, value), 79 .key_offset = offsetof(struct test_obj, value),
75 .key_len = sizeof(int), 80 .key_len = sizeof(struct test_obj_val),
76 .hashfn = jhash, 81 .hashfn = jhash,
77 .nulls_base = (3U << RHT_BASE_SHIFT), 82 .nulls_base = (3U << RHT_BASE_SHIFT),
78}; 83};
@@ -109,24 +114,26 @@ static int __init test_rht_lookup(struct rhashtable *ht)
109 for (i = 0; i < entries * 2; i++) { 114 for (i = 0; i < entries * 2; i++) {
110 struct test_obj *obj; 115 struct test_obj *obj;
111 bool expected = !(i % 2); 116 bool expected = !(i % 2);
112 u32 key = i; 117 struct test_obj_val key = {
118 .id = i,
119 };
113 120
114 if (array[i / 2].value == TEST_INSERT_FAIL) 121 if (array[i / 2].value.id == TEST_INSERT_FAIL)
115 expected = false; 122 expected = false;
116 123
117 obj = rhashtable_lookup_fast(ht, &key, test_rht_params); 124 obj = rhashtable_lookup_fast(ht, &key, test_rht_params);
118 125
119 if (expected && !obj) { 126 if (expected && !obj) {
120 pr_warn("Test failed: Could not find key %u\n", key); 127 pr_warn("Test failed: Could not find key %u\n", key.id);
121 return -ENOENT; 128 return -ENOENT;
122 } else if (!expected && obj) { 129 } else if (!expected && obj) {
123 pr_warn("Test failed: Unexpected entry found for key %u\n", 130 pr_warn("Test failed: Unexpected entry found for key %u\n",
124 key); 131 key.id);
125 return -EEXIST; 132 return -EEXIST;
126 } else if (expected && obj) { 133 } else if (expected && obj) {
127 if (obj->value != i) { 134 if (obj->value.id != i) {
128 pr_warn("Test failed: Lookup value mismatch %u!=%u\n", 135 pr_warn("Test failed: Lookup value mismatch %u!=%u\n",
129 obj->value, i); 136 obj->value.id, i);
130 return -EINVAL; 137 return -EINVAL;
131 } 138 }
132 } 139 }
@@ -195,7 +202,7 @@ static s64 __init test_rhashtable(struct rhashtable *ht)
195 for (i = 0; i < entries; i++) { 202 for (i = 0; i < entries; i++) {
196 struct test_obj *obj = &array[i]; 203 struct test_obj *obj = &array[i];
197 204
198 obj->value = i * 2; 205 obj->value.id = i * 2;
199 err = insert_retry(ht, &obj->node, test_rht_params); 206 err = insert_retry(ht, &obj->node, test_rht_params);
200 if (err > 0) 207 if (err > 0)
201 insert_retries += err; 208 insert_retries += err;
@@ -216,9 +223,11 @@ static s64 __init test_rhashtable(struct rhashtable *ht)
216 223
217 pr_info(" Deleting %d keys\n", entries); 224 pr_info(" Deleting %d keys\n", entries);
218 for (i = 0; i < entries; i++) { 225 for (i = 0; i < entries; i++) {
219 u32 key = i * 2; 226 struct test_obj_val key = {
227 .id = i * 2,
228 };
220 229
221 if (array[i].value != TEST_INSERT_FAIL) { 230 if (array[i].value.id != TEST_INSERT_FAIL) {
222 obj = rhashtable_lookup_fast(ht, &key, test_rht_params); 231 obj = rhashtable_lookup_fast(ht, &key, test_rht_params);
223 BUG_ON(!obj); 232 BUG_ON(!obj);
224 233
@@ -242,18 +251,21 @@ static int thread_lookup_test(struct thread_data *tdata)
242 251
243 for (i = 0; i < entries; i++) { 252 for (i = 0; i < entries; i++) {
244 struct test_obj *obj; 253 struct test_obj *obj;
245 int key = (tdata->id << 16) | i; 254 struct test_obj_val key = {
255 .id = i,
256 .tid = tdata->id,
257 };
246 258
247 obj = rhashtable_lookup_fast(&ht, &key, test_rht_params); 259 obj = rhashtable_lookup_fast(&ht, &key, test_rht_params);
248 if (obj && (tdata->objs[i].value == TEST_INSERT_FAIL)) { 260 if (obj && (tdata->objs[i].value.id == TEST_INSERT_FAIL)) {
249 pr_err(" found unexpected object %d\n", key); 261 pr_err(" found unexpected object %d-%d\n", key.tid, key.id);
250 err++; 262 err++;
251 } else if (!obj && (tdata->objs[i].value != TEST_INSERT_FAIL)) { 263 } else if (!obj && (tdata->objs[i].value.id != TEST_INSERT_FAIL)) {
252 pr_err(" object %d not found!\n", key); 264 pr_err(" object %d-%d not found!\n", key.tid, key.id);
253 err++; 265 err++;
254 } else if (obj && (obj->value != key)) { 266 } else if (obj && memcmp(&obj->value, &key, sizeof(key))) {
255 pr_err(" wrong object returned (got %d, expected %d)\n", 267 pr_err(" wrong object returned (got %d-%d, expected %d-%d)\n",
256 obj->value, key); 268 obj->value.tid, obj->value.id, key.tid, key.id);
257 err++; 269 err++;
258 } 270 }
259 271
@@ -272,7 +284,8 @@ static int threadfunc(void *data)
272 pr_err(" thread[%d]: down_interruptible failed\n", tdata->id); 284 pr_err(" thread[%d]: down_interruptible failed\n", tdata->id);
273 285
274 for (i = 0; i < entries; i++) { 286 for (i = 0; i < entries; i++) {
275 tdata->objs[i].value = (tdata->id << 16) | i; 287 tdata->objs[i].value.id = i;
288 tdata->objs[i].value.tid = tdata->id;
276 err = insert_retry(&ht, &tdata->objs[i].node, test_rht_params); 289 err = insert_retry(&ht, &tdata->objs[i].node, test_rht_params);
277 if (err > 0) { 290 if (err > 0) {
278 insert_retries += err; 291 insert_retries += err;
@@ -295,7 +308,7 @@ static int threadfunc(void *data)
295 308
296 for (step = 10; step > 0; step--) { 309 for (step = 10; step > 0; step--) {
297 for (i = 0; i < entries; i += step) { 310 for (i = 0; i < entries; i += step) {
298 if (tdata->objs[i].value == TEST_INSERT_FAIL) 311 if (tdata->objs[i].value.id == TEST_INSERT_FAIL)
299 continue; 312 continue;
300 err = rhashtable_remove_fast(&ht, &tdata->objs[i].node, 313 err = rhashtable_remove_fast(&ht, &tdata->objs[i].node,
301 test_rht_params); 314 test_rht_params);
@@ -304,7 +317,7 @@ static int threadfunc(void *data)
304 tdata->id); 317 tdata->id);
305 goto out; 318 goto out;
306 } 319 }
307 tdata->objs[i].value = TEST_INSERT_FAIL; 320 tdata->objs[i].value.id = TEST_INSERT_FAIL;
308 321
309 cond_resched(); 322 cond_resched();
310 } 323 }
diff --git a/mm/balloon_compaction.c b/mm/balloon_compaction.c
index 9075aa54e955..b06d9fe23a28 100644
--- a/mm/balloon_compaction.c
+++ b/mm/balloon_compaction.c
@@ -24,7 +24,7 @@ struct page *balloon_page_enqueue(struct balloon_dev_info *b_dev_info)
24{ 24{
25 unsigned long flags; 25 unsigned long flags;
26 struct page *page = alloc_page(balloon_mapping_gfp_mask() | 26 struct page *page = alloc_page(balloon_mapping_gfp_mask() |
27 __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_ZERO); 27 __GFP_NOMEMALLOC | __GFP_NORETRY);
28 if (!page) 28 if (!page)
29 return NULL; 29 return NULL;
30 30
diff --git a/mm/cma_debug.c b/mm/cma_debug.c
index 595b757bef72..c03ccbc405a0 100644
--- a/mm/cma_debug.c
+++ b/mm/cma_debug.c
@@ -167,7 +167,7 @@ static void cma_debugfs_add_one(struct cma *cma, int idx)
167 char name[16]; 167 char name[16];
168 int u32s; 168 int u32s;
169 169
170 sprintf(name, "cma-%s", cma->name); 170 scnprintf(name, sizeof(name), "cma-%s", cma->name);
171 171
172 tmp = debugfs_create_dir(name, cma_debugfs_root); 172 tmp = debugfs_create_dir(name, cma_debugfs_root);
173 173
diff --git a/mm/debug.c b/mm/debug.c
index db1cd26d8752..5715448ab0b5 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -124,9 +124,7 @@ void dump_mm(const struct mm_struct *mm)
124#ifdef CONFIG_NUMA_BALANCING 124#ifdef CONFIG_NUMA_BALANCING
125 "numa_next_scan %lu numa_scan_offset %lu numa_scan_seq %d\n" 125 "numa_next_scan %lu numa_scan_offset %lu numa_scan_seq %d\n"
126#endif 126#endif
127#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION)
128 "tlb_flush_pending %d\n" 127 "tlb_flush_pending %d\n"
129#endif
130 "def_flags: %#lx(%pGv)\n", 128 "def_flags: %#lx(%pGv)\n",
131 129
132 mm, mm->mmap, mm->vmacache_seqnum, mm->task_size, 130 mm, mm->mmap, mm->vmacache_seqnum, mm->task_size,
@@ -158,9 +156,7 @@ void dump_mm(const struct mm_struct *mm)
158#ifdef CONFIG_NUMA_BALANCING 156#ifdef CONFIG_NUMA_BALANCING
159 mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq, 157 mm->numa_next_scan, mm->numa_scan_offset, mm->numa_scan_seq,
160#endif 158#endif
161#if defined(CONFIG_NUMA_BALANCING) || defined(CONFIG_COMPACTION) 159 atomic_read(&mm->tlb_flush_pending),
162 mm->tlb_flush_pending,
163#endif
164 mm->def_flags, &mm->def_flags 160 mm->def_flags, &mm->def_flags
165 ); 161 );
166} 162}
diff --git a/mm/filemap.c b/mm/filemap.c
index a49702445ce0..0b41c8cbeabc 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -885,6 +885,7 @@ void __init pagecache_init(void)
885 page_writeback_init(); 885 page_writeback_init();
886} 886}
887 887
888/* This has the same layout as wait_bit_key - see fs/cachefiles/rdwr.c */
888struct wait_page_key { 889struct wait_page_key {
889 struct page *page; 890 struct page *page;
890 int bit_nr; 891 int bit_nr;
@@ -909,8 +910,10 @@ static int wake_page_function(wait_queue_entry_t *wait, unsigned mode, int sync,
909 910
910 if (wait_page->bit_nr != key->bit_nr) 911 if (wait_page->bit_nr != key->bit_nr)
911 return 0; 912 return 0;
913
914 /* Stop walking if it's locked */
912 if (test_bit(key->bit_nr, &key->page->flags)) 915 if (test_bit(key->bit_nr, &key->page->flags))
913 return 0; 916 return -1;
914 917
915 return autoremove_wake_function(wait, mode, sync, key); 918 return autoremove_wake_function(wait, mode, sync, key);
916} 919}
@@ -964,6 +967,7 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
964 int ret = 0; 967 int ret = 0;
965 968
966 init_wait(wait); 969 init_wait(wait);
970 wait->flags = lock ? WQ_FLAG_EXCLUSIVE : 0;
967 wait->func = wake_page_function; 971 wait->func = wake_page_function;
968 wait_page.page = page; 972 wait_page.page = page;
969 wait_page.bit_nr = bit_nr; 973 wait_page.bit_nr = bit_nr;
@@ -972,10 +976,7 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
972 spin_lock_irq(&q->lock); 976 spin_lock_irq(&q->lock);
973 977
974 if (likely(list_empty(&wait->entry))) { 978 if (likely(list_empty(&wait->entry))) {
975 if (lock) 979 __add_wait_queue_entry_tail(q, wait);
976 __add_wait_queue_entry_tail_exclusive(q, wait);
977 else
978 __add_wait_queue(q, wait);
979 SetPageWaiters(page); 980 SetPageWaiters(page);
980 } 981 }
981 982
@@ -985,10 +986,6 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
985 986
986 if (likely(test_bit(bit_nr, &page->flags))) { 987 if (likely(test_bit(bit_nr, &page->flags))) {
987 io_schedule(); 988 io_schedule();
988 if (unlikely(signal_pending_state(state, current))) {
989 ret = -EINTR;
990 break;
991 }
992 } 989 }
993 990
994 if (lock) { 991 if (lock) {
@@ -998,6 +995,11 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
998 if (!test_bit(bit_nr, &page->flags)) 995 if (!test_bit(bit_nr, &page->flags))
999 break; 996 break;
1000 } 997 }
998
999 if (unlikely(signal_pending_state(state, current))) {
1000 ret = -EINTR;
1001 break;
1002 }
1001 } 1003 }
1002 1004
1003 finish_wait(q, wait); 1005 finish_wait(q, wait);
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 86975dec0ba1..90731e3b7e58 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -32,6 +32,7 @@
32#include <linux/userfaultfd_k.h> 32#include <linux/userfaultfd_k.h>
33#include <linux/page_idle.h> 33#include <linux/page_idle.h>
34#include <linux/shmem_fs.h> 34#include <linux/shmem_fs.h>
35#include <linux/oom.h>
35 36
36#include <asm/tlb.h> 37#include <asm/tlb.h>
37#include <asm/pgalloc.h> 38#include <asm/pgalloc.h>
@@ -550,6 +551,7 @@ static int __do_huge_pmd_anonymous_page(struct vm_fault *vmf, struct page *page,
550 struct mem_cgroup *memcg; 551 struct mem_cgroup *memcg;
551 pgtable_t pgtable; 552 pgtable_t pgtable;
552 unsigned long haddr = vmf->address & HPAGE_PMD_MASK; 553 unsigned long haddr = vmf->address & HPAGE_PMD_MASK;
554 int ret = 0;
553 555
554 VM_BUG_ON_PAGE(!PageCompound(page), page); 556 VM_BUG_ON_PAGE(!PageCompound(page), page);
555 557
@@ -561,9 +563,8 @@ static int __do_huge_pmd_anonymous_page(struct vm_fault *vmf, struct page *page,
561 563
562 pgtable = pte_alloc_one(vma->vm_mm, haddr); 564 pgtable = pte_alloc_one(vma->vm_mm, haddr);
563 if (unlikely(!pgtable)) { 565 if (unlikely(!pgtable)) {
564 mem_cgroup_cancel_charge(page, memcg, true); 566 ret = VM_FAULT_OOM;
565 put_page(page); 567 goto release;
566 return VM_FAULT_OOM;
567 } 568 }
568 569
569 clear_huge_page(page, haddr, HPAGE_PMD_NR); 570 clear_huge_page(page, haddr, HPAGE_PMD_NR);
@@ -576,13 +577,14 @@ static int __do_huge_pmd_anonymous_page(struct vm_fault *vmf, struct page *page,
576 577
577 vmf->ptl = pmd_lock(vma->vm_mm, vmf->pmd); 578 vmf->ptl = pmd_lock(vma->vm_mm, vmf->pmd);
578 if (unlikely(!pmd_none(*vmf->pmd))) { 579 if (unlikely(!pmd_none(*vmf->pmd))) {
579 spin_unlock(vmf->ptl); 580 goto unlock_release;
580 mem_cgroup_cancel_charge(page, memcg, true);
581 put_page(page);
582 pte_free(vma->vm_mm, pgtable);
583 } else { 581 } else {
584 pmd_t entry; 582 pmd_t entry;
585 583
584 ret = check_stable_address_space(vma->vm_mm);
585 if (ret)
586 goto unlock_release;
587
586 /* Deliver the page fault to userland */ 588 /* Deliver the page fault to userland */
587 if (userfaultfd_missing(vma)) { 589 if (userfaultfd_missing(vma)) {
588 int ret; 590 int ret;
@@ -610,6 +612,15 @@ static int __do_huge_pmd_anonymous_page(struct vm_fault *vmf, struct page *page,
610 } 612 }
611 613
612 return 0; 614 return 0;
615unlock_release:
616 spin_unlock(vmf->ptl);
617release:
618 if (pgtable)
619 pte_free(vma->vm_mm, pgtable);
620 mem_cgroup_cancel_charge(page, memcg, true);
621 put_page(page);
622 return ret;
623
613} 624}
614 625
615/* 626/*
@@ -688,7 +699,10 @@ int do_huge_pmd_anonymous_page(struct vm_fault *vmf)
688 ret = 0; 699 ret = 0;
689 set = false; 700 set = false;
690 if (pmd_none(*vmf->pmd)) { 701 if (pmd_none(*vmf->pmd)) {
691 if (userfaultfd_missing(vma)) { 702 ret = check_stable_address_space(vma->vm_mm);
703 if (ret) {
704 spin_unlock(vmf->ptl);
705 } else if (userfaultfd_missing(vma)) {
692 spin_unlock(vmf->ptl); 706 spin_unlock(vmf->ptl);
693 ret = handle_userfault(vmf, VM_UFFD_MISSING); 707 ret = handle_userfault(vmf, VM_UFFD_MISSING);
694 VM_BUG_ON(ret & VM_FAULT_FALLBACK); 708 VM_BUG_ON(ret & VM_FAULT_FALLBACK);
@@ -1496,6 +1510,13 @@ int do_huge_pmd_numa_page(struct vm_fault *vmf, pmd_t pmd)
1496 } 1510 }
1497 1511
1498 /* 1512 /*
1513 * The page_table_lock above provides a memory barrier
1514 * with change_protection_range.
1515 */
1516 if (mm_tlb_flush_pending(vma->vm_mm))
1517 flush_tlb_range(vma, haddr, haddr + HPAGE_PMD_SIZE);
1518
1519 /*
1499 * Migrate the THP to the requested node, returns with page unlocked 1520 * Migrate the THP to the requested node, returns with page unlocked
1500 * and access rights restored. 1521 * and access rights restored.
1501 */ 1522 */
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index bc48ee783dd9..31e207cb399b 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -4062,9 +4062,9 @@ out:
4062 return ret; 4062 return ret;
4063out_release_unlock: 4063out_release_unlock:
4064 spin_unlock(ptl); 4064 spin_unlock(ptl);
4065out_release_nounlock:
4066 if (vm_shared) 4065 if (vm_shared)
4067 unlock_page(page); 4066 unlock_page(page);
4067out_release_nounlock:
4068 put_page(page); 4068 put_page(page);
4069 goto out; 4069 goto out;
4070} 4070}
@@ -4078,6 +4078,7 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
4078 unsigned long vaddr = *position; 4078 unsigned long vaddr = *position;
4079 unsigned long remainder = *nr_pages; 4079 unsigned long remainder = *nr_pages;
4080 struct hstate *h = hstate_vma(vma); 4080 struct hstate *h = hstate_vma(vma);
4081 int err = -EFAULT;
4081 4082
4082 while (vaddr < vma->vm_end && remainder) { 4083 while (vaddr < vma->vm_end && remainder) {
4083 pte_t *pte; 4084 pte_t *pte;
@@ -4154,11 +4155,7 @@ long follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
4154 } 4155 }
4155 ret = hugetlb_fault(mm, vma, vaddr, fault_flags); 4156 ret = hugetlb_fault(mm, vma, vaddr, fault_flags);
4156 if (ret & VM_FAULT_ERROR) { 4157 if (ret & VM_FAULT_ERROR) {
4157 int err = vm_fault_to_errno(ret, flags); 4158 err = vm_fault_to_errno(ret, flags);
4158
4159 if (err)
4160 return err;
4161
4162 remainder = 0; 4159 remainder = 0;
4163 break; 4160 break;
4164 } 4161 }
@@ -4213,7 +4210,7 @@ same_page:
4213 */ 4210 */
4214 *position = vaddr; 4211 *position = vaddr;
4215 4212
4216 return i ? i : -EFAULT; 4213 return i ? i : err;
4217} 4214}
4218 4215
4219#ifndef __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE 4216#ifndef __HAVE_ARCH_FLUSH_HUGETLB_TLB_RANGE
diff --git a/mm/internal.h b/mm/internal.h
index 24d88f084705..4ef49fc55e58 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -498,6 +498,7 @@ extern struct workqueue_struct *mm_percpu_wq;
498#ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH 498#ifdef CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
499void try_to_unmap_flush(void); 499void try_to_unmap_flush(void);
500void try_to_unmap_flush_dirty(void); 500void try_to_unmap_flush_dirty(void);
501void flush_tlb_batched_pending(struct mm_struct *mm);
501#else 502#else
502static inline void try_to_unmap_flush(void) 503static inline void try_to_unmap_flush(void)
503{ 504{
@@ -505,7 +506,9 @@ static inline void try_to_unmap_flush(void)
505static inline void try_to_unmap_flush_dirty(void) 506static inline void try_to_unmap_flush_dirty(void)
506{ 507{
507} 508}
508 509static inline void flush_tlb_batched_pending(struct mm_struct *mm)
510{
511}
509#endif /* CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH */ 512#endif /* CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH */
510 513
511extern const struct trace_print_flags pageflag_names[]; 514extern const struct trace_print_flags pageflag_names[];
diff --git a/mm/kasan/report.c b/mm/kasan/report.c
index 04bb1d3eb9ec..6bcfb01ba038 100644
--- a/mm/kasan/report.c
+++ b/mm/kasan/report.c
@@ -401,6 +401,7 @@ void kasan_report(unsigned long addr, size_t size,
401 disable_trace_on_warning(); 401 disable_trace_on_warning();
402 402
403 info.access_addr = (void *)addr; 403 info.access_addr = (void *)addr;
404 info.first_bad_addr = (void *)addr;
404 info.access_size = size; 405 info.access_size = size;
405 info.is_write = is_write; 406 info.is_write = is_write;
406 info.ip = ip; 407 info.ip = ip;
diff --git a/mm/ksm.c b/mm/ksm.c
index 4dc92f138786..db20f8436bc3 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -1038,7 +1038,8 @@ static int write_protect_page(struct vm_area_struct *vma, struct page *page,
1038 goto out_unlock; 1038 goto out_unlock;
1039 1039
1040 if (pte_write(*pvmw.pte) || pte_dirty(*pvmw.pte) || 1040 if (pte_write(*pvmw.pte) || pte_dirty(*pvmw.pte) ||
1041 (pte_protnone(*pvmw.pte) && pte_savedwrite(*pvmw.pte))) { 1041 (pte_protnone(*pvmw.pte) && pte_savedwrite(*pvmw.pte)) ||
1042 mm_tlb_flush_pending(mm)) {
1042 pte_t entry; 1043 pte_t entry;
1043 1044
1044 swapped = PageSwapCache(page); 1045 swapped = PageSwapCache(page);
diff --git a/mm/madvise.c b/mm/madvise.c
index 9976852f1e1c..23ed525bc2bc 100644
--- a/mm/madvise.c
+++ b/mm/madvise.c
@@ -320,6 +320,7 @@ static int madvise_free_pte_range(pmd_t *pmd, unsigned long addr,
320 320
321 tlb_remove_check_page_size_change(tlb, PAGE_SIZE); 321 tlb_remove_check_page_size_change(tlb, PAGE_SIZE);
322 orig_pte = pte = pte_offset_map_lock(mm, pmd, addr, &ptl); 322 orig_pte = pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
323 flush_tlb_batched_pending(mm);
323 arch_enter_lazy_mmu_mode(); 324 arch_enter_lazy_mmu_mode();
324 for (; addr != end; pte++, addr += PAGE_SIZE) { 325 for (; addr != end; pte++, addr += PAGE_SIZE) {
325 ptent = *pte; 326 ptent = *pte;
@@ -367,8 +368,8 @@ static int madvise_free_pte_range(pmd_t *pmd, unsigned long addr,
367 pte_offset_map_lock(mm, pmd, addr, &ptl); 368 pte_offset_map_lock(mm, pmd, addr, &ptl);
368 goto out; 369 goto out;
369 } 370 }
370 put_page(page);
371 unlock_page(page); 371 unlock_page(page);
372 put_page(page);
372 pte = pte_offset_map_lock(mm, pmd, addr, &ptl); 373 pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
373 pte--; 374 pte--;
374 addr -= PAGE_SIZE; 375 addr -= PAGE_SIZE;
diff --git a/mm/memblock.c b/mm/memblock.c
index 2cb25fe4452c..91205780e6b1 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -285,31 +285,27 @@ static void __init_memblock memblock_remove_region(struct memblock_type *type, u
285} 285}
286 286
287#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK 287#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
288 288/**
289phys_addr_t __init_memblock get_allocated_memblock_reserved_regions_info( 289 * Discard memory and reserved arrays if they were allocated
290 phys_addr_t *addr) 290 */
291{ 291void __init memblock_discard(void)
292 if (memblock.reserved.regions == memblock_reserved_init_regions)
293 return 0;
294
295 *addr = __pa(memblock.reserved.regions);
296
297 return PAGE_ALIGN(sizeof(struct memblock_region) *
298 memblock.reserved.max);
299}
300
301phys_addr_t __init_memblock get_allocated_memblock_memory_regions_info(
302 phys_addr_t *addr)
303{ 292{
304 if (memblock.memory.regions == memblock_memory_init_regions) 293 phys_addr_t addr, size;
305 return 0;
306 294
307 *addr = __pa(memblock.memory.regions); 295 if (memblock.reserved.regions != memblock_reserved_init_regions) {
296 addr = __pa(memblock.reserved.regions);
297 size = PAGE_ALIGN(sizeof(struct memblock_region) *
298 memblock.reserved.max);
299 __memblock_free_late(addr, size);
300 }
308 301
309 return PAGE_ALIGN(sizeof(struct memblock_region) * 302 if (memblock.memory.regions != memblock_memory_init_regions) {
310 memblock.memory.max); 303 addr = __pa(memblock.memory.regions);
304 size = PAGE_ALIGN(sizeof(struct memblock_region) *
305 memblock.memory.max);
306 __memblock_free_late(addr, size);
307 }
311} 308}
312
313#endif 309#endif
314 310
315/** 311/**
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 3df3c04d73ab..e09741af816f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1611,9 +1611,13 @@ cleanup:
1611 * @page: the page 1611 * @page: the page
1612 * 1612 *
1613 * This function protects unlocked LRU pages from being moved to 1613 * This function protects unlocked LRU pages from being moved to
1614 * another cgroup and stabilizes their page->mem_cgroup binding. 1614 * another cgroup.
1615 *
1616 * It ensures lifetime of the returned memcg. Caller is responsible
1617 * for the lifetime of the page; __unlock_page_memcg() is available
1618 * when @page might get freed inside the locked section.
1615 */ 1619 */
1616void lock_page_memcg(struct page *page) 1620struct mem_cgroup *lock_page_memcg(struct page *page)
1617{ 1621{
1618 struct mem_cgroup *memcg; 1622 struct mem_cgroup *memcg;
1619 unsigned long flags; 1623 unsigned long flags;
@@ -1622,18 +1626,24 @@ void lock_page_memcg(struct page *page)
1622 * The RCU lock is held throughout the transaction. The fast 1626 * The RCU lock is held throughout the transaction. The fast
1623 * path can get away without acquiring the memcg->move_lock 1627 * path can get away without acquiring the memcg->move_lock
1624 * because page moving starts with an RCU grace period. 1628 * because page moving starts with an RCU grace period.
1625 */ 1629 *
1630 * The RCU lock also protects the memcg from being freed when
1631 * the page state that is going to change is the only thing
1632 * preventing the page itself from being freed. E.g. writeback
1633 * doesn't hold a page reference and relies on PG_writeback to
1634 * keep off truncation, migration and so forth.
1635 */
1626 rcu_read_lock(); 1636 rcu_read_lock();
1627 1637
1628 if (mem_cgroup_disabled()) 1638 if (mem_cgroup_disabled())
1629 return; 1639 return NULL;
1630again: 1640again:
1631 memcg = page->mem_cgroup; 1641 memcg = page->mem_cgroup;
1632 if (unlikely(!memcg)) 1642 if (unlikely(!memcg))
1633 return; 1643 return NULL;
1634 1644
1635 if (atomic_read(&memcg->moving_account) <= 0) 1645 if (atomic_read(&memcg->moving_account) <= 0)
1636 return; 1646 return memcg;
1637 1647
1638 spin_lock_irqsave(&memcg->move_lock, flags); 1648 spin_lock_irqsave(&memcg->move_lock, flags);
1639 if (memcg != page->mem_cgroup) { 1649 if (memcg != page->mem_cgroup) {
@@ -1649,18 +1659,18 @@ again:
1649 memcg->move_lock_task = current; 1659 memcg->move_lock_task = current;
1650 memcg->move_lock_flags = flags; 1660 memcg->move_lock_flags = flags;
1651 1661
1652 return; 1662 return memcg;
1653} 1663}
1654EXPORT_SYMBOL(lock_page_memcg); 1664EXPORT_SYMBOL(lock_page_memcg);
1655 1665
1656/** 1666/**
1657 * unlock_page_memcg - unlock a page->mem_cgroup binding 1667 * __unlock_page_memcg - unlock and unpin a memcg
1658 * @page: the page 1668 * @memcg: the memcg
1669 *
1670 * Unlock and unpin a memcg returned by lock_page_memcg().
1659 */ 1671 */
1660void unlock_page_memcg(struct page *page) 1672void __unlock_page_memcg(struct mem_cgroup *memcg)
1661{ 1673{
1662 struct mem_cgroup *memcg = page->mem_cgroup;
1663
1664 if (memcg && memcg->move_lock_task == current) { 1674 if (memcg && memcg->move_lock_task == current) {
1665 unsigned long flags = memcg->move_lock_flags; 1675 unsigned long flags = memcg->move_lock_flags;
1666 1676
@@ -1672,6 +1682,15 @@ void unlock_page_memcg(struct page *page)
1672 1682
1673 rcu_read_unlock(); 1683 rcu_read_unlock();
1674} 1684}
1685
1686/**
1687 * unlock_page_memcg - unlock a page->mem_cgroup binding
1688 * @page: the page
1689 */
1690void unlock_page_memcg(struct page *page)
1691{
1692 __unlock_page_memcg(page->mem_cgroup);
1693}
1675EXPORT_SYMBOL(unlock_page_memcg); 1694EXPORT_SYMBOL(unlock_page_memcg);
1676 1695
1677/* 1696/*
diff --git a/mm/memory.c b/mm/memory.c
index 0e517be91a89..fe2fba27ded2 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -68,6 +68,7 @@
68#include <linux/debugfs.h> 68#include <linux/debugfs.h>
69#include <linux/userfaultfd_k.h> 69#include <linux/userfaultfd_k.h>
70#include <linux/dax.h> 70#include <linux/dax.h>
71#include <linux/oom.h>
71 72
72#include <asm/io.h> 73#include <asm/io.h>
73#include <asm/mmu_context.h> 74#include <asm/mmu_context.h>
@@ -215,12 +216,8 @@ static bool tlb_next_batch(struct mmu_gather *tlb)
215 return true; 216 return true;
216} 217}
217 218
218/* tlb_gather_mmu 219void arch_tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
219 * Called to initialize an (on-stack) mmu_gather structure for page-table 220 unsigned long start, unsigned long end)
220 * tear-down from @mm. The @fullmm argument is used when @mm is without
221 * users and we're going to destroy the full address space (exit/execve).
222 */
223void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end)
224{ 221{
225 tlb->mm = mm; 222 tlb->mm = mm;
226 223
@@ -275,10 +272,14 @@ void tlb_flush_mmu(struct mmu_gather *tlb)
275 * Called at the end of the shootdown operation to free up any resources 272 * Called at the end of the shootdown operation to free up any resources
276 * that were required. 273 * that were required.
277 */ 274 */
278void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) 275void arch_tlb_finish_mmu(struct mmu_gather *tlb,
276 unsigned long start, unsigned long end, bool force)
279{ 277{
280 struct mmu_gather_batch *batch, *next; 278 struct mmu_gather_batch *batch, *next;
281 279
280 if (force)
281 __tlb_adjust_range(tlb, start, end - start);
282
282 tlb_flush_mmu(tlb); 283 tlb_flush_mmu(tlb);
283 284
284 /* keep the page table cache within bounds */ 285 /* keep the page table cache within bounds */
@@ -398,6 +399,34 @@ void tlb_remove_table(struct mmu_gather *tlb, void *table)
398 399
399#endif /* CONFIG_HAVE_RCU_TABLE_FREE */ 400#endif /* CONFIG_HAVE_RCU_TABLE_FREE */
400 401
402/* tlb_gather_mmu
403 * Called to initialize an (on-stack) mmu_gather structure for page-table
404 * tear-down from @mm. The @fullmm argument is used when @mm is without
405 * users and we're going to destroy the full address space (exit/execve).
406 */
407void tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm,
408 unsigned long start, unsigned long end)
409{
410 arch_tlb_gather_mmu(tlb, mm, start, end);
411 inc_tlb_flush_pending(tlb->mm);
412}
413
414void tlb_finish_mmu(struct mmu_gather *tlb,
415 unsigned long start, unsigned long end)
416{
417 /*
418 * If there are parallel threads are doing PTE changes on same range
419 * under non-exclusive lock(e.g., mmap_sem read-side) but defer TLB
420 * flush by batching, a thread has stable TLB entry can fail to flush
421 * the TLB by observing pte_none|!pte_dirty, for example so flush TLB
422 * forcefully if we detect parallel PTE batching threads.
423 */
424 bool force = mm_tlb_flush_nested(tlb->mm);
425
426 arch_tlb_finish_mmu(tlb, start, end, force);
427 dec_tlb_flush_pending(tlb->mm);
428}
429
401/* 430/*
402 * Note: this doesn't free the actual pages themselves. That 431 * Note: this doesn't free the actual pages themselves. That
403 * has been handled earlier when unmapping all the memory regions. 432 * has been handled earlier when unmapping all the memory regions.
@@ -1197,6 +1226,7 @@ again:
1197 init_rss_vec(rss); 1226 init_rss_vec(rss);
1198 start_pte = pte_offset_map_lock(mm, pmd, addr, &ptl); 1227 start_pte = pte_offset_map_lock(mm, pmd, addr, &ptl);
1199 pte = start_pte; 1228 pte = start_pte;
1229 flush_tlb_batched_pending(mm);
1200 arch_enter_lazy_mmu_mode(); 1230 arch_enter_lazy_mmu_mode();
1201 do { 1231 do {
1202 pte_t ptent = *pte; 1232 pte_t ptent = *pte;
@@ -2864,6 +2894,7 @@ static int do_anonymous_page(struct vm_fault *vmf)
2864 struct vm_area_struct *vma = vmf->vma; 2894 struct vm_area_struct *vma = vmf->vma;
2865 struct mem_cgroup *memcg; 2895 struct mem_cgroup *memcg;
2866 struct page *page; 2896 struct page *page;
2897 int ret = 0;
2867 pte_t entry; 2898 pte_t entry;
2868 2899
2869 /* File mapping without ->vm_ops ? */ 2900 /* File mapping without ->vm_ops ? */
@@ -2896,6 +2927,9 @@ static int do_anonymous_page(struct vm_fault *vmf)
2896 vmf->address, &vmf->ptl); 2927 vmf->address, &vmf->ptl);
2897 if (!pte_none(*vmf->pte)) 2928 if (!pte_none(*vmf->pte))
2898 goto unlock; 2929 goto unlock;
2930 ret = check_stable_address_space(vma->vm_mm);
2931 if (ret)
2932 goto unlock;
2899 /* Deliver the page fault to userland, check inside PT lock */ 2933 /* Deliver the page fault to userland, check inside PT lock */
2900 if (userfaultfd_missing(vma)) { 2934 if (userfaultfd_missing(vma)) {
2901 pte_unmap_unlock(vmf->pte, vmf->ptl); 2935 pte_unmap_unlock(vmf->pte, vmf->ptl);
@@ -2930,6 +2964,10 @@ static int do_anonymous_page(struct vm_fault *vmf)
2930 if (!pte_none(*vmf->pte)) 2964 if (!pte_none(*vmf->pte))
2931 goto release; 2965 goto release;
2932 2966
2967 ret = check_stable_address_space(vma->vm_mm);
2968 if (ret)
2969 goto release;
2970
2933 /* Deliver the page fault to userland, check inside PT lock */ 2971 /* Deliver the page fault to userland, check inside PT lock */
2934 if (userfaultfd_missing(vma)) { 2972 if (userfaultfd_missing(vma)) {
2935 pte_unmap_unlock(vmf->pte, vmf->ptl); 2973 pte_unmap_unlock(vmf->pte, vmf->ptl);
@@ -2949,7 +2987,7 @@ setpte:
2949 update_mmu_cache(vma, vmf->address, vmf->pte); 2987 update_mmu_cache(vma, vmf->address, vmf->pte);
2950unlock: 2988unlock:
2951 pte_unmap_unlock(vmf->pte, vmf->ptl); 2989 pte_unmap_unlock(vmf->pte, vmf->ptl);
2952 return 0; 2990 return ret;
2953release: 2991release:
2954 mem_cgroup_cancel_charge(page, memcg, false); 2992 mem_cgroup_cancel_charge(page, memcg, false);
2955 put_page(page); 2993 put_page(page);
@@ -3223,7 +3261,7 @@ int alloc_set_pte(struct vm_fault *vmf, struct mem_cgroup *memcg,
3223int finish_fault(struct vm_fault *vmf) 3261int finish_fault(struct vm_fault *vmf)
3224{ 3262{
3225 struct page *page; 3263 struct page *page;
3226 int ret; 3264 int ret = 0;
3227 3265
3228 /* Did we COW the page? */ 3266 /* Did we COW the page? */
3229 if ((vmf->flags & FAULT_FLAG_WRITE) && 3267 if ((vmf->flags & FAULT_FLAG_WRITE) &&
@@ -3231,7 +3269,15 @@ int finish_fault(struct vm_fault *vmf)
3231 page = vmf->cow_page; 3269 page = vmf->cow_page;
3232 else 3270 else
3233 page = vmf->page; 3271 page = vmf->page;
3234 ret = alloc_set_pte(vmf, vmf->memcg, page); 3272
3273 /*
3274 * check even for read faults because we might have lost our CoWed
3275 * page
3276 */
3277 if (!(vmf->vma->vm_flags & VM_SHARED))
3278 ret = check_stable_address_space(vmf->vma->vm_mm);
3279 if (!ret)
3280 ret = alloc_set_pte(vmf, vmf->memcg, page);
3235 if (vmf->pte) 3281 if (vmf->pte)
3236 pte_unmap_unlock(vmf->pte, vmf->ptl); 3282 pte_unmap_unlock(vmf->pte, vmf->ptl);
3237 return ret; 3283 return ret;
@@ -3871,19 +3917,6 @@ int handle_mm_fault(struct vm_area_struct *vma, unsigned long address,
3871 mem_cgroup_oom_synchronize(false); 3917 mem_cgroup_oom_synchronize(false);
3872 } 3918 }
3873 3919
3874 /*
3875 * This mm has been already reaped by the oom reaper and so the
3876 * refault cannot be trusted in general. Anonymous refaults would
3877 * lose data and give a zero page instead e.g. This is especially
3878 * problem for use_mm() because regular tasks will just die and
3879 * the corrupted data will not be visible anywhere while kthread
3880 * will outlive the oom victim and potentially propagate the date
3881 * further.
3882 */
3883 if (unlikely((current->flags & PF_KTHREAD) && !(ret & VM_FAULT_ERROR)
3884 && test_bit(MMF_UNSTABLE, &vma->vm_mm->flags)))
3885 ret = VM_FAULT_SIGBUS;
3886
3887 return ret; 3920 return ret;
3888} 3921}
3889EXPORT_SYMBOL_GPL(handle_mm_fault); 3922EXPORT_SYMBOL_GPL(handle_mm_fault);
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index d911fa5cb2a7..618ab125228b 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -861,11 +861,6 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask,
861 *policy |= (pol->flags & MPOL_MODE_FLAGS); 861 *policy |= (pol->flags & MPOL_MODE_FLAGS);
862 } 862 }
863 863
864 if (vma) {
865 up_read(&current->mm->mmap_sem);
866 vma = NULL;
867 }
868
869 err = 0; 864 err = 0;
870 if (nmask) { 865 if (nmask) {
871 if (mpol_store_user_nodemask(pol)) { 866 if (mpol_store_user_nodemask(pol)) {
diff --git a/mm/migrate.c b/mm/migrate.c
index 627671551873..e84eeb4e4356 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -41,6 +41,7 @@
41#include <linux/page_idle.h> 41#include <linux/page_idle.h>
42#include <linux/page_owner.h> 42#include <linux/page_owner.h>
43#include <linux/sched/mm.h> 43#include <linux/sched/mm.h>
44#include <linux/ptrace.h>
44 45
45#include <asm/tlbflush.h> 46#include <asm/tlbflush.h>
46 47
@@ -1652,7 +1653,6 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
1652 const int __user *, nodes, 1653 const int __user *, nodes,
1653 int __user *, status, int, flags) 1654 int __user *, status, int, flags)
1654{ 1655{
1655 const struct cred *cred = current_cred(), *tcred;
1656 struct task_struct *task; 1656 struct task_struct *task;
1657 struct mm_struct *mm; 1657 struct mm_struct *mm;
1658 int err; 1658 int err;
@@ -1676,14 +1676,9 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid, unsigned long, nr_pages,
1676 1676
1677 /* 1677 /*
1678 * Check if this process has the right to modify the specified 1678 * Check if this process has the right to modify the specified
1679 * process. The right exists if the process has administrative 1679 * process. Use the regular "ptrace_may_access()" checks.
1680 * capabilities, superuser privileges or the same
1681 * userid as the target process.
1682 */ 1680 */
1683 tcred = __task_cred(task); 1681 if (!ptrace_may_access(task, PTRACE_MODE_READ_REALCREDS)) {
1684 if (!uid_eq(cred->euid, tcred->suid) && !uid_eq(cred->euid, tcred->uid) &&
1685 !uid_eq(cred->uid, tcred->suid) && !uid_eq(cred->uid, tcred->uid) &&
1686 !capable(CAP_SYS_NICE)) {
1687 rcu_read_unlock(); 1682 rcu_read_unlock();
1688 err = -EPERM; 1683 err = -EPERM;
1689 goto out; 1684 goto out;
@@ -1937,12 +1932,6 @@ int migrate_misplaced_transhuge_page(struct mm_struct *mm,
1937 put_page(new_page); 1932 put_page(new_page);
1938 goto out_fail; 1933 goto out_fail;
1939 } 1934 }
1940 /*
1941 * We are not sure a pending tlb flush here is for a huge page
1942 * mapping or not. Hence use the tlb range variant
1943 */
1944 if (mm_tlb_flush_pending(mm))
1945 flush_tlb_range(vma, mmun_start, mmun_end);
1946 1935
1947 /* Prepare a page as a migration target */ 1936 /* Prepare a page as a migration target */
1948 __SetPageLocked(new_page); 1937 __SetPageLocked(new_page);
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 1a8c9ca83e48..bd0f409922cb 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -64,6 +64,7 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
64 atomic_read(&vma->vm_mm->mm_users) == 1) 64 atomic_read(&vma->vm_mm->mm_users) == 1)
65 target_node = numa_node_id(); 65 target_node = numa_node_id();
66 66
67 flush_tlb_batched_pending(vma->vm_mm);
67 arch_enter_lazy_mmu_mode(); 68 arch_enter_lazy_mmu_mode();
68 do { 69 do {
69 oldpte = *pte; 70 oldpte = *pte;
@@ -243,7 +244,7 @@ static unsigned long change_protection_range(struct vm_area_struct *vma,
243 BUG_ON(addr >= end); 244 BUG_ON(addr >= end);
244 pgd = pgd_offset(mm, addr); 245 pgd = pgd_offset(mm, addr);
245 flush_cache_range(vma, addr, end); 246 flush_cache_range(vma, addr, end);
246 set_tlb_flush_pending(mm); 247 inc_tlb_flush_pending(mm);
247 do { 248 do {
248 next = pgd_addr_end(addr, end); 249 next = pgd_addr_end(addr, end);
249 if (pgd_none_or_clear_bad(pgd)) 250 if (pgd_none_or_clear_bad(pgd))
@@ -255,7 +256,7 @@ static unsigned long change_protection_range(struct vm_area_struct *vma,
255 /* Only flush the TLB if we actually modified any entries: */ 256 /* Only flush the TLB if we actually modified any entries: */
256 if (pages) 257 if (pages)
257 flush_tlb_range(vma, start, end); 258 flush_tlb_range(vma, start, end);
258 clear_tlb_flush_pending(mm); 259 dec_tlb_flush_pending(mm);
259 260
260 return pages; 261 return pages;
261} 262}
diff --git a/mm/mremap.c b/mm/mremap.c
index cd8a1b199ef9..3f23715d3c69 100644
--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -152,6 +152,7 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd,
152 new_ptl = pte_lockptr(mm, new_pmd); 152 new_ptl = pte_lockptr(mm, new_pmd);
153 if (new_ptl != old_ptl) 153 if (new_ptl != old_ptl)
154 spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING); 154 spin_lock_nested(new_ptl, SINGLE_DEPTH_NESTING);
155 flush_tlb_batched_pending(vma->vm_mm);
155 arch_enter_lazy_mmu_mode(); 156 arch_enter_lazy_mmu_mode();
156 157
157 for (; old_addr < old_end; old_pte++, old_addr += PAGE_SIZE, 158 for (; old_addr < old_end; old_pte++, old_addr += PAGE_SIZE,
@@ -428,6 +429,7 @@ static struct vm_area_struct *vma_to_resize(unsigned long addr,
428static unsigned long mremap_to(unsigned long addr, unsigned long old_len, 429static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
429 unsigned long new_addr, unsigned long new_len, bool *locked, 430 unsigned long new_addr, unsigned long new_len, bool *locked,
430 struct vm_userfaultfd_ctx *uf, 431 struct vm_userfaultfd_ctx *uf,
432 struct list_head *uf_unmap_early,
431 struct list_head *uf_unmap) 433 struct list_head *uf_unmap)
432{ 434{
433 struct mm_struct *mm = current->mm; 435 struct mm_struct *mm = current->mm;
@@ -446,7 +448,7 @@ static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
446 if (addr + old_len > new_addr && new_addr + new_len > addr) 448 if (addr + old_len > new_addr && new_addr + new_len > addr)
447 goto out; 449 goto out;
448 450
449 ret = do_munmap(mm, new_addr, new_len, NULL); 451 ret = do_munmap(mm, new_addr, new_len, uf_unmap_early);
450 if (ret) 452 if (ret)
451 goto out; 453 goto out;
452 454
@@ -514,6 +516,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
514 unsigned long charged = 0; 516 unsigned long charged = 0;
515 bool locked = false; 517 bool locked = false;
516 struct vm_userfaultfd_ctx uf = NULL_VM_UFFD_CTX; 518 struct vm_userfaultfd_ctx uf = NULL_VM_UFFD_CTX;
519 LIST_HEAD(uf_unmap_early);
517 LIST_HEAD(uf_unmap); 520 LIST_HEAD(uf_unmap);
518 521
519 if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE)) 522 if (flags & ~(MREMAP_FIXED | MREMAP_MAYMOVE))
@@ -541,7 +544,7 @@ SYSCALL_DEFINE5(mremap, unsigned long, addr, unsigned long, old_len,
541 544
542 if (flags & MREMAP_FIXED) { 545 if (flags & MREMAP_FIXED) {
543 ret = mremap_to(addr, old_len, new_addr, new_len, 546 ret = mremap_to(addr, old_len, new_addr, new_len,
544 &locked, &uf, &uf_unmap); 547 &locked, &uf, &uf_unmap_early, &uf_unmap);
545 goto out; 548 goto out;
546 } 549 }
547 550
@@ -621,6 +624,7 @@ out:
621 up_write(&current->mm->mmap_sem); 624 up_write(&current->mm->mmap_sem);
622 if (locked && new_len > old_len) 625 if (locked && new_len > old_len)
623 mm_populate(new_addr + old_len, new_len - old_len); 626 mm_populate(new_addr + old_len, new_len - old_len);
627 userfaultfd_unmap_complete(mm, &uf_unmap_early);
624 mremap_userfaultfd_complete(&uf, addr, new_addr, old_len); 628 mremap_userfaultfd_complete(&uf, addr, new_addr, old_len);
625 userfaultfd_unmap_complete(mm, &uf_unmap); 629 userfaultfd_unmap_complete(mm, &uf_unmap);
626 return ret; 630 return ret;
diff --git a/mm/nobootmem.c b/mm/nobootmem.c
index 36454d0f96ee..3637809a18d0 100644
--- a/mm/nobootmem.c
+++ b/mm/nobootmem.c
@@ -146,22 +146,6 @@ static unsigned long __init free_low_memory_core_early(void)
146 NULL) 146 NULL)
147 count += __free_memory_core(start, end); 147 count += __free_memory_core(start, end);
148 148
149#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
150 {
151 phys_addr_t size;
152
153 /* Free memblock.reserved array if it was allocated */
154 size = get_allocated_memblock_reserved_regions_info(&start);
155 if (size)
156 count += __free_memory_core(start, start + size);
157
158 /* Free memblock.memory array if it was allocated */
159 size = get_allocated_memblock_memory_regions_info(&start);
160 if (size)
161 count += __free_memory_core(start, start + size);
162 }
163#endif
164
165 return count; 149 return count;
166} 150}
167 151
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 96e93b214d31..bf050ab025b7 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -2724,9 +2724,12 @@ EXPORT_SYMBOL(clear_page_dirty_for_io);
2724int test_clear_page_writeback(struct page *page) 2724int test_clear_page_writeback(struct page *page)
2725{ 2725{
2726 struct address_space *mapping = page_mapping(page); 2726 struct address_space *mapping = page_mapping(page);
2727 struct mem_cgroup *memcg;
2728 struct lruvec *lruvec;
2727 int ret; 2729 int ret;
2728 2730
2729 lock_page_memcg(page); 2731 memcg = lock_page_memcg(page);
2732 lruvec = mem_cgroup_page_lruvec(page, page_pgdat(page));
2730 if (mapping && mapping_use_writeback_tags(mapping)) { 2733 if (mapping && mapping_use_writeback_tags(mapping)) {
2731 struct inode *inode = mapping->host; 2734 struct inode *inode = mapping->host;
2732 struct backing_dev_info *bdi = inode_to_bdi(inode); 2735 struct backing_dev_info *bdi = inode_to_bdi(inode);
@@ -2754,12 +2757,18 @@ int test_clear_page_writeback(struct page *page)
2754 } else { 2757 } else {
2755 ret = TestClearPageWriteback(page); 2758 ret = TestClearPageWriteback(page);
2756 } 2759 }
2760 /*
2761 * NOTE: Page might be free now! Writeback doesn't hold a page
2762 * reference on its own, it relies on truncation to wait for
2763 * the clearing of PG_writeback. The below can only access
2764 * page state that is static across allocation cycles.
2765 */
2757 if (ret) { 2766 if (ret) {
2758 dec_lruvec_page_state(page, NR_WRITEBACK); 2767 dec_lruvec_state(lruvec, NR_WRITEBACK);
2759 dec_zone_page_state(page, NR_ZONE_WRITE_PENDING); 2768 dec_zone_page_state(page, NR_ZONE_WRITE_PENDING);
2760 inc_node_page_state(page, NR_WRITTEN); 2769 inc_node_page_state(page, NR_WRITTEN);
2761 } 2770 }
2762 unlock_page_memcg(page); 2771 __unlock_page_memcg(memcg);
2763 return ret; 2772 return ret;
2764} 2773}
2765 2774
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6d30e914afb6..7a58eb5757e3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -66,6 +66,7 @@
66#include <linux/kthread.h> 66#include <linux/kthread.h>
67#include <linux/memcontrol.h> 67#include <linux/memcontrol.h>
68#include <linux/ftrace.h> 68#include <linux/ftrace.h>
69#include <linux/nmi.h>
69 70
70#include <asm/sections.h> 71#include <asm/sections.h>
71#include <asm/tlbflush.h> 72#include <asm/tlbflush.h>
@@ -1584,6 +1585,10 @@ void __init page_alloc_init_late(void)
1584 /* Reinit limits that are based on free pages after the kernel is up */ 1585 /* Reinit limits that are based on free pages after the kernel is up */
1585 files_maxfiles_init(); 1586 files_maxfiles_init();
1586#endif 1587#endif
1588#ifdef CONFIG_ARCH_DISCARD_MEMBLOCK
1589 /* Discard memblock private memory */
1590 memblock_discard();
1591#endif
1587 1592
1588 for_each_populated_zone(zone) 1593 for_each_populated_zone(zone)
1589 set_zone_contiguous(zone); 1594 set_zone_contiguous(zone);
@@ -2531,9 +2536,14 @@ void drain_all_pages(struct zone *zone)
2531 2536
2532#ifdef CONFIG_HIBERNATION 2537#ifdef CONFIG_HIBERNATION
2533 2538
2539/*
2540 * Touch the watchdog for every WD_PAGE_COUNT pages.
2541 */
2542#define WD_PAGE_COUNT (128*1024)
2543
2534void mark_free_pages(struct zone *zone) 2544void mark_free_pages(struct zone *zone)
2535{ 2545{
2536 unsigned long pfn, max_zone_pfn; 2546 unsigned long pfn, max_zone_pfn, page_count = WD_PAGE_COUNT;
2537 unsigned long flags; 2547 unsigned long flags;
2538 unsigned int order, t; 2548 unsigned int order, t;
2539 struct page *page; 2549 struct page *page;
@@ -2548,6 +2558,11 @@ void mark_free_pages(struct zone *zone)
2548 if (pfn_valid(pfn)) { 2558 if (pfn_valid(pfn)) {
2549 page = pfn_to_page(pfn); 2559 page = pfn_to_page(pfn);
2550 2560
2561 if (!--page_count) {
2562 touch_nmi_watchdog();
2563 page_count = WD_PAGE_COUNT;
2564 }
2565
2551 if (page_zone(page) != zone) 2566 if (page_zone(page) != zone)
2552 continue; 2567 continue;
2553 2568
@@ -2561,8 +2576,13 @@ void mark_free_pages(struct zone *zone)
2561 unsigned long i; 2576 unsigned long i;
2562 2577
2563 pfn = page_to_pfn(page); 2578 pfn = page_to_pfn(page);
2564 for (i = 0; i < (1UL << order); i++) 2579 for (i = 0; i < (1UL << order); i++) {
2580 if (!--page_count) {
2581 touch_nmi_watchdog();
2582 page_count = WD_PAGE_COUNT;
2583 }
2565 swsusp_set_page_free(pfn_to_page(pfn + i)); 2584 swsusp_set_page_free(pfn_to_page(pfn + i));
2585 }
2566 } 2586 }
2567 } 2587 }
2568 spin_unlock_irqrestore(&zone->lock, flags); 2588 spin_unlock_irqrestore(&zone->lock, flags);
@@ -4458,8 +4478,9 @@ long si_mem_available(void)
4458 * Part of the reclaimable slab consists of items that are in use, 4478 * Part of the reclaimable slab consists of items that are in use,
4459 * and cannot be freed. Cap this estimate at the low watermark. 4479 * and cannot be freed. Cap this estimate at the low watermark.
4460 */ 4480 */
4461 available += global_page_state(NR_SLAB_RECLAIMABLE) - 4481 available += global_node_page_state(NR_SLAB_RECLAIMABLE) -
4462 min(global_page_state(NR_SLAB_RECLAIMABLE) / 2, wmark_low); 4482 min(global_node_page_state(NR_SLAB_RECLAIMABLE) / 2,
4483 wmark_low);
4463 4484
4464 if (available < 0) 4485 if (available < 0)
4465 available = 0; 4486 available = 0;
@@ -4602,8 +4623,8 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask)
4602 global_node_page_state(NR_FILE_DIRTY), 4623 global_node_page_state(NR_FILE_DIRTY),
4603 global_node_page_state(NR_WRITEBACK), 4624 global_node_page_state(NR_WRITEBACK),
4604 global_node_page_state(NR_UNSTABLE_NFS), 4625 global_node_page_state(NR_UNSTABLE_NFS),
4605 global_page_state(NR_SLAB_RECLAIMABLE), 4626 global_node_page_state(NR_SLAB_RECLAIMABLE),
4606 global_page_state(NR_SLAB_UNRECLAIMABLE), 4627 global_node_page_state(NR_SLAB_UNRECLAIMABLE),
4607 global_node_page_state(NR_FILE_MAPPED), 4628 global_node_page_state(NR_FILE_MAPPED),
4608 global_node_page_state(NR_SHMEM), 4629 global_node_page_state(NR_SHMEM),
4609 global_page_state(NR_PAGETABLE), 4630 global_page_state(NR_PAGETABLE),
@@ -4891,9 +4912,11 @@ int numa_zonelist_order_handler(struct ctl_table *table, int write,
4891 NUMA_ZONELIST_ORDER_LEN); 4912 NUMA_ZONELIST_ORDER_LEN);
4892 user_zonelist_order = oldval; 4913 user_zonelist_order = oldval;
4893 } else if (oldval != user_zonelist_order) { 4914 } else if (oldval != user_zonelist_order) {
4915 mem_hotplug_begin();
4894 mutex_lock(&zonelists_mutex); 4916 mutex_lock(&zonelists_mutex);
4895 build_all_zonelists(NULL, NULL); 4917 build_all_zonelists(NULL, NULL);
4896 mutex_unlock(&zonelists_mutex); 4918 mutex_unlock(&zonelists_mutex);
4919 mem_hotplug_done();
4897 } 4920 }
4898 } 4921 }
4899out: 4922out:
@@ -7666,7 +7689,7 @@ int alloc_contig_range(unsigned long start, unsigned long end,
7666 7689
7667 /* Make sure the range is really isolated. */ 7690 /* Make sure the range is really isolated. */
7668 if (test_pages_isolated(outer_start, end, false)) { 7691 if (test_pages_isolated(outer_start, end, false)) {
7669 pr_info("%s: [%lx, %lx) PFNs busy\n", 7692 pr_info_ratelimited("%s: [%lx, %lx) PFNs busy\n",
7670 __func__, outer_start, end); 7693 __func__, outer_start, end);
7671 ret = -EBUSY; 7694 ret = -EBUSY;
7672 goto done; 7695 goto done;
diff --git a/mm/page_io.c b/mm/page_io.c
index b6c4ac388209..5f61b54ee1f3 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -22,6 +22,7 @@
22#include <linux/frontswap.h> 22#include <linux/frontswap.h>
23#include <linux/blkdev.h> 23#include <linux/blkdev.h>
24#include <linux/uio.h> 24#include <linux/uio.h>
25#include <linux/sched/task.h>
25#include <asm/pgtable.h> 26#include <asm/pgtable.h>
26 27
27static struct bio *get_swap_bio(gfp_t gfp_flags, 28static struct bio *get_swap_bio(gfp_t gfp_flags,
@@ -136,6 +137,7 @@ out:
136 WRITE_ONCE(bio->bi_private, NULL); 137 WRITE_ONCE(bio->bi_private, NULL);
137 bio_put(bio); 138 bio_put(bio);
138 wake_up_process(waiter); 139 wake_up_process(waiter);
140 put_task_struct(waiter);
139} 141}
140 142
141int generic_swapfile_activate(struct swap_info_struct *sis, 143int generic_swapfile_activate(struct swap_info_struct *sis,
@@ -378,6 +380,11 @@ int swap_readpage(struct page *page, bool do_poll)
378 goto out; 380 goto out;
379 } 381 }
380 bdev = bio->bi_bdev; 382 bdev = bio->bi_bdev;
383 /*
384 * Keep this task valid during swap readpage because the oom killer may
385 * attempt to access it in the page fault retry time check.
386 */
387 get_task_struct(current);
381 bio->bi_private = current; 388 bio->bi_private = current;
382 bio_set_op_attrs(bio, REQ_OP_READ, 0); 389 bio_set_op_attrs(bio, REQ_OP_READ, 0);
383 count_vm_event(PSWPIN); 390 count_vm_event(PSWPIN);
diff --git a/mm/rmap.c b/mm/rmap.c
index ced14f1af6dc..c1286d47aa1f 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -605,6 +605,13 @@ static void set_tlb_ubc_flush_pending(struct mm_struct *mm, bool writable)
605 tlb_ubc->flush_required = true; 605 tlb_ubc->flush_required = true;
606 606
607 /* 607 /*
608 * Ensure compiler does not re-order the setting of tlb_flush_batched
609 * before the PTE is cleared.
610 */
611 barrier();
612 mm->tlb_flush_batched = true;
613
614 /*
608 * If the PTE was dirty then it's best to assume it's writable. The 615 * If the PTE was dirty then it's best to assume it's writable. The
609 * caller must use try_to_unmap_flush_dirty() or try_to_unmap_flush() 616 * caller must use try_to_unmap_flush_dirty() or try_to_unmap_flush()
610 * before the page is queued for IO. 617 * before the page is queued for IO.
@@ -631,6 +638,35 @@ static bool should_defer_flush(struct mm_struct *mm, enum ttu_flags flags)
631 638
632 return should_defer; 639 return should_defer;
633} 640}
641
642/*
643 * Reclaim unmaps pages under the PTL but do not flush the TLB prior to
644 * releasing the PTL if TLB flushes are batched. It's possible for a parallel
645 * operation such as mprotect or munmap to race between reclaim unmapping
646 * the page and flushing the page. If this race occurs, it potentially allows
647 * access to data via a stale TLB entry. Tracking all mm's that have TLB
648 * batching in flight would be expensive during reclaim so instead track
649 * whether TLB batching occurred in the past and if so then do a flush here
650 * if required. This will cost one additional flush per reclaim cycle paid
651 * by the first operation at risk such as mprotect and mumap.
652 *
653 * This must be called under the PTL so that an access to tlb_flush_batched
654 * that is potentially a "reclaim vs mprotect/munmap/etc" race will synchronise
655 * via the PTL.
656 */
657void flush_tlb_batched_pending(struct mm_struct *mm)
658{
659 if (mm->tlb_flush_batched) {
660 flush_tlb_mm(mm);
661
662 /*
663 * Do not allow the compiler to re-order the clearing of
664 * tlb_flush_batched before the tlb is flushed.
665 */
666 barrier();
667 mm->tlb_flush_batched = false;
668 }
669}
634#else 670#else
635static void set_tlb_ubc_flush_pending(struct mm_struct *mm, bool writable) 671static void set_tlb_ubc_flush_pending(struct mm_struct *mm, bool writable)
636{ 672{
@@ -852,10 +888,10 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
852 .flags = PVMW_SYNC, 888 .flags = PVMW_SYNC,
853 }; 889 };
854 int *cleaned = arg; 890 int *cleaned = arg;
891 bool invalidation_needed = false;
855 892
856 while (page_vma_mapped_walk(&pvmw)) { 893 while (page_vma_mapped_walk(&pvmw)) {
857 int ret = 0; 894 int ret = 0;
858 address = pvmw.address;
859 if (pvmw.pte) { 895 if (pvmw.pte) {
860 pte_t entry; 896 pte_t entry;
861 pte_t *pte = pvmw.pte; 897 pte_t *pte = pvmw.pte;
@@ -863,11 +899,11 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
863 if (!pte_dirty(*pte) && !pte_write(*pte)) 899 if (!pte_dirty(*pte) && !pte_write(*pte))
864 continue; 900 continue;
865 901
866 flush_cache_page(vma, address, pte_pfn(*pte)); 902 flush_cache_page(vma, pvmw.address, pte_pfn(*pte));
867 entry = ptep_clear_flush(vma, address, pte); 903 entry = ptep_clear_flush(vma, pvmw.address, pte);
868 entry = pte_wrprotect(entry); 904 entry = pte_wrprotect(entry);
869 entry = pte_mkclean(entry); 905 entry = pte_mkclean(entry);
870 set_pte_at(vma->vm_mm, address, pte, entry); 906 set_pte_at(vma->vm_mm, pvmw.address, pte, entry);
871 ret = 1; 907 ret = 1;
872 } else { 908 } else {
873#ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE 909#ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE
@@ -877,11 +913,11 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
877 if (!pmd_dirty(*pmd) && !pmd_write(*pmd)) 913 if (!pmd_dirty(*pmd) && !pmd_write(*pmd))
878 continue; 914 continue;
879 915
880 flush_cache_page(vma, address, page_to_pfn(page)); 916 flush_cache_page(vma, pvmw.address, page_to_pfn(page));
881 entry = pmdp_huge_clear_flush(vma, address, pmd); 917 entry = pmdp_huge_clear_flush(vma, pvmw.address, pmd);
882 entry = pmd_wrprotect(entry); 918 entry = pmd_wrprotect(entry);
883 entry = pmd_mkclean(entry); 919 entry = pmd_mkclean(entry);
884 set_pmd_at(vma->vm_mm, address, pmd, entry); 920 set_pmd_at(vma->vm_mm, pvmw.address, pmd, entry);
885 ret = 1; 921 ret = 1;
886#else 922#else
887 /* unexpected pmd-mapped page? */ 923 /* unexpected pmd-mapped page? */
@@ -890,11 +926,16 @@ static bool page_mkclean_one(struct page *page, struct vm_area_struct *vma,
890 } 926 }
891 927
892 if (ret) { 928 if (ret) {
893 mmu_notifier_invalidate_page(vma->vm_mm, address);
894 (*cleaned)++; 929 (*cleaned)++;
930 invalidation_needed = true;
895 } 931 }
896 } 932 }
897 933
934 if (invalidation_needed) {
935 mmu_notifier_invalidate_range(vma->vm_mm, address,
936 address + (1UL << compound_order(page)));
937 }
938
898 return true; 939 return true;
899} 940}
900 941
@@ -1287,7 +1328,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1287 }; 1328 };
1288 pte_t pteval; 1329 pte_t pteval;
1289 struct page *subpage; 1330 struct page *subpage;
1290 bool ret = true; 1331 bool ret = true, invalidation_needed = false;
1291 enum ttu_flags flags = (enum ttu_flags)arg; 1332 enum ttu_flags flags = (enum ttu_flags)arg;
1292 1333
1293 /* munlock has nothing to gain from examining un-locked vmas */ 1334 /* munlock has nothing to gain from examining un-locked vmas */
@@ -1327,11 +1368,9 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1327 VM_BUG_ON_PAGE(!pvmw.pte, page); 1368 VM_BUG_ON_PAGE(!pvmw.pte, page);
1328 1369
1329 subpage = page - page_to_pfn(page) + pte_pfn(*pvmw.pte); 1370 subpage = page - page_to_pfn(page) + pte_pfn(*pvmw.pte);
1330 address = pvmw.address;
1331
1332 1371
1333 if (!(flags & TTU_IGNORE_ACCESS)) { 1372 if (!(flags & TTU_IGNORE_ACCESS)) {
1334 if (ptep_clear_flush_young_notify(vma, address, 1373 if (ptep_clear_flush_young_notify(vma, pvmw.address,
1335 pvmw.pte)) { 1374 pvmw.pte)) {
1336 ret = false; 1375 ret = false;
1337 page_vma_mapped_walk_done(&pvmw); 1376 page_vma_mapped_walk_done(&pvmw);
@@ -1340,7 +1379,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1340 } 1379 }
1341 1380
1342 /* Nuke the page table entry. */ 1381 /* Nuke the page table entry. */
1343 flush_cache_page(vma, address, pte_pfn(*pvmw.pte)); 1382 flush_cache_page(vma, pvmw.address, pte_pfn(*pvmw.pte));
1344 if (should_defer_flush(mm, flags)) { 1383 if (should_defer_flush(mm, flags)) {
1345 /* 1384 /*
1346 * We clear the PTE but do not flush so potentially 1385 * We clear the PTE but do not flush so potentially
@@ -1350,11 +1389,12 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1350 * transition on a cached TLB entry is written through 1389 * transition on a cached TLB entry is written through
1351 * and traps if the PTE is unmapped. 1390 * and traps if the PTE is unmapped.
1352 */ 1391 */
1353 pteval = ptep_get_and_clear(mm, address, pvmw.pte); 1392 pteval = ptep_get_and_clear(mm, pvmw.address,
1393 pvmw.pte);
1354 1394
1355 set_tlb_ubc_flush_pending(mm, pte_dirty(pteval)); 1395 set_tlb_ubc_flush_pending(mm, pte_dirty(pteval));
1356 } else { 1396 } else {
1357 pteval = ptep_clear_flush(vma, address, pvmw.pte); 1397 pteval = ptep_clear_flush(vma, pvmw.address, pvmw.pte);
1358 } 1398 }
1359 1399
1360 /* Move the dirty bit to the page. Now the pte is gone. */ 1400 /* Move the dirty bit to the page. Now the pte is gone. */
@@ -1369,12 +1409,12 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1369 if (PageHuge(page)) { 1409 if (PageHuge(page)) {
1370 int nr = 1 << compound_order(page); 1410 int nr = 1 << compound_order(page);
1371 hugetlb_count_sub(nr, mm); 1411 hugetlb_count_sub(nr, mm);
1372 set_huge_swap_pte_at(mm, address, 1412 set_huge_swap_pte_at(mm, pvmw.address,
1373 pvmw.pte, pteval, 1413 pvmw.pte, pteval,
1374 vma_mmu_pagesize(vma)); 1414 vma_mmu_pagesize(vma));
1375 } else { 1415 } else {
1376 dec_mm_counter(mm, mm_counter(page)); 1416 dec_mm_counter(mm, mm_counter(page));
1377 set_pte_at(mm, address, pvmw.pte, pteval); 1417 set_pte_at(mm, pvmw.address, pvmw.pte, pteval);
1378 } 1418 }
1379 1419
1380 } else if (pte_unused(pteval)) { 1420 } else if (pte_unused(pteval)) {
@@ -1398,7 +1438,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1398 swp_pte = swp_entry_to_pte(entry); 1438 swp_pte = swp_entry_to_pte(entry);
1399 if (pte_soft_dirty(pteval)) 1439 if (pte_soft_dirty(pteval))
1400 swp_pte = pte_swp_mksoft_dirty(swp_pte); 1440 swp_pte = pte_swp_mksoft_dirty(swp_pte);
1401 set_pte_at(mm, address, pvmw.pte, swp_pte); 1441 set_pte_at(mm, pvmw.address, pvmw.pte, swp_pte);
1402 } else if (PageAnon(page)) { 1442 } else if (PageAnon(page)) {
1403 swp_entry_t entry = { .val = page_private(subpage) }; 1443 swp_entry_t entry = { .val = page_private(subpage) };
1404 pte_t swp_pte; 1444 pte_t swp_pte;
@@ -1424,7 +1464,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1424 * If the page was redirtied, it cannot be 1464 * If the page was redirtied, it cannot be
1425 * discarded. Remap the page to page table. 1465 * discarded. Remap the page to page table.
1426 */ 1466 */
1427 set_pte_at(mm, address, pvmw.pte, pteval); 1467 set_pte_at(mm, pvmw.address, pvmw.pte, pteval);
1428 SetPageSwapBacked(page); 1468 SetPageSwapBacked(page);
1429 ret = false; 1469 ret = false;
1430 page_vma_mapped_walk_done(&pvmw); 1470 page_vma_mapped_walk_done(&pvmw);
@@ -1432,7 +1472,7 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1432 } 1472 }
1433 1473
1434 if (swap_duplicate(entry) < 0) { 1474 if (swap_duplicate(entry) < 0) {
1435 set_pte_at(mm, address, pvmw.pte, pteval); 1475 set_pte_at(mm, pvmw.address, pvmw.pte, pteval);
1436 ret = false; 1476 ret = false;
1437 page_vma_mapped_walk_done(&pvmw); 1477 page_vma_mapped_walk_done(&pvmw);
1438 break; 1478 break;
@@ -1448,14 +1488,18 @@ static bool try_to_unmap_one(struct page *page, struct vm_area_struct *vma,
1448 swp_pte = swp_entry_to_pte(entry); 1488 swp_pte = swp_entry_to_pte(entry);
1449 if (pte_soft_dirty(pteval)) 1489 if (pte_soft_dirty(pteval))
1450 swp_pte = pte_swp_mksoft_dirty(swp_pte); 1490 swp_pte = pte_swp_mksoft_dirty(swp_pte);
1451 set_pte_at(mm, address, pvmw.pte, swp_pte); 1491 set_pte_at(mm, pvmw.address, pvmw.pte, swp_pte);
1452 } else 1492 } else
1453 dec_mm_counter(mm, mm_counter_file(page)); 1493 dec_mm_counter(mm, mm_counter_file(page));
1454discard: 1494discard:
1455 page_remove_rmap(subpage, PageHuge(page)); 1495 page_remove_rmap(subpage, PageHuge(page));
1456 put_page(page); 1496 put_page(page);
1457 mmu_notifier_invalidate_page(mm, address); 1497 invalidation_needed = true;
1458 } 1498 }
1499
1500 if (invalidation_needed)
1501 mmu_notifier_invalidate_range(mm, address,
1502 address + (1UL << compound_order(page)));
1459 return ret; 1503 return ret;
1460} 1504}
1461 1505
diff --git a/mm/shmem.c b/mm/shmem.c
index b0aa6075d164..fbcb3c96a186 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1022,7 +1022,11 @@ static int shmem_setattr(struct dentry *dentry, struct iattr *attr)
1022 */ 1022 */
1023 if (IS_ENABLED(CONFIG_TRANSPARENT_HUGE_PAGECACHE)) { 1023 if (IS_ENABLED(CONFIG_TRANSPARENT_HUGE_PAGECACHE)) {
1024 spin_lock(&sbinfo->shrinklist_lock); 1024 spin_lock(&sbinfo->shrinklist_lock);
1025 if (list_empty(&info->shrinklist)) { 1025 /*
1026 * _careful to defend against unlocked access to
1027 * ->shrink_list in shmem_unused_huge_shrink()
1028 */
1029 if (list_empty_careful(&info->shrinklist)) {
1026 list_add_tail(&info->shrinklist, 1030 list_add_tail(&info->shrinklist,
1027 &sbinfo->shrinklist); 1031 &sbinfo->shrinklist);
1028 sbinfo->shrinklist_len++; 1032 sbinfo->shrinklist_len++;
@@ -1817,7 +1821,11 @@ alloc_nohuge: page = shmem_alloc_and_acct_page(gfp, info, sbinfo,
1817 * to shrink under memory pressure. 1821 * to shrink under memory pressure.
1818 */ 1822 */
1819 spin_lock(&sbinfo->shrinklist_lock); 1823 spin_lock(&sbinfo->shrinklist_lock);
1820 if (list_empty(&info->shrinklist)) { 1824 /*
1825 * _careful to defend against unlocked access to
1826 * ->shrink_list in shmem_unused_huge_shrink()
1827 */
1828 if (list_empty_careful(&info->shrinklist)) {
1821 list_add_tail(&info->shrinklist, 1829 list_add_tail(&info->shrinklist,
1822 &sbinfo->shrinklist); 1830 &sbinfo->shrinklist);
1823 sbinfo->shrinklist_len++; 1831 sbinfo->shrinklist_len++;
@@ -3959,7 +3967,7 @@ int __init shmem_init(void)
3959 } 3967 }
3960 3968
3961#ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE 3969#ifdef CONFIG_TRANSPARENT_HUGE_PAGECACHE
3962 if (has_transparent_hugepage() && shmem_huge < SHMEM_HUGE_DENY) 3970 if (has_transparent_hugepage() && shmem_huge > SHMEM_HUGE_DENY)
3963 SHMEM_SB(shm_mnt->mnt_sb)->huge = shmem_huge; 3971 SHMEM_SB(shm_mnt->mnt_sb)->huge = shmem_huge;
3964 else 3972 else
3965 shmem_huge = 0; /* just in case it was patched */ 3973 shmem_huge = 0; /* just in case it was patched */
@@ -4020,7 +4028,7 @@ static ssize_t shmem_enabled_store(struct kobject *kobj,
4020 return -EINVAL; 4028 return -EINVAL;
4021 4029
4022 shmem_huge = huge; 4030 shmem_huge = huge;
4023 if (shmem_huge < SHMEM_HUGE_DENY) 4031 if (shmem_huge > SHMEM_HUGE_DENY)
4024 SHMEM_SB(shm_mnt->mnt_sb)->huge = shmem_huge; 4032 SHMEM_SB(shm_mnt->mnt_sb)->huge = shmem_huge;
4025 return count; 4033 return count;
4026} 4034}
diff --git a/mm/slub.c b/mm/slub.c
index 1d3f9835f4ea..e8b4e31162ca 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -5642,13 +5642,14 @@ static void sysfs_slab_remove_workfn(struct work_struct *work)
5642 * A cache is never shut down before deactivation is 5642 * A cache is never shut down before deactivation is
5643 * complete, so no need to worry about synchronization. 5643 * complete, so no need to worry about synchronization.
5644 */ 5644 */
5645 return; 5645 goto out;
5646 5646
5647#ifdef CONFIG_MEMCG 5647#ifdef CONFIG_MEMCG
5648 kset_unregister(s->memcg_kset); 5648 kset_unregister(s->memcg_kset);
5649#endif 5649#endif
5650 kobject_uevent(&s->kobj, KOBJ_REMOVE); 5650 kobject_uevent(&s->kobj, KOBJ_REMOVE);
5651 kobject_del(&s->kobj); 5651 kobject_del(&s->kobj);
5652out:
5652 kobject_put(&s->kobj); 5653 kobject_put(&s->kobj);
5653} 5654}
5654 5655
diff --git a/mm/util.c b/mm/util.c
index 7b07ec852e01..9ecddf568fe3 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -633,7 +633,7 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
633 * which are reclaimable, under pressure. The dentry 633 * which are reclaimable, under pressure. The dentry
634 * cache and most inode caches should fall into this 634 * cache and most inode caches should fall into this
635 */ 635 */
636 free += global_page_state(NR_SLAB_RECLAIMABLE); 636 free += global_node_page_state(NR_SLAB_RECLAIMABLE);
637 637
638 /* 638 /*
639 * Leave reserved pages. The pages are not for anonymous pages. 639 * Leave reserved pages. The pages are not for anonymous pages.
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 8698c1c86c4d..a47e3894c775 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1671,7 +1671,10 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
1671 struct page **pages; 1671 struct page **pages;
1672 unsigned int nr_pages, array_size, i; 1672 unsigned int nr_pages, array_size, i;
1673 const gfp_t nested_gfp = (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO; 1673 const gfp_t nested_gfp = (gfp_mask & GFP_RECLAIM_MASK) | __GFP_ZERO;
1674 const gfp_t alloc_mask = gfp_mask | __GFP_HIGHMEM | __GFP_NOWARN; 1674 const gfp_t alloc_mask = gfp_mask | __GFP_NOWARN;
1675 const gfp_t highmem_mask = (gfp_mask & (GFP_DMA | GFP_DMA32)) ?
1676 0 :
1677 __GFP_HIGHMEM;
1675 1678
1676 nr_pages = get_vm_area_size(area) >> PAGE_SHIFT; 1679 nr_pages = get_vm_area_size(area) >> PAGE_SHIFT;
1677 array_size = (nr_pages * sizeof(struct page *)); 1680 array_size = (nr_pages * sizeof(struct page *));
@@ -1679,7 +1682,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
1679 area->nr_pages = nr_pages; 1682 area->nr_pages = nr_pages;
1680 /* Please note that the recursion is strictly bounded. */ 1683 /* Please note that the recursion is strictly bounded. */
1681 if (array_size > PAGE_SIZE) { 1684 if (array_size > PAGE_SIZE) {
1682 pages = __vmalloc_node(array_size, 1, nested_gfp|__GFP_HIGHMEM, 1685 pages = __vmalloc_node(array_size, 1, nested_gfp|highmem_mask,
1683 PAGE_KERNEL, node, area->caller); 1686 PAGE_KERNEL, node, area->caller);
1684 } else { 1687 } else {
1685 pages = kmalloc_node(array_size, nested_gfp, node); 1688 pages = kmalloc_node(array_size, nested_gfp, node);
@@ -1700,9 +1703,9 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
1700 } 1703 }
1701 1704
1702 if (node == NUMA_NO_NODE) 1705 if (node == NUMA_NO_NODE)
1703 page = alloc_page(alloc_mask); 1706 page = alloc_page(alloc_mask|highmem_mask);
1704 else 1707 else
1705 page = alloc_pages_node(node, alloc_mask, 0); 1708 page = alloc_pages_node(node, alloc_mask|highmem_mask, 0);
1706 1709
1707 if (unlikely(!page)) { 1710 if (unlikely(!page)) {
1708 /* Successfully allocated i pages, free them in __vunmap() */ 1711 /* Successfully allocated i pages, free them in __vunmap() */
@@ -1710,7 +1713,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
1710 goto fail; 1713 goto fail;
1711 } 1714 }
1712 area->pages[i] = page; 1715 area->pages[i] = page;
1713 if (gfpflags_allow_blocking(gfp_mask)) 1716 if (gfpflags_allow_blocking(gfp_mask|highmem_mask))
1714 cond_resched(); 1717 cond_resched();
1715 } 1718 }
1716 1719
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 013eea76685e..308acb9d814b 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -2453,7 +2453,6 @@ void zs_destroy_pool(struct zs_pool *pool)
2453 } 2453 }
2454 2454
2455 destroy_cache(pool); 2455 destroy_cache(pool);
2456 kfree(pool->size_class);
2457 kfree(pool->name); 2456 kfree(pool->name);
2458 kfree(pool); 2457 kfree(pool);
2459} 2458}
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index e1133bc634b5..8a3ce79b1307 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -1549,9 +1549,41 @@ batadv_tt_global_entry_has_orig(const struct batadv_tt_global_entry *entry,
1549 return found; 1549 return found;
1550} 1550}
1551 1551
1552/**
1553 * batadv_tt_global_sync_flags - update TT sync flags
1554 * @tt_global: the TT global entry to update sync flags in
1555 *
1556 * Updates the sync flag bits in the tt_global flag attribute with a logical
1557 * OR of all sync flags from any of its TT orig entries.
1558 */
1559static void
1560batadv_tt_global_sync_flags(struct batadv_tt_global_entry *tt_global)
1561{
1562 struct batadv_tt_orig_list_entry *orig_entry;
1563 const struct hlist_head *head;
1564 u16 flags = BATADV_NO_FLAGS;
1565
1566 rcu_read_lock();
1567 head = &tt_global->orig_list;
1568 hlist_for_each_entry_rcu(orig_entry, head, list)
1569 flags |= orig_entry->flags;
1570 rcu_read_unlock();
1571
1572 flags |= tt_global->common.flags & (~BATADV_TT_SYNC_MASK);
1573 tt_global->common.flags = flags;
1574}
1575
1576/**
1577 * batadv_tt_global_orig_entry_add - add or update a TT orig entry
1578 * @tt_global: the TT global entry to add an orig entry in
1579 * @orig_node: the originator to add an orig entry for
1580 * @ttvn: translation table version number of this changeset
1581 * @flags: TT sync flags
1582 */
1552static void 1583static void
1553batadv_tt_global_orig_entry_add(struct batadv_tt_global_entry *tt_global, 1584batadv_tt_global_orig_entry_add(struct batadv_tt_global_entry *tt_global,
1554 struct batadv_orig_node *orig_node, int ttvn) 1585 struct batadv_orig_node *orig_node, int ttvn,
1586 u8 flags)
1555{ 1587{
1556 struct batadv_tt_orig_list_entry *orig_entry; 1588 struct batadv_tt_orig_list_entry *orig_entry;
1557 1589
@@ -1561,7 +1593,8 @@ batadv_tt_global_orig_entry_add(struct batadv_tt_global_entry *tt_global,
1561 * was added during a "temporary client detection" 1593 * was added during a "temporary client detection"
1562 */ 1594 */
1563 orig_entry->ttvn = ttvn; 1595 orig_entry->ttvn = ttvn;
1564 goto out; 1596 orig_entry->flags = flags;
1597 goto sync_flags;
1565 } 1598 }
1566 1599
1567 orig_entry = kmem_cache_zalloc(batadv_tt_orig_cache, GFP_ATOMIC); 1600 orig_entry = kmem_cache_zalloc(batadv_tt_orig_cache, GFP_ATOMIC);
@@ -1573,6 +1606,7 @@ batadv_tt_global_orig_entry_add(struct batadv_tt_global_entry *tt_global,
1573 batadv_tt_global_size_inc(orig_node, tt_global->common.vid); 1606 batadv_tt_global_size_inc(orig_node, tt_global->common.vid);
1574 orig_entry->orig_node = orig_node; 1607 orig_entry->orig_node = orig_node;
1575 orig_entry->ttvn = ttvn; 1608 orig_entry->ttvn = ttvn;
1609 orig_entry->flags = flags;
1576 kref_init(&orig_entry->refcount); 1610 kref_init(&orig_entry->refcount);
1577 1611
1578 spin_lock_bh(&tt_global->list_lock); 1612 spin_lock_bh(&tt_global->list_lock);
@@ -1582,6 +1616,8 @@ batadv_tt_global_orig_entry_add(struct batadv_tt_global_entry *tt_global,
1582 spin_unlock_bh(&tt_global->list_lock); 1616 spin_unlock_bh(&tt_global->list_lock);
1583 atomic_inc(&tt_global->orig_list_count); 1617 atomic_inc(&tt_global->orig_list_count);
1584 1618
1619sync_flags:
1620 batadv_tt_global_sync_flags(tt_global);
1585out: 1621out:
1586 if (orig_entry) 1622 if (orig_entry)
1587 batadv_tt_orig_list_entry_put(orig_entry); 1623 batadv_tt_orig_list_entry_put(orig_entry);
@@ -1703,10 +1739,10 @@ static bool batadv_tt_global_add(struct batadv_priv *bat_priv,
1703 } 1739 }
1704 1740
1705 /* the change can carry possible "attribute" flags like the 1741 /* the change can carry possible "attribute" flags like the
1706 * TT_CLIENT_WIFI, therefore they have to be copied in the 1742 * TT_CLIENT_TEMP, therefore they have to be copied in the
1707 * client entry 1743 * client entry
1708 */ 1744 */
1709 common->flags |= flags; 1745 common->flags |= flags & (~BATADV_TT_SYNC_MASK);
1710 1746
1711 /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only 1747 /* If there is the BATADV_TT_CLIENT_ROAM flag set, there is only
1712 * one originator left in the list and we previously received a 1748 * one originator left in the list and we previously received a
@@ -1723,7 +1759,8 @@ static bool batadv_tt_global_add(struct batadv_priv *bat_priv,
1723 } 1759 }
1724add_orig_entry: 1760add_orig_entry:
1725 /* add the new orig_entry (if needed) or update it */ 1761 /* add the new orig_entry (if needed) or update it */
1726 batadv_tt_global_orig_entry_add(tt_global_entry, orig_node, ttvn); 1762 batadv_tt_global_orig_entry_add(tt_global_entry, orig_node, ttvn,
1763 flags & BATADV_TT_SYNC_MASK);
1727 1764
1728 batadv_dbg(BATADV_DBG_TT, bat_priv, 1765 batadv_dbg(BATADV_DBG_TT, bat_priv,
1729 "Creating new global tt entry: %pM (vid: %d, via %pM)\n", 1766 "Creating new global tt entry: %pM (vid: %d, via %pM)\n",
@@ -1946,6 +1983,7 @@ batadv_tt_global_dump_subentry(struct sk_buff *msg, u32 portid, u32 seq,
1946 struct batadv_tt_orig_list_entry *orig, 1983 struct batadv_tt_orig_list_entry *orig,
1947 bool best) 1984 bool best)
1948{ 1985{
1986 u16 flags = (common->flags & (~BATADV_TT_SYNC_MASK)) | orig->flags;
1949 void *hdr; 1987 void *hdr;
1950 struct batadv_orig_node_vlan *vlan; 1988 struct batadv_orig_node_vlan *vlan;
1951 u8 last_ttvn; 1989 u8 last_ttvn;
@@ -1975,7 +2013,7 @@ batadv_tt_global_dump_subentry(struct sk_buff *msg, u32 portid, u32 seq,
1975 nla_put_u8(msg, BATADV_ATTR_TT_LAST_TTVN, last_ttvn) || 2013 nla_put_u8(msg, BATADV_ATTR_TT_LAST_TTVN, last_ttvn) ||
1976 nla_put_u32(msg, BATADV_ATTR_TT_CRC32, crc) || 2014 nla_put_u32(msg, BATADV_ATTR_TT_CRC32, crc) ||
1977 nla_put_u16(msg, BATADV_ATTR_TT_VID, common->vid) || 2015 nla_put_u16(msg, BATADV_ATTR_TT_VID, common->vid) ||
1978 nla_put_u32(msg, BATADV_ATTR_TT_FLAGS, common->flags)) 2016 nla_put_u32(msg, BATADV_ATTR_TT_FLAGS, flags))
1979 goto nla_put_failure; 2017 goto nla_put_failure;
1980 2018
1981 if (best && nla_put_flag(msg, BATADV_ATTR_FLAG_BEST)) 2019 if (best && nla_put_flag(msg, BATADV_ATTR_FLAG_BEST))
@@ -2589,6 +2627,7 @@ static u32 batadv_tt_global_crc(struct batadv_priv *bat_priv,
2589 unsigned short vid) 2627 unsigned short vid)
2590{ 2628{
2591 struct batadv_hashtable *hash = bat_priv->tt.global_hash; 2629 struct batadv_hashtable *hash = bat_priv->tt.global_hash;
2630 struct batadv_tt_orig_list_entry *tt_orig;
2592 struct batadv_tt_common_entry *tt_common; 2631 struct batadv_tt_common_entry *tt_common;
2593 struct batadv_tt_global_entry *tt_global; 2632 struct batadv_tt_global_entry *tt_global;
2594 struct hlist_head *head; 2633 struct hlist_head *head;
@@ -2627,8 +2666,9 @@ static u32 batadv_tt_global_crc(struct batadv_priv *bat_priv,
2627 /* find out if this global entry is announced by this 2666 /* find out if this global entry is announced by this
2628 * originator 2667 * originator
2629 */ 2668 */
2630 if (!batadv_tt_global_entry_has_orig(tt_global, 2669 tt_orig = batadv_tt_global_orig_entry_find(tt_global,
2631 orig_node)) 2670 orig_node);
2671 if (!tt_orig)
2632 continue; 2672 continue;
2633 2673
2634 /* use network order to read the VID: this ensures that 2674 /* use network order to read the VID: this ensures that
@@ -2640,10 +2680,12 @@ static u32 batadv_tt_global_crc(struct batadv_priv *bat_priv,
2640 /* compute the CRC on flags that have to be kept in sync 2680 /* compute the CRC on flags that have to be kept in sync
2641 * among nodes 2681 * among nodes
2642 */ 2682 */
2643 flags = tt_common->flags & BATADV_TT_SYNC_MASK; 2683 flags = tt_orig->flags;
2644 crc_tmp = crc32c(crc_tmp, &flags, sizeof(flags)); 2684 crc_tmp = crc32c(crc_tmp, &flags, sizeof(flags));
2645 2685
2646 crc ^= crc32c(crc_tmp, tt_common->addr, ETH_ALEN); 2686 crc ^= crc32c(crc_tmp, tt_common->addr, ETH_ALEN);
2687
2688 batadv_tt_orig_list_entry_put(tt_orig);
2647 } 2689 }
2648 rcu_read_unlock(); 2690 rcu_read_unlock();
2649 } 2691 }
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index ea43a6449247..a62795868794 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -1260,6 +1260,7 @@ struct batadv_tt_global_entry {
1260 * struct batadv_tt_orig_list_entry - orig node announcing a non-mesh client 1260 * struct batadv_tt_orig_list_entry - orig node announcing a non-mesh client
1261 * @orig_node: pointer to orig node announcing this non-mesh client 1261 * @orig_node: pointer to orig node announcing this non-mesh client
1262 * @ttvn: translation table version number which added the non-mesh client 1262 * @ttvn: translation table version number which added the non-mesh client
1263 * @flags: per orig entry TT sync flags
1263 * @list: list node for batadv_tt_global_entry::orig_list 1264 * @list: list node for batadv_tt_global_entry::orig_list
1264 * @refcount: number of contexts the object is used 1265 * @refcount: number of contexts the object is used
1265 * @rcu: struct used for freeing in an RCU-safe manner 1266 * @rcu: struct used for freeing in an RCU-safe manner
@@ -1267,6 +1268,7 @@ struct batadv_tt_global_entry {
1267struct batadv_tt_orig_list_entry { 1268struct batadv_tt_orig_list_entry {
1268 struct batadv_orig_node *orig_node; 1269 struct batadv_orig_node *orig_node;
1269 u8 ttvn; 1270 u8 ttvn;
1271 u8 flags;
1270 struct hlist_node list; 1272 struct hlist_node list;
1271 struct kref refcount; 1273 struct kref refcount;
1272 struct rcu_head rcu; 1274 struct rcu_head rcu;
diff --git a/net/ceph/crush/mapper.c b/net/ceph/crush/mapper.c
index 746b145bfd11..417df675c71b 100644
--- a/net/ceph/crush/mapper.c
+++ b/net/ceph/crush/mapper.c
@@ -306,7 +306,7 @@ static __u32 *get_choose_arg_weights(const struct crush_bucket_straw2 *bucket,
306 const struct crush_choose_arg *arg, 306 const struct crush_choose_arg *arg,
307 int position) 307 int position)
308{ 308{
309 if (!arg || !arg->weight_set || arg->weight_set_size == 0) 309 if (!arg || !arg->weight_set)
310 return bucket->item_weights; 310 return bucket->item_weights;
311 311
312 if (position >= arg->weight_set_size) 312 if (position >= arg->weight_set_size)
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index b7cc615d42ef..a67298c7e0cd 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1287,10 +1287,10 @@ static void prepare_write_message(struct ceph_connection *con)
1287 if (m->needs_out_seq) { 1287 if (m->needs_out_seq) {
1288 m->hdr.seq = cpu_to_le64(++con->out_seq); 1288 m->hdr.seq = cpu_to_le64(++con->out_seq);
1289 m->needs_out_seq = false; 1289 m->needs_out_seq = false;
1290 }
1291 1290
1292 if (con->ops->reencode_message) 1291 if (con->ops->reencode_message)
1293 con->ops->reencode_message(m); 1292 con->ops->reencode_message(m);
1293 }
1294 1294
1295 dout("prepare_write_message %p seq %lld type %d len %d+%d+%zd\n", 1295 dout("prepare_write_message %p seq %lld type %d len %d+%d+%zd\n",
1296 m, con->out_seq, le16_to_cpu(m->hdr.type), 1296 m, con->out_seq, le16_to_cpu(m->hdr.type),
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index 901bb8221366..dcfbdd74dfd1 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -1337,6 +1337,8 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc,
1337 bool legacy_change; 1337 bool legacy_change;
1338 bool split = false; 1338 bool split = false;
1339 bool sort_bitwise = ceph_osdmap_flag(osdc, CEPH_OSDMAP_SORTBITWISE); 1339 bool sort_bitwise = ceph_osdmap_flag(osdc, CEPH_OSDMAP_SORTBITWISE);
1340 bool recovery_deletes = ceph_osdmap_flag(osdc,
1341 CEPH_OSDMAP_RECOVERY_DELETES);
1340 enum calc_target_result ct_res; 1342 enum calc_target_result ct_res;
1341 int ret; 1343 int ret;
1342 1344
@@ -1399,6 +1401,8 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc,
1399 pi->pg_num, 1401 pi->pg_num,
1400 t->sort_bitwise, 1402 t->sort_bitwise,
1401 sort_bitwise, 1403 sort_bitwise,
1404 t->recovery_deletes,
1405 recovery_deletes,
1402 &last_pgid)) 1406 &last_pgid))
1403 force_resend = true; 1407 force_resend = true;
1404 1408
@@ -1421,6 +1425,7 @@ static enum calc_target_result calc_target(struct ceph_osd_client *osdc,
1421 t->pg_num = pi->pg_num; 1425 t->pg_num = pi->pg_num;
1422 t->pg_num_mask = pi->pg_num_mask; 1426 t->pg_num_mask = pi->pg_num_mask;
1423 t->sort_bitwise = sort_bitwise; 1427 t->sort_bitwise = sort_bitwise;
1428 t->recovery_deletes = recovery_deletes;
1424 1429
1425 t->osd = acting.primary; 1430 t->osd = acting.primary;
1426 } 1431 }
@@ -1918,10 +1923,12 @@ static void encode_request_partial(struct ceph_osd_request *req,
1918 } 1923 }
1919 1924
1920 ceph_encode_32(&p, req->r_attempts); /* retry_attempt */ 1925 ceph_encode_32(&p, req->r_attempts); /* retry_attempt */
1921 BUG_ON(p != end - 8); /* space for features */ 1926 BUG_ON(p > end - 8); /* space for features */
1922 1927
1923 msg->hdr.version = cpu_to_le16(8); /* MOSDOp v8 */ 1928 msg->hdr.version = cpu_to_le16(8); /* MOSDOp v8 */
1924 /* front_len is finalized in encode_request_finish() */ 1929 /* front_len is finalized in encode_request_finish() */
1930 msg->front.iov_len = p - msg->front.iov_base;
1931 msg->hdr.front_len = cpu_to_le32(msg->front.iov_len);
1925 msg->hdr.data_len = cpu_to_le32(data_len); 1932 msg->hdr.data_len = cpu_to_le32(data_len);
1926 /* 1933 /*
1927 * The header "data_off" is a hint to the receiver allowing it 1934 * The header "data_off" is a hint to the receiver allowing it
@@ -1937,11 +1944,12 @@ static void encode_request_partial(struct ceph_osd_request *req,
1937static void encode_request_finish(struct ceph_msg *msg) 1944static void encode_request_finish(struct ceph_msg *msg)
1938{ 1945{
1939 void *p = msg->front.iov_base; 1946 void *p = msg->front.iov_base;
1947 void *const partial_end = p + msg->front.iov_len;
1940 void *const end = p + msg->front_alloc_len; 1948 void *const end = p + msg->front_alloc_len;
1941 1949
1942 if (CEPH_HAVE_FEATURE(msg->con->peer_features, RESEND_ON_SPLIT)) { 1950 if (CEPH_HAVE_FEATURE(msg->con->peer_features, RESEND_ON_SPLIT)) {
1943 /* luminous OSD -- encode features and be done */ 1951 /* luminous OSD -- encode features and be done */
1944 p = end - 8; 1952 p = partial_end;
1945 ceph_encode_64(&p, msg->con->peer_features); 1953 ceph_encode_64(&p, msg->con->peer_features);
1946 } else { 1954 } else {
1947 struct { 1955 struct {
@@ -1984,7 +1992,7 @@ static void encode_request_finish(struct ceph_msg *msg)
1984 oid_len = p - oid; 1992 oid_len = p - oid;
1985 1993
1986 tail = p; 1994 tail = p;
1987 tail_len = (end - p) - 8; 1995 tail_len = partial_end - p;
1988 1996
1989 p = msg->front.iov_base; 1997 p = msg->front.iov_base;
1990 ceph_encode_copy(&p, &head.client_inc, sizeof(head.client_inc)); 1998 ceph_encode_copy(&p, &head.client_inc, sizeof(head.client_inc));
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index 64ae9f89773a..f358d0bfa76b 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -295,6 +295,10 @@ static int decode_choose_args(void **p, void *end, struct crush_map *c)
295 ret = decode_choose_arg(p, end, arg); 295 ret = decode_choose_arg(p, end, arg);
296 if (ret) 296 if (ret)
297 goto fail; 297 goto fail;
298
299 if (arg->ids_size &&
300 arg->ids_size != c->buckets[bucket_index]->size)
301 goto e_inval;
298 } 302 }
299 303
300 insert_choose_arg_map(&c->choose_args, arg_map); 304 insert_choose_arg_map(&c->choose_args, arg_map);
@@ -2078,6 +2082,8 @@ bool ceph_is_new_interval(const struct ceph_osds *old_acting,
2078 u32 new_pg_num, 2082 u32 new_pg_num,
2079 bool old_sort_bitwise, 2083 bool old_sort_bitwise,
2080 bool new_sort_bitwise, 2084 bool new_sort_bitwise,
2085 bool old_recovery_deletes,
2086 bool new_recovery_deletes,
2081 const struct ceph_pg *pgid) 2087 const struct ceph_pg *pgid)
2082{ 2088{
2083 return !osds_equal(old_acting, new_acting) || 2089 return !osds_equal(old_acting, new_acting) ||
@@ -2085,7 +2091,8 @@ bool ceph_is_new_interval(const struct ceph_osds *old_acting,
2085 old_size != new_size || 2091 old_size != new_size ||
2086 old_min_size != new_min_size || 2092 old_min_size != new_min_size ||
2087 ceph_pg_is_split(pgid, old_pg_num, new_pg_num) || 2093 ceph_pg_is_split(pgid, old_pg_num, new_pg_num) ||
2088 old_sort_bitwise != new_sort_bitwise; 2094 old_sort_bitwise != new_sort_bitwise ||
2095 old_recovery_deletes != new_recovery_deletes;
2089} 2096}
2090 2097
2091static int calc_pg_rank(int osd, const struct ceph_osds *acting) 2098static int calc_pg_rank(int osd, const struct ceph_osds *acting)
@@ -2301,10 +2308,17 @@ static u32 raw_pg_to_pps(struct ceph_pg_pool_info *pi,
2301 } 2308 }
2302} 2309}
2303 2310
2311/*
2312 * Magic value used for a "default" fallback choose_args, used if the
2313 * crush_choose_arg_map passed to do_crush() does not exist. If this
2314 * also doesn't exist, fall back to canonical weights.
2315 */
2316#define CEPH_DEFAULT_CHOOSE_ARGS -1
2317
2304static int do_crush(struct ceph_osdmap *map, int ruleno, int x, 2318static int do_crush(struct ceph_osdmap *map, int ruleno, int x,
2305 int *result, int result_max, 2319 int *result, int result_max,
2306 const __u32 *weight, int weight_max, 2320 const __u32 *weight, int weight_max,
2307 u64 choose_args_index) 2321 s64 choose_args_index)
2308{ 2322{
2309 struct crush_choose_arg_map *arg_map; 2323 struct crush_choose_arg_map *arg_map;
2310 int r; 2324 int r;
@@ -2313,6 +2327,9 @@ static int do_crush(struct ceph_osdmap *map, int ruleno, int x,
2313 2327
2314 arg_map = lookup_choose_arg_map(&map->crush->choose_args, 2328 arg_map = lookup_choose_arg_map(&map->crush->choose_args,
2315 choose_args_index); 2329 choose_args_index);
2330 if (!arg_map)
2331 arg_map = lookup_choose_arg_map(&map->crush->choose_args,
2332 CEPH_DEFAULT_CHOOSE_ARGS);
2316 2333
2317 mutex_lock(&map->crush_workspace_mutex); 2334 mutex_lock(&map->crush_workspace_mutex);
2318 r = crush_do_rule(map->crush, ruleno, x, result, result_max, 2335 r = crush_do_rule(map->crush, ruleno, x, result, result_max,
@@ -2423,40 +2440,23 @@ static void apply_upmap(struct ceph_osdmap *osdmap,
2423 for (i = 0; i < pg->pg_upmap.len; i++) 2440 for (i = 0; i < pg->pg_upmap.len; i++)
2424 raw->osds[i] = pg->pg_upmap.osds[i]; 2441 raw->osds[i] = pg->pg_upmap.osds[i];
2425 raw->size = pg->pg_upmap.len; 2442 raw->size = pg->pg_upmap.len;
2426 return; 2443 /* check and apply pg_upmap_items, if any */
2427 } 2444 }
2428 2445
2429 pg = lookup_pg_mapping(&osdmap->pg_upmap_items, pgid); 2446 pg = lookup_pg_mapping(&osdmap->pg_upmap_items, pgid);
2430 if (pg) { 2447 if (pg) {
2431 /* 2448 for (i = 0; i < raw->size; i++) {
2432 * Note: this approach does not allow a bidirectional swap, 2449 for (j = 0; j < pg->pg_upmap_items.len; j++) {
2433 * e.g., [[1,2],[2,1]] applied to [0,1,2] -> [0,2,1]. 2450 int from = pg->pg_upmap_items.from_to[j][0];
2434 */ 2451 int to = pg->pg_upmap_items.from_to[j][1];
2435 for (i = 0; i < pg->pg_upmap_items.len; i++) { 2452
2436 int from = pg->pg_upmap_items.from_to[i][0]; 2453 if (from == raw->osds[i]) {
2437 int to = pg->pg_upmap_items.from_to[i][1]; 2454 if (!(to != CRUSH_ITEM_NONE &&
2438 int pos = -1; 2455 to < osdmap->max_osd &&
2439 bool exists = false; 2456 osdmap->osd_weight[to] == 0))
2440 2457 raw->osds[i] = to;
2441 /* make sure replacement doesn't already appear */
2442 for (j = 0; j < raw->size; j++) {
2443 int osd = raw->osds[j];
2444
2445 if (osd == to) {
2446 exists = true;
2447 break; 2458 break;
2448 } 2459 }
2449 /* ignore mapping if target is marked out */
2450 if (osd == from && pos < 0 &&
2451 !(to != CRUSH_ITEM_NONE &&
2452 to < osdmap->max_osd &&
2453 osdmap->osd_weight[to] == 0)) {
2454 pos = j;
2455 }
2456 }
2457 if (!exists && pos >= 0) {
2458 raw->osds[pos] = to;
2459 return;
2460 } 2460 }
2461 } 2461 }
2462 } 2462 }
diff --git a/net/core/datagram.c b/net/core/datagram.c
index ee5647bd91b3..a21ca8dee5ea 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -169,14 +169,20 @@ struct sk_buff *__skb_try_recv_from_queue(struct sock *sk,
169 int *peeked, int *off, int *err, 169 int *peeked, int *off, int *err,
170 struct sk_buff **last) 170 struct sk_buff **last)
171{ 171{
172 bool peek_at_off = false;
172 struct sk_buff *skb; 173 struct sk_buff *skb;
173 int _off = *off; 174 int _off = 0;
175
176 if (unlikely(flags & MSG_PEEK && *off >= 0)) {
177 peek_at_off = true;
178 _off = *off;
179 }
174 180
175 *last = queue->prev; 181 *last = queue->prev;
176 skb_queue_walk(queue, skb) { 182 skb_queue_walk(queue, skb) {
177 if (flags & MSG_PEEK) { 183 if (flags & MSG_PEEK) {
178 if (_off >= skb->len && (skb->len || _off || 184 if (peek_at_off && _off >= skb->len &&
179 skb->peeked)) { 185 (_off || skb->peeked)) {
180 _off -= skb->len; 186 _off -= skb->len;
181 continue; 187 continue;
182 } 188 }
diff --git a/net/core/dev.c b/net/core/dev.c
index 8515f8fe0460..ce15a06d5558 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2739,7 +2739,7 @@ static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
2739{ 2739{
2740 if (tx_path) 2740 if (tx_path)
2741 return skb->ip_summed != CHECKSUM_PARTIAL && 2741 return skb->ip_summed != CHECKSUM_PARTIAL &&
2742 skb->ip_summed != CHECKSUM_NONE; 2742 skb->ip_summed != CHECKSUM_UNNECESSARY;
2743 2743
2744 return skb->ip_summed == CHECKSUM_NONE; 2744 return skb->ip_summed == CHECKSUM_NONE;
2745} 2745}
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index 06b147d7d9e2..709a4e6fb447 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -263,6 +263,8 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
263 return dev_set_mtu(dev, ifr->ifr_mtu); 263 return dev_set_mtu(dev, ifr->ifr_mtu);
264 264
265 case SIOCSIFHWADDR: 265 case SIOCSIFHWADDR:
266 if (dev->addr_len > sizeof(struct sockaddr))
267 return -EINVAL;
266 return dev_set_mac_address(dev, &ifr->ifr_hwaddr); 268 return dev_set_mac_address(dev, &ifr->ifr_hwaddr);
267 269
268 case SIOCSIFHWBROADCAST: 270 case SIOCSIFHWBROADCAST:
diff --git a/net/core/filter.c b/net/core/filter.c
index f44fc22fd45a..6280a602604c 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -3505,6 +3505,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
3505 bpf_target_off(struct sk_buff, tc_index, 2, 3505 bpf_target_off(struct sk_buff, tc_index, 2,
3506 target_size)); 3506 target_size));
3507#else 3507#else
3508 *target_size = 2;
3508 if (type == BPF_WRITE) 3509 if (type == BPF_WRITE)
3509 *insn++ = BPF_MOV64_REG(si->dst_reg, si->dst_reg); 3510 *insn++ = BPF_MOV64_REG(si->dst_reg, si->dst_reg);
3510 else 3511 else
@@ -3520,6 +3521,7 @@ static u32 bpf_convert_ctx_access(enum bpf_access_type type,
3520 *insn++ = BPF_JMP_IMM(BPF_JGE, si->dst_reg, MIN_NAPI_ID, 1); 3521 *insn++ = BPF_JMP_IMM(BPF_JGE, si->dst_reg, MIN_NAPI_ID, 1);
3521 *insn++ = BPF_MOV64_IMM(si->dst_reg, 0); 3522 *insn++ = BPF_MOV64_IMM(si->dst_reg, 0);
3522#else 3523#else
3524 *target_size = 4;
3523 *insn++ = BPF_MOV64_IMM(si->dst_reg, 0); 3525 *insn++ = BPF_MOV64_IMM(si->dst_reg, 0);
3524#endif 3526#endif
3525 break; 3527 break;
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 8357f164c660..912731bed7b7 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -666,7 +666,7 @@ int netpoll_setup(struct netpoll *np)
666 int err; 666 int err;
667 667
668 rtnl_lock(); 668 rtnl_lock();
669 if (np->dev_name) { 669 if (np->dev_name[0]) {
670 struct net *net = current->nsproxy->net_ns; 670 struct net *net = current->nsproxy->net_ns;
671 ndev = __dev_get_by_name(net, np->dev_name); 671 ndev = __dev_get_by_name(net, np->dev_name);
672 } 672 }
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index 1704948e6a12..f227f002c73d 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -1471,9 +1471,12 @@ int dccp_feat_init(struct sock *sk)
1471 * singleton values (which always leads to failure). 1471 * singleton values (which always leads to failure).
1472 * These settings can still (later) be overridden via sockopts. 1472 * These settings can still (later) be overridden via sockopts.
1473 */ 1473 */
1474 if (ccid_get_builtin_ccids(&tx.val, &tx.len) || 1474 if (ccid_get_builtin_ccids(&tx.val, &tx.len))
1475 ccid_get_builtin_ccids(&rx.val, &rx.len))
1476 return -ENOBUFS; 1475 return -ENOBUFS;
1476 if (ccid_get_builtin_ccids(&rx.val, &rx.len)) {
1477 kfree(tx.val);
1478 return -ENOBUFS;
1479 }
1477 1480
1478 if (!dccp_feat_prefer(sysctl_dccp_tx_ccid, tx.val, tx.len) || 1481 if (!dccp_feat_prefer(sysctl_dccp_tx_ccid, tx.val, tx.len) ||
1479 !dccp_feat_prefer(sysctl_dccp_rx_ccid, rx.val, rx.len)) 1482 !dccp_feat_prefer(sysctl_dccp_rx_ccid, rx.val, rx.len))
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index f85d901f4e3f..1b202f16531f 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -631,6 +631,7 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
631 goto drop_and_free; 631 goto drop_and_free;
632 632
633 inet_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT); 633 inet_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT);
634 reqsk_put(req);
634 return 0; 635 return 0;
635 636
636drop_and_free: 637drop_and_free:
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index c376af5bfdfb..1b58eac8aad3 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -380,6 +380,7 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
380 goto drop_and_free; 380 goto drop_and_free;
381 381
382 inet_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT); 382 inet_csk_reqsk_queue_hash_add(sk, req, DCCP_TIMEOUT_INIT);
383 reqsk_put(req);
383 return 0; 384 return 0;
384 385
385drop_and_free: 386drop_and_free:
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 9fe25bf63296..b68168fcc06a 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -24,6 +24,7 @@
24#include <net/checksum.h> 24#include <net/checksum.h>
25 25
26#include <net/inet_sock.h> 26#include <net/inet_sock.h>
27#include <net/inet_common.h>
27#include <net/sock.h> 28#include <net/sock.h>
28#include <net/xfrm.h> 29#include <net/xfrm.h>
29 30
@@ -170,6 +171,15 @@ const char *dccp_packet_name(const int type)
170 171
171EXPORT_SYMBOL_GPL(dccp_packet_name); 172EXPORT_SYMBOL_GPL(dccp_packet_name);
172 173
174static void dccp_sk_destruct(struct sock *sk)
175{
176 struct dccp_sock *dp = dccp_sk(sk);
177
178 ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk);
179 dp->dccps_hc_tx_ccid = NULL;
180 inet_sock_destruct(sk);
181}
182
173int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized) 183int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized)
174{ 184{
175 struct dccp_sock *dp = dccp_sk(sk); 185 struct dccp_sock *dp = dccp_sk(sk);
@@ -179,6 +189,7 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized)
179 icsk->icsk_syn_retries = sysctl_dccp_request_retries; 189 icsk->icsk_syn_retries = sysctl_dccp_request_retries;
180 sk->sk_state = DCCP_CLOSED; 190 sk->sk_state = DCCP_CLOSED;
181 sk->sk_write_space = dccp_write_space; 191 sk->sk_write_space = dccp_write_space;
192 sk->sk_destruct = dccp_sk_destruct;
182 icsk->icsk_sync_mss = dccp_sync_mss; 193 icsk->icsk_sync_mss = dccp_sync_mss;
183 dp->dccps_mss_cache = 536; 194 dp->dccps_mss_cache = 536;
184 dp->dccps_rate_last = jiffies; 195 dp->dccps_rate_last = jiffies;
@@ -201,10 +212,7 @@ void dccp_destroy_sock(struct sock *sk)
201{ 212{
202 struct dccp_sock *dp = dccp_sk(sk); 213 struct dccp_sock *dp = dccp_sk(sk);
203 214
204 /* 215 __skb_queue_purge(&sk->sk_write_queue);
205 * DCCP doesn't use sk_write_queue, just sk_send_head
206 * for retransmissions
207 */
208 if (sk->sk_send_head != NULL) { 216 if (sk->sk_send_head != NULL) {
209 kfree_skb(sk->sk_send_head); 217 kfree_skb(sk->sk_send_head);
210 sk->sk_send_head = NULL; 218 sk->sk_send_head = NULL;
@@ -222,8 +230,7 @@ void dccp_destroy_sock(struct sock *sk)
222 dp->dccps_hc_rx_ackvec = NULL; 230 dp->dccps_hc_rx_ackvec = NULL;
223 } 231 }
224 ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk); 232 ccid_hc_rx_delete(dp->dccps_hc_rx_ccid, sk);
225 ccid_hc_tx_delete(dp->dccps_hc_tx_ccid, sk); 233 dp->dccps_hc_rx_ccid = NULL;
226 dp->dccps_hc_rx_ccid = dp->dccps_hc_tx_ccid = NULL;
227 234
228 /* clean up feature negotiation state */ 235 /* clean up feature negotiation state */
229 dccp_feat_list_purge(&dp->dccps_featneg); 236 dccp_feat_list_purge(&dp->dccps_featneg);
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index 56e46090526b..c442051d5a55 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -509,21 +509,22 @@ static int dsa_cpu_parse(struct dsa_port *port, u32 index,
509 dst->cpu_dp->netdev = ethernet_dev; 509 dst->cpu_dp->netdev = ethernet_dev;
510 } 510 }
511 511
512 /* Initialize cpu_port_mask now for drv->setup()
513 * to have access to a correct value, just like what
514 * net/dsa/dsa.c::dsa_switch_setup_one does.
515 */
516 ds->cpu_port_mask |= BIT(index);
517
512 tag_protocol = ds->ops->get_tag_protocol(ds); 518 tag_protocol = ds->ops->get_tag_protocol(ds);
513 dst->tag_ops = dsa_resolve_tag_protocol(tag_protocol); 519 dst->tag_ops = dsa_resolve_tag_protocol(tag_protocol);
514 if (IS_ERR(dst->tag_ops)) { 520 if (IS_ERR(dst->tag_ops)) {
515 dev_warn(ds->dev, "No tagger for this switch\n"); 521 dev_warn(ds->dev, "No tagger for this switch\n");
522 ds->cpu_port_mask &= ~BIT(index);
516 return PTR_ERR(dst->tag_ops); 523 return PTR_ERR(dst->tag_ops);
517 } 524 }
518 525
519 dst->rcv = dst->tag_ops->rcv; 526 dst->rcv = dst->tag_ops->rcv;
520 527
521 /* Initialize cpu_port_mask now for drv->setup()
522 * to have access to a correct value, just like what
523 * net/dsa/dsa.c::dsa_switch_setup_one does.
524 */
525 ds->cpu_port_mask |= BIT(index);
526
527 return 0; 528 return 0;
528} 529}
529 530
diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c
index fab41de8e983..de66ca8e6201 100644
--- a/net/dsa/tag_ksz.c
+++ b/net/dsa/tag_ksz.c
@@ -42,6 +42,9 @@ static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev)
42 padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len; 42 padlen = (skb->len >= ETH_ZLEN) ? 0 : ETH_ZLEN - skb->len;
43 43
44 if (skb_tailroom(skb) >= padlen + KSZ_INGRESS_TAG_LEN) { 44 if (skb_tailroom(skb) >= padlen + KSZ_INGRESS_TAG_LEN) {
45 if (skb_put_padto(skb, skb->len + padlen))
46 return NULL;
47
45 nskb = skb; 48 nskb = skb;
46 } else { 49 } else {
47 nskb = alloc_skb(NET_IP_ALIGN + skb->len + 50 nskb = alloc_skb(NET_IP_ALIGN + skb->len +
@@ -56,13 +59,15 @@ static struct sk_buff *ksz_xmit(struct sk_buff *skb, struct net_device *dev)
56 skb_set_transport_header(nskb, 59 skb_set_transport_header(nskb,
57 skb_transport_header(skb) - skb->head); 60 skb_transport_header(skb) - skb->head);
58 skb_copy_and_csum_dev(skb, skb_put(nskb, skb->len)); 61 skb_copy_and_csum_dev(skb, skb_put(nskb, skb->len));
62
63 if (skb_put_padto(nskb, nskb->len + padlen)) {
64 kfree_skb(nskb);
65 return NULL;
66 }
67
59 kfree_skb(skb); 68 kfree_skb(skb);
60 } 69 }
61 70
62 /* skb is freed when it fails */
63 if (skb_put_padto(nskb, nskb->len + padlen))
64 return NULL;
65
66 tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN); 71 tag = skb_put(nskb, KSZ_INGRESS_TAG_LEN);
67 tag[0] = 0; 72 tag[0] = 0;
68 tag[1] = 1 << p->dp->index; /* destination port */ 73 tag[1] = 1 << p->dp->index; /* destination port */
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 76c2077c3f5b..2e548eca3489 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1731,6 +1731,13 @@ static __net_init int inet_init_net(struct net *net)
1731 net->ipv4.sysctl_ip_prot_sock = PROT_SOCK; 1731 net->ipv4.sysctl_ip_prot_sock = PROT_SOCK;
1732#endif 1732#endif
1733 1733
1734 /* Some igmp sysctl, whose values are always used */
1735 net->ipv4.sysctl_igmp_max_memberships = 20;
1736 net->ipv4.sysctl_igmp_max_msf = 10;
1737 /* IGMP reports for link-local multicast groups are enabled by default */
1738 net->ipv4.sysctl_igmp_llm_reports = 1;
1739 net->ipv4.sysctl_igmp_qrv = 2;
1740
1734 return 0; 1741 return 0;
1735} 1742}
1736 1743
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c
index c4c6e1969ed0..2ae8f54cb321 100644
--- a/net/ipv4/cipso_ipv4.c
+++ b/net/ipv4/cipso_ipv4.c
@@ -1523,9 +1523,17 @@ unsigned char *cipso_v4_optptr(const struct sk_buff *skb)
1523 int taglen; 1523 int taglen;
1524 1524
1525 for (optlen = iph->ihl*4 - sizeof(struct iphdr); optlen > 0; ) { 1525 for (optlen = iph->ihl*4 - sizeof(struct iphdr); optlen > 0; ) {
1526 if (optptr[0] == IPOPT_CIPSO) 1526 switch (optptr[0]) {
1527 case IPOPT_CIPSO:
1527 return optptr; 1528 return optptr;
1528 taglen = optptr[1]; 1529 case IPOPT_END:
1530 return NULL;
1531 case IPOPT_NOOP:
1532 taglen = 1;
1533 break;
1534 default:
1535 taglen = optptr[1];
1536 }
1529 optlen -= taglen; 1537 optlen -= taglen;
1530 optptr += taglen; 1538 optptr += taglen;
1531 } 1539 }
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 222100103808..ec3a9ce281a6 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -1083,15 +1083,17 @@ struct fib_info *fib_create_info(struct fib_config *cfg,
1083 fi = kzalloc(sizeof(*fi)+nhs*sizeof(struct fib_nh), GFP_KERNEL); 1083 fi = kzalloc(sizeof(*fi)+nhs*sizeof(struct fib_nh), GFP_KERNEL);
1084 if (!fi) 1084 if (!fi)
1085 goto failure; 1085 goto failure;
1086 fib_info_cnt++;
1087 if (cfg->fc_mx) { 1086 if (cfg->fc_mx) {
1088 fi->fib_metrics = kzalloc(sizeof(*fi->fib_metrics), GFP_KERNEL); 1087 fi->fib_metrics = kzalloc(sizeof(*fi->fib_metrics), GFP_KERNEL);
1089 if (!fi->fib_metrics) 1088 if (unlikely(!fi->fib_metrics)) {
1090 goto failure; 1089 kfree(fi);
1090 return ERR_PTR(err);
1091 }
1091 atomic_set(&fi->fib_metrics->refcnt, 1); 1092 atomic_set(&fi->fib_metrics->refcnt, 1);
1092 } else 1093 } else {
1093 fi->fib_metrics = (struct dst_metrics *)&dst_default_metrics; 1094 fi->fib_metrics = (struct dst_metrics *)&dst_default_metrics;
1094 1095 }
1096 fib_info_cnt++;
1095 fi->fib_net = net; 1097 fi->fib_net = net;
1096 fi->fib_protocol = cfg->fc_protocol; 1098 fi->fib_protocol = cfg->fc_protocol;
1097 fi->fib_scope = cfg->fc_scope; 1099 fi->fib_scope = cfg->fc_scope;
@@ -1452,7 +1454,7 @@ static int call_fib_nh_notifiers(struct fib_nh *fib_nh,
1452 return call_fib_notifiers(dev_net(fib_nh->nh_dev), event_type, 1454 return call_fib_notifiers(dev_net(fib_nh->nh_dev), event_type,
1453 &info.info); 1455 &info.info);
1454 case FIB_EVENT_NH_DEL: 1456 case FIB_EVENT_NH_DEL:
1455 if ((IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN(in_dev) && 1457 if ((in_dev && IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN(in_dev) &&
1456 fib_nh->nh_flags & RTNH_F_LINKDOWN) || 1458 fib_nh->nh_flags & RTNH_F_LINKDOWN) ||
1457 (fib_nh->nh_flags & RTNH_F_DEAD)) 1459 (fib_nh->nh_flags & RTNH_F_DEAD))
1458 return call_fib_notifiers(dev_net(fib_nh->nh_dev), 1460 return call_fib_notifiers(dev_net(fib_nh->nh_dev),
diff --git a/net/ipv4/fou.c b/net/ipv4/fou.c
index 8e0257d01200..1540db65241a 100644
--- a/net/ipv4/fou.c
+++ b/net/ipv4/fou.c
@@ -450,6 +450,7 @@ out_unlock:
450out: 450out:
451 NAPI_GRO_CB(skb)->flush |= flush; 451 NAPI_GRO_CB(skb)->flush |= flush;
452 skb_gro_remcsum_cleanup(skb, &grc); 452 skb_gro_remcsum_cleanup(skb, &grc);
453 skb->remcsum_offload = 0;
453 454
454 return pp; 455 return pp;
455} 456}
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 28f14afd0dd3..caf2f1101d02 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -1007,10 +1007,18 @@ int igmp_rcv(struct sk_buff *skb)
1007{ 1007{
1008 /* This basically follows the spec line by line -- see RFC1112 */ 1008 /* This basically follows the spec line by line -- see RFC1112 */
1009 struct igmphdr *ih; 1009 struct igmphdr *ih;
1010 struct in_device *in_dev = __in_dev_get_rcu(skb->dev); 1010 struct net_device *dev = skb->dev;
1011 struct in_device *in_dev;
1011 int len = skb->len; 1012 int len = skb->len;
1012 bool dropped = true; 1013 bool dropped = true;
1013 1014
1015 if (netif_is_l3_master(dev)) {
1016 dev = dev_get_by_index_rcu(dev_net(dev), IPCB(skb)->iif);
1017 if (!dev)
1018 goto drop;
1019 }
1020
1021 in_dev = __in_dev_get_rcu(dev);
1014 if (!in_dev) 1022 if (!in_dev)
1015 goto drop; 1023 goto drop;
1016 1024
@@ -2974,12 +2982,6 @@ static int __net_init igmp_net_init(struct net *net)
2974 goto out_sock; 2982 goto out_sock;
2975 } 2983 }
2976 2984
2977 /* Sysctl initialization */
2978 net->ipv4.sysctl_igmp_max_memberships = 20;
2979 net->ipv4.sysctl_igmp_max_msf = 10;
2980 /* IGMP reports for link-local multicast groups are enabled by default */
2981 net->ipv4.sysctl_igmp_llm_reports = 1;
2982 net->ipv4.sysctl_igmp_qrv = 2;
2983 return 0; 2985 return 0;
2984 2986
2985out_sock: 2987out_sock:
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 50c74cd890bc..e153c40c2436 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -965,11 +965,12 @@ static int __ip_append_data(struct sock *sk,
965 csummode = CHECKSUM_PARTIAL; 965 csummode = CHECKSUM_PARTIAL;
966 966
967 cork->length += length; 967 cork->length += length;
968 if ((((length + (skb ? skb->len : fragheaderlen)) > mtu) || 968 if ((skb && skb_is_gso(skb)) ||
969 (skb && skb_is_gso(skb))) && 969 (((length + (skb ? skb->len : fragheaderlen)) > mtu) &&
970 (skb_queue_len(queue) <= 1) &&
970 (sk->sk_protocol == IPPROTO_UDP) && 971 (sk->sk_protocol == IPPROTO_UDP) &&
971 (rt->dst.dev->features & NETIF_F_UFO) && !dst_xfrm(&rt->dst) && 972 (rt->dst.dev->features & NETIF_F_UFO) && !dst_xfrm(&rt->dst) &&
972 (sk->sk_type == SOCK_DGRAM) && !sk->sk_no_check_tx) { 973 (sk->sk_type == SOCK_DGRAM) && !sk->sk_no_check_tx)) {
973 err = ip_ufo_append_data(sk, queue, getfrag, from, length, 974 err = ip_ufo_append_data(sk, queue, getfrag, from, length,
974 hh_len, fragheaderlen, transhdrlen, 975 hh_len, fragheaderlen, transhdrlen,
975 maxfraglen, flags); 976 maxfraglen, flags);
@@ -1288,6 +1289,7 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page,
1288 return -EINVAL; 1289 return -EINVAL;
1289 1290
1290 if ((size + skb->len > mtu) && 1291 if ((size + skb->len > mtu) &&
1292 (skb_queue_len(&sk->sk_write_queue) == 1) &&
1291 (sk->sk_protocol == IPPROTO_UDP) && 1293 (sk->sk_protocol == IPPROTO_UDP) &&
1292 (rt->dst.dev->features & NETIF_F_UFO)) { 1294 (rt->dst.dev->features & NETIF_F_UFO)) {
1293 if (skb->ip_summed != CHECKSUM_PARTIAL) 1295 if (skb->ip_summed != CHECKSUM_PARTIAL)
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 0383e66f59bc..2331de20ca50 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1267,7 +1267,7 @@ static unsigned int ipv4_mtu(const struct dst_entry *dst)
1267 if (mtu) 1267 if (mtu)
1268 return mtu; 1268 return mtu;
1269 1269
1270 mtu = dst->dev->mtu; 1270 mtu = READ_ONCE(dst->dev->mtu);
1271 1271
1272 if (unlikely(dst_metric_locked(dst, RTAX_MTU))) { 1272 if (unlikely(dst_metric_locked(dst, RTAX_MTU))) {
1273 if (rt->rt_uses_gateway && mtu > 576) 1273 if (rt->rt_uses_gateway && mtu > 576)
@@ -2750,26 +2750,34 @@ static int inet_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh,
2750 err = 0; 2750 err = 0;
2751 if (IS_ERR(rt)) 2751 if (IS_ERR(rt))
2752 err = PTR_ERR(rt); 2752 err = PTR_ERR(rt);
2753 else
2754 skb_dst_set(skb, &rt->dst);
2753 } 2755 }
2754 2756
2755 if (err) 2757 if (err)
2756 goto errout_free; 2758 goto errout_free;
2757 2759
2758 skb_dst_set(skb, &rt->dst);
2759 if (rtm->rtm_flags & RTM_F_NOTIFY) 2760 if (rtm->rtm_flags & RTM_F_NOTIFY)
2760 rt->rt_flags |= RTCF_NOTIFY; 2761 rt->rt_flags |= RTCF_NOTIFY;
2761 2762
2762 if (rtm->rtm_flags & RTM_F_LOOKUP_TABLE) 2763 if (rtm->rtm_flags & RTM_F_LOOKUP_TABLE)
2763 table_id = rt->rt_table_id; 2764 table_id = rt->rt_table_id;
2764 2765
2765 if (rtm->rtm_flags & RTM_F_FIB_MATCH) 2766 if (rtm->rtm_flags & RTM_F_FIB_MATCH) {
2767 if (!res.fi) {
2768 err = fib_props[res.type].error;
2769 if (!err)
2770 err = -EHOSTUNREACH;
2771 goto errout_free;
2772 }
2766 err = fib_dump_info(skb, NETLINK_CB(in_skb).portid, 2773 err = fib_dump_info(skb, NETLINK_CB(in_skb).portid,
2767 nlh->nlmsg_seq, RTM_NEWROUTE, table_id, 2774 nlh->nlmsg_seq, RTM_NEWROUTE, table_id,
2768 rt->rt_type, res.prefix, res.prefixlen, 2775 rt->rt_type, res.prefix, res.prefixlen,
2769 fl4.flowi4_tos, res.fi, 0); 2776 fl4.flowi4_tos, res.fi, 0);
2770 else 2777 } else {
2771 err = rt_fill_info(net, dst, src, table_id, &fl4, skb, 2778 err = rt_fill_info(net, dst, src, table_id, &fl4, skb,
2772 NETLINK_CB(in_skb).portid, nlh->nlmsg_seq); 2779 NETLINK_CB(in_skb).portid, nlh->nlmsg_seq);
2780 }
2773 if (err < 0) 2781 if (err < 0)
2774 goto errout_free; 2782 goto errout_free;
2775 2783
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 2920e0cb09f8..bab7f0493098 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -107,6 +107,7 @@ int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2;
107#define FLAG_ORIG_SACK_ACKED 0x200 /* Never retransmitted data are (s)acked */ 107#define FLAG_ORIG_SACK_ACKED 0x200 /* Never retransmitted data are (s)acked */
108#define FLAG_SND_UNA_ADVANCED 0x400 /* Snd_una was changed (!= FLAG_DATA_ACKED) */ 108#define FLAG_SND_UNA_ADVANCED 0x400 /* Snd_una was changed (!= FLAG_DATA_ACKED) */
109#define FLAG_DSACKING_ACK 0x800 /* SACK blocks contained D-SACK info */ 109#define FLAG_DSACKING_ACK 0x800 /* SACK blocks contained D-SACK info */
110#define FLAG_SET_XMIT_TIMER 0x1000 /* Set TLP or RTO timer */
110#define FLAG_SACK_RENEGING 0x2000 /* snd_una advanced to a sacked seq */ 111#define FLAG_SACK_RENEGING 0x2000 /* snd_una advanced to a sacked seq */
111#define FLAG_UPDATE_TS_RECENT 0x4000 /* tcp_replace_ts_recent() */ 112#define FLAG_UPDATE_TS_RECENT 0x4000 /* tcp_replace_ts_recent() */
112#define FLAG_NO_CHALLENGE_ACK 0x8000 /* do not call tcp_send_challenge_ack() */ 113#define FLAG_NO_CHALLENGE_ACK 0x8000 /* do not call tcp_send_challenge_ack() */
@@ -2520,8 +2521,8 @@ static inline void tcp_end_cwnd_reduction(struct sock *sk)
2520 return; 2521 return;
2521 2522
2522 /* Reset cwnd to ssthresh in CWR or Recovery (unless it's undone) */ 2523 /* Reset cwnd to ssthresh in CWR or Recovery (unless it's undone) */
2523 if (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR || 2524 if (tp->snd_ssthresh < TCP_INFINITE_SSTHRESH &&
2524 (tp->undo_marker && tp->snd_ssthresh < TCP_INFINITE_SSTHRESH)) { 2525 (inet_csk(sk)->icsk_ca_state == TCP_CA_CWR || tp->undo_marker)) {
2525 tp->snd_cwnd = tp->snd_ssthresh; 2526 tp->snd_cwnd = tp->snd_ssthresh;
2526 tp->snd_cwnd_stamp = tcp_jiffies32; 2527 tp->snd_cwnd_stamp = tcp_jiffies32;
2527 } 2528 }
@@ -3004,21 +3005,24 @@ void tcp_rearm_rto(struct sock *sk)
3004 /* Offset the time elapsed after installing regular RTO */ 3005 /* Offset the time elapsed after installing regular RTO */
3005 if (icsk->icsk_pending == ICSK_TIME_REO_TIMEOUT || 3006 if (icsk->icsk_pending == ICSK_TIME_REO_TIMEOUT ||
3006 icsk->icsk_pending == ICSK_TIME_LOSS_PROBE) { 3007 icsk->icsk_pending == ICSK_TIME_LOSS_PROBE) {
3007 struct sk_buff *skb = tcp_write_queue_head(sk); 3008 s64 delta_us = tcp_rto_delta_us(sk);
3008 u64 rto_time_stamp = skb->skb_mstamp +
3009 jiffies_to_usecs(rto);
3010 s64 delta_us = rto_time_stamp - tp->tcp_mstamp;
3011 /* delta_us may not be positive if the socket is locked 3009 /* delta_us may not be positive if the socket is locked
3012 * when the retrans timer fires and is rescheduled. 3010 * when the retrans timer fires and is rescheduled.
3013 */ 3011 */
3014 if (delta_us > 0) 3012 rto = usecs_to_jiffies(max_t(int, delta_us, 1));
3015 rto = usecs_to_jiffies(delta_us);
3016 } 3013 }
3017 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, rto, 3014 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS, rto,
3018 TCP_RTO_MAX); 3015 TCP_RTO_MAX);
3019 } 3016 }
3020} 3017}
3021 3018
3019/* Try to schedule a loss probe; if that doesn't work, then schedule an RTO. */
3020static void tcp_set_xmit_timer(struct sock *sk)
3021{
3022 if (!tcp_schedule_loss_probe(sk))
3023 tcp_rearm_rto(sk);
3024}
3025
3022/* If we get here, the whole TSO packet has not been acked. */ 3026/* If we get here, the whole TSO packet has not been acked. */
3023static u32 tcp_tso_acked(struct sock *sk, struct sk_buff *skb) 3027static u32 tcp_tso_acked(struct sock *sk, struct sk_buff *skb)
3024{ 3028{
@@ -3180,7 +3184,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
3180 ca_rtt_us, sack->rate); 3184 ca_rtt_us, sack->rate);
3181 3185
3182 if (flag & FLAG_ACKED) { 3186 if (flag & FLAG_ACKED) {
3183 tcp_rearm_rto(sk); 3187 flag |= FLAG_SET_XMIT_TIMER; /* set TLP or RTO timer */
3184 if (unlikely(icsk->icsk_mtup.probe_size && 3188 if (unlikely(icsk->icsk_mtup.probe_size &&
3185 !after(tp->mtu_probe.probe_seq_end, tp->snd_una))) { 3189 !after(tp->mtu_probe.probe_seq_end, tp->snd_una))) {
3186 tcp_mtup_probe_success(sk); 3190 tcp_mtup_probe_success(sk);
@@ -3208,7 +3212,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets,
3208 * after when the head was last (re)transmitted. Otherwise the 3212 * after when the head was last (re)transmitted. Otherwise the
3209 * timeout may continue to extend in loss recovery. 3213 * timeout may continue to extend in loss recovery.
3210 */ 3214 */
3211 tcp_rearm_rto(sk); 3215 flag |= FLAG_SET_XMIT_TIMER; /* set TLP or RTO timer */
3212 } 3216 }
3213 3217
3214 if (icsk->icsk_ca_ops->pkts_acked) { 3218 if (icsk->icsk_ca_ops->pkts_acked) {
@@ -3580,9 +3584,6 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
3580 if (after(ack, tp->snd_nxt)) 3584 if (after(ack, tp->snd_nxt))
3581 goto invalid_ack; 3585 goto invalid_ack;
3582 3586
3583 if (icsk->icsk_pending == ICSK_TIME_LOSS_PROBE)
3584 tcp_rearm_rto(sk);
3585
3586 if (after(ack, prior_snd_una)) { 3587 if (after(ack, prior_snd_una)) {
3587 flag |= FLAG_SND_UNA_ADVANCED; 3588 flag |= FLAG_SND_UNA_ADVANCED;
3588 icsk->icsk_retransmits = 0; 3589 icsk->icsk_retransmits = 0;
@@ -3647,18 +3648,20 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
3647 flag |= tcp_clean_rtx_queue(sk, prior_fackets, prior_snd_una, &acked, 3648 flag |= tcp_clean_rtx_queue(sk, prior_fackets, prior_snd_una, &acked,
3648 &sack_state); 3649 &sack_state);
3649 3650
3651 if (tp->tlp_high_seq)
3652 tcp_process_tlp_ack(sk, ack, flag);
3653 /* If needed, reset TLP/RTO timer; RACK may later override this. */
3654 if (flag & FLAG_SET_XMIT_TIMER)
3655 tcp_set_xmit_timer(sk);
3656
3650 if (tcp_ack_is_dubious(sk, flag)) { 3657 if (tcp_ack_is_dubious(sk, flag)) {
3651 is_dupack = !(flag & (FLAG_SND_UNA_ADVANCED | FLAG_NOT_DUP)); 3658 is_dupack = !(flag & (FLAG_SND_UNA_ADVANCED | FLAG_NOT_DUP));
3652 tcp_fastretrans_alert(sk, acked, is_dupack, &flag, &rexmit); 3659 tcp_fastretrans_alert(sk, acked, is_dupack, &flag, &rexmit);
3653 } 3660 }
3654 if (tp->tlp_high_seq)
3655 tcp_process_tlp_ack(sk, ack, flag);
3656 3661
3657 if ((flag & FLAG_FORWARD_PROGRESS) || !(flag & FLAG_NOT_DUP)) 3662 if ((flag & FLAG_FORWARD_PROGRESS) || !(flag & FLAG_NOT_DUP))
3658 sk_dst_confirm(sk); 3663 sk_dst_confirm(sk);
3659 3664
3660 if (icsk->icsk_pending == ICSK_TIME_RETRANS)
3661 tcp_schedule_loss_probe(sk);
3662 delivered = tp->delivered - delivered; /* freshly ACKed or SACKed */ 3665 delivered = tp->delivered - delivered; /* freshly ACKed or SACKed */
3663 lost = tp->lost - lost; /* freshly marked lost */ 3666 lost = tp->lost - lost; /* freshly marked lost */
3664 tcp_rate_gen(sk, delivered, lost, sack_state.rate); 3667 tcp_rate_gen(sk, delivered, lost, sack_state.rate);
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index a20e7f03d5f7..e9252c7df809 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1722,6 +1722,8 @@ process:
1722 */ 1722 */
1723 sock_hold(sk); 1723 sock_hold(sk);
1724 refcounted = true; 1724 refcounted = true;
1725 if (tcp_filter(sk, skb))
1726 goto discard_and_relse;
1725 nsk = tcp_check_req(sk, skb, req, false); 1727 nsk = tcp_check_req(sk, skb, req, false);
1726 if (!nsk) { 1728 if (!nsk) {
1727 reqsk_put(req); 1729 reqsk_put(req);
@@ -1729,8 +1731,6 @@ process:
1729 } 1731 }
1730 if (nsk == sk) { 1732 if (nsk == sk) {
1731 reqsk_put(req); 1733 reqsk_put(req);
1732 } else if (tcp_filter(sk, skb)) {
1733 goto discard_and_relse;
1734 } else if (tcp_child_process(sk, nsk, skb)) { 1734 } else if (tcp_child_process(sk, nsk, skb)) {
1735 tcp_v4_send_reset(nsk, skb); 1735 tcp_v4_send_reset(nsk, skb);
1736 goto discard_and_relse; 1736 goto discard_and_relse;
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 4e985dea1dd2..b7661a68d498 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2202,9 +2202,10 @@ static bool tcp_small_queue_check(struct sock *sk, const struct sk_buff *skb,
2202static void tcp_chrono_set(struct tcp_sock *tp, const enum tcp_chrono new) 2202static void tcp_chrono_set(struct tcp_sock *tp, const enum tcp_chrono new)
2203{ 2203{
2204 const u32 now = tcp_jiffies32; 2204 const u32 now = tcp_jiffies32;
2205 enum tcp_chrono old = tp->chrono_type;
2205 2206
2206 if (tp->chrono_type > TCP_CHRONO_UNSPEC) 2207 if (old > TCP_CHRONO_UNSPEC)
2207 tp->chrono_stat[tp->chrono_type - 1] += now - tp->chrono_start; 2208 tp->chrono_stat[old - 1] += now - tp->chrono_start;
2208 tp->chrono_start = now; 2209 tp->chrono_start = now;
2209 tp->chrono_type = new; 2210 tp->chrono_type = new;
2210} 2211}
@@ -2376,24 +2377,15 @@ bool tcp_schedule_loss_probe(struct sock *sk)
2376{ 2377{
2377 struct inet_connection_sock *icsk = inet_csk(sk); 2378 struct inet_connection_sock *icsk = inet_csk(sk);
2378 struct tcp_sock *tp = tcp_sk(sk); 2379 struct tcp_sock *tp = tcp_sk(sk);
2379 u32 timeout, tlp_time_stamp, rto_time_stamp;
2380 u32 rtt = usecs_to_jiffies(tp->srtt_us >> 3); 2380 u32 rtt = usecs_to_jiffies(tp->srtt_us >> 3);
2381 u32 timeout, rto_delta_us;
2381 2382
2382 /* No consecutive loss probes. */
2383 if (WARN_ON(icsk->icsk_pending == ICSK_TIME_LOSS_PROBE)) {
2384 tcp_rearm_rto(sk);
2385 return false;
2386 }
2387 /* Don't do any loss probe on a Fast Open connection before 3WHS 2383 /* Don't do any loss probe on a Fast Open connection before 3WHS
2388 * finishes. 2384 * finishes.
2389 */ 2385 */
2390 if (tp->fastopen_rsk) 2386 if (tp->fastopen_rsk)
2391 return false; 2387 return false;
2392 2388
2393 /* TLP is only scheduled when next timer event is RTO. */
2394 if (icsk->icsk_pending != ICSK_TIME_RETRANS)
2395 return false;
2396
2397 /* Schedule a loss probe in 2*RTT for SACK capable connections 2389 /* Schedule a loss probe in 2*RTT for SACK capable connections
2398 * in Open state, that are either limited by cwnd or application. 2390 * in Open state, that are either limited by cwnd or application.
2399 */ 2391 */
@@ -2416,14 +2408,10 @@ bool tcp_schedule_loss_probe(struct sock *sk)
2416 (rtt + (rtt >> 1) + TCP_DELACK_MAX)); 2408 (rtt + (rtt >> 1) + TCP_DELACK_MAX));
2417 timeout = max_t(u32, timeout, msecs_to_jiffies(10)); 2409 timeout = max_t(u32, timeout, msecs_to_jiffies(10));
2418 2410
2419 /* If RTO is shorter, just schedule TLP in its place. */ 2411 /* If the RTO formula yields an earlier time, then use that time. */
2420 tlp_time_stamp = tcp_jiffies32 + timeout; 2412 rto_delta_us = tcp_rto_delta_us(sk); /* How far in future is RTO? */
2421 rto_time_stamp = (u32)inet_csk(sk)->icsk_timeout; 2413 if (rto_delta_us > 0)
2422 if ((s32)(tlp_time_stamp - rto_time_stamp) > 0) { 2414 timeout = min_t(u32, timeout, usecs_to_jiffies(rto_delta_us));
2423 s32 delta = rto_time_stamp - tcp_jiffies32;
2424 if (delta > 0)
2425 timeout = delta;
2426 }
2427 2415
2428 inet_csk_reset_xmit_timer(sk, ICSK_TIME_LOSS_PROBE, timeout, 2416 inet_csk_reset_xmit_timer(sk, ICSK_TIME_LOSS_PROBE, timeout,
2429 TCP_RTO_MAX); 2417 TCP_RTO_MAX);
@@ -3448,6 +3436,10 @@ int tcp_connect(struct sock *sk)
3448 int err; 3436 int err;
3449 3437
3450 tcp_call_bpf(sk, BPF_SOCK_OPS_TCP_CONNECT_CB); 3438 tcp_call_bpf(sk, BPF_SOCK_OPS_TCP_CONNECT_CB);
3439
3440 if (inet_csk(sk)->icsk_af_ops->rebuild_header(sk))
3441 return -EHOSTUNREACH; /* Routing failure or similar. */
3442
3451 tcp_connect_init(sk); 3443 tcp_connect_init(sk);
3452 3444
3453 if (unlikely(tp->repair)) { 3445 if (unlikely(tp->repair)) {
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index c0feeeef962a..e906014890b6 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -652,7 +652,8 @@ static void tcp_keepalive_timer (unsigned long data)
652 goto death; 652 goto death;
653 } 653 }
654 654
655 if (!sock_flag(sk, SOCK_KEEPOPEN) || sk->sk_state == TCP_CLOSE) 655 if (!sock_flag(sk, SOCK_KEEPOPEN) ||
656 ((1 << sk->sk_state) & (TCPF_CLOSE | TCPF_SYN_SENT)))
656 goto out; 657 goto out;
657 658
658 elapsed = keepalive_time_when(tp); 659 elapsed = keepalive_time_when(tp);
diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c
index 2417f55374c5..6bb9e14c710a 100644
--- a/net/ipv4/tcp_ulp.c
+++ b/net/ipv4/tcp_ulp.c
@@ -122,14 +122,14 @@ int tcp_set_ulp(struct sock *sk, const char *name)
122 122
123 ulp_ops = __tcp_ulp_find_autoload(name); 123 ulp_ops = __tcp_ulp_find_autoload(name);
124 if (!ulp_ops) 124 if (!ulp_ops)
125 err = -ENOENT; 125 return -ENOENT;
126 else
127 err = ulp_ops->init(sk);
128 126
129 if (err) 127 err = ulp_ops->init(sk);
130 goto out; 128 if (err) {
129 module_put(ulp_ops->owner);
130 return err;
131 }
131 132
132 icsk->icsk_ulp_ops = ulp_ops; 133 icsk->icsk_ulp_ops = ulp_ops;
133 out: 134 return 0;
134 return err;
135} 135}
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index b057653ceca9..cd1d044a7fa5 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -802,7 +802,7 @@ static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4)
802 if (is_udplite) /* UDP-Lite */ 802 if (is_udplite) /* UDP-Lite */
803 csum = udplite_csum(skb); 803 csum = udplite_csum(skb);
804 804
805 else if (sk->sk_no_check_tx) { /* UDP csum disabled */ 805 else if (sk->sk_no_check_tx && !skb_is_gso(skb)) { /* UDP csum off */
806 806
807 skb->ip_summed = CHECKSUM_NONE; 807 skb->ip_summed = CHECKSUM_NONE;
808 goto send; 808 goto send;
@@ -1163,34 +1163,32 @@ out:
1163 return ret; 1163 return ret;
1164} 1164}
1165 1165
1166#if BITS_PER_LONG == 64 1166#define UDP_SKB_IS_STATELESS 0x80000000
1167
1167static void udp_set_dev_scratch(struct sk_buff *skb) 1168static void udp_set_dev_scratch(struct sk_buff *skb)
1168{ 1169{
1169 struct udp_dev_scratch *scratch; 1170 struct udp_dev_scratch *scratch = udp_skb_scratch(skb);
1170 1171
1171 BUILD_BUG_ON(sizeof(struct udp_dev_scratch) > sizeof(long)); 1172 BUILD_BUG_ON(sizeof(struct udp_dev_scratch) > sizeof(long));
1172 scratch = (struct udp_dev_scratch *)&skb->dev_scratch; 1173 scratch->_tsize_state = skb->truesize;
1173 scratch->truesize = skb->truesize; 1174#if BITS_PER_LONG == 64
1174 scratch->len = skb->len; 1175 scratch->len = skb->len;
1175 scratch->csum_unnecessary = !!skb_csum_unnecessary(skb); 1176 scratch->csum_unnecessary = !!skb_csum_unnecessary(skb);
1176 scratch->is_linear = !skb_is_nonlinear(skb); 1177 scratch->is_linear = !skb_is_nonlinear(skb);
1178#endif
1179 if (likely(!skb->_skb_refdst))
1180 scratch->_tsize_state |= UDP_SKB_IS_STATELESS;
1177} 1181}
1178 1182
1179static int udp_skb_truesize(struct sk_buff *skb) 1183static int udp_skb_truesize(struct sk_buff *skb)
1180{ 1184{
1181 return ((struct udp_dev_scratch *)&skb->dev_scratch)->truesize; 1185 return udp_skb_scratch(skb)->_tsize_state & ~UDP_SKB_IS_STATELESS;
1182}
1183#else
1184static void udp_set_dev_scratch(struct sk_buff *skb)
1185{
1186 skb->dev_scratch = skb->truesize;
1187} 1186}
1188 1187
1189static int udp_skb_truesize(struct sk_buff *skb) 1188static bool udp_skb_has_head_state(struct sk_buff *skb)
1190{ 1189{
1191 return skb->dev_scratch; 1190 return !(udp_skb_scratch(skb)->_tsize_state & UDP_SKB_IS_STATELESS);
1192} 1191}
1193#endif
1194 1192
1195/* fully reclaim rmem/fwd memory allocated for skb */ 1193/* fully reclaim rmem/fwd memory allocated for skb */
1196static void udp_rmem_release(struct sock *sk, int size, int partial, 1194static void udp_rmem_release(struct sock *sk, int size, int partial,
@@ -1388,10 +1386,10 @@ void skb_consume_udp(struct sock *sk, struct sk_buff *skb, int len)
1388 unlock_sock_fast(sk, slow); 1386 unlock_sock_fast(sk, slow);
1389 } 1387 }
1390 1388
1391 /* we cleared the head states previously only if the skb lacks any IP 1389 /* In the more common cases we cleared the head states previously,
1392 * options, see __udp_queue_rcv_skb(). 1390 * see __udp_queue_rcv_skb().
1393 */ 1391 */
1394 if (unlikely(IPCB(skb)->opt.optlen > 0)) 1392 if (unlikely(udp_skb_has_head_state(skb)))
1395 skb_release_head_state(skb); 1393 skb_release_head_state(skb);
1396 consume_stateless_skb(skb); 1394 consume_stateless_skb(skb);
1397} 1395}
@@ -1576,7 +1574,8 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
1576 return ip_recv_error(sk, msg, len, addr_len); 1574 return ip_recv_error(sk, msg, len, addr_len);
1577 1575
1578try_again: 1576try_again:
1579 peeking = off = sk_peek_offset(sk, flags); 1577 peeking = flags & MSG_PEEK;
1578 off = sk_peek_offset(sk, flags);
1580 skb = __skb_recv_udp(sk, flags, noblock, &peeked, &off, &err); 1579 skb = __skb_recv_udp(sk, flags, noblock, &peeked, &off, &err);
1581 if (!skb) 1580 if (!skb)
1582 return err; 1581 return err;
@@ -1784,11 +1783,11 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
1784 sk_mark_napi_id_once(sk, skb); 1783 sk_mark_napi_id_once(sk, skb);
1785 } 1784 }
1786 1785
1787 /* At recvmsg() time we need skb->dst to process IP options-related 1786 /* At recvmsg() time we may access skb->dst or skb->sp depending on
1788 * cmsg, elsewhere can we clear all pending head states while they are 1787 * the IP options and the cmsg flags, elsewhere can we clear all
1789 * hot in the cache 1788 * pending head states while they are hot in the cache
1790 */ 1789 */
1791 if (likely(IPCB(skb)->opt.optlen == 0)) 1790 if (likely(IPCB(skb)->opt.optlen == 0 && !skb_sec_path(skb)))
1792 skb_release_head_state(skb); 1791 skb_release_head_state(skb);
1793 1792
1794 rc = __udp_enqueue_schedule_skb(sk, skb); 1793 rc = __udp_enqueue_schedule_skb(sk, skb);
@@ -1930,7 +1929,7 @@ drop:
1930/* For TCP sockets, sk_rx_dst is protected by socket lock 1929/* For TCP sockets, sk_rx_dst is protected by socket lock
1931 * For UDP, we use xchg() to guard against concurrent changes. 1930 * For UDP, we use xchg() to guard against concurrent changes.
1932 */ 1931 */
1933static void udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst) 1932void udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst)
1934{ 1933{
1935 struct dst_entry *old; 1934 struct dst_entry *old;
1936 1935
@@ -1939,6 +1938,7 @@ static void udp_sk_rx_dst_set(struct sock *sk, struct dst_entry *dst)
1939 dst_release(old); 1938 dst_release(old);
1940 } 1939 }
1941} 1940}
1941EXPORT_SYMBOL(udp_sk_rx_dst_set);
1942 1942
1943/* 1943/*
1944 * Multicasts and broadcasts go to each listener. 1944 * Multicasts and broadcasts go to each listener.
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index 781250151d40..0932c85b42af 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -235,7 +235,7 @@ static struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb,
235 if (uh->check == 0) 235 if (uh->check == 0)
236 uh->check = CSUM_MANGLED_0; 236 uh->check = CSUM_MANGLED_0;
237 237
238 skb->ip_summed = CHECKSUM_NONE; 238 skb->ip_summed = CHECKSUM_UNNECESSARY;
239 239
240 /* If there is no outer header we can fake a checksum offload 240 /* If there is no outer header we can fake a checksum offload
241 * due to the fact that we have already done the checksum in 241 * due to the fact that we have already done the checksum in
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 4996d734f1d2..3cec529c6113 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -756,6 +756,7 @@ static bool ipv6_hop_jumbo(struct sk_buff *skb, int optoff)
756 if (pskb_trim_rcsum(skb, pkt_len + sizeof(struct ipv6hdr))) 756 if (pskb_trim_rcsum(skb, pkt_len + sizeof(struct ipv6hdr)))
757 goto drop; 757 goto drop;
758 758
759 IP6CB(skb)->flags |= IP6SKB_JUMBOGRAM;
759 return true; 760 return true;
760 761
761drop: 762drop:
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index ebb299cf72b7..5cc0ea038198 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -914,6 +914,8 @@ add:
914 } 914 }
915 nsiblings = iter->rt6i_nsiblings; 915 nsiblings = iter->rt6i_nsiblings;
916 fib6_purge_rt(iter, fn, info->nl_net); 916 fib6_purge_rt(iter, fn, info->nl_net);
917 if (fn->rr_ptr == iter)
918 fn->rr_ptr = NULL;
917 rt6_release(iter); 919 rt6_release(iter);
918 920
919 if (nsiblings) { 921 if (nsiblings) {
@@ -926,6 +928,8 @@ add:
926 if (rt6_qualify_for_ecmp(iter)) { 928 if (rt6_qualify_for_ecmp(iter)) {
927 *ins = iter->dst.rt6_next; 929 *ins = iter->dst.rt6_next;
928 fib6_purge_rt(iter, fn, info->nl_net); 930 fib6_purge_rt(iter, fn, info->nl_net);
931 if (fn->rr_ptr == iter)
932 fn->rr_ptr = NULL;
929 rt6_release(iter); 933 rt6_release(iter);
930 nsiblings--; 934 nsiblings--;
931 } else { 935 } else {
@@ -1014,7 +1018,7 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt,
1014 /* Create subtree root node */ 1018 /* Create subtree root node */
1015 sfn = node_alloc(); 1019 sfn = node_alloc();
1016 if (!sfn) 1020 if (!sfn)
1017 goto st_failure; 1021 goto failure;
1018 1022
1019 sfn->leaf = info->nl_net->ipv6.ip6_null_entry; 1023 sfn->leaf = info->nl_net->ipv6.ip6_null_entry;
1020 atomic_inc(&info->nl_net->ipv6.ip6_null_entry->rt6i_ref); 1024 atomic_inc(&info->nl_net->ipv6.ip6_null_entry->rt6i_ref);
@@ -1031,12 +1035,12 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt,
1031 1035
1032 if (IS_ERR(sn)) { 1036 if (IS_ERR(sn)) {
1033 /* If it is failed, discard just allocated 1037 /* If it is failed, discard just allocated
1034 root, and then (in st_failure) stale node 1038 root, and then (in failure) stale node
1035 in main tree. 1039 in main tree.
1036 */ 1040 */
1037 node_free(sfn); 1041 node_free(sfn);
1038 err = PTR_ERR(sn); 1042 err = PTR_ERR(sn);
1039 goto st_failure; 1043 goto failure;
1040 } 1044 }
1041 1045
1042 /* Now link new subtree to main tree */ 1046 /* Now link new subtree to main tree */
@@ -1051,7 +1055,7 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt,
1051 1055
1052 if (IS_ERR(sn)) { 1056 if (IS_ERR(sn)) {
1053 err = PTR_ERR(sn); 1057 err = PTR_ERR(sn);
1054 goto st_failure; 1058 goto failure;
1055 } 1059 }
1056 } 1060 }
1057 1061
@@ -1092,18 +1096,17 @@ out:
1092 atomic_inc(&pn->leaf->rt6i_ref); 1096 atomic_inc(&pn->leaf->rt6i_ref);
1093 } 1097 }
1094#endif 1098#endif
1095 /* Always release dst as dst->__refcnt is guaranteed 1099 goto failure;
1096 * to be taken before entering this function
1097 */
1098 dst_release_immediate(&rt->dst);
1099 } 1100 }
1100 return err; 1101 return err;
1101 1102
1102#ifdef CONFIG_IPV6_SUBTREES 1103failure:
1103 /* Subtree creation failed, probably main tree node 1104 /* fn->leaf could be NULL if fn is an intermediate node and we
1104 is orphan. If it is, shoot it. 1105 * failed to add the new route to it in both subtree creation
1106 * failure and fib6_add_rt2node() failure case.
1107 * In both cases, fib6_repair_tree() should be called to fix
1108 * fn->leaf.
1105 */ 1109 */
1106st_failure:
1107 if (fn && !(fn->fn_flags & (RTN_RTINFO|RTN_ROOT))) 1110 if (fn && !(fn->fn_flags & (RTN_RTINFO|RTN_ROOT)))
1108 fib6_repair_tree(info->nl_net, fn); 1111 fib6_repair_tree(info->nl_net, fn);
1109 /* Always release dst as dst->__refcnt is guaranteed 1112 /* Always release dst as dst->__refcnt is guaranteed
@@ -1111,7 +1114,6 @@ st_failure:
1111 */ 1114 */
1112 dst_release_immediate(&rt->dst); 1115 dst_release_immediate(&rt->dst);
1113 return err; 1116 return err;
1114#endif
1115} 1117}
1116 1118
1117/* 1119/*
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 1422d6c08377..2dfe50d8d609 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -673,8 +673,6 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,
673 *prevhdr = NEXTHDR_FRAGMENT; 673 *prevhdr = NEXTHDR_FRAGMENT;
674 tmp_hdr = kmemdup(skb_network_header(skb), hlen, GFP_ATOMIC); 674 tmp_hdr = kmemdup(skb_network_header(skb), hlen, GFP_ATOMIC);
675 if (!tmp_hdr) { 675 if (!tmp_hdr) {
676 IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
677 IPSTATS_MIB_FRAGFAILS);
678 err = -ENOMEM; 676 err = -ENOMEM;
679 goto fail; 677 goto fail;
680 } 678 }
@@ -789,8 +787,6 @@ slow_path:
789 frag = alloc_skb(len + hlen + sizeof(struct frag_hdr) + 787 frag = alloc_skb(len + hlen + sizeof(struct frag_hdr) +
790 hroom + troom, GFP_ATOMIC); 788 hroom + troom, GFP_ATOMIC);
791 if (!frag) { 789 if (!frag) {
792 IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
793 IPSTATS_MIB_FRAGFAILS);
794 err = -ENOMEM; 790 err = -ENOMEM;
795 goto fail; 791 goto fail;
796 } 792 }
@@ -1385,11 +1381,12 @@ emsgsize:
1385 */ 1381 */
1386 1382
1387 cork->length += length; 1383 cork->length += length;
1388 if ((((length + (skb ? skb->len : headersize)) > mtu) || 1384 if ((skb && skb_is_gso(skb)) ||
1389 (skb && skb_is_gso(skb))) && 1385 (((length + (skb ? skb->len : headersize)) > mtu) &&
1386 (skb_queue_len(queue) <= 1) &&
1390 (sk->sk_protocol == IPPROTO_UDP) && 1387 (sk->sk_protocol == IPPROTO_UDP) &&
1391 (rt->dst.dev->features & NETIF_F_UFO) && !dst_xfrm(&rt->dst) && 1388 (rt->dst.dev->features & NETIF_F_UFO) && !dst_xfrm(&rt->dst) &&
1392 (sk->sk_type == SOCK_DGRAM) && !udp_get_no_check6_tx(sk)) { 1389 (sk->sk_type == SOCK_DGRAM) && !udp_get_no_check6_tx(sk))) {
1393 err = ip6_ufo_append_data(sk, queue, getfrag, from, length, 1390 err = ip6_ufo_append_data(sk, queue, getfrag, from, length,
1394 hh_len, fragheaderlen, exthdrlen, 1391 hh_len, fragheaderlen, exthdrlen,
1395 transhdrlen, mtu, flags, fl6); 1392 transhdrlen, mtu, flags, fl6);
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 4d30c96a819d..94d6a13d47f0 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -417,14 +417,11 @@ static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
417 struct net_device *loopback_dev = 417 struct net_device *loopback_dev =
418 dev_net(dev)->loopback_dev; 418 dev_net(dev)->loopback_dev;
419 419
420 if (dev != loopback_dev) { 420 if (idev && idev->dev != loopback_dev) {
421 if (idev && idev->dev == dev) { 421 struct inet6_dev *loopback_idev = in6_dev_get(loopback_dev);
422 struct inet6_dev *loopback_idev = 422 if (loopback_idev) {
423 in6_dev_get(loopback_dev); 423 rt->rt6i_idev = loopback_idev;
424 if (loopback_idev) { 424 in6_dev_put(idev);
425 rt->rt6i_idev = loopback_idev;
426 in6_dev_put(idev);
427 }
428 } 425 }
429 } 426 }
430} 427}
@@ -2351,6 +2348,7 @@ static void rt6_do_redirect(struct dst_entry *dst, struct sock *sk, struct sk_bu
2351 if (on_link) 2348 if (on_link)
2352 nrt->rt6i_flags &= ~RTF_GATEWAY; 2349 nrt->rt6i_flags &= ~RTF_GATEWAY;
2353 2350
2351 nrt->rt6i_protocol = RTPROT_REDIRECT;
2354 nrt->rt6i_gateway = *(struct in6_addr *)neigh->primary_key; 2352 nrt->rt6i_gateway = *(struct in6_addr *)neigh->primary_key;
2355 2353
2356 if (ip6_ins_rt(nrt)) 2354 if (ip6_ins_rt(nrt))
@@ -2461,6 +2459,7 @@ static struct rt6_info *rt6_add_route_info(struct net *net,
2461 .fc_dst_len = prefixlen, 2459 .fc_dst_len = prefixlen,
2462 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO | 2460 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO |
2463 RTF_UP | RTF_PREF(pref), 2461 RTF_UP | RTF_PREF(pref),
2462 .fc_protocol = RTPROT_RA,
2464 .fc_nlinfo.portid = 0, 2463 .fc_nlinfo.portid = 0,
2465 .fc_nlinfo.nlh = NULL, 2464 .fc_nlinfo.nlh = NULL,
2466 .fc_nlinfo.nl_net = net, 2465 .fc_nlinfo.nl_net = net,
@@ -2513,6 +2512,7 @@ struct rt6_info *rt6_add_dflt_router(const struct in6_addr *gwaddr,
2513 .fc_ifindex = dev->ifindex, 2512 .fc_ifindex = dev->ifindex,
2514 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_DEFAULT | 2513 .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_DEFAULT |
2515 RTF_UP | RTF_EXPIRES | RTF_PREF(pref), 2514 RTF_UP | RTF_EXPIRES | RTF_PREF(pref),
2515 .fc_protocol = RTPROT_RA,
2516 .fc_nlinfo.portid = 0, 2516 .fc_nlinfo.portid = 0,
2517 .fc_nlinfo.nlh = NULL, 2517 .fc_nlinfo.nlh = NULL,
2518 .fc_nlinfo.nl_net = dev_net(dev), 2518 .fc_nlinfo.nl_net = dev_net(dev),
@@ -3424,14 +3424,6 @@ static int rt6_fill_node(struct net *net,
3424 rtm->rtm_flags = 0; 3424 rtm->rtm_flags = 0;
3425 rtm->rtm_scope = RT_SCOPE_UNIVERSE; 3425 rtm->rtm_scope = RT_SCOPE_UNIVERSE;
3426 rtm->rtm_protocol = rt->rt6i_protocol; 3426 rtm->rtm_protocol = rt->rt6i_protocol;
3427 if (rt->rt6i_flags & RTF_DYNAMIC)
3428 rtm->rtm_protocol = RTPROT_REDIRECT;
3429 else if (rt->rt6i_flags & RTF_ADDRCONF) {
3430 if (rt->rt6i_flags & (RTF_DEFAULT | RTF_ROUTEINFO))
3431 rtm->rtm_protocol = RTPROT_RA;
3432 else
3433 rtm->rtm_protocol = RTPROT_KERNEL;
3434 }
3435 3427
3436 if (rt->rt6i_flags & RTF_CACHE) 3428 if (rt->rt6i_flags & RTF_CACHE)
3437 rtm->rtm_flags |= RTM_F_CLONED; 3429 rtm->rtm_flags |= RTM_F_CLONED;
@@ -3729,10 +3721,10 @@ static int ip6_route_dev_notify(struct notifier_block *this,
3729 /* NETDEV_UNREGISTER could be fired for multiple times by 3721 /* NETDEV_UNREGISTER could be fired for multiple times by
3730 * netdev_wait_allrefs(). Make sure we only call this once. 3722 * netdev_wait_allrefs(). Make sure we only call this once.
3731 */ 3723 */
3732 in6_dev_put(net->ipv6.ip6_null_entry->rt6i_idev); 3724 in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
3733#ifdef CONFIG_IPV6_MULTIPLE_TABLES 3725#ifdef CONFIG_IPV6_MULTIPLE_TABLES
3734 in6_dev_put(net->ipv6.ip6_prohibit_entry->rt6i_idev); 3726 in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
3735 in6_dev_put(net->ipv6.ip6_blk_hole_entry->rt6i_idev); 3727 in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
3736#endif 3728#endif
3737 } 3729 }
3738 3730
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 2521690d62d6..206210125fd7 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1456,6 +1456,8 @@ process:
1456 } 1456 }
1457 sock_hold(sk); 1457 sock_hold(sk);
1458 refcounted = true; 1458 refcounted = true;
1459 if (tcp_filter(sk, skb))
1460 goto discard_and_relse;
1459 nsk = tcp_check_req(sk, skb, req, false); 1461 nsk = tcp_check_req(sk, skb, req, false);
1460 if (!nsk) { 1462 if (!nsk) {
1461 reqsk_put(req); 1463 reqsk_put(req);
@@ -1464,8 +1466,6 @@ process:
1464 if (nsk == sk) { 1466 if (nsk == sk) {
1465 reqsk_put(req); 1467 reqsk_put(req);
1466 tcp_v6_restore_cb(skb); 1468 tcp_v6_restore_cb(skb);
1467 } else if (tcp_filter(sk, skb)) {
1468 goto discard_and_relse;
1469 } else if (tcp_child_process(sk, nsk, skb)) { 1469 } else if (tcp_child_process(sk, nsk, skb)) {
1470 tcp_v6_send_reset(nsk, skb); 1470 tcp_v6_send_reset(nsk, skb);
1471 goto discard_and_relse; 1471 goto discard_and_relse;
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 4a3e65626e8b..20039c8501eb 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -291,11 +291,7 @@ static struct sock *__udp6_lib_lookup_skb(struct sk_buff *skb,
291 struct udp_table *udptable) 291 struct udp_table *udptable)
292{ 292{
293 const struct ipv6hdr *iph = ipv6_hdr(skb); 293 const struct ipv6hdr *iph = ipv6_hdr(skb);
294 struct sock *sk;
295 294
296 sk = skb_steal_sock(skb);
297 if (unlikely(sk))
298 return sk;
299 return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport, 295 return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport,
300 &iph->daddr, dport, inet6_iif(skb), 296 &iph->daddr, dport, inet6_iif(skb),
301 udptable, skb); 297 udptable, skb);
@@ -332,6 +328,15 @@ struct sock *udp6_lib_lookup(struct net *net, const struct in6_addr *saddr, __be
332EXPORT_SYMBOL_GPL(udp6_lib_lookup); 328EXPORT_SYMBOL_GPL(udp6_lib_lookup);
333#endif 329#endif
334 330
331/* do not use the scratch area len for jumbogram: their length execeeds the
332 * scratch area space; note that the IP6CB flags is still in the first
333 * cacheline, so checking for jumbograms is cheap
334 */
335static int udp6_skb_len(struct sk_buff *skb)
336{
337 return unlikely(inet6_is_jumbogram(skb)) ? skb->len : udp_skb_len(skb);
338}
339
335/* 340/*
336 * This should be easy, if there is something there we 341 * This should be easy, if there is something there we
337 * return it, otherwise we block. 342 * return it, otherwise we block.
@@ -357,12 +362,13 @@ int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
357 return ipv6_recv_rxpmtu(sk, msg, len, addr_len); 362 return ipv6_recv_rxpmtu(sk, msg, len, addr_len);
358 363
359try_again: 364try_again:
360 peeking = off = sk_peek_offset(sk, flags); 365 peeking = flags & MSG_PEEK;
366 off = sk_peek_offset(sk, flags);
361 skb = __skb_recv_udp(sk, flags, noblock, &peeked, &off, &err); 367 skb = __skb_recv_udp(sk, flags, noblock, &peeked, &off, &err);
362 if (!skb) 368 if (!skb)
363 return err; 369 return err;
364 370
365 ulen = udp_skb_len(skb); 371 ulen = udp6_skb_len(skb);
366 copied = len; 372 copied = len;
367 if (copied > ulen - off) 373 if (copied > ulen - off)
368 copied = ulen - off; 374 copied = ulen - off;
@@ -804,6 +810,24 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
804 if (udp6_csum_init(skb, uh, proto)) 810 if (udp6_csum_init(skb, uh, proto))
805 goto csum_error; 811 goto csum_error;
806 812
813 /* Check if the socket is already available, e.g. due to early demux */
814 sk = skb_steal_sock(skb);
815 if (sk) {
816 struct dst_entry *dst = skb_dst(skb);
817 int ret;
818
819 if (unlikely(sk->sk_rx_dst != dst))
820 udp_sk_rx_dst_set(sk, dst);
821
822 ret = udpv6_queue_rcv_skb(sk, skb);
823 sock_put(sk);
824
825 /* a return value > 0 means to resubmit the input */
826 if (ret > 0)
827 return ret;
828 return 0;
829 }
830
807 /* 831 /*
808 * Multicast receive code 832 * Multicast receive code
809 */ 833 */
@@ -812,11 +836,6 @@ int __udp6_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
812 saddr, daddr, udptable, proto); 836 saddr, daddr, udptable, proto);
813 837
814 /* Unicast */ 838 /* Unicast */
815
816 /*
817 * check socket cache ... must talk to Alan about his plans
818 * for sock caches... i'll skip this for now.
819 */
820 sk = __udp6_lib_lookup_skb(skb, uh->source, uh->dest, udptable); 839 sk = __udp6_lib_lookup_skb(skb, uh->source, uh->dest, udptable);
821 if (sk) { 840 if (sk) {
822 int ret; 841 int ret;
diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c
index a2267f80febb..e7d378c032cb 100644
--- a/net/ipv6/udp_offload.c
+++ b/net/ipv6/udp_offload.c
@@ -72,7 +72,7 @@ static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb,
72 if (uh->check == 0) 72 if (uh->check == 0)
73 uh->check = CSUM_MANGLED_0; 73 uh->check = CSUM_MANGLED_0;
74 74
75 skb->ip_summed = CHECKSUM_NONE; 75 skb->ip_summed = CHECKSUM_UNNECESSARY;
76 76
77 /* If there is no outer header we can fake a checksum offload 77 /* If there is no outer header we can fake a checksum offload
78 * due to the fact that we have already done the checksum in 78 * due to the fact that we have already done the checksum in
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 2e6990f8b80b..23fa7c8b09a5 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -2213,7 +2213,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
2213{ 2213{
2214 struct sock *sk = sock->sk; 2214 struct sock *sk = sock->sk;
2215 struct irda_sock *self = irda_sk(sk); 2215 struct irda_sock *self = irda_sk(sk);
2216 struct irda_device_list list; 2216 struct irda_device_list list = { 0 };
2217 struct irda_device_info *discoveries; 2217 struct irda_device_info *discoveries;
2218 struct irda_ias_set * ias_opt; /* IAS get/query params */ 2218 struct irda_ias_set * ias_opt; /* IAS get/query params */
2219 struct ias_object * ias_obj; /* Object in IAS */ 2219 struct ias_object * ias_obj; /* Object in IAS */
diff --git a/net/key/af_key.c b/net/key/af_key.c
index ca9d3ae665e7..98f4d8211b9a 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -228,7 +228,7 @@ static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2,
228#define BROADCAST_ONE 1 228#define BROADCAST_ONE 1
229#define BROADCAST_REGISTERED 2 229#define BROADCAST_REGISTERED 2
230#define BROADCAST_PROMISC_ONLY 4 230#define BROADCAST_PROMISC_ONLY 4
231static int pfkey_broadcast(struct sk_buff *skb, 231static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
232 int broadcast_flags, struct sock *one_sk, 232 int broadcast_flags, struct sock *one_sk,
233 struct net *net) 233 struct net *net)
234{ 234{
@@ -278,7 +278,7 @@ static int pfkey_broadcast(struct sk_buff *skb,
278 rcu_read_unlock(); 278 rcu_read_unlock();
279 279
280 if (one_sk != NULL) 280 if (one_sk != NULL)
281 err = pfkey_broadcast_one(skb, &skb2, GFP_KERNEL, one_sk); 281 err = pfkey_broadcast_one(skb, &skb2, allocation, one_sk);
282 282
283 kfree_skb(skb2); 283 kfree_skb(skb2);
284 kfree_skb(skb); 284 kfree_skb(skb);
@@ -311,7 +311,7 @@ static int pfkey_do_dump(struct pfkey_sock *pfk)
311 hdr = (struct sadb_msg *) pfk->dump.skb->data; 311 hdr = (struct sadb_msg *) pfk->dump.skb->data;
312 hdr->sadb_msg_seq = 0; 312 hdr->sadb_msg_seq = 0;
313 hdr->sadb_msg_errno = rc; 313 hdr->sadb_msg_errno = rc;
314 pfkey_broadcast(pfk->dump.skb, BROADCAST_ONE, 314 pfkey_broadcast(pfk->dump.skb, GFP_ATOMIC, BROADCAST_ONE,
315 &pfk->sk, sock_net(&pfk->sk)); 315 &pfk->sk, sock_net(&pfk->sk));
316 pfk->dump.skb = NULL; 316 pfk->dump.skb = NULL;
317 } 317 }
@@ -355,7 +355,7 @@ static int pfkey_error(const struct sadb_msg *orig, int err, struct sock *sk)
355 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / 355 hdr->sadb_msg_len = (sizeof(struct sadb_msg) /
356 sizeof(uint64_t)); 356 sizeof(uint64_t));
357 357
358 pfkey_broadcast(skb, BROADCAST_ONE, sk, sock_net(sk)); 358 pfkey_broadcast(skb, GFP_KERNEL, BROADCAST_ONE, sk, sock_net(sk));
359 359
360 return 0; 360 return 0;
361} 361}
@@ -1389,7 +1389,7 @@ static int pfkey_getspi(struct sock *sk, struct sk_buff *skb, const struct sadb_
1389 1389
1390 xfrm_state_put(x); 1390 xfrm_state_put(x);
1391 1391
1392 pfkey_broadcast(resp_skb, BROADCAST_ONE, sk, net); 1392 pfkey_broadcast(resp_skb, GFP_KERNEL, BROADCAST_ONE, sk, net);
1393 1393
1394 return 0; 1394 return 0;
1395} 1395}
@@ -1476,7 +1476,7 @@ static int key_notify_sa(struct xfrm_state *x, const struct km_event *c)
1476 hdr->sadb_msg_seq = c->seq; 1476 hdr->sadb_msg_seq = c->seq;
1477 hdr->sadb_msg_pid = c->portid; 1477 hdr->sadb_msg_pid = c->portid;
1478 1478
1479 pfkey_broadcast(skb, BROADCAST_ALL, NULL, xs_net(x)); 1479 pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL, xs_net(x));
1480 1480
1481 return 0; 1481 return 0;
1482} 1482}
@@ -1589,7 +1589,7 @@ static int pfkey_get(struct sock *sk, struct sk_buff *skb, const struct sadb_msg
1589 out_hdr->sadb_msg_reserved = 0; 1589 out_hdr->sadb_msg_reserved = 0;
1590 out_hdr->sadb_msg_seq = hdr->sadb_msg_seq; 1590 out_hdr->sadb_msg_seq = hdr->sadb_msg_seq;
1591 out_hdr->sadb_msg_pid = hdr->sadb_msg_pid; 1591 out_hdr->sadb_msg_pid = hdr->sadb_msg_pid;
1592 pfkey_broadcast(out_skb, BROADCAST_ONE, sk, sock_net(sk)); 1592 pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ONE, sk, sock_net(sk));
1593 1593
1594 return 0; 1594 return 0;
1595} 1595}
@@ -1694,8 +1694,8 @@ static int pfkey_register(struct sock *sk, struct sk_buff *skb, const struct sad
1694 return -ENOBUFS; 1694 return -ENOBUFS;
1695 } 1695 }
1696 1696
1697 pfkey_broadcast(supp_skb, BROADCAST_REGISTERED, sk, sock_net(sk)); 1697 pfkey_broadcast(supp_skb, GFP_KERNEL, BROADCAST_REGISTERED, sk,
1698 1698 sock_net(sk));
1699 return 0; 1699 return 0;
1700} 1700}
1701 1701
@@ -1712,7 +1712,8 @@ static int unicast_flush_resp(struct sock *sk, const struct sadb_msg *ihdr)
1712 hdr->sadb_msg_errno = (uint8_t) 0; 1712 hdr->sadb_msg_errno = (uint8_t) 0;
1713 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); 1713 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t));
1714 1714
1715 return pfkey_broadcast(skb, BROADCAST_ONE, sk, sock_net(sk)); 1715 return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ONE, sk,
1716 sock_net(sk));
1716} 1717}
1717 1718
1718static int key_notify_sa_flush(const struct km_event *c) 1719static int key_notify_sa_flush(const struct km_event *c)
@@ -1733,7 +1734,7 @@ static int key_notify_sa_flush(const struct km_event *c)
1733 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); 1734 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t));
1734 hdr->sadb_msg_reserved = 0; 1735 hdr->sadb_msg_reserved = 0;
1735 1736
1736 pfkey_broadcast(skb, BROADCAST_ALL, NULL, c->net); 1737 pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net);
1737 1738
1738 return 0; 1739 return 0;
1739} 1740}
@@ -1790,7 +1791,7 @@ static int dump_sa(struct xfrm_state *x, int count, void *ptr)
1790 out_hdr->sadb_msg_pid = pfk->dump.msg_portid; 1791 out_hdr->sadb_msg_pid = pfk->dump.msg_portid;
1791 1792
1792 if (pfk->dump.skb) 1793 if (pfk->dump.skb)
1793 pfkey_broadcast(pfk->dump.skb, BROADCAST_ONE, 1794 pfkey_broadcast(pfk->dump.skb, GFP_ATOMIC, BROADCAST_ONE,
1794 &pfk->sk, sock_net(&pfk->sk)); 1795 &pfk->sk, sock_net(&pfk->sk));
1795 pfk->dump.skb = out_skb; 1796 pfk->dump.skb = out_skb;
1796 1797
@@ -1878,7 +1879,7 @@ static int pfkey_promisc(struct sock *sk, struct sk_buff *skb, const struct sadb
1878 new_hdr->sadb_msg_errno = 0; 1879 new_hdr->sadb_msg_errno = 0;
1879 } 1880 }
1880 1881
1881 pfkey_broadcast(skb, BROADCAST_ALL, NULL, sock_net(sk)); 1882 pfkey_broadcast(skb, GFP_KERNEL, BROADCAST_ALL, NULL, sock_net(sk));
1882 return 0; 1883 return 0;
1883} 1884}
1884 1885
@@ -2206,7 +2207,7 @@ static int key_notify_policy(struct xfrm_policy *xp, int dir, const struct km_ev
2206 out_hdr->sadb_msg_errno = 0; 2207 out_hdr->sadb_msg_errno = 0;
2207 out_hdr->sadb_msg_seq = c->seq; 2208 out_hdr->sadb_msg_seq = c->seq;
2208 out_hdr->sadb_msg_pid = c->portid; 2209 out_hdr->sadb_msg_pid = c->portid;
2209 pfkey_broadcast(out_skb, BROADCAST_ALL, NULL, xp_net(xp)); 2210 pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ALL, NULL, xp_net(xp));
2210 return 0; 2211 return 0;
2211 2212
2212} 2213}
@@ -2426,7 +2427,7 @@ static int key_pol_get_resp(struct sock *sk, struct xfrm_policy *xp, const struc
2426 out_hdr->sadb_msg_errno = 0; 2427 out_hdr->sadb_msg_errno = 0;
2427 out_hdr->sadb_msg_seq = hdr->sadb_msg_seq; 2428 out_hdr->sadb_msg_seq = hdr->sadb_msg_seq;
2428 out_hdr->sadb_msg_pid = hdr->sadb_msg_pid; 2429 out_hdr->sadb_msg_pid = hdr->sadb_msg_pid;
2429 pfkey_broadcast(out_skb, BROADCAST_ONE, sk, xp_net(xp)); 2430 pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_ONE, sk, xp_net(xp));
2430 err = 0; 2431 err = 0;
2431 2432
2432out: 2433out:
@@ -2682,7 +2683,7 @@ static int dump_sp(struct xfrm_policy *xp, int dir, int count, void *ptr)
2682 out_hdr->sadb_msg_pid = pfk->dump.msg_portid; 2683 out_hdr->sadb_msg_pid = pfk->dump.msg_portid;
2683 2684
2684 if (pfk->dump.skb) 2685 if (pfk->dump.skb)
2685 pfkey_broadcast(pfk->dump.skb, BROADCAST_ONE, 2686 pfkey_broadcast(pfk->dump.skb, GFP_ATOMIC, BROADCAST_ONE,
2686 &pfk->sk, sock_net(&pfk->sk)); 2687 &pfk->sk, sock_net(&pfk->sk));
2687 pfk->dump.skb = out_skb; 2688 pfk->dump.skb = out_skb;
2688 2689
@@ -2739,7 +2740,7 @@ static int key_notify_policy_flush(const struct km_event *c)
2739 hdr->sadb_msg_satype = SADB_SATYPE_UNSPEC; 2740 hdr->sadb_msg_satype = SADB_SATYPE_UNSPEC;
2740 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t)); 2741 hdr->sadb_msg_len = (sizeof(struct sadb_msg) / sizeof(uint64_t));
2741 hdr->sadb_msg_reserved = 0; 2742 hdr->sadb_msg_reserved = 0;
2742 pfkey_broadcast(skb_out, BROADCAST_ALL, NULL, c->net); 2743 pfkey_broadcast(skb_out, GFP_ATOMIC, BROADCAST_ALL, NULL, c->net);
2743 return 0; 2744 return 0;
2744 2745
2745} 2746}
@@ -2803,7 +2804,7 @@ static int pfkey_process(struct sock *sk, struct sk_buff *skb, const struct sadb
2803 void *ext_hdrs[SADB_EXT_MAX]; 2804 void *ext_hdrs[SADB_EXT_MAX];
2804 int err; 2805 int err;
2805 2806
2806 pfkey_broadcast(skb_clone(skb, GFP_KERNEL), 2807 pfkey_broadcast(skb_clone(skb, GFP_KERNEL), GFP_KERNEL,
2807 BROADCAST_PROMISC_ONLY, NULL, sock_net(sk)); 2808 BROADCAST_PROMISC_ONLY, NULL, sock_net(sk));
2808 2809
2809 memset(ext_hdrs, 0, sizeof(ext_hdrs)); 2810 memset(ext_hdrs, 0, sizeof(ext_hdrs));
@@ -3024,7 +3025,8 @@ static int key_notify_sa_expire(struct xfrm_state *x, const struct km_event *c)
3024 out_hdr->sadb_msg_seq = 0; 3025 out_hdr->sadb_msg_seq = 0;
3025 out_hdr->sadb_msg_pid = 0; 3026 out_hdr->sadb_msg_pid = 0;
3026 3027
3027 pfkey_broadcast(out_skb, BROADCAST_REGISTERED, NULL, xs_net(x)); 3028 pfkey_broadcast(out_skb, GFP_ATOMIC, BROADCAST_REGISTERED, NULL,
3029 xs_net(x));
3028 return 0; 3030 return 0;
3029} 3031}
3030 3032
@@ -3212,7 +3214,8 @@ static int pfkey_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *t, struct
3212 xfrm_ctx->ctx_len); 3214 xfrm_ctx->ctx_len);
3213 } 3215 }
3214 3216
3215 return pfkey_broadcast(skb, BROADCAST_REGISTERED, NULL, xs_net(x)); 3217 return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_REGISTERED, NULL,
3218 xs_net(x));
3216} 3219}
3217 3220
3218static struct xfrm_policy *pfkey_compile_policy(struct sock *sk, int opt, 3221static struct xfrm_policy *pfkey_compile_policy(struct sock *sk, int opt,
@@ -3408,7 +3411,8 @@ static int pfkey_send_new_mapping(struct xfrm_state *x, xfrm_address_t *ipaddr,
3408 n_port->sadb_x_nat_t_port_port = sport; 3411 n_port->sadb_x_nat_t_port_port = sport;
3409 n_port->sadb_x_nat_t_port_reserved = 0; 3412 n_port->sadb_x_nat_t_port_reserved = 0;
3410 3413
3411 return pfkey_broadcast(skb, BROADCAST_REGISTERED, NULL, xs_net(x)); 3414 return pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_REGISTERED, NULL,
3415 xs_net(x));
3412} 3416}
3413 3417
3414#ifdef CONFIG_NET_KEY_MIGRATE 3418#ifdef CONFIG_NET_KEY_MIGRATE
@@ -3599,7 +3603,7 @@ static int pfkey_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
3599 } 3603 }
3600 3604
3601 /* broadcast migrate message to sockets */ 3605 /* broadcast migrate message to sockets */
3602 pfkey_broadcast(skb, BROADCAST_ALL, NULL, &init_net); 3606 pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL, &init_net);
3603 3607
3604 return 0; 3608 return 0;
3605 3609
diff --git a/net/mac80211/agg-rx.c b/net/mac80211/agg-rx.c
index 8708cbe8af5b..2b36eff5d97e 100644
--- a/net/mac80211/agg-rx.c
+++ b/net/mac80211/agg-rx.c
@@ -7,7 +7,7 @@
7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> 8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net>
9 * Copyright 2007-2010, Intel Corporation 9 * Copyright 2007-2010, Intel Corporation
10 * Copyright(c) 2015 Intel Deutschland GmbH 10 * Copyright(c) 2015-2017 Intel Deutschland GmbH
11 * 11 *
12 * This program is free software; you can redistribute it and/or modify 12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as 13 * it under the terms of the GNU General Public License version 2 as
@@ -466,3 +466,23 @@ void ieee80211_manage_rx_ba_offl(struct ieee80211_vif *vif,
466 rcu_read_unlock(); 466 rcu_read_unlock();
467} 467}
468EXPORT_SYMBOL(ieee80211_manage_rx_ba_offl); 468EXPORT_SYMBOL(ieee80211_manage_rx_ba_offl);
469
470void ieee80211_rx_ba_timer_expired(struct ieee80211_vif *vif,
471 const u8 *addr, unsigned int tid)
472{
473 struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
474 struct ieee80211_local *local = sdata->local;
475 struct sta_info *sta;
476
477 rcu_read_lock();
478 sta = sta_info_get_bss(sdata, addr);
479 if (!sta)
480 goto unlock;
481
482 set_bit(tid, sta->ampdu_mlme.tid_rx_timer_expired);
483 ieee80211_queue_work(&local->hw, &sta->ampdu_mlme.work);
484
485 unlock:
486 rcu_read_unlock();
487}
488EXPORT_SYMBOL(ieee80211_rx_ba_timer_expired);
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index e4610676299b..a54a556fcdb5 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -1337,6 +1337,7 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb,
1337 goto out; 1337 goto out;
1338 } 1338 }
1339 1339
1340 OVS_CB(skb)->acts_origlen = acts->orig_len;
1340 err = do_execute_actions(dp, skb, key, 1341 err = do_execute_actions(dp, skb, key,
1341 acts->actions, acts->actions_len); 1342 acts->actions, acts->actions_len);
1342 1343
diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index e3c4c6c3fef7..03859e386b47 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -1310,8 +1310,8 @@ static int parse_ct(const struct nlattr *attr, struct ovs_conntrack_info *info,
1310 1310
1311 nla_for_each_nested(a, attr, rem) { 1311 nla_for_each_nested(a, attr, rem) {
1312 int type = nla_type(a); 1312 int type = nla_type(a);
1313 int maxlen = ovs_ct_attr_lens[type].maxlen; 1313 int maxlen;
1314 int minlen = ovs_ct_attr_lens[type].minlen; 1314 int minlen;
1315 1315
1316 if (type > OVS_CT_ATTR_MAX) { 1316 if (type > OVS_CT_ATTR_MAX) {
1317 OVS_NLERR(log, 1317 OVS_NLERR(log,
@@ -1319,6 +1319,9 @@ static int parse_ct(const struct nlattr *attr, struct ovs_conntrack_info *info,
1319 type, OVS_CT_ATTR_MAX); 1319 type, OVS_CT_ATTR_MAX);
1320 return -EINVAL; 1320 return -EINVAL;
1321 } 1321 }
1322
1323 maxlen = ovs_ct_attr_lens[type].maxlen;
1324 minlen = ovs_ct_attr_lens[type].minlen;
1322 if (nla_len(a) < minlen || nla_len(a) > maxlen) { 1325 if (nla_len(a) < minlen || nla_len(a) > maxlen) {
1323 OVS_NLERR(log, 1326 OVS_NLERR(log,
1324 "Conntrack attr type has unexpected length (type=%d, length=%d, expected=%d)", 1327 "Conntrack attr type has unexpected length (type=%d, length=%d, expected=%d)",
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 45fe8c8a884d..6b44fe405282 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -381,7 +381,7 @@ static int queue_gso_packets(struct datapath *dp, struct sk_buff *skb,
381} 381}
382 382
383static size_t upcall_msg_size(const struct dp_upcall_info *upcall_info, 383static size_t upcall_msg_size(const struct dp_upcall_info *upcall_info,
384 unsigned int hdrlen) 384 unsigned int hdrlen, int actions_attrlen)
385{ 385{
386 size_t size = NLMSG_ALIGN(sizeof(struct ovs_header)) 386 size_t size = NLMSG_ALIGN(sizeof(struct ovs_header))
387 + nla_total_size(hdrlen) /* OVS_PACKET_ATTR_PACKET */ 387 + nla_total_size(hdrlen) /* OVS_PACKET_ATTR_PACKET */
@@ -398,7 +398,7 @@ static size_t upcall_msg_size(const struct dp_upcall_info *upcall_info,
398 398
399 /* OVS_PACKET_ATTR_ACTIONS */ 399 /* OVS_PACKET_ATTR_ACTIONS */
400 if (upcall_info->actions_len) 400 if (upcall_info->actions_len)
401 size += nla_total_size(upcall_info->actions_len); 401 size += nla_total_size(actions_attrlen);
402 402
403 /* OVS_PACKET_ATTR_MRU */ 403 /* OVS_PACKET_ATTR_MRU */
404 if (upcall_info->mru) 404 if (upcall_info->mru)
@@ -465,7 +465,8 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
465 else 465 else
466 hlen = skb->len; 466 hlen = skb->len;
467 467
468 len = upcall_msg_size(upcall_info, hlen - cutlen); 468 len = upcall_msg_size(upcall_info, hlen - cutlen,
469 OVS_CB(skb)->acts_origlen);
469 user_skb = genlmsg_new(len, GFP_ATOMIC); 470 user_skb = genlmsg_new(len, GFP_ATOMIC);
470 if (!user_skb) { 471 if (!user_skb) {
471 err = -ENOMEM; 472 err = -ENOMEM;
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 5d8dcd88815f..480600649d0b 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -99,11 +99,13 @@ struct datapath {
99 * when a packet is received by OVS. 99 * when a packet is received by OVS.
100 * @mru: The maximum received fragement size; 0 if the packet is not 100 * @mru: The maximum received fragement size; 0 if the packet is not
101 * fragmented. 101 * fragmented.
102 * @acts_origlen: The netlink size of the flow actions applied to this skb.
102 * @cutlen: The number of bytes from the packet end to be removed. 103 * @cutlen: The number of bytes from the packet end to be removed.
103 */ 104 */
104struct ovs_skb_cb { 105struct ovs_skb_cb {
105 struct vport *input_vport; 106 struct vport *input_vport;
106 u16 mru; 107 u16 mru;
108 u16 acts_origlen;
107 u32 cutlen; 109 u32 cutlen;
108}; 110};
109#define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb) 111#define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 008bb34ee324..008a45ca3112 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -3700,14 +3700,19 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optv
3700 3700
3701 if (optlen != sizeof(val)) 3701 if (optlen != sizeof(val))
3702 return -EINVAL; 3702 return -EINVAL;
3703 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec)
3704 return -EBUSY;
3705 if (copy_from_user(&val, optval, sizeof(val))) 3703 if (copy_from_user(&val, optval, sizeof(val)))
3706 return -EFAULT; 3704 return -EFAULT;
3707 if (val > INT_MAX) 3705 if (val > INT_MAX)
3708 return -EINVAL; 3706 return -EINVAL;
3709 po->tp_reserve = val; 3707 lock_sock(sk);
3710 return 0; 3708 if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) {
3709 ret = -EBUSY;
3710 } else {
3711 po->tp_reserve = val;
3712 ret = 0;
3713 }
3714 release_sock(sk);
3715 return ret;
3711 } 3716 }
3712 case PACKET_LOSS: 3717 case PACKET_LOSS:
3713 { 3718 {
@@ -4329,7 +4334,7 @@ static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u,
4329 register_prot_hook(sk); 4334 register_prot_hook(sk);
4330 } 4335 }
4331 spin_unlock(&po->bind_lock); 4336 spin_unlock(&po->bind_lock);
4332 if (closing && (po->tp_version > TPACKET_V2)) { 4337 if (pg_vec && (po->tp_version > TPACKET_V2)) {
4333 /* Because we don't support block-based V3 on tx-ring */ 4338 /* Because we don't support block-based V3 on tx-ring */
4334 if (!tx_ring) 4339 if (!tx_ring)
4335 prb_shutdown_retire_blk_timer(po, rb_queue); 4340 prb_shutdown_retire_blk_timer(po, rb_queue);
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c
index e10624aa6959..9722bf839d9d 100644
--- a/net/rds/ib_recv.c
+++ b/net/rds/ib_recv.c
@@ -1015,8 +1015,10 @@ void rds_ib_recv_cqe_handler(struct rds_ib_connection *ic,
1015 if (rds_ib_ring_empty(&ic->i_recv_ring)) 1015 if (rds_ib_ring_empty(&ic->i_recv_ring))
1016 rds_ib_stats_inc(s_ib_rx_ring_empty); 1016 rds_ib_stats_inc(s_ib_rx_ring_empty);
1017 1017
1018 if (rds_ib_ring_low(&ic->i_recv_ring)) 1018 if (rds_ib_ring_low(&ic->i_recv_ring)) {
1019 rds_ib_recv_refill(conn, 0, GFP_NOWAIT); 1019 rds_ib_recv_refill(conn, 0, GFP_NOWAIT);
1020 rds_ib_stats_inc(s_ib_rx_refill_from_cq);
1021 }
1020} 1022}
1021 1023
1022int rds_ib_recv_path(struct rds_conn_path *cp) 1024int rds_ib_recv_path(struct rds_conn_path *cp)
@@ -1029,6 +1031,7 @@ int rds_ib_recv_path(struct rds_conn_path *cp)
1029 if (rds_conn_up(conn)) { 1031 if (rds_conn_up(conn)) {
1030 rds_ib_attempt_ack(ic); 1032 rds_ib_attempt_ack(ic);
1031 rds_ib_recv_refill(conn, 0, GFP_KERNEL); 1033 rds_ib_recv_refill(conn, 0, GFP_KERNEL);
1034 rds_ib_stats_inc(s_ib_rx_refill_from_thread);
1032 } 1035 }
1033 1036
1034 return ret; 1037 return ret;
diff --git a/net/rxrpc/call_accept.c b/net/rxrpc/call_accept.c
index dd30d74824b0..ec3383f97d4c 100644
--- a/net/rxrpc/call_accept.c
+++ b/net/rxrpc/call_accept.c
@@ -223,6 +223,7 @@ void rxrpc_discard_prealloc(struct rxrpc_sock *rx)
223 tail = b->call_backlog_tail; 223 tail = b->call_backlog_tail;
224 while (CIRC_CNT(head, tail, size) > 0) { 224 while (CIRC_CNT(head, tail, size) > 0) {
225 struct rxrpc_call *call = b->call_backlog[tail]; 225 struct rxrpc_call *call = b->call_backlog[tail];
226 call->socket = rx;
226 if (rx->discard_new_call) { 227 if (rx->discard_new_call) {
227 _debug("discard %lx", call->user_call_ID); 228 _debug("discard %lx", call->user_call_ID);
228 rx->discard_new_call(call, call->user_call_ID); 229 rx->discard_new_call(call, call->user_call_ID);
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 36f0ced9e60c..541707802a23 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -36,11 +36,12 @@ static struct tc_action_ops act_ipt_ops;
36static unsigned int xt_net_id; 36static unsigned int xt_net_id;
37static struct tc_action_ops act_xt_ops; 37static struct tc_action_ops act_xt_ops;
38 38
39static int ipt_init_target(struct xt_entry_target *t, char *table, 39static int ipt_init_target(struct net *net, struct xt_entry_target *t,
40 unsigned int hook) 40 char *table, unsigned int hook)
41{ 41{
42 struct xt_tgchk_param par; 42 struct xt_tgchk_param par;
43 struct xt_target *target; 43 struct xt_target *target;
44 struct ipt_entry e = {};
44 int ret = 0; 45 int ret = 0;
45 46
46 target = xt_request_find_target(AF_INET, t->u.user.name, 47 target = xt_request_find_target(AF_INET, t->u.user.name,
@@ -49,8 +50,10 @@ static int ipt_init_target(struct xt_entry_target *t, char *table,
49 return PTR_ERR(target); 50 return PTR_ERR(target);
50 51
51 t->u.kernel.target = target; 52 t->u.kernel.target = target;
53 memset(&par, 0, sizeof(par));
54 par.net = net;
52 par.table = table; 55 par.table = table;
53 par.entryinfo = NULL; 56 par.entryinfo = &e;
54 par.target = target; 57 par.target = target;
55 par.targinfo = t->data; 58 par.targinfo = t->data;
56 par.hook_mask = hook; 59 par.hook_mask = hook;
@@ -91,10 +94,11 @@ static const struct nla_policy ipt_policy[TCA_IPT_MAX + 1] = {
91 [TCA_IPT_TARG] = { .len = sizeof(struct xt_entry_target) }, 94 [TCA_IPT_TARG] = { .len = sizeof(struct xt_entry_target) },
92}; 95};
93 96
94static int __tcf_ipt_init(struct tc_action_net *tn, struct nlattr *nla, 97static int __tcf_ipt_init(struct net *net, unsigned int id, struct nlattr *nla,
95 struct nlattr *est, struct tc_action **a, 98 struct nlattr *est, struct tc_action **a,
96 const struct tc_action_ops *ops, int ovr, int bind) 99 const struct tc_action_ops *ops, int ovr, int bind)
97{ 100{
101 struct tc_action_net *tn = net_generic(net, id);
98 struct nlattr *tb[TCA_IPT_MAX + 1]; 102 struct nlattr *tb[TCA_IPT_MAX + 1];
99 struct tcf_ipt *ipt; 103 struct tcf_ipt *ipt;
100 struct xt_entry_target *td, *t; 104 struct xt_entry_target *td, *t;
@@ -159,7 +163,7 @@ static int __tcf_ipt_init(struct tc_action_net *tn, struct nlattr *nla,
159 if (unlikely(!t)) 163 if (unlikely(!t))
160 goto err2; 164 goto err2;
161 165
162 err = ipt_init_target(t, tname, hook); 166 err = ipt_init_target(net, t, tname, hook);
163 if (err < 0) 167 if (err < 0)
164 goto err3; 168 goto err3;
165 169
@@ -193,18 +197,16 @@ static int tcf_ipt_init(struct net *net, struct nlattr *nla,
193 struct nlattr *est, struct tc_action **a, int ovr, 197 struct nlattr *est, struct tc_action **a, int ovr,
194 int bind) 198 int bind)
195{ 199{
196 struct tc_action_net *tn = net_generic(net, ipt_net_id); 200 return __tcf_ipt_init(net, ipt_net_id, nla, est, a, &act_ipt_ops, ovr,
197 201 bind);
198 return __tcf_ipt_init(tn, nla, est, a, &act_ipt_ops, ovr, bind);
199} 202}
200 203
201static int tcf_xt_init(struct net *net, struct nlattr *nla, 204static int tcf_xt_init(struct net *net, struct nlattr *nla,
202 struct nlattr *est, struct tc_action **a, int ovr, 205 struct nlattr *est, struct tc_action **a, int ovr,
203 int bind) 206 int bind)
204{ 207{
205 struct tc_action_net *tn = net_generic(net, xt_net_id); 208 return __tcf_ipt_init(net, xt_net_id, nla, est, a, &act_xt_ops, ovr,
206 209 bind);
207 return __tcf_ipt_init(tn, nla, est, a, &act_xt_ops, ovr, bind);
208} 210}
209 211
210static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a, 212static int tcf_ipt(struct sk_buff *skb, const struct tc_action *a,
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 39da0c5801c9..9fd44c221347 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -205,7 +205,7 @@ static void tcf_chain_flush(struct tcf_chain *chain)
205{ 205{
206 struct tcf_proto *tp; 206 struct tcf_proto *tp;
207 207
208 if (*chain->p_filter_chain) 208 if (chain->p_filter_chain)
209 RCU_INIT_POINTER(*chain->p_filter_chain, NULL); 209 RCU_INIT_POINTER(*chain->p_filter_chain, NULL);
210 while ((tp = rtnl_dereference(chain->filter_chain)) != NULL) { 210 while ((tp = rtnl_dereference(chain->filter_chain)) != NULL) {
211 RCU_INIT_POINTER(chain->filter_chain, tp->next); 211 RCU_INIT_POINTER(chain->filter_chain, tp->next);
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index bd24a550e0f9..a3fa144b8648 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -286,9 +286,6 @@ static struct Qdisc *qdisc_match_from_root(struct Qdisc *root, u32 handle)
286void qdisc_hash_add(struct Qdisc *q, bool invisible) 286void qdisc_hash_add(struct Qdisc *q, bool invisible)
287{ 287{
288 if ((q->parent != TC_H_ROOT) && !(q->flags & TCQ_F_INGRESS)) { 288 if ((q->parent != TC_H_ROOT) && !(q->flags & TCQ_F_INGRESS)) {
289 struct Qdisc *root = qdisc_dev(q)->qdisc;
290
291 WARN_ON_ONCE(root == &noop_qdisc);
292 ASSERT_RTNL(); 289 ASSERT_RTNL();
293 hash_add_rcu(qdisc_dev(q)->qdisc_hash, &q->hash, q->handle); 290 hash_add_rcu(qdisc_dev(q)->qdisc_hash, &q->hash, q->handle);
294 if (invisible) 291 if (invisible)
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 572fe2584e48..c403c87aff7a 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -572,8 +572,10 @@ static void atm_tc_destroy(struct Qdisc *sch)
572 struct atm_flow_data *flow, *tmp; 572 struct atm_flow_data *flow, *tmp;
573 573
574 pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p); 574 pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p);
575 list_for_each_entry(flow, &p->flows, list) 575 list_for_each_entry(flow, &p->flows, list) {
576 tcf_block_put(flow->block); 576 tcf_block_put(flow->block);
577 flow->block = NULL;
578 }
577 579
578 list_for_each_entry_safe(flow, tmp, &p->flows, list) { 580 list_for_each_entry_safe(flow, tmp, &p->flows, list) {
579 if (flow->ref > 1) 581 if (flow->ref > 1)
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 481036f6b54e..780db43300b1 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -1431,8 +1431,10 @@ static void cbq_destroy(struct Qdisc *sch)
1431 * be bound to classes which have been destroyed already. --TGR '04 1431 * be bound to classes which have been destroyed already. --TGR '04
1432 */ 1432 */
1433 for (h = 0; h < q->clhash.hashsize; h++) { 1433 for (h = 0; h < q->clhash.hashsize; h++) {
1434 hlist_for_each_entry(cl, &q->clhash.hash[h], common.hnode) 1434 hlist_for_each_entry(cl, &q->clhash.hash[h], common.hnode) {
1435 tcf_block_put(cl->block); 1435 tcf_block_put(cl->block);
1436 cl->block = NULL;
1437 }
1436 } 1438 }
1437 for (h = 0; h < q->clhash.hashsize; h++) { 1439 for (h = 0; h < q->clhash.hashsize; h++) {
1438 hlist_for_each_entry_safe(cl, next, &q->clhash.hash[h], 1440 hlist_for_each_entry_safe(cl, next, &q->clhash.hash[h],
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index b52f74610dc7..fd15200f8627 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1428,6 +1428,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
1428 return err; 1428 return err;
1429 q->eligible = RB_ROOT; 1429 q->eligible = RB_ROOT;
1430 1430
1431 err = tcf_block_get(&q->root.block, &q->root.filter_list);
1432 if (err)
1433 goto err_tcf;
1434
1431 q->root.cl_common.classid = sch->handle; 1435 q->root.cl_common.classid = sch->handle;
1432 q->root.refcnt = 1; 1436 q->root.refcnt = 1;
1433 q->root.sched = q; 1437 q->root.sched = q;
@@ -1447,6 +1451,10 @@ hfsc_init_qdisc(struct Qdisc *sch, struct nlattr *opt)
1447 qdisc_watchdog_init(&q->watchdog, sch); 1451 qdisc_watchdog_init(&q->watchdog, sch);
1448 1452
1449 return 0; 1453 return 0;
1454
1455err_tcf:
1456 qdisc_class_hash_destroy(&q->clhash);
1457 return err;
1450} 1458}
1451 1459
1452static int 1460static int
@@ -1522,8 +1530,10 @@ hfsc_destroy_qdisc(struct Qdisc *sch)
1522 unsigned int i; 1530 unsigned int i;
1523 1531
1524 for (i = 0; i < q->clhash.hashsize; i++) { 1532 for (i = 0; i < q->clhash.hashsize; i++) {
1525 hlist_for_each_entry(cl, &q->clhash.hash[i], cl_common.hnode) 1533 hlist_for_each_entry(cl, &q->clhash.hash[i], cl_common.hnode) {
1526 tcf_block_put(cl->block); 1534 tcf_block_put(cl->block);
1535 cl->block = NULL;
1536 }
1527 } 1537 }
1528 for (i = 0; i < q->clhash.hashsize; i++) { 1538 for (i = 0; i < q->clhash.hashsize; i++) {
1529 hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i], 1539 hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i],
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 203286ab4427..5d65ec5207e9 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1258,8 +1258,10 @@ static void htb_destroy(struct Qdisc *sch)
1258 tcf_block_put(q->block); 1258 tcf_block_put(q->block);
1259 1259
1260 for (i = 0; i < q->clhash.hashsize; i++) { 1260 for (i = 0; i < q->clhash.hashsize; i++) {
1261 hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) 1261 hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) {
1262 tcf_block_put(cl->block); 1262 tcf_block_put(cl->block);
1263 cl->block = NULL;
1264 }
1263 } 1265 }
1264 for (i = 0; i < q->clhash.hashsize; i++) { 1266 for (i = 0; i < q->clhash.hashsize; i++) {
1265 hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i], 1267 hlist_for_each_entry_safe(cl, next, &q->clhash.hash[i],
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index f80ea2cc5f1f..82469ef9655e 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -437,6 +437,7 @@ congestion_drop:
437 qdisc_drop(head, sch, to_free); 437 qdisc_drop(head, sch, to_free);
438 438
439 slot_queue_add(slot, skb); 439 slot_queue_add(slot, skb);
440 qdisc_tree_reduce_backlog(sch, 0, delta);
440 return NET_XMIT_CN; 441 return NET_XMIT_CN;
441 } 442 }
442 443
@@ -468,8 +469,10 @@ enqueue:
468 /* Return Congestion Notification only if we dropped a packet 469 /* Return Congestion Notification only if we dropped a packet
469 * from this flow. 470 * from this flow.
470 */ 471 */
471 if (qlen != slot->qlen) 472 if (qlen != slot->qlen) {
473 qdisc_tree_reduce_backlog(sch, 0, dropped - qdisc_pkt_len(skb));
472 return NET_XMIT_CN; 474 return NET_XMIT_CN;
475 }
473 476
474 /* As we dropped a packet, better let upper stack know this */ 477 /* As we dropped a packet, better let upper stack know this */
475 qdisc_tree_reduce_backlog(sch, 1, dropped); 478 qdisc_tree_reduce_backlog(sch, 1, dropped);
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 2a186b201ad2..a4b6ffb61495 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -512,7 +512,9 @@ static void sctp_v6_to_addr(union sctp_addr *addr, struct in6_addr *saddr,
512{ 512{
513 addr->sa.sa_family = AF_INET6; 513 addr->sa.sa_family = AF_INET6;
514 addr->v6.sin6_port = port; 514 addr->v6.sin6_port = port;
515 addr->v6.sin6_flowinfo = 0;
515 addr->v6.sin6_addr = *saddr; 516 addr->v6.sin6_addr = *saddr;
517 addr->v6.sin6_scope_id = 0;
516} 518}
517 519
518/* Compare addresses exactly. 520/* Compare addresses exactly.
diff --git a/net/socket.c b/net/socket.c
index bf2122691fba..ad22df1ffbd1 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -1916,7 +1916,7 @@ static int copy_msghdr_from_user(struct msghdr *kmsg,
1916 if (copy_from_user(&msg, umsg, sizeof(*umsg))) 1916 if (copy_from_user(&msg, umsg, sizeof(*umsg)))
1917 return -EFAULT; 1917 return -EFAULT;
1918 1918
1919 kmsg->msg_control = msg.msg_control; 1919 kmsg->msg_control = (void __force *)msg.msg_control;
1920 kmsg->msg_controllen = msg.msg_controllen; 1920 kmsg->msg_controllen = msg.msg_controllen;
1921 kmsg->msg_flags = msg.msg_flags; 1921 kmsg->msg_flags = msg.msg_flags;
1922 1922
@@ -1935,7 +1935,8 @@ static int copy_msghdr_from_user(struct msghdr *kmsg,
1935 1935
1936 if (msg.msg_name && kmsg->msg_namelen) { 1936 if (msg.msg_name && kmsg->msg_namelen) {
1937 if (!save_addr) { 1937 if (!save_addr) {
1938 err = move_addr_to_kernel(msg.msg_name, kmsg->msg_namelen, 1938 err = move_addr_to_kernel(msg.msg_name,
1939 kmsg->msg_namelen,
1939 kmsg->msg_name); 1940 kmsg->msg_name);
1940 if (err < 0) 1941 if (err < 0)
1941 return err; 1942 return err;
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 2b720fa35c4f..e18500151236 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -421,6 +421,9 @@ static void svc_data_ready(struct sock *sk)
421 dprintk("svc: socket %p(inet %p), busy=%d\n", 421 dprintk("svc: socket %p(inet %p), busy=%d\n",
422 svsk, sk, 422 svsk, sk,
423 test_bit(XPT_BUSY, &svsk->sk_xprt.xpt_flags)); 423 test_bit(XPT_BUSY, &svsk->sk_xprt.xpt_flags));
424
425 /* Refer to svc_setup_socket() for details. */
426 rmb();
424 svsk->sk_odata(sk); 427 svsk->sk_odata(sk);
425 if (!test_and_set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags)) 428 if (!test_and_set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags))
426 svc_xprt_enqueue(&svsk->sk_xprt); 429 svc_xprt_enqueue(&svsk->sk_xprt);
@@ -437,6 +440,9 @@ static void svc_write_space(struct sock *sk)
437 if (svsk) { 440 if (svsk) {
438 dprintk("svc: socket %p(inet %p), write_space busy=%d\n", 441 dprintk("svc: socket %p(inet %p), write_space busy=%d\n",
439 svsk, sk, test_bit(XPT_BUSY, &svsk->sk_xprt.xpt_flags)); 442 svsk, sk, test_bit(XPT_BUSY, &svsk->sk_xprt.xpt_flags));
443
444 /* Refer to svc_setup_socket() for details. */
445 rmb();
440 svsk->sk_owspace(sk); 446 svsk->sk_owspace(sk);
441 svc_xprt_enqueue(&svsk->sk_xprt); 447 svc_xprt_enqueue(&svsk->sk_xprt);
442 } 448 }
@@ -760,8 +766,12 @@ static void svc_tcp_listen_data_ready(struct sock *sk)
760 dprintk("svc: socket %p TCP (listen) state change %d\n", 766 dprintk("svc: socket %p TCP (listen) state change %d\n",
761 sk, sk->sk_state); 767 sk, sk->sk_state);
762 768
763 if (svsk) 769 if (svsk) {
770 /* Refer to svc_setup_socket() for details. */
771 rmb();
764 svsk->sk_odata(sk); 772 svsk->sk_odata(sk);
773 }
774
765 /* 775 /*
766 * This callback may called twice when a new connection 776 * This callback may called twice when a new connection
767 * is established as a child socket inherits everything 777 * is established as a child socket inherits everything
@@ -794,6 +804,8 @@ static void svc_tcp_state_change(struct sock *sk)
794 if (!svsk) 804 if (!svsk)
795 printk("svc: socket %p: no user data\n", sk); 805 printk("svc: socket %p: no user data\n", sk);
796 else { 806 else {
807 /* Refer to svc_setup_socket() for details. */
808 rmb();
797 svsk->sk_ostate(sk); 809 svsk->sk_ostate(sk);
798 if (sk->sk_state != TCP_ESTABLISHED) { 810 if (sk->sk_state != TCP_ESTABLISHED) {
799 set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); 811 set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags);
@@ -1381,12 +1393,18 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
1381 return ERR_PTR(err); 1393 return ERR_PTR(err);
1382 } 1394 }
1383 1395
1384 inet->sk_user_data = svsk;
1385 svsk->sk_sock = sock; 1396 svsk->sk_sock = sock;
1386 svsk->sk_sk = inet; 1397 svsk->sk_sk = inet;
1387 svsk->sk_ostate = inet->sk_state_change; 1398 svsk->sk_ostate = inet->sk_state_change;
1388 svsk->sk_odata = inet->sk_data_ready; 1399 svsk->sk_odata = inet->sk_data_ready;
1389 svsk->sk_owspace = inet->sk_write_space; 1400 svsk->sk_owspace = inet->sk_write_space;
1401 /*
1402 * This barrier is necessary in order to prevent race condition
1403 * with svc_data_ready(), svc_listen_data_ready() and others
1404 * when calling callbacks above.
1405 */
1406 wmb();
1407 inet->sk_user_data = svsk;
1390 1408
1391 /* Initialize the socket */ 1409 /* Initialize the socket */
1392 if (sock->type == SOCK_DGRAM) 1410 if (sock->type == SOCK_DGRAM)
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c
index d174ee3254ee..767e0537dde5 100644
--- a/net/tipc/bearer.c
+++ b/net/tipc/bearer.c
@@ -596,7 +596,7 @@ static int tipc_l2_rcv_msg(struct sk_buff *skb, struct net_device *dev,
596 rcu_read_lock(); 596 rcu_read_lock();
597 b = rcu_dereference_rtnl(dev->tipc_ptr); 597 b = rcu_dereference_rtnl(dev->tipc_ptr);
598 if (likely(b && test_bit(0, &b->up) && 598 if (likely(b && test_bit(0, &b->up) &&
599 (skb->pkt_type <= PACKET_BROADCAST))) { 599 (skb->pkt_type <= PACKET_MULTICAST))) {
600 skb->next = NULL; 600 skb->next = NULL;
601 tipc_rcv(dev_net(dev), skb, b); 601 tipc_rcv(dev_net(dev), skb, b);
602 rcu_read_unlock(); 602 rcu_read_unlock();
diff --git a/net/tipc/msg.c b/net/tipc/msg.c
index ab3087687a32..dcd90e6fa7c3 100644
--- a/net/tipc/msg.c
+++ b/net/tipc/msg.c
@@ -513,6 +513,7 @@ bool tipc_msg_reverse(u32 own_node, struct sk_buff **skb, int err)
513 513
514 /* Now reverse the concerned fields */ 514 /* Now reverse the concerned fields */
515 msg_set_errcode(hdr, err); 515 msg_set_errcode(hdr, err);
516 msg_set_non_seq(hdr, 0);
516 msg_set_origport(hdr, msg_destport(&ohdr)); 517 msg_set_origport(hdr, msg_destport(&ohdr));
517 msg_set_destport(hdr, msg_origport(&ohdr)); 518 msg_set_destport(hdr, msg_origport(&ohdr));
518 msg_set_destnode(hdr, msg_prevnode(&ohdr)); 519 msg_set_destnode(hdr, msg_prevnode(&ohdr));
diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c
index 9bfe886ab330..750949dfc1d7 100644
--- a/net/tipc/netlink_compat.c
+++ b/net/tipc/netlink_compat.c
@@ -258,13 +258,15 @@ static int tipc_nl_compat_dumpit(struct tipc_nl_compat_cmd_dump *cmd,
258 arg = nlmsg_new(0, GFP_KERNEL); 258 arg = nlmsg_new(0, GFP_KERNEL);
259 if (!arg) { 259 if (!arg) {
260 kfree_skb(msg->rep); 260 kfree_skb(msg->rep);
261 msg->rep = NULL;
261 return -ENOMEM; 262 return -ENOMEM;
262 } 263 }
263 264
264 err = __tipc_nl_compat_dumpit(cmd, msg, arg); 265 err = __tipc_nl_compat_dumpit(cmd, msg, arg);
265 if (err) 266 if (err) {
266 kfree_skb(msg->rep); 267 kfree_skb(msg->rep);
267 268 msg->rep = NULL;
269 }
268 kfree_skb(arg); 270 kfree_skb(arg);
269 271
270 return err; 272 return err;
diff --git a/net/tipc/node.c b/net/tipc/node.c
index aeef8011ac7d..9b4dcb6a16b5 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -1455,10 +1455,8 @@ static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb,
1455 /* Initiate synch mode if applicable */ 1455 /* Initiate synch mode if applicable */
1456 if ((usr == TUNNEL_PROTOCOL) && (mtyp == SYNCH_MSG) && (oseqno == 1)) { 1456 if ((usr == TUNNEL_PROTOCOL) && (mtyp == SYNCH_MSG) && (oseqno == 1)) {
1457 syncpt = iseqno + exp_pkts - 1; 1457 syncpt = iseqno + exp_pkts - 1;
1458 if (!tipc_link_is_up(l)) { 1458 if (!tipc_link_is_up(l))
1459 tipc_link_fsm_evt(l, LINK_ESTABLISH_EVT);
1460 __tipc_node_link_up(n, bearer_id, xmitq); 1459 __tipc_node_link_up(n, bearer_id, xmitq);
1461 }
1462 if (n->state == SELF_UP_PEER_UP) { 1460 if (n->state == SELF_UP_PEER_UP) {
1463 n->sync_point = syncpt; 1461 n->sync_point = syncpt;
1464 tipc_link_fsm_evt(l, LINK_SYNCH_BEGIN_EVT); 1462 tipc_link_fsm_evt(l, LINK_SYNCH_BEGIN_EVT);
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 7b52a380d710..be8982b4f8c0 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2304,10 +2304,7 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state,
2304 */ 2304 */
2305 mutex_lock(&u->iolock); 2305 mutex_lock(&u->iolock);
2306 2306
2307 if (flags & MSG_PEEK) 2307 skip = max(sk_peek_offset(sk, flags), 0);
2308 skip = sk_peek_offset(sk, flags);
2309 else
2310 skip = 0;
2311 2308
2312 do { 2309 do {
2313 int chunk; 2310 int chunk;
diff --git a/samples/bpf/tcbpf2_kern.c b/samples/bpf/tcbpf2_kern.c
index 9c823a609e75..270edcc149a1 100644
--- a/samples/bpf/tcbpf2_kern.c
+++ b/samples/bpf/tcbpf2_kern.c
@@ -147,9 +147,9 @@ int _geneve_set_tunnel(struct __sk_buff *skb)
147 __builtin_memset(&gopt, 0x0, sizeof(gopt)); 147 __builtin_memset(&gopt, 0x0, sizeof(gopt));
148 gopt.opt_class = 0x102; /* Open Virtual Networking (OVN) */ 148 gopt.opt_class = 0x102; /* Open Virtual Networking (OVN) */
149 gopt.type = 0x08; 149 gopt.type = 0x08;
150 gopt.r1 = 1; 150 gopt.r1 = 0;
151 gopt.r2 = 0; 151 gopt.r2 = 0;
152 gopt.r3 = 1; 152 gopt.r3 = 0;
153 gopt.length = 2; /* 4-byte multiple */ 153 gopt.length = 2; /* 4-byte multiple */
154 *(int *) &gopt.opt_data = 0xdeadbeef; 154 *(int *) &gopt.opt_data = 0xdeadbeef;
155 155
diff --git a/samples/bpf/test_tunnel_bpf.sh b/samples/bpf/test_tunnel_bpf.sh
index 1ff634f187b7..a70d2ea90313 100755
--- a/samples/bpf/test_tunnel_bpf.sh
+++ b/samples/bpf/test_tunnel_bpf.sh
@@ -149,6 +149,7 @@ function cleanup {
149 ip link del veth1 149 ip link del veth1
150 ip link del ipip11 150 ip link del ipip11
151 ip link del gretap11 151 ip link del gretap11
152 ip link del vxlan11
152 ip link del geneve11 153 ip link del geneve11
153 pkill tcpdump 154 pkill tcpdump
154 pkill cat 155 pkill cat
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index dd8e2dde0b34..9ffd3dda3889 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -85,8 +85,8 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
85 85
86# try-run 86# try-run
87# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) 87# Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise)
88# Exit code chooses option. "$$TMP" is can be used as temporary file and 88# Exit code chooses option. "$$TMP" serves as a temporary file and is
89# is automatically cleaned up. 89# automatically cleaned up.
90try-run = $(shell set -e; \ 90try-run = $(shell set -e; \
91 TMP="$(TMPOUT).$$$$.tmp"; \ 91 TMP="$(TMPOUT).$$$$.tmp"; \
92 TMPO="$(TMPOUT).$$$$.o"; \ 92 TMPO="$(TMPOUT).$$$$.o"; \
@@ -261,7 +261,6 @@ make-cmd = $(call escsq,$(subst \#,\\\#,$(subst $$,$$$$,$(cmd_$(1)))))
261any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) 261any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^)
262 262
263# Execute command if command has changed or prerequisite(s) are updated. 263# Execute command if command has changed or prerequisite(s) are updated.
264#
265if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ 264if_changed = $(if $(strip $(any-prereq) $(arg-check)), \
266 @set -e; \ 265 @set -e; \
267 $(echo-cmd) $(cmd_$(1)); \ 266 $(echo-cmd) $(cmd_$(1)); \
@@ -315,7 +314,7 @@ if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \
315 $(rule_$(1)), @:) 314 $(rule_$(1)), @:)
316 315
317### 316###
318# why - tell why a a target got build 317# why - tell why a target got built
319# enabled by make V=2 318# enabled by make V=2
320# Output (listed in the order they are checked): 319# Output (listed in the order they are checked):
321# (1) - due to target is PHONY 320# (1) - due to target is PHONY
diff --git a/scripts/Makefile.asm-generic b/scripts/Makefile.asm-generic
index 95f7d8090152..a6c8c1780855 100644
--- a/scripts/Makefile.asm-generic
+++ b/scripts/Makefile.asm-generic
@@ -1,9 +1,9 @@
1# include/asm-generic contains a lot of files that are used 1# include/asm-generic contains a lot of files that are used
2# verbatim by several architectures. 2# verbatim by several architectures.
3# 3#
4# This Makefile reads the file arch/$(SRCARCH)/include/asm/Kbuild 4# This Makefile reads the file arch/$(SRCARCH)/include/$(src)/Kbuild
5# and for each file listed in this file with generic-y creates 5# and for each file listed in this file with generic-y creates
6# a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/asm) 6# a small wrapper file in $(obj) (arch/$(SRCARCH)/include/generated/$(src))
7 7
8kbuild-file := $(srctree)/arch/$(SRCARCH)/include/$(src)/Kbuild 8kbuild-file := $(srctree)/arch/$(SRCARCH)/include/$(src)/Kbuild
9-include $(kbuild-file) 9-include $(kbuild-file)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 4a9a2cec0a1b..f6152c70f7f4 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -229,8 +229,8 @@ ifeq ("$(origin RECORDMCOUNT_WARN)", "command line")
229endif 229endif
230# Due to recursion, we must skip empty.o. 230# Due to recursion, we must skip empty.o.
231# The empty.o file is created in the make process in order to determine 231# The empty.o file is created in the make process in order to determine
232# the target endianness and word size. It is made before all other C 232# the target endianness and word size. It is made before all other C
233# files, including recordmcount. 233# files, including recordmcount.
234sub_cmd_record_mcount = \ 234sub_cmd_record_mcount = \
235 if [ $(@) != "scripts/mod/empty.o" ]; then \ 235 if [ $(@) != "scripts/mod/empty.o" ]; then \
236 $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \ 236 $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \
@@ -245,13 +245,13 @@ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH
245 "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ 245 "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
246 "$(if $(part-of-module),1,0)" "$(@)"; 246 "$(if $(part-of-module),1,0)" "$(@)";
247recordmcount_source := $(srctree)/scripts/recordmcount.pl 247recordmcount_source := $(srctree)/scripts/recordmcount.pl
248endif 248endif # BUILD_C_RECORDMCOUNT
249cmd_record_mcount = \ 249cmd_record_mcount = \
250 if [ "$(findstring $(CC_FLAGS_FTRACE),$(_c_flags))" = \ 250 if [ "$(findstring $(CC_FLAGS_FTRACE),$(_c_flags))" = \
251 "$(CC_FLAGS_FTRACE)" ]; then \ 251 "$(CC_FLAGS_FTRACE)" ]; then \
252 $(sub_cmd_record_mcount) \ 252 $(sub_cmd_record_mcount) \
253 fi; 253 fi;
254endif 254endif # CONFIG_FTRACE_MCOUNT_RECORD
255 255
256ifdef CONFIG_STACK_VALIDATION 256ifdef CONFIG_STACK_VALIDATION
257ifneq ($(SKIP_STACK_VALIDATION),1) 257ifneq ($(SKIP_STACK_VALIDATION),1)
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
index 34614a48b717..993fb85982df 100644
--- a/scripts/Makefile.dtbinst
+++ b/scripts/Makefile.dtbinst
@@ -14,7 +14,7 @@ src := $(obj)
14PHONY := __dtbs_install 14PHONY := __dtbs_install
15__dtbs_install: 15__dtbs_install:
16 16
17export dtbinst-root ?= $(obj) 17export dtbinst_root ?= $(obj)
18 18
19include include/config/auto.conf 19include include/config/auto.conf
20include scripts/Kbuild.include 20include scripts/Kbuild.include
@@ -27,7 +27,7 @@ dtbinst-dirs := $(dts-dirs)
27quiet_cmd_dtb_install = INSTALL $< 27quiet_cmd_dtb_install = INSTALL $<
28 cmd_dtb_install = mkdir -p $(2); cp $< $(2) 28 cmd_dtb_install = mkdir -p $(2); cp $< $(2)
29 29
30install-dir = $(patsubst $(dtbinst-root)%,$(INSTALL_DTBS_PATH)%,$(obj)) 30install-dir = $(patsubst $(dtbinst_root)%,$(INSTALL_DTBS_PATH)%,$(obj))
31 31
32$(dtbinst-files): %.dtb: $(obj)/%.dtb 32$(dtbinst-files): %.dtb: $(obj)/%.dtb
33 $(call cmd,dtb_install,$(install-dir)) 33 $(call cmd,dtb_install,$(install-dir))
diff --git a/scripts/basic/Makefile b/scripts/basic/Makefile
index ec10d9345bc2..0372b33febe5 100644
--- a/scripts/basic/Makefile
+++ b/scripts/basic/Makefile
@@ -1,5 +1,5 @@
1### 1###
2# Makefile.basic lists the most basic programs used during the build process. 2# This Makefile lists the most basic programs used during the build process.
3# The programs listed herein are what are needed to do the basic stuff, 3# The programs listed herein are what are needed to do the basic stuff,
4# such as fix file dependencies. 4# such as fix file dependencies.
5# This initial step is needed to avoid files to be recompiled 5# This initial step is needed to avoid files to be recompiled
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index fff818b92acb..bbf62cb1f819 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -25,7 +25,7 @@
25 * 25 *
26 * So we play the same trick that "mkdep" played before. We replace 26 * So we play the same trick that "mkdep" played before. We replace
27 * the dependency on autoconf.h by a dependency on every config 27 * the dependency on autoconf.h by a dependency on every config
28 * option which is mentioned in any of the listed prequisites. 28 * option which is mentioned in any of the listed prerequisites.
29 * 29 *
30 * kconfig populates a tree in include/config/ with an empty file 30 * kconfig populates a tree in include/config/ with an empty file
31 * for each config symbol and when the configuration is updated 31 * for each config symbol and when the configuration is updated
@@ -34,7 +34,7 @@
34 * the config symbols are rebuilt. 34 * the config symbols are rebuilt.
35 * 35 *
36 * So if the user changes his CONFIG_HIS_DRIVER option, only the objects 36 * So if the user changes his CONFIG_HIS_DRIVER option, only the objects
37 * which depend on "include/linux/config/his/driver.h" will be rebuilt, 37 * which depend on "include/config/his/driver.h" will be rebuilt,
38 * so most likely only his driver ;-) 38 * so most likely only his driver ;-)
39 * 39 *
40 * The idea above dates, by the way, back to Michael E Chastain, AFAIK. 40 * The idea above dates, by the way, back to Michael E Chastain, AFAIK.
@@ -75,7 +75,7 @@
75 * and then basically copies the .<target>.d file to stdout, in the 75 * and then basically copies the .<target>.d file to stdout, in the
76 * process filtering out the dependency on autoconf.h and adding 76 * process filtering out the dependency on autoconf.h and adding
77 * dependencies on include/config/my/option.h for every 77 * dependencies on include/config/my/option.h for every
78 * CONFIG_MY_OPTION encountered in any of the prequisites. 78 * CONFIG_MY_OPTION encountered in any of the prerequisites.
79 * 79 *
80 * It will also filter out all the dependencies on *.ver. We need 80 * It will also filter out all the dependencies on *.ver. We need
81 * to make sure that the generated version checksum are globally up 81 * to make sure that the generated version checksum are globally up
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
index 3bd5f4f30235..bc443201d3ef 100755
--- a/scripts/get_maintainer.pl
+++ b/scripts/get_maintainer.pl
@@ -18,6 +18,7 @@ my $V = '0.26';
18 18
19use Getopt::Long qw(:config no_auto_abbrev); 19use Getopt::Long qw(:config no_auto_abbrev);
20use Cwd; 20use Cwd;
21use File::Find;
21 22
22my $cur_path = fastgetcwd() . '/'; 23my $cur_path = fastgetcwd() . '/';
23my $lk_path = "./"; 24my $lk_path = "./";
@@ -58,6 +59,7 @@ my $from_filename = 0;
58my $pattern_depth = 0; 59my $pattern_depth = 0;
59my $version = 0; 60my $version = 0;
60my $help = 0; 61my $help = 0;
62my $find_maintainer_files = 0;
61 63
62my $vcs_used = 0; 64my $vcs_used = 0;
63 65
@@ -249,6 +251,7 @@ if (!GetOptions(
249 'sections!' => \$sections, 251 'sections!' => \$sections,
250 'fe|file-emails!' => \$file_emails, 252 'fe|file-emails!' => \$file_emails,
251 'f|file' => \$from_filename, 253 'f|file' => \$from_filename,
254 'find-maintainer-files' => \$find_maintainer_files,
252 'v|version' => \$version, 255 'v|version' => \$version,
253 'h|help|usage' => \$help, 256 'h|help|usage' => \$help,
254 )) { 257 )) {
@@ -307,36 +310,74 @@ if (!top_of_kernel_tree($lk_path)) {
307 310
308my @typevalue = (); 311my @typevalue = ();
309my %keyword_hash; 312my %keyword_hash;
313my @mfiles = ();
310 314
311open (my $maint, '<', "${lk_path}MAINTAINERS") 315sub read_maintainer_file {
312 or die "$P: Can't open MAINTAINERS: $!\n"; 316 my ($file) = @_;
313while (<$maint>) { 317
314 my $line = $_; 318 open (my $maint, '<', "$file")
315 319 or die "$P: Can't open MAINTAINERS file '$file': $!\n";
316 if ($line =~ m/^([A-Z]):\s*(.*)/) { 320 while (<$maint>) {
317 my $type = $1; 321 my $line = $_;
318 my $value = $2; 322
319 323 if ($line =~ m/^([A-Z]):\s*(.*)/) {
320 ##Filename pattern matching 324 my $type = $1;
321 if ($type eq "F" || $type eq "X") { 325 my $value = $2;
322 $value =~ s@\.@\\\.@g; ##Convert . to \. 326
323 $value =~ s/\*/\.\*/g; ##Convert * to .* 327 ##Filename pattern matching
324 $value =~ s/\?/\./g; ##Convert ? to . 328 if ($type eq "F" || $type eq "X") {
325 ##if pattern is a directory and it lacks a trailing slash, add one 329 $value =~ s@\.@\\\.@g; ##Convert . to \.
326 if ((-d $value)) { 330 $value =~ s/\*/\.\*/g; ##Convert * to .*
327 $value =~ s@([^/])$@$1/@; 331 $value =~ s/\?/\./g; ##Convert ? to .
332 ##if pattern is a directory and it lacks a trailing slash, add one
333 if ((-d $value)) {
334 $value =~ s@([^/])$@$1/@;
335 }
336 } elsif ($type eq "K") {
337 $keyword_hash{@typevalue} = $value;
328 } 338 }
329 } elsif ($type eq "K") { 339 push(@typevalue, "$type:$value");
330 $keyword_hash{@typevalue} = $value; 340 } elsif (!(/^\s*$/ || /^\s*\#/)) {
341 $line =~ s/\n$//g;
342 push(@typevalue, $line);
331 } 343 }
332 push(@typevalue, "$type:$value");
333 } elsif (!/^(\s)*$/) {
334 $line =~ s/\n$//g;
335 push(@typevalue, $line);
336 } 344 }
345 close($maint);
346}
347
348sub find_is_maintainer_file {
349 my ($file) = $_;
350 return if ($file !~ m@/MAINTAINERS$@);
351 $file = $File::Find::name;
352 return if (! -f $file);
353 push(@mfiles, $file);
337} 354}
338close($maint);
339 355
356sub find_ignore_git {
357 return grep { $_ !~ /^\.git$/; } @_;
358}
359
360if (-d "${lk_path}MAINTAINERS") {
361 opendir(DIR, "${lk_path}MAINTAINERS") or die $!;
362 my @files = readdir(DIR);
363 closedir(DIR);
364 foreach my $file (@files) {
365 push(@mfiles, "${lk_path}MAINTAINERS/$file") if ($file !~ /^\./);
366 }
367}
368
369if ($find_maintainer_files) {
370 find( { wanted => \&find_is_maintainer_file,
371 preprocess => \&find_ignore_git,
372 no_chdir => 1,
373 }, "${lk_path}");
374} else {
375 push(@mfiles, "${lk_path}MAINTAINERS") if -f "${lk_path}MAINTAINERS";
376}
377
378foreach my $file (@mfiles) {
379 read_maintainer_file("$file");
380}
340 381
341# 382#
342# Read mail address map 383# Read mail address map
@@ -873,7 +914,7 @@ sub top_of_kernel_tree {
873 if ( (-f "${lk_path}COPYING") 914 if ( (-f "${lk_path}COPYING")
874 && (-f "${lk_path}CREDITS") 915 && (-f "${lk_path}CREDITS")
875 && (-f "${lk_path}Kbuild") 916 && (-f "${lk_path}Kbuild")
876 && (-f "${lk_path}MAINTAINERS") 917 && (-e "${lk_path}MAINTAINERS")
877 && (-f "${lk_path}Makefile") 918 && (-f "${lk_path}Makefile")
878 && (-f "${lk_path}README") 919 && (-f "${lk_path}README")
879 && (-d "${lk_path}Documentation") 920 && (-d "${lk_path}Documentation")
diff --git a/scripts/parse-maintainers.pl b/scripts/parse-maintainers.pl
index a0fe34349b24..e40b53db7f9f 100644
--- a/scripts/parse-maintainers.pl
+++ b/scripts/parse-maintainers.pl
@@ -2,9 +2,9 @@
2 2
3use strict; 3use strict;
4 4
5my %map; 5my $P = $0;
6 6
7# sort comparison function 7# sort comparison functions
8sub by_category($$) { 8sub by_category($$) {
9 my ($a, $b) = @_; 9 my ($a, $b) = @_;
10 10
@@ -15,20 +15,33 @@ sub by_category($$) {
15 $a =~ s/THE REST/ZZZZZZ/g; 15 $a =~ s/THE REST/ZZZZZZ/g;
16 $b =~ s/THE REST/ZZZZZZ/g; 16 $b =~ s/THE REST/ZZZZZZ/g;
17 17
18 $a cmp $b; 18 return $a cmp $b;
19} 19}
20 20
21sub alpha_output { 21sub by_pattern($$) {
22 my $key; 22 my ($a, $b) = @_;
23 my $sort_method = \&by_category; 23 my $preferred_order = 'MRPLSWTQBCFXNK';
24 my $sep = ""; 24
25 25 my $a1 = uc(substr($a, 0, 1));
26 foreach $key (sort $sort_method keys %map) { 26 my $b1 = uc(substr($b, 0, 1));
27 if ($key ne " ") { 27
28 print $sep . $key . "\n"; 28 my $a_index = index($preferred_order, $a1);
29 $sep = "\n"; 29 my $b_index = index($preferred_order, $b1);
30 } 30
31 print $map{$key}; 31 $a_index = 1000 if ($a_index == -1);
32 $b_index = 1000 if ($b_index == -1);
33
34 if (($a1 =~ /^F$/ && $b1 =~ /^F$/) ||
35 ($a1 =~ /^X$/ && $b1 =~ /^X$/)) {
36 return $a cmp $b;
37 }
38
39 if ($a_index < $b_index) {
40 return -1;
41 } elsif ($a_index == $b_index) {
42 return 0;
43 } else {
44 return 1;
32 } 45 }
33} 46}
34 47
@@ -39,39 +52,77 @@ sub trim {
39 return $s; 52 return $s;
40} 53}
41 54
55sub alpha_output {
56 my ($hashref, $filename) = (@_);
57
58 open(my $file, '>', "$filename") or die "$P: $filename: open failed - $!\n";
59 foreach my $key (sort by_category keys %$hashref) {
60 if ($key eq " ") {
61 chomp $$hashref{$key};
62 print $file $$hashref{$key};
63 } else {
64 print $file "\n" . $key . "\n";
65 foreach my $pattern (sort by_pattern split('\n', %$hashref{$key})) {
66 print $file ($pattern . "\n");
67 }
68 }
69 }
70 close($file);
71}
72
42sub file_input { 73sub file_input {
74 my ($hashref, $filename) = (@_);
75
43 my $lastline = ""; 76 my $lastline = "";
44 my $case = " "; 77 my $case = " ";
45 $map{$case} = ""; 78 $$hashref{$case} = "";
79
80 open(my $file, '<', "$filename") or die "$P: $filename: open failed - $!\n";
46 81
47 while (<>) { 82 while (<$file>) {
48 my $line = $_; 83 my $line = $_;
49 84
50 # Pattern line? 85 # Pattern line?
51 if ($line =~ m/^([A-Z]):\s*(.*)/) { 86 if ($line =~ m/^([A-Z]):\s*(.*)/) {
52 $line = $1 . ":\t" . trim($2) . "\n"; 87 $line = $1 . ":\t" . trim($2) . "\n";
53 if ($lastline eq "") { 88 if ($lastline eq "") {
54 $map{$case} = $map{$case} . $line; 89 $$hashref{$case} = $$hashref{$case} . $line;
55 next; 90 next;
56 } 91 }
57 $case = trim($lastline); 92 $case = trim($lastline);
58 exists $map{$case} and die "Header '$case' already exists"; 93 exists $$hashref{$case} and die "Header '$case' already exists";
59 $map{$case} = $line; 94 $$hashref{$case} = $line;
60 $lastline = ""; 95 $lastline = "";
61 next; 96 next;
62 } 97 }
63 98
64 if ($case eq " ") { 99 if ($case eq " ") {
65 $map{$case} = $map{$case} . $lastline; 100 $$hashref{$case} = $$hashref{$case} . $lastline;
66 $lastline = $line; 101 $lastline = $line;
67 next; 102 next;
68 } 103 }
69 trim($lastline) eq "" or die ("Odd non-pattern line '$lastline' for '$case'"); 104 trim($lastline) eq "" or die ("Odd non-pattern line '$lastline' for '$case'");
70 $lastline = $line; 105 $lastline = $line;
71 } 106 }
72 $map{$case} = $map{$case} . $lastline; 107 $$hashref{$case} = $$hashref{$case} . $lastline;
108 close($file);
73} 109}
74 110
75&file_input; 111my %hash;
76&alpha_output; 112my %new_hash;
113
114file_input(\%hash, "MAINTAINERS");
115
116foreach my $type (@ARGV) {
117 foreach my $key (keys %hash) {
118 if ($key =~ /$type/ || $hash{$key} =~ /$type/) {
119 $new_hash{$key} = $hash{$key};
120 delete $hash{$key};
121 }
122 }
123}
124
125alpha_output(\%hash, "MAINTAINERS.new");
126alpha_output(\%new_hash, "SECTION.new");
127
77exit(0); 128exit(0);
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 9d2c9d9af688..d78405329ceb 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -783,7 +783,9 @@ static int atmel_ac97c_probe(struct platform_device *pdev)
783 dev_dbg(&pdev->dev, "no peripheral clock\n"); 783 dev_dbg(&pdev->dev, "no peripheral clock\n");
784 return PTR_ERR(pclk); 784 return PTR_ERR(pclk);
785 } 785 }
786 clk_prepare_enable(pclk); 786 retval = clk_prepare_enable(pclk);
787 if (retval)
788 goto err_prepare_enable;
787 789
788 retval = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1, 790 retval = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1,
789 SNDRV_DEFAULT_STR1, THIS_MODULE, 791 SNDRV_DEFAULT_STR1, THIS_MODULE,
@@ -879,6 +881,7 @@ err_request_irq:
879 snd_card_free(card); 881 snd_card_free(card);
880err_snd_card_new: 882err_snd_card_new:
881 clk_disable_unprepare(pclk); 883 clk_disable_unprepare(pclk);
884err_prepare_enable:
882 clk_put(pclk); 885 clk_put(pclk);
883 return retval; 886 return retval;
884} 887}
@@ -897,9 +900,9 @@ static int atmel_ac97c_resume(struct device *pdev)
897{ 900{
898 struct snd_card *card = dev_get_drvdata(pdev); 901 struct snd_card *card = dev_get_drvdata(pdev);
899 struct atmel_ac97c *chip = card->private_data; 902 struct atmel_ac97c *chip = card->private_data;
903 int ret = clk_prepare_enable(chip->pclk);
900 904
901 clk_prepare_enable(chip->pclk); 905 return ret;
902 return 0;
903} 906}
904 907
905static SIMPLE_DEV_PM_OPS(atmel_ac97c_pm, atmel_ac97c_suspend, atmel_ac97c_resume); 908static SIMPLE_DEV_PM_OPS(atmel_ac97c_pm, atmel_ac97c_suspend, atmel_ac97c_resume);
diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c
index b7ef8c59b49a..0cd7caaed9c4 100644
--- a/sound/soc/atmel/atmel-classd.c
+++ b/sound/soc/atmel/atmel-classd.c
@@ -652,7 +652,6 @@ static int atmel_classd_probe(struct platform_device *pdev)
652 } 652 }
653 653
654 snd_soc_card_set_drvdata(card, dd); 654 snd_soc_card_set_drvdata(card, dd);
655 platform_set_drvdata(pdev, card);
656 655
657 ret = atmel_classd_asoc_card_init(dev, card); 656 ret = atmel_classd_asoc_card_init(dev, card);
658 if (ret) { 657 if (ret) {
diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
index c917df7715d1..8e3d34be9e69 100644
--- a/sound/soc/atmel/atmel-pdmic.c
+++ b/sound/soc/atmel/atmel-pdmic.c
@@ -694,7 +694,6 @@ static int atmel_pdmic_probe(struct platform_device *pdev)
694 } 694 }
695 695
696 snd_soc_card_set_drvdata(card, dd); 696 snd_soc_card_set_drvdata(card, dd);
697 platform_set_drvdata(pdev, card);
698 697
699 ret = atmel_pdmic_asoc_card_init(dev, card); 698 ret = atmel_pdmic_asoc_card_init(dev, card);
700 if (ret) { 699 if (ret) {
diff --git a/sound/soc/au1x/db1200.c b/sound/soc/au1x/db1200.c
index 5c73061d912a..301e1fc9a377 100644
--- a/sound/soc/au1x/db1200.c
+++ b/sound/soc/au1x/db1200.c
@@ -99,7 +99,7 @@ static int db1200_i2s_startup(struct snd_pcm_substream *substream)
99 return 0; 99 return 0;
100} 100}
101 101
102static struct snd_soc_ops db1200_i2s_wm8731_ops = { 102static const struct snd_soc_ops db1200_i2s_wm8731_ops = {
103 .startup = db1200_i2s_startup, 103 .startup = db1200_i2s_startup,
104}; 104};
105 105
diff --git a/sound/soc/au1x/dbdma2.c b/sound/soc/au1x/dbdma2.c
index b5d1caa04d8e..6a035ca0f521 100644
--- a/sound/soc/au1x/dbdma2.c
+++ b/sound/soc/au1x/dbdma2.c
@@ -304,7 +304,7 @@ static int au1xpsc_pcm_close(struct snd_pcm_substream *substream)
304 return 0; 304 return 0;
305} 305}
306 306
307static struct snd_pcm_ops au1xpsc_pcm_ops = { 307static const struct snd_pcm_ops au1xpsc_pcm_ops = {
308 .open = au1xpsc_pcm_open, 308 .open = au1xpsc_pcm_open,
309 .close = au1xpsc_pcm_close, 309 .close = au1xpsc_pcm_close,
310 .ioctl = snd_pcm_lib_ioctl, 310 .ioctl = snd_pcm_lib_ioctl,
diff --git a/sound/soc/au1x/dma.c b/sound/soc/au1x/dma.c
index fcf5a9adde81..19457e2b351e 100644
--- a/sound/soc/au1x/dma.c
+++ b/sound/soc/au1x/dma.c
@@ -277,7 +277,7 @@ static snd_pcm_uframes_t alchemy_pcm_pointer(struct snd_pcm_substream *ss)
277 return bytes_to_frames(ss->runtime, location); 277 return bytes_to_frames(ss->runtime, location);
278} 278}
279 279
280static struct snd_pcm_ops alchemy_pcm_ops = { 280static const struct snd_pcm_ops alchemy_pcm_ops = {
281 .open = alchemy_pcm_open, 281 .open = alchemy_pcm_open,
282 .close = alchemy_pcm_close, 282 .close = alchemy_pcm_close,
283 .ioctl = snd_pcm_lib_ioctl, 283 .ioctl = snd_pcm_lib_ioctl,
diff --git a/sound/soc/au1x/psc-ac97.c b/sound/soc/au1x/psc-ac97.c
index bb53c7059005..a2050ae5a3fe 100644
--- a/sound/soc/au1x/psc-ac97.c
+++ b/sound/soc/au1x/psc-ac97.c
@@ -474,7 +474,7 @@ static int au1xpsc_ac97_drvresume(struct device *dev)
474 return 0; 474 return 0;
475} 475}
476 476
477static struct dev_pm_ops au1xpscac97_pmops = { 477static const struct dev_pm_ops au1xpscac97_pmops = {
478 .suspend = au1xpsc_ac97_drvsuspend, 478 .suspend = au1xpsc_ac97_drvsuspend,
479 .resume = au1xpsc_ac97_drvresume, 479 .resume = au1xpsc_ac97_drvresume,
480}; 480};
diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c
index 0bf9d62b91a0..e6eec081eaae 100644
--- a/sound/soc/au1x/psc-i2s.c
+++ b/sound/soc/au1x/psc-i2s.c
@@ -392,7 +392,7 @@ static int au1xpsc_i2s_drvresume(struct device *dev)
392 return 0; 392 return 0;
393} 393}
394 394
395static struct dev_pm_ops au1xpsci2s_pmops = { 395static const struct dev_pm_ops au1xpsci2s_pmops = {
396 .suspend = au1xpsc_i2s_drvsuspend, 396 .suspend = au1xpsc_i2s_drvsuspend,
397 .resume = au1xpsc_i2s_drvresume, 397 .resume = au1xpsc_i2s_drvresume,
398}; 398};
diff --git a/sound/soc/bcm/cygnus-ssp.c b/sound/soc/bcm/cygnus-ssp.c
index e710bb0c5637..15c438f0f22d 100644
--- a/sound/soc/bcm/cygnus-ssp.c
+++ b/sound/soc/bcm/cygnus-ssp.c
@@ -27,12 +27,6 @@
27 27
28#define DEFAULT_VCO 1354750204 28#define DEFAULT_VCO 1354750204
29 29
30#define CYGNUS_TDM_RATE \
31 (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | \
32 SNDRV_PCM_RATE_11025 | SNDRV_PCM_RATE_22050 | \
33 SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 | \
34 SNDRV_PCM_RATE_48000)
35
36#define CAPTURE_FCI_ID_BASE 0x180 30#define CAPTURE_FCI_ID_BASE 0x180
37#define CYGNUS_SSP_TRISTATE_MASK 0x001fff 31#define CYGNUS_SSP_TRISTATE_MASK 0x001fff
38#define CYGNUS_PLLCLKSEL_MASK 0xf 32#define CYGNUS_PLLCLKSEL_MASK 0xf
@@ -234,152 +228,20 @@ static const struct pll_macro_entry pll_predef_mclk[] = {
234 {98304000, 2}, 228 {98304000, 2},
235}; 229};
236 230
231#define CYGNUS_RATE_MIN 8000
232#define CYGNUS_RATE_MAX 384000
233
237/* List of valid frame sizes for tdm mode */ 234/* List of valid frame sizes for tdm mode */
238static const int ssp_valid_tdm_framesize[] = {32, 64, 128, 256, 512}; 235static const int ssp_valid_tdm_framesize[] = {32, 64, 128, 256, 512};
239 236
240/* 237static const unsigned int cygnus_rates[] = {
241 * Use this relationship to derive the sampling rate (lrclk) 238 8000, 11025, 16000, 22050, 32000, 44100, 48000,
242 * lrclk = (mclk) / ((2*mclk_to_sclk_ratio) * (32 * SCLK))). 239 88200, 96000, 176400, 192000, 352800, 384000
243 *
244 * Use mclk and pll_ch from the table above
245 *
246 * Valid SCLK = 0/1/2/4/8/12
247 *
248 * mclk_to_sclk_ratio = number of MCLK per SCLK. Division is twice the
249 * value programmed in this field.
250 * Valid mclk_to_sclk_ratio = 1 through to 15
251 *
252 * eg: To set lrclk = 48khz, set mclk = 12288000, mclk_to_sclk_ratio = 2,
253 * SCLK = 64
254 */
255struct _ssp_clk_coeff {
256 u32 mclk;
257 u32 sclk_rate;
258 u32 rate;
259 u32 mclk_rate;
260}; 240};
261 241
262static const struct _ssp_clk_coeff ssp_clk_coeff[] = { 242static const struct snd_pcm_hw_constraint_list cygnus_rate_constraint = {
263 { 4096000, 32, 16000, 4}, 243 .count = ARRAY_SIZE(cygnus_rates),
264 { 4096000, 32, 32000, 2}, 244 .list = cygnus_rates,
265 { 4096000, 64, 8000, 4},
266 { 4096000, 64, 16000, 2},
267 { 4096000, 64, 32000, 1},
268 { 4096000, 128, 8000, 2},
269 { 4096000, 128, 16000, 1},
270 { 4096000, 256, 8000, 1},
271
272 { 6144000, 32, 16000, 6},
273 { 6144000, 32, 32000, 3},
274 { 6144000, 32, 48000, 2},
275 { 6144000, 32, 96000, 1},
276 { 6144000, 64, 8000, 6},
277 { 6144000, 64, 16000, 3},
278 { 6144000, 64, 48000, 1},
279 { 6144000, 128, 8000, 3},
280
281 { 8192000, 32, 32000, 4},
282 { 8192000, 64, 16000, 4},
283 { 8192000, 64, 32000, 2},
284 { 8192000, 128, 8000, 4},
285 { 8192000, 128, 16000, 2},
286 { 8192000, 128, 32000, 1},
287 { 8192000, 256, 8000, 2},
288 { 8192000, 256, 16000, 1},
289 { 8192000, 512, 8000, 1},
290
291 {12288000, 32, 32000, 6},
292 {12288000, 32, 48000, 4},
293 {12288000, 32, 96000, 2},
294 {12288000, 32, 192000, 1},
295 {12288000, 64, 16000, 6},
296 {12288000, 64, 32000, 3},
297 {12288000, 64, 48000, 2},
298 {12288000, 64, 96000, 1},
299 {12288000, 128, 8000, 6},
300 {12288000, 128, 16000, 3},
301 {12288000, 128, 48000, 1},
302 {12288000, 256, 8000, 3},
303
304 {16384000, 64, 32000, 4},
305 {16384000, 128, 16000, 4},
306 {16384000, 128, 32000, 2},
307 {16384000, 256, 8000, 4},
308 {16384000, 256, 16000, 2},
309 {16384000, 256, 32000, 1},
310 {16384000, 512, 8000, 2},
311 {16384000, 512, 16000, 1},
312
313 {24576000, 32, 96000, 4},
314 {24576000, 32, 192000, 2},
315 {24576000, 64, 32000, 6},
316 {24576000, 64, 48000, 4},
317 {24576000, 64, 96000, 2},
318 {24576000, 64, 192000, 1},
319 {24576000, 128, 16000, 6},
320 {24576000, 128, 32000, 3},
321 {24576000, 128, 48000, 2},
322 {24576000, 256, 8000, 6},
323 {24576000, 256, 16000, 3},
324 {24576000, 256, 48000, 1},
325 {24576000, 512, 8000, 3},
326
327 {49152000, 32, 192000, 4},
328 {49152000, 64, 96000, 4},
329 {49152000, 64, 192000, 2},
330 {49152000, 128, 32000, 6},
331 {49152000, 128, 48000, 4},
332 {49152000, 128, 96000, 2},
333 {49152000, 128, 192000, 1},
334 {49152000, 256, 16000, 6},
335 {49152000, 256, 32000, 3},
336 {49152000, 256, 48000, 2},
337 {49152000, 256, 96000, 1},
338 {49152000, 512, 8000, 6},
339 {49152000, 512, 16000, 3},
340 {49152000, 512, 48000, 1},
341
342 { 5644800, 32, 22050, 4},
343 { 5644800, 32, 44100, 2},
344 { 5644800, 32, 88200, 1},
345 { 5644800, 64, 11025, 4},
346 { 5644800, 64, 22050, 2},
347 { 5644800, 64, 44100, 1},
348
349 {11289600, 32, 44100, 4},
350 {11289600, 32, 88200, 2},
351 {11289600, 32, 176400, 1},
352 {11289600, 64, 22050, 4},
353 {11289600, 64, 44100, 2},
354 {11289600, 64, 88200, 1},
355 {11289600, 128, 11025, 4},
356 {11289600, 128, 22050, 2},
357 {11289600, 128, 44100, 1},
358
359 {22579200, 32, 88200, 4},
360 {22579200, 32, 176400, 2},
361 {22579200, 64, 44100, 4},
362 {22579200, 64, 88200, 2},
363 {22579200, 64, 176400, 1},
364 {22579200, 128, 22050, 4},
365 {22579200, 128, 44100, 2},
366 {22579200, 128, 88200, 1},
367 {22579200, 256, 11025, 4},
368 {22579200, 256, 22050, 2},
369 {22579200, 256, 44100, 1},
370
371 {45158400, 32, 176400, 4},
372 {45158400, 64, 88200, 4},
373 {45158400, 64, 176400, 2},
374 {45158400, 128, 44100, 4},
375 {45158400, 128, 88200, 2},
376 {45158400, 128, 176400, 1},
377 {45158400, 256, 22050, 4},
378 {45158400, 256, 44100, 2},
379 {45158400, 256, 88200, 1},
380 {45158400, 512, 11025, 4},
381 {45158400, 512, 22050, 2},
382 {45158400, 512, 44100, 1},
383}; 245};
384 246
385static struct cygnus_aio_port *cygnus_dai_get_portinfo(struct snd_soc_dai *dai) 247static struct cygnus_aio_port *cygnus_dai_get_portinfo(struct snd_soc_dai *dai)
@@ -679,40 +541,55 @@ static int pll_configure_mclk(struct cygnus_audio *cygaud, u32 mclk,
679 return p_entry->pll_ch_num; 541 return p_entry->pll_ch_num;
680} 542}
681 543
682static int cygnus_ssp_set_clocks(struct cygnus_aio_port *aio, 544static int cygnus_ssp_set_clocks(struct cygnus_aio_port *aio)
683 struct cygnus_audio *cygaud)
684{ 545{
685 u32 value, i = 0; 546 u32 value;
686 u32 mask = 0xf; 547 u32 mask = 0xf;
687 u32 sclk; 548 u32 sclk;
688 bool found = false; 549 u32 mclk_rate;
689 const struct _ssp_clk_coeff *p_entry = NULL; 550 unsigned int bit_rate;
551 unsigned int ratio;
690 552
691 for (i = 0; i < ARRAY_SIZE(ssp_clk_coeff); i++) { 553 bit_rate = aio->bit_per_frame * aio->lrclk;
692 p_entry = &ssp_clk_coeff[i]; 554
693 if ((p_entry->rate == aio->lrclk) && 555 /*
694 (p_entry->sclk_rate == aio->bit_per_frame) && 556 * Check if the bit clock can be generated from the given MCLK.
695 (p_entry->mclk == aio->mclk)) { 557 * MCLK must be a perfect multiple of bit clock and must be one of the
696 found = true; 558 * following values... (2,4,6,8,10,12,14)
697 break; 559 */
698 } 560 if ((aio->mclk % bit_rate) != 0)
699 } 561 return -EINVAL;
700 if (!found) { 562
563 ratio = aio->mclk / bit_rate;
564 switch (ratio) {
565 case 2:
566 case 4:
567 case 6:
568 case 8:
569 case 10:
570 case 12:
571 case 14:
572 mclk_rate = ratio / 2;
573 break;
574
575 default:
701 dev_err(aio->cygaud->dev, 576 dev_err(aio->cygaud->dev,
702 "No valid match found in ssp_clk_coeff array\n"); 577 "Invalid combination of MCLK and BCLK\n");
703 dev_err(aio->cygaud->dev, "lrclk = %u, bits/frame = %u, mclk = %u\n", 578 dev_err(aio->cygaud->dev, "lrclk = %u, bits/frame = %u, mclk = %u\n",
704 aio->lrclk, aio->bit_per_frame, aio->mclk); 579 aio->lrclk, aio->bit_per_frame, aio->mclk);
705 return -EINVAL; 580 return -EINVAL;
706 } 581 }
707 582
708 sclk = aio->bit_per_frame;
709 if (sclk == 512)
710 sclk = 0;
711 /* sclks_per_1fs_div = sclk cycles/32 */
712 sclk /= 32;
713 /* Set sclk rate */ 583 /* Set sclk rate */
714 switch (aio->port_type) { 584 switch (aio->port_type) {
715 case PORT_TDM: 585 case PORT_TDM:
586 sclk = aio->bit_per_frame;
587 if (sclk == 512)
588 sclk = 0;
589
590 /* sclks_per_1fs_div = sclk cycles/32 */
591 sclk /= 32;
592
716 /* Set number of bitclks per frame */ 593 /* Set number of bitclks per frame */
717 value = readl(aio->cygaud->audio + aio->regs.i2s_cfg); 594 value = readl(aio->cygaud->audio + aio->regs.i2s_cfg);
718 value &= ~(mask << I2S_OUT_CFGX_SCLKS_PER_1FS_DIV32); 595 value &= ~(mask << I2S_OUT_CFGX_SCLKS_PER_1FS_DIV32);
@@ -731,7 +608,7 @@ static int cygnus_ssp_set_clocks(struct cygnus_aio_port *aio,
731 /* Set MCLK_RATE ssp port (spdif and ssp are the same) */ 608 /* Set MCLK_RATE ssp port (spdif and ssp are the same) */
732 value = readl(aio->cygaud->audio + aio->regs.i2s_mclk_cfg); 609 value = readl(aio->cygaud->audio + aio->regs.i2s_mclk_cfg);
733 value &= ~(0xf << I2S_OUT_MCLKRATE_SHIFT); 610 value &= ~(0xf << I2S_OUT_MCLKRATE_SHIFT);
734 value |= (p_entry->mclk_rate << I2S_OUT_MCLKRATE_SHIFT); 611 value |= (mclk_rate << I2S_OUT_MCLKRATE_SHIFT);
735 writel(value, aio->cygaud->audio + aio->regs.i2s_mclk_cfg); 612 writel(value, aio->cygaud->audio + aio->regs.i2s_mclk_cfg);
736 613
737 dev_dbg(aio->cygaud->dev, "mclk cfg reg = 0x%x\n", value); 614 dev_dbg(aio->cygaud->dev, "mclk cfg reg = 0x%x\n", value);
@@ -745,7 +622,6 @@ static int cygnus_ssp_hw_params(struct snd_pcm_substream *substream,
745 struct snd_soc_dai *dai) 622 struct snd_soc_dai *dai)
746{ 623{
747 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(dai); 624 struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(dai);
748 struct cygnus_audio *cygaud = snd_soc_dai_get_drvdata(dai);
749 int rate, bitres; 625 int rate, bitres;
750 u32 value; 626 u32 value;
751 u32 mask = 0x1f; 627 u32 mask = 0x1f;
@@ -841,7 +717,7 @@ static int cygnus_ssp_hw_params(struct snd_pcm_substream *substream,
841 aio->lrclk = rate; 717 aio->lrclk = rate;
842 718
843 if (!aio->is_slave) 719 if (!aio->is_slave)
844 ret = cygnus_ssp_set_clocks(aio, cygaud); 720 ret = cygnus_ssp_set_clocks(aio);
845 721
846 return ret; 722 return ret;
847} 723}
@@ -888,6 +764,11 @@ static int cygnus_ssp_startup(struct snd_pcm_substream *substream,
888 else 764 else
889 aio->clk_trace.cap_en = true; 765 aio->clk_trace.cap_en = true;
890 766
767 substream->runtime->hw.rate_min = CYGNUS_RATE_MIN;
768 substream->runtime->hw.rate_max = CYGNUS_RATE_MAX;
769
770 snd_pcm_hw_constraint_list(substream->runtime, 0,
771 SNDRV_PCM_HW_PARAM_RATE, &cygnus_rate_constraint);
891 return 0; 772 return 0;
892} 773}
893 774
@@ -1261,9 +1142,7 @@ static const struct snd_soc_dai_ops cygnus_ssp_dai_ops = {
1261 .playback = { \ 1142 .playback = { \
1262 .channels_min = 1, \ 1143 .channels_min = 1, \
1263 .channels_max = 16, \ 1144 .channels_max = 16, \
1264 .rates = CYGNUS_TDM_RATE | SNDRV_PCM_RATE_88200 | \ 1145 .rates = SNDRV_PCM_RATE_KNOT, \
1265 SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 | \
1266 SNDRV_PCM_RATE_192000, \
1267 .formats = SNDRV_PCM_FMTBIT_S8 | \ 1146 .formats = SNDRV_PCM_FMTBIT_S8 | \
1268 SNDRV_PCM_FMTBIT_S16_LE | \ 1147 SNDRV_PCM_FMTBIT_S16_LE | \
1269 SNDRV_PCM_FMTBIT_S32_LE, \ 1148 SNDRV_PCM_FMTBIT_S32_LE, \
@@ -1271,9 +1150,7 @@ static const struct snd_soc_dai_ops cygnus_ssp_dai_ops = {
1271 .capture = { \ 1150 .capture = { \
1272 .channels_min = 2, \ 1151 .channels_min = 2, \
1273 .channels_max = 16, \ 1152 .channels_max = 16, \
1274 .rates = CYGNUS_TDM_RATE | SNDRV_PCM_RATE_88200 | \ 1153 .rates = SNDRV_PCM_RATE_KNOT, \
1275 SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 | \
1276 SNDRV_PCM_RATE_192000, \
1277 .formats = SNDRV_PCM_FMTBIT_S16_LE | \ 1154 .formats = SNDRV_PCM_FMTBIT_S16_LE | \
1278 SNDRV_PCM_FMTBIT_S32_LE, \ 1155 SNDRV_PCM_FMTBIT_S32_LE, \
1279 }, \ 1156 }, \
@@ -1288,14 +1165,12 @@ static const struct snd_soc_dai_driver cygnus_ssp_dai_info[] = {
1288 INIT_CPU_DAI(2), 1165 INIT_CPU_DAI(2),
1289}; 1166};
1290 1167
1291static struct snd_soc_dai_driver cygnus_spdif_dai_info = { 1168static const struct snd_soc_dai_driver cygnus_spdif_dai_info = {
1292 .name = "cygnus-spdif", 1169 .name = "cygnus-spdif",
1293 .playback = { 1170 .playback = {
1294 .channels_min = 2, 1171 .channels_min = 2,
1295 .channels_max = 2, 1172 .channels_max = 2,
1296 .rates = CYGNUS_TDM_RATE | SNDRV_PCM_RATE_88200 | 1173 .rates = SNDRV_PCM_RATE_KNOT,
1297 SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |
1298 SNDRV_PCM_RATE_192000,
1299 .formats = SNDRV_PCM_FMTBIT_S16_LE | 1174 .formats = SNDRV_PCM_FMTBIT_S16_LE |
1300 SNDRV_PCM_FMTBIT_S32_LE, 1175 SNDRV_PCM_FMTBIT_S32_LE,
1301 }, 1176 },
diff --git a/sound/soc/blackfin/bf5xx-ac97-pcm.c b/sound/soc/blackfin/bf5xx-ac97-pcm.c
index 913e29275f4e..8c1d1983b8f9 100644
--- a/sound/soc/blackfin/bf5xx-ac97-pcm.c
+++ b/sound/soc/blackfin/bf5xx-ac97-pcm.c
@@ -308,7 +308,7 @@ static int bf5xx_pcm_copy_user(struct snd_pcm_substream *substream,
308} 308}
309#endif 309#endif
310 310
311static struct snd_pcm_ops bf5xx_pcm_ac97_ops = { 311static const struct snd_pcm_ops bf5xx_pcm_ac97_ops = {
312 .open = bf5xx_pcm_open, 312 .open = bf5xx_pcm_open,
313 .ioctl = snd_pcm_lib_ioctl, 313 .ioctl = snd_pcm_lib_ioctl,
314 .hw_params = bf5xx_pcm_hw_params, 314 .hw_params = bf5xx_pcm_hw_params,
diff --git a/sound/soc/blackfin/bf5xx-i2s-pcm.c b/sound/soc/blackfin/bf5xx-i2s-pcm.c
index 470d99abf6f6..51cae76f14e6 100644
--- a/sound/soc/blackfin/bf5xx-i2s-pcm.c
+++ b/sound/soc/blackfin/bf5xx-i2s-pcm.c
@@ -318,7 +318,7 @@ static int bf5xx_pcm_silence(struct snd_pcm_substream *substream,
318 return 0; 318 return 0;
319} 319}
320 320
321static struct snd_pcm_ops bf5xx_pcm_i2s_ops = { 321static const struct snd_pcm_ops bf5xx_pcm_i2s_ops = {
322 .open = bf5xx_pcm_open, 322 .open = bf5xx_pcm_open,
323 .ioctl = snd_pcm_lib_ioctl, 323 .ioctl = snd_pcm_lib_ioctl,
324 .hw_params = bf5xx_pcm_hw_params, 324 .hw_params = bf5xx_pcm_hw_params,
diff --git a/sound/soc/blackfin/bf6xx-i2s.c b/sound/soc/blackfin/bf6xx-i2s.c
index bd3b4d464145..819cff149a25 100644
--- a/sound/soc/blackfin/bf6xx-i2s.c
+++ b/sound/soc/blackfin/bf6xx-i2s.c
@@ -164,7 +164,7 @@ static int bfin_i2s_resume(struct snd_soc_dai *dai)
164#define BFIN_I2S_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | \ 164#define BFIN_I2S_FORMATS (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | \
165 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) 165 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
166 166
167static struct snd_soc_dai_ops bfin_i2s_dai_ops = { 167static const struct snd_soc_dai_ops bfin_i2s_dai_ops = {
168 .hw_params = bfin_i2s_hw_params, 168 .hw_params = bfin_i2s_hw_params,
169 .set_fmt = bfin_i2s_set_dai_fmt, 169 .set_fmt = bfin_i2s_set_dai_fmt,
170}; 170};
diff --git a/sound/soc/blackfin/bf6xx-sport.c b/sound/soc/blackfin/bf6xx-sport.c
index dfb744381c42..d2caadfe7b6d 100644
--- a/sound/soc/blackfin/bf6xx-sport.c
+++ b/sound/soc/blackfin/bf6xx-sport.c
@@ -129,7 +129,7 @@ static void setup_desc(struct dmasg *desc, void *buf, int fragcount,
129 129
130 for (i = 0; i < fragcount; ++i) { 130 for (i = 0; i < fragcount; ++i) {
131 desc[i].next_desc_addr = &(desc[i + 1]); 131 desc[i].next_desc_addr = &(desc[i + 1]);
132 desc[i].start_addr = (unsigned long)buf + i*fragsize; 132 desc[i].start_addr = (unsigned long)buf + i * fragsize;
133 desc[i].cfg = cfg; 133 desc[i].cfg = cfg;
134 desc[i].x_count = count; 134 desc[i].x_count = count;
135 desc[i].x_modify = wdsize; 135 desc[i].x_modify = wdsize;
@@ -138,7 +138,7 @@ static void setup_desc(struct dmasg *desc, void *buf, int fragcount,
138 } 138 }
139 139
140 /* make circular */ 140 /* make circular */
141 desc[fragcount-1].next_desc_addr = desc; 141 desc[fragcount - 1].next_desc_addr = desc;
142} 142}
143 143
144int sport_config_tx_dma(struct sport_device *sport, void *buf, 144int sport_config_tx_dma(struct sport_device *sport, void *buf,
@@ -148,7 +148,7 @@ int sport_config_tx_dma(struct sport_device *sport, void *buf,
148 unsigned int cfg; 148 unsigned int cfg;
149 dma_addr_t addr; 149 dma_addr_t addr;
150 150
151 count = fragsize/sport->wdsize; 151 count = fragsize / sport->wdsize;
152 152
153 if (sport->tx_desc) 153 if (sport->tx_desc)
154 dma_free_coherent(NULL, sport->tx_desc_size, 154 dma_free_coherent(NULL, sport->tx_desc_size,
@@ -166,8 +166,7 @@ int sport_config_tx_dma(struct sport_device *sport, void *buf,
166 cfg = DMAFLOW_LIST | DI_EN | compute_wdsize(sport->wdsize) | NDSIZE_6; 166 cfg = DMAFLOW_LIST | DI_EN | compute_wdsize(sport->wdsize) | NDSIZE_6;
167 167
168 setup_desc(sport->tx_desc, buf, fragcount, fragsize, 168 setup_desc(sport->tx_desc, buf, fragcount, fragsize,
169 cfg|DMAEN, count, sport->wdsize); 169 cfg | DMAEN, count, sport->wdsize);
170
171 return 0; 170 return 0;
172} 171}
173EXPORT_SYMBOL(sport_config_tx_dma); 172EXPORT_SYMBOL(sport_config_tx_dma);
@@ -179,7 +178,7 @@ int sport_config_rx_dma(struct sport_device *sport, void *buf,
179 unsigned int cfg; 178 unsigned int cfg;
180 dma_addr_t addr; 179 dma_addr_t addr;
181 180
182 count = fragsize/sport->wdsize; 181 count = fragsize / sport->wdsize;
183 182
184 if (sport->rx_desc) 183 if (sport->rx_desc)
185 dma_free_coherent(NULL, sport->rx_desc_size, 184 dma_free_coherent(NULL, sport->rx_desc_size,
@@ -198,8 +197,7 @@ int sport_config_rx_dma(struct sport_device *sport, void *buf,
198 | WNR | NDSIZE_6; 197 | WNR | NDSIZE_6;
199 198
200 setup_desc(sport->rx_desc, buf, fragcount, fragsize, 199 setup_desc(sport->rx_desc, buf, fragcount, fragsize,
201 cfg|DMAEN, count, sport->wdsize); 200 cfg | DMAEN, count, sport->wdsize);
202
203 return 0; 201 return 0;
204} 202}
205EXPORT_SYMBOL(sport_config_rx_dma); 203EXPORT_SYMBOL(sport_config_rx_dma);
@@ -226,7 +224,7 @@ static irqreturn_t sport_tx_irq(int irq, void *dev_id)
226 static unsigned long status; 224 static unsigned long status;
227 225
228 status = get_dma_curr_irqstat(sport->tx_dma_chan); 226 status = get_dma_curr_irqstat(sport->tx_dma_chan);
229 if (status & (DMA_DONE|DMA_ERR)) { 227 if (status & (DMA_DONE | DMA_ERR)) {
230 clear_dma_irqstat(sport->tx_dma_chan); 228 clear_dma_irqstat(sport->tx_dma_chan);
231 SSYNC(); 229 SSYNC();
232 } 230 }
@@ -241,7 +239,7 @@ static irqreturn_t sport_rx_irq(int irq, void *dev_id)
241 unsigned long status; 239 unsigned long status;
242 240
243 status = get_dma_curr_irqstat(sport->rx_dma_chan); 241 status = get_dma_curr_irqstat(sport->rx_dma_chan);
244 if (status & (DMA_DONE|DMA_ERR)) { 242 if (status & (DMA_DONE | DMA_ERR)) {
245 clear_dma_irqstat(sport->rx_dma_chan); 243 clear_dma_irqstat(sport->rx_dma_chan);
246 SSYNC(); 244 SSYNC();
247 } 245 }
@@ -388,26 +386,24 @@ struct sport_device *sport_create(struct platform_device *pdev)
388 int ret; 386 int ret;
389 387
390 sport = kzalloc(sizeof(*sport), GFP_KERNEL); 388 sport = kzalloc(sizeof(*sport), GFP_KERNEL);
391 if (!sport) { 389 if (!sport)
392 dev_err(dev, "Unable to allocate memory for sport device\n");
393 return NULL; 390 return NULL;
394 } 391
395 sport->pdev = pdev; 392 sport->pdev = pdev;
396 393
397 ret = sport_get_resource(sport); 394 ret = sport_get_resource(sport);
398 if (ret) { 395 if (ret)
399 kfree(sport); 396 goto free_data;
400 return NULL;
401 }
402 397
403 ret = sport_request_resource(sport); 398 ret = sport_request_resource(sport);
404 if (ret) { 399 if (ret)
405 kfree(sport); 400 goto free_data;
406 return NULL;
407 }
408 401
409 dev_dbg(dev, "SPORT create success\n"); 402 dev_dbg(dev, "SPORT create success\n");
410 return sport; 403 return sport;
404free_data:
405 kfree(sport);
406 return NULL;
411} 407}
412EXPORT_SYMBOL(sport_create); 408EXPORT_SYMBOL(sport_create);
413 409
diff --git a/sound/soc/cirrus/edb93xx.c b/sound/soc/cirrus/edb93xx.c
index 85962657aabe..c53bd6f2c2d7 100644
--- a/sound/soc/cirrus/edb93xx.c
+++ b/sound/soc/cirrus/edb93xx.c
@@ -56,7 +56,7 @@ static int edb93xx_hw_params(struct snd_pcm_substream *substream,
56 SND_SOC_CLOCK_OUT); 56 SND_SOC_CLOCK_OUT);
57} 57}
58 58
59static struct snd_soc_ops edb93xx_ops = { 59static const struct snd_soc_ops edb93xx_ops = {
60 .hw_params = edb93xx_hw_params, 60 .hw_params = edb93xx_hw_params,
61}; 61};
62 62
diff --git a/sound/soc/cirrus/snappercl15.c b/sound/soc/cirrus/snappercl15.c
index 98089df08df6..2334ec19e7eb 100644
--- a/sound/soc/cirrus/snappercl15.c
+++ b/sound/soc/cirrus/snappercl15.c
@@ -45,7 +45,7 @@ static int snappercl15_hw_params(struct snd_pcm_substream *substream,
45 return 0; 45 return 0;
46} 46}
47 47
48static struct snd_soc_ops snappercl15_ops = { 48static const struct snd_soc_ops snappercl15_ops = {
49 .hw_params = snappercl15_hw_params, 49 .hw_params = snappercl15_hw_params,
50}; 50};
51 51
diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
index b013a4c62b63..848c5fe49bc7 100644
--- a/sound/soc/codecs/88pm860x-codec.c
+++ b/sound/soc/codecs/88pm860x-codec.c
@@ -1355,7 +1355,7 @@ static struct regmap *pm860x_get_regmap(struct device *dev)
1355 return pm860x->regmap; 1355 return pm860x->regmap;
1356} 1356}
1357 1357
1358static struct snd_soc_codec_driver soc_codec_dev_pm860x = { 1358static const struct snd_soc_codec_driver soc_codec_dev_pm860x = {
1359 .probe = pm860x_probe, 1359 .probe = pm860x_probe,
1360 .remove = pm860x_remove, 1360 .remove = pm860x_remove,
1361 .set_bias_level = pm860x_set_bias_level, 1361 .set_bias_level = pm860x_set_bias_level,
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 6c78b0b49b81..d81bc4195603 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -60,6 +60,7 @@ config SND_SOC_ALL_CODECS
60 select SND_SOC_CS4271_I2C if I2C 60 select SND_SOC_CS4271_I2C if I2C
61 select SND_SOC_CS4271_SPI if SPI_MASTER 61 select SND_SOC_CS4271_SPI if SPI_MASTER
62 select SND_SOC_CS42XX8_I2C if I2C 62 select SND_SOC_CS42XX8_I2C if I2C
63 select SND_SOC_CS43130 if I2C
63 select SND_SOC_CS4349 if I2C 64 select SND_SOC_CS4349 if I2C
64 select SND_SOC_CS47L24 if MFD_CS47L24 65 select SND_SOC_CS47L24 if MFD_CS47L24
65 select SND_SOC_CS53L30 if I2C 66 select SND_SOC_CS53L30 if I2C
@@ -71,7 +72,7 @@ config SND_SOC_ALL_CODECS
71 select SND_SOC_DA732X if I2C 72 select SND_SOC_DA732X if I2C
72 select SND_SOC_DA9055 if I2C 73 select SND_SOC_DA9055 if I2C
73 select SND_SOC_DIO2125 74 select SND_SOC_DIO2125
74 select SND_SOC_DMIC 75 select SND_SOC_DMIC if GPIOLIB
75 select SND_SOC_ES8316 if I2C 76 select SND_SOC_ES8316 if I2C
76 select SND_SOC_ES8328_SPI if SPI_MASTER 77 select SND_SOC_ES8328_SPI if SPI_MASTER
77 select SND_SOC_ES8328_I2C if I2C 78 select SND_SOC_ES8328_I2C if I2C
@@ -114,6 +115,7 @@ config SND_SOC_ALL_CODECS
114 select SND_SOC_PCM5102A 115 select SND_SOC_PCM5102A
115 select SND_SOC_PCM512x_I2C if I2C 116 select SND_SOC_PCM512x_I2C if I2C
116 select SND_SOC_PCM512x_SPI if SPI_MASTER 117 select SND_SOC_PCM512x_SPI if SPI_MASTER
118 select SND_SOC_RT274 if I2C
117 select SND_SOC_RT286 if I2C 119 select SND_SOC_RT286 if I2C
118 select SND_SOC_RT298 if I2C 120 select SND_SOC_RT298 if I2C
119 select SND_SOC_RT5514 if I2C 121 select SND_SOC_RT5514 if I2C
@@ -486,6 +488,11 @@ config SND_SOC_CS42XX8_I2C
486 select SND_SOC_CS42XX8 488 select SND_SOC_CS42XX8
487 select REGMAP_I2C 489 select REGMAP_I2C
488 490
491# Cirrus Logic CS43130 HiFi DAC
492config SND_SOC_CS43130
493 tristate "Cirrus Logic CS43130 CODEC"
494 depends on I2C
495
489# Cirrus Logic CS4349 HiFi DAC 496# Cirrus Logic CS4349 HiFi DAC
490config SND_SOC_CS4349 497config SND_SOC_CS4349
491 tristate "Cirrus Logic CS4349 CODEC" 498 tristate "Cirrus Logic CS4349 CODEC"
@@ -716,11 +723,17 @@ config SND_SOC_RL6231
716 723
717config SND_SOC_RL6347A 724config SND_SOC_RL6347A
718 tristate 725 tristate
726 default y if SND_SOC_RT274=y
719 default y if SND_SOC_RT286=y 727 default y if SND_SOC_RT286=y
720 default y if SND_SOC_RT298=y 728 default y if SND_SOC_RT298=y
729 default m if SND_SOC_RT274=m
721 default m if SND_SOC_RT286=m 730 default m if SND_SOC_RT286=m
722 default m if SND_SOC_RT298=m 731 default m if SND_SOC_RT298=m
723 732
733config SND_SOC_RT274
734 tristate
735 depends on I2C
736
724config SND_SOC_RT286 737config SND_SOC_RT286
725 tristate 738 tristate
726 depends on I2C 739 depends on I2C
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index 1755a54e3dc9..696e371f0e0c 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -53,6 +53,7 @@ snd-soc-cs4271-i2c-objs := cs4271-i2c.o
53snd-soc-cs4271-spi-objs := cs4271-spi.o 53snd-soc-cs4271-spi-objs := cs4271-spi.o
54snd-soc-cs42xx8-objs := cs42xx8.o 54snd-soc-cs42xx8-objs := cs42xx8.o
55snd-soc-cs42xx8-i2c-objs := cs42xx8-i2c.o 55snd-soc-cs42xx8-i2c-objs := cs42xx8-i2c.o
56snd-soc-cs43130-objs := cs43130.o
56snd-soc-cs4349-objs := cs4349.o 57snd-soc-cs4349-objs := cs4349.o
57snd-soc-cs47l24-objs := cs47l24.o 58snd-soc-cs47l24-objs := cs47l24.o
58snd-soc-cs53l30-objs := cs53l30.o 59snd-soc-cs53l30-objs := cs53l30.o
@@ -113,6 +114,7 @@ snd-soc-pcm512x-i2c-objs := pcm512x-i2c.o
113snd-soc-pcm512x-spi-objs := pcm512x-spi.o 114snd-soc-pcm512x-spi-objs := pcm512x-spi.o
114snd-soc-rl6231-objs := rl6231.o 115snd-soc-rl6231-objs := rl6231.o
115snd-soc-rl6347a-objs := rl6347a.o 116snd-soc-rl6347a-objs := rl6347a.o
117snd-soc-rt274-objs := rt274.o
116snd-soc-rt286-objs := rt286.o 118snd-soc-rt286-objs := rt286.o
117snd-soc-rt298-objs := rt298.o 119snd-soc-rt298-objs := rt298.o
118snd-soc-rt5514-objs := rt5514.o 120snd-soc-rt5514-objs := rt5514.o
@@ -290,6 +292,7 @@ obj-$(CONFIG_SND_SOC_CS4271_I2C) += snd-soc-cs4271-i2c.o
290obj-$(CONFIG_SND_SOC_CS4271_SPI) += snd-soc-cs4271-spi.o 292obj-$(CONFIG_SND_SOC_CS4271_SPI) += snd-soc-cs4271-spi.o
291obj-$(CONFIG_SND_SOC_CS42XX8) += snd-soc-cs42xx8.o 293obj-$(CONFIG_SND_SOC_CS42XX8) += snd-soc-cs42xx8.o
292obj-$(CONFIG_SND_SOC_CS42XX8_I2C) += snd-soc-cs42xx8-i2c.o 294obj-$(CONFIG_SND_SOC_CS42XX8_I2C) += snd-soc-cs42xx8-i2c.o
295obj-$(CONFIG_SND_SOC_CS43130) += snd-soc-cs43130.o
293obj-$(CONFIG_SND_SOC_CS4349) += snd-soc-cs4349.o 296obj-$(CONFIG_SND_SOC_CS4349) += snd-soc-cs4349.o
294obj-$(CONFIG_SND_SOC_CS47L24) += snd-soc-cs47l24.o 297obj-$(CONFIG_SND_SOC_CS47L24) += snd-soc-cs47l24.o
295obj-$(CONFIG_SND_SOC_CS53L30) += snd-soc-cs53l30.o 298obj-$(CONFIG_SND_SOC_CS53L30) += snd-soc-cs53l30.o
@@ -320,6 +323,7 @@ obj-$(CONFIG_SND_SOC_MAX98088) += snd-soc-max98088.o
320obj-$(CONFIG_SND_SOC_MAX98090) += snd-soc-max98090.o 323obj-$(CONFIG_SND_SOC_MAX98090) += snd-soc-max98090.o
321obj-$(CONFIG_SND_SOC_MAX98095) += snd-soc-max98095.o 324obj-$(CONFIG_SND_SOC_MAX98095) += snd-soc-max98095.o
322obj-$(CONFIG_SND_SOC_MAX98357A) += snd-soc-max98357a.o 325obj-$(CONFIG_SND_SOC_MAX98357A) += snd-soc-max98357a.o
326obj-$(CONFIG_SND_SOC_MAX98371) += snd-soc-max98371.o
323obj-$(CONFIG_SND_SOC_MAX9867) += snd-soc-max9867.o 327obj-$(CONFIG_SND_SOC_MAX9867) += snd-soc-max9867.o
324obj-$(CONFIG_SND_SOC_MAX98925) += snd-soc-max98925.o 328obj-$(CONFIG_SND_SOC_MAX98925) += snd-soc-max98925.o
325obj-$(CONFIG_SND_SOC_MAX98926) += snd-soc-max98926.o 329obj-$(CONFIG_SND_SOC_MAX98926) += snd-soc-max98926.o
@@ -349,6 +353,7 @@ obj-$(CONFIG_SND_SOC_PCM512x_I2C) += snd-soc-pcm512x-i2c.o
349obj-$(CONFIG_SND_SOC_PCM512x_SPI) += snd-soc-pcm512x-spi.o 353obj-$(CONFIG_SND_SOC_PCM512x_SPI) += snd-soc-pcm512x-spi.o
350obj-$(CONFIG_SND_SOC_RL6231) += snd-soc-rl6231.o 354obj-$(CONFIG_SND_SOC_RL6231) += snd-soc-rl6231.o
351obj-$(CONFIG_SND_SOC_RL6347A) += snd-soc-rl6347a.o 355obj-$(CONFIG_SND_SOC_RL6347A) += snd-soc-rl6347a.o
356obj-$(CONFIG_SND_SOC_RT274) += snd-soc-rt274.o
352obj-$(CONFIG_SND_SOC_RT286) += snd-soc-rt286.o 357obj-$(CONFIG_SND_SOC_RT286) += snd-soc-rt286.o
353obj-$(CONFIG_SND_SOC_RT298) += snd-soc-rt298.o 358obj-$(CONFIG_SND_SOC_RT298) += snd-soc-rt298.o
354obj-$(CONFIG_SND_SOC_RT5514) += snd-soc-rt5514.o 359obj-$(CONFIG_SND_SOC_RT5514) += snd-soc-rt5514.o
@@ -372,6 +377,7 @@ obj-$(CONFIG_SND_SOC_SIGMADSP_REGMAP) += snd-soc-sigmadsp-regmap.o
372obj-$(CONFIG_SND_SOC_SI476X) += snd-soc-si476x.o 377obj-$(CONFIG_SND_SOC_SI476X) += snd-soc-si476x.o
373obj-$(CONFIG_SND_SOC_SN95031) +=snd-soc-sn95031.o 378obj-$(CONFIG_SND_SOC_SN95031) +=snd-soc-sn95031.o
374obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif-rx.o snd-soc-spdif-tx.o 379obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif-rx.o snd-soc-spdif-tx.o
380obj-$(CONFIG_SND_SOC_SIRF_AUDIO_CODEC) += sirf-audio-codec.o
375obj-$(CONFIG_SND_SOC_SSM2518) += snd-soc-ssm2518.o 381obj-$(CONFIG_SND_SOC_SSM2518) += snd-soc-ssm2518.o
376obj-$(CONFIG_SND_SOC_SSM2602) += snd-soc-ssm2602.o 382obj-$(CONFIG_SND_SOC_SSM2602) += snd-soc-ssm2602.o
377obj-$(CONFIG_SND_SOC_SSM2602_SPI) += snd-soc-ssm2602-spi.o 383obj-$(CONFIG_SND_SOC_SSM2602_SPI) += snd-soc-ssm2602-spi.o
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 312b2a11abb6..006627b8c3a8 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -2523,7 +2523,7 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)
2523 return status; 2523 return status;
2524} 2524}
2525 2525
2526static struct snd_soc_codec_driver ab8500_codec_driver = { 2526static const struct snd_soc_codec_driver ab8500_codec_driver = {
2527 .probe = ab8500_codec_probe, 2527 .probe = ab8500_codec_probe,
2528 .component_driver = { 2528 .component_driver = {
2529 .controls = ab8500_ctrls, 2529 .controls = ab8500_ctrls,
diff --git a/sound/soc/codecs/ac97.c b/sound/soc/codecs/ac97.c
index f7f04c6be01e..440b4ce54376 100644
--- a/sound/soc/codecs/ac97.c
+++ b/sound/soc/codecs/ac97.c
@@ -112,7 +112,7 @@ static int ac97_soc_resume(struct snd_soc_codec *codec)
112#define ac97_soc_resume NULL 112#define ac97_soc_resume NULL
113#endif 113#endif
114 114
115static struct snd_soc_codec_driver soc_codec_dev_ac97 = { 115static const struct snd_soc_codec_driver soc_codec_dev_ac97 = {
116 .probe = ac97_soc_probe, 116 .probe = ac97_soc_probe,
117 .suspend = ac97_soc_suspend, 117 .suspend = ac97_soc_suspend,
118 .resume = ac97_soc_resume, 118 .resume = ac97_soc_resume,
diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c
index a478239aadac..d0361caad09e 100644
--- a/sound/soc/codecs/ad1836.c
+++ b/sound/soc/codecs/ad1836.c
@@ -321,7 +321,7 @@ static int ad1836_remove(struct snd_soc_codec *codec)
321 AD1836_ADC_SERFMT_MASK, 0); 321 AD1836_ADC_SERFMT_MASK, 0);
322} 322}
323 323
324static struct snd_soc_codec_driver soc_codec_dev_ad1836 = { 324static const struct snd_soc_codec_driver soc_codec_dev_ad1836 = {
325 .probe = ad1836_probe, 325 .probe = ad1836_probe,
326 .remove = ad1836_remove, 326 .remove = ad1836_remove,
327 .suspend = ad1836_suspend, 327 .suspend = ad1836_suspend,
diff --git a/sound/soc/codecs/ad193x.c b/sound/soc/codecs/ad193x.c
index d643557d89a7..d10988eec0c1 100644
--- a/sound/soc/codecs/ad193x.c
+++ b/sound/soc/codecs/ad193x.c
@@ -408,7 +408,7 @@ static int ad193x_codec_probe(struct snd_soc_codec *codec)
408 return 0; 408 return 0;
409} 409}
410 410
411static struct snd_soc_codec_driver soc_codec_dev_ad193x = { 411static const struct snd_soc_codec_driver soc_codec_dev_ad193x = {
412 .probe = ad193x_codec_probe, 412 .probe = ad193x_codec_probe,
413 .component_driver = { 413 .component_driver = {
414 .controls = ad193x_snd_controls, 414 .controls = ad193x_snd_controls,
diff --git a/sound/soc/codecs/ad1980.c b/sound/soc/codecs/ad1980.c
index b7c1b9f4bf5f..ce89bfb42094 100644
--- a/sound/soc/codecs/ad1980.c
+++ b/sound/soc/codecs/ad1980.c
@@ -295,7 +295,7 @@ static int ad1980_soc_remove(struct snd_soc_codec *codec)
295 return 0; 295 return 0;
296} 296}
297 297
298static struct snd_soc_codec_driver soc_codec_dev_ad1980 = { 298static const struct snd_soc_codec_driver soc_codec_dev_ad1980 = {
299 .probe = ad1980_soc_probe, 299 .probe = ad1980_soc_probe,
300 .remove = ad1980_soc_remove, 300 .remove = ad1980_soc_remove,
301 301
diff --git a/sound/soc/codecs/ad73311.c b/sound/soc/codecs/ad73311.c
index 3e358a49442d..d8d86a0fea60 100644
--- a/sound/soc/codecs/ad73311.c
+++ b/sound/soc/codecs/ad73311.c
@@ -54,7 +54,7 @@ static struct snd_soc_dai_driver ad73311_dai = {
54 .formats = SNDRV_PCM_FMTBIT_S16_LE, }, 54 .formats = SNDRV_PCM_FMTBIT_S16_LE, },
55}; 55};
56 56
57static struct snd_soc_codec_driver soc_codec_dev_ad73311 = { 57static const struct snd_soc_codec_driver soc_codec_dev_ad73311 = {
58 .component_driver = { 58 .component_driver = {
59 .dapm_widgets = ad73311_dapm_widgets, 59 .dapm_widgets = ad73311_dapm_widgets,
60 .num_dapm_widgets = ARRAY_SIZE(ad73311_dapm_widgets), 60 .num_dapm_widgets = ARRAY_SIZE(ad73311_dapm_widgets),
diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c
index 8fa9045571ff..a865945d776a 100644
--- a/sound/soc/codecs/adau1373.c
+++ b/sound/soc/codecs/adau1373.c
@@ -1458,7 +1458,7 @@ static const struct regmap_config adau1373_regmap_config = {
1458 .num_reg_defaults = ARRAY_SIZE(adau1373_reg_defaults), 1458 .num_reg_defaults = ARRAY_SIZE(adau1373_reg_defaults),
1459}; 1459};
1460 1460
1461static struct snd_soc_codec_driver adau1373_codec_driver = { 1461static const struct snd_soc_codec_driver adau1373_codec_driver = {
1462 .probe = adau1373_probe, 1462 .probe = adau1373_probe,
1463 .resume = adau1373_resume, 1463 .resume = adau1373_resume,
1464 .set_bias_level = adau1373_set_bias_level, 1464 .set_bias_level = adau1373_set_bias_level,
diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c
index 3bad1bc8c00a..805afac8146b 100644
--- a/sound/soc/codecs/adau1701.c
+++ b/sound/soc/codecs/adau1701.c
@@ -757,7 +757,7 @@ static int adau1701_resume(struct snd_soc_codec *codec)
757#define adau1701_suspend NULL 757#define adau1701_suspend NULL
758#endif /* CONFIG_PM */ 758#endif /* CONFIG_PM */
759 759
760static struct snd_soc_codec_driver adau1701_codec_drv = { 760static const struct snd_soc_codec_driver adau1701_codec_drv = {
761 .probe = adau1701_probe, 761 .probe = adau1701_probe,
762 .remove = adau1701_remove, 762 .remove = adau1701_remove,
763 .resume = adau1701_resume, 763 .resume = adau1701_resume,
diff --git a/sound/soc/codecs/adau1977.c b/sound/soc/codecs/adau1977.c
index b319db6a69f8..e384f212beb2 100644
--- a/sound/soc/codecs/adau1977.c
+++ b/sound/soc/codecs/adau1977.c
@@ -388,8 +388,7 @@ static int adau1977_power_disable(struct adau1977 *adau1977)
388 388
389 regcache_mark_dirty(adau1977->regmap); 389 regcache_mark_dirty(adau1977->regmap);
390 390
391 if (adau1977->reset_gpio) 391 gpiod_set_value_cansleep(adau1977->reset_gpio, 0);
392 gpiod_set_value_cansleep(adau1977->reset_gpio, 0);
393 392
394 regcache_cache_only(adau1977->regmap, true); 393 regcache_cache_only(adau1977->regmap, true);
395 394
@@ -420,8 +419,7 @@ static int adau1977_power_enable(struct adau1977 *adau1977)
420 goto err_disable_avdd; 419 goto err_disable_avdd;
421 } 420 }
422 421
423 if (adau1977->reset_gpio) 422 gpiod_set_value_cansleep(adau1977->reset_gpio, 1);
424 gpiod_set_value_cansleep(adau1977->reset_gpio, 1);
425 423
426 regcache_cache_only(adau1977->regmap, false); 424 regcache_cache_only(adau1977->regmap, false);
427 425
@@ -867,7 +865,7 @@ static int adau1977_codec_probe(struct snd_soc_codec *codec)
867 return 0; 865 return 0;
868} 866}
869 867
870static struct snd_soc_codec_driver adau1977_codec_driver = { 868static const struct snd_soc_codec_driver adau1977_codec_driver = {
871 .probe = adau1977_codec_probe, 869 .probe = adau1977_codec_probe,
872 .set_bias_level = adau1977_set_bias_level, 870 .set_bias_level = adau1977_set_bias_level,
873 .set_sysclk = adau1977_set_sysclk, 871 .set_sysclk = adau1977_set_sysclk,
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c
index 6e793ebb5883..da7ca81f47cf 100644
--- a/sound/soc/codecs/adav80x.c
+++ b/sound/soc/codecs/adav80x.c
@@ -825,7 +825,7 @@ static int adav80x_resume(struct snd_soc_codec *codec)
825 return 0; 825 return 0;
826} 826}
827 827
828static struct snd_soc_codec_driver adav80x_codec_driver = { 828static const struct snd_soc_codec_driver adav80x_codec_driver = {
829 .probe = adav80x_probe, 829 .probe = adav80x_probe,
830 .resume = adav80x_resume, 830 .resume = adav80x_resume,
831 .set_bias_level = adav80x_set_bias_level, 831 .set_bias_level = adav80x_set_bias_level,
diff --git a/sound/soc/codecs/ads117x.c b/sound/soc/codecs/ads117x.c
index 90c756d183b4..b7f0057c0239 100644
--- a/sound/soc/codecs/ads117x.c
+++ b/sound/soc/codecs/ads117x.c
@@ -58,7 +58,7 @@ static struct snd_soc_dai_driver ads117x_dai = {
58 .formats = ADS117X_FORMATS,}, 58 .formats = ADS117X_FORMATS,},
59}; 59};
60 60
61static struct snd_soc_codec_driver soc_codec_dev_ads117x = { 61static const struct snd_soc_codec_driver soc_codec_dev_ads117x = {
62 .component_driver = { 62 .component_driver = {
63 .dapm_widgets = ads117x_dapm_widgets, 63 .dapm_widgets = ads117x_dapm_widgets,
64 .num_dapm_widgets = ARRAY_SIZE(ads117x_dapm_widgets), 64 .num_dapm_widgets = ARRAY_SIZE(ads117x_dapm_widgets),
diff --git a/sound/soc/codecs/ak4104.c b/sound/soc/codecs/ak4104.c
index 1a9d233c94d0..dbb184118f2e 100644
--- a/sound/soc/codecs/ak4104.c
+++ b/sound/soc/codecs/ak4104.c
@@ -242,7 +242,7 @@ static int ak4104_soc_resume(struct snd_soc_codec *codec)
242#define ak4104_soc_resume NULL 242#define ak4104_soc_resume NULL
243#endif /* CONFIG_PM */ 243#endif /* CONFIG_PM */
244 244
245static struct snd_soc_codec_driver soc_codec_device_ak4104 = { 245static const struct snd_soc_codec_driver soc_codec_device_ak4104 = {
246 .probe = ak4104_probe, 246 .probe = ak4104_probe,
247 .remove = ak4104_remove, 247 .remove = ak4104_remove,
248 .suspend = ak4104_soc_suspend, 248 .suspend = ak4104_soc_suspend,
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index 66cfffde9a12..e3c157dc88db 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -390,7 +390,7 @@ static const struct regmap_config ak4535_regmap = {
390 .num_reg_defaults = ARRAY_SIZE(ak4535_reg_defaults), 390 .num_reg_defaults = ARRAY_SIZE(ak4535_reg_defaults),
391}; 391};
392 392
393static struct snd_soc_codec_driver soc_codec_dev_ak4535 = { 393static const struct snd_soc_codec_driver soc_codec_dev_ak4535 = {
394 .resume = ak4535_resume, 394 .resume = ak4535_resume,
395 .set_bias_level = ak4535_set_bias_level, 395 .set_bias_level = ak4535_set_bias_level,
396 .suspend_bias_off = true, 396 .suspend_bias_off = true,
diff --git a/sound/soc/codecs/ak4554.c b/sound/soc/codecs/ak4554.c
index b92c548b9d29..0bb4fe5c122a 100644
--- a/sound/soc/codecs/ak4554.c
+++ b/sound/soc/codecs/ak4554.c
@@ -64,7 +64,7 @@ static struct snd_soc_dai_driver ak4554_dai = {
64 .symmetric_rates = 1, 64 .symmetric_rates = 1,
65}; 65};
66 66
67static struct snd_soc_codec_driver soc_codec_dev_ak4554 = { 67static const struct snd_soc_codec_driver soc_codec_dev_ak4554 = {
68 .component_driver = { 68 .component_driver = {
69 .dapm_widgets = ak4554_dapm_widgets, 69 .dapm_widgets = ak4554_dapm_widgets,
70 .num_dapm_widgets = ARRAY_SIZE(ak4554_dapm_widgets), 70 .num_dapm_widgets = ARRAY_SIZE(ak4554_dapm_widgets),
diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c
index 690edebf029e..b95bb8b52e51 100644
--- a/sound/soc/codecs/ak4613.c
+++ b/sound/soc/codecs/ak4613.c
@@ -522,7 +522,7 @@ static int ak4613_resume(struct snd_soc_codec *codec)
522 return regcache_sync(regmap); 522 return regcache_sync(regmap);
523} 523}
524 524
525static struct snd_soc_codec_driver soc_codec_dev_ak4613 = { 525static const struct snd_soc_codec_driver soc_codec_dev_ak4613 = {
526 .suspend = ak4613_suspend, 526 .suspend = ak4613_suspend,
527 .resume = ak4613_resume, 527 .resume = ak4613_resume,
528 .set_bias_level = ak4613_set_bias_level, 528 .set_bias_level = ak4613_set_bias_level,
diff --git a/sound/soc/codecs/ak4641.c b/sound/soc/codecs/ak4641.c
index ebdaf56c1d61..60142ff32d4f 100644
--- a/sound/soc/codecs/ak4641.c
+++ b/sound/soc/codecs/ak4641.c
@@ -524,7 +524,7 @@ static struct snd_soc_dai_driver ak4641_dai[] = {
524}, 524},
525}; 525};
526 526
527static struct snd_soc_codec_driver soc_codec_dev_ak4641 = { 527static const struct snd_soc_codec_driver soc_codec_dev_ak4641 = {
528 .component_driver = { 528 .component_driver = {
529 .controls = ak4641_snd_controls, 529 .controls = ak4641_snd_controls,
530 .num_controls = ARRAY_SIZE(ak4641_snd_controls), 530 .num_controls = ARRAY_SIZE(ak4641_snd_controls),
diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 66de8a2013a6..29530c567bd9 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -550,7 +550,7 @@ static int ak4642_probe(struct snd_soc_codec *codec)
550 return 0; 550 return 0;
551} 551}
552 552
553static struct snd_soc_codec_driver soc_codec_dev_ak4642 = { 553static const struct snd_soc_codec_driver soc_codec_dev_ak4642 = {
554 .probe = ak4642_probe, 554 .probe = ak4642_probe,
555 .suspend = ak4642_suspend, 555 .suspend = ak4642_suspend,
556 .resume = ak4642_resume, 556 .resume = ak4642_resume,
diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c
index 6088afaabf62..dcfdff56fc5a 100644
--- a/sound/soc/codecs/ak4671.c
+++ b/sound/soc/codecs/ak4671.c
@@ -610,7 +610,7 @@ static struct snd_soc_dai_driver ak4671_dai = {
610 .ops = &ak4671_dai_ops, 610 .ops = &ak4671_dai_ops,
611}; 611};
612 612
613static struct snd_soc_codec_driver soc_codec_dev_ak4671 = { 613static const struct snd_soc_codec_driver soc_codec_dev_ak4671 = {
614 .set_bias_level = ak4671_set_bias_level, 614 .set_bias_level = ak4671_set_bias_level,
615 .component_driver = { 615 .component_driver = {
616 .controls = ak4671_snd_controls, 616 .controls = ak4671_snd_controls,
diff --git a/sound/soc/codecs/ak5386.c b/sound/soc/codecs/ak5386.c
index 0ef2df223336..d0e16c03815c 100644
--- a/sound/soc/codecs/ak5386.c
+++ b/sound/soc/codecs/ak5386.c
@@ -69,7 +69,7 @@ static int ak5386_soc_resume(struct snd_soc_codec *codec)
69#define ak5386_soc_resume NULL 69#define ak5386_soc_resume NULL
70#endif /* CONFIG_PM */ 70#endif /* CONFIG_PM */
71 71
72static struct snd_soc_codec_driver soc_codec_ak5386 = { 72static const struct snd_soc_codec_driver soc_codec_ak5386 = {
73 .probe = ak5386_soc_probe, 73 .probe = ak5386_soc_probe,
74 .remove = ak5386_soc_remove, 74 .remove = ak5386_soc_remove,
75 .suspend = ak5386_soc_suspend, 75 .suspend = ak5386_soc_suspend,
diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index d2e3a3ef7499..1db965a93632 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -951,7 +951,7 @@ static int alc5623_probe(struct snd_soc_codec *codec)
951 return 0; 951 return 0;
952} 952}
953 953
954static struct snd_soc_codec_driver soc_codec_device_alc5623 = { 954static const struct snd_soc_codec_driver soc_codec_device_alc5623 = {
955 .probe = alc5623_probe, 955 .probe = alc5623_probe,
956 .suspend = alc5623_suspend, 956 .suspend = alc5623_suspend,
957 .resume = alc5623_resume, 957 .resume = alc5623_resume,
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 0a734d910850..a1149f6a8450 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -710,7 +710,7 @@ const struct soc_enum arizona_anc_input_src[] = {
710 ARRAY_SIZE(arizona_anc_input_src_text), 710 ARRAY_SIZE(arizona_anc_input_src_text),
711 arizona_anc_input_src_text), 711 arizona_anc_input_src_text),
712 SOC_ENUM_SINGLE(ARIZONA_FCL_ADC_REFORMATTER_CONTROL, 712 SOC_ENUM_SINGLE(ARIZONA_FCL_ADC_REFORMATTER_CONTROL,
713 ARIZONA_FCL_MIC_MODE_SEL, 713 ARIZONA_FCL_MIC_MODE_SEL_SHIFT,
714 ARRAY_SIZE(arizona_anc_channel_src_text), 714 ARRAY_SIZE(arizona_anc_channel_src_text),
715 arizona_anc_channel_src_text), 715 arizona_anc_channel_src_text),
716 SOC_ENUM_SINGLE(ARIZONA_ANC_SRC, 716 SOC_ENUM_SINGLE(ARIZONA_ANC_SRC,
@@ -718,7 +718,7 @@ const struct soc_enum arizona_anc_input_src[] = {
718 ARRAY_SIZE(arizona_anc_input_src_text), 718 ARRAY_SIZE(arizona_anc_input_src_text),
719 arizona_anc_input_src_text), 719 arizona_anc_input_src_text),
720 SOC_ENUM_SINGLE(ARIZONA_FCR_ADC_REFORMATTER_CONTROL, 720 SOC_ENUM_SINGLE(ARIZONA_FCR_ADC_REFORMATTER_CONTROL,
721 ARIZONA_FCR_MIC_MODE_SEL, 721 ARIZONA_FCR_MIC_MODE_SEL_SHIFT,
722 ARRAY_SIZE(arizona_anc_channel_src_text), 722 ARRAY_SIZE(arizona_anc_channel_src_text),
723 arizona_anc_channel_src_text), 723 arizona_anc_channel_src_text),
724}; 724};
diff --git a/sound/soc/codecs/bt-sco.c b/sound/soc/codecs/bt-sco.c
index 8014e697d540..806191addb44 100644
--- a/sound/soc/codecs/bt-sco.c
+++ b/sound/soc/codecs/bt-sco.c
@@ -62,7 +62,7 @@ static struct snd_soc_dai_driver bt_sco_dai[] = {
62 } 62 }
63}; 63};
64 64
65static struct snd_soc_codec_driver soc_codec_dev_bt_sco = { 65static const struct snd_soc_codec_driver soc_codec_dev_bt_sco = {
66 .component_driver = { 66 .component_driver = {
67 .dapm_widgets = bt_sco_widgets, 67 .dapm_widgets = bt_sco_widgets,
68 .num_dapm_widgets = ARRAY_SIZE(bt_sco_widgets), 68 .num_dapm_widgets = ARRAY_SIZE(bt_sco_widgets),
diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c
index 7a2d9a2ee427..6ed2cc374768 100644
--- a/sound/soc/codecs/cq93vc.c
+++ b/sound/soc/codecs/cq93vc.c
@@ -128,7 +128,7 @@ static struct regmap *cq93vc_get_regmap(struct device *dev)
128 return davinci_vc->regmap; 128 return davinci_vc->regmap;
129} 129}
130 130
131static struct snd_soc_codec_driver soc_codec_dev_cq93vc = { 131static const struct snd_soc_codec_driver soc_codec_dev_cq93vc = {
132 .set_bias_level = cq93vc_set_bias_level, 132 .set_bias_level = cq93vc_set_bias_level,
133 .get_regmap = cq93vc_get_regmap, 133 .get_regmap = cq93vc_get_regmap,
134 .component_driver = { 134 .component_driver = {
diff --git a/sound/soc/codecs/cs35l33.c b/sound/soc/codecs/cs35l33.c
index 6df29fa30fb9..854cf8f27605 100644
--- a/sound/soc/codecs/cs35l33.c
+++ b/sound/soc/codecs/cs35l33.c
@@ -831,7 +831,7 @@ static int cs35l33_probe(struct snd_soc_codec *codec)
831 return 0; 831 return 0;
832} 832}
833 833
834static struct snd_soc_codec_driver soc_codec_dev_cs35l33 = { 834static const struct snd_soc_codec_driver soc_codec_dev_cs35l33 = {
835 .probe = cs35l33_probe, 835 .probe = cs35l33_probe,
836 836
837 .set_bias_level = cs35l33_set_bias_level, 837 .set_bias_level = cs35l33_set_bias_level,
@@ -869,8 +869,7 @@ static int __maybe_unused cs35l33_runtime_resume(struct device *dev)
869 869
870 dev_dbg(dev, "%s\n", __func__); 870 dev_dbg(dev, "%s\n", __func__);
871 871
872 if (cs35l33->reset_gpio) 872 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0);
873 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0);
874 873
875 ret = regulator_bulk_enable(cs35l33->num_core_supplies, 874 ret = regulator_bulk_enable(cs35l33->num_core_supplies,
876 cs35l33->core_supplies); 875 cs35l33->core_supplies);
@@ -881,8 +880,7 @@ static int __maybe_unused cs35l33_runtime_resume(struct device *dev)
881 880
882 regcache_cache_only(cs35l33->regmap, false); 881 regcache_cache_only(cs35l33->regmap, false);
883 882
884 if (cs35l33->reset_gpio) 883 gpiod_set_value_cansleep(cs35l33->reset_gpio, 1);
885 gpiod_set_value_cansleep(cs35l33->reset_gpio, 1);
886 884
887 msleep(CS35L33_BOOT_DELAY); 885 msleep(CS35L33_BOOT_DELAY);
888 886
@@ -1191,8 +1189,7 @@ static int cs35l33_i2c_probe(struct i2c_client *i2c_client,
1191 return ret; 1189 return ret;
1192 } 1190 }
1193 1191
1194 if (cs35l33->reset_gpio) 1192 gpiod_set_value_cansleep(cs35l33->reset_gpio, 1);
1195 gpiod_set_value_cansleep(cs35l33->reset_gpio, 1);
1196 1193
1197 msleep(CS35L33_BOOT_DELAY); 1194 msleep(CS35L33_BOOT_DELAY);
1198 regcache_cache_only(cs35l33->regmap, false); 1195 regcache_cache_only(cs35l33->regmap, false);
@@ -1262,8 +1259,7 @@ static int cs35l33_i2c_remove(struct i2c_client *client)
1262 1259
1263 snd_soc_unregister_codec(&client->dev); 1260 snd_soc_unregister_codec(&client->dev);
1264 1261
1265 if (cs35l33->reset_gpio) 1262 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0);
1266 gpiod_set_value_cansleep(cs35l33->reset_gpio, 0);
1267 1263
1268 pm_runtime_disable(&client->dev); 1264 pm_runtime_disable(&client->dev);
1269 regulator_bulk_disable(cs35l33->num_core_supplies, 1265 regulator_bulk_disable(cs35l33->num_core_supplies,
diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c
index 0a747c66cc6c..1e05026bedca 100644
--- a/sound/soc/codecs/cs35l34.c
+++ b/sound/soc/codecs/cs35l34.c
@@ -779,7 +779,7 @@ static int cs35l34_probe(struct snd_soc_codec *codec)
779} 779}
780 780
781 781
782static struct snd_soc_codec_driver soc_codec_dev_cs35l34 = { 782static const struct snd_soc_codec_driver soc_codec_dev_cs35l34 = {
783 .probe = cs35l34_probe, 783 .probe = cs35l34_probe,
784 784
785 .component_driver = { 785 .component_driver = {
@@ -1138,8 +1138,7 @@ static int cs35l34_i2c_remove(struct i2c_client *client)
1138 1138
1139 snd_soc_unregister_codec(&client->dev); 1139 snd_soc_unregister_codec(&client->dev);
1140 1140
1141 if (cs35l34->reset_gpio) 1141 gpiod_set_value_cansleep(cs35l34->reset_gpio, 0);
1142 gpiod_set_value_cansleep(cs35l34->reset_gpio, 0);
1143 1142
1144 pm_runtime_disable(&client->dev); 1143 pm_runtime_disable(&client->dev);
1145 regulator_bulk_disable(cs35l34->num_core_supplies, 1144 regulator_bulk_disable(cs35l34->num_core_supplies,
diff --git a/sound/soc/codecs/cs35l35.c b/sound/soc/codecs/cs35l35.c
index f1ee184ecab2..129978d1243e 100644
--- a/sound/soc/codecs/cs35l35.c
+++ b/sound/soc/codecs/cs35l35.c
@@ -1079,7 +1079,7 @@ static int cs35l35_codec_probe(struct snd_soc_codec *codec)
1079 return 0; 1079 return 0;
1080} 1080}
1081 1081
1082static struct snd_soc_codec_driver soc_codec_dev_cs35l35 = { 1082static const struct snd_soc_codec_driver soc_codec_dev_cs35l35 = {
1083 .probe = cs35l35_codec_probe, 1083 .probe = cs35l35_codec_probe,
1084 .set_sysclk = cs35l35_codec_set_sysclk, 1084 .set_sysclk = cs35l35_codec_set_sysclk,
1085 .component_driver = { 1085 .component_driver = {
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index d8824773dc29..49a80627af12 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -639,7 +639,7 @@ static int cs4271_codec_remove(struct snd_soc_codec *codec)
639 return 0; 639 return 0;
640}; 640};
641 641
642static struct snd_soc_codec_driver soc_codec_dev_cs4271 = { 642static const struct snd_soc_codec_driver soc_codec_dev_cs4271 = {
643 .probe = cs4271_codec_probe, 643 .probe = cs4271_codec_probe,
644 .remove = cs4271_codec_remove, 644 .remove = cs4271_codec_remove,
645 .suspend = cs4271_soc_suspend, 645 .suspend = cs4271_soc_suspend,
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c
index 55e4520cdcaf..a2324a0e72ee 100644
--- a/sound/soc/codecs/cs42l42.c
+++ b/sound/soc/codecs/cs42l42.c
@@ -911,7 +911,7 @@ static int cs42l42_digital_mute(struct snd_soc_dai *dai, int mute)
911 SNDRV_PCM_FMTBIT_S32_LE) 911 SNDRV_PCM_FMTBIT_S32_LE)
912 912
913 913
914static struct snd_soc_dai_ops cs42l42_ops = { 914static const struct snd_soc_dai_ops cs42l42_ops = {
915 .hw_params = cs42l42_pcm_hw_params, 915 .hw_params = cs42l42_pcm_hw_params,
916 .set_fmt = cs42l42_set_dai_fmt, 916 .set_fmt = cs42l42_set_dai_fmt,
917 .set_sysclk = cs42l42_set_sysclk, 917 .set_sysclk = cs42l42_set_sysclk,
@@ -1898,8 +1898,7 @@ static int cs42l42_i2c_remove(struct i2c_client *i2c_client)
1898 snd_soc_unregister_codec(&i2c_client->dev); 1898 snd_soc_unregister_codec(&i2c_client->dev);
1899 1899
1900 /* Hold down reset */ 1900 /* Hold down reset */
1901 if (cs42l42->reset_gpio) 1901 gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);
1902 gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);
1903 1902
1904 return 0; 1903 return 0;
1905} 1904}
@@ -1913,8 +1912,7 @@ static int cs42l42_runtime_suspend(struct device *dev)
1913 regcache_mark_dirty(cs42l42->regmap); 1912 regcache_mark_dirty(cs42l42->regmap);
1914 1913
1915 /* Hold down reset */ 1914 /* Hold down reset */
1916 if (cs42l42->reset_gpio) 1915 gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);
1917 gpiod_set_value_cansleep(cs42l42->reset_gpio, 0);
1918 1916
1919 /* remove power */ 1917 /* remove power */
1920 regulator_bulk_disable(ARRAY_SIZE(cs42l42->supplies), 1918 regulator_bulk_disable(ARRAY_SIZE(cs42l42->supplies),
@@ -1937,8 +1935,7 @@ static int cs42l42_runtime_resume(struct device *dev)
1937 return ret; 1935 return ret;
1938 } 1936 }
1939 1937
1940 if (cs42l42->reset_gpio) 1938 gpiod_set_value_cansleep(cs42l42->reset_gpio, 1);
1941 gpiod_set_value_cansleep(cs42l42->reset_gpio, 1);
1942 1939
1943 regcache_cache_only(cs42l42->regmap, false); 1940 regcache_cache_only(cs42l42->regmap, false);
1944 regcache_sync(cs42l42->regmap); 1941 regcache_sync(cs42l42->regmap);
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 96cfe38943cd..f8072f1897d4 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -504,7 +504,7 @@ static int cs42l51_codec_probe(struct snd_soc_codec *codec)
504 return 0; 504 return 0;
505} 505}
506 506
507static struct snd_soc_codec_driver soc_codec_device_cs42l51 = { 507static const struct snd_soc_codec_driver soc_codec_device_cs42l51 = {
508 .probe = cs42l51_codec_probe, 508 .probe = cs42l51_codec_probe,
509 509
510 .component_driver = { 510 .component_driver = {
diff --git a/sound/soc/codecs/cs43130.c b/sound/soc/codecs/cs43130.c
new file mode 100644
index 000000000000..220e30199c5b
--- /dev/null
+++ b/sound/soc/codecs/cs43130.c
@@ -0,0 +1,2690 @@
1/*
2 * cs43130.c -- CS43130 ALSA Soc Audio driver
3 *
4 * Copyright 2017 Cirrus Logic, Inc.
5 *
6 * Authors: Li Xu <li.xu@cirrus.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#include <linux/module.h>
13#include <linux/moduleparam.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/delay.h>
17#include <linux/gpio.h>
18#include <linux/gpio/consumer.h>
19#include <linux/platform_device.h>
20#include <linux/pm.h>
21#include <linux/i2c.h>
22#include <linux/of_device.h>
23#include <linux/regmap.h>
24#include <linux/slab.h>
25#include <sound/core.h>
26#include <sound/pcm.h>
27#include <sound/pcm_params.h>
28#include <sound/soc.h>
29#include <sound/soc-dapm.h>
30#include <sound/initval.h>
31#include <sound/tlv.h>
32#include <linux/of_gpio.h>
33#include <linux/regulator/consumer.h>
34#include <linux/pm_runtime.h>
35#include <linux/of_irq.h>
36#include <linux/completion.h>
37#include <linux/mutex.h>
38#include <linux/workqueue.h>
39#include <sound/jack.h>
40
41#include "cs43130.h"
42
43static const struct reg_default cs43130_reg_defaults[] = {
44 {CS43130_SYS_CLK_CTL_1, 0x06},
45 {CS43130_SP_SRATE, 0x01},
46 {CS43130_SP_BITSIZE, 0x05},
47 {CS43130_PAD_INT_CFG, 0x03},
48 {CS43130_PWDN_CTL, 0xFE},
49 {CS43130_CRYSTAL_SET, 0x04},
50 {CS43130_PLL_SET_1, 0x00},
51 {CS43130_PLL_SET_2, 0x00},
52 {CS43130_PLL_SET_3, 0x00},
53 {CS43130_PLL_SET_4, 0x00},
54 {CS43130_PLL_SET_5, 0x40},
55 {CS43130_PLL_SET_6, 0x10},
56 {CS43130_PLL_SET_7, 0x80},
57 {CS43130_PLL_SET_8, 0x03},
58 {CS43130_PLL_SET_9, 0x02},
59 {CS43130_PLL_SET_10, 0x02},
60 {CS43130_CLKOUT_CTL, 0x00},
61 {CS43130_ASP_NUM_1, 0x01},
62 {CS43130_ASP_NUM_2, 0x00},
63 {CS43130_ASP_DEN_1, 0x08},
64 {CS43130_ASP_DEN_2, 0x00},
65 {CS43130_ASP_LRCK_HI_TIME_1, 0x1F},
66 {CS43130_ASP_LRCK_HI_TIME_2, 0x00},
67 {CS43130_ASP_LRCK_PERIOD_1, 0x3F},
68 {CS43130_ASP_LRCK_PERIOD_2, 0x00},
69 {CS43130_ASP_CLOCK_CONF, 0x0C},
70 {CS43130_ASP_FRAME_CONF, 0x0A},
71 {CS43130_XSP_NUM_1, 0x01},
72 {CS43130_XSP_NUM_2, 0x00},
73 {CS43130_XSP_DEN_1, 0x02},
74 {CS43130_XSP_DEN_2, 0x00},
75 {CS43130_XSP_LRCK_HI_TIME_1, 0x1F},
76 {CS43130_XSP_LRCK_HI_TIME_2, 0x00},
77 {CS43130_XSP_LRCK_PERIOD_1, 0x3F},
78 {CS43130_XSP_LRCK_PERIOD_2, 0x00},
79 {CS43130_XSP_CLOCK_CONF, 0x0C},
80 {CS43130_XSP_FRAME_CONF, 0x0A},
81 {CS43130_ASP_CH_1_LOC, 0x00},
82 {CS43130_ASP_CH_2_LOC, 0x00},
83 {CS43130_ASP_CH_1_SZ_EN, 0x06},
84 {CS43130_ASP_CH_2_SZ_EN, 0x0E},
85 {CS43130_XSP_CH_1_LOC, 0x00},
86 {CS43130_XSP_CH_2_LOC, 0x00},
87 {CS43130_XSP_CH_1_SZ_EN, 0x06},
88 {CS43130_XSP_CH_2_SZ_EN, 0x0E},
89 {CS43130_DSD_VOL_B, 0x78},
90 {CS43130_DSD_VOL_A, 0x78},
91 {CS43130_DSD_PATH_CTL_1, 0xA8},
92 {CS43130_DSD_INT_CFG, 0x00},
93 {CS43130_DSD_PATH_CTL_2, 0x02},
94 {CS43130_DSD_PCM_MIX_CTL, 0x00},
95 {CS43130_DSD_PATH_CTL_3, 0x40},
96 {CS43130_HP_OUT_CTL_1, 0x30},
97 {CS43130_PCM_FILT_OPT, 0x02},
98 {CS43130_PCM_VOL_B, 0x78},
99 {CS43130_PCM_VOL_A, 0x78},
100 {CS43130_PCM_PATH_CTL_1, 0xA8},
101 {CS43130_PCM_PATH_CTL_2, 0x00},
102 {CS43130_CLASS_H_CTL, 0x1E},
103 {CS43130_HP_DETECT, 0x04},
104 {CS43130_HP_LOAD_1, 0x00},
105 {CS43130_HP_MEAS_LOAD_1, 0x00},
106 {CS43130_HP_MEAS_LOAD_2, 0x00},
107 {CS43130_INT_MASK_1, 0xFF},
108 {CS43130_INT_MASK_2, 0xFF},
109 {CS43130_INT_MASK_3, 0xFF},
110 {CS43130_INT_MASK_4, 0xFF},
111 {CS43130_INT_MASK_5, 0xFF},
112};
113
114static bool cs43130_volatile_register(struct device *dev, unsigned int reg)
115{
116 switch (reg) {
117 case CS43130_INT_STATUS_1 ... CS43130_INT_STATUS_5:
118 case CS43130_HP_DC_STAT_1 ... CS43130_HP_DC_STAT_2:
119 case CS43130_HP_AC_STAT_1 ... CS43130_HP_AC_STAT_2:
120 return true;
121 default:
122 return false;
123 }
124}
125
126static bool cs43130_readable_register(struct device *dev, unsigned int reg)
127{
128 switch (reg) {
129 case CS43130_DEVID_AB ... CS43130_SYS_CLK_CTL_1:
130 case CS43130_SP_SRATE ... CS43130_PAD_INT_CFG:
131 case CS43130_PWDN_CTL:
132 case CS43130_CRYSTAL_SET:
133 case CS43130_PLL_SET_1 ... CS43130_PLL_SET_5:
134 case CS43130_PLL_SET_6:
135 case CS43130_PLL_SET_7:
136 case CS43130_PLL_SET_8:
137 case CS43130_PLL_SET_9:
138 case CS43130_PLL_SET_10:
139 case CS43130_CLKOUT_CTL:
140 case CS43130_ASP_NUM_1 ... CS43130_ASP_FRAME_CONF:
141 case CS43130_XSP_NUM_1 ... CS43130_XSP_FRAME_CONF:
142 case CS43130_ASP_CH_1_LOC:
143 case CS43130_ASP_CH_2_LOC:
144 case CS43130_ASP_CH_1_SZ_EN:
145 case CS43130_ASP_CH_2_SZ_EN:
146 case CS43130_XSP_CH_1_LOC:
147 case CS43130_XSP_CH_2_LOC:
148 case CS43130_XSP_CH_1_SZ_EN:
149 case CS43130_XSP_CH_2_SZ_EN:
150 case CS43130_DSD_VOL_B ... CS43130_DSD_PATH_CTL_3:
151 case CS43130_HP_OUT_CTL_1:
152 case CS43130_PCM_FILT_OPT ... CS43130_PCM_PATH_CTL_2:
153 case CS43130_CLASS_H_CTL:
154 case CS43130_HP_DETECT:
155 case CS43130_HP_STATUS:
156 case CS43130_HP_LOAD_1:
157 case CS43130_HP_MEAS_LOAD_1:
158 case CS43130_HP_MEAS_LOAD_2:
159 case CS43130_HP_DC_STAT_1:
160 case CS43130_HP_DC_STAT_2:
161 case CS43130_HP_AC_STAT_1:
162 case CS43130_HP_AC_STAT_2:
163 case CS43130_HP_LOAD_STAT:
164 case CS43130_INT_STATUS_1 ... CS43130_INT_STATUS_5:
165 case CS43130_INT_MASK_1 ... CS43130_INT_MASK_5:
166 return true;
167 default:
168 return false;
169 }
170}
171
172static bool cs43130_precious_register(struct device *dev, unsigned int reg)
173{
174 switch (reg) {
175 case CS43130_INT_STATUS_1 ... CS43130_INT_STATUS_5:
176 return true;
177 default:
178 return false;
179 }
180}
181
182struct cs43130_pll_params {
183 unsigned int pll_in;
184 u8 sclk_prediv;
185 u8 pll_div_int;
186 u32 pll_div_frac;
187 u8 pll_mode;
188 u8 pll_divout;
189 unsigned int pll_out;
190 u8 pll_cal_ratio;
191};
192
193static const struct cs43130_pll_params pll_ratio_table[] = {
194 {9600000, 0x02, 0x49, 0x800000, 0x00, 0x08, 22579200, 151},
195 {9600000, 0x02, 0x50, 0x000000, 0x00, 0x08, 24576000, 164},
196
197 {11289600, 0x02, 0X40, 0, 0x01, 0x08, 22579200, 128},
198 {11289600, 0x02, 0x44, 0x06F700, 0x0, 0x08, 24576000, 139},
199
200 {12000000, 0x02, 0x49, 0x800000, 0x00, 0x0A, 22579200, 120},
201 {12000000, 0x02, 0x40, 0x000000, 0x00, 0x08, 24576000, 131},
202
203 {12288000, 0x02, 0x49, 0x800000, 0x01, 0x0A, 22579200, 118},
204 {12288000, 0x02, 0x40, 0x000000, 0x01, 0x08, 24576000, 128},
205
206 {13000000, 0x02, 0x45, 0x797680, 0x01, 0x0A, 22579200, 111},
207 {13000000, 0x02, 0x3C, 0x7EA940, 0x01, 0x08, 24576000, 121},
208
209 {19200000, 0x03, 0x49, 0x800000, 0x00, 0x08, 22579200, 151},
210 {19200000, 0x03, 0x50, 0x000000, 0x00, 0x08, 24576000, 164},
211
212 {22579200, 0, 0, 0, 0, 0, 22579200, 0},
213 {22579200, 0x03, 0x44, 0x06F700, 0x00, 0x08, 24576000, 139},
214
215 {24000000, 0x03, 0x49, 0x800000, 0x00, 0x0A, 22579200, 120},
216 {24000000, 0x03, 0x40, 0x000000, 0x00, 0x08, 24576000, 131},
217
218 {24576000, 0x03, 0x49, 0x800000, 0x01, 0x0A, 22579200, 118},
219 {24576000, 0, 0, 0, 0, 0, 24576000, 0},
220
221 {26000000, 0x03, 0x45, 0x797680, 0x01, 0x0A, 22579200, 111},
222 {26000000, 0x03, 0x3C, 0x7EA940, 0x01, 0x08, 24576000, 121},
223};
224
225static const struct cs43130_pll_params *cs43130_get_pll_table(
226 unsigned int freq_in, unsigned int freq_out)
227{
228 int i;
229
230 for (i = 0; i < ARRAY_SIZE(pll_ratio_table); i++) {
231 if (pll_ratio_table[i].pll_in == freq_in &&
232 pll_ratio_table[i].pll_out == freq_out)
233 return &pll_ratio_table[i];
234 }
235
236 return NULL;
237}
238
239static int cs43130_pll_config(struct snd_soc_codec *codec)
240{
241 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
242 const struct cs43130_pll_params *pll_entry;
243
244 dev_dbg(codec->dev, "cs43130->mclk = %u, cs43130->mclk_int = %u\n",
245 cs43130->mclk, cs43130->mclk_int);
246
247 pll_entry = cs43130_get_pll_table(cs43130->mclk, cs43130->mclk_int);
248 if (!pll_entry)
249 return -EINVAL;
250
251 if (pll_entry->pll_cal_ratio == 0) {
252 regmap_update_bits(cs43130->regmap, CS43130_PLL_SET_1,
253 CS43130_PLL_START_MASK, 0);
254
255 cs43130->pll_bypass = true;
256 return 0;
257 }
258
259 cs43130->pll_bypass = false;
260
261 regmap_update_bits(cs43130->regmap, CS43130_PLL_SET_2,
262 CS43130_PLL_DIV_DATA_MASK,
263 pll_entry->pll_div_frac >>
264 CS43130_PLL_DIV_FRAC_0_DATA_SHIFT);
265 regmap_update_bits(cs43130->regmap, CS43130_PLL_SET_3,
266 CS43130_PLL_DIV_DATA_MASK,
267 pll_entry->pll_div_frac >>
268 CS43130_PLL_DIV_FRAC_1_DATA_SHIFT);
269 regmap_update_bits(cs43130->regmap, CS43130_PLL_SET_4,
270 CS43130_PLL_DIV_DATA_MASK,
271 pll_entry->pll_div_frac >>
272 CS43130_PLL_DIV_FRAC_2_DATA_SHIFT);
273 regmap_write(cs43130->regmap, CS43130_PLL_SET_5,
274 pll_entry->pll_div_int);
275 regmap_write(cs43130->regmap, CS43130_PLL_SET_6, pll_entry->pll_divout);
276 regmap_write(cs43130->regmap, CS43130_PLL_SET_7,
277 pll_entry->pll_cal_ratio);
278 regmap_update_bits(cs43130->regmap, CS43130_PLL_SET_8,
279 CS43130_PLL_MODE_MASK,
280 pll_entry->pll_mode << CS43130_PLL_MODE_SHIFT);
281 regmap_write(cs43130->regmap, CS43130_PLL_SET_9,
282 pll_entry->sclk_prediv);
283 regmap_update_bits(cs43130->regmap, CS43130_PLL_SET_1,
284 CS43130_PLL_START_MASK, 1);
285
286 return 0;
287}
288
289static int cs43130_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
290 unsigned int freq_in, unsigned int freq_out)
291{
292 int ret = 0;
293 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
294
295 switch (freq_in) {
296 case 9600000:
297 case 11289600:
298 case 12000000:
299 case 12288000:
300 case 13000000:
301 case 19200000:
302 case 22579200:
303 case 24000000:
304 case 24576000:
305 case 26000000:
306 cs43130->mclk = freq_in;
307 break;
308 default:
309 dev_err(codec->dev,
310 "unsupported pll input reference clock:%d\n", freq_in);
311 return -EINVAL;
312 }
313
314 switch (freq_out) {
315 case 22579200:
316 cs43130->mclk_int = freq_out;
317 break;
318 case 24576000:
319 cs43130->mclk_int = freq_out;
320 break;
321 default:
322 dev_err(codec->dev,
323 "unsupported pll output ref clock: %u\n", freq_out);
324 return -EINVAL;
325 }
326
327 ret = cs43130_pll_config(codec);
328 dev_dbg(codec->dev, "cs43130->pll_bypass = %d", cs43130->pll_bypass);
329 return ret;
330}
331
332static int cs43130_change_clksrc(struct snd_soc_codec *codec,
333 enum cs43130_mclk_src_sel src)
334{
335 int ret;
336 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
337 int mclk_int_decoded;
338
339 if (src == cs43130->mclk_int_src) {
340 /* clk source has not changed */
341 return 0;
342 }
343
344 switch (cs43130->mclk_int) {
345 case CS43130_MCLK_22M:
346 mclk_int_decoded = CS43130_MCLK_22P5;
347 break;
348 case CS43130_MCLK_24M:
349 mclk_int_decoded = CS43130_MCLK_24P5;
350 break;
351 default:
352 dev_err(codec->dev, "Invalid MCLK INT freq: %u\n", cs43130->mclk_int);
353 return -EINVAL;
354 }
355
356 switch (src) {
357 case CS43130_MCLK_SRC_EXT:
358 cs43130->pll_bypass = true;
359 cs43130->mclk_int_src = CS43130_MCLK_SRC_EXT;
360 if (cs43130->xtal_ibias == CS43130_XTAL_UNUSED) {
361 regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL,
362 CS43130_PDN_XTAL_MASK,
363 1 << CS43130_PDN_XTAL_SHIFT);
364 } else {
365 reinit_completion(&cs43130->xtal_rdy);
366 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
367 CS43130_XTAL_RDY_INT_MASK, 0);
368 regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL,
369 CS43130_PDN_XTAL_MASK, 0);
370 ret = wait_for_completion_timeout(&cs43130->xtal_rdy,
371 msecs_to_jiffies(100));
372 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
373 CS43130_XTAL_RDY_INT_MASK,
374 1 << CS43130_XTAL_RDY_INT_SHIFT);
375 if (ret == 0) {
376 dev_err(codec->dev, "Timeout waiting for XTAL_READY interrupt\n");
377 return -ETIMEDOUT;
378 }
379 }
380
381 regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1,
382 CS43130_MCLK_SRC_SEL_MASK,
383 src << CS43130_MCLK_SRC_SEL_SHIFT);
384 regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1,
385 CS43130_MCLK_INT_MASK,
386 mclk_int_decoded << CS43130_MCLK_INT_SHIFT);
387 usleep_range(150, 200);
388
389 regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL,
390 CS43130_PDN_PLL_MASK,
391 1 << CS43130_PDN_PLL_SHIFT);
392 break;
393 case CS43130_MCLK_SRC_PLL:
394 cs43130->pll_bypass = false;
395 cs43130->mclk_int_src = CS43130_MCLK_SRC_PLL;
396 if (cs43130->xtal_ibias == CS43130_XTAL_UNUSED) {
397 regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL,
398 CS43130_PDN_XTAL_MASK,
399 1 << CS43130_PDN_XTAL_SHIFT);
400 } else {
401 reinit_completion(&cs43130->xtal_rdy);
402 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
403 CS43130_XTAL_RDY_INT_MASK, 0);
404 regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL,
405 CS43130_PDN_XTAL_MASK, 0);
406 ret = wait_for_completion_timeout(&cs43130->xtal_rdy,
407 msecs_to_jiffies(100));
408 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
409 CS43130_XTAL_RDY_INT_MASK,
410 1 << CS43130_XTAL_RDY_INT_SHIFT);
411 if (ret == 0) {
412 dev_err(codec->dev, "Timeout waiting for XTAL_READY interrupt\n");
413 return -ETIMEDOUT;
414 }
415 }
416
417 reinit_completion(&cs43130->pll_rdy);
418 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
419 CS43130_PLL_RDY_INT_MASK, 0);
420 regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL,
421 CS43130_PDN_PLL_MASK, 0);
422 ret = wait_for_completion_timeout(&cs43130->pll_rdy,
423 msecs_to_jiffies(100));
424 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
425 CS43130_PLL_RDY_INT_MASK,
426 1 << CS43130_PLL_RDY_INT_SHIFT);
427 if (ret == 0) {
428 dev_err(codec->dev, "Timeout waiting for PLL_READY interrupt\n");
429 return -ETIMEDOUT;
430 }
431
432 regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1,
433 CS43130_MCLK_SRC_SEL_MASK,
434 src << CS43130_MCLK_SRC_SEL_SHIFT);
435 regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1,
436 CS43130_MCLK_INT_MASK,
437 mclk_int_decoded << CS43130_MCLK_INT_SHIFT);
438 usleep_range(150, 200);
439 break;
440 case CS43130_MCLK_SRC_RCO:
441 cs43130->mclk_int_src = CS43130_MCLK_SRC_RCO;
442
443 regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1,
444 CS43130_MCLK_SRC_SEL_MASK,
445 src << CS43130_MCLK_SRC_SEL_SHIFT);
446 regmap_update_bits(cs43130->regmap, CS43130_SYS_CLK_CTL_1,
447 CS43130_MCLK_INT_MASK,
448 CS43130_MCLK_22P5 << CS43130_MCLK_INT_SHIFT);
449 usleep_range(150, 200);
450
451 regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL,
452 CS43130_PDN_XTAL_MASK,
453 1 << CS43130_PDN_XTAL_SHIFT);
454 regmap_update_bits(cs43130->regmap, CS43130_PWDN_CTL,
455 CS43130_PDN_PLL_MASK,
456 1 << CS43130_PDN_PLL_SHIFT);
457 break;
458 default:
459 dev_err(codec->dev, "Invalid MCLK source value\n");
460 return -EINVAL;
461 }
462
463 return 0;
464}
465
466static const struct cs43130_bitwidth_map cs43130_bitwidth_table[] = {
467 {8, CS43130_SP_BIT_SIZE_8, CS43130_CH_BIT_SIZE_8},
468 {16, CS43130_SP_BIT_SIZE_16, CS43130_CH_BIT_SIZE_16},
469 {24, CS43130_SP_BIT_SIZE_24, CS43130_CH_BIT_SIZE_24},
470 {32, CS43130_SP_BIT_SIZE_32, CS43130_CH_BIT_SIZE_32},
471};
472
473static const struct cs43130_bitwidth_map *cs43130_get_bitwidth_table(
474 unsigned int bitwidth)
475{
476 int i;
477
478 for (i = 0; i < ARRAY_SIZE(cs43130_bitwidth_table); i++) {
479 if (cs43130_bitwidth_table[i].bitwidth == bitwidth)
480 return &cs43130_bitwidth_table[i];
481 }
482
483 return NULL;
484}
485
486static int cs43130_set_bitwidth(int dai_id, unsigned int bitwidth_dai,
487 struct regmap *regmap)
488{
489 const struct cs43130_bitwidth_map *bw_map;
490
491 bw_map = cs43130_get_bitwidth_table(bitwidth_dai);
492 if (!bw_map)
493 return -EINVAL;
494
495 switch (dai_id) {
496 case CS43130_ASP_PCM_DAI:
497 case CS43130_ASP_DOP_DAI:
498 regmap_update_bits(regmap, CS43130_ASP_CH_1_SZ_EN,
499 CS43130_CH_BITSIZE_MASK, bw_map->ch_bit);
500 regmap_update_bits(regmap, CS43130_ASP_CH_2_SZ_EN,
501 CS43130_CH_BITSIZE_MASK, bw_map->ch_bit);
502 regmap_update_bits(regmap, CS43130_SP_BITSIZE,
503 CS43130_ASP_BITSIZE_MASK, bw_map->sp_bit);
504 break;
505 case CS43130_XSP_DOP_DAI:
506 regmap_update_bits(regmap, CS43130_XSP_CH_1_SZ_EN,
507 CS43130_CH_BITSIZE_MASK, bw_map->ch_bit);
508 regmap_update_bits(regmap, CS43130_XSP_CH_2_SZ_EN,
509 CS43130_CH_BITSIZE_MASK, bw_map->ch_bit);
510 regmap_update_bits(regmap, CS43130_SP_BITSIZE,
511 CS43130_XSP_BITSIZE_MASK, bw_map->sp_bit <<
512 CS43130_XSP_BITSIZE_SHIFT);
513 break;
514 default:
515 return -EINVAL;
516 }
517
518 return 0;
519}
520
521static const struct cs43130_rate_map cs43130_rate_table[] = {
522 {32000, CS43130_ASP_SPRATE_32K},
523 {44100, CS43130_ASP_SPRATE_44_1K},
524 {48000, CS43130_ASP_SPRATE_48K},
525 {88200, CS43130_ASP_SPRATE_88_2K},
526 {96000, CS43130_ASP_SPRATE_96K},
527 {176400, CS43130_ASP_SPRATE_176_4K},
528 {192000, CS43130_ASP_SPRATE_192K},
529 {352800, CS43130_ASP_SPRATE_352_8K},
530 {384000, CS43130_ASP_SPRATE_384K},
531};
532
533static const struct cs43130_rate_map *cs43130_get_rate_table(int fs)
534{
535 int i;
536
537 for (i = 0; i < ARRAY_SIZE(cs43130_rate_table); i++) {
538 if (cs43130_rate_table[i].fs == fs)
539 return &cs43130_rate_table[i];
540 }
541
542 return NULL;
543}
544
545static const struct cs43130_clk_gen *cs43130_get_clk_gen(int mclk_int, int fs,
546 const struct cs43130_clk_gen *clk_gen_table, int len_clk_gen_table)
547{
548 int i;
549
550 for (i = 0; i < len_clk_gen_table; i++) {
551 if (clk_gen_table[i].mclk_int == mclk_int &&
552 clk_gen_table[i].fs == fs)
553 return &clk_gen_table[i];
554 }
555
556 return NULL;
557}
558
559static int cs43130_set_sp_fmt(int dai_id, unsigned int bitwidth_sclk,
560 struct snd_pcm_hw_params *params,
561 struct cs43130_private *cs43130)
562{
563 u16 frm_size;
564 u16 hi_size;
565 u8 frm_delay;
566 u8 frm_phase;
567 u8 frm_data;
568 u8 sclk_edge;
569 u8 lrck_edge;
570 u8 clk_data;
571 u8 loc_ch1;
572 u8 loc_ch2;
573 u8 dai_mode_val;
574 const struct cs43130_clk_gen *clk_gen;
575
576 switch (cs43130->dais[dai_id].dai_format) {
577 case SND_SOC_DAIFMT_I2S:
578 hi_size = bitwidth_sclk;
579 frm_delay = 2;
580 frm_phase = 0;
581 break;
582 case SND_SOC_DAIFMT_LEFT_J:
583 hi_size = bitwidth_sclk;
584 frm_delay = 2;
585 frm_phase = 1;
586 break;
587 case SND_SOC_DAIFMT_DSP_A:
588 hi_size = 1;
589 frm_delay = 2;
590 frm_phase = 1;
591 break;
592 case SND_SOC_DAIFMT_DSP_B:
593 hi_size = 1;
594 frm_delay = 0;
595 frm_phase = 1;
596 break;
597 default:
598 return -EINVAL;
599 }
600
601 switch (cs43130->dais[dai_id].dai_mode) {
602 case SND_SOC_DAIFMT_CBS_CFS:
603 dai_mode_val = 0;
604 break;
605 case SND_SOC_DAIFMT_CBM_CFM:
606 dai_mode_val = 1;
607 break;
608 default:
609 return -EINVAL;
610 }
611
612 frm_size = bitwidth_sclk * params_channels(params);
613 sclk_edge = 1;
614 lrck_edge = 0;
615 loc_ch1 = 0;
616 loc_ch2 = bitwidth_sclk * (params_channels(params) - 1);
617
618 frm_data = frm_delay & CS43130_SP_FSD_MASK;
619 frm_data |= (frm_phase << CS43130_SP_STP_SHIFT) & CS43130_SP_STP_MASK;
620
621 clk_data = lrck_edge & CS43130_SP_LCPOL_IN_MASK;
622 clk_data |= (lrck_edge << CS43130_SP_LCPOL_OUT_SHIFT) &
623 CS43130_SP_LCPOL_OUT_MASK;
624 clk_data |= (sclk_edge << CS43130_SP_SCPOL_IN_SHIFT) &
625 CS43130_SP_SCPOL_IN_MASK;
626 clk_data |= (sclk_edge << CS43130_SP_SCPOL_OUT_SHIFT) &
627 CS43130_SP_SCPOL_OUT_MASK;
628 clk_data |= (dai_mode_val << CS43130_SP_MODE_SHIFT) &
629 CS43130_SP_MODE_MASK;
630
631 switch (dai_id) {
632 case CS43130_ASP_PCM_DAI:
633 case CS43130_ASP_DOP_DAI:
634 regmap_update_bits(cs43130->regmap, CS43130_ASP_LRCK_PERIOD_1,
635 CS43130_SP_LCPR_DATA_MASK, (frm_size - 1) >>
636 CS43130_SP_LCPR_LSB_DATA_SHIFT);
637 regmap_update_bits(cs43130->regmap, CS43130_ASP_LRCK_PERIOD_2,
638 CS43130_SP_LCPR_DATA_MASK, (frm_size - 1) >>
639 CS43130_SP_LCPR_MSB_DATA_SHIFT);
640 regmap_update_bits(cs43130->regmap, CS43130_ASP_LRCK_HI_TIME_1,
641 CS43130_SP_LCHI_DATA_MASK, (hi_size - 1) >>
642 CS43130_SP_LCHI_LSB_DATA_SHIFT);
643 regmap_update_bits(cs43130->regmap, CS43130_ASP_LRCK_HI_TIME_2,
644 CS43130_SP_LCHI_DATA_MASK, (hi_size - 1) >>
645 CS43130_SP_LCHI_MSB_DATA_SHIFT);
646 regmap_write(cs43130->regmap, CS43130_ASP_FRAME_CONF, frm_data);
647 regmap_write(cs43130->regmap, CS43130_ASP_CH_1_LOC, loc_ch1);
648 regmap_write(cs43130->regmap, CS43130_ASP_CH_2_LOC, loc_ch2);
649 regmap_update_bits(cs43130->regmap, CS43130_ASP_CH_1_SZ_EN,
650 CS43130_CH_EN_MASK, 1 << CS43130_CH_EN_SHIFT);
651 regmap_update_bits(cs43130->regmap, CS43130_ASP_CH_2_SZ_EN,
652 CS43130_CH_EN_MASK, 1 << CS43130_CH_EN_SHIFT);
653 regmap_write(cs43130->regmap, CS43130_ASP_CLOCK_CONF, clk_data);
654 break;
655 case CS43130_XSP_DOP_DAI:
656 regmap_update_bits(cs43130->regmap, CS43130_XSP_LRCK_PERIOD_1,
657 CS43130_SP_LCPR_DATA_MASK, (frm_size - 1) >>
658 CS43130_SP_LCPR_LSB_DATA_SHIFT);
659 regmap_update_bits(cs43130->regmap, CS43130_XSP_LRCK_PERIOD_2,
660 CS43130_SP_LCPR_DATA_MASK, (frm_size - 1) >>
661 CS43130_SP_LCPR_MSB_DATA_SHIFT);
662 regmap_update_bits(cs43130->regmap, CS43130_XSP_LRCK_HI_TIME_1,
663 CS43130_SP_LCHI_DATA_MASK, (hi_size - 1) >>
664 CS43130_SP_LCHI_LSB_DATA_SHIFT);
665 regmap_update_bits(cs43130->regmap, CS43130_XSP_LRCK_HI_TIME_2,
666 CS43130_SP_LCHI_DATA_MASK, (hi_size - 1) >>
667 CS43130_SP_LCHI_MSB_DATA_SHIFT);
668 regmap_write(cs43130->regmap, CS43130_XSP_FRAME_CONF, frm_data);
669 regmap_write(cs43130->regmap, CS43130_XSP_CH_1_LOC, loc_ch1);
670 regmap_write(cs43130->regmap, CS43130_XSP_CH_2_LOC, loc_ch2);
671 regmap_update_bits(cs43130->regmap, CS43130_XSP_CH_1_SZ_EN,
672 CS43130_CH_EN_MASK, 1 << CS43130_CH_EN_SHIFT);
673 regmap_update_bits(cs43130->regmap, CS43130_XSP_CH_2_SZ_EN,
674 CS43130_CH_EN_MASK, 1 << CS43130_CH_EN_SHIFT);
675 regmap_write(cs43130->regmap, CS43130_XSP_CLOCK_CONF, clk_data);
676 break;
677 default:
678 return -EINVAL;
679 }
680
681 switch (frm_size) {
682 case 16:
683 clk_gen = cs43130_get_clk_gen(cs43130->mclk_int,
684 params_rate(params),
685 cs43130_16_clk_gen,
686 ARRAY_SIZE(cs43130_16_clk_gen));
687 break;
688 case 32:
689 clk_gen = cs43130_get_clk_gen(cs43130->mclk_int,
690 params_rate(params),
691 cs43130_32_clk_gen,
692 ARRAY_SIZE(cs43130_32_clk_gen));
693 break;
694 case 48:
695 clk_gen = cs43130_get_clk_gen(cs43130->mclk_int,
696 params_rate(params),
697 cs43130_48_clk_gen,
698 ARRAY_SIZE(cs43130_48_clk_gen));
699 break;
700 case 64:
701 clk_gen = cs43130_get_clk_gen(cs43130->mclk_int,
702 params_rate(params),
703 cs43130_64_clk_gen,
704 ARRAY_SIZE(cs43130_64_clk_gen));
705 break;
706 default:
707 return -EINVAL;
708 }
709
710 if (!clk_gen)
711 return -EINVAL;
712
713 switch (dai_id) {
714 case CS43130_ASP_PCM_DAI:
715 case CS43130_ASP_DOP_DAI:
716 regmap_write(cs43130->regmap, CS43130_ASP_DEN_1,
717 (clk_gen->den & CS43130_SP_M_LSB_DATA_MASK) >>
718 CS43130_SP_M_LSB_DATA_SHIFT);
719 regmap_write(cs43130->regmap, CS43130_ASP_DEN_2,
720 (clk_gen->den & CS43130_SP_M_MSB_DATA_MASK) >>
721 CS43130_SP_M_MSB_DATA_SHIFT);
722 regmap_write(cs43130->regmap, CS43130_ASP_NUM_1,
723 (clk_gen->num & CS43130_SP_N_LSB_DATA_MASK) >>
724 CS43130_SP_N_LSB_DATA_SHIFT);
725 regmap_write(cs43130->regmap, CS43130_ASP_NUM_2,
726 (clk_gen->num & CS43130_SP_N_MSB_DATA_MASK) >>
727 CS43130_SP_N_MSB_DATA_SHIFT);
728 break;
729 case CS43130_XSP_DOP_DAI:
730 regmap_write(cs43130->regmap, CS43130_XSP_DEN_1,
731 (clk_gen->den & CS43130_SP_M_LSB_DATA_MASK) >>
732 CS43130_SP_M_LSB_DATA_SHIFT);
733 regmap_write(cs43130->regmap, CS43130_XSP_DEN_2,
734 (clk_gen->den & CS43130_SP_M_MSB_DATA_MASK) >>
735 CS43130_SP_M_MSB_DATA_SHIFT);
736 regmap_write(cs43130->regmap, CS43130_XSP_NUM_1,
737 (clk_gen->num & CS43130_SP_N_LSB_DATA_MASK) >>
738 CS43130_SP_N_LSB_DATA_SHIFT);
739 regmap_write(cs43130->regmap, CS43130_XSP_NUM_2,
740 (clk_gen->num & CS43130_SP_N_MSB_DATA_MASK) >>
741 CS43130_SP_N_MSB_DATA_SHIFT);
742 break;
743 default:
744 return -EINVAL;
745 }
746
747 return 0;
748}
749
750static int cs43130_pcm_dsd_mix(bool en, struct regmap *regmap)
751{
752 if (en) {
753 regmap_update_bits(regmap, CS43130_DSD_PCM_MIX_CTL,
754 CS43130_MIX_PCM_PREP_MASK,
755 1 << CS43130_MIX_PCM_PREP_SHIFT);
756 usleep_range(6000, 6050);
757 regmap_update_bits(regmap, CS43130_DSD_PCM_MIX_CTL,
758 CS43130_MIX_PCM_DSD_MASK,
759 1 << CS43130_MIX_PCM_DSD_SHIFT);
760 } else {
761 regmap_update_bits(regmap, CS43130_DSD_PCM_MIX_CTL,
762 CS43130_MIX_PCM_DSD_MASK,
763 0 << CS43130_MIX_PCM_DSD_SHIFT);
764 usleep_range(1600, 1650);
765 regmap_update_bits(regmap, CS43130_DSD_PCM_MIX_CTL,
766 CS43130_MIX_PCM_PREP_MASK,
767 0 << CS43130_MIX_PCM_PREP_SHIFT);
768 }
769
770 return 0;
771}
772
773static int cs43130_dsd_hw_params(struct snd_pcm_substream *substream,
774 struct snd_pcm_hw_params *params,
775 struct snd_soc_dai *dai)
776{
777 struct snd_soc_codec *codec = dai->codec;
778 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
779 unsigned int required_clk;
780 u8 dsd_speed;
781
782 mutex_lock(&cs43130->clk_mutex);
783 if (!cs43130->clk_req) {
784 /* no DAI is currently using clk */
785 if (!(CS43130_MCLK_22M % params_rate(params)))
786 required_clk = CS43130_MCLK_22M;
787 else
788 required_clk = CS43130_MCLK_24M;
789
790 cs43130_set_pll(codec, 0, 0, cs43130->mclk, required_clk);
791 if (cs43130->pll_bypass)
792 cs43130_change_clksrc(codec, CS43130_MCLK_SRC_EXT);
793 else
794 cs43130_change_clksrc(codec, CS43130_MCLK_SRC_PLL);
795 }
796
797 cs43130->clk_req++;
798 if (cs43130->clk_req == 2)
799 cs43130_pcm_dsd_mix(true, cs43130->regmap);
800 mutex_unlock(&cs43130->clk_mutex);
801
802 switch (params_rate(params)) {
803 case 176400:
804 dsd_speed = 0;
805 break;
806 case 352800:
807 dsd_speed = 1;
808 break;
809 default:
810 dev_err(codec->dev, "Rate(%u) not supported\n",
811 params_rate(params));
812 return -EINVAL;
813 }
814
815 if (cs43130->dais[dai->id].dai_mode == SND_SOC_DAIFMT_CBM_CFM)
816 regmap_update_bits(cs43130->regmap, CS43130_DSD_INT_CFG,
817 CS43130_DSD_MASTER, CS43130_DSD_MASTER);
818 else
819 regmap_update_bits(cs43130->regmap, CS43130_DSD_INT_CFG,
820 CS43130_DSD_MASTER, 0);
821
822 regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_2,
823 CS43130_DSD_SPEED_MASK,
824 dsd_speed << CS43130_DSD_SPEED_SHIFT);
825 regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_2,
826 CS43130_DSD_SRC_MASK, CS43130_DSD_SRC_DSD <<
827 CS43130_DSD_SRC_SHIFT);
828
829 return 0;
830}
831
832static int cs43130_hw_params(struct snd_pcm_substream *substream,
833 struct snd_pcm_hw_params *params,
834 struct snd_soc_dai *dai)
835{
836 struct snd_soc_codec *codec = dai->codec;
837 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
838 const struct cs43130_rate_map *rate_map;
839 unsigned int sclk = cs43130->dais[dai->id].sclk;
840 unsigned int bitwidth_sclk;
841 unsigned int bitwidth_dai = (unsigned int)(params_width(params));
842 unsigned int required_clk;
843 u8 dsd_speed;
844
845 mutex_lock(&cs43130->clk_mutex);
846 if (!cs43130->clk_req) {
847 /* no DAI is currently using clk */
848 if (!(CS43130_MCLK_22M % params_rate(params)))
849 required_clk = CS43130_MCLK_22M;
850 else
851 required_clk = CS43130_MCLK_24M;
852
853 cs43130_set_pll(codec, 0, 0, cs43130->mclk, required_clk);
854 if (cs43130->pll_bypass)
855 cs43130_change_clksrc(codec, CS43130_MCLK_SRC_EXT);
856 else
857 cs43130_change_clksrc(codec, CS43130_MCLK_SRC_PLL);
858 }
859
860 cs43130->clk_req++;
861 if (cs43130->clk_req == 2)
862 cs43130_pcm_dsd_mix(true, cs43130->regmap);
863 mutex_unlock(&cs43130->clk_mutex);
864
865 switch (dai->id) {
866 case CS43130_ASP_DOP_DAI:
867 case CS43130_XSP_DOP_DAI:
868 /* DoP bitwidth is always 24-bit */
869 bitwidth_dai = 24;
870 sclk = params_rate(params) * bitwidth_dai *
871 params_channels(params);
872
873 switch (params_rate(params)) {
874 case 176400:
875 dsd_speed = 0;
876 break;
877 case 352800:
878 dsd_speed = 1;
879 break;
880 default:
881 dev_err(codec->dev, "Rate(%u) not supported\n",
882 params_rate(params));
883 return -EINVAL;
884 }
885
886 regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_2,
887 CS43130_DSD_SPEED_MASK,
888 dsd_speed << CS43130_DSD_SPEED_SHIFT);
889 break;
890 case CS43130_ASP_PCM_DAI:
891 rate_map = cs43130_get_rate_table(params_rate(params));
892 if (!rate_map)
893 return -EINVAL;
894
895 regmap_write(cs43130->regmap, CS43130_SP_SRATE, rate_map->val);
896 break;
897 default:
898 dev_err(codec->dev, "Invalid DAI (%d)\n", dai->id);
899 return -EINVAL;
900 }
901
902 switch (dai->id) {
903 case CS43130_ASP_DOP_DAI:
904 regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_2,
905 CS43130_DSD_SRC_MASK, CS43130_DSD_SRC_ASP <<
906 CS43130_DSD_SRC_SHIFT);
907 break;
908 case CS43130_XSP_DOP_DAI:
909 regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_2,
910 CS43130_DSD_SRC_MASK, CS43130_DSD_SRC_XSP <<
911 CS43130_DSD_SRC_SHIFT);
912 }
913
914 if (!sclk && cs43130->dais[dai->id].dai_mode == SND_SOC_DAIFMT_CBM_CFM)
915 /* Calculate SCLK in master mode if unassigned */
916 sclk = params_rate(params) * bitwidth_dai *
917 params_channels(params);
918
919 if (!sclk) {
920 /* at this point, SCLK must be set */
921 dev_err(codec->dev, "SCLK freq is not set\n");
922 return -EINVAL;
923 }
924
925 bitwidth_sclk = (sclk / params_rate(params)) / params_channels(params);
926 if (bitwidth_sclk < bitwidth_dai) {
927 dev_err(codec->dev, "Format not supported: SCLK freq is too low\n");
928 return -EINVAL;
929 }
930
931 dev_dbg(codec->dev,
932 "sclk = %u, fs = %d, bitwidth_dai = %u\n",
933 sclk, params_rate(params), bitwidth_dai);
934
935 dev_dbg(codec->dev,
936 "bitwidth_sclk = %u, num_ch = %u\n",
937 bitwidth_sclk, params_channels(params));
938
939 cs43130_set_bitwidth(dai->id, bitwidth_dai, cs43130->regmap);
940 cs43130_set_sp_fmt(dai->id, bitwidth_sclk, params, cs43130);
941
942 return 0;
943}
944
945static int cs43130_hw_free(struct snd_pcm_substream *substream,
946 struct snd_soc_dai *dai)
947{
948 struct snd_soc_codec *codec = dai->codec;
949 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
950
951 mutex_lock(&cs43130->clk_mutex);
952 cs43130->clk_req--;
953 if (!cs43130->clk_req) {
954 /* no DAI is currently using clk */
955 cs43130_change_clksrc(codec, CS43130_MCLK_SRC_RCO);
956 cs43130_pcm_dsd_mix(false, cs43130->regmap);
957 }
958 mutex_unlock(&cs43130->clk_mutex);
959
960 return 0;
961}
962
963static const DECLARE_TLV_DB_SCALE(pcm_vol_tlv, -12750, 50, 1);
964
965static const char * const pcm_ch_text[] = {
966 "Left-Right Ch",
967 "Left-Left Ch",
968 "Right-Left Ch",
969 "Right-Right Ch",
970};
971
972static const struct reg_sequence pcm_ch_en_seq[] = {
973 {CS43130_DXD1, 0x99},
974 {0x180005, 0x8C},
975 {0x180007, 0xAB},
976 {0x180015, 0x31},
977 {0x180017, 0xB2},
978 {0x180025, 0x30},
979 {0x180027, 0x84},
980 {0x180035, 0x9C},
981 {0x180037, 0xAE},
982 {0x18000D, 0x24},
983 {0x18000F, 0xA3},
984 {0x18001D, 0x05},
985 {0x18001F, 0xD4},
986 {0x18002D, 0x0B},
987 {0x18002F, 0xC7},
988 {0x18003D, 0x71},
989 {0x18003F, 0xE7},
990 {CS43130_DXD1, 0},
991};
992
993static const struct reg_sequence pcm_ch_dis_seq[] = {
994 {CS43130_DXD1, 0x99},
995 {0x180005, 0x24},
996 {0x180007, 0xA3},
997 {0x180015, 0x05},
998 {0x180017, 0xD4},
999 {0x180025, 0x0B},
1000 {0x180027, 0xC7},
1001 {0x180035, 0x71},
1002 {0x180037, 0xE7},
1003 {0x18000D, 0x8C},
1004 {0x18000F, 0xAB},
1005 {0x18001D, 0x31},
1006 {0x18001F, 0xB2},
1007 {0x18002D, 0x30},
1008 {0x18002F, 0x84},
1009 {0x18003D, 0x9C},
1010 {0x18003F, 0xAE},
1011 {CS43130_DXD1, 0},
1012};
1013
1014static int cs43130_pcm_ch_get(struct snd_kcontrol *kcontrol,
1015 struct snd_ctl_elem_value *ucontrol)
1016{
1017 return snd_soc_get_enum_double(kcontrol, ucontrol);
1018}
1019
1020static int cs43130_pcm_ch_put(struct snd_kcontrol *kcontrol,
1021 struct snd_ctl_elem_value *ucontrol)
1022{
1023 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
1024 unsigned int *item = ucontrol->value.enumerated.item;
1025 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
1026 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
1027 unsigned int val;
1028
1029 if (item[0] >= e->items)
1030 return -EINVAL;
1031 val = snd_soc_enum_item_to_val(e, item[0]) << e->shift_l;
1032
1033 switch (cs43130->dev_id) {
1034 case CS43131_CHIP_ID:
1035 case CS43198_CHIP_ID:
1036 if (val >= 2)
1037 regmap_multi_reg_write(cs43130->regmap, pcm_ch_en_seq,
1038 ARRAY_SIZE(pcm_ch_en_seq));
1039 else
1040 regmap_multi_reg_write(cs43130->regmap, pcm_ch_dis_seq,
1041 ARRAY_SIZE(pcm_ch_dis_seq));
1042 }
1043
1044 return snd_soc_put_enum_double(kcontrol, ucontrol);
1045}
1046
1047static SOC_ENUM_SINGLE_DECL(pcm_ch_enum, CS43130_PCM_PATH_CTL_2, 0,
1048 pcm_ch_text);
1049
1050static const char * const pcm_spd_texts[] = {
1051 "Fast",
1052 "Slow",
1053};
1054
1055static SOC_ENUM_SINGLE_DECL(pcm_spd_enum, CS43130_PCM_FILT_OPT, 7,
1056 pcm_spd_texts);
1057
1058static const char * const dsd_texts[] = {
1059 "Off",
1060 "BCKA Mode",
1061 "BCKD Mode",
1062};
1063
1064static const unsigned int dsd_values[] = {
1065 CS43130_DSD_SRC_DSD,
1066 CS43130_DSD_SRC_ASP,
1067 CS43130_DSD_SRC_XSP,
1068};
1069
1070static SOC_VALUE_ENUM_SINGLE_DECL(dsd_enum, CS43130_DSD_INT_CFG, 0, 0x03,
1071 dsd_texts, dsd_values);
1072
1073static const struct snd_kcontrol_new cs43130_snd_controls[] = {
1074 SOC_DOUBLE_R_TLV("Master Playback Volume",
1075 CS43130_PCM_VOL_A, CS43130_PCM_VOL_B, 0, 0xFF, 1,
1076 pcm_vol_tlv),
1077 SOC_DOUBLE_R_TLV("Master DSD Playback Volume",
1078 CS43130_DSD_VOL_A, CS43130_DSD_VOL_B, 0, 0xFF, 1,
1079 pcm_vol_tlv),
1080 SOC_ENUM_EXT("PCM Ch Select", pcm_ch_enum, cs43130_pcm_ch_get,
1081 cs43130_pcm_ch_put),
1082 SOC_ENUM("PCM Filter Speed", pcm_spd_enum),
1083 SOC_SINGLE("PCM Phase Compensation", CS43130_PCM_FILT_OPT, 6, 1, 0),
1084 SOC_SINGLE("PCM Nonoversample Emulate", CS43130_PCM_FILT_OPT, 5, 1, 0),
1085 SOC_SINGLE("PCM High-pass Filter", CS43130_PCM_FILT_OPT, 1, 1, 0),
1086 SOC_SINGLE("PCM De-emphasis Filter", CS43130_PCM_FILT_OPT, 0, 1, 0),
1087 SOC_ENUM("DSD Phase Modulation", dsd_enum),
1088};
1089
1090static const struct reg_sequence pcm_seq[] = {
1091 {CS43130_DXD1, 0x99},
1092 {CS43130_DXD7, 0x01},
1093 {CS43130_DXD8, 0},
1094 {CS43130_DXD9, 0x01},
1095 {CS43130_DXD3, 0x12},
1096 {CS43130_DXD4, 0},
1097 {CS43130_DXD10, 0x28},
1098 {CS43130_DXD11, 0x28},
1099 {CS43130_DXD1, 0},
1100};
1101
1102static const struct reg_sequence dsd_seq[] = {
1103 {CS43130_DXD1, 0x99},
1104 {CS43130_DXD7, 0x01},
1105 {CS43130_DXD8, 0},
1106 {CS43130_DXD9, 0x01},
1107 {CS43130_DXD3, 0x12},
1108 {CS43130_DXD4, 0},
1109 {CS43130_DXD10, 0x1E},
1110 {CS43130_DXD11, 0x20},
1111 {CS43130_DXD1, 0},
1112};
1113
1114static const struct reg_sequence pop_free_seq[] = {
1115 {CS43130_DXD1, 0x99},
1116 {CS43130_DXD12, 0x0A},
1117 {CS43130_DXD1, 0},
1118};
1119
1120static const struct reg_sequence pop_free_seq2[] = {
1121 {CS43130_DXD1, 0x99},
1122 {CS43130_DXD13, 0x20},
1123 {CS43130_DXD1, 0},
1124};
1125
1126static const struct reg_sequence mute_seq[] = {
1127 {CS43130_DXD1, 0x99},
1128 {CS43130_DXD3, 0x12},
1129 {CS43130_DXD5, 0x02},
1130 {CS43130_DXD4, 0x12},
1131 {CS43130_DXD1, 0},
1132};
1133
1134static const struct reg_sequence unmute_seq[] = {
1135 {CS43130_DXD1, 0x99},
1136 {CS43130_DXD3, 0x10},
1137 {CS43130_DXD5, 0},
1138 {CS43130_DXD4, 0x16},
1139 {CS43130_DXD1, 0},
1140};
1141
1142static int cs43130_dsd_event(struct snd_soc_dapm_widget *w,
1143 struct snd_kcontrol *kcontrol, int event)
1144{
1145 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
1146 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
1147
1148 switch (event) {
1149 case SND_SOC_DAPM_PRE_PMU:
1150 switch (cs43130->dev_id) {
1151 case CS43130_CHIP_ID:
1152 case CS4399_CHIP_ID:
1153 regmap_multi_reg_write(cs43130->regmap, dsd_seq,
1154 ARRAY_SIZE(dsd_seq));
1155 }
1156 break;
1157 case SND_SOC_DAPM_POST_PMU:
1158 regmap_update_bits(cs43130->regmap, CS43130_DSD_PATH_CTL_1,
1159 CS43130_MUTE_MASK, 0);
1160 switch (cs43130->dev_id) {
1161 case CS43130_CHIP_ID:
1162 case CS4399_CHIP_ID:
1163 regmap_multi_reg_write(cs43130->regmap, unmute_seq,
1164 ARRAY_SIZE(unmute_seq));
1165 }
1166 break;
1167 case SND_SOC_DAPM_PRE_PMD:
1168 switch (cs43130->dev_id) {
1169 case CS43130_CHIP_ID:
1170 case CS4399_CHIP_ID:
1171 regmap_multi_reg_write(cs43130->regmap, mute_seq,
1172 ARRAY_SIZE(mute_seq));
1173 regmap_update_bits(cs43130->regmap,
1174 CS43130_DSD_PATH_CTL_1,
1175 CS43130_MUTE_MASK, CS43130_MUTE_EN);
1176 /*
1177 * DSD Power Down Sequence
1178 * According to Design, 130ms is preferred.
1179 */
1180 msleep(130);
1181 break;
1182 case CS43131_CHIP_ID:
1183 case CS43198_CHIP_ID:
1184 regmap_update_bits(cs43130->regmap,
1185 CS43130_DSD_PATH_CTL_1,
1186 CS43130_MUTE_MASK, CS43130_MUTE_EN);
1187 }
1188 break;
1189 default:
1190 dev_err(codec->dev, "Invalid event = 0x%x\n", event);
1191 return -EINVAL;
1192 }
1193 return 0;
1194}
1195
1196static int cs43130_pcm_event(struct snd_soc_dapm_widget *w,
1197 struct snd_kcontrol *kcontrol, int event)
1198{
1199 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
1200 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
1201
1202 switch (event) {
1203 case SND_SOC_DAPM_PRE_PMU:
1204 switch (cs43130->dev_id) {
1205 case CS43130_CHIP_ID:
1206 case CS4399_CHIP_ID:
1207 regmap_multi_reg_write(cs43130->regmap, pcm_seq,
1208 ARRAY_SIZE(pcm_seq));
1209 }
1210 break;
1211 case SND_SOC_DAPM_POST_PMU:
1212 regmap_update_bits(cs43130->regmap, CS43130_PCM_PATH_CTL_1,
1213 CS43130_MUTE_MASK, 0);
1214 switch (cs43130->dev_id) {
1215 case CS43130_CHIP_ID:
1216 case CS4399_CHIP_ID:
1217 regmap_multi_reg_write(cs43130->regmap, unmute_seq,
1218 ARRAY_SIZE(unmute_seq));
1219 }
1220 break;
1221 case SND_SOC_DAPM_PRE_PMD:
1222 switch (cs43130->dev_id) {
1223 case CS43130_CHIP_ID:
1224 case CS4399_CHIP_ID:
1225 regmap_multi_reg_write(cs43130->regmap, mute_seq,
1226 ARRAY_SIZE(mute_seq));
1227 regmap_update_bits(cs43130->regmap,
1228 CS43130_PCM_PATH_CTL_1,
1229 CS43130_MUTE_MASK, CS43130_MUTE_EN);
1230 /*
1231 * PCM Power Down Sequence
1232 * According to Design, 130ms is preferred.
1233 */
1234 msleep(130);
1235 break;
1236 case CS43131_CHIP_ID:
1237 case CS43198_CHIP_ID:
1238 regmap_update_bits(cs43130->regmap,
1239 CS43130_PCM_PATH_CTL_1,
1240 CS43130_MUTE_MASK, CS43130_MUTE_EN);
1241 }
1242 break;
1243 default:
1244 dev_err(codec->dev, "Invalid event = 0x%x\n", event);
1245 return -EINVAL;
1246 }
1247 return 0;
1248}
1249
1250static const struct reg_sequence dac_postpmu_seq[] = {
1251 {CS43130_DXD9, 0x0C},
1252 {CS43130_DXD3, 0x10},
1253 {CS43130_DXD4, 0x20},
1254};
1255
1256static const struct reg_sequence dac_postpmd_seq[] = {
1257 {CS43130_DXD1, 0x99},
1258 {CS43130_DXD6, 0x01},
1259 {CS43130_DXD1, 0},
1260};
1261
1262static int cs43130_dac_event(struct snd_soc_dapm_widget *w,
1263 struct snd_kcontrol *kcontrol, int event)
1264{
1265 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
1266 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
1267
1268 switch (event) {
1269 case SND_SOC_DAPM_PRE_PMU:
1270 switch (cs43130->dev_id) {
1271 case CS43130_CHIP_ID:
1272 case CS4399_CHIP_ID:
1273 regmap_multi_reg_write(cs43130->regmap, pop_free_seq,
1274 ARRAY_SIZE(pop_free_seq));
1275 break;
1276 case CS43131_CHIP_ID:
1277 case CS43198_CHIP_ID:
1278 regmap_multi_reg_write(cs43130->regmap, pop_free_seq2,
1279 ARRAY_SIZE(pop_free_seq2));
1280 }
1281 break;
1282 case SND_SOC_DAPM_POST_PMU:
1283 usleep_range(10000, 10050);
1284
1285 regmap_write(cs43130->regmap, CS43130_DXD1, 0x99);
1286
1287 switch (cs43130->dev_id) {
1288 case CS43130_CHIP_ID:
1289 case CS4399_CHIP_ID:
1290 regmap_multi_reg_write(cs43130->regmap, dac_postpmu_seq,
1291 ARRAY_SIZE(dac_postpmu_seq));
1292 /*
1293 * Per datasheet, Sec. PCM Power-Up Sequence.
1294 * According to Design, CS43130_DXD12 must be 0 to meet
1295 * THDN and Dynamic Range spec.
1296 */
1297 msleep(1000);
1298 regmap_write(cs43130->regmap, CS43130_DXD12, 0);
1299 break;
1300 case CS43131_CHIP_ID:
1301 case CS43198_CHIP_ID:
1302 usleep_range(12000, 12010);
1303 regmap_write(cs43130->regmap, CS43130_DXD13, 0);
1304 }
1305
1306 regmap_write(cs43130->regmap, CS43130_DXD1, 0);
1307 break;
1308 case SND_SOC_DAPM_POST_PMD:
1309 switch (cs43130->dev_id) {
1310 case CS43130_CHIP_ID:
1311 case CS4399_CHIP_ID:
1312 regmap_multi_reg_write(cs43130->regmap, dac_postpmd_seq,
1313 ARRAY_SIZE(dac_postpmd_seq));
1314 }
1315 break;
1316 default:
1317 dev_err(codec->dev, "Invalid DAC event = 0x%x\n", event);
1318 return -EINVAL;
1319 }
1320 return 0;
1321}
1322
1323static const struct reg_sequence hpin_prepmd_seq[] = {
1324 {CS43130_DXD1, 0x99},
1325 {CS43130_DXD15, 0x64},
1326 {CS43130_DXD14, 0},
1327 {CS43130_DXD2, 0},
1328 {CS43130_DXD1, 0},
1329};
1330
1331static const struct reg_sequence hpin_postpmu_seq[] = {
1332 {CS43130_DXD1, 0x99},
1333 {CS43130_DXD2, 1},
1334 {CS43130_DXD14, 0xDC},
1335 {CS43130_DXD15, 0xE4},
1336 {CS43130_DXD1, 0},
1337};
1338
1339static int cs43130_hpin_event(struct snd_soc_dapm_widget *w,
1340 struct snd_kcontrol *kcontrol, int event)
1341{
1342 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
1343 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
1344
1345 switch (event) {
1346 case SND_SOC_DAPM_POST_PMD:
1347 regmap_multi_reg_write(cs43130->regmap, hpin_prepmd_seq,
1348 ARRAY_SIZE(hpin_prepmd_seq));
1349 break;
1350 case SND_SOC_DAPM_PRE_PMU:
1351 regmap_multi_reg_write(cs43130->regmap, hpin_postpmu_seq,
1352 ARRAY_SIZE(hpin_postpmu_seq));
1353 break;
1354 default:
1355 dev_err(codec->dev, "Invalid HPIN event = 0x%x\n", event);
1356 return -EINVAL;
1357 }
1358 return 0;
1359}
1360
1361static const struct snd_soc_dapm_widget digital_hp_widgets[] = {
1362 SND_SOC_DAPM_OUTPUT("HPOUTA"),
1363 SND_SOC_DAPM_OUTPUT("HPOUTB"),
1364
1365 SND_SOC_DAPM_AIF_IN_E("ASPIN PCM", NULL, 0, CS43130_PWDN_CTL,
1366 CS43130_PDN_ASP_SHIFT, 1, cs43130_pcm_event,
1367 (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
1368 SND_SOC_DAPM_PRE_PMD)),
1369
1370 SND_SOC_DAPM_AIF_IN_E("ASPIN DoP", NULL, 0, CS43130_PWDN_CTL,
1371 CS43130_PDN_ASP_SHIFT, 1, cs43130_dsd_event,
1372 (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
1373 SND_SOC_DAPM_PRE_PMD)),
1374
1375 SND_SOC_DAPM_AIF_IN_E("XSPIN DoP", NULL, 0, CS43130_PWDN_CTL,
1376 CS43130_PDN_XSP_SHIFT, 1, cs43130_dsd_event,
1377 (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
1378 SND_SOC_DAPM_PRE_PMD)),
1379
1380 SND_SOC_DAPM_AIF_IN_E("XSPIN DSD", NULL, 0, CS43130_PWDN_CTL,
1381 CS43130_PDN_DSDIF_SHIFT, 1, cs43130_dsd_event,
1382 (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
1383 SND_SOC_DAPM_PRE_PMD)),
1384
1385 SND_SOC_DAPM_DAC("DSD", NULL, CS43130_DSD_PATH_CTL_2,
1386 CS43130_DSD_EN_SHIFT, 0),
1387
1388 SND_SOC_DAPM_DAC_E("HiFi DAC", NULL, CS43130_PWDN_CTL,
1389 CS43130_PDN_HP_SHIFT, 1, cs43130_dac_event,
1390 (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU |
1391 SND_SOC_DAPM_POST_PMD)),
1392};
1393
1394static const struct snd_soc_dapm_widget analog_hp_widgets[] = {
1395 SND_SOC_DAPM_DAC_E("Analog Playback", NULL, CS43130_HP_OUT_CTL_1,
1396 CS43130_HP_IN_EN_SHIFT, 0, cs43130_hpin_event,
1397 (SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD)),
1398};
1399
1400static struct snd_soc_dapm_widget all_hp_widgets[
1401 ARRAY_SIZE(digital_hp_widgets) +
1402 ARRAY_SIZE(analog_hp_widgets)];
1403
1404static const struct snd_soc_dapm_route digital_hp_routes[] = {
1405 {"ASPIN PCM", NULL, "ASP PCM Playback"},
1406 {"ASPIN DoP", NULL, "ASP DoP Playback"},
1407 {"XSPIN DoP", NULL, "XSP DoP Playback"},
1408 {"XSPIN DSD", NULL, "XSP DSD Playback"},
1409 {"DSD", NULL, "ASPIN DoP"},
1410 {"DSD", NULL, "XSPIN DoP"},
1411 {"DSD", NULL, "XSPIN DSD"},
1412 {"HiFi DAC", NULL, "ASPIN PCM"},
1413 {"HiFi DAC", NULL, "DSD"},
1414 {"HPOUTA", NULL, "HiFi DAC"},
1415 {"HPOUTB", NULL, "HiFi DAC"},
1416};
1417
1418static const struct snd_soc_dapm_route analog_hp_routes[] = {
1419 {"HPOUTA", NULL, "Analog Playback"},
1420 {"HPOUTB", NULL, "Analog Playback"},
1421};
1422
1423static struct snd_soc_dapm_route all_hp_routes[
1424 ARRAY_SIZE(digital_hp_routes) +
1425 ARRAY_SIZE(analog_hp_routes)];
1426
1427static const unsigned int cs43130_asp_src_rates[] = {
1428 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
1429};
1430
1431static const struct snd_pcm_hw_constraint_list cs43130_asp_constraints = {
1432 .count = ARRAY_SIZE(cs43130_asp_src_rates),
1433 .list = cs43130_asp_src_rates,
1434};
1435
1436static int cs43130_pcm_startup(struct snd_pcm_substream *substream,
1437 struct snd_soc_dai *dai)
1438{
1439 return snd_pcm_hw_constraint_list(substream->runtime, 0,
1440 SNDRV_PCM_HW_PARAM_RATE,
1441 &cs43130_asp_constraints);
1442}
1443
1444static const unsigned int cs43130_dop_src_rates[] = {
1445 176400, 352800,
1446};
1447
1448static const struct snd_pcm_hw_constraint_list cs43130_dop_constraints = {
1449 .count = ARRAY_SIZE(cs43130_dop_src_rates),
1450 .list = cs43130_dop_src_rates,
1451};
1452
1453static int cs43130_dop_startup(struct snd_pcm_substream *substream,
1454 struct snd_soc_dai *dai)
1455{
1456 return snd_pcm_hw_constraint_list(substream->runtime, 0,
1457 SNDRV_PCM_HW_PARAM_RATE,
1458 &cs43130_dop_constraints);
1459}
1460
1461static int cs43130_pcm_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
1462{
1463 struct snd_soc_codec *codec = codec_dai->codec;
1464 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
1465
1466 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
1467 case SND_SOC_DAIFMT_CBS_CFS:
1468 cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBS_CFS;
1469 break;
1470 case SND_SOC_DAIFMT_CBM_CFM:
1471 cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBM_CFM;
1472 break;
1473 default:
1474 dev_err(codec->dev, "unsupported mode\n");
1475 return -EINVAL;
1476 }
1477
1478 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
1479 case SND_SOC_DAIFMT_I2S:
1480 cs43130->dais[codec_dai->id].dai_format = SND_SOC_DAIFMT_I2S;
1481 break;
1482 case SND_SOC_DAIFMT_LEFT_J:
1483 cs43130->dais[codec_dai->id].dai_format = SND_SOC_DAIFMT_LEFT_J;
1484 break;
1485 case SND_SOC_DAIFMT_DSP_A:
1486 cs43130->dais[codec_dai->id].dai_format = SND_SOC_DAIFMT_DSP_A;
1487 break;
1488 case SND_SOC_DAIFMT_DSP_B:
1489 cs43130->dais[codec_dai->id].dai_format = SND_SOC_DAIFMT_DSP_B;
1490 break;
1491 default:
1492 dev_err(codec->dev,
1493 "unsupported audio format\n");
1494 return -EINVAL;
1495 }
1496
1497 dev_dbg(codec->dev, "dai_id = %d, dai_mode = %u, dai_format = %u\n",
1498 codec_dai->id,
1499 cs43130->dais[codec_dai->id].dai_mode,
1500 cs43130->dais[codec_dai->id].dai_format);
1501
1502 return 0;
1503}
1504
1505static int cs43130_dsd_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
1506{
1507 struct snd_soc_codec *codec = codec_dai->codec;
1508 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
1509
1510 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
1511 case SND_SOC_DAIFMT_CBS_CFS:
1512 cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBS_CFS;
1513 break;
1514 case SND_SOC_DAIFMT_CBM_CFM:
1515 cs43130->dais[codec_dai->id].dai_mode = SND_SOC_DAIFMT_CBM_CFM;
1516 break;
1517 default:
1518 dev_err(codec->dev, "Unsupported DAI format.\n");
1519 return -EINVAL;
1520 }
1521
1522 dev_dbg(codec->dev, "dai_mode = 0x%x\n",
1523 cs43130->dais[codec_dai->id].dai_mode);
1524
1525 return 0;
1526}
1527
1528static int cs43130_set_sysclk(struct snd_soc_dai *codec_dai,
1529 int clk_id, unsigned int freq, int dir)
1530{
1531 struct snd_soc_codec *codec = codec_dai->codec;
1532 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
1533
1534 cs43130->dais[codec_dai->id].sclk = freq;
1535 dev_dbg(codec->dev, "dai_id = %d, sclk = %u\n", codec_dai->id,
1536 cs43130->dais[codec_dai->id].sclk);
1537
1538 return 0;
1539}
1540
1541static const struct snd_soc_dai_ops cs43130_pcm_ops = {
1542 .startup = cs43130_pcm_startup,
1543 .hw_params = cs43130_hw_params,
1544 .hw_free = cs43130_hw_free,
1545 .set_sysclk = cs43130_set_sysclk,
1546 .set_fmt = cs43130_pcm_set_fmt,
1547};
1548
1549static const struct snd_soc_dai_ops cs43130_dop_ops = {
1550 .startup = cs43130_dop_startup,
1551 .hw_params = cs43130_hw_params,
1552 .hw_free = cs43130_hw_free,
1553 .set_sysclk = cs43130_set_sysclk,
1554 .set_fmt = cs43130_pcm_set_fmt,
1555};
1556
1557static const struct snd_soc_dai_ops cs43130_dsd_ops = {
1558 .startup = cs43130_dop_startup,
1559 .hw_params = cs43130_dsd_hw_params,
1560 .hw_free = cs43130_hw_free,
1561 .set_fmt = cs43130_dsd_set_fmt,
1562};
1563
1564static struct snd_soc_dai_driver cs43130_dai[] = {
1565 {
1566 .name = "cs43130-asp-pcm",
1567 .id = CS43130_ASP_PCM_DAI,
1568 .playback = {
1569 .stream_name = "ASP PCM Playback",
1570 .channels_min = 1,
1571 .channels_max = 2,
1572 .rates = SNDRV_PCM_RATE_KNOT,
1573 .formats = CS43130_PCM_FORMATS,
1574 },
1575 .ops = &cs43130_pcm_ops,
1576 .symmetric_rates = 1,
1577 },
1578 {
1579 .name = "cs43130-asp-dop",
1580 .id = CS43130_ASP_DOP_DAI,
1581 .playback = {
1582 .stream_name = "ASP DoP Playback",
1583 .channels_min = 1,
1584 .channels_max = 2,
1585 .rates = SNDRV_PCM_RATE_KNOT,
1586 .formats = CS43130_DOP_FORMATS,
1587 },
1588 .ops = &cs43130_dop_ops,
1589 .symmetric_rates = 1,
1590 },
1591 {
1592 .name = "cs43130-xsp-dop",
1593 .id = CS43130_XSP_DOP_DAI,
1594 .playback = {
1595 .stream_name = "XSP DoP Playback",
1596 .channels_min = 1,
1597 .channels_max = 2,
1598 .rates = SNDRV_PCM_RATE_KNOT,
1599 .formats = CS43130_DOP_FORMATS,
1600 },
1601 .ops = &cs43130_dop_ops,
1602 .symmetric_rates = 1,
1603 },
1604 {
1605 .name = "cs43130-xsp-dsd",
1606 .id = CS43130_XSP_DSD_DAI,
1607 .playback = {
1608 .stream_name = "XSP DSD Playback",
1609 .channels_min = 1,
1610 .channels_max = 2,
1611 .rates = SNDRV_PCM_RATE_KNOT,
1612 .formats = CS43130_DOP_FORMATS,
1613 },
1614 .ops = &cs43130_dsd_ops,
1615 },
1616
1617};
1618
1619static int cs43130_codec_set_sysclk(struct snd_soc_codec *codec,
1620 int clk_id, int source, unsigned int freq,
1621 int dir)
1622{
1623 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
1624
1625 dev_dbg(codec->dev, "clk_id = %d, source = %d, freq = %d, dir = %d\n",
1626 clk_id, source, freq, dir);
1627
1628 switch (freq) {
1629 case CS43130_MCLK_22M:
1630 case CS43130_MCLK_24M:
1631 cs43130->mclk = freq;
1632 break;
1633 default:
1634 dev_err(codec->dev, "Invalid MCLK INT freq: %u\n", freq);
1635 return -EINVAL;
1636 }
1637
1638 if (source == CS43130_MCLK_SRC_EXT) {
1639 cs43130->pll_bypass = true;
1640 } else {
1641 dev_err(codec->dev, "Invalid MCLK source\n");
1642 return -EINVAL;
1643 }
1644
1645 return 0;
1646}
1647
1648static inline u16 cs43130_get_ac_reg_val(u16 ac_freq)
1649{
1650 /* AC freq is counted in 5.94Hz step. */
1651 return ac_freq / 6;
1652}
1653
1654static int cs43130_show_dc(struct device *dev, char *buf, u8 ch)
1655{
1656 struct i2c_client *client = to_i2c_client(dev);
1657 struct cs43130_private *cs43130 = i2c_get_clientdata(client);
1658
1659 if (!cs43130->hpload_done)
1660 return scnprintf(buf, PAGE_SIZE, "NO_HPLOAD\n");
1661 else
1662 return scnprintf(buf, PAGE_SIZE, "%u\n",
1663 cs43130->hpload_dc[ch]);
1664}
1665
1666static ssize_t cs43130_show_dc_l(struct device *dev,
1667 struct device_attribute *attr, char *buf)
1668{
1669 return cs43130_show_dc(dev, buf, HP_LEFT);
1670}
1671
1672static ssize_t cs43130_show_dc_r(struct device *dev,
1673 struct device_attribute *attr, char *buf)
1674{
1675 return cs43130_show_dc(dev, buf, HP_RIGHT);
1676}
1677
1678static u16 const cs43130_ac_freq[CS43130_AC_FREQ] = {
1679 24,
1680 43,
1681 93,
1682 200,
1683 431,
1684 928,
1685 2000,
1686 4309,
1687 9283,
1688 20000,
1689};
1690
1691static int cs43130_show_ac(struct device *dev, char *buf, u8 ch)
1692{
1693 int i, j = 0, tmp;
1694 struct i2c_client *client = to_i2c_client(dev);
1695 struct cs43130_private *cs43130 = i2c_get_clientdata(client);
1696
1697 if (cs43130->hpload_done && cs43130->ac_meas) {
1698 for (i = 0; i < ARRAY_SIZE(cs43130_ac_freq); i++) {
1699 tmp = scnprintf(buf + j, PAGE_SIZE - j, "%u\n",
1700 cs43130->hpload_ac[i][ch]);
1701 if (!tmp)
1702 break;
1703
1704 j += tmp;
1705 }
1706
1707 return j;
1708 } else {
1709 return scnprintf(buf, PAGE_SIZE, "NO_HPLOAD\n");
1710 }
1711}
1712
1713static ssize_t cs43130_show_ac_l(struct device *dev,
1714 struct device_attribute *attr, char *buf)
1715{
1716 return cs43130_show_ac(dev, buf, HP_LEFT);
1717}
1718
1719static ssize_t cs43130_show_ac_r(struct device *dev,
1720 struct device_attribute *attr, char *buf)
1721{
1722 return cs43130_show_ac(dev, buf, HP_RIGHT);
1723}
1724
1725static DEVICE_ATTR(hpload_dc_l, S_IRUGO, cs43130_show_dc_l, NULL);
1726static DEVICE_ATTR(hpload_dc_r, S_IRUGO, cs43130_show_dc_r, NULL);
1727static DEVICE_ATTR(hpload_ac_l, S_IRUGO, cs43130_show_ac_l, NULL);
1728static DEVICE_ATTR(hpload_ac_r, S_IRUGO, cs43130_show_ac_r, NULL);
1729
1730static struct reg_sequence hp_en_cal_seq[] = {
1731 {CS43130_INT_MASK_4, CS43130_INT_MASK_ALL},
1732 {CS43130_HP_MEAS_LOAD_1, 0},
1733 {CS43130_HP_MEAS_LOAD_2, 0},
1734 {CS43130_INT_MASK_4, 0},
1735 {CS43130_DXD1, 0x99},
1736 {CS43130_DXD16, 0xBB},
1737 {CS43130_DXD12, 0x01},
1738 {CS43130_DXD19, 0xCB},
1739 {CS43130_DXD17, 0x95},
1740 {CS43130_DXD18, 0x0B},
1741 {CS43130_DXD1, 0},
1742 {CS43130_HP_LOAD_1, 0x80},
1743};
1744
1745static struct reg_sequence hp_en_cal_seq2[] = {
1746 {CS43130_INT_MASK_4, CS43130_INT_MASK_ALL},
1747 {CS43130_HP_MEAS_LOAD_1, 0},
1748 {CS43130_HP_MEAS_LOAD_2, 0},
1749 {CS43130_INT_MASK_4, 0},
1750 {CS43130_HP_LOAD_1, 0x80},
1751};
1752
1753static struct reg_sequence hp_dis_cal_seq[] = {
1754 {CS43130_HP_LOAD_1, 0x80},
1755 {CS43130_DXD1, 0x99},
1756 {CS43130_DXD12, 0},
1757 {CS43130_DXD1, 0},
1758 {CS43130_HP_LOAD_1, 0},
1759};
1760
1761static struct reg_sequence hp_dis_cal_seq2[] = {
1762 {CS43130_HP_LOAD_1, 0x80},
1763 {CS43130_HP_LOAD_1, 0},
1764};
1765
1766static struct reg_sequence hp_dc_ch_l_seq[] = {
1767 {CS43130_DXD1, 0x99},
1768 {CS43130_DXD19, 0x0A},
1769 {CS43130_DXD17, 0x93},
1770 {CS43130_DXD18, 0x0A},
1771 {CS43130_DXD1, 0},
1772 {CS43130_HP_LOAD_1, 0x80},
1773 {CS43130_HP_LOAD_1, 0x81},
1774};
1775
1776static struct reg_sequence hp_dc_ch_l_seq2[] = {
1777 {CS43130_HP_LOAD_1, 0x80},
1778 {CS43130_HP_LOAD_1, 0x81},
1779};
1780
1781static struct reg_sequence hp_dc_ch_r_seq[] = {
1782 {CS43130_DXD1, 0x99},
1783 {CS43130_DXD19, 0x8A},
1784 {CS43130_DXD17, 0x15},
1785 {CS43130_DXD18, 0x06},
1786 {CS43130_DXD1, 0},
1787 {CS43130_HP_LOAD_1, 0x90},
1788 {CS43130_HP_LOAD_1, 0x91},
1789};
1790
1791static struct reg_sequence hp_dc_ch_r_seq2[] = {
1792 {CS43130_HP_LOAD_1, 0x90},
1793 {CS43130_HP_LOAD_1, 0x91},
1794};
1795
1796static struct reg_sequence hp_ac_ch_l_seq[] = {
1797 {CS43130_DXD1, 0x99},
1798 {CS43130_DXD19, 0x0A},
1799 {CS43130_DXD17, 0x93},
1800 {CS43130_DXD18, 0x0A},
1801 {CS43130_DXD1, 0},
1802 {CS43130_HP_LOAD_1, 0x80},
1803 {CS43130_HP_LOAD_1, 0x82},
1804};
1805
1806static struct reg_sequence hp_ac_ch_l_seq2[] = {
1807 {CS43130_HP_LOAD_1, 0x80},
1808 {CS43130_HP_LOAD_1, 0x82},
1809};
1810
1811static struct reg_sequence hp_ac_ch_r_seq[] = {
1812 {CS43130_DXD1, 0x99},
1813 {CS43130_DXD19, 0x8A},
1814 {CS43130_DXD17, 0x15},
1815 {CS43130_DXD18, 0x06},
1816 {CS43130_DXD1, 0},
1817 {CS43130_HP_LOAD_1, 0x90},
1818 {CS43130_HP_LOAD_1, 0x92},
1819};
1820
1821static struct reg_sequence hp_ac_ch_r_seq2[] = {
1822 {CS43130_HP_LOAD_1, 0x90},
1823 {CS43130_HP_LOAD_1, 0x92},
1824};
1825
1826static struct reg_sequence hp_cln_seq[] = {
1827 {CS43130_INT_MASK_4, CS43130_INT_MASK_ALL},
1828 {CS43130_HP_MEAS_LOAD_1, 0},
1829 {CS43130_HP_MEAS_LOAD_2, 0},
1830};
1831
1832struct reg_sequences {
1833 struct reg_sequence *seq;
1834 int size;
1835 unsigned int msk;
1836};
1837
1838static struct reg_sequences hpload_seq1[] = {
1839 {
1840 .seq = hp_en_cal_seq,
1841 .size = ARRAY_SIZE(hp_en_cal_seq),
1842 .msk = CS43130_HPLOAD_ON_INT,
1843 },
1844 {
1845 .seq = hp_dc_ch_l_seq,
1846 .size = ARRAY_SIZE(hp_dc_ch_l_seq),
1847 .msk = CS43130_HPLOAD_DC_INT,
1848 },
1849 {
1850 .seq = hp_ac_ch_l_seq,
1851 .size = ARRAY_SIZE(hp_ac_ch_l_seq),
1852 .msk = CS43130_HPLOAD_AC_INT,
1853 },
1854 {
1855 .seq = hp_dis_cal_seq,
1856 .size = ARRAY_SIZE(hp_dis_cal_seq),
1857 .msk = CS43130_HPLOAD_OFF_INT,
1858 },
1859 {
1860 .seq = hp_en_cal_seq,
1861 .size = ARRAY_SIZE(hp_en_cal_seq),
1862 .msk = CS43130_HPLOAD_ON_INT,
1863 },
1864 {
1865 .seq = hp_dc_ch_r_seq,
1866 .size = ARRAY_SIZE(hp_dc_ch_r_seq),
1867 .msk = CS43130_HPLOAD_DC_INT,
1868 },
1869 {
1870 .seq = hp_ac_ch_r_seq,
1871 .size = ARRAY_SIZE(hp_ac_ch_r_seq),
1872 .msk = CS43130_HPLOAD_AC_INT,
1873 },
1874};
1875
1876static struct reg_sequences hpload_seq2[] = {
1877 {
1878 .seq = hp_en_cal_seq2,
1879 .size = ARRAY_SIZE(hp_en_cal_seq2),
1880 .msk = CS43130_HPLOAD_ON_INT,
1881 },
1882 {
1883 .seq = hp_dc_ch_l_seq2,
1884 .size = ARRAY_SIZE(hp_dc_ch_l_seq2),
1885 .msk = CS43130_HPLOAD_DC_INT,
1886 },
1887 {
1888 .seq = hp_ac_ch_l_seq2,
1889 .size = ARRAY_SIZE(hp_ac_ch_l_seq2),
1890 .msk = CS43130_HPLOAD_AC_INT,
1891 },
1892 {
1893 .seq = hp_dis_cal_seq2,
1894 .size = ARRAY_SIZE(hp_dis_cal_seq2),
1895 .msk = CS43130_HPLOAD_OFF_INT,
1896 },
1897 {
1898 .seq = hp_en_cal_seq2,
1899 .size = ARRAY_SIZE(hp_en_cal_seq2),
1900 .msk = CS43130_HPLOAD_ON_INT,
1901 },
1902 {
1903 .seq = hp_dc_ch_r_seq2,
1904 .size = ARRAY_SIZE(hp_dc_ch_r_seq2),
1905 .msk = CS43130_HPLOAD_DC_INT,
1906 },
1907 {
1908 .seq = hp_ac_ch_r_seq2,
1909 .size = ARRAY_SIZE(hp_ac_ch_r_seq2),
1910 .msk = CS43130_HPLOAD_AC_INT,
1911 },
1912};
1913
1914static int cs43130_update_hpload(unsigned int msk, int ac_idx,
1915 struct cs43130_private *cs43130)
1916{
1917 bool left_ch = true;
1918 unsigned int reg;
1919 u32 addr;
1920 u16 impedance;
1921 struct snd_soc_codec *codec = cs43130->codec;
1922
1923 switch (msk) {
1924 case CS43130_HPLOAD_DC_INT:
1925 case CS43130_HPLOAD_AC_INT:
1926 break;
1927 default:
1928 return 0;
1929 }
1930
1931 regmap_read(cs43130->regmap, CS43130_HP_LOAD_1, &reg);
1932 if (reg & CS43130_HPLOAD_CHN_SEL)
1933 left_ch = false;
1934
1935 if (msk == CS43130_HPLOAD_DC_INT)
1936 addr = CS43130_HP_DC_STAT_1;
1937 else
1938 addr = CS43130_HP_AC_STAT_1;
1939
1940 regmap_read(cs43130->regmap, addr, &reg);
1941 impedance = reg >> 3;
1942 regmap_read(cs43130->regmap, addr + 1, &reg);
1943 impedance |= reg << 5;
1944
1945 if (msk == CS43130_HPLOAD_DC_INT) {
1946 if (left_ch)
1947 cs43130->hpload_dc[HP_LEFT] = impedance;
1948 else
1949 cs43130->hpload_dc[HP_RIGHT] = impedance;
1950
1951 dev_dbg(codec->dev, "HP DC impedance (Ch %u): %u\n", !left_ch,
1952 impedance);
1953 } else {
1954 if (left_ch)
1955 cs43130->hpload_ac[ac_idx][HP_LEFT] = impedance;
1956 else
1957 cs43130->hpload_ac[ac_idx][HP_RIGHT] = impedance;
1958
1959 dev_dbg(codec->dev, "HP AC (%u Hz) impedance (Ch %u): %u\n",
1960 cs43130->ac_freq[ac_idx], !left_ch, impedance);
1961 }
1962
1963 return 0;
1964}
1965
1966static int cs43130_hpload_proc(struct cs43130_private *cs43130,
1967 struct reg_sequence *seq, int seq_size,
1968 unsigned int rslt_msk, int ac_idx)
1969{
1970 int ret;
1971 unsigned int msk;
1972 u16 ac_reg_val;
1973 struct snd_soc_codec *codec = cs43130->codec;
1974
1975 reinit_completion(&cs43130->hpload_evt);
1976
1977 if (rslt_msk == CS43130_HPLOAD_AC_INT) {
1978 ac_reg_val = cs43130_get_ac_reg_val(cs43130->ac_freq[ac_idx]);
1979 regmap_update_bits(cs43130->regmap, CS43130_HP_LOAD_1,
1980 CS43130_HPLOAD_AC_START, 0);
1981 regmap_update_bits(cs43130->regmap, CS43130_HP_MEAS_LOAD_1,
1982 CS43130_HP_MEAS_LOAD_MASK,
1983 ac_reg_val >> CS43130_HP_MEAS_LOAD_1_SHIFT);
1984 regmap_update_bits(cs43130->regmap, CS43130_HP_MEAS_LOAD_2,
1985 CS43130_HP_MEAS_LOAD_MASK,
1986 ac_reg_val >> CS43130_HP_MEAS_LOAD_2_SHIFT);
1987 }
1988
1989 regmap_multi_reg_write(cs43130->regmap, seq,
1990 seq_size);
1991
1992 ret = wait_for_completion_timeout(&cs43130->hpload_evt,
1993 msecs_to_jiffies(1000));
1994 regmap_read(cs43130->regmap, CS43130_INT_MASK_4, &msk);
1995 if (!ret) {
1996 dev_err(codec->dev, "Timeout waiting for HPLOAD interrupt\n");
1997 return -1;
1998 }
1999
2000 dev_dbg(codec->dev, "HP load stat: %x, INT_MASK_4: %x\n",
2001 cs43130->hpload_stat, msk);
2002 if ((cs43130->hpload_stat & (CS43130_HPLOAD_NO_DC_INT |
2003 CS43130_HPLOAD_UNPLUG_INT |
2004 CS43130_HPLOAD_OOR_INT)) ||
2005 !(cs43130->hpload_stat & rslt_msk)) {
2006 dev_dbg(codec->dev, "HP load measure failed\n");
2007 return -1;
2008 }
2009
2010 return 0;
2011}
2012
2013static const struct reg_sequence hv_seq[][2] = {
2014 {
2015 {CS43130_CLASS_H_CTL, 0x1C},
2016 {CS43130_HP_OUT_CTL_1, 0x10},
2017 },
2018 {
2019 {CS43130_CLASS_H_CTL, 0x1E},
2020 {CS43130_HP_OUT_CTL_1, 0x20},
2021 },
2022 {
2023 {CS43130_CLASS_H_CTL, 0x1E},
2024 {CS43130_HP_OUT_CTL_1, 0x30},
2025 },
2026};
2027
2028static int cs43130_set_hv(struct regmap *regmap, u16 hpload_dc,
2029 const u16 *dc_threshold)
2030{
2031 int i;
2032
2033 for (i = 0; i < CS43130_DC_THRESHOLD; i++) {
2034 if (hpload_dc <= dc_threshold[i])
2035 break;
2036 }
2037
2038 regmap_multi_reg_write(regmap, hv_seq[i], ARRAY_SIZE(hv_seq[i]));
2039
2040 return 0;
2041}
2042
2043static void cs43130_imp_meas(struct work_struct *wk)
2044{
2045 unsigned int reg, seq_size;
2046 int i, ret, ac_idx;
2047 struct cs43130_private *cs43130;
2048 struct snd_soc_codec *codec;
2049 struct reg_sequences *hpload_seq;
2050
2051 cs43130 = container_of(wk, struct cs43130_private, work);
2052 codec = cs43130->codec;
2053
2054 if (!cs43130->mclk)
2055 return;
2056
2057 cs43130->hpload_done = false;
2058
2059 mutex_lock(&cs43130->clk_mutex);
2060 if (!cs43130->clk_req) {
2061 /* clk not in use */
2062 cs43130_set_pll(codec, 0, 0, cs43130->mclk, CS43130_MCLK_22M);
2063 if (cs43130->pll_bypass)
2064 cs43130_change_clksrc(codec, CS43130_MCLK_SRC_EXT);
2065 else
2066 cs43130_change_clksrc(codec, CS43130_MCLK_SRC_PLL);
2067 }
2068
2069 cs43130->clk_req++;
2070 mutex_unlock(&cs43130->clk_mutex);
2071
2072 regmap_read(cs43130->regmap, CS43130_INT_STATUS_4, &reg);
2073
2074 switch (cs43130->dev_id) {
2075 case CS43130_CHIP_ID:
2076 hpload_seq = hpload_seq1;
2077 seq_size = ARRAY_SIZE(hpload_seq1);
2078 break;
2079 case CS43131_CHIP_ID:
2080 hpload_seq = hpload_seq2;
2081 seq_size = ARRAY_SIZE(hpload_seq2);
2082 }
2083
2084 i = 0;
2085 ac_idx = 0;
2086 while (i < seq_size) {
2087 ret = cs43130_hpload_proc(cs43130, hpload_seq[i].seq,
2088 hpload_seq[i].size,
2089 hpload_seq[i].msk, ac_idx);
2090 if (ret < 0)
2091 goto exit;
2092
2093 cs43130_update_hpload(hpload_seq[i].msk, ac_idx, cs43130);
2094
2095 if (cs43130->ac_meas &&
2096 hpload_seq[i].msk == CS43130_HPLOAD_AC_INT &&
2097 ac_idx < CS43130_AC_FREQ - 1) {
2098 ac_idx++;
2099 } else {
2100 ac_idx = 0;
2101 i++;
2102 }
2103 }
2104 cs43130->hpload_done = true;
2105
2106 if (cs43130->hpload_dc[HP_LEFT] >= CS43130_LINEOUT_LOAD)
2107 snd_soc_jack_report(&cs43130->jack, CS43130_JACK_LINEOUT,
2108 CS43130_JACK_MASK);
2109 else
2110 snd_soc_jack_report(&cs43130->jack, CS43130_JACK_HEADPHONE,
2111 CS43130_JACK_MASK);
2112
2113 dev_dbg(codec->dev, "Set HP output control. DC threshold\n");
2114 for (i = 0; i < CS43130_DC_THRESHOLD; i++)
2115 dev_dbg(codec->dev, "DC threshold[%d]: %u.\n", i,
2116 cs43130->dc_threshold[i]);
2117
2118 cs43130_set_hv(cs43130->regmap, cs43130->hpload_dc[HP_LEFT],
2119 cs43130->dc_threshold);
2120
2121exit:
2122 switch (cs43130->dev_id) {
2123 case CS43130_CHIP_ID:
2124 cs43130_hpload_proc(cs43130, hp_dis_cal_seq,
2125 ARRAY_SIZE(hp_dis_cal_seq),
2126 CS43130_HPLOAD_OFF_INT, ac_idx);
2127 break;
2128 case CS43131_CHIP_ID:
2129 cs43130_hpload_proc(cs43130, hp_dis_cal_seq2,
2130 ARRAY_SIZE(hp_dis_cal_seq2),
2131 CS43130_HPLOAD_OFF_INT, ac_idx);
2132 }
2133
2134 regmap_multi_reg_write(cs43130->regmap, hp_cln_seq,
2135 ARRAY_SIZE(hp_cln_seq));
2136
2137 mutex_lock(&cs43130->clk_mutex);
2138 cs43130->clk_req--;
2139 /* clk not in use */
2140 if (!cs43130->clk_req)
2141 cs43130_change_clksrc(codec, CS43130_MCLK_SRC_RCO);
2142 mutex_unlock(&cs43130->clk_mutex);
2143}
2144
2145static irqreturn_t cs43130_irq_thread(int irq, void *data)
2146{
2147 struct cs43130_private *cs43130 = (struct cs43130_private *)data;
2148 struct snd_soc_codec *codec = cs43130->codec;
2149 unsigned int stickies[CS43130_NUM_INT];
2150 unsigned int irq_occurrance = 0;
2151 unsigned int masks[CS43130_NUM_INT];
2152 int i, j;
2153
2154 for (i = 0; i < ARRAY_SIZE(stickies); i++) {
2155 regmap_read(cs43130->regmap, CS43130_INT_STATUS_1 + i,
2156 &stickies[i]);
2157 regmap_read(cs43130->regmap, CS43130_INT_MASK_1 + i,
2158 &masks[i]);
2159 }
2160
2161 for (i = 0; i < ARRAY_SIZE(stickies); i++) {
2162 stickies[i] = stickies[i] & (~masks[i]);
2163 for (j = 0; j < 8; j++)
2164 irq_occurrance += (stickies[i] >> j) & 1;
2165 }
2166 dev_dbg(codec->dev, "number of interrupts occurred (%u)\n",
2167 irq_occurrance);
2168
2169 if (!irq_occurrance)
2170 return IRQ_NONE;
2171
2172 if (stickies[0] & CS43130_XTAL_RDY_INT) {
2173 complete(&cs43130->xtal_rdy);
2174 return IRQ_HANDLED;
2175 }
2176
2177 if (stickies[0] & CS43130_PLL_RDY_INT) {
2178 complete(&cs43130->pll_rdy);
2179 return IRQ_HANDLED;
2180 }
2181
2182 if (stickies[3] & CS43130_HPLOAD_NO_DC_INT) {
2183 cs43130->hpload_stat = stickies[3];
2184 dev_err(codec->dev,
2185 "DC load has not completed before AC load (%x)\n",
2186 cs43130->hpload_stat);
2187 complete(&cs43130->hpload_evt);
2188 return IRQ_HANDLED;
2189 }
2190
2191 if (stickies[3] & CS43130_HPLOAD_UNPLUG_INT) {
2192 cs43130->hpload_stat = stickies[3];
2193 dev_err(codec->dev, "HP unplugged during measurement (%x)\n",
2194 cs43130->hpload_stat);
2195 complete(&cs43130->hpload_evt);
2196 return IRQ_HANDLED;
2197 }
2198
2199 if (stickies[3] & CS43130_HPLOAD_OOR_INT) {
2200 cs43130->hpload_stat = stickies[3];
2201 dev_err(codec->dev, "HP load out of range (%x)\n",
2202 cs43130->hpload_stat);
2203 complete(&cs43130->hpload_evt);
2204 return IRQ_HANDLED;
2205 }
2206
2207 if (stickies[3] & CS43130_HPLOAD_AC_INT) {
2208 cs43130->hpload_stat = stickies[3];
2209 dev_dbg(codec->dev, "HP AC load measurement done (%x)\n",
2210 cs43130->hpload_stat);
2211 complete(&cs43130->hpload_evt);
2212 return IRQ_HANDLED;
2213 }
2214
2215 if (stickies[3] & CS43130_HPLOAD_DC_INT) {
2216 cs43130->hpload_stat = stickies[3];
2217 dev_dbg(codec->dev, "HP DC load measurement done (%x)\n",
2218 cs43130->hpload_stat);
2219 complete(&cs43130->hpload_evt);
2220 return IRQ_HANDLED;
2221 }
2222
2223 if (stickies[3] & CS43130_HPLOAD_ON_INT) {
2224 cs43130->hpload_stat = stickies[3];
2225 dev_dbg(codec->dev, "HP load state machine on done (%x)\n",
2226 cs43130->hpload_stat);
2227 complete(&cs43130->hpload_evt);
2228 return IRQ_HANDLED;
2229 }
2230
2231 if (stickies[3] & CS43130_HPLOAD_OFF_INT) {
2232 cs43130->hpload_stat = stickies[3];
2233 dev_dbg(codec->dev, "HP load state machine off done (%x)\n",
2234 cs43130->hpload_stat);
2235 complete(&cs43130->hpload_evt);
2236 return IRQ_HANDLED;
2237 }
2238
2239 if (stickies[0] & CS43130_XTAL_ERR_INT) {
2240 dev_err(codec->dev, "Crystal err: clock is not running\n");
2241 return IRQ_HANDLED;
2242 }
2243
2244 if (stickies[0] & CS43130_HP_UNPLUG_INT) {
2245 dev_dbg(codec->dev, "HP unplugged\n");
2246 cs43130->hpload_done = false;
2247 snd_soc_jack_report(&cs43130->jack, 0, CS43130_JACK_MASK);
2248 return IRQ_HANDLED;
2249 }
2250
2251 if (stickies[0] & CS43130_HP_PLUG_INT) {
2252 if (cs43130->dc_meas && !cs43130->hpload_done &&
2253 !work_busy(&cs43130->work)) {
2254 dev_dbg(codec->dev, "HP load queue work\n");
2255 queue_work(cs43130->wq, &cs43130->work);
2256 }
2257
2258 snd_soc_jack_report(&cs43130->jack, SND_JACK_MECHANICAL,
2259 CS43130_JACK_MASK);
2260 return IRQ_HANDLED;
2261 }
2262
2263 return IRQ_NONE;
2264}
2265
2266static int cs43130_probe(struct snd_soc_codec *codec)
2267{
2268 int ret;
2269 struct cs43130_private *cs43130 = snd_soc_codec_get_drvdata(codec);
2270 struct snd_soc_card *card = codec->component.card;
2271 unsigned int reg;
2272
2273 cs43130->codec = codec;
2274
2275 if (cs43130->xtal_ibias != CS43130_XTAL_UNUSED) {
2276 regmap_update_bits(cs43130->regmap, CS43130_CRYSTAL_SET,
2277 CS43130_XTAL_IBIAS_MASK,
2278 cs43130->xtal_ibias);
2279 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
2280 CS43130_XTAL_ERR_INT, 0);
2281 }
2282
2283 ret = snd_soc_card_jack_new(card, "Headphone", CS43130_JACK_MASK,
2284 &cs43130->jack, NULL, 0);
2285 if (ret < 0) {
2286 dev_err(codec->dev, "Cannot create jack\n");
2287 return ret;
2288 }
2289
2290 cs43130->hpload_done = false;
2291 if (cs43130->dc_meas) {
2292 ret = device_create_file(codec->dev, &dev_attr_hpload_dc_l);
2293 if (ret < 0)
2294 return ret;
2295
2296 ret = device_create_file(codec->dev, &dev_attr_hpload_dc_r);
2297 if (ret < 0)
2298 return ret;
2299
2300 ret = device_create_file(codec->dev, &dev_attr_hpload_ac_l);
2301 if (ret < 0)
2302 return ret;
2303
2304 ret = device_create_file(codec->dev, &dev_attr_hpload_ac_r);
2305 if (ret < 0)
2306 return ret;
2307
2308 cs43130->wq = create_singlethread_workqueue("cs43130_hp");
2309 INIT_WORK(&cs43130->work, cs43130_imp_meas);
2310 }
2311
2312 regmap_read(cs43130->regmap, CS43130_INT_STATUS_1, &reg);
2313 regmap_read(cs43130->regmap, CS43130_HP_STATUS, &reg);
2314 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
2315 CS43130_HP_PLUG_INT | CS43130_HP_UNPLUG_INT, 0);
2316 regmap_update_bits(cs43130->regmap, CS43130_HP_DETECT,
2317 CS43130_HP_DETECT_CTRL_MASK, 0);
2318 regmap_update_bits(cs43130->regmap, CS43130_HP_DETECT,
2319 CS43130_HP_DETECT_CTRL_MASK,
2320 CS43130_HP_DETECT_CTRL_MASK);
2321
2322 return 0;
2323}
2324
2325static struct snd_soc_codec_driver soc_codec_dev_cs43130 = {
2326 .probe = cs43130_probe,
2327 .component_driver = {
2328 .controls = cs43130_snd_controls,
2329 .num_controls = ARRAY_SIZE(cs43130_snd_controls),
2330 },
2331 .set_sysclk = cs43130_codec_set_sysclk,
2332 .set_pll = cs43130_set_pll,
2333};
2334
2335static const struct regmap_config cs43130_regmap = {
2336 .reg_bits = 24,
2337 .pad_bits = 8,
2338 .val_bits = 8,
2339
2340 .max_register = CS43130_LASTREG,
2341 .reg_defaults = cs43130_reg_defaults,
2342 .num_reg_defaults = ARRAY_SIZE(cs43130_reg_defaults),
2343 .readable_reg = cs43130_readable_register,
2344 .precious_reg = cs43130_precious_register,
2345 .volatile_reg = cs43130_volatile_register,
2346 .cache_type = REGCACHE_RBTREE,
2347 .use_single_rw = true, /* needed for regcache_sync */
2348};
2349
2350static u16 const cs43130_dc_threshold[CS43130_DC_THRESHOLD] = {
2351 50,
2352 120,
2353};
2354
2355static int cs43130_handle_device_data(struct i2c_client *i2c_client,
2356 struct cs43130_private *cs43130)
2357{
2358 struct device_node *np = i2c_client->dev.of_node;
2359 unsigned int val;
2360 int i;
2361
2362 if (of_property_read_u32(np, "cirrus,xtal-ibias", &val) < 0) {
2363 /* Crystal is unused. System clock is used for external MCLK */
2364 cs43130->xtal_ibias = CS43130_XTAL_UNUSED;
2365 return 0;
2366 }
2367
2368 switch (val) {
2369 case 1:
2370 cs43130->xtal_ibias = CS43130_XTAL_IBIAS_7_5UA;
2371 break;
2372 case 2:
2373 cs43130->xtal_ibias = CS43130_XTAL_IBIAS_12_5UA;
2374 break;
2375 case 3:
2376 cs43130->xtal_ibias = CS43130_XTAL_IBIAS_15UA;
2377 break;
2378 default:
2379 dev_err(&i2c_client->dev,
2380 "Invalid cirrus,xtal-ibias value: %d\n", val);
2381 return -EINVAL;
2382 }
2383
2384 cs43130->dc_meas = of_property_read_bool(np, "cirrus,dc-measure");
2385 cs43130->ac_meas = of_property_read_bool(np, "cirrus,ac-measure");
2386
2387 if (of_property_read_u16_array(np, "cirrus,ac-freq", cs43130->ac_freq,
2388 CS43130_AC_FREQ) < 0) {
2389 for (i = 0; i < CS43130_AC_FREQ; i++)
2390 cs43130->ac_freq[i] = cs43130_ac_freq[i];
2391 }
2392
2393 if (of_property_read_u16_array(np, "cirrus,dc-threshold",
2394 cs43130->dc_threshold,
2395 CS43130_DC_THRESHOLD) < 0) {
2396 for (i = 0; i < CS43130_DC_THRESHOLD; i++)
2397 cs43130->dc_threshold[i] = cs43130_dc_threshold[i];
2398 }
2399
2400 return 0;
2401}
2402
2403static int cs43130_i2c_probe(struct i2c_client *client,
2404 const struct i2c_device_id *id)
2405{
2406 struct cs43130_private *cs43130;
2407 int ret;
2408 unsigned int devid = 0;
2409 unsigned int reg;
2410 int i;
2411
2412 cs43130 = devm_kzalloc(&client->dev, sizeof(*cs43130), GFP_KERNEL);
2413 if (!cs43130)
2414 return -ENOMEM;
2415
2416 i2c_set_clientdata(client, cs43130);
2417
2418 cs43130->regmap = devm_regmap_init_i2c(client, &cs43130_regmap);
2419 if (IS_ERR(cs43130->regmap)) {
2420 ret = PTR_ERR(cs43130->regmap);
2421 return ret;
2422 }
2423
2424 if (client->dev.of_node) {
2425 ret = cs43130_handle_device_data(client, cs43130);
2426 if (ret != 0)
2427 return ret;
2428 }
2429 for (i = 0; i < ARRAY_SIZE(cs43130->supplies); i++)
2430 cs43130->supplies[i].supply = cs43130_supply_names[i];
2431
2432 ret = devm_regulator_bulk_get(&client->dev,
2433 ARRAY_SIZE(cs43130->supplies),
2434 cs43130->supplies);
2435 if (ret != 0) {
2436 dev_err(&client->dev, "Failed to request supplies: %d\n", ret);
2437 return ret;
2438 }
2439 ret = regulator_bulk_enable(ARRAY_SIZE(cs43130->supplies),
2440 cs43130->supplies);
2441 if (ret != 0) {
2442 dev_err(&client->dev, "Failed to enable supplies: %d\n", ret);
2443 return ret;
2444 }
2445
2446 cs43130->reset_gpio = devm_gpiod_get_optional(&client->dev,
2447 "reset", GPIOD_OUT_LOW);
2448 if (IS_ERR(cs43130->reset_gpio))
2449 return PTR_ERR(cs43130->reset_gpio);
2450
2451 gpiod_set_value_cansleep(cs43130->reset_gpio, 1);
2452
2453 usleep_range(2000, 2050);
2454
2455 ret = regmap_read(cs43130->regmap, CS43130_DEVID_AB, &reg);
2456
2457 devid = (reg & 0xFF) << 12;
2458 ret = regmap_read(cs43130->regmap, CS43130_DEVID_CD, &reg);
2459 devid |= (reg & 0xFF) << 4;
2460 ret = regmap_read(cs43130->regmap, CS43130_DEVID_E, &reg);
2461 devid |= (reg & 0xF0) >> 4;
2462
2463 switch (devid) {
2464 case CS43130_CHIP_ID:
2465 case CS4399_CHIP_ID:
2466 case CS43131_CHIP_ID:
2467 case CS43198_CHIP_ID:
2468 break;
2469 default:
2470 dev_err(&client->dev,
2471 "CS43130 Device ID %X. Expected ID %X, %X, %X or %X\n",
2472 devid, CS43130_CHIP_ID, CS4399_CHIP_ID,
2473 CS43131_CHIP_ID, CS43198_CHIP_ID);
2474 ret = -ENODEV;
2475 goto err;
2476 }
2477
2478 cs43130->dev_id = devid;
2479 ret = regmap_read(cs43130->regmap, CS43130_REV_ID, &reg);
2480 if (ret < 0) {
2481 dev_err(&client->dev, "Get Revision ID failed\n");
2482 goto err;
2483 }
2484
2485 dev_info(&client->dev,
2486 "Cirrus Logic CS43130 (%x), Revision: %02X\n", devid,
2487 reg & 0xFF);
2488
2489 mutex_init(&cs43130->clk_mutex);
2490
2491 init_completion(&cs43130->xtal_rdy);
2492 init_completion(&cs43130->pll_rdy);
2493 init_completion(&cs43130->hpload_evt);
2494
2495 ret = devm_request_threaded_irq(&client->dev, client->irq,
2496 NULL, cs43130_irq_thread,
2497 IRQF_ONESHOT | IRQF_TRIGGER_LOW,
2498 "cs43130", cs43130);
2499 if (ret != 0) {
2500 dev_err(&client->dev, "Failed to request IRQ: %d\n", ret);
2501 return ret;
2502 }
2503
2504 cs43130->mclk_int_src = CS43130_MCLK_SRC_RCO;
2505
2506 pm_runtime_set_autosuspend_delay(&client->dev, 100);
2507 pm_runtime_use_autosuspend(&client->dev);
2508 pm_runtime_set_active(&client->dev);
2509 pm_runtime_enable(&client->dev);
2510
2511 switch (cs43130->dev_id) {
2512 case CS43130_CHIP_ID:
2513 case CS43131_CHIP_ID:
2514 memcpy(all_hp_widgets, digital_hp_widgets,
2515 sizeof(digital_hp_widgets));
2516 memcpy(all_hp_widgets + ARRAY_SIZE(digital_hp_widgets),
2517 analog_hp_widgets, sizeof(analog_hp_widgets));
2518 memcpy(all_hp_routes, digital_hp_routes,
2519 sizeof(digital_hp_routes));
2520 memcpy(all_hp_routes + ARRAY_SIZE(digital_hp_routes),
2521 analog_hp_routes, sizeof(analog_hp_routes));
2522
2523 soc_codec_dev_cs43130.component_driver.dapm_widgets =
2524 all_hp_widgets;
2525 soc_codec_dev_cs43130.component_driver.num_dapm_widgets =
2526 ARRAY_SIZE(all_hp_widgets);
2527 soc_codec_dev_cs43130.component_driver.dapm_routes =
2528 all_hp_routes;
2529 soc_codec_dev_cs43130.component_driver.num_dapm_routes =
2530 ARRAY_SIZE(all_hp_routes);
2531 break;
2532 case CS43198_CHIP_ID:
2533 case CS4399_CHIP_ID:
2534 soc_codec_dev_cs43130.component_driver.dapm_widgets =
2535 digital_hp_widgets;
2536 soc_codec_dev_cs43130.component_driver.num_dapm_widgets =
2537 ARRAY_SIZE(digital_hp_widgets);
2538 soc_codec_dev_cs43130.component_driver.dapm_routes =
2539 digital_hp_routes;
2540 soc_codec_dev_cs43130.component_driver.num_dapm_routes =
2541 ARRAY_SIZE(digital_hp_routes);
2542 }
2543
2544 ret = snd_soc_register_codec(&client->dev, &soc_codec_dev_cs43130,
2545 cs43130_dai, ARRAY_SIZE(cs43130_dai));
2546 if (ret < 0) {
2547 dev_err(&client->dev,
2548 "snd_soc_register_codec failed with ret = %d\n", ret);
2549 goto err;
2550 }
2551
2552 regmap_update_bits(cs43130->regmap, CS43130_PAD_INT_CFG,
2553 CS43130_ASP_3ST_MASK, 0);
2554 regmap_update_bits(cs43130->regmap, CS43130_PAD_INT_CFG,
2555 CS43130_XSP_3ST_MASK, 0);
2556
2557 return 0;
2558err:
2559 return ret;
2560}
2561
2562static int cs43130_i2c_remove(struct i2c_client *client)
2563{
2564 struct cs43130_private *cs43130 = i2c_get_clientdata(client);
2565
2566 if (cs43130->xtal_ibias != CS43130_XTAL_UNUSED)
2567 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
2568 CS43130_XTAL_ERR_INT,
2569 1 << CS43130_XTAL_ERR_INT_SHIFT);
2570
2571 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
2572 CS43130_HP_PLUG_INT | CS43130_HP_UNPLUG_INT,
2573 CS43130_HP_PLUG_INT | CS43130_HP_UNPLUG_INT);
2574
2575 if (cs43130->dc_meas) {
2576 cancel_work_sync(&cs43130->work);
2577 flush_workqueue(cs43130->wq);
2578
2579 device_remove_file(&client->dev, &dev_attr_hpload_dc_l);
2580 device_remove_file(&client->dev, &dev_attr_hpload_dc_r);
2581 device_remove_file(&client->dev, &dev_attr_hpload_ac_l);
2582 device_remove_file(&client->dev, &dev_attr_hpload_ac_r);
2583 }
2584
2585 if (cs43130->reset_gpio)
2586 gpiod_set_value_cansleep(cs43130->reset_gpio, 0);
2587
2588 pm_runtime_disable(&client->dev);
2589 regulator_bulk_disable(CS43130_NUM_SUPPLIES, cs43130->supplies);
2590
2591 snd_soc_unregister_codec(&client->dev);
2592
2593 return 0;
2594}
2595
2596static int cs43130_runtime_suspend(struct device *dev)
2597{
2598 struct cs43130_private *cs43130 = dev_get_drvdata(dev);
2599
2600 if (cs43130->xtal_ibias != CS43130_XTAL_UNUSED)
2601 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
2602 CS43130_XTAL_ERR_INT,
2603 1 << CS43130_XTAL_ERR_INT_SHIFT);
2604
2605 regcache_cache_only(cs43130->regmap, true);
2606 regcache_mark_dirty(cs43130->regmap);
2607
2608 gpiod_set_value_cansleep(cs43130->reset_gpio, 0);
2609
2610 regulator_bulk_disable(CS43130_NUM_SUPPLIES, cs43130->supplies);
2611
2612 return 0;
2613}
2614
2615static int cs43130_runtime_resume(struct device *dev)
2616{
2617 struct cs43130_private *cs43130 = dev_get_drvdata(dev);
2618 int ret;
2619
2620 ret = regulator_bulk_enable(CS43130_NUM_SUPPLIES, cs43130->supplies);
2621 if (ret != 0) {
2622 dev_err(dev, "Failed to enable supplies: %d\n", ret);
2623 return ret;
2624 }
2625
2626 regcache_cache_only(cs43130->regmap, false);
2627
2628 gpiod_set_value_cansleep(cs43130->reset_gpio, 1);
2629
2630 usleep_range(2000, 2050);
2631
2632 ret = regcache_sync(cs43130->regmap);
2633 if (ret != 0) {
2634 dev_err(dev, "Failed to restore register cache\n");
2635 goto err;
2636 }
2637
2638 if (cs43130->xtal_ibias != CS43130_XTAL_UNUSED)
2639 regmap_update_bits(cs43130->regmap, CS43130_INT_MASK_1,
2640 CS43130_XTAL_ERR_INT, 0);
2641
2642 return 0;
2643err:
2644 regcache_cache_only(cs43130->regmap, true);
2645 regulator_bulk_disable(CS43130_NUM_SUPPLIES, cs43130->supplies);
2646
2647 return ret;
2648}
2649
2650static const struct dev_pm_ops cs43130_runtime_pm = {
2651 SET_RUNTIME_PM_OPS(cs43130_runtime_suspend, cs43130_runtime_resume,
2652 NULL)
2653};
2654
2655static const struct of_device_id cs43130_of_match[] = {
2656 {.compatible = "cirrus,cs43130",},
2657 {.compatible = "cirrus,cs4399",},
2658 {.compatible = "cirrus,cs43131",},
2659 {.compatible = "cirrus,cs43198",},
2660 {},
2661};
2662
2663MODULE_DEVICE_TABLE(of, cs43130_of_match);
2664
2665static const struct i2c_device_id cs43130_i2c_id[] = {
2666 {"cs43130", 0},
2667 {"cs4399", 0},
2668 {"cs43131", 0},
2669 {"cs43198", 0},
2670 {}
2671};
2672
2673MODULE_DEVICE_TABLE(i2c, cs43130_i2c_id);
2674
2675static struct i2c_driver cs43130_i2c_driver = {
2676 .driver = {
2677 .name = "cs43130",
2678 .of_match_table = cs43130_of_match,
2679 .pm = &cs43130_runtime_pm,
2680 },
2681 .id_table = cs43130_i2c_id,
2682 .probe = cs43130_i2c_probe,
2683 .remove = cs43130_i2c_remove,
2684};
2685
2686module_i2c_driver(cs43130_i2c_driver);
2687
2688MODULE_AUTHOR("Li Xu <li.xu@cirrus.com>");
2689MODULE_DESCRIPTION("Cirrus Logic CS43130 ALSA SoC Codec Driver");
2690MODULE_LICENSE("GPL");
diff --git a/sound/soc/codecs/cs43130.h b/sound/soc/codecs/cs43130.h
new file mode 100644
index 000000000000..781258418d89
--- /dev/null
+++ b/sound/soc/codecs/cs43130.h
@@ -0,0 +1,546 @@
1/*
2 * ALSA SoC CS43130 codec driver
3 *
4 * Copyright 2017 Cirrus Logic, Inc.
5 *
6 * Author: Li Xu <li.xu@cirrus.com>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 */
18
19#ifndef __CS43130_H__
20#define __CS43130_H__
21
22/* CS43130 registers addresses */
23/* all reg address is shifted by a byte for control byte to be LSB */
24#define CS43130_FIRSTREG 0x010000
25#define CS43130_LASTREG 0x190000
26#define CS43130_CHIP_ID 0x00043130
27#define CS4399_CHIP_ID 0x00043990
28#define CS43131_CHIP_ID 0x00043131
29#define CS43198_CHIP_ID 0x00043198
30#define CS43130_DEVID_AB 0x010000 /* Device ID A & B [RO] */
31#define CS43130_DEVID_CD 0x010001 /* Device ID C & D [RO] */
32#define CS43130_DEVID_E 0x010002 /* Device ID E [RO] */
33#define CS43130_FAB_ID 0x010003 /* Fab ID [RO] */
34#define CS43130_REV_ID 0x010004 /* Revision ID [RO] */
35#define CS43130_SUBREV_ID 0x010005 /* Subrevision ID */
36#define CS43130_SYS_CLK_CTL_1 0x010006 /* System Clocking Ctl 1 */
37#define CS43130_SP_SRATE 0x01000B /* Serial Port Sample Rate */
38#define CS43130_SP_BITSIZE 0x01000C /* Serial Port Bit Size */
39#define CS43130_PAD_INT_CFG 0x01000D /* Pad Interface Config */
40#define CS43130_DXD1 0x010010 /* DXD1 */
41#define CS43130_DXD7 0x010025 /* DXD7 */
42#define CS43130_DXD19 0x010026 /* DXD19 */
43#define CS43130_DXD17 0x010027 /* DXD17 */
44#define CS43130_DXD18 0x010028 /* DXD18 */
45#define CS43130_DXD12 0x01002C /* DXD12 */
46#define CS43130_DXD8 0x01002E /* DXD8 */
47#define CS43130_PWDN_CTL 0x020000 /* Power Down Ctl */
48#define CS43130_DXD2 0x020019 /* DXD2 */
49#define CS43130_CRYSTAL_SET 0x020052 /* Crystal Setting */
50#define CS43130_PLL_SET_1 0x030001 /* PLL Setting 1 */
51#define CS43130_PLL_SET_2 0x030002 /* PLL Setting 2 */
52#define CS43130_PLL_SET_3 0x030003 /* PLL Setting 3 */
53#define CS43130_PLL_SET_4 0x030004 /* PLL Setting 4 */
54#define CS43130_PLL_SET_5 0x030005 /* PLL Setting 5 */
55#define CS43130_PLL_SET_6 0x030008 /* PLL Setting 6 */
56#define CS43130_PLL_SET_7 0x03000A /* PLL Setting 7 */
57#define CS43130_PLL_SET_8 0x03001B /* PLL Setting 8 */
58#define CS43130_PLL_SET_9 0x040002 /* PLL Setting 9 */
59#define CS43130_PLL_SET_10 0x040003 /* PLL Setting 10 */
60#define CS43130_CLKOUT_CTL 0x040004 /* CLKOUT Ctl */
61#define CS43130_ASP_NUM_1 0x040010 /* ASP Numerator 1 */
62#define CS43130_ASP_NUM_2 0x040011 /* ASP Numerator 2 */
63#define CS43130_ASP_DEN_1 0x040012 /* ASP Denominator 1 */
64#define CS43130_ASP_DEN_2 0x040013 /* ASP Denominator 2 */
65#define CS43130_ASP_LRCK_HI_TIME_1 0x040014 /* ASP LRCK High Time 1 */
66#define CS43130_ASP_LRCK_HI_TIME_2 0x040015 /* ASP LRCK High Time 2 */
67#define CS43130_ASP_LRCK_PERIOD_1 0x040016 /* ASP LRCK Period 1 */
68#define CS43130_ASP_LRCK_PERIOD_2 0x040017 /* ASP LRCK Period 2 */
69#define CS43130_ASP_CLOCK_CONF 0x040018 /* ASP Clock Config */
70#define CS43130_ASP_FRAME_CONF 0x040019 /* ASP Frame Config */
71#define CS43130_XSP_NUM_1 0x040020 /* XSP Numerator 1 */
72#define CS43130_XSP_NUM_2 0x040021 /* XSP Numerator 2 */
73#define CS43130_XSP_DEN_1 0x040022 /* XSP Denominator 1 */
74#define CS43130_XSP_DEN_2 0x040023 /* XSP Denominator 2 */
75#define CS43130_XSP_LRCK_HI_TIME_1 0x040024 /* XSP LRCK High Time 1 */
76#define CS43130_XSP_LRCK_HI_TIME_2 0x040025 /* XSP LRCK High Time 2 */
77#define CS43130_XSP_LRCK_PERIOD_1 0x040026 /* XSP LRCK Period 1 */
78#define CS43130_XSP_LRCK_PERIOD_2 0x040027 /* XSP LRCK Period 2 */
79#define CS43130_XSP_CLOCK_CONF 0x040028 /* XSP Clock Config */
80#define CS43130_XSP_FRAME_CONF 0x040029 /* XSP Frame Config */
81#define CS43130_ASP_CH_1_LOC 0x050000 /* ASP Chan 1 Location */
82#define CS43130_ASP_CH_2_LOC 0x050001 /* ASP Chan 2 Location */
83#define CS43130_ASP_CH_1_SZ_EN 0x05000A /* ASP Chan 1 Size, Enable */
84#define CS43130_ASP_CH_2_SZ_EN 0x05000B /* ASP Chan 2 Size, Enable */
85#define CS43130_XSP_CH_1_LOC 0x060000 /* XSP Chan 1 Location */
86#define CS43130_XSP_CH_2_LOC 0x060001 /* XSP Chan 2 Location */
87#define CS43130_XSP_CH_1_SZ_EN 0x06000A /* XSP Chan 1 Size, Enable */
88#define CS43130_XSP_CH_2_SZ_EN 0x06000B /* XSP Chan 2 Size, Enable */
89#define CS43130_DSD_VOL_B 0x070000 /* DSD Volume B */
90#define CS43130_DSD_VOL_A 0x070001 /* DSD Volume A */
91#define CS43130_DSD_PATH_CTL_1 0x070002 /* DSD Proc Path Sig Ctl 1 */
92#define CS43130_DSD_INT_CFG 0x070003 /* DSD Interface Config */
93#define CS43130_DSD_PATH_CTL_2 0x070004 /* DSD Proc Path Sig Ctl 2 */
94#define CS43130_DSD_PCM_MIX_CTL 0x070005 /* DSD and PCM Mixing Ctl */
95#define CS43130_DSD_PATH_CTL_3 0x070006 /* DSD Proc Path Sig Ctl 3 */
96#define CS43130_HP_OUT_CTL_1 0x080000 /* HP Output Ctl 1 */
97#define CS43130_DXD16 0x080024 /* DXD16 */
98#define CS43130_DXD13 0x080032 /* DXD13 */
99#define CS43130_PCM_FILT_OPT 0x090000 /* PCM Filter Option */
100#define CS43130_PCM_VOL_B 0x090001 /* PCM Volume B */
101#define CS43130_PCM_VOL_A 0x090002 /* PCM Volume A */
102#define CS43130_PCM_PATH_CTL_1 0x090003 /* PCM Path Signal Ctl 1 */
103#define CS43130_PCM_PATH_CTL_2 0x090004 /* PCM Path Signal Ctl 2 */
104#define CS43130_DXD6 0x090097 /* DXD6 */
105#define CS43130_CLASS_H_CTL 0x0B0000 /* Class H Ctl */
106#define CS43130_DXD15 0x0B0005 /* DXD15 */
107#define CS43130_DXD14 0x0B0006 /* DXD14 */
108#define CS43130_DXD3 0x0C0002 /* DXD3 */
109#define CS43130_DXD10 0x0C0003 /* DXD10 */
110#define CS43130_DXD11 0x0C0005 /* DXD11 */
111#define CS43130_DXD9 0x0C0006 /* DXD9 */
112#define CS43130_DXD4 0x0C0009 /* DXD4 */
113#define CS43130_DXD5 0x0C000E /* DXD5 */
114#define CS43130_HP_DETECT 0x0D0000 /* HP Detect */
115#define CS43130_HP_STATUS 0x0D0001 /* HP Status [RO] */
116#define CS43130_HP_LOAD_1 0x0E0000 /* HP Load 1 */
117#define CS43130_HP_MEAS_LOAD_1 0x0E0003 /* HP Load Measurement 1 */
118#define CS43130_HP_MEAS_LOAD_2 0x0E0004 /* HP Load Measurement 2 */
119#define CS43130_HP_DC_STAT_1 0x0E000D /* HP DC Load Status 0 [RO] */
120#define CS43130_HP_DC_STAT_2 0x0E000E /* HP DC Load Status 1 [RO] */
121#define CS43130_HP_AC_STAT_1 0x0E0010 /* HP AC Load Status 0 [RO] */
122#define CS43130_HP_AC_STAT_2 0x0E0011 /* HP AC Load Status 1 [RO] */
123#define CS43130_HP_LOAD_STAT 0x0E001A /* HP Load Status [RO] */
124#define CS43130_INT_STATUS_1 0x0F0000 /* Interrupt Status 1 */
125#define CS43130_INT_STATUS_2 0x0F0001 /* Interrupt Status 2 */
126#define CS43130_INT_STATUS_3 0x0F0002 /* Interrupt Status 3 */
127#define CS43130_INT_STATUS_4 0x0F0003 /* Interrupt Status 4 */
128#define CS43130_INT_STATUS_5 0x0F0004 /* Interrupt Status 5 */
129#define CS43130_INT_MASK_1 0x0F0010 /* Interrupt Mask 1 */
130#define CS43130_INT_MASK_2 0x0F0011 /* Interrupt Mask 2 */
131#define CS43130_INT_MASK_3 0x0F0012 /* Interrupt Mask 3 */
132#define CS43130_INT_MASK_4 0x0F0013 /* Interrupt Mask 4 */
133#define CS43130_INT_MASK_5 0x0F0014 /* Interrupt Mask 5 */
134
135#define CS43130_MCLK_SRC_SEL_MASK 0x03
136#define CS43130_MCLK_SRC_SEL_SHIFT 0
137#define CS43130_MCLK_INT_MASK 0x04
138#define CS43130_MCLK_INT_SHIFT 2
139#define CS43130_CH_BITSIZE_MASK 0x03
140#define CS43130_CH_EN_MASK 0x04
141#define CS43130_CH_EN_SHIFT 2
142#define CS43130_ASP_BITSIZE_MASK 0x03
143#define CS43130_XSP_BITSIZE_MASK 0x0C
144#define CS43130_XSP_BITSIZE_SHIFT 2
145#define CS43130_SP_BITSIZE_ASP_SHIFT 0
146#define CS43130_HP_DETECT_CTRL_SHIFT 6
147#define CS43130_HP_DETECT_CTRL_MASK (0x03 << CS43130_HP_DETECT_CTRL_SHIFT)
148#define CS43130_HP_DETECT_INV_SHIFT 5
149#define CS43130_HP_DETECT_INV_MASK (1 << CS43130_HP_DETECT_INV_SHIFT)
150
151/* CS43130_INT_MASK_1 */
152#define CS43130_HP_PLUG_INT_SHIFT 6
153#define CS43130_HP_PLUG_INT (1 << CS43130_HP_PLUG_INT_SHIFT)
154#define CS43130_HP_UNPLUG_INT_SHIFT 5
155#define CS43130_HP_UNPLUG_INT (1 << CS43130_HP_UNPLUG_INT_SHIFT)
156#define CS43130_XTAL_RDY_INT_SHIFT 4
157#define CS43130_XTAL_RDY_INT_MASK 0x10
158#define CS43130_XTAL_RDY_INT (1 << CS43130_XTAL_RDY_INT_SHIFT)
159#define CS43130_XTAL_ERR_INT_SHIFT 3
160#define CS43130_XTAL_ERR_INT (1 << CS43130_XTAL_ERR_INT_SHIFT)
161#define CS43130_PLL_RDY_INT_MASK 0x04
162#define CS43130_PLL_RDY_INT_SHIFT 2
163#define CS43130_PLL_RDY_INT (1 << CS43130_PLL_RDY_INT_SHIFT)
164
165/* CS43130_INT_MASK_4 */
166#define CS43130_INT_MASK_ALL 0xFF
167#define CS43130_HPLOAD_NO_DC_INT_SHIFT 7
168#define CS43130_HPLOAD_NO_DC_INT (1 << CS43130_HPLOAD_NO_DC_INT_SHIFT)
169#define CS43130_HPLOAD_UNPLUG_INT_SHIFT 6
170#define CS43130_HPLOAD_UNPLUG_INT (1 << CS43130_HPLOAD_UNPLUG_INT_SHIFT)
171#define CS43130_HPLOAD_OOR_INT_SHIFT 4
172#define CS43130_HPLOAD_OOR_INT (1 << CS43130_HPLOAD_OOR_INT_SHIFT)
173#define CS43130_HPLOAD_AC_INT_SHIFT 3
174#define CS43130_HPLOAD_AC_INT (1 << CS43130_HPLOAD_AC_INT_SHIFT)
175#define CS43130_HPLOAD_DC_INT_SHIFT 2
176#define CS43130_HPLOAD_DC_INT (1 << CS43130_HPLOAD_DC_INT_SHIFT)
177#define CS43130_HPLOAD_OFF_INT_SHIFT 1
178#define CS43130_HPLOAD_OFF_INT (1 << CS43130_HPLOAD_OFF_INT_SHIFT)
179#define CS43130_HPLOAD_ON_INT 1
180
181/* CS43130_HP_LOAD_1 */
182#define CS43130_HPLOAD_EN_SHIFT 7
183#define CS43130_HPLOAD_EN (1 << CS43130_HPLOAD_EN_SHIFT)
184#define CS43130_HPLOAD_CHN_SEL_SHIFT 4
185#define CS43130_HPLOAD_CHN_SEL (1 << CS43130_HPLOAD_CHN_SEL_SHIFT)
186#define CS43130_HPLOAD_AC_START_SHIFT 1
187#define CS43130_HPLOAD_AC_START (1 << CS43130_HPLOAD_AC_START_SHIFT)
188#define CS43130_HPLOAD_DC_START 1
189
190/* Reg CS43130_SP_BITSIZE */
191#define CS43130_SP_BIT_SIZE_8 0x03
192#define CS43130_SP_BIT_SIZE_16 0x02
193#define CS43130_SP_BIT_SIZE_24 0x01
194#define CS43130_SP_BIT_SIZE_32 0x00
195
196/* Reg CS43130_SP_CH_SZ_EN */
197#define CS43130_CH_BIT_SIZE_8 0x00
198#define CS43130_CH_BIT_SIZE_16 0x01
199#define CS43130_CH_BIT_SIZE_24 0x02
200#define CS43130_CH_BIT_SIZE_32 0x03
201
202/* PLL */
203#define CS43130_PLL_START_MASK 0x01
204#define CS43130_PLL_MODE_MASK 0x02
205#define CS43130_PLL_MODE_SHIFT 1
206
207#define CS43130_PLL_REF_PREDIV_MASK 0x3
208
209#define CS43130_SP_STP_MASK 0x10
210#define CS43130_SP_STP_SHIFT 4
211#define CS43130_SP_5050_MASK 0x08
212#define CS43130_SP_5050_SHIFT 3
213#define CS43130_SP_FSD_MASK 0x07
214
215#define CS43130_SP_MODE_MASK 0x10
216#define CS43130_SP_MODE_SHIFT 4
217#define CS43130_SP_SCPOL_OUT_MASK 0x08
218#define CS43130_SP_SCPOL_OUT_SHIFT 3
219#define CS43130_SP_SCPOL_IN_MASK 0x04
220#define CS43130_SP_SCPOL_IN_SHIFT 2
221#define CS43130_SP_LCPOL_OUT_MASK 0x02
222#define CS43130_SP_LCPOL_OUT_SHIFT 1
223#define CS43130_SP_LCPOL_IN_MASK 0x01
224#define CS43130_SP_LCPOL_IN_SHIFT 0
225
226/* Reg CS43130_PWDN_CTL */
227#define CS43130_PDN_XSP_MASK 0x80
228#define CS43130_PDN_XSP_SHIFT 7
229#define CS43130_PDN_ASP_MASK 0x40
230#define CS43130_PDN_ASP_SHIFT 6
231#define CS43130_PDN_DSPIF_MASK 0x20
232#define CS43130_PDN_DSDIF_SHIFT 5
233#define CS43130_PDN_HP_MASK 0x10
234#define CS43130_PDN_HP_SHIFT 4
235#define CS43130_PDN_XTAL_MASK 0x08
236#define CS43130_PDN_XTAL_SHIFT 3
237#define CS43130_PDN_PLL_MASK 0x04
238#define CS43130_PDN_PLL_SHIFT 2
239#define CS43130_PDN_CLKOUT_MASK 0x02
240#define CS43130_PDN_CLKOUT_SHIFT 1
241
242/* Reg CS43130_HP_OUT_CTL_1 */
243#define CS43130_HP_IN_EN_SHIFT 3
244#define CS43130_HP_IN_EN_MASK 0x08
245
246/* Reg CS43130_PAD_INT_CFG */
247#define CS43130_ASP_3ST_MASK 0x01
248#define CS43130_XSP_3ST_MASK 0x02
249
250/* Reg CS43130_PLL_SET_2 */
251#define CS43130_PLL_DIV_DATA_MASK 0x000000FF
252#define CS43130_PLL_DIV_FRAC_0_DATA_SHIFT 0
253
254/* Reg CS43130_PLL_SET_3 */
255#define CS43130_PLL_DIV_FRAC_1_DATA_SHIFT 8
256
257/* Reg CS43130_PLL_SET_4 */
258#define CS43130_PLL_DIV_FRAC_2_DATA_SHIFT 16
259
260/* Reg CS43130_SP_DEN_1 */
261#define CS43130_SP_M_LSB_DATA_MASK 0x00FF
262#define CS43130_SP_M_LSB_DATA_SHIFT 0
263
264/* Reg CS43130_SP_DEN_2 */
265#define CS43130_SP_M_MSB_DATA_MASK 0xFF00
266#define CS43130_SP_M_MSB_DATA_SHIFT 8
267
268/* Reg CS43130_SP_NUM_1 */
269#define CS43130_SP_N_LSB_DATA_MASK 0x00FF
270#define CS43130_SP_N_LSB_DATA_SHIFT 0
271
272/* Reg CS43130_SP_NUM_2 */
273#define CS43130_SP_N_MSB_DATA_MASK 0xFF00
274#define CS43130_SP_N_MSB_DATA_SHIFT 8
275
276/* Reg CS43130_SP_LRCK_HI_TIME_1 */
277#define CS43130_SP_LCHI_DATA_MASK 0x00FF
278#define CS43130_SP_LCHI_LSB_DATA_SHIFT 0
279
280/* Reg CS43130_SP_LRCK_HI_TIME_2 */
281#define CS43130_SP_LCHI_MSB_DATA_SHIFT 8
282
283/* Reg CS43130_SP_LRCK_PERIOD_1 */
284#define CS43130_SP_LCPR_DATA_MASK 0x00FF
285#define CS43130_SP_LCPR_LSB_DATA_SHIFT 0
286
287/* Reg CS43130_SP_LRCK_PERIOD_2 */
288#define CS43130_SP_LCPR_MSB_DATA_SHIFT 8
289
290#define CS43130_PCM_FORMATS (SNDRV_PCM_FMTBIT_S8 | \
291 SNDRV_PCM_FMTBIT_S16_LE | \
292 SNDRV_PCM_FMTBIT_S24_LE | \
293 SNDRV_PCM_FMTBIT_S32_LE)
294
295#define CS43130_DOP_FORMATS (SNDRV_PCM_FMTBIT_DSD_U16_LE | \
296 SNDRV_PCM_FMTBIT_DSD_U16_BE | \
297 SNDRV_PCM_FMTBIT_S24_LE)
298
299/* Reg CS43130_CRYSTAL_SET */
300#define CS43130_XTAL_IBIAS_MASK 0x07
301
302/* Reg CS43130_PATH_CTL_1 */
303#define CS43130_MUTE_MASK 0x03
304#define CS43130_MUTE_EN 0x03
305
306/* Reg CS43130_DSD_INT_CFG */
307#define CS43130_DSD_MASTER 0x04
308
309/* Reg CS43130_DSD_PATH_CTL_2 */
310#define CS43130_DSD_SRC_MASK 0x60
311#define CS43130_DSD_SRC_SHIFT 5
312#define CS43130_DSD_EN_SHIFT 4
313#define CS43130_DSD_SPEED_MASK 0x04
314#define CS43130_DSD_SPEED_SHIFT 2
315
316/* Reg CS43130_DSD_PCM_MIX_CTL */
317#define CS43130_MIX_PCM_PREP_SHIFT 1
318#define CS43130_MIX_PCM_PREP_MASK 0x02
319
320#define CS43130_MIX_PCM_DSD_SHIFT 0
321#define CS43130_MIX_PCM_DSD_MASK 0x01
322
323/* Reg CS43130_HP_MEAS_LOAD */
324#define CS43130_HP_MEAS_LOAD_MASK 0x000000FF
325#define CS43130_HP_MEAS_LOAD_1_SHIFT 0
326#define CS43130_HP_MEAS_LOAD_2_SHIFT 8
327
328#define CS43130_MCLK_22M 22579200
329#define CS43130_MCLK_24M 24576000
330
331#define CS43130_LINEOUT_LOAD 5000
332#define CS43130_JACK_LINEOUT (SND_JACK_MECHANICAL | SND_JACK_LINEOUT)
333#define CS43130_JACK_HEADPHONE (SND_JACK_MECHANICAL | \
334 SND_JACK_HEADPHONE)
335#define CS43130_JACK_MASK (SND_JACK_MECHANICAL | \
336 SND_JACK_LINEOUT | \
337 SND_JACK_HEADPHONE)
338
339enum cs43130_dsd_src {
340 CS43130_DSD_SRC_DSD = 0,
341 CS43130_DSD_SRC_ASP = 2,
342 CS43130_DSD_SRC_XSP = 3,
343};
344
345enum cs43130_asp_rate {
346 CS43130_ASP_SPRATE_32K = 0,
347 CS43130_ASP_SPRATE_44_1K,
348 CS43130_ASP_SPRATE_48K,
349 CS43130_ASP_SPRATE_88_2K,
350 CS43130_ASP_SPRATE_96K,
351 CS43130_ASP_SPRATE_176_4K,
352 CS43130_ASP_SPRATE_192K,
353 CS43130_ASP_SPRATE_352_8K,
354 CS43130_ASP_SPRATE_384K,
355};
356
357enum cs43130_mclk_src_sel {
358 CS43130_MCLK_SRC_EXT = 0,
359 CS43130_MCLK_SRC_PLL,
360 CS43130_MCLK_SRC_RCO
361};
362
363enum cs43130_mclk_int_freq {
364 CS43130_MCLK_24P5 = 0,
365 CS43130_MCLK_22P5,
366};
367
368enum cs43130_xtal_ibias {
369 CS43130_XTAL_UNUSED = -1,
370 CS43130_XTAL_IBIAS_15UA = 2,
371 CS43130_XTAL_IBIAS_12_5UA = 4,
372 CS43130_XTAL_IBIAS_7_5UA = 6,
373};
374
375enum cs43130_dai_id {
376 CS43130_ASP_PCM_DAI = 0,
377 CS43130_ASP_DOP_DAI,
378 CS43130_XSP_DOP_DAI,
379 CS43130_XSP_DSD_DAI,
380 CS43130_DAI_ID_MAX,
381};
382
383struct cs43130_clk_gen {
384 unsigned int mclk_int;
385 int fs;
386 u16 den;
387 u16 num;
388};
389
390/* frm_size = 16 */
391static const struct cs43130_clk_gen cs43130_16_clk_gen[] = {
392 {22579200, 32000, 441, 10,},
393 {22579200, 44100, 32, 1,},
394 {22579200, 48000, 147, 5,},
395 {22579200, 88200, 16, 1,},
396 {22579200, 96000, 147, 10,},
397 {22579200, 176400, 8, 1,},
398 {22579200, 192000, 147, 20,},
399 {22579200, 352800, 4, 1,},
400 {22579200, 384000, 147, 40,},
401 {24576000, 32000, 48, 1,},
402 {24576000, 44100, 5120, 147,},
403 {24576000, 48000, 32, 1,},
404 {24576000, 88200, 2560, 147,},
405 {24576000, 96000, 16, 1,},
406 {24576000, 176400, 1280, 147,},
407 {24576000, 192000, 8, 1,},
408 {24576000, 352800, 640, 147,},
409 {24576000, 384000, 4, 1,},
410};
411
412/* frm_size = 32 */
413static const struct cs43130_clk_gen cs43130_32_clk_gen[] = {
414 {22579200, 32000, 441, 20,},
415 {22579200, 44100, 16, 1,},
416 {22579200, 48000, 147, 10,},
417 {22579200, 88200, 8, 1,},
418 {22579200, 96000, 147, 20,},
419 {22579200, 176400, 4, 1,},
420 {22579200, 192000, 147, 40,},
421 {22579200, 352800, 2, 1,},
422 {22579200, 384000, 147, 80,},
423 {24576000, 32000, 24, 1,},
424 {24576000, 44100, 2560, 147,},
425 {24576000, 48000, 16, 1,},
426 {24576000, 88200, 1280, 147,},
427 {24576000, 96000, 8, 1,},
428 {24576000, 176400, 640, 147,},
429 {24576000, 192000, 4, 1,},
430 {24576000, 352800, 320, 147,},
431 {24576000, 384000, 2, 1,},
432};
433
434/* frm_size = 48 */
435static const struct cs43130_clk_gen cs43130_48_clk_gen[] = {
436 {22579200, 32000, 147, 100,},
437 {22579200, 44100, 32, 3,},
438 {22579200, 48000, 49, 5,},
439 {22579200, 88200, 16, 3,},
440 {22579200, 96000, 49, 10,},
441 {22579200, 176400, 8, 3,},
442 {22579200, 192000, 49, 20,},
443 {22579200, 352800, 4, 3,},
444 {22579200, 384000, 49, 40,},
445 {24576000, 32000, 16, 1,},
446 {24576000, 44100, 5120, 441,},
447 {24576000, 48000, 32, 3,},
448 {24576000, 88200, 2560, 441,},
449 {24576000, 96000, 16, 3,},
450 {24576000, 176400, 1280, 441,},
451 {24576000, 192000, 8, 3,},
452 {24576000, 352800, 640, 441,},
453 {24576000, 384000, 4, 3,},
454};
455
456/* frm_size = 64 */
457static const struct cs43130_clk_gen cs43130_64_clk_gen[] = {
458 {22579200, 32000, 441, 40,},
459 {22579200, 44100, 8, 1,},
460 {22579200, 48000, 147, 20,},
461 {22579200, 88200, 4, 1,},
462 {22579200, 96000, 147, 40,},
463 {22579200, 176400, 2, 1,},
464 {22579200, 192000, 147, 80,},
465 {22579200, 352800, 1, 1,},
466 {24576000, 32000, 12, 1,},
467 {24576000, 44100, 1280, 147,},
468 {24576000, 48000, 8, 1,},
469 {24576000, 88200, 640, 147,},
470 {24576000, 96000, 4, 1,},
471 {24576000, 176400, 320, 147,},
472 {24576000, 192000, 2, 1,},
473 {24576000, 352800, 160, 147,},
474 {24576000, 384000, 1, 1,},
475};
476
477struct cs43130_bitwidth_map {
478 unsigned int bitwidth;
479 u8 sp_bit;
480 u8 ch_bit;
481};
482
483struct cs43130_rate_map {
484 int fs;
485 int val;
486};
487
488#define HP_LEFT 0
489#define HP_RIGHT 1
490#define CS43130_AC_FREQ 10
491#define CS43130_DC_THRESHOLD 2
492
493#define CS43130_NUM_SUPPLIES 5
494static const char *const cs43130_supply_names[CS43130_NUM_SUPPLIES] = {
495 "VA",
496 "VP",
497 "VCP",
498 "VD",
499 "VL",
500};
501
502#define CS43130_NUM_INT 5 /* number of interrupt status reg */
503
504struct cs43130_dai {
505 unsigned int sclk;
506 unsigned int dai_format;
507 unsigned int dai_mode;
508};
509
510struct cs43130_private {
511 struct snd_soc_codec *codec;
512 struct regmap *regmap;
513 struct regulator_bulk_data supplies[CS43130_NUM_SUPPLIES];
514 struct gpio_desc *reset_gpio;
515 unsigned int dev_id; /* codec device ID */
516 int xtal_ibias;
517
518 /* shared by both DAIs */
519 struct mutex clk_mutex;
520 int clk_req;
521 bool pll_bypass;
522 struct completion xtal_rdy;
523 struct completion pll_rdy;
524 unsigned int mclk;
525 unsigned int mclk_int;
526 int mclk_int_src;
527
528 /* DAI specific */
529 struct cs43130_dai dais[CS43130_DAI_ID_MAX];
530
531 /* HP load specific */
532 bool dc_meas;
533 bool ac_meas;
534 bool hpload_done;
535 struct completion hpload_evt;
536 unsigned int hpload_stat;
537 u16 hpload_dc[2];
538 u16 dc_threshold[CS43130_DC_THRESHOLD];
539 u16 ac_freq[CS43130_AC_FREQ];
540 u16 hpload_ac[CS43130_AC_FREQ][2];
541 struct workqueue_struct *wq;
542 struct work_struct work;
543 struct snd_soc_jack jack;
544};
545
546#endif /* __CS43130_H__ */
diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c
index 231ca935cdf3..0a749c79ef57 100644
--- a/sound/soc/codecs/cs4349.c
+++ b/sound/soc/codecs/cs4349.c
@@ -255,7 +255,7 @@ static struct snd_soc_dai_driver cs4349_dai = {
255 .symmetric_rates = 1, 255 .symmetric_rates = 1,
256}; 256};
257 257
258static struct snd_soc_codec_driver soc_codec_dev_cs4349 = { 258static const struct snd_soc_codec_driver soc_codec_dev_cs4349 = {
259 .component_driver = { 259 .component_driver = {
260 .controls = cs4349_snd_controls, 260 .controls = cs4349_snd_controls,
261 .num_controls = ARRAY_SIZE(cs4349_snd_controls), 261 .num_controls = ARRAY_SIZE(cs4349_snd_controls),
diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c
index 47e6fddef92b..e09fc8f037f1 100644
--- a/sound/soc/codecs/cs47l24.c
+++ b/sound/soc/codecs/cs47l24.c
@@ -1183,7 +1183,7 @@ static struct regmap *cs47l24_get_regmap(struct device *dev)
1183 return priv->core.arizona->regmap; 1183 return priv->core.arizona->regmap;
1184} 1184}
1185 1185
1186static struct snd_soc_codec_driver soc_codec_dev_cs47l24 = { 1186static const struct snd_soc_codec_driver soc_codec_dev_cs47l24 = {
1187 .probe = cs47l24_codec_probe, 1187 .probe = cs47l24_codec_probe,
1188 .remove = cs47l24_codec_remove, 1188 .remove = cs47l24_codec_remove,
1189 .get_regmap = cs47l24_get_regmap, 1189 .get_regmap = cs47l24_get_regmap,
@@ -1203,7 +1203,7 @@ static struct snd_soc_codec_driver soc_codec_dev_cs47l24 = {
1203 }, 1203 },
1204}; 1204};
1205 1205
1206static struct snd_compr_ops cs47l24_compr_ops = { 1206static const struct snd_compr_ops cs47l24_compr_ops = {
1207 .open = cs47l24_open, 1207 .open = cs47l24_open,
1208 .free = wm_adsp_compr_free, 1208 .free = wm_adsp_compr_free,
1209 .set_params = wm_adsp_compr_set_params, 1209 .set_params = wm_adsp_compr_set_params,
@@ -1213,7 +1213,7 @@ static struct snd_compr_ops cs47l24_compr_ops = {
1213 .copy = wm_adsp_compr_copy, 1213 .copy = wm_adsp_compr_copy,
1214}; 1214};
1215 1215
1216static struct snd_soc_platform_driver cs47l24_compr_platform = { 1216static const struct snd_soc_platform_driver cs47l24_compr_platform = {
1217 .compr_ops = &cs47l24_compr_ops, 1217 .compr_ops = &cs47l24_compr_ops,
1218}; 1218};
1219 1219
diff --git a/sound/soc/codecs/cs53l30.c b/sound/soc/codecs/cs53l30.c
index 06933a5d0a75..c7edf2df5e36 100644
--- a/sound/soc/codecs/cs53l30.c
+++ b/sound/soc/codecs/cs53l30.c
@@ -842,8 +842,7 @@ static int cs53l30_mute_stream(struct snd_soc_dai *dai, int mute, int stream)
842{ 842{
843 struct cs53l30_private *priv = snd_soc_codec_get_drvdata(dai->codec); 843 struct cs53l30_private *priv = snd_soc_codec_get_drvdata(dai->codec);
844 844
845 if (priv->mute_gpio) 845 gpiod_set_value_cansleep(priv->mute_gpio, mute);
846 gpiod_set_value_cansleep(priv->mute_gpio, mute);
847 846
848 return 0; 847 return 0;
849} 848}
@@ -892,7 +891,7 @@ static int cs53l30_codec_probe(struct snd_soc_codec *codec)
892 return 0; 891 return 0;
893} 892}
894 893
895static struct snd_soc_codec_driver cs53l30_driver = { 894static const struct snd_soc_codec_driver cs53l30_driver = {
896 .probe = cs53l30_codec_probe, 895 .probe = cs53l30_codec_probe,
897 .set_bias_level = cs53l30_set_bias_level, 896 .set_bias_level = cs53l30_set_bias_level,
898 .idle_bias_off = true, 897 .idle_bias_off = true,
@@ -960,8 +959,7 @@ static int cs53l30_i2c_probe(struct i2c_client *client,
960 goto error; 959 goto error;
961 } 960 }
962 961
963 if (cs53l30->reset_gpio) 962 gpiod_set_value_cansleep(cs53l30->reset_gpio, 1);
964 gpiod_set_value_cansleep(cs53l30->reset_gpio, 1);
965 963
966 i2c_set_clientdata(client, cs53l30); 964 i2c_set_clientdata(client, cs53l30);
967 965
@@ -1056,8 +1054,7 @@ static int cs53l30_i2c_remove(struct i2c_client *client)
1056 snd_soc_unregister_codec(&client->dev); 1054 snd_soc_unregister_codec(&client->dev);
1057 1055
1058 /* Hold down reset */ 1056 /* Hold down reset */
1059 if (cs53l30->reset_gpio) 1057 gpiod_set_value_cansleep(cs53l30->reset_gpio, 0);
1060 gpiod_set_value_cansleep(cs53l30->reset_gpio, 0);
1061 1058
1062 regulator_bulk_disable(ARRAY_SIZE(cs53l30->supplies), 1059 regulator_bulk_disable(ARRAY_SIZE(cs53l30->supplies),
1063 cs53l30->supplies); 1060 cs53l30->supplies);
@@ -1073,8 +1070,7 @@ static int cs53l30_runtime_suspend(struct device *dev)
1073 regcache_cache_only(cs53l30->regmap, true); 1070 regcache_cache_only(cs53l30->regmap, true);
1074 1071
1075 /* Hold down reset */ 1072 /* Hold down reset */
1076 if (cs53l30->reset_gpio) 1073 gpiod_set_value_cansleep(cs53l30->reset_gpio, 0);
1077 gpiod_set_value_cansleep(cs53l30->reset_gpio, 0);
1078 1074
1079 regulator_bulk_disable(ARRAY_SIZE(cs53l30->supplies), 1075 regulator_bulk_disable(ARRAY_SIZE(cs53l30->supplies),
1080 cs53l30->supplies); 1076 cs53l30->supplies);
@@ -1094,8 +1090,7 @@ static int cs53l30_runtime_resume(struct device *dev)
1094 return ret; 1090 return ret;
1095 } 1091 }
1096 1092
1097 if (cs53l30->reset_gpio) 1093 gpiod_set_value_cansleep(cs53l30->reset_gpio, 1);
1098 gpiod_set_value_cansleep(cs53l30->reset_gpio, 1);
1099 1094
1100 regcache_cache_only(cs53l30->regmap, false); 1095 regcache_cache_only(cs53l30->regmap, false);
1101 ret = regcache_sync(cs53l30->regmap); 1096 ret = regcache_sync(cs53l30->regmap);
diff --git a/sound/soc/codecs/cx20442.c b/sound/soc/codecs/cx20442.c
index 2c12471e42a6..46b1fbb66eba 100644
--- a/sound/soc/codecs/cx20442.c
+++ b/sound/soc/codecs/cx20442.c
@@ -398,7 +398,7 @@ static int cx20442_codec_remove(struct snd_soc_codec *codec)
398 398
399static const u8 cx20442_reg; 399static const u8 cx20442_reg;
400 400
401static struct snd_soc_codec_driver cx20442_codec_dev = { 401static const struct snd_soc_codec_driver cx20442_codec_dev = {
402 .probe = cx20442_codec_probe, 402 .probe = cx20442_codec_probe,
403 .remove = cx20442_codec_remove, 403 .remove = cx20442_codec_remove,
404 .set_bias_level = cx20442_set_bias_level, 404 .set_bias_level = cx20442_set_bias_level,
diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 17053dfc94cf..1af443ccbc51 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -1164,7 +1164,7 @@ static int da7210_probe(struct snd_soc_codec *codec)
1164 return 0; 1164 return 0;
1165} 1165}
1166 1166
1167static struct snd_soc_codec_driver soc_codec_dev_da7210 = { 1167static const struct snd_soc_codec_driver soc_codec_dev_da7210 = {
1168 .probe = da7210_probe, 1168 .probe = da7210_probe,
1169 1169
1170 .component_driver = { 1170 .component_driver = {
diff --git a/sound/soc/codecs/da7213.c b/sound/soc/codecs/da7213.c
index c3e11897f8ae..cc0b2d2eaf15 100644
--- a/sound/soc/codecs/da7213.c
+++ b/sound/soc/codecs/da7213.c
@@ -1787,7 +1787,7 @@ static int da7213_probe(struct snd_soc_codec *codec)
1787 return 0; 1787 return 0;
1788} 1788}
1789 1789
1790static struct snd_soc_codec_driver soc_codec_dev_da7213 = { 1790static const struct snd_soc_codec_driver soc_codec_dev_da7213 = {
1791 .probe = da7213_probe, 1791 .probe = da7213_probe,
1792 .set_bias_level = da7213_set_bias_level, 1792 .set_bias_level = da7213_set_bias_level,
1793 1793
diff --git a/sound/soc/codecs/da7218.c b/sound/soc/codecs/da7218.c
index 6e1940eb0653..b2d42ec1dcd9 100644
--- a/sound/soc/codecs/da7218.c
+++ b/sound/soc/codecs/da7218.c
@@ -3035,7 +3035,7 @@ static int da7218_resume(struct snd_soc_codec *codec)
3035#define da7218_resume NULL 3035#define da7218_resume NULL
3036#endif 3036#endif
3037 3037
3038static struct snd_soc_codec_driver soc_codec_dev_da7218 = { 3038static const struct snd_soc_codec_driver soc_codec_dev_da7218 = {
3039 .probe = da7218_probe, 3039 .probe = da7218_probe,
3040 .remove = da7218_remove, 3040 .remove = da7218_remove,
3041 .suspend = da7218_suspend, 3041 .suspend = da7218_suspend,
diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index f71d72c22bfc..6f088536df32 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -1891,7 +1891,7 @@ static int da7219_resume(struct snd_soc_codec *codec)
1891#define da7219_resume NULL 1891#define da7219_resume NULL
1892#endif 1892#endif
1893 1893
1894static struct snd_soc_codec_driver soc_codec_dev_da7219 = { 1894static const struct snd_soc_codec_driver soc_codec_dev_da7219 = {
1895 .probe = da7219_probe, 1895 .probe = da7219_probe,
1896 .remove = da7219_remove, 1896 .remove = da7219_remove,
1897 .suspend = da7219_suspend, 1897 .suspend = da7219_suspend,
diff --git a/sound/soc/codecs/da732x.c b/sound/soc/codecs/da732x.c
index c1cc1c1c28f2..83db4d23c90b 100644
--- a/sound/soc/codecs/da732x.c
+++ b/sound/soc/codecs/da732x.c
@@ -1499,7 +1499,7 @@ static int da732x_set_bias_level(struct snd_soc_codec *codec,
1499 return 0; 1499 return 0;
1500} 1500}
1501 1501
1502static struct snd_soc_codec_driver soc_codec_dev_da732x = { 1502static const struct snd_soc_codec_driver soc_codec_dev_da732x = {
1503 .set_bias_level = da732x_set_bias_level, 1503 .set_bias_level = da732x_set_bias_level,
1504 .component_driver = { 1504 .component_driver = {
1505 .controls = da732x_snd_controls, 1505 .controls = da732x_snd_controls,
diff --git a/sound/soc/codecs/da9055.c b/sound/soc/codecs/da9055.c
index 4efb5f897a0c..bd7faaee5802 100644
--- a/sound/soc/codecs/da9055.c
+++ b/sound/soc/codecs/da9055.c
@@ -1451,7 +1451,7 @@ static int da9055_probe(struct snd_soc_codec *codec)
1451 return 0; 1451 return 0;
1452} 1452}
1453 1453
1454static struct snd_soc_codec_driver soc_codec_dev_da9055 = { 1454static const struct snd_soc_codec_driver soc_codec_dev_da9055 = {
1455 .probe = da9055_probe, 1455 .probe = da9055_probe,
1456 .set_bias_level = da9055_set_bias_level, 1456 .set_bias_level = da9055_set_bias_level,
1457 1457
diff --git a/sound/soc/codecs/dmic.c b/sound/soc/codecs/dmic.c
index c82b9dc41e9a..b88a1ee66f80 100644
--- a/sound/soc/codecs/dmic.c
+++ b/sound/soc/codecs/dmic.c
@@ -19,6 +19,8 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/gpio.h>
23#include <linux/gpio/consumer.h>
22#include <linux/platform_device.h> 24#include <linux/platform_device.h>
23#include <linux/slab.h> 25#include <linux/slab.h>
24#include <linux/module.h> 26#include <linux/module.h>
@@ -27,6 +29,34 @@
27#include <sound/soc.h> 29#include <sound/soc.h>
28#include <sound/soc-dapm.h> 30#include <sound/soc-dapm.h>
29 31
32static int dmic_daiops_trigger(struct snd_pcm_substream *substream,
33 int cmd, struct snd_soc_dai *dai)
34{
35 struct gpio_desc *dmic_en = snd_soc_dai_get_drvdata(dai);
36
37 if (!dmic_en)
38 return 0;
39
40 switch (cmd) {
41 case SNDRV_PCM_TRIGGER_START:
42 case SNDRV_PCM_TRIGGER_RESUME:
43 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
44 gpiod_set_value(dmic_en, 1);
45 break;
46 case SNDRV_PCM_TRIGGER_STOP:
47 case SNDRV_PCM_TRIGGER_SUSPEND:
48 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
49 gpiod_set_value(dmic_en, 0);
50 break;
51 }
52
53 return 0;
54}
55
56static const struct snd_soc_dai_ops dmic_dai_ops = {
57 .trigger = dmic_daiops_trigger,
58};
59
30static struct snd_soc_dai_driver dmic_dai = { 60static struct snd_soc_dai_driver dmic_dai = {
31 .name = "dmic-hifi", 61 .name = "dmic-hifi",
32 .capture = { 62 .capture = {
@@ -38,8 +68,23 @@ static struct snd_soc_dai_driver dmic_dai = {
38 | SNDRV_PCM_FMTBIT_S24_LE 68 | SNDRV_PCM_FMTBIT_S24_LE
39 | SNDRV_PCM_FMTBIT_S16_LE, 69 | SNDRV_PCM_FMTBIT_S16_LE,
40 }, 70 },
71 .ops = &dmic_dai_ops,
41}; 72};
42 73
74static int dmic_codec_probe(struct snd_soc_codec *codec)
75{
76 struct gpio_desc *dmic_en;
77
78 dmic_en = devm_gpiod_get_optional(codec->dev,
79 "dmicen", GPIOD_OUT_LOW);
80 if (IS_ERR(dmic_en))
81 return PTR_ERR(dmic_en);
82
83 snd_soc_codec_set_drvdata(codec, dmic_en);
84
85 return 0;
86}
87
43static const struct snd_soc_dapm_widget dmic_dapm_widgets[] = { 88static const struct snd_soc_dapm_widget dmic_dapm_widgets[] = {
44 SND_SOC_DAPM_AIF_OUT("DMIC AIF", "Capture", 0, 89 SND_SOC_DAPM_AIF_OUT("DMIC AIF", "Capture", 0,
45 SND_SOC_NOPM, 0, 0), 90 SND_SOC_NOPM, 0, 0),
@@ -50,7 +95,8 @@ static const struct snd_soc_dapm_route intercon[] = {
50 {"DMIC AIF", NULL, "DMic"}, 95 {"DMIC AIF", NULL, "DMic"},
51}; 96};
52 97
53static struct snd_soc_codec_driver soc_dmic = { 98static const struct snd_soc_codec_driver soc_dmic = {
99 .probe = dmic_codec_probe,
54 .component_driver = { 100 .component_driver = {
55 .dapm_widgets = dmic_dapm_widgets, 101 .dapm_widgets = dmic_dapm_widgets,
56 .num_dapm_widgets = ARRAY_SIZE(dmic_dapm_widgets), 102 .num_dapm_widgets = ARRAY_SIZE(dmic_dapm_widgets),
@@ -73,9 +119,15 @@ static int dmic_dev_remove(struct platform_device *pdev)
73 119
74MODULE_ALIAS("platform:dmic-codec"); 120MODULE_ALIAS("platform:dmic-codec");
75 121
122static const struct of_device_id dmic_dev_match[] = {
123 {.compatible = "dmic-codec"},
124 {}
125};
126
76static struct platform_driver dmic_driver = { 127static struct platform_driver dmic_driver = {
77 .driver = { 128 .driver = {
78 .name = "dmic-codec", 129 .name = "dmic-codec",
130 .of_match_table = dmic_dev_match,
79 }, 131 },
80 .probe = dmic_dev_probe, 132 .probe = dmic_dev_probe,
81 .remove = dmic_dev_remove, 133 .remove = dmic_dev_remove,
diff --git a/sound/soc/codecs/es7134.c b/sound/soc/codecs/es7134.c
index 25ede825d349..3869025754d8 100644
--- a/sound/soc/codecs/es7134.c
+++ b/sound/soc/codecs/es7134.c
@@ -69,7 +69,7 @@ static const struct snd_soc_dapm_route es7134_dapm_routes[] = {
69 { "AOUTR", NULL, "DAC" }, 69 { "AOUTR", NULL, "DAC" },
70}; 70};
71 71
72static struct snd_soc_codec_driver es7134_codec_driver = { 72static const struct snd_soc_codec_driver es7134_codec_driver = {
73 .component_driver = { 73 .component_driver = {
74 .dapm_widgets = es7134_dapm_widgets, 74 .dapm_widgets = es7134_dapm_widgets,
75 .num_dapm_widgets = ARRAY_SIZE(es7134_dapm_widgets), 75 .num_dapm_widgets = ARRAY_SIZE(es7134_dapm_widgets),
diff --git a/sound/soc/codecs/es8316.c b/sound/soc/codecs/es8316.c
index ecc02449c569..da2d353af5ba 100644
--- a/sound/soc/codecs/es8316.c
+++ b/sound/soc/codecs/es8316.c
@@ -502,7 +502,7 @@ static int es8316_mute(struct snd_soc_dai *dai, int mute)
502#define ES8316_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 502#define ES8316_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
503 SNDRV_PCM_FMTBIT_S24_LE) 503 SNDRV_PCM_FMTBIT_S24_LE)
504 504
505static struct snd_soc_dai_ops es8316_ops = { 505static const struct snd_soc_dai_ops es8316_ops = {
506 .startup = es8316_pcm_startup, 506 .startup = es8316_pcm_startup,
507 .hw_params = es8316_pcm_hw_params, 507 .hw_params = es8316_pcm_hw_params,
508 .set_fmt = es8316_set_dai_fmt, 508 .set_fmt = es8316_set_dai_fmt,
@@ -554,7 +554,7 @@ static int es8316_probe(struct snd_soc_codec *codec)
554 return 0; 554 return 0;
555} 555}
556 556
557static struct snd_soc_codec_driver soc_codec_dev_es8316 = { 557static const struct snd_soc_codec_driver soc_codec_dev_es8316 = {
558 .probe = es8316_probe, 558 .probe = es8316_probe,
559 .idle_bias_off = true, 559 .idle_bias_off = true,
560 560
diff --git a/sound/soc/codecs/es8328.c b/sound/soc/codecs/es8328.c
index ed7cc42d1ee2..bcdb8914ec16 100644
--- a/sound/soc/codecs/es8328.c
+++ b/sound/soc/codecs/es8328.c
@@ -830,7 +830,7 @@ const struct regmap_config es8328_regmap_config = {
830}; 830};
831EXPORT_SYMBOL_GPL(es8328_regmap_config); 831EXPORT_SYMBOL_GPL(es8328_regmap_config);
832 832
833static struct snd_soc_codec_driver es8328_codec_driver = { 833static const struct snd_soc_codec_driver es8328_codec_driver = {
834 .probe = es8328_codec_probe, 834 .probe = es8328_codec_probe,
835 .suspend = es8328_suspend, 835 .suspend = es8328_suspend,
836 .resume = es8328_resume, 836 .resume = es8328_resume,
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index bc2e74ff3b2d..e824d47cc22b 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -121,6 +121,10 @@ struct hdac_hdmi_dai_port_map {
121 struct hdac_hdmi_cvt *cvt; 121 struct hdac_hdmi_cvt *cvt;
122}; 122};
123 123
124struct hdac_hdmi_drv_data {
125 unsigned int vendor_nid;
126};
127
124struct hdac_hdmi_priv { 128struct hdac_hdmi_priv {
125 struct hdac_hdmi_dai_port_map dai_map[HDA_MAX_CVTS]; 129 struct hdac_hdmi_dai_port_map dai_map[HDA_MAX_CVTS];
126 struct list_head pin_list; 130 struct list_head pin_list;
@@ -131,6 +135,7 @@ struct hdac_hdmi_priv {
131 int num_ports; 135 int num_ports;
132 struct mutex pin_mutex; 136 struct mutex pin_mutex;
133 struct hdac_chmap chmap; 137 struct hdac_chmap chmap;
138 struct hdac_hdmi_drv_data *drv_data;
134}; 139};
135 140
136static struct hdac_hdmi_pcm * 141static struct hdac_hdmi_pcm *
@@ -1321,6 +1326,7 @@ static int hdac_hdmi_add_pin(struct hdac_ext_device *edev, hda_nid_t nid)
1321} 1326}
1322 1327
1323#define INTEL_VENDOR_NID 0x08 1328#define INTEL_VENDOR_NID 0x08
1329#define INTEL_GLK_VENDOR_NID 0x0b
1324#define INTEL_GET_VENDOR_VERB 0xf81 1330#define INTEL_GET_VENDOR_VERB 0xf81
1325#define INTEL_SET_VENDOR_VERB 0x781 1331#define INTEL_SET_VENDOR_VERB 0x781
1326#define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */ 1332#define INTEL_EN_DP12 0x02 /* enable DP 1.2 features */
@@ -1329,14 +1335,17 @@ static int hdac_hdmi_add_pin(struct hdac_ext_device *edev, hda_nid_t nid)
1329static void hdac_hdmi_skl_enable_all_pins(struct hdac_device *hdac) 1335static void hdac_hdmi_skl_enable_all_pins(struct hdac_device *hdac)
1330{ 1336{
1331 unsigned int vendor_param; 1337 unsigned int vendor_param;
1338 struct hdac_ext_device *edev = to_ehdac_device(hdac);
1339 struct hdac_hdmi_priv *hdmi = edev->private_data;
1340 unsigned int vendor_nid = hdmi->drv_data->vendor_nid;
1332 1341
1333 vendor_param = snd_hdac_codec_read(hdac, INTEL_VENDOR_NID, 0, 1342 vendor_param = snd_hdac_codec_read(hdac, vendor_nid, 0,
1334 INTEL_GET_VENDOR_VERB, 0); 1343 INTEL_GET_VENDOR_VERB, 0);
1335 if (vendor_param == -1 || vendor_param & INTEL_EN_ALL_PIN_CVTS) 1344 if (vendor_param == -1 || vendor_param & INTEL_EN_ALL_PIN_CVTS)
1336 return; 1345 return;
1337 1346
1338 vendor_param |= INTEL_EN_ALL_PIN_CVTS; 1347 vendor_param |= INTEL_EN_ALL_PIN_CVTS;
1339 vendor_param = snd_hdac_codec_read(hdac, INTEL_VENDOR_NID, 0, 1348 vendor_param = snd_hdac_codec_read(hdac, vendor_nid, 0,
1340 INTEL_SET_VENDOR_VERB, vendor_param); 1349 INTEL_SET_VENDOR_VERB, vendor_param);
1341 if (vendor_param == -1) 1350 if (vendor_param == -1)
1342 return; 1351 return;
@@ -1345,22 +1354,25 @@ static void hdac_hdmi_skl_enable_all_pins(struct hdac_device *hdac)
1345static void hdac_hdmi_skl_enable_dp12(struct hdac_device *hdac) 1354static void hdac_hdmi_skl_enable_dp12(struct hdac_device *hdac)
1346{ 1355{
1347 unsigned int vendor_param; 1356 unsigned int vendor_param;
1357 struct hdac_ext_device *edev = to_ehdac_device(hdac);
1358 struct hdac_hdmi_priv *hdmi = edev->private_data;
1359 unsigned int vendor_nid = hdmi->drv_data->vendor_nid;
1348 1360
1349 vendor_param = snd_hdac_codec_read(hdac, INTEL_VENDOR_NID, 0, 1361 vendor_param = snd_hdac_codec_read(hdac, vendor_nid, 0,
1350 INTEL_GET_VENDOR_VERB, 0); 1362 INTEL_GET_VENDOR_VERB, 0);
1351 if (vendor_param == -1 || vendor_param & INTEL_EN_DP12) 1363 if (vendor_param == -1 || vendor_param & INTEL_EN_DP12)
1352 return; 1364 return;
1353 1365
1354 /* enable DP1.2 mode */ 1366 /* enable DP1.2 mode */
1355 vendor_param |= INTEL_EN_DP12; 1367 vendor_param |= INTEL_EN_DP12;
1356 vendor_param = snd_hdac_codec_read(hdac, INTEL_VENDOR_NID, 0, 1368 vendor_param = snd_hdac_codec_read(hdac, vendor_nid, 0,
1357 INTEL_SET_VENDOR_VERB, vendor_param); 1369 INTEL_SET_VENDOR_VERB, vendor_param);
1358 if (vendor_param == -1) 1370 if (vendor_param == -1)
1359 return; 1371 return;
1360 1372
1361} 1373}
1362 1374
1363static struct snd_soc_dai_ops hdmi_dai_ops = { 1375static const struct snd_soc_dai_ops hdmi_dai_ops = {
1364 .startup = hdac_hdmi_pcm_open, 1376 .startup = hdac_hdmi_pcm_open,
1365 .shutdown = hdac_hdmi_pcm_close, 1377 .shutdown = hdac_hdmi_pcm_close,
1366 .hw_params = hdac_hdmi_set_hw_params, 1378 .hw_params = hdac_hdmi_set_hw_params,
@@ -1858,7 +1870,7 @@ static void hdmi_codec_complete(struct device *dev)
1858#define hdmi_codec_complete NULL 1870#define hdmi_codec_complete NULL
1859#endif 1871#endif
1860 1872
1861static struct snd_soc_codec_driver hdmi_hda_codec = { 1873static const struct snd_soc_codec_driver hdmi_hda_codec = {
1862 .probe = hdmi_codec_probe, 1874 .probe = hdmi_codec_probe,
1863 .remove = hdmi_codec_remove, 1875 .remove = hdmi_codec_remove,
1864 .idle_bias_off = true, 1876 .idle_bias_off = true,
@@ -1927,6 +1939,14 @@ static int hdac_hdmi_get_spk_alloc(struct hdac_device *hdac, int pcm_idx)
1927 return port->eld.info.spk_alloc; 1939 return port->eld.info.spk_alloc;
1928} 1940}
1929 1941
1942static struct hdac_hdmi_drv_data intel_glk_drv_data = {
1943 .vendor_nid = INTEL_GLK_VENDOR_NID,
1944};
1945
1946static struct hdac_hdmi_drv_data intel_drv_data = {
1947 .vendor_nid = INTEL_VENDOR_NID,
1948};
1949
1930static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev) 1950static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev)
1931{ 1951{
1932 struct hdac_device *codec = &edev->hdac; 1952 struct hdac_device *codec = &edev->hdac;
@@ -1935,6 +1955,8 @@ static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev)
1935 struct hdac_ext_link *hlink = NULL; 1955 struct hdac_ext_link *hlink = NULL;
1936 int num_dais = 0; 1956 int num_dais = 0;
1937 int ret = 0; 1957 int ret = 0;
1958 struct hdac_driver *hdrv = drv_to_hdac_driver(codec->dev.driver);
1959 const struct hda_device_id *hdac_id = hdac_get_device_id(codec, hdrv);
1938 1960
1939 /* hold the ref while we probe */ 1961 /* hold the ref while we probe */
1940 hlink = snd_hdac_ext_bus_get_link(edev->ebus, dev_name(&edev->hdac.dev)); 1962 hlink = snd_hdac_ext_bus_get_link(edev->ebus, dev_name(&edev->hdac.dev));
@@ -1956,6 +1978,12 @@ static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev)
1956 hdmi_priv->chmap.ops.is_pcm_attached = is_hdac_hdmi_pcm_attached; 1978 hdmi_priv->chmap.ops.is_pcm_attached = is_hdac_hdmi_pcm_attached;
1957 hdmi_priv->chmap.ops.get_spk_alloc = hdac_hdmi_get_spk_alloc; 1979 hdmi_priv->chmap.ops.get_spk_alloc = hdac_hdmi_get_spk_alloc;
1958 1980
1981 if (hdac_id->driver_data)
1982 hdmi_priv->drv_data =
1983 (struct hdac_hdmi_drv_data *)hdac_id->driver_data;
1984 else
1985 hdmi_priv->drv_data = &intel_drv_data;
1986
1959 dev_set_drvdata(&codec->dev, edev); 1987 dev_set_drvdata(&codec->dev, edev);
1960 1988
1961 INIT_LIST_HEAD(&hdmi_priv->pin_list); 1989 INIT_LIST_HEAD(&hdmi_priv->pin_list);
@@ -2127,7 +2155,8 @@ static const struct hda_device_id hdmi_list[] = {
2127 HDA_CODEC_EXT_ENTRY(0x80862809, 0x100000, "Skylake HDMI", 0), 2155 HDA_CODEC_EXT_ENTRY(0x80862809, 0x100000, "Skylake HDMI", 0),
2128 HDA_CODEC_EXT_ENTRY(0x8086280a, 0x100000, "Broxton HDMI", 0), 2156 HDA_CODEC_EXT_ENTRY(0x8086280a, 0x100000, "Broxton HDMI", 0),
2129 HDA_CODEC_EXT_ENTRY(0x8086280b, 0x100000, "Kabylake HDMI", 0), 2157 HDA_CODEC_EXT_ENTRY(0x8086280b, 0x100000, "Kabylake HDMI", 0),
2130 HDA_CODEC_EXT_ENTRY(0x8086280d, 0x100000, "Geminilake HDMI", 0), 2158 HDA_CODEC_EXT_ENTRY(0x8086280d, 0x100000, "Geminilake HDMI",
2159 &intel_glk_drv_data),
2131 {} 2160 {}
2132}; 2161};
2133 2162
diff --git a/sound/soc/codecs/hdmi-codec.c b/sound/soc/codecs/hdmi-codec.c
index 22ed0dc88f0a..3abf82563408 100644
--- a/sound/soc/codecs/hdmi-codec.c
+++ b/sound/soc/codecs/hdmi-codec.c
@@ -67,14 +67,14 @@ struct hdmi_codec_cea_spk_alloc {
67}; 67};
68 68
69/* Channel maps stereo HDMI */ 69/* Channel maps stereo HDMI */
70const struct snd_pcm_chmap_elem hdmi_codec_stereo_chmaps[] = { 70static const struct snd_pcm_chmap_elem hdmi_codec_stereo_chmaps[] = {
71 { .channels = 2, 71 { .channels = 2,
72 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, 72 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
73 { } 73 { }
74}; 74};
75 75
76/* Channel maps for multi-channel playbacks, up to 8 n_ch */ 76/* Channel maps for multi-channel playbacks, up to 8 n_ch */
77const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = { 77static const struct snd_pcm_chmap_elem hdmi_codec_8ch_chmaps[] = {
78 { .channels = 2, /* CA_ID 0x00 */ 78 { .channels = 2, /* CA_ID 0x00 */
79 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } }, 79 .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR } },
80 { .channels = 4, /* CA_ID 0x01 */ 80 { .channels = 4, /* CA_ID 0x01 */
@@ -326,7 +326,7 @@ static int hdmi_eld_ctl_get(struct snd_kcontrol *kcontrol,
326static unsigned long hdmi_codec_spk_mask_from_alloc(int spk_alloc) 326static unsigned long hdmi_codec_spk_mask_from_alloc(int spk_alloc)
327{ 327{
328 int i; 328 int i;
329 const unsigned long hdmi_codec_eld_spk_alloc_bits[] = { 329 static const unsigned long hdmi_codec_eld_spk_alloc_bits[] = {
330 [0] = FL | FR, [1] = LFE, [2] = FC, [3] = RL | RR, 330 [0] = FL | FR, [1] = LFE, [2] = FC, [3] = RL | RR,
331 [4] = RC, [5] = FLC | FRC, [6] = RLC | RRC, 331 [4] = RC, [5] = FLC | FRC, [6] = RLC | RRC,
332 }; 332 };
@@ -340,7 +340,7 @@ static unsigned long hdmi_codec_spk_mask_from_alloc(int spk_alloc)
340 return spk_mask; 340 return spk_mask;
341} 341}
342 342
343void hdmi_codec_eld_chmap(struct hdmi_codec_priv *hcp) 343static void hdmi_codec_eld_chmap(struct hdmi_codec_priv *hcp)
344{ 344{
345 u8 spk_alloc; 345 u8 spk_alloc;
346 unsigned long spk_mask; 346 unsigned long spk_mask;
@@ -399,18 +399,6 @@ static int hdmi_codec_chmap_ctl_get(struct snd_kcontrol *kcontrol,
399 return 0; 399 return 0;
400} 400}
401 401
402
403static const struct snd_kcontrol_new hdmi_controls[] = {
404 {
405 .access = SNDRV_CTL_ELEM_ACCESS_READ |
406 SNDRV_CTL_ELEM_ACCESS_VOLATILE,
407 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
408 .name = "ELD",
409 .info = hdmi_eld_ctl_info,
410 .get = hdmi_eld_ctl_get,
411 },
412};
413
414static int hdmi_codec_new_stream(struct snd_pcm_substream *substream, 402static int hdmi_codec_new_stream(struct snd_pcm_substream *substream,
415 struct snd_soc_dai *dai) 403 struct snd_soc_dai *dai)
416{ 404{
@@ -668,6 +656,16 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd,
668{ 656{
669 struct snd_soc_dai_driver *drv = dai->driver; 657 struct snd_soc_dai_driver *drv = dai->driver;
670 struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai); 658 struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai);
659 struct snd_kcontrol *kctl;
660 struct snd_kcontrol_new hdmi_eld_ctl = {
661 .access = SNDRV_CTL_ELEM_ACCESS_READ |
662 SNDRV_CTL_ELEM_ACCESS_VOLATILE,
663 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
664 .name = "ELD",
665 .info = hdmi_eld_ctl_info,
666 .get = hdmi_eld_ctl_get,
667 .device = rtd->pcm->device,
668 };
671 int ret; 669 int ret;
672 670
673 dev_dbg(dai->dev, "%s()\n", __func__); 671 dev_dbg(dai->dev, "%s()\n", __func__);
@@ -686,14 +684,19 @@ static int hdmi_codec_pcm_new(struct snd_soc_pcm_runtime *rtd,
686 hcp->chmap_info->chmap = hdmi_codec_stereo_chmaps; 684 hcp->chmap_info->chmap = hdmi_codec_stereo_chmaps;
687 hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN; 685 hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;
688 686
689 return 0; 687 /* add ELD ctl with the device number corresponding to the PCM stream */
688 kctl = snd_ctl_new1(&hdmi_eld_ctl, dai->component);
689 if (!kctl)
690 return -ENOMEM;
691
692 return snd_ctl_add(rtd->card->snd_card, kctl);
690} 693}
691 694
692static struct snd_soc_dai_driver hdmi_i2s_dai = { 695static const struct snd_soc_dai_driver hdmi_i2s_dai = {
693 .name = "i2s-hifi", 696 .name = "i2s-hifi",
694 .id = DAI_ID_I2S, 697 .id = DAI_ID_I2S,
695 .playback = { 698 .playback = {
696 .stream_name = "Playback", 699 .stream_name = "I2S Playback",
697 .channels_min = 2, 700 .channels_min = 2,
698 .channels_max = 8, 701 .channels_max = 8,
699 .rates = HDMI_RATES, 702 .rates = HDMI_RATES,
@@ -708,7 +711,7 @@ static const struct snd_soc_dai_driver hdmi_spdif_dai = {
708 .name = "spdif-hifi", 711 .name = "spdif-hifi",
709 .id = DAI_ID_SPDIF, 712 .id = DAI_ID_SPDIF,
710 .playback = { 713 .playback = {
711 .stream_name = "Playback", 714 .stream_name = "SPDIF Playback",
712 .channels_min = 2, 715 .channels_min = 2,
713 .channels_max = 2, 716 .channels_max = 2,
714 .rates = HDMI_RATES, 717 .rates = HDMI_RATES,
@@ -730,10 +733,8 @@ static int hdmi_of_xlate_dai_id(struct snd_soc_component *component,
730 return ret; 733 return ret;
731} 734}
732 735
733static struct snd_soc_codec_driver hdmi_codec = { 736static const struct snd_soc_codec_driver hdmi_codec = {
734 .component_driver = { 737 .component_driver = {
735 .controls = hdmi_controls,
736 .num_controls = ARRAY_SIZE(hdmi_controls),
737 .dapm_widgets = hdmi_widgets, 738 .dapm_widgets = hdmi_widgets,
738 .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets), 739 .num_dapm_widgets = ARRAY_SIZE(hdmi_widgets),
739 .dapm_routes = hdmi_routes, 740 .dapm_routes = hdmi_routes,
diff --git a/sound/soc/codecs/ics43432.c b/sound/soc/codecs/ics43432.c
index dd850b93938d..651206273f36 100644
--- a/sound/soc/codecs/ics43432.c
+++ b/sound/soc/codecs/ics43432.c
@@ -37,7 +37,7 @@ static struct snd_soc_dai_driver ics43432_dai = {
37 }, 37 },
38}; 38};
39 39
40static struct snd_soc_codec_driver ics43432_codec_driver = { 40static const struct snd_soc_codec_driver ics43432_codec_driver = {
41}; 41};
42 42
43static int ics43432_probe(struct platform_device *pdev) 43static int ics43432_probe(struct platform_device *pdev)
diff --git a/sound/soc/codecs/inno_rk3036.c b/sound/soc/codecs/inno_rk3036.c
index b918ba5c8ce5..6b59b6f08298 100644
--- a/sound/soc/codecs/inno_rk3036.c
+++ b/sound/soc/codecs/inno_rk3036.c
@@ -310,7 +310,7 @@ static int rk3036_codec_dai_hw_params(struct snd_pcm_substream *substream,
310 SNDRV_PCM_FMTBIT_S24_LE | \ 310 SNDRV_PCM_FMTBIT_S24_LE | \
311 SNDRV_PCM_FMTBIT_S32_LE) 311 SNDRV_PCM_FMTBIT_S32_LE)
312 312
313static struct snd_soc_dai_ops rk3036_codec_dai_ops = { 313static const struct snd_soc_dai_ops rk3036_codec_dai_ops = {
314 .set_fmt = rk3036_codec_dai_set_fmt, 314 .set_fmt = rk3036_codec_dai_set_fmt,
315 .hw_params = rk3036_codec_dai_hw_params, 315 .hw_params = rk3036_codec_dai_hw_params,
316}; 316};
@@ -376,7 +376,7 @@ static int rk3036_codec_set_bias_level(struct snd_soc_codec *codec,
376 return 0; 376 return 0;
377} 377}
378 378
379static struct snd_soc_codec_driver rk3036_codec_driver = { 379static const struct snd_soc_codec_driver rk3036_codec_driver = {
380 .probe = rk3036_codec_probe, 380 .probe = rk3036_codec_probe,
381 .remove = rk3036_codec_remove, 381 .remove = rk3036_codec_remove,
382 .set_bias_level = rk3036_codec_set_bias_level, 382 .set_bias_level = rk3036_codec_set_bias_level,
diff --git a/sound/soc/codecs/isabelle.c b/sound/soc/codecs/isabelle.c
index a4b0eded984a..5ca99280ae00 100644
--- a/sound/soc/codecs/isabelle.c
+++ b/sound/soc/codecs/isabelle.c
@@ -1087,7 +1087,7 @@ static struct snd_soc_dai_driver isabelle_dai[] = {
1087 }, 1087 },
1088}; 1088};
1089 1089
1090static struct snd_soc_codec_driver soc_codec_dev_isabelle = { 1090static const struct snd_soc_codec_driver soc_codec_dev_isabelle = {
1091 .set_bias_level = isabelle_set_bias_level, 1091 .set_bias_level = isabelle_set_bias_level,
1092 .component_driver = { 1092 .component_driver = {
1093 .controls = isabelle_snd_controls, 1093 .controls = isabelle_snd_controls,
diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c
index 0290fab383da..6324ccdc8a5c 100644
--- a/sound/soc/codecs/jz4740.c
+++ b/sound/soc/codecs/jz4740.c
@@ -293,7 +293,7 @@ static int jz4740_codec_dev_probe(struct snd_soc_codec *codec)
293 return 0; 293 return 0;
294} 294}
295 295
296static struct snd_soc_codec_driver soc_codec_dev_jz4740_codec = { 296static const struct snd_soc_codec_driver soc_codec_dev_jz4740_codec = {
297 .probe = jz4740_codec_dev_probe, 297 .probe = jz4740_codec_dev_probe,
298 .set_bias_level = jz4740_codec_set_bias_level, 298 .set_bias_level = jz4740_codec_set_bias_level,
299 .suspend_bias_off = true, 299 .suspend_bias_off = true,
diff --git a/sound/soc/codecs/lm4857.c b/sound/soc/codecs/lm4857.c
index 558de1053f73..1e964079642a 100644
--- a/sound/soc/codecs/lm4857.c
+++ b/sound/soc/codecs/lm4857.c
@@ -100,7 +100,7 @@ static const struct snd_soc_dapm_route lm4857_routes[] = {
100 { "EP", "Earpiece", "Mode" }, 100 { "EP", "Earpiece", "Mode" },
101}; 101};
102 102
103static struct snd_soc_component_driver lm4857_component_driver = { 103static const struct snd_soc_component_driver lm4857_component_driver = {
104 .controls = lm4857_controls, 104 .controls = lm4857_controls,
105 .num_controls = ARRAY_SIZE(lm4857_controls), 105 .num_controls = ARRAY_SIZE(lm4857_controls),
106 .dapm_widgets = lm4857_dapm_widgets, 106 .dapm_widgets = lm4857_dapm_widgets,
diff --git a/sound/soc/codecs/lm49453.c b/sound/soc/codecs/lm49453.c
index 8d413c2677cc..41e09d1287b8 100644
--- a/sound/soc/codecs/lm49453.c
+++ b/sound/soc/codecs/lm49453.c
@@ -1389,7 +1389,7 @@ static struct snd_soc_dai_driver lm49453_dai[] = {
1389 }, 1389 },
1390}; 1390};
1391 1391
1392static struct snd_soc_codec_driver soc_codec_dev_lm49453 = { 1392static const struct snd_soc_codec_driver soc_codec_dev_lm49453 = {
1393 .set_bias_level = lm49453_set_bias_level, 1393 .set_bias_level = lm49453_set_bias_level,
1394 .component_driver = { 1394 .component_driver = {
1395 .controls = lm49453_snd_controls, 1395 .controls = lm49453_snd_controls,
diff --git a/sound/soc/codecs/max9768.c b/sound/soc/codecs/max9768.c
index 5b82e26cd5d1..7017c0389e73 100644
--- a/sound/soc/codecs/max9768.c
+++ b/sound/soc/codecs/max9768.c
@@ -151,7 +151,7 @@ static int max9768_probe(struct snd_soc_component *component)
151 return 0; 151 return 0;
152} 152}
153 153
154static struct snd_soc_component_driver max9768_component_driver = { 154static const struct snd_soc_component_driver max9768_component_driver = {
155 .probe = max9768_probe, 155 .probe = max9768_probe,
156 .controls = max9768_volume, 156 .controls = max9768_volume,
157 .num_controls = ARRAY_SIZE(max9768_volume), 157 .num_controls = ARRAY_SIZE(max9768_volume),
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index 72f77455582e..f0bb830874e5 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1698,7 +1698,7 @@ static int max98088_remove(struct snd_soc_codec *codec)
1698 return 0; 1698 return 0;
1699} 1699}
1700 1700
1701static struct snd_soc_codec_driver soc_codec_dev_max98088 = { 1701static const struct snd_soc_codec_driver soc_codec_dev_max98088 = {
1702 .probe = max98088_probe, 1702 .probe = max98088_probe,
1703 .remove = max98088_remove, 1703 .remove = max98088_remove,
1704 .set_bias_level = max98088_set_bias_level, 1704 .set_bias_level = max98088_set_bias_level,
diff --git a/sound/soc/codecs/max98090.c b/sound/soc/codecs/max98090.c
index 66828480d484..13bcfb1ef9b4 100644
--- a/sound/soc/codecs/max98090.c
+++ b/sound/soc/codecs/max98090.c
@@ -2499,7 +2499,7 @@ static void max98090_seq_notifier(struct snd_soc_dapm_context *dapm,
2499 } 2499 }
2500} 2500}
2501 2501
2502static struct snd_soc_codec_driver soc_codec_dev_max98090 = { 2502static const struct snd_soc_codec_driver soc_codec_dev_max98090 = {
2503 .probe = max98090_probe, 2503 .probe = max98090_probe,
2504 .remove = max98090_remove, 2504 .remove = max98090_remove,
2505 .seq_notifier = max98090_seq_notifier, 2505 .seq_notifier = max98090_seq_notifier,
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c
index 6f8a757876ed..5ead87d2ab1d 100644
--- a/sound/soc/codecs/max98095.c
+++ b/sound/soc/codecs/max98095.c
@@ -2102,7 +2102,7 @@ static int max98095_remove(struct snd_soc_codec *codec)
2102 return 0; 2102 return 0;
2103} 2103}
2104 2104
2105static struct snd_soc_codec_driver soc_codec_dev_max98095 = { 2105static const struct snd_soc_codec_driver soc_codec_dev_max98095 = {
2106 .probe = max98095_probe, 2106 .probe = max98095_probe,
2107 .remove = max98095_remove, 2107 .remove = max98095_remove,
2108 .suspend = max98095_suspend, 2108 .suspend = max98095_suspend,
diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c
index 6a6b68a4cb52..426ed2dae6ca 100644
--- a/sound/soc/codecs/max98357a.c
+++ b/sound/soc/codecs/max98357a.c
@@ -72,7 +72,7 @@ static int max98357a_codec_probe(struct snd_soc_codec *codec)
72 return 0; 72 return 0;
73} 73}
74 74
75static struct snd_soc_codec_driver max98357a_codec_driver = { 75static const struct snd_soc_codec_driver max98357a_codec_driver = {
76 .probe = max98357a_codec_probe, 76 .probe = max98357a_codec_probe,
77 .component_driver = { 77 .component_driver = {
78 .dapm_widgets = max98357a_dapm_widgets, 78 .dapm_widgets = max98357a_dapm_widgets,
diff --git a/sound/soc/codecs/max98371.c b/sound/soc/codecs/max98371.c
index 781be9ba8dba..7bc2a17c1e94 100644
--- a/sound/soc/codecs/max98371.c
+++ b/sound/soc/codecs/max98371.c
@@ -349,12 +349,14 @@ static struct snd_soc_dai_driver max98371_dai[] = {
349}; 349};
350 350
351static const struct snd_soc_codec_driver max98371_codec = { 351static const struct snd_soc_codec_driver max98371_codec = {
352 .controls = max98371_snd_controls, 352 .component_driver = {
353 .num_controls = ARRAY_SIZE(max98371_snd_controls), 353 .controls = max98371_snd_controls,
354 .dapm_routes = max98371_audio_map, 354 .num_controls = ARRAY_SIZE(max98371_snd_controls),
355 .num_dapm_routes = ARRAY_SIZE(max98371_audio_map), 355 .dapm_routes = max98371_audio_map,
356 .dapm_widgets = max98371_dapm_widgets, 356 .num_dapm_routes = ARRAY_SIZE(max98371_audio_map),
357 .num_dapm_widgets = ARRAY_SIZE(max98371_dapm_widgets), 357 .dapm_widgets = max98371_dapm_widgets,
358 .num_dapm_widgets = ARRAY_SIZE(max98371_dapm_widgets),
359 },
358}; 360};
359 361
360static const struct regmap_config max98371_regmap = { 362static const struct regmap_config max98371_regmap = {
diff --git a/sound/soc/codecs/max9850.c b/sound/soc/codecs/max9850.c
index 0610840733d1..a3dfc918c278 100644
--- a/sound/soc/codecs/max9850.c
+++ b/sound/soc/codecs/max9850.c
@@ -301,7 +301,7 @@ static int max9850_probe(struct snd_soc_codec *codec)
301 return 0; 301 return 0;
302} 302}
303 303
304static struct snd_soc_codec_driver soc_codec_dev_max9850 = { 304static const struct snd_soc_codec_driver soc_codec_dev_max9850 = {
305 .probe = max9850_probe, 305 .probe = max9850_probe,
306 .set_bias_level = max9850_set_bias_level, 306 .set_bias_level = max9850_set_bias_level,
307 .suspend_bias_off = true, 307 .suspend_bias_off = true,
diff --git a/sound/soc/codecs/max9860.c b/sound/soc/codecs/max9860.c
index 499bdbfd0a2d..a2dc6a47f466 100644
--- a/sound/soc/codecs/max9860.c
+++ b/sound/soc/codecs/max9860.c
@@ -534,7 +534,7 @@ static int max9860_set_bias_level(struct snd_soc_codec *codec,
534 return 0; 534 return 0;
535} 535}
536 536
537static struct snd_soc_codec_driver max9860_codec_driver = { 537static const struct snd_soc_codec_driver max9860_codec_driver = {
538 .set_bias_level = max9860_set_bias_level, 538 .set_bias_level = max9860_set_bias_level,
539 .idle_bias_off = true, 539 .idle_bias_off = true,
540 540
diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index 2a40a69a7513..2f60924fe919 100644
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -350,7 +350,7 @@ static int max9867_dai_set_fmt(struct snd_soc_dai *codec_dai,
350 return 0; 350 return 0;
351} 351}
352 352
353static struct snd_soc_dai_ops max9867_dai_ops = { 353static const struct snd_soc_dai_ops max9867_dai_ops = {
354 .set_fmt = max9867_dai_set_fmt, 354 .set_fmt = max9867_dai_set_fmt,
355 .set_sysclk = max9867_set_dai_sysclk, 355 .set_sysclk = max9867_set_dai_sysclk,
356 .prepare = max9867_prepare, 356 .prepare = max9867_prepare,
@@ -413,7 +413,7 @@ static int max9867_probe(struct snd_soc_codec *codec)
413 return 0; 413 return 0;
414} 414}
415 415
416static struct snd_soc_codec_driver max9867_codec = { 416static const struct snd_soc_codec_driver max9867_codec = {
417 .probe = max9867_probe, 417 .probe = max9867_probe,
418 .component_driver = { 418 .component_driver = {
419 .controls = max9867_snd_controls, 419 .controls = max9867_snd_controls,
diff --git a/sound/soc/codecs/max98926.c b/sound/soc/codecs/max98926.c
index 1eff7e0b092e..03d07bf4d942 100644
--- a/sound/soc/codecs/max98926.c
+++ b/sound/soc/codecs/max98926.c
@@ -213,8 +213,8 @@ static bool max98926_readable_register(struct device *dev, unsigned int reg)
213 } 213 }
214}; 214};
215 215
216DECLARE_TLV_DB_SCALE(max98926_spk_tlv, -600, 100, 0); 216static DECLARE_TLV_DB_SCALE(max98926_spk_tlv, -600, 100, 0);
217DECLARE_TLV_DB_RANGE(max98926_current_tlv, 217static DECLARE_TLV_DB_RANGE(max98926_current_tlv,
218 0, 11, TLV_DB_SCALE_ITEM(20, 20, 0), 218 0, 11, TLV_DB_SCALE_ITEM(20, 20, 0),
219 12, 15, TLV_DB_SCALE_ITEM(320, 40, 0), 219 12, 15, TLV_DB_SCALE_ITEM(320, 40, 0),
220); 220);
@@ -459,7 +459,7 @@ static int max98926_dai_hw_params(struct snd_pcm_substream *substream,
459#define MAX98926_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ 459#define MAX98926_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
460 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) 460 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
461 461
462static struct snd_soc_dai_ops max98926_dai_ops = { 462static const struct snd_soc_dai_ops max98926_dai_ops = {
463 .set_fmt = max98926_dai_set_fmt, 463 .set_fmt = max98926_dai_set_fmt,
464 .hw_params = max98926_dai_hw_params, 464 .hw_params = max98926_dai_hw_params,
465}; 465};
@@ -496,7 +496,7 @@ static int max98926_probe(struct snd_soc_codec *codec)
496 return 0; 496 return 0;
497} 497}
498 498
499static struct snd_soc_codec_driver soc_codec_dev_max98926 = { 499static const struct snd_soc_codec_driver soc_codec_dev_max98926 = {
500 .probe = max98926_probe, 500 .probe = max98926_probe,
501 .component_driver = { 501 .component_driver = {
502 .controls = max98926_snd_controls, 502 .controls = max98926_snd_controls,
diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c
index b5ee29499e16..d9dbbe72f8ad 100644
--- a/sound/soc/codecs/max98927.c
+++ b/sound/soc/codecs/max98927.c
@@ -44,9 +44,9 @@ static struct reg_default max98927_reg[] = {
44 {MAX98927_R0011_CLK_MON, 0x00}, 44 {MAX98927_R0011_CLK_MON, 0x00},
45 {MAX98927_R0012_WDOG_CTRL, 0x00}, 45 {MAX98927_R0012_WDOG_CTRL, 0x00},
46 {MAX98927_R0013_WDOG_RST, 0x00}, 46 {MAX98927_R0013_WDOG_RST, 0x00},
47 {MAX98927_R0014_MEAS_ADC_THERM_WARN_THRESH, 0x00}, 47 {MAX98927_R0014_MEAS_ADC_THERM_WARN_THRESH, 0x75},
48 {MAX98927_R0015_MEAS_ADC_THERM_SHDN_THRESH, 0x00}, 48 {MAX98927_R0015_MEAS_ADC_THERM_SHDN_THRESH, 0x8c},
49 {MAX98927_R0016_MEAS_ADC_THERM_HYSTERESIS, 0x00}, 49 {MAX98927_R0016_MEAS_ADC_THERM_HYSTERESIS, 0x08},
50 {MAX98927_R0017_PIN_CFG, 0x55}, 50 {MAX98927_R0017_PIN_CFG, 0x55},
51 {MAX98927_R0018_PCM_RX_EN_A, 0x00}, 51 {MAX98927_R0018_PCM_RX_EN_A, 0x00},
52 {MAX98927_R0019_PCM_RX_EN_B, 0x00}, 52 {MAX98927_R0019_PCM_RX_EN_B, 0x00},
@@ -82,14 +82,14 @@ static struct reg_default max98927_reg[] = {
82 {MAX98927_R003A_AMP_EN, 0x00}, 82 {MAX98927_R003A_AMP_EN, 0x00},
83 {MAX98927_R003B_SPK_SRC_SEL, 0x00}, 83 {MAX98927_R003B_SPK_SRC_SEL, 0x00},
84 {MAX98927_R003C_SPK_GAIN, 0x00}, 84 {MAX98927_R003C_SPK_GAIN, 0x00},
85 {MAX98927_R003D_SSM_CFG, 0x01}, 85 {MAX98927_R003D_SSM_CFG, 0x04},
86 {MAX98927_R003E_MEAS_EN, 0x00}, 86 {MAX98927_R003E_MEAS_EN, 0x00},
87 {MAX98927_R003F_MEAS_DSP_CFG, 0x04}, 87 {MAX98927_R003F_MEAS_DSP_CFG, 0x04},
88 {MAX98927_R0040_BOOST_CTRL0, 0x00}, 88 {MAX98927_R0040_BOOST_CTRL0, 0x00},
89 {MAX98927_R0041_BOOST_CTRL3, 0x00}, 89 {MAX98927_R0041_BOOST_CTRL3, 0x00},
90 {MAX98927_R0042_BOOST_CTRL1, 0x00}, 90 {MAX98927_R0042_BOOST_CTRL1, 0x00},
91 {MAX98927_R0043_MEAS_ADC_CFG, 0x00}, 91 {MAX98927_R0043_MEAS_ADC_CFG, 0x00},
92 {MAX98927_R0044_MEAS_ADC_BASE_MSB, 0x00}, 92 {MAX98927_R0044_MEAS_ADC_BASE_MSB, 0x01},
93 {MAX98927_R0045_MEAS_ADC_BASE_LSB, 0x00}, 93 {MAX98927_R0045_MEAS_ADC_BASE_LSB, 0x00},
94 {MAX98927_R0046_ADC_CH0_DIVIDE, 0x00}, 94 {MAX98927_R0046_ADC_CH0_DIVIDE, 0x00},
95 {MAX98927_R0047_ADC_CH1_DIVIDE, 0x00}, 95 {MAX98927_R0047_ADC_CH1_DIVIDE, 0x00},
@@ -159,7 +159,7 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
159 mode = MAX98927_PCM_MASTER_MODE_MASTER; 159 mode = MAX98927_PCM_MASTER_MODE_MASTER;
160 break; 160 break;
161 default: 161 default:
162 dev_err(codec->dev, "DAI clock mode unsupported"); 162 dev_err(codec->dev, "DAI clock mode unsupported\n");
163 return -EINVAL; 163 return -EINVAL;
164 } 164 }
165 165
@@ -175,7 +175,7 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
175 invert = MAX98927_PCM_MODE_CFG_PCM_BCLKEDGE; 175 invert = MAX98927_PCM_MODE_CFG_PCM_BCLKEDGE;
176 break; 176 break;
177 default: 177 default:
178 dev_err(codec->dev, "DAI invert mode unsupported"); 178 dev_err(codec->dev, "DAI invert mode unsupported\n");
179 return -EINVAL; 179 return -EINVAL;
180 } 180 }
181 181
@@ -311,7 +311,7 @@ static int max98927_dai_hw_params(struct snd_pcm_substream *substream,
311 chan_sz = MAX98927_PCM_MODE_CFG_CHANSZ_32; 311 chan_sz = MAX98927_PCM_MODE_CFG_CHANSZ_32;
312 break; 312 break;
313 default: 313 default:
314 dev_err(codec->dev, "format unsupported %d", 314 dev_err(codec->dev, "format unsupported %d\n",
315 params_format(params)); 315 params_format(params));
316 goto err; 316 goto err;
317 } 317 }
@@ -418,11 +418,6 @@ static int max98927_dac_event(struct snd_soc_dapm_widget *w,
418 regmap_update_bits(max98927->regmap, 418 regmap_update_bits(max98927->regmap,
419 MAX98927_R003A_AMP_EN, 419 MAX98927_R003A_AMP_EN,
420 MAX98927_AMP_EN_MASK, 1); 420 MAX98927_AMP_EN_MASK, 1);
421 /* enable VMON and IMON */
422 regmap_update_bits(max98927->regmap,
423 MAX98927_R003E_MEAS_EN,
424 MAX98927_MEAS_V_EN | MAX98927_MEAS_I_EN,
425 MAX98927_MEAS_V_EN | MAX98927_MEAS_I_EN);
426 regmap_update_bits(max98927->regmap, 421 regmap_update_bits(max98927->regmap,
427 MAX98927_R00FF_GLOBAL_SHDN, 422 MAX98927_R00FF_GLOBAL_SHDN,
428 MAX98927_GLOBAL_EN_MASK, 1); 423 MAX98927_GLOBAL_EN_MASK, 1);
@@ -434,10 +429,6 @@ static int max98927_dac_event(struct snd_soc_dapm_widget *w,
434 regmap_update_bits(max98927->regmap, 429 regmap_update_bits(max98927->regmap,
435 MAX98927_R003A_AMP_EN, 430 MAX98927_R003A_AMP_EN,
436 MAX98927_AMP_EN_MASK, 0); 431 MAX98927_AMP_EN_MASK, 0);
437 /* disable VMON and IMON */
438 regmap_update_bits(max98927->regmap,
439 MAX98927_R003E_MEAS_EN,
440 MAX98927_MEAS_V_EN | MAX98927_MEAS_I_EN, 0);
441 break; 432 break;
442 default: 433 default:
443 return 0; 434 return 0;
@@ -456,14 +447,24 @@ static const struct soc_enum dai_sel_enum =
456static const struct snd_kcontrol_new max98927_dai_controls = 447static const struct snd_kcontrol_new max98927_dai_controls =
457 SOC_DAPM_ENUM("DAI Sel", dai_sel_enum); 448 SOC_DAPM_ENUM("DAI Sel", dai_sel_enum);
458 449
450static const struct snd_kcontrol_new max98927_vi_control =
451 SOC_DAPM_SINGLE("Switch", MAX98927_R003F_MEAS_DSP_CFG, 2, 1, 0);
452
459static const struct snd_soc_dapm_widget max98927_dapm_widgets[] = { 453static const struct snd_soc_dapm_widget max98927_dapm_widgets[] = {
460 SND_SOC_DAPM_AIF_IN("DAI_OUT", "HiFi Playback", 0, SND_SOC_NOPM, 0, 0),
461 SND_SOC_DAPM_DAC_E("Amp Enable", "HiFi Playback", MAX98927_R003A_AMP_EN, 454 SND_SOC_DAPM_DAC_E("Amp Enable", "HiFi Playback", MAX98927_R003A_AMP_EN,
462 0, 0, max98927_dac_event, 455 0, 0, max98927_dac_event,
463 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), 456 SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD),
464 SND_SOC_DAPM_MUX("DAI Sel Mux", SND_SOC_NOPM, 0, 0, 457 SND_SOC_DAPM_MUX("DAI Sel Mux", SND_SOC_NOPM, 0, 0,
465 &max98927_dai_controls), 458 &max98927_dai_controls),
466 SND_SOC_DAPM_OUTPUT("BE_OUT"), 459 SND_SOC_DAPM_OUTPUT("BE_OUT"),
460 SND_SOC_DAPM_AIF_OUT("Voltage Sense", "HiFi Capture", 0,
461 MAX98927_R003E_MEAS_EN, 0, 0),
462 SND_SOC_DAPM_AIF_OUT("Current Sense", "HiFi Capture", 0,
463 MAX98927_R003E_MEAS_EN, 1, 0),
464 SND_SOC_DAPM_SWITCH("VI Sense", SND_SOC_NOPM, 0, 0,
465 &max98927_vi_control),
466 SND_SOC_DAPM_SIGGEN("VMON"),
467 SND_SOC_DAPM_SIGGEN("IMON"),
467}; 468};
468 469
469static DECLARE_TLV_DB_SCALE(max98927_spk_tlv, 300, 300, 0); 470static DECLARE_TLV_DB_SCALE(max98927_spk_tlv, 300, 300, 0);
@@ -495,6 +496,13 @@ static bool max98927_volatile_reg(struct device *dev, unsigned int reg)
495{ 496{
496 switch (reg) { 497 switch (reg) {
497 case MAX98927_R0001_INT_RAW1 ... MAX98927_R0009_INT_FLAG3: 498 case MAX98927_R0001_INT_RAW1 ... MAX98927_R0009_INT_FLAG3:
499 case MAX98927_R004C_MEAS_ADC_CH0_READ:
500 case MAX98927_R004D_MEAS_ADC_CH1_READ:
501 case MAX98927_R004E_MEAS_ADC_CH2_READ:
502 case MAX98927_R0051_BROWNOUT_STATUS:
503 case MAX98927_R0087_ENV_TRACK_BOOST_VOUT_READ:
504 case MAX98927_R01FF_REV_ID:
505 case MAX98927_R0100_SOFT_RESET:
498 return true; 506 return true;
499 default: 507 default:
500 return false; 508 return false;
@@ -543,11 +551,16 @@ static const struct snd_kcontrol_new max98927_snd_controls[] = {
543}; 551};
544 552
545static const struct snd_soc_dapm_route max98927_audio_map[] = { 553static const struct snd_soc_dapm_route max98927_audio_map[] = {
546 {"Amp Enable", NULL, "DAI_OUT"}, 554 /* Plabyack */
547 {"DAI Sel Mux", "Left", "Amp Enable"}, 555 {"DAI Sel Mux", "Left", "Amp Enable"},
548 {"DAI Sel Mux", "Right", "Amp Enable"}, 556 {"DAI Sel Mux", "Right", "Amp Enable"},
549 {"DAI Sel Mux", "LeftRight", "Amp Enable"}, 557 {"DAI Sel Mux", "LeftRight", "Amp Enable"},
550 {"BE_OUT", NULL, "DAI Sel Mux"}, 558 {"BE_OUT", NULL, "DAI Sel Mux"},
559 /* Capture */
560 { "VI Sense", "Switch", "VMON" },
561 { "VI Sense", "Switch", "IMON" },
562 { "Voltage Sense", NULL, "VI Sense" },
563 { "Current Sense", NULL, "VI Sense" },
551}; 564};
552 565
553static struct snd_soc_dai_driver max98927_dai[] = { 566static struct snd_soc_dai_driver max98927_dai[] = {
@@ -577,7 +590,6 @@ static int max98927_probe(struct snd_soc_codec *codec)
577 590
578 max98927->codec = codec; 591 max98927->codec = codec;
579 codec->control_data = max98927->regmap; 592 codec->control_data = max98927->regmap;
580 codec->cache_bypass = 1;
581 593
582 /* Software Reset */ 594 /* Software Reset */
583 regmap_write(max98927->regmap, 595 regmap_write(max98927->regmap,
@@ -694,6 +706,31 @@ static int max98927_probe(struct snd_soc_codec *codec)
694 return 0; 706 return 0;
695} 707}
696 708
709#ifdef CONFIG_PM_SLEEP
710static int max98927_suspend(struct device *dev)
711{
712 struct max98927_priv *max98927 = dev_get_drvdata(dev);
713
714 regcache_cache_only(max98927->regmap, true);
715 regcache_mark_dirty(max98927->regmap);
716 return 0;
717}
718static int max98927_resume(struct device *dev)
719{
720 struct max98927_priv *max98927 = dev_get_drvdata(dev);
721
722 regmap_write(max98927->regmap,
723 MAX98927_R0100_SOFT_RESET, MAX98927_SOFT_RESET);
724 regcache_cache_only(max98927->regmap, false);
725 regcache_sync(max98927->regmap);
726 return 0;
727}
728#endif
729
730static const struct dev_pm_ops max98927_pm = {
731 SET_SYSTEM_SLEEP_PM_OPS(max98927_suspend, max98927_resume)
732};
733
697static const struct snd_soc_codec_driver soc_codec_dev_max98927 = { 734static const struct snd_soc_codec_driver soc_codec_dev_max98927 = {
698 .probe = max98927_probe, 735 .probe = max98927_probe,
699 .component_driver = { 736 .component_driver = {
@@ -721,14 +758,14 @@ static void max98927_slot_config(struct i2c_client *i2c,
721 struct max98927_priv *max98927) 758 struct max98927_priv *max98927)
722{ 759{
723 int value; 760 int value;
761 struct device *dev = &i2c->dev;
724 762
725 if (!of_property_read_u32(i2c->dev.of_node, 763 if (!device_property_read_u32(dev, "vmon-slot-no", &value))
726 "vmon-slot-no", &value))
727 max98927->v_l_slot = value & 0xF; 764 max98927->v_l_slot = value & 0xF;
728 else 765 else
729 max98927->v_l_slot = 0; 766 max98927->v_l_slot = 0;
730 if (!of_property_read_u32(i2c->dev.of_node, 767
731 "imon-slot-no", &value)) 768 if (!device_property_read_u32(dev, "imon-slot-no", &value))
732 max98927->i_l_slot = value & 0xF; 769 max98927->i_l_slot = value & 0xF;
733 else 770 else
734 max98927->i_l_slot = 1; 771 max98927->i_l_slot = 1;
@@ -827,7 +864,7 @@ static struct i2c_driver max98927_i2c_driver = {
827 .name = "max98927", 864 .name = "max98927",
828 .of_match_table = of_match_ptr(max98927_of_match), 865 .of_match_table = of_match_ptr(max98927_of_match),
829 .acpi_match_table = ACPI_PTR(max98927_acpi_match), 866 .acpi_match_table = ACPI_PTR(max98927_acpi_match),
830 .pm = NULL, 867 .pm = &max98927_pm,
831 }, 868 },
832 .probe = max98927_i2c_probe, 869 .probe = max98927_i2c_probe,
833 .remove = max98927_i2c_remove, 870 .remove = max98927_i2c_remove,
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 90562703dcfd..4fd8d1dc4eef 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -733,7 +733,7 @@ static struct regmap *mc13783_get_regmap(struct device *dev)
733 return dev_get_regmap(dev->parent, NULL); 733 return dev_get_regmap(dev->parent, NULL);
734} 734}
735 735
736static struct snd_soc_codec_driver soc_codec_dev_mc13783 = { 736static const struct snd_soc_codec_driver soc_codec_dev_mc13783 = {
737 .probe = mc13783_probe, 737 .probe = mc13783_probe,
738 .remove = mc13783_remove, 738 .remove = mc13783_remove,
739 .get_regmap = mc13783_get_regmap, 739 .get_regmap = mc13783_get_regmap,
diff --git a/sound/soc/codecs/ml26124.c b/sound/soc/codecs/ml26124.c
index 69e5e18880c5..5cc960d8211e 100644
--- a/sound/soc/codecs/ml26124.c
+++ b/sound/soc/codecs/ml26124.c
@@ -537,7 +537,7 @@ static int ml26124_probe(struct snd_soc_codec *codec)
537 return 0; 537 return 0;
538} 538}
539 539
540static struct snd_soc_codec_driver soc_codec_dev_ml26124 = { 540static const struct snd_soc_codec_driver soc_codec_dev_ml26124 = {
541 .probe = ml26124_probe, 541 .probe = ml26124_probe,
542 .set_bias_level = ml26124_set_bias_level, 542 .set_bias_level = ml26124_set_bias_level,
543 .suspend_bias_off = true, 543 .suspend_bias_off = true,
diff --git a/sound/soc/codecs/msm8916-wcd-analog.c b/sound/soc/codecs/msm8916-wcd-analog.c
index 5710fd440bcd..549c269acc7d 100644
--- a/sound/soc/codecs/msm8916-wcd-analog.c
+++ b/sound/soc/codecs/msm8916-wcd-analog.c
@@ -12,9 +12,16 @@
12#include <sound/pcm.h> 12#include <sound/pcm.h>
13#include <sound/pcm_params.h> 13#include <sound/pcm_params.h>
14#include <sound/tlv.h> 14#include <sound/tlv.h>
15#include <sound/jack.h>
15 16
16#define CDC_D_REVISION1 (0xf000) 17#define CDC_D_REVISION1 (0xf000)
17#define CDC_D_PERPH_SUBTYPE (0xf005) 18#define CDC_D_PERPH_SUBTYPE (0xf005)
19#define CDC_D_INT_EN_SET (0x015)
20#define CDC_D_INT_EN_CLR (0x016)
21#define MBHC_SWITCH_INT BIT(7)
22#define MBHC_MIC_ELECTRICAL_INS_REM_DET BIT(6)
23#define MBHC_BUTTON_PRESS_DET BIT(5)
24#define MBHC_BUTTON_RELEASE_DET BIT(4)
18#define CDC_D_CDC_RST_CTL (0xf046) 25#define CDC_D_CDC_RST_CTL (0xf046)
19#define RST_CTL_DIG_SW_RST_N_MASK BIT(7) 26#define RST_CTL_DIG_SW_RST_N_MASK BIT(7)
20#define RST_CTL_DIG_SW_RST_N_RESET 0 27#define RST_CTL_DIG_SW_RST_N_RESET 0
@@ -37,6 +44,8 @@
37#define DIG_CLK_CTL_RXD1_CLK_EN BIT(0) 44#define DIG_CLK_CTL_RXD1_CLK_EN BIT(0)
38#define DIG_CLK_CTL_RXD2_CLK_EN BIT(1) 45#define DIG_CLK_CTL_RXD2_CLK_EN BIT(1)
39#define DIG_CLK_CTL_RXD3_CLK_EN BIT(2) 46#define DIG_CLK_CTL_RXD3_CLK_EN BIT(2)
47#define DIG_CLK_CTL_D_MBHC_CLK_EN_MASK BIT(3)
48#define DIG_CLK_CTL_D_MBHC_CLK_EN BIT(3)
40#define DIG_CLK_CTL_TXD_CLK_EN BIT(4) 49#define DIG_CLK_CTL_TXD_CLK_EN BIT(4)
41#define DIG_CLK_CTL_NCP_CLK_EN_MASK BIT(6) 50#define DIG_CLK_CTL_NCP_CLK_EN_MASK BIT(6)
42#define DIG_CLK_CTL_NCP_CLK_EN BIT(6) 51#define DIG_CLK_CTL_NCP_CLK_EN BIT(6)
@@ -93,8 +102,12 @@
93#define MICB_1_EN_TX3_GND_SEL_TX_GND 0 102#define MICB_1_EN_TX3_GND_SEL_TX_GND 0
94 103
95#define CDC_A_MICB_1_VAL (0xf141) 104#define CDC_A_MICB_1_VAL (0xf141)
105#define MICB_MIN_VAL 1600
106#define MICB_STEP_SIZE 50
107#define MICB_VOLTAGE_REGVAL(v) ((v - MICB_MIN_VAL)/MICB_STEP_SIZE)
96#define MICB_1_VAL_MICB_OUT_VAL_MASK GENMASK(7, 3) 108#define MICB_1_VAL_MICB_OUT_VAL_MASK GENMASK(7, 3)
97#define MICB_1_VAL_MICB_OUT_VAL_V2P70V ((0x16) << 3) 109#define MICB_1_VAL_MICB_OUT_VAL_V2P70V ((0x16) << 3)
110#define MICB_1_VAL_MICB_OUT_VAL_V1P80V ((0x4) << 3)
98#define CDC_A_MICB_1_CTL (0xf142) 111#define CDC_A_MICB_1_CTL (0xf142)
99 112
100#define MICB_1_CTL_CFILT_REF_SEL_MASK BIT(1) 113#define MICB_1_CTL_CFILT_REF_SEL_MASK BIT(1)
@@ -128,8 +141,51 @@
128#define MICB_1_INT_TX3_INT_PULLUP_EN_TX1N_TO_GND 0 141#define MICB_1_INT_TX3_INT_PULLUP_EN_TX1N_TO_GND 0
129 142
130#define CDC_A_MICB_2_EN (0xf144) 143#define CDC_A_MICB_2_EN (0xf144)
144#define CDC_A_MICB_2_EN_ENABLE BIT(7)
145#define CDC_A_MICB_2_PULL_DOWN_EN_MASK BIT(5)
146#define CDC_A_MICB_2_PULL_DOWN_EN BIT(5)
131#define CDC_A_TX_1_2_ATEST_CTL_2 (0xf145) 147#define CDC_A_TX_1_2_ATEST_CTL_2 (0xf145)
132#define CDC_A_MASTER_BIAS_CTL (0xf146) 148#define CDC_A_MASTER_BIAS_CTL (0xf146)
149#define CDC_A_MBHC_DET_CTL_1 (0xf147)
150#define CDC_A_MBHC_DET_CTL_L_DET_EN BIT(7)
151#define CDC_A_MBHC_DET_CTL_GND_DET_EN BIT(6)
152#define CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_INSERTION BIT(5)
153#define CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_REMOVAL (0)
154#define CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_MASK BIT(5)
155#define CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_SHIFT (5)
156#define CDC_A_MBHC_DET_CTL_MIC_CLAMP_CTL_AUTO BIT(4)
157#define CDC_A_MBHC_DET_CTL_MIC_CLAMP_CTL_MANUAL BIT(3)
158#define CDC_A_MBHC_DET_CTL_MIC_CLAMP_CTL_MASK GENMASK(4, 3)
159#define CDC_A_MBHC_DET_CTL_MBHC_BIAS_EN BIT(2)
160#define CDC_A_MBHC_DET_CTL_2 (0xf150)
161#define CDC_A_MBHC_DET_CTL_HS_L_DET_PULL_UP_CTRL_I_3P0 (BIT(7) | BIT(6))
162#define CDC_A_MBHC_DET_CTL_HS_L_DET_COMPA_CTRL_V0P9_VDD BIT(5)
163#define CDC_A_PLUG_TYPE_MASK GENMASK(4, 3)
164#define CDC_A_HPHL_PLUG_TYPE_NO BIT(4)
165#define CDC_A_GND_PLUG_TYPE_NO BIT(3)
166#define CDC_A_MBHC_DET_CTL_HPHL_100K_TO_GND_EN_MASK BIT(0)
167#define CDC_A_MBHC_DET_CTL_HPHL_100K_TO_GND_EN BIT(0)
168#define CDC_A_MBHC_FSM_CTL (0xf151)
169#define CDC_A_MBHC_FSM_CTL_MBHC_FSM_EN BIT(7)
170#define CDC_A_MBHC_FSM_CTL_MBHC_FSM_EN_MASK BIT(7)
171#define CDC_A_MBHC_FSM_CTL_BTN_ISRC_CTRL_I_100UA (0x3 << 4)
172#define CDC_A_MBHC_FSM_CTL_BTN_ISRC_CTRL_MASK GENMASK(6, 4)
173#define CDC_A_MBHC_DBNC_TIMER (0xf152)
174#define CDC_A_MBHC_DBNC_TIMER_BTN_DBNC_T_16MS BIT(3)
175#define CDC_A_MBHC_DBNC_TIMER_INSREM_DBNC_T_256_MS (0x9 << 4)
176#define CDC_A_MBHC_BTN0_ZDET_CTL_0 (0xf153)
177#define CDC_A_MBHC_BTN1_ZDET_CTL_1 (0xf154)
178#define CDC_A_MBHC_BTN2_ZDET_CTL_2 (0xf155)
179#define CDC_A_MBHC_BTN3_CTL (0xf156)
180#define CDC_A_MBHC_BTN4_CTL (0xf157)
181#define CDC_A_MBHC_BTN_VREF_FINE_SHIFT (2)
182#define CDC_A_MBHC_BTN_VREF_FINE_MASK GENMASK(4, 2)
183#define CDC_A_MBHC_BTN_VREF_COARSE_MASK GENMASK(7, 5)
184#define CDC_A_MBHC_BTN_VREF_COARSE_SHIFT (5)
185#define CDC_A_MBHC_BTN_VREF_MASK (CDC_A_MBHC_BTN_VREF_COARSE_MASK | \
186 CDC_A_MBHC_BTN_VREF_FINE_MASK)
187#define CDC_A_MBHC_RESULT_1 (0xf158)
188#define CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK GENMASK(4, 0)
133#define CDC_A_TX_1_EN (0xf160) 189#define CDC_A_TX_1_EN (0xf160)
134#define CDC_A_TX_2_EN (0xf161) 190#define CDC_A_TX_2_EN (0xf161)
135#define CDC_A_TX_1_2_TEST_CTL_1 (0xf162) 191#define CDC_A_TX_1_2_TEST_CTL_1 (0xf162)
@@ -213,18 +269,37 @@
213#define MSM8916_WCD_ANALOG_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ 269#define MSM8916_WCD_ANALOG_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\
214 SNDRV_PCM_FMTBIT_S24_LE) 270 SNDRV_PCM_FMTBIT_S24_LE)
215 271
272static int btn_mask = SND_JACK_BTN_0 | SND_JACK_BTN_1 |
273 SND_JACK_BTN_2 | SND_JACK_BTN_3 | SND_JACK_BTN_4;
274static int hs_jack_mask = SND_JACK_HEADPHONE | SND_JACK_HEADSET;
275
216static const char * const supply_names[] = { 276static const char * const supply_names[] = {
217 "vdd-cdc-io", 277 "vdd-cdc-io",
218 "vdd-cdc-tx-rx-cx", 278 "vdd-cdc-tx-rx-cx",
219}; 279};
220 280
281#define MBHC_MAX_BUTTONS (5)
282
221struct pm8916_wcd_analog_priv { 283struct pm8916_wcd_analog_priv {
222 u16 pmic_rev; 284 u16 pmic_rev;
223 u16 codec_version; 285 u16 codec_version;
286 bool mbhc_btn_enabled;
287 /* special event to detect accessory type */
288 bool mbhc_btn0_pressed;
289 bool detect_accessory_type;
224 struct clk *mclk; 290 struct clk *mclk;
291 struct snd_soc_codec *codec;
225 struct regulator_bulk_data supplies[ARRAY_SIZE(supply_names)]; 292 struct regulator_bulk_data supplies[ARRAY_SIZE(supply_names)];
293 struct snd_soc_jack *jack;
294 bool hphl_jack_type_normally_open;
295 bool gnd_jack_type_normally_open;
296 /* Voltage threshold when internal current source of 100uA is used */
297 u32 vref_btn_cs[MBHC_MAX_BUTTONS];
298 /* Voltage threshold when microphone bias is ON */
299 u32 vref_btn_micb[MBHC_MAX_BUTTONS];
226 unsigned int micbias1_cap_mode; 300 unsigned int micbias1_cap_mode;
227 unsigned int micbias2_cap_mode; 301 unsigned int micbias2_cap_mode;
302 unsigned int micbias_mv;
228}; 303};
229 304
230static const char *const adc2_mux_text[] = { "ZERO", "INP2", "INP3" }; 305static const char *const adc2_mux_text[] = { "ZERO", "INP2", "INP3" };
@@ -265,18 +340,25 @@ static const struct snd_kcontrol_new pm8916_wcd_analog_snd_controls[] = {
265 340
266static void pm8916_wcd_analog_micbias_enable(struct snd_soc_codec *codec) 341static void pm8916_wcd_analog_micbias_enable(struct snd_soc_codec *codec)
267{ 342{
343 struct pm8916_wcd_analog_priv *wcd = snd_soc_codec_get_drvdata(codec);
344
268 snd_soc_update_bits(codec, CDC_A_MICB_1_CTL, 345 snd_soc_update_bits(codec, CDC_A_MICB_1_CTL,
269 MICB_1_CTL_EXT_PRECHARG_EN_MASK | 346 MICB_1_CTL_EXT_PRECHARG_EN_MASK |
270 MICB_1_CTL_INT_PRECHARG_BYP_MASK, 347 MICB_1_CTL_INT_PRECHARG_BYP_MASK,
271 MICB_1_CTL_INT_PRECHARG_BYP_EXT_PRECHRG_SEL 348 MICB_1_CTL_INT_PRECHARG_BYP_EXT_PRECHRG_SEL
272 | MICB_1_CTL_EXT_PRECHARG_EN_ENABLE); 349 | MICB_1_CTL_EXT_PRECHARG_EN_ENABLE);
273 350
274 snd_soc_write(codec, CDC_A_MICB_1_VAL, MICB_1_VAL_MICB_OUT_VAL_V2P70V); 351 if (wcd->micbias_mv) {
275 /* 352 snd_soc_write(codec, CDC_A_MICB_1_VAL,
276 * Special headset needs MICBIAS as 2.7V so wait for 353 MICB_VOLTAGE_REGVAL(wcd->micbias_mv));
277 * 50 msec for the MICBIAS to reach 2.7 volts. 354 /*
278 */ 355 * Special headset needs MICBIAS as 2.7V so wait for
279 msleep(50); 356 * 50 msec for the MICBIAS to reach 2.7 volts.
357 */
358 if (wcd->micbias_mv >= 2700)
359 msleep(50);
360 }
361
280 snd_soc_update_bits(codec, CDC_A_MICB_1_CTL, 362 snd_soc_update_bits(codec, CDC_A_MICB_1_CTL,
281 MICB_1_CTL_EXT_PRECHARG_EN_MASK | 363 MICB_1_CTL_EXT_PRECHARG_EN_MASK |
282 MICB_1_CTL_INT_PRECHARG_BYP_MASK, 0); 364 MICB_1_CTL_INT_PRECHARG_BYP_MASK, 0);
@@ -361,6 +443,97 @@ static int pm8916_wcd_analog_enable_micbias_int1(struct
361 wcd->micbias1_cap_mode); 443 wcd->micbias1_cap_mode);
362} 444}
363 445
446static void pm8916_wcd_setup_mbhc(struct pm8916_wcd_analog_priv *wcd)
447{
448 struct snd_soc_codec *codec = wcd->codec;
449 u32 plug_type = 0;
450 u32 int_en_mask;
451
452 snd_soc_write(codec, CDC_A_MBHC_DET_CTL_1,
453 CDC_A_MBHC_DET_CTL_L_DET_EN |
454 CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_INSERTION |
455 CDC_A_MBHC_DET_CTL_MIC_CLAMP_CTL_AUTO |
456 CDC_A_MBHC_DET_CTL_MBHC_BIAS_EN);
457
458 if (wcd->hphl_jack_type_normally_open)
459 plug_type |= CDC_A_HPHL_PLUG_TYPE_NO;
460
461 if (wcd->gnd_jack_type_normally_open)
462 plug_type |= CDC_A_GND_PLUG_TYPE_NO;
463
464 snd_soc_write(codec, CDC_A_MBHC_DET_CTL_2,
465 CDC_A_MBHC_DET_CTL_HS_L_DET_PULL_UP_CTRL_I_3P0 |
466 CDC_A_MBHC_DET_CTL_HS_L_DET_COMPA_CTRL_V0P9_VDD |
467 plug_type |
468 CDC_A_MBHC_DET_CTL_HPHL_100K_TO_GND_EN);
469
470
471 snd_soc_write(codec, CDC_A_MBHC_DBNC_TIMER,
472 CDC_A_MBHC_DBNC_TIMER_INSREM_DBNC_T_256_MS |
473 CDC_A_MBHC_DBNC_TIMER_BTN_DBNC_T_16MS);
474
475 /* enable MBHC clock */
476 snd_soc_update_bits(codec, CDC_D_CDC_DIG_CLK_CTL,
477 DIG_CLK_CTL_D_MBHC_CLK_EN_MASK,
478 DIG_CLK_CTL_D_MBHC_CLK_EN);
479
480 int_en_mask = MBHC_SWITCH_INT;
481 if (wcd->mbhc_btn_enabled)
482 int_en_mask |= MBHC_BUTTON_PRESS_DET | MBHC_BUTTON_RELEASE_DET;
483
484 snd_soc_update_bits(codec, CDC_D_INT_EN_CLR, int_en_mask, 0);
485 snd_soc_update_bits(codec, CDC_D_INT_EN_SET, int_en_mask, int_en_mask);
486 wcd->mbhc_btn0_pressed = false;
487 wcd->detect_accessory_type = true;
488}
489
490static int pm8916_mbhc_configure_bias(struct pm8916_wcd_analog_priv *priv,
491 bool micbias2_enabled)
492{
493 struct snd_soc_codec *codec = priv->codec;
494 u32 coarse, fine, reg_val, reg_addr;
495 int *vrefs, i;
496
497 if (!micbias2_enabled) { /* use internal 100uA Current source */
498 /* Enable internal 2.2k Internal Rbias Resistor */
499 snd_soc_update_bits(codec, CDC_A_MICB_1_INT_RBIAS,
500 MICB_1_INT_TX2_INT_RBIAS_EN_MASK,
501 MICB_1_INT_TX2_INT_RBIAS_EN_ENABLE);
502 /* Remove pull down on MIC BIAS2 */
503 snd_soc_update_bits(codec, CDC_A_MICB_2_EN,
504 CDC_A_MICB_2_PULL_DOWN_EN_MASK,
505 0);
506 /* enable 100uA internal current source */
507 snd_soc_update_bits(codec, CDC_A_MBHC_FSM_CTL,
508 CDC_A_MBHC_FSM_CTL_BTN_ISRC_CTRL_MASK,
509 CDC_A_MBHC_FSM_CTL_BTN_ISRC_CTRL_I_100UA);
510 }
511 snd_soc_update_bits(codec, CDC_A_MBHC_FSM_CTL,
512 CDC_A_MBHC_FSM_CTL_MBHC_FSM_EN_MASK,
513 CDC_A_MBHC_FSM_CTL_MBHC_FSM_EN);
514
515 if (micbias2_enabled)
516 vrefs = &priv->vref_btn_micb[0];
517 else
518 vrefs = &priv->vref_btn_cs[0];
519
520 /* program vref ranges for all the buttons */
521 reg_addr = CDC_A_MBHC_BTN0_ZDET_CTL_0;
522 for (i = 0; i < MBHC_MAX_BUTTONS; i++) {
523 /* split mv in to coarse parts of 100mv & fine parts of 12mv */
524 coarse = (vrefs[i] / 100);
525 fine = ((vrefs[i] % 100) / 12);
526 reg_val = (coarse << CDC_A_MBHC_BTN_VREF_COARSE_SHIFT) |
527 (fine << CDC_A_MBHC_BTN_VREF_FINE_SHIFT);
528 snd_soc_update_bits(codec, reg_addr,
529 CDC_A_MBHC_BTN_VREF_MASK,
530 reg_val);
531 reg_addr++;
532 }
533
534 return 0;
535}
536
364static int pm8916_wcd_analog_enable_micbias_int2(struct 537static int pm8916_wcd_analog_enable_micbias_int2(struct
365 snd_soc_dapm_widget 538 snd_soc_dapm_widget
366 *w, struct snd_kcontrol 539 *w, struct snd_kcontrol
@@ -369,6 +542,15 @@ static int pm8916_wcd_analog_enable_micbias_int2(struct
369 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); 542 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
370 struct pm8916_wcd_analog_priv *wcd = snd_soc_codec_get_drvdata(codec); 543 struct pm8916_wcd_analog_priv *wcd = snd_soc_codec_get_drvdata(codec);
371 544
545 switch (event) {
546 case SND_SOC_DAPM_POST_PMU:
547 pm8916_mbhc_configure_bias(wcd, true);
548 break;
549 case SND_SOC_DAPM_POST_PMD:
550 pm8916_mbhc_configure_bias(wcd, false);
551 break;
552 }
553
372 return pm8916_wcd_analog_enable_micbias_int(codec, event, w->reg, 554 return pm8916_wcd_analog_enable_micbias_int(codec, event, w->reg,
373 wcd->micbias2_cap_mode); 555 wcd->micbias2_cap_mode);
374} 556}
@@ -536,6 +718,14 @@ static int pm8916_wcd_analog_probe(struct snd_soc_codec *codec)
536 snd_soc_write(codec, wcd_reg_defaults_2_0[reg].reg, 718 snd_soc_write(codec, wcd_reg_defaults_2_0[reg].reg,
537 wcd_reg_defaults_2_0[reg].def); 719 wcd_reg_defaults_2_0[reg].def);
538 720
721 priv->codec = codec;
722
723 snd_soc_update_bits(codec, CDC_D_CDC_RST_CTL,
724 RST_CTL_DIG_SW_RST_N_MASK,
725 RST_CTL_DIG_SW_RST_N_REMOVE_RESET);
726
727 pm8916_wcd_setup_mbhc(priv);
728
539 return 0; 729 return 0;
540} 730}
541 731
@@ -543,6 +733,9 @@ static int pm8916_wcd_analog_remove(struct snd_soc_codec *codec)
543{ 733{
544 struct pm8916_wcd_analog_priv *priv = dev_get_drvdata(codec->dev); 734 struct pm8916_wcd_analog_priv *priv = dev_get_drvdata(codec->dev);
545 735
736 snd_soc_update_bits(codec, CDC_D_CDC_RST_CTL,
737 RST_CTL_DIG_SW_RST_N_MASK, 0);
738
546 return regulator_bulk_disable(ARRAY_SIZE(priv->supplies), 739 return regulator_bulk_disable(ARRAY_SIZE(priv->supplies),
547 priv->supplies); 740 priv->supplies);
548} 741}
@@ -731,32 +924,128 @@ static const struct snd_soc_dapm_widget pm8916_wcd_analog_dapm_widgets[] = {
731 SND_SOC_DAPM_SUPPLY("A_MCLK2", CDC_D_CDC_TOP_CLK_CTL, 3, 0, NULL, 0), 924 SND_SOC_DAPM_SUPPLY("A_MCLK2", CDC_D_CDC_TOP_CLK_CTL, 3, 0, NULL, 0),
732}; 925};
733 926
927static int pm8916_wcd_analog_set_jack(struct snd_soc_codec *codec,
928 struct snd_soc_jack *jack,
929 void *data)
930{
931 struct pm8916_wcd_analog_priv *wcd = snd_soc_codec_get_drvdata(codec);
932
933 wcd->jack = jack;
934
935 return 0;
936}
937
734static struct regmap *pm8916_get_regmap(struct device *dev) 938static struct regmap *pm8916_get_regmap(struct device *dev)
735{ 939{
736 return dev_get_regmap(dev->parent, NULL); 940 return dev_get_regmap(dev->parent, NULL);
737} 941}
738 942
739static int pm8916_wcd_analog_startup(struct snd_pcm_substream *substream, 943static irqreturn_t mbhc_btn_release_irq_handler(int irq, void *arg)
740 struct snd_soc_dai *dai)
741{ 944{
742 snd_soc_update_bits(dai->codec, CDC_D_CDC_RST_CTL, 945 struct pm8916_wcd_analog_priv *priv = arg;
743 RST_CTL_DIG_SW_RST_N_MASK,
744 RST_CTL_DIG_SW_RST_N_REMOVE_RESET);
745 946
746 return 0; 947 if (priv->detect_accessory_type) {
948 struct snd_soc_codec *codec = priv->codec;
949 u32 val = snd_soc_read(codec, CDC_A_MBHC_RESULT_1);
950
951 /* check if its BTN0 thats released */
952 if ((val != -1) && !(val & CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK))
953 priv->mbhc_btn0_pressed = false;
954
955 } else {
956 snd_soc_jack_report(priv->jack, 0, btn_mask);
957 }
958
959 return IRQ_HANDLED;
747} 960}
748 961
749static void pm8916_wcd_analog_shutdown(struct snd_pcm_substream *substream, 962static irqreturn_t mbhc_btn_press_irq_handler(int irq, void *arg)
750 struct snd_soc_dai *dai)
751{ 963{
752 snd_soc_update_bits(dai->codec, CDC_D_CDC_RST_CTL, 964 struct pm8916_wcd_analog_priv *priv = arg;
753 RST_CTL_DIG_SW_RST_N_MASK, 0); 965 struct snd_soc_codec *codec = priv->codec;
966 u32 btn_result;
967
968 btn_result = snd_soc_read(codec, CDC_A_MBHC_RESULT_1) &
969 CDC_A_MBHC_RESULT_1_BTN_RESULT_MASK;
970
971 switch (btn_result) {
972 case 0xf:
973 snd_soc_jack_report(priv->jack, SND_JACK_BTN_4, btn_mask);
974 break;
975 case 0x7:
976 snd_soc_jack_report(priv->jack, SND_JACK_BTN_3, btn_mask);
977 break;
978 case 0x3:
979 snd_soc_jack_report(priv->jack, SND_JACK_BTN_2, btn_mask);
980 break;
981 case 0x1:
982 snd_soc_jack_report(priv->jack, SND_JACK_BTN_1, btn_mask);
983 break;
984 case 0x0:
985 /* handle BTN_0 specially for type detection */
986 if (priv->detect_accessory_type)
987 priv->mbhc_btn0_pressed = true;
988 else
989 snd_soc_jack_report(priv->jack,
990 SND_JACK_BTN_0, btn_mask);
991 break;
992 default:
993 dev_err(codec->dev,
994 "Unexpected button press result (%x)", btn_result);
995 break;
996 }
997
998 return IRQ_HANDLED;
754} 999}
755 1000
756static struct snd_soc_dai_ops pm8916_wcd_analog_dai_ops = { 1001static irqreturn_t pm8916_mbhc_switch_irq_handler(int irq, void *arg)
757 .startup = pm8916_wcd_analog_startup, 1002{
758 .shutdown = pm8916_wcd_analog_shutdown, 1003 struct pm8916_wcd_analog_priv *priv = arg;
759}; 1004 struct snd_soc_codec *codec = priv->codec;
1005 bool ins = false;
1006
1007 if (snd_soc_read(codec, CDC_A_MBHC_DET_CTL_1) &
1008 CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_MASK)
1009 ins = true;
1010
1011 /* Set the detection type appropriately */
1012 snd_soc_update_bits(codec, CDC_A_MBHC_DET_CTL_1,
1013 CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_MASK,
1014 (!ins << CDC_A_MBHC_DET_CTL_MECH_DET_TYPE_SHIFT));
1015
1016
1017 if (ins) { /* hs insertion */
1018 bool micbias_enabled = false;
1019
1020 if (snd_soc_read(codec, CDC_A_MICB_2_EN) &
1021 CDC_A_MICB_2_EN_ENABLE)
1022 micbias_enabled = true;
1023
1024 pm8916_mbhc_configure_bias(priv, micbias_enabled);
1025
1026 /*
1027 * if only a btn0 press event is receive just before
1028 * insert event then its a 3 pole headphone else if
1029 * both press and release event received then its
1030 * a headset.
1031 */
1032 if (priv->mbhc_btn0_pressed)
1033 snd_soc_jack_report(priv->jack,
1034 SND_JACK_HEADPHONE, hs_jack_mask);
1035 else
1036 snd_soc_jack_report(priv->jack,
1037 SND_JACK_HEADSET, hs_jack_mask);
1038
1039 priv->detect_accessory_type = false;
1040
1041 } else { /* removal */
1042 snd_soc_jack_report(priv->jack, 0, hs_jack_mask);
1043 priv->detect_accessory_type = true;
1044 priv->mbhc_btn0_pressed = false;
1045 }
1046
1047 return IRQ_HANDLED;
1048}
760 1049
761static struct snd_soc_dai_driver pm8916_wcd_analog_dai[] = { 1050static struct snd_soc_dai_driver pm8916_wcd_analog_dai[] = {
762 [0] = { 1051 [0] = {
@@ -769,7 +1058,6 @@ static struct snd_soc_dai_driver pm8916_wcd_analog_dai[] = {
769 .channels_min = 1, 1058 .channels_min = 1,
770 .channels_max = 3, 1059 .channels_max = 3,
771 }, 1060 },
772 .ops = &pm8916_wcd_analog_dai_ops,
773 }, 1061 },
774 [1] = { 1062 [1] = {
775 .name = "pm8916_wcd_analog_pdm_tx", 1063 .name = "pm8916_wcd_analog_pdm_tx",
@@ -781,13 +1069,13 @@ static struct snd_soc_dai_driver pm8916_wcd_analog_dai[] = {
781 .channels_min = 1, 1069 .channels_min = 1,
782 .channels_max = 4, 1070 .channels_max = 4,
783 }, 1071 },
784 .ops = &pm8916_wcd_analog_dai_ops,
785 }, 1072 },
786}; 1073};
787 1074
788static struct snd_soc_codec_driver pm8916_wcd_analog = { 1075static const struct snd_soc_codec_driver pm8916_wcd_analog = {
789 .probe = pm8916_wcd_analog_probe, 1076 .probe = pm8916_wcd_analog_probe,
790 .remove = pm8916_wcd_analog_remove, 1077 .remove = pm8916_wcd_analog_remove,
1078 .set_jack = pm8916_wcd_analog_set_jack,
791 .get_regmap = pm8916_get_regmap, 1079 .get_regmap = pm8916_get_regmap,
792 .component_driver = { 1080 .component_driver = {
793 .controls = pm8916_wcd_analog_snd_controls, 1081 .controls = pm8916_wcd_analog_snd_controls,
@@ -802,6 +1090,7 @@ static struct snd_soc_codec_driver pm8916_wcd_analog = {
802static int pm8916_wcd_analog_parse_dt(struct device *dev, 1090static int pm8916_wcd_analog_parse_dt(struct device *dev,
803 struct pm8916_wcd_analog_priv *priv) 1091 struct pm8916_wcd_analog_priv *priv)
804{ 1092{
1093 int rval;
805 1094
806 if (of_property_read_bool(dev->of_node, "qcom,micbias1-ext-cap")) 1095 if (of_property_read_bool(dev->of_node, "qcom,micbias1-ext-cap"))
807 priv->micbias1_cap_mode = MICB_1_EN_EXT_BYP_CAP; 1096 priv->micbias1_cap_mode = MICB_1_EN_EXT_BYP_CAP;
@@ -813,6 +1102,42 @@ static int pm8916_wcd_analog_parse_dt(struct device *dev,
813 else 1102 else
814 priv->micbias2_cap_mode = MICB_1_EN_NO_EXT_BYP_CAP; 1103 priv->micbias2_cap_mode = MICB_1_EN_NO_EXT_BYP_CAP;
815 1104
1105 of_property_read_u32(dev->of_node, "qcom,micbias-lvl",
1106 &priv->micbias_mv);
1107
1108 if (of_property_read_bool(dev->of_node,
1109 "qcom,hphl-jack-type-normally-open"))
1110 priv->hphl_jack_type_normally_open = true;
1111 else
1112 priv->hphl_jack_type_normally_open = false;
1113
1114 if (of_property_read_bool(dev->of_node,
1115 "qcom,gnd-jack-type-normally-open"))
1116 priv->gnd_jack_type_normally_open = true;
1117 else
1118 priv->gnd_jack_type_normally_open = false;
1119
1120 priv->mbhc_btn_enabled = true;
1121 rval = of_property_read_u32_array(dev->of_node,
1122 "qcom,mbhc-vthreshold-low",
1123 &priv->vref_btn_cs[0],
1124 MBHC_MAX_BUTTONS);
1125 if (rval < 0) {
1126 priv->mbhc_btn_enabled = false;
1127 } else {
1128 rval = of_property_read_u32_array(dev->of_node,
1129 "qcom,mbhc-vthreshold-high",
1130 &priv->vref_btn_micb[0],
1131 MBHC_MAX_BUTTONS);
1132 if (rval < 0)
1133 priv->mbhc_btn_enabled = false;
1134 }
1135
1136 if (!priv->mbhc_btn_enabled)
1137 dev_err(dev,
1138 "DT property missing, MBHC btn detection disabled\n");
1139
1140
816 return 0; 1141 return 0;
817} 1142}
818 1143
@@ -820,7 +1145,7 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev)
820{ 1145{
821 struct pm8916_wcd_analog_priv *priv; 1146 struct pm8916_wcd_analog_priv *priv;
822 struct device *dev = &pdev->dev; 1147 struct device *dev = &pdev->dev;
823 int ret, i; 1148 int ret, i, irq;
824 1149
825 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 1150 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
826 if (!priv) 1151 if (!priv)
@@ -852,6 +1177,48 @@ static int pm8916_wcd_analog_spmi_probe(struct platform_device *pdev)
852 return ret; 1177 return ret;
853 } 1178 }
854 1179
1180 irq = platform_get_irq_byname(pdev, "mbhc_switch_int");
1181 if (irq < 0) {
1182 dev_err(dev, "failed to get mbhc switch irq\n");
1183 return irq;
1184 }
1185
1186 ret = devm_request_irq(dev, irq, pm8916_mbhc_switch_irq_handler,
1187 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING |
1188 IRQF_ONESHOT,
1189 "mbhc switch irq", priv);
1190 if (ret)
1191 dev_err(dev, "cannot request mbhc switch irq\n");
1192
1193 if (priv->mbhc_btn_enabled) {
1194 irq = platform_get_irq_byname(pdev, "mbhc_but_press_det");
1195 if (irq < 0) {
1196 dev_err(dev, "failed to get button press irq\n");
1197 return irq;
1198 }
1199
1200 ret = devm_request_irq(dev, irq, mbhc_btn_press_irq_handler,
1201 IRQF_TRIGGER_RISING |
1202 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
1203 "mbhc btn press irq", priv);
1204 if (ret)
1205 dev_err(dev, "cannot request mbhc button press irq\n");
1206
1207 irq = platform_get_irq_byname(pdev, "mbhc_but_rel_det");
1208 if (irq < 0) {
1209 dev_err(dev, "failed to get button release irq\n");
1210 return irq;
1211 }
1212
1213 ret = devm_request_irq(dev, irq, mbhc_btn_release_irq_handler,
1214 IRQF_TRIGGER_RISING |
1215 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
1216 "mbhc btn release irq", priv);
1217 if (ret)
1218 dev_err(dev, "cannot request mbhc button release irq\n");
1219
1220 }
1221
855 dev_set_drvdata(dev, priv); 1222 dev_set_drvdata(dev, priv);
856 1223
857 return snd_soc_register_codec(dev, &pm8916_wcd_analog, 1224 return snd_soc_register_codec(dev, &pm8916_wcd_analog,
diff --git a/sound/soc/codecs/msm8916-wcd-digital.c b/sound/soc/codecs/msm8916-wcd-digital.c
index f690442af8c9..66df8f810f0d 100644
--- a/sound/soc/codecs/msm8916-wcd-digital.c
+++ b/sound/soc/codecs/msm8916-wcd-digital.c
@@ -218,6 +218,8 @@ static const char *const rx_mix1_text[] = {
218static const char *const dec_mux_text[] = { 218static const char *const dec_mux_text[] = {
219 "ZERO", "ADC1", "ADC2", "ADC3", "DMIC1", "DMIC2" 219 "ZERO", "ADC1", "ADC2", "ADC3", "DMIC1", "DMIC2"
220}; 220};
221
222static const char *const cic_mux_text[] = { "AMIC", "DMIC" };
221static const char *const rx_mix2_text[] = { "ZERO", "IIR1", "IIR2" }; 223static const char *const rx_mix2_text[] = { "ZERO", "IIR1", "IIR2" };
222static const char *const adc2_mux_text[] = { "ZERO", "INP2", "INP3" }; 224static const char *const adc2_mux_text[] = { "ZERO", "INP2", "INP3" };
223 225
@@ -256,11 +258,21 @@ static const struct soc_enum dec1_mux_enum = SOC_ENUM_SINGLE(
256static const struct soc_enum dec2_mux_enum = SOC_ENUM_SINGLE( 258static const struct soc_enum dec2_mux_enum = SOC_ENUM_SINGLE(
257 LPASS_CDC_CONN_TX_B1_CTL, 3, 6, dec_mux_text); 259 LPASS_CDC_CONN_TX_B1_CTL, 3, 6, dec_mux_text);
258 260
261/* CIC */
262static const struct soc_enum cic1_mux_enum = SOC_ENUM_SINGLE(
263 LPASS_CDC_TX1_MUX_CTL, 0, 2, cic_mux_text);
264static const struct soc_enum cic2_mux_enum = SOC_ENUM_SINGLE(
265 LPASS_CDC_TX2_MUX_CTL, 0, 2, cic_mux_text);
266
259/* RDAC2 MUX */ 267/* RDAC2 MUX */
260static const struct snd_kcontrol_new dec1_mux = SOC_DAPM_ENUM( 268static const struct snd_kcontrol_new dec1_mux = SOC_DAPM_ENUM(
261 "DEC1 MUX Mux", dec1_mux_enum); 269 "DEC1 MUX Mux", dec1_mux_enum);
262static const struct snd_kcontrol_new dec2_mux = SOC_DAPM_ENUM( 270static const struct snd_kcontrol_new dec2_mux = SOC_DAPM_ENUM(
263 "DEC2 MUX Mux", dec2_mux_enum); 271 "DEC2 MUX Mux", dec2_mux_enum);
272static const struct snd_kcontrol_new cic1_mux = SOC_DAPM_ENUM(
273 "CIC1 MUX Mux", cic1_mux_enum);
274static const struct snd_kcontrol_new cic2_mux = SOC_DAPM_ENUM(
275 "CIC2 MUX Mux", cic2_mux_enum);
264static const struct snd_kcontrol_new rx_mix1_inp1_mux = SOC_DAPM_ENUM( 276static const struct snd_kcontrol_new rx_mix1_inp1_mux = SOC_DAPM_ENUM(
265 "RX1 MIX1 INP1 Mux", rx_mix1_inp_enum[0]); 277 "RX1 MIX1 INP1 Mux", rx_mix1_inp_enum[0]);
266static const struct snd_kcontrol_new rx_mix1_inp2_mux = SOC_DAPM_ENUM( 278static const struct snd_kcontrol_new rx_mix1_inp2_mux = SOC_DAPM_ENUM(
@@ -500,6 +512,8 @@ static const struct snd_soc_dapm_widget msm8916_wcd_digital_dapm_widgets[] = {
500 SND_SOC_DAPM_MUX("RX3 MIX1 INP3", SND_SOC_NOPM, 0, 0, 512 SND_SOC_DAPM_MUX("RX3 MIX1 INP3", SND_SOC_NOPM, 0, 0,
501 &rx3_mix1_inp3_mux), 513 &rx3_mix1_inp3_mux),
502 514
515 SND_SOC_DAPM_MUX("CIC1 MUX", SND_SOC_NOPM, 0, 0, &cic1_mux),
516 SND_SOC_DAPM_MUX("CIC2 MUX", SND_SOC_NOPM, 0, 0, &cic2_mux),
503 /* TX */ 517 /* TX */
504 SND_SOC_DAPM_MIXER("ADC1", SND_SOC_NOPM, 0, 0, NULL, 0), 518 SND_SOC_DAPM_MIXER("ADC1", SND_SOC_NOPM, 0, 0, NULL, 0),
505 SND_SOC_DAPM_MIXER("ADC2", SND_SOC_NOPM, 0, 0, NULL, 0), 519 SND_SOC_DAPM_MIXER("ADC2", SND_SOC_NOPM, 0, 0, NULL, 0),
@@ -536,6 +550,8 @@ static const struct snd_soc_dapm_widget msm8916_wcd_digital_dapm_widgets[] = {
536 /* Connectivity Clock */ 550 /* Connectivity Clock */
537 SND_SOC_DAPM_SUPPLY_S("CDC_CONN", -2, LPASS_CDC_CLK_OTHR_CTL, 2, 0, 551 SND_SOC_DAPM_SUPPLY_S("CDC_CONN", -2, LPASS_CDC_CLK_OTHR_CTL, 2, 0,
538 NULL, 0), 552 NULL, 0),
553 SND_SOC_DAPM_MIC("Digital Mic1", NULL),
554 SND_SOC_DAPM_MIC("Digital Mic2", NULL),
539 555
540}; 556};
541 557
@@ -568,6 +584,15 @@ static int msm8916_wcd_digital_codec_probe(struct snd_soc_codec *codec)
568 return 0; 584 return 0;
569} 585}
570 586
587static int msm8916_wcd_digital_codec_set_sysclk(struct snd_soc_codec *codec,
588 int clk_id, int source,
589 unsigned int freq, int dir)
590{
591 struct msm8916_wcd_digital_priv *p = dev_get_drvdata(codec->dev);
592
593 return clk_set_rate(p->mclk, freq);
594}
595
571static int msm8916_wcd_digital_hw_params(struct snd_pcm_substream *substream, 596static int msm8916_wcd_digital_hw_params(struct snd_pcm_substream *substream,
572 struct snd_pcm_hw_params *params, 597 struct snd_pcm_hw_params *params,
573 struct snd_soc_dai *dai) 598 struct snd_soc_dai *dai)
@@ -646,6 +671,11 @@ static const struct snd_soc_dapm_route msm8916_wcd_digital_audio_map[] = {
646 {"AIF1 Capture", NULL, "I2S TX2"}, 671 {"AIF1 Capture", NULL, "I2S TX2"},
647 {"AIF1 Capture", NULL, "I2S TX3"}, 672 {"AIF1 Capture", NULL, "I2S TX3"},
648 673
674 {"CIC1 MUX", "DMIC", "DEC1 MUX"},
675 {"CIC1 MUX", "AMIC", "DEC1 MUX"},
676 {"CIC2 MUX", "DMIC", "DEC2 MUX"},
677 {"CIC2 MUX", "AMIC", "DEC2 MUX"},
678
649 /* Decimator Inputs */ 679 /* Decimator Inputs */
650 {"DEC1 MUX", "DMIC1", "DMIC1"}, 680 {"DEC1 MUX", "DMIC1", "DMIC1"},
651 {"DEC1 MUX", "DMIC2", "DMIC2"}, 681 {"DEC1 MUX", "DMIC2", "DMIC2"},
@@ -664,8 +694,8 @@ static const struct snd_soc_dapm_route msm8916_wcd_digital_audio_map[] = {
664 {"DMIC1", NULL, "DMIC_CLK"}, 694 {"DMIC1", NULL, "DMIC_CLK"},
665 {"DMIC2", NULL, "DMIC_CLK"}, 695 {"DMIC2", NULL, "DMIC_CLK"},
666 696
667 {"I2S TX1", NULL, "DEC1 MUX"}, 697 {"I2S TX1", NULL, "CIC1 MUX"},
668 {"I2S TX2", NULL, "DEC2 MUX"}, 698 {"I2S TX2", NULL, "CIC2 MUX"},
669 699
670 {"I2S TX1", NULL, "TX_I2S_CLK"}, 700 {"I2S TX1", NULL, "TX_I2S_CLK"},
671 {"I2S TX2", NULL, "TX_I2S_CLK"}, 701 {"I2S TX2", NULL, "TX_I2S_CLK"},
@@ -788,7 +818,7 @@ static void msm8916_wcd_digital_shutdown(struct snd_pcm_substream *substream,
788 LPASS_CDC_CLK_PDM_CTL_PDM_CLK_SEL_MASK, 0); 818 LPASS_CDC_CLK_PDM_CTL_PDM_CLK_SEL_MASK, 0);
789} 819}
790 820
791static struct snd_soc_dai_ops msm8916_wcd_digital_dai_ops = { 821static const struct snd_soc_dai_ops msm8916_wcd_digital_dai_ops = {
792 .startup = msm8916_wcd_digital_startup, 822 .startup = msm8916_wcd_digital_startup,
793 .shutdown = msm8916_wcd_digital_shutdown, 823 .shutdown = msm8916_wcd_digital_shutdown,
794 .hw_params = msm8916_wcd_digital_hw_params, 824 .hw_params = msm8916_wcd_digital_hw_params,
@@ -821,8 +851,9 @@ static struct snd_soc_dai_driver msm8916_wcd_digital_dai[] = {
821 }, 851 },
822}; 852};
823 853
824static struct snd_soc_codec_driver msm8916_wcd_digital = { 854static const struct snd_soc_codec_driver msm8916_wcd_digital = {
825 .probe = msm8916_wcd_digital_codec_probe, 855 .probe = msm8916_wcd_digital_codec_probe,
856 .set_sysclk = msm8916_wcd_digital_codec_set_sysclk,
826 .component_driver = { 857 .component_driver = {
827 .controls = msm8916_wcd_digital_snd_controls, 858 .controls = msm8916_wcd_digital_snd_controls,
828 .num_controls = ARRAY_SIZE(msm8916_wcd_digital_snd_controls), 859 .num_controls = ARRAY_SIZE(msm8916_wcd_digital_snd_controls),
diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c
index c8bcb1db966d..f9c9933acffb 100644
--- a/sound/soc/codecs/nau8540.c
+++ b/sound/soc/codecs/nau8540.c
@@ -735,7 +735,7 @@ static int __maybe_unused nau8540_resume(struct snd_soc_codec *codec)
735 return 0; 735 return 0;
736} 736}
737 737
738static struct snd_soc_codec_driver nau8540_codec_driver = { 738static const struct snd_soc_codec_driver nau8540_codec_driver = {
739 .set_sysclk = nau8540_set_sysclk, 739 .set_sysclk = nau8540_set_sysclk,
740 .set_pll = nau8540_set_pll, 740 .set_pll = nau8540_set_pll,
741 .suspend = nau8540_suspend, 741 .suspend = nau8540_suspend,
diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c
index e45518629968..c8e2451ae0a3 100644
--- a/sound/soc/codecs/nau8810.c
+++ b/sound/soc/codecs/nau8810.c
@@ -808,7 +808,7 @@ static const struct regmap_config nau8810_regmap_config = {
808 .num_reg_defaults = ARRAY_SIZE(nau8810_reg_defaults), 808 .num_reg_defaults = ARRAY_SIZE(nau8810_reg_defaults),
809}; 809};
810 810
811static struct snd_soc_codec_driver nau8810_codec_driver = { 811static const struct snd_soc_codec_driver nau8810_codec_driver = {
812 .set_bias_level = nau8810_set_bias_level, 812 .set_bias_level = nau8810_set_bias_level,
813 .suspend_bias_off = true, 813 .suspend_bias_off = true,
814 814
diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c
index 3a309b18035e..0240759f951c 100644
--- a/sound/soc/codecs/nau8824.c
+++ b/sound/soc/codecs/nau8824.c
@@ -1469,7 +1469,7 @@ static int __maybe_unused nau8824_resume(struct snd_soc_codec *codec)
1469 return 0; 1469 return 0;
1470} 1470}
1471 1471
1472static struct snd_soc_codec_driver nau8824_codec_driver = { 1472static const struct snd_soc_codec_driver nau8824_codec_driver = {
1473 .probe = nau8824_codec_probe, 1473 .probe = nau8824_codec_probe,
1474 .set_sysclk = nau8824_set_sysclk, 1474 .set_sysclk = nau8824_set_sysclk,
1475 .set_pll = nau8824_set_pll, 1475 .set_pll = nau8824_set_pll,
diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c
index 46a30eaa7ace..714ce17da717 100644
--- a/sound/soc/codecs/nau8825.c
+++ b/sound/soc/codecs/nau8825.c
@@ -260,11 +260,11 @@ static int nau8825_sema_acquire(struct nau8825 *nau8825, long timeout)
260 if (timeout) { 260 if (timeout) {
261 ret = down_timeout(&nau8825->xtalk_sem, timeout); 261 ret = down_timeout(&nau8825->xtalk_sem, timeout);
262 if (ret < 0) 262 if (ret < 0)
263 dev_warn(nau8825->dev, "Acquire semaphone timeout\n"); 263 dev_warn(nau8825->dev, "Acquire semaphore timeout\n");
264 } else { 264 } else {
265 ret = down_interruptible(&nau8825->xtalk_sem); 265 ret = down_interruptible(&nau8825->xtalk_sem);
266 if (ret < 0) 266 if (ret < 0)
267 dev_warn(nau8825->dev, "Acquire semaphone fail\n"); 267 dev_warn(nau8825->dev, "Acquire semaphore fail\n");
268 } 268 }
269 269
270 return ret; 270 return ret;
@@ -1299,7 +1299,7 @@ static int nau8825_hw_params(struct snd_pcm_substream *substream,
1299 regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL1, 1299 regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL1,
1300 NAU8825_I2S_DL_MASK, val_len); 1300 NAU8825_I2S_DL_MASK, val_len);
1301 1301
1302 /* Release the semaphone. */ 1302 /* Release the semaphore. */
1303 nau8825_sema_release(nau8825); 1303 nau8825_sema_release(nau8825);
1304 1304
1305 return 0; 1305 return 0;
@@ -1361,7 +1361,7 @@ static int nau8825_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
1361 regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2, 1361 regmap_update_bits(nau8825->regmap, NAU8825_REG_I2S_PCM_CTRL2,
1362 NAU8825_I2S_MS_MASK, ctrl2_val); 1362 NAU8825_I2S_MS_MASK, ctrl2_val);
1363 1363
1364 /* Release the semaphone. */ 1364 /* Release the semaphore. */
1365 nau8825_sema_release(nau8825); 1365 nau8825_sema_release(nau8825);
1366 1366
1367 return 0; 1367 return 0;
@@ -2140,7 +2140,7 @@ static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id,
2140 2140
2141 break; 2141 break;
2142 case NAU8825_CLK_MCLK: 2142 case NAU8825_CLK_MCLK:
2143 /* Acquire the semaphone to synchronize the playback and 2143 /* Acquire the semaphore to synchronize the playback and
2144 * interrupt handler. In order to avoid the playback inter- 2144 * interrupt handler. In order to avoid the playback inter-
2145 * fered by cross talk process, the driver make the playback 2145 * fered by cross talk process, the driver make the playback
2146 * preparation halted until cross talk process finish. 2146 * preparation halted until cross talk process finish.
@@ -2150,7 +2150,7 @@ static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id,
2150 /* MCLK not changed by clock tree */ 2150 /* MCLK not changed by clock tree */
2151 regmap_update_bits(regmap, NAU8825_REG_CLK_DIVIDER, 2151 regmap_update_bits(regmap, NAU8825_REG_CLK_DIVIDER,
2152 NAU8825_CLK_MCLK_SRC_MASK, 0); 2152 NAU8825_CLK_MCLK_SRC_MASK, 0);
2153 /* Release the semaphone. */ 2153 /* Release the semaphore. */
2154 nau8825_sema_release(nau8825); 2154 nau8825_sema_release(nau8825);
2155 2155
2156 ret = nau8825_mclk_prepare(nau8825, freq); 2156 ret = nau8825_mclk_prepare(nau8825, freq);
@@ -2188,7 +2188,7 @@ static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id,
2188 2188
2189 break; 2189 break;
2190 case NAU8825_CLK_FLL_MCLK: 2190 case NAU8825_CLK_FLL_MCLK:
2191 /* Acquire the semaphone to synchronize the playback and 2191 /* Acquire the semaphore to synchronize the playback and
2192 * interrupt handler. In order to avoid the playback inter- 2192 * interrupt handler. In order to avoid the playback inter-
2193 * fered by cross talk process, the driver make the playback 2193 * fered by cross talk process, the driver make the playback
2194 * preparation halted until cross talk process finish. 2194 * preparation halted until cross talk process finish.
@@ -2201,7 +2201,7 @@ static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id,
2201 regmap_update_bits(regmap, NAU8825_REG_FLL3, 2201 regmap_update_bits(regmap, NAU8825_REG_FLL3,
2202 NAU8825_FLL_CLK_SRC_MASK | NAU8825_GAIN_ERR_MASK, 2202 NAU8825_FLL_CLK_SRC_MASK | NAU8825_GAIN_ERR_MASK,
2203 NAU8825_FLL_CLK_SRC_MCLK | 0); 2203 NAU8825_FLL_CLK_SRC_MCLK | 0);
2204 /* Release the semaphone. */ 2204 /* Release the semaphore. */
2205 nau8825_sema_release(nau8825); 2205 nau8825_sema_release(nau8825);
2206 2206
2207 ret = nau8825_mclk_prepare(nau8825, freq); 2207 ret = nau8825_mclk_prepare(nau8825, freq);
@@ -2210,7 +2210,7 @@ static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id,
2210 2210
2211 break; 2211 break;
2212 case NAU8825_CLK_FLL_BLK: 2212 case NAU8825_CLK_FLL_BLK:
2213 /* Acquire the semaphone to synchronize the playback and 2213 /* Acquire the semaphore to synchronize the playback and
2214 * interrupt handler. In order to avoid the playback inter- 2214 * interrupt handler. In order to avoid the playback inter-
2215 * fered by cross talk process, the driver make the playback 2215 * fered by cross talk process, the driver make the playback
2216 * preparation halted until cross talk process finish. 2216 * preparation halted until cross talk process finish.
@@ -2226,7 +2226,7 @@ static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id,
2226 NAU8825_FLL_CLK_SRC_MASK | NAU8825_GAIN_ERR_MASK, 2226 NAU8825_FLL_CLK_SRC_MASK | NAU8825_GAIN_ERR_MASK,
2227 NAU8825_FLL_CLK_SRC_BLK | 2227 NAU8825_FLL_CLK_SRC_BLK |
2228 (0xf << NAU8825_GAIN_ERR_SFT)); 2228 (0xf << NAU8825_GAIN_ERR_SFT));
2229 /* Release the semaphone. */ 2229 /* Release the semaphore. */
2230 nau8825_sema_release(nau8825); 2230 nau8825_sema_release(nau8825);
2231 2231
2232 if (nau8825->mclk_freq) { 2232 if (nau8825->mclk_freq) {
@@ -2236,7 +2236,7 @@ static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id,
2236 2236
2237 break; 2237 break;
2238 case NAU8825_CLK_FLL_FS: 2238 case NAU8825_CLK_FLL_FS:
2239 /* Acquire the semaphone to synchronize the playback and 2239 /* Acquire the semaphore to synchronize the playback and
2240 * interrupt handler. In order to avoid the playback inter- 2240 * interrupt handler. In order to avoid the playback inter-
2241 * fered by cross talk process, the driver make the playback 2241 * fered by cross talk process, the driver make the playback
2242 * preparation halted until cross talk process finish. 2242 * preparation halted until cross talk process finish.
@@ -2252,7 +2252,7 @@ static int nau8825_configure_sysclk(struct nau8825 *nau8825, int clk_id,
2252 NAU8825_FLL_CLK_SRC_MASK | NAU8825_GAIN_ERR_MASK, 2252 NAU8825_FLL_CLK_SRC_MASK | NAU8825_GAIN_ERR_MASK,
2253 NAU8825_FLL_CLK_SRC_FS | 2253 NAU8825_FLL_CLK_SRC_FS |
2254 (0xf << NAU8825_GAIN_ERR_SFT)); 2254 (0xf << NAU8825_GAIN_ERR_SFT));
2255 /* Release the semaphone. */ 2255 /* Release the semaphore. */
2256 nau8825_sema_release(nau8825); 2256 nau8825_sema_release(nau8825);
2257 2257
2258 if (nau8825->mclk_freq) { 2258 if (nau8825->mclk_freq) {
@@ -2388,7 +2388,7 @@ static int __maybe_unused nau8825_resume(struct snd_soc_codec *codec)
2388 return 0; 2388 return 0;
2389} 2389}
2390 2390
2391static struct snd_soc_codec_driver nau8825_codec_driver = { 2391static const struct snd_soc_codec_driver nau8825_codec_driver = {
2392 .probe = nau8825_codec_probe, 2392 .probe = nau8825_codec_probe,
2393 .remove = nau8825_codec_remove, 2393 .remove = nau8825_codec_remove,
2394 .set_sysclk = nau8825_set_sysclk, 2394 .set_sysclk = nau8825_set_sysclk,
@@ -2563,7 +2563,7 @@ static int nau8825_i2c_probe(struct i2c_client *i2c,
2563 return PTR_ERR(nau8825->regmap); 2563 return PTR_ERR(nau8825->regmap);
2564 nau8825->dev = dev; 2564 nau8825->dev = dev;
2565 nau8825->irq = i2c->irq; 2565 nau8825->irq = i2c->irq;
2566 /* Initiate parameters, semaphone and work queue which are needed in 2566 /* Initiate parameters, semaphore and work queue which are needed in
2567 * cross talk suppression measurment function. 2567 * cross talk suppression measurment function.
2568 */ 2568 */
2569 nau8825->xtalk_state = NAU8825_XTALK_DONE; 2569 nau8825->xtalk_state = NAU8825_XTALK_DONE;
diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
index 0b14efab6280..c7e28dd2e815 100644
--- a/sound/soc/codecs/pcm1681.c
+++ b/sound/soc/codecs/pcm1681.c
@@ -288,7 +288,7 @@ static const struct regmap_config pcm1681_regmap = {
288 .readable_reg = pcm1681_accessible_reg, 288 .readable_reg = pcm1681_accessible_reg,
289}; 289};
290 290
291static struct snd_soc_codec_driver soc_codec_dev_pcm1681 = { 291static const struct snd_soc_codec_driver soc_codec_dev_pcm1681 = {
292 .component_driver = { 292 .component_driver = {
293 .controls = pcm1681_controls, 293 .controls = pcm1681_controls,
294 .num_controls = ARRAY_SIZE(pcm1681_controls), 294 .num_controls = ARRAY_SIZE(pcm1681_controls),
diff --git a/sound/soc/codecs/pcm179x.c b/sound/soc/codecs/pcm179x.c
index b813a154ddd9..82a3d9db32cb 100644
--- a/sound/soc/codecs/pcm179x.c
+++ b/sound/soc/codecs/pcm179x.c
@@ -205,7 +205,7 @@ const struct regmap_config pcm179x_regmap_config = {
205}; 205};
206EXPORT_SYMBOL_GPL(pcm179x_regmap_config); 206EXPORT_SYMBOL_GPL(pcm179x_regmap_config);
207 207
208static struct snd_soc_codec_driver soc_codec_dev_pcm179x = { 208static const struct snd_soc_codec_driver soc_codec_dev_pcm179x = {
209 .component_driver = { 209 .component_driver = {
210 .controls = pcm179x_controls, 210 .controls = pcm179x_controls,
211 .num_controls = ARRAY_SIZE(pcm179x_controls), 211 .num_controls = ARRAY_SIZE(pcm179x_controls),
diff --git a/sound/soc/codecs/pcm3008.c b/sound/soc/codecs/pcm3008.c
index 708af05486f6..e59d8ffb93bd 100644
--- a/sound/soc/codecs/pcm3008.c
+++ b/sound/soc/codecs/pcm3008.c
@@ -98,7 +98,7 @@ static struct snd_soc_dai_driver pcm3008_dai = {
98 }, 98 },
99}; 99};
100 100
101static struct snd_soc_codec_driver soc_codec_dev_pcm3008 = { 101static const struct snd_soc_codec_driver soc_codec_dev_pcm3008 = {
102 .component_driver = { 102 .component_driver = {
103 .dapm_widgets = pcm3008_dapm_widgets, 103 .dapm_widgets = pcm3008_dapm_widgets,
104 .num_dapm_widgets = ARRAY_SIZE(pcm3008_dapm_widgets), 104 .num_dapm_widgets = ARRAY_SIZE(pcm3008_dapm_widgets),
diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c
index 72b19e62f626..f1005a31c709 100644
--- a/sound/soc/codecs/pcm512x.c
+++ b/sound/soc/codecs/pcm512x.c
@@ -1344,7 +1344,7 @@ static struct snd_soc_dai_driver pcm512x_dai = {
1344 .ops = &pcm512x_dai_ops, 1344 .ops = &pcm512x_dai_ops,
1345}; 1345};
1346 1346
1347static struct snd_soc_codec_driver pcm512x_codec_driver = { 1347static const struct snd_soc_codec_driver pcm512x_codec_driver = {
1348 .set_bias_level = pcm512x_set_bias_level, 1348 .set_bias_level = pcm512x_set_bias_level,
1349 .idle_bias_off = true, 1349 .idle_bias_off = true,
1350 1350
diff --git a/sound/soc/codecs/rt274.c b/sound/soc/codecs/rt274.c
new file mode 100644
index 000000000000..8f92e5c4dd9d
--- /dev/null
+++ b/sound/soc/codecs/rt274.c
@@ -0,0 +1,1229 @@
1/*
2 * rt274.c -- RT274 ALSA SoC audio codec driver
3 *
4 * Copyright 2017 Realtek Semiconductor Corp.
5 * Author: Bard Liao <bardliao@realtek.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include <linux/module.h>
13#include <linux/moduleparam.h>
14#include <linux/init.h>
15#include <linux/delay.h>
16#include <linux/pm.h>
17#include <linux/i2c.h>
18#include <linux/platform_device.h>
19#include <linux/spi/spi.h>
20#include <linux/dmi.h>
21#include <linux/acpi.h>
22#include <sound/core.h>
23#include <sound/pcm.h>
24#include <sound/pcm_params.h>
25#include <sound/soc.h>
26#include <sound/soc-dapm.h>
27#include <sound/initval.h>
28#include <sound/tlv.h>
29#include <sound/jack.h>
30#include <linux/workqueue.h>
31
32#include "rl6347a.h"
33#include "rt274.h"
34
35#define RT274_VENDOR_ID 0x10ec0274
36
37struct rt274_priv {
38 struct reg_default *index_cache;
39 int index_cache_size;
40 struct regmap *regmap;
41 struct snd_soc_codec *codec;
42 struct i2c_client *i2c;
43 struct snd_soc_jack *jack;
44 struct delayed_work jack_detect_work;
45 int sys_clk;
46 int clk_id;
47 int fs;
48 bool master;
49};
50
51static const struct reg_default rt274_index_def[] = {
52 { 0x00, 0x1004 },
53 { 0x01, 0xaaaa },
54 { 0x02, 0x88aa },
55 { 0x03, 0x0002 },
56 { 0x04, 0xaa09 },
57 { 0x05, 0x0700 },
58 { 0x06, 0x6110 },
59 { 0x07, 0x0200 },
60 { 0x08, 0xa807 },
61 { 0x09, 0x0021 },
62 { 0x0a, 0x7770 },
63 { 0x0b, 0x7770 },
64 { 0x0c, 0x002b },
65 { 0x0d, 0x2420 },
66 { 0x0e, 0x65c0 },
67 { 0x0f, 0x7770 },
68 { 0x10, 0x0420 },
69 { 0x11, 0x7418 },
70 { 0x12, 0x6bd0 },
71 { 0x13, 0x645f },
72 { 0x14, 0x0400 },
73 { 0x15, 0x8ccc },
74 { 0x16, 0x4c50 },
75 { 0x17, 0xff00 },
76 { 0x18, 0x0003 },
77 { 0x19, 0x2c11 },
78 { 0x1a, 0x830b },
79 { 0x1b, 0x4e4b },
80 { 0x1c, 0x0000 },
81 { 0x1d, 0x0000 },
82 { 0x1e, 0x0000 },
83 { 0x1f, 0x0000 },
84 { 0x20, 0x51ff },
85 { 0x21, 0x8000 },
86 { 0x22, 0x8f00 },
87 { 0x23, 0x88f4 },
88 { 0x24, 0x0000 },
89 { 0x25, 0x0000 },
90 { 0x26, 0x0000 },
91 { 0x27, 0x0000 },
92 { 0x28, 0x0000 },
93 { 0x29, 0x3000 },
94 { 0x2a, 0x0000 },
95 { 0x2b, 0x0000 },
96 { 0x2c, 0x0f00 },
97 { 0x2d, 0x100f },
98 { 0x2e, 0x2902 },
99 { 0x2f, 0xe280 },
100 { 0x30, 0x1000 },
101 { 0x31, 0x8400 },
102 { 0x32, 0x5aaa },
103 { 0x33, 0x8420 },
104 { 0x34, 0xa20c },
105 { 0x35, 0x096a },
106 { 0x36, 0x5757 },
107 { 0x37, 0xfe05 },
108 { 0x38, 0x4901 },
109 { 0x39, 0x110a },
110 { 0x3a, 0x0010 },
111 { 0x3b, 0x60d9 },
112 { 0x3c, 0xf214 },
113 { 0x3d, 0xc2ba },
114 { 0x3e, 0xa928 },
115 { 0x3f, 0x0000 },
116 { 0x40, 0x9800 },
117 { 0x41, 0x0000 },
118 { 0x42, 0x2000 },
119 { 0x43, 0x3d90 },
120 { 0x44, 0x4900 },
121 { 0x45, 0x5289 },
122 { 0x46, 0x0004 },
123 { 0x47, 0xa47a },
124 { 0x48, 0xd049 },
125 { 0x49, 0x0049 },
126 { 0x4a, 0xa83b },
127 { 0x4b, 0x0777 },
128 { 0x4c, 0x065c },
129 { 0x4d, 0x7fff },
130 { 0x4e, 0x7fff },
131 { 0x4f, 0x0000 },
132 { 0x50, 0x0000 },
133 { 0x51, 0x0000 },
134 { 0x52, 0xbf5f },
135 { 0x53, 0x3320 },
136 { 0x54, 0xcc00 },
137 { 0x55, 0x0000 },
138 { 0x56, 0x3f00 },
139 { 0x57, 0x0000 },
140 { 0x58, 0x0000 },
141 { 0x59, 0x0000 },
142 { 0x5a, 0x1300 },
143 { 0x5b, 0x005f },
144 { 0x5c, 0x0000 },
145 { 0x5d, 0x1001 },
146 { 0x5e, 0x1000 },
147 { 0x5f, 0x0000 },
148 { 0x60, 0x5554 },
149 { 0x61, 0xffc0 },
150 { 0x62, 0xa000 },
151 { 0x63, 0xd010 },
152 { 0x64, 0x0000 },
153 { 0x65, 0x3fb1 },
154 { 0x66, 0x1881 },
155 { 0x67, 0xc810 },
156 { 0x68, 0x2000 },
157 { 0x69, 0xfff0 },
158 { 0x6a, 0x0300 },
159 { 0x6b, 0x5060 },
160 { 0x6c, 0x0000 },
161 { 0x6d, 0x0000 },
162 { 0x6e, 0x0c25 },
163 { 0x6f, 0x0c0b },
164 { 0x70, 0x8000 },
165 { 0x71, 0x4008 },
166 { 0x72, 0x0000 },
167 { 0x73, 0x0800 },
168 { 0x74, 0xa28f },
169 { 0x75, 0xa050 },
170 { 0x76, 0x7fe8 },
171 { 0x77, 0xdb8c },
172 { 0x78, 0x0000 },
173 { 0x79, 0x0000 },
174 { 0x7a, 0x2a96 },
175 { 0x7b, 0x800f },
176 { 0x7c, 0x0200 },
177 { 0x7d, 0x1600 },
178 { 0x7e, 0x0000 },
179 { 0x7f, 0x0000 },
180};
181#define INDEX_CACHE_SIZE ARRAY_SIZE(rt274_index_def)
182
183static const struct reg_default rt274_reg[] = {
184 { 0x00170500, 0x00000400 },
185 { 0x00220000, 0x00000031 },
186 { 0x00239000, 0x00000057 },
187 { 0x0023a000, 0x00000057 },
188 { 0x00270500, 0x00000400 },
189 { 0x00370500, 0x00000400 },
190 { 0x00870500, 0x00000400 },
191 { 0x00920000, 0x00000031 },
192 { 0x00935000, 0x00000097 },
193 { 0x00936000, 0x00000097 },
194 { 0x00970500, 0x00000400 },
195 { 0x00b37000, 0x00000400 },
196 { 0x00b37200, 0x00000400 },
197 { 0x00b37300, 0x00000400 },
198 { 0x00c37000, 0x00000400 },
199 { 0x00c37100, 0x00000400 },
200 { 0x01270500, 0x00000400 },
201 { 0x01370500, 0x00000400 },
202 { 0x01371f00, 0x411111f0 },
203 { 0x01937000, 0x00000000 },
204 { 0x01970500, 0x00000400 },
205 { 0x02050000, 0x0000001b },
206 { 0x02139000, 0x00000080 },
207 { 0x0213a000, 0x00000080 },
208 { 0x02170100, 0x00000001 },
209 { 0x02170500, 0x00000400 },
210 { 0x02170700, 0x00000000 },
211 { 0x02270100, 0x00000000 },
212 { 0x02370100, 0x00000000 },
213 { 0x01970700, 0x00000020 },
214 { 0x00830000, 0x00000097 },
215 { 0x00930000, 0x00000097 },
216 { 0x01270700, 0x00000000 },
217};
218
219static bool rt274_volatile_register(struct device *dev, unsigned int reg)
220{
221 switch (reg) {
222 case 0 ... 0xff:
223 case RT274_GET_PARAM(AC_NODE_ROOT, AC_PAR_VENDOR_ID):
224 case RT274_GET_HP_SENSE:
225 case RT274_GET_MIC_SENSE:
226 case RT274_PROC_COEF:
227 case VERB_CMD(AC_VERB_GET_EAPD_BTLENABLE, RT274_MIC, 0):
228 case VERB_CMD(AC_VERB_GET_EAPD_BTLENABLE, RT274_HP_OUT, 0):
229 case VERB_CMD(AC_VERB_GET_STREAM_FORMAT, RT274_DAC_OUT0, 0):
230 case VERB_CMD(AC_VERB_GET_STREAM_FORMAT, RT274_DAC_OUT1, 0):
231 case VERB_CMD(AC_VERB_GET_STREAM_FORMAT, RT274_ADC_IN1, 0):
232 case VERB_CMD(AC_VERB_GET_STREAM_FORMAT, RT274_ADC_IN2, 0):
233 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_DAC_OUT0, 0):
234 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_DAC_OUT1, 0):
235 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_ADC_IN1, 0):
236 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_ADC_IN2, 0):
237 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_DMIC1, 0):
238 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_DMIC2, 0):
239 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_MIC, 0):
240 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_LINE1, 0):
241 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_LINE2, 0):
242 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_HP_OUT, 0):
243 case VERB_CMD(AC_VERB_GET_CONNECT_SEL, RT274_HP_OUT, 0):
244 case VERB_CMD(AC_VERB_GET_CONNECT_SEL, RT274_MIXER_IN1, 0):
245 case VERB_CMD(AC_VERB_GET_CONNECT_SEL, RT274_MIXER_IN2, 0):
246 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_DMIC1, 0):
247 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_DMIC2, 0):
248 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_MIC, 0):
249 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_LINE1, 0):
250 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_LINE2, 0):
251 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_HP_OUT, 0):
252 case VERB_CMD(AC_VERB_GET_UNSOLICITED_RESPONSE, RT274_HP_OUT, 0):
253 case VERB_CMD(AC_VERB_GET_UNSOLICITED_RESPONSE, RT274_MIC, 0):
254 case VERB_CMD(AC_VERB_GET_UNSOLICITED_RESPONSE, RT274_INLINE_CMD, 0):
255 return true;
256 default:
257 return false;
258 }
259
260
261}
262
263static bool rt274_readable_register(struct device *dev, unsigned int reg)
264{
265 switch (reg) {
266 case 0 ... 0xff:
267 case RT274_GET_PARAM(AC_NODE_ROOT, AC_PAR_VENDOR_ID):
268 case RT274_GET_HP_SENSE:
269 case RT274_GET_MIC_SENSE:
270 case RT274_SET_AUDIO_POWER:
271 case RT274_SET_HPO_POWER:
272 case RT274_SET_DMIC1_POWER:
273 case RT274_LOUT_MUX:
274 case RT274_HPO_MUX:
275 case RT274_ADC0_MUX:
276 case RT274_ADC1_MUX:
277 case RT274_SET_MIC:
278 case RT274_SET_PIN_HPO:
279 case RT274_SET_PIN_LOUT3:
280 case RT274_SET_PIN_DMIC1:
281 case RT274_SET_AMP_GAIN_HPO:
282 case RT274_SET_DMIC2_DEFAULT:
283 case RT274_DAC0L_GAIN:
284 case RT274_DAC0R_GAIN:
285 case RT274_DAC1L_GAIN:
286 case RT274_DAC1R_GAIN:
287 case RT274_ADCL_GAIN:
288 case RT274_ADCR_GAIN:
289 case RT274_MIC_GAIN:
290 case RT274_HPOL_GAIN:
291 case RT274_HPOR_GAIN:
292 case RT274_LOUTL_GAIN:
293 case RT274_LOUTR_GAIN:
294 case RT274_DAC_FORMAT:
295 case RT274_ADC_FORMAT:
296 case RT274_COEF_INDEX:
297 case RT274_PROC_COEF:
298 case RT274_SET_AMP_GAIN_ADC_IN1:
299 case RT274_SET_AMP_GAIN_ADC_IN2:
300 case RT274_SET_POWER(RT274_DAC_OUT0):
301 case RT274_SET_POWER(RT274_DAC_OUT1):
302 case RT274_SET_POWER(RT274_ADC_IN1):
303 case RT274_SET_POWER(RT274_ADC_IN2):
304 case RT274_SET_POWER(RT274_DMIC2):
305 case RT274_SET_POWER(RT274_MIC):
306 case VERB_CMD(AC_VERB_GET_EAPD_BTLENABLE, RT274_MIC, 0):
307 case VERB_CMD(AC_VERB_GET_EAPD_BTLENABLE, RT274_HP_OUT, 0):
308 case VERB_CMD(AC_VERB_GET_STREAM_FORMAT, RT274_DAC_OUT0, 0):
309 case VERB_CMD(AC_VERB_GET_STREAM_FORMAT, RT274_DAC_OUT1, 0):
310 case VERB_CMD(AC_VERB_GET_STREAM_FORMAT, RT274_ADC_IN1, 0):
311 case VERB_CMD(AC_VERB_GET_STREAM_FORMAT, RT274_ADC_IN2, 0):
312 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_DAC_OUT0, 0):
313 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_DAC_OUT1, 0):
314 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_ADC_IN1, 0):
315 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_ADC_IN2, 0):
316 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_DMIC1, 0):
317 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_DMIC2, 0):
318 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_MIC, 0):
319 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_LINE1, 0):
320 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_LINE2, 0):
321 case VERB_CMD(AC_VERB_GET_AMP_GAIN_MUTE, RT274_HP_OUT, 0):
322 case VERB_CMD(AC_VERB_GET_CONNECT_SEL, RT274_HP_OUT, 0):
323 case VERB_CMD(AC_VERB_GET_CONNECT_SEL, RT274_MIXER_IN1, 0):
324 case VERB_CMD(AC_VERB_GET_CONNECT_SEL, RT274_MIXER_IN2, 0):
325 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_DMIC1, 0):
326 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_DMIC2, 0):
327 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_MIC, 0):
328 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_LINE1, 0):
329 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_LINE2, 0):
330 case VERB_CMD(AC_VERB_GET_PIN_WIDGET_CONTROL, RT274_HP_OUT, 0):
331 case VERB_CMD(AC_VERB_GET_UNSOLICITED_RESPONSE, RT274_HP_OUT, 0):
332 case VERB_CMD(AC_VERB_GET_UNSOLICITED_RESPONSE, RT274_MIC, 0):
333 case VERB_CMD(AC_VERB_GET_UNSOLICITED_RESPONSE, RT274_INLINE_CMD, 0):
334 return true;
335 default:
336 return false;
337 }
338}
339
340#ifdef CONFIG_PM
341static void rt274_index_sync(struct snd_soc_codec *codec)
342{
343 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
344 int i;
345
346 for (i = 0; i < INDEX_CACHE_SIZE; i++) {
347 snd_soc_write(codec, rt274->index_cache[i].reg,
348 rt274->index_cache[i].def);
349 }
350}
351#endif
352
353static int rt274_jack_detect(struct rt274_priv *rt274, bool *hp, bool *mic)
354{
355 unsigned int buf;
356
357 *hp = false;
358 *mic = false;
359
360 if (!rt274->codec)
361 return -EINVAL;
362
363 regmap_read(rt274->regmap, RT274_GET_HP_SENSE, &buf);
364 *hp = buf & 0x80000000;
365 regmap_read(rt274->regmap, RT274_GET_MIC_SENSE, &buf);
366 *mic = buf & 0x80000000;
367
368 pr_debug("*hp = %d *mic = %d\n", *hp, *mic);
369
370 return 0;
371}
372
373static void rt274_jack_detect_work(struct work_struct *work)
374{
375 struct rt274_priv *rt274 =
376 container_of(work, struct rt274_priv, jack_detect_work.work);
377 int status = 0;
378 bool hp = false;
379 bool mic = false;
380
381 if (rt274_jack_detect(rt274, &hp, &mic) < 0)
382 return;
383
384 if (hp == true)
385 status |= SND_JACK_HEADPHONE;
386
387 if (mic == true)
388 status |= SND_JACK_MICROPHONE;
389
390 snd_soc_jack_report(rt274->jack, status,
391 SND_JACK_MICROPHONE | SND_JACK_HEADPHONE);
392}
393
394static irqreturn_t rt274_irq(int irq, void *data);
395
396static int rt274_mic_detect(struct snd_soc_codec *codec,
397 struct snd_soc_jack *jack, void *data)
398{
399 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
400
401 if (jack == NULL) {
402 /* Disable jack detection */
403 regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL,
404 RT274_IRQ_EN, RT274_IRQ_DIS);
405
406 return 0;
407 }
408 rt274->jack = jack;
409
410 regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL,
411 RT274_IRQ_EN, RT274_IRQ_EN);
412
413 /* Send an initial report */
414 rt274_irq(0, rt274);
415
416 return 0;
417}
418
419static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -6350, 50, 0);
420static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, 0, 1000, 0);
421
422static const struct snd_kcontrol_new rt274_snd_controls[] = {
423 SOC_DOUBLE_R_TLV("DAC0 Playback Volume", RT274_DAC0L_GAIN,
424 RT274_DAC0R_GAIN, 0, 0x7f, 0, out_vol_tlv),
425 SOC_DOUBLE_R_TLV("DAC1 Playback Volume", RT274_DAC1L_GAIN,
426 RT274_DAC1R_GAIN, 0, 0x7f, 0, out_vol_tlv),
427 SOC_DOUBLE_R_TLV("ADC0 Capture Volume", RT274_ADCL_GAIN,
428 RT274_ADCR_GAIN, 0, 0x7f, 0, out_vol_tlv),
429 SOC_DOUBLE_R("ADC0 Capture Switch", RT274_ADCL_GAIN,
430 RT274_ADCR_GAIN, RT274_MUTE_SFT, 1, 1),
431 SOC_SINGLE_TLV("AMIC Volume", RT274_MIC_GAIN,
432 0, 0x3, 0, mic_vol_tlv),
433};
434
435static const struct snd_kcontrol_new hpol_enable_control =
436 SOC_DAPM_SINGLE_AUTODISABLE("Switch", RT274_HPOL_GAIN,
437 RT274_MUTE_SFT, 1, 1);
438
439static const struct snd_kcontrol_new hpor_enable_control =
440 SOC_DAPM_SINGLE_AUTODISABLE("Switch", RT274_HPOR_GAIN,
441 RT274_MUTE_SFT, 1, 1);
442
443static const struct snd_kcontrol_new loutl_enable_control =
444 SOC_DAPM_SINGLE_AUTODISABLE("Switch", RT274_LOUTL_GAIN,
445 RT274_MUTE_SFT, 1, 1);
446
447static const struct snd_kcontrol_new loutr_enable_control =
448 SOC_DAPM_SINGLE_AUTODISABLE("Switch", RT274_LOUTR_GAIN,
449 RT274_MUTE_SFT, 1, 1);
450
451/* ADC0 source */
452static const char * const rt274_adc_src[] = {
453 "Mic", "Line1", "Line2", "Dmic"
454};
455
456static SOC_ENUM_SINGLE_DECL(
457 rt274_adc0_enum, RT274_ADC0_MUX, RT274_ADC_SEL_SFT,
458 rt274_adc_src);
459
460static const struct snd_kcontrol_new rt274_adc0_mux =
461 SOC_DAPM_ENUM("ADC 0 source", rt274_adc0_enum);
462
463static SOC_ENUM_SINGLE_DECL(
464 rt274_adc1_enum, RT274_ADC1_MUX, RT274_ADC_SEL_SFT,
465 rt274_adc_src);
466
467static const struct snd_kcontrol_new rt274_adc1_mux =
468 SOC_DAPM_ENUM("ADC 1 source", rt274_adc1_enum);
469
470static const char * const rt274_dac_src[] = {
471 "DAC OUT0", "DAC OUT1"
472};
473/* HP-OUT source */
474static SOC_ENUM_SINGLE_DECL(rt274_hpo_enum, RT274_HPO_MUX,
475 0, rt274_dac_src);
476
477static const struct snd_kcontrol_new rt274_hpo_mux =
478SOC_DAPM_ENUM("HPO source", rt274_hpo_enum);
479
480/* Line out source */
481static SOC_ENUM_SINGLE_DECL(rt274_lout_enum, RT274_LOUT_MUX,
482 0, rt274_dac_src);
483
484static const struct snd_kcontrol_new rt274_lout_mux =
485SOC_DAPM_ENUM("LOUT source", rt274_lout_enum);
486
487static const struct snd_soc_dapm_widget rt274_dapm_widgets[] = {
488 /* Input Lines */
489 SND_SOC_DAPM_INPUT("DMIC1 Pin"),
490 SND_SOC_DAPM_INPUT("DMIC2 Pin"),
491 SND_SOC_DAPM_INPUT("MIC"),
492 SND_SOC_DAPM_INPUT("LINE1"),
493 SND_SOC_DAPM_INPUT("LINE2"),
494
495 /* DMIC */
496 SND_SOC_DAPM_PGA("DMIC1", SND_SOC_NOPM, 0, 0, NULL, 0),
497 SND_SOC_DAPM_PGA("DMIC2", SND_SOC_NOPM, 0, 0, NULL, 0),
498
499 /* ADCs */
500 SND_SOC_DAPM_ADC("ADC 0", NULL, RT274_SET_STREAMID_ADC1, 4, 0),
501 SND_SOC_DAPM_ADC("ADC 1", NULL, RT274_SET_STREAMID_ADC2, 4, 0),
502
503 /* ADC Mux */
504 SND_SOC_DAPM_MUX("ADC 0 Mux", SND_SOC_NOPM, 0, 0,
505 &rt274_adc0_mux),
506 SND_SOC_DAPM_MUX("ADC 1 Mux", SND_SOC_NOPM, 0, 0,
507 &rt274_adc1_mux),
508
509 /* Audio Interface */
510 SND_SOC_DAPM_AIF_IN("AIF1RXL", "AIF1 Playback", 0, SND_SOC_NOPM, 0, 0),
511 SND_SOC_DAPM_AIF_IN("AIF1RXR", "AIF1 Playback", 1, SND_SOC_NOPM, 0, 0),
512 SND_SOC_DAPM_AIF_OUT("AIF1TXL", "AIF1 Capture", 0, SND_SOC_NOPM, 0, 0),
513 SND_SOC_DAPM_AIF_OUT("AIF1TXR", "AIF1 Capture", 1, SND_SOC_NOPM, 0, 0),
514 SND_SOC_DAPM_AIF_IN("AIF2RXL", "AIF1 Playback", 2, SND_SOC_NOPM, 0, 0),
515 SND_SOC_DAPM_AIF_IN("AIF2RXR", "AIF1 Playback", 3, SND_SOC_NOPM, 0, 0),
516 SND_SOC_DAPM_AIF_OUT("AIF2TXL", "AIF1 Capture", 2, SND_SOC_NOPM, 0, 0),
517 SND_SOC_DAPM_AIF_OUT("AIF2TXR", "AIF1 Capture", 3, SND_SOC_NOPM, 0, 0),
518
519 /* Output Side */
520 /* DACs */
521 SND_SOC_DAPM_DAC("DAC 0", NULL, RT274_SET_STREAMID_DAC0, 4, 0),
522 SND_SOC_DAPM_DAC("DAC 1", NULL, RT274_SET_STREAMID_DAC1, 4, 0),
523
524 /* Output Mux */
525 SND_SOC_DAPM_MUX("HPO Mux", SND_SOC_NOPM, 0, 0, &rt274_hpo_mux),
526 SND_SOC_DAPM_MUX("LOUT Mux", SND_SOC_NOPM, 0, 0, &rt274_lout_mux),
527
528 SND_SOC_DAPM_SUPPLY("HP Power", RT274_SET_PIN_HPO,
529 RT274_SET_PIN_SFT, 0, NULL, 0),
530 SND_SOC_DAPM_SUPPLY("LOUT Power", RT274_SET_PIN_LOUT3,
531 RT274_SET_PIN_SFT, 0, NULL, 0),
532
533 /* Output Mixer */
534 SND_SOC_DAPM_PGA("DAC OUT0", SND_SOC_NOPM, 0, 0,
535 NULL, 0),
536 SND_SOC_DAPM_PGA("DAC OUT1", SND_SOC_NOPM, 0, 0,
537 NULL, 0),
538
539 /* Output Pga */
540 SND_SOC_DAPM_SWITCH("LOUT L", SND_SOC_NOPM, 0, 0,
541 &loutl_enable_control),
542 SND_SOC_DAPM_SWITCH("LOUT R", SND_SOC_NOPM, 0, 0,
543 &loutr_enable_control),
544 SND_SOC_DAPM_SWITCH("HPO L", SND_SOC_NOPM, 0, 0,
545 &hpol_enable_control),
546 SND_SOC_DAPM_SWITCH("HPO R", SND_SOC_NOPM, 0, 0,
547 &hpor_enable_control),
548
549 /* Output Lines */
550 SND_SOC_DAPM_OUTPUT("HPO Pin"),
551 SND_SOC_DAPM_OUTPUT("SPDIF"),
552 SND_SOC_DAPM_OUTPUT("LINE3"),
553};
554
555static const struct snd_soc_dapm_route rt274_dapm_routes[] = {
556 {"DMIC1", NULL, "DMIC1 Pin"},
557 {"DMIC2", NULL, "DMIC2 Pin"},
558
559 {"ADC 0 Mux", "Mic", "MIC"},
560 {"ADC 0 Mux", "Dmic", "DMIC1"},
561 {"ADC 0 Mux", "Line1", "LINE1"},
562 {"ADC 0 Mux", "Line2", "LINE2"},
563 {"ADC 1 Mux", "Mic", "MIC"},
564 {"ADC 1 Mux", "Dmic", "DMIC2"},
565 {"ADC 1 Mux", "Line1", "LINE1"},
566 {"ADC 1 Mux", "Line2", "LINE2"},
567
568 {"ADC 0", NULL, "ADC 0 Mux"},
569 {"ADC 1", NULL, "ADC 1 Mux"},
570
571 {"AIF1TXL", NULL, "ADC 0"},
572 {"AIF1TXR", NULL, "ADC 0"},
573 {"AIF2TXL", NULL, "ADC 1"},
574 {"AIF2TXR", NULL, "ADC 1"},
575
576 {"DAC 0", NULL, "AIF1RXL"},
577 {"DAC 0", NULL, "AIF1RXR"},
578 {"DAC 1", NULL, "AIF2RXL"},
579 {"DAC 1", NULL, "AIF2RXR"},
580
581 {"DAC OUT0", NULL, "DAC 0"},
582
583 {"DAC OUT1", NULL, "DAC 1"},
584
585 {"LOUT Mux", "DAC OUT0", "DAC OUT0"},
586 {"LOUT Mux", "DAC OUT1", "DAC OUT1"},
587
588 {"LOUT L", "Switch", "LOUT Mux"},
589 {"LOUT R", "Switch", "LOUT Mux"},
590 {"LOUT L", NULL, "LOUT Power"},
591 {"LOUT R", NULL, "LOUT Power"},
592
593 {"LINE3", NULL, "LOUT L"},
594 {"LINE3", NULL, "LOUT R"},
595
596 {"HPO Mux", "DAC OUT0", "DAC OUT0"},
597 {"HPO Mux", "DAC OUT1", "DAC OUT1"},
598
599 {"HPO L", "Switch", "HPO Mux"},
600 {"HPO R", "Switch", "HPO Mux"},
601 {"HPO L", NULL, "HP Power"},
602 {"HPO R", NULL, "HP Power"},
603
604 {"HPO Pin", NULL, "HPO L"},
605 {"HPO Pin", NULL, "HPO R"},
606};
607
608static int rt274_hw_params(struct snd_pcm_substream *substream,
609 struct snd_pcm_hw_params *params,
610 struct snd_soc_dai *dai)
611{
612 struct snd_soc_codec *codec = dai->codec;
613 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
614 unsigned int val = 0;
615 int d_len_code = 0, c_len_code = 0;
616
617 switch (params_rate(params)) {
618 /* bit 14 0:48K 1:44.1K */
619 case 44100:
620 case 48000:
621 break;
622 default:
623 dev_err(codec->dev, "Unsupported sample rate %d\n",
624 params_rate(params));
625 return -EINVAL;
626 }
627 switch (rt274->sys_clk) {
628 case 12288000:
629 case 24576000:
630 if (params_rate(params) != 48000) {
631 dev_err(codec->dev, "Sys_clk is not matched (%d %d)\n",
632 params_rate(params), rt274->sys_clk);
633 return -EINVAL;
634 }
635 break;
636 case 11289600:
637 case 22579200:
638 if (params_rate(params) != 44100) {
639 dev_err(codec->dev, "Sys_clk is not matched (%d %d)\n",
640 params_rate(params), rt274->sys_clk);
641 return -EINVAL;
642 }
643 break;
644 }
645
646 if (params_channels(params) <= 16) {
647 /* bit 3:0 Number of Channel */
648 val |= (params_channels(params) - 1);
649 } else {
650 dev_err(codec->dev, "Unsupported channels %d\n",
651 params_channels(params));
652 return -EINVAL;
653 }
654
655 switch (params_width(params)) {
656 /* bit 6:4 Bits per Sample */
657 case 16:
658 d_len_code = 0;
659 c_len_code = 0;
660 val |= (0x1 << 4);
661 break;
662 case 32:
663 d_len_code = 2;
664 c_len_code = 3;
665 val |= (0x4 << 4);
666 break;
667 case 20:
668 d_len_code = 1;
669 c_len_code = 1;
670 val |= (0x2 << 4);
671 break;
672 case 24:
673 d_len_code = 2;
674 c_len_code = 2;
675 val |= (0x3 << 4);
676 break;
677 case 8:
678 d_len_code = 3;
679 c_len_code = 0;
680 break;
681 default:
682 return -EINVAL;
683 }
684
685 if (rt274->master)
686 c_len_code = 0x3;
687
688 snd_soc_update_bits(codec,
689 RT274_I2S_CTRL1, 0xc018, d_len_code << 3 | c_len_code << 14);
690 dev_dbg(codec->dev, "format val = 0x%x\n", val);
691
692 snd_soc_update_bits(codec, RT274_DAC_FORMAT, 0x407f, val);
693 snd_soc_update_bits(codec, RT274_ADC_FORMAT, 0x407f, val);
694
695 return 0;
696}
697
698static int rt274_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
699{
700 struct snd_soc_codec *codec = dai->codec;
701 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
702
703 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
704 case SND_SOC_DAIFMT_CBM_CFM:
705 snd_soc_update_bits(codec,
706 RT274_I2S_CTRL1, RT274_I2S_MODE_MASK, RT274_I2S_MODE_M);
707 rt274->master = true;
708 break;
709 case SND_SOC_DAIFMT_CBS_CFS:
710 snd_soc_update_bits(codec,
711 RT274_I2S_CTRL1, RT274_I2S_MODE_MASK, RT274_I2S_MODE_S);
712 rt274->master = false;
713 break;
714 default:
715 return -EINVAL;
716 }
717
718 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
719 case SND_SOC_DAIFMT_I2S:
720 snd_soc_update_bits(codec, RT274_I2S_CTRL1,
721 RT274_I2S_FMT_MASK, RT274_I2S_FMT_I2S);
722 break;
723 case SND_SOC_DAIFMT_LEFT_J:
724 snd_soc_update_bits(codec, RT274_I2S_CTRL1,
725 RT274_I2S_FMT_MASK, RT274_I2S_FMT_LJ);
726 break;
727 case SND_SOC_DAIFMT_DSP_A:
728 snd_soc_update_bits(codec, RT274_I2S_CTRL1,
729 RT274_I2S_FMT_MASK, RT274_I2S_FMT_PCMA);
730 break;
731 case SND_SOC_DAIFMT_DSP_B:
732 snd_soc_update_bits(codec, RT274_I2S_CTRL1,
733 RT274_I2S_FMT_MASK, RT274_I2S_FMT_PCMB);
734 break;
735 default:
736 return -EINVAL;
737 }
738 /* bit 15 Stream Type 0:PCM 1:Non-PCM */
739 snd_soc_update_bits(codec, RT274_DAC_FORMAT, 0x8000, 0);
740 snd_soc_update_bits(codec, RT274_ADC_FORMAT, 0x8000, 0);
741
742 return 0;
743}
744
745static int rt274_set_dai_pll(struct snd_soc_dai *dai, int pll_id, int source,
746 unsigned int freq_in, unsigned int freq_out)
747{
748 struct snd_soc_codec *codec = dai->codec;
749 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
750
751 switch (source) {
752 case RT274_PLL2_S_MCLK:
753 snd_soc_update_bits(codec, RT274_PLL2_CTRL,
754 RT274_PLL2_SRC_MASK, RT274_PLL2_SRC_MCLK);
755 break;
756 default:
757 dev_warn(codec->dev, "invalid pll source, use BCLK\n");
758 case RT274_PLL2_S_BCLK:
759 snd_soc_update_bits(codec, RT274_PLL2_CTRL,
760 RT274_PLL2_SRC_MASK, RT274_PLL2_SRC_BCLK);
761 break;
762 }
763
764 if (source == RT274_PLL2_S_BCLK) {
765 snd_soc_update_bits(codec, RT274_MCLK_CTRL,
766 (0x3 << 12), (0x3 << 12));
767 switch (rt274->fs) {
768 case 50:
769 snd_soc_write(codec, 0x7a, 0xaab6);
770 snd_soc_write(codec, 0x7b, 0x0301);
771 snd_soc_write(codec, 0x7c, 0x04fe);
772 break;
773 case 64:
774 snd_soc_write(codec, 0x7a, 0xaa96);
775 snd_soc_write(codec, 0x7b, 0x8003);
776 snd_soc_write(codec, 0x7c, 0x081e);
777 break;
778 case 128:
779 snd_soc_write(codec, 0x7a, 0xaa96);
780 snd_soc_write(codec, 0x7b, 0x8003);
781 snd_soc_write(codec, 0x7c, 0x080e);
782 break;
783 default:
784 dev_warn(codec->dev, "invalid freq_in, assume 4.8M\n");
785 case 100:
786 snd_soc_write(codec, 0x7a, 0xaab6);
787 snd_soc_write(codec, 0x7b, 0x0301);
788 snd_soc_write(codec, 0x7c, 0x047e);
789 break;
790 }
791 }
792
793 return 0;
794}
795
796static int rt274_set_dai_sysclk(struct snd_soc_dai *dai,
797 int clk_id, unsigned int freq, int dir)
798{
799 struct snd_soc_codec *codec = dai->codec;
800 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
801 unsigned int clk_src, mclk_en;
802
803 dev_dbg(codec->dev, "%s freq=%d\n", __func__, freq);
804
805 switch (clk_id) {
806 case RT274_SCLK_S_MCLK:
807 mclk_en = RT274_MCLK_MODE_EN;
808 clk_src = RT274_CLK_SRC_MCLK;
809 break;
810 case RT274_SCLK_S_PLL1:
811 mclk_en = RT274_MCLK_MODE_DIS;
812 clk_src = RT274_CLK_SRC_MCLK;
813 break;
814 case RT274_SCLK_S_PLL2:
815 mclk_en = RT274_MCLK_MODE_EN;
816 clk_src = RT274_CLK_SRC_PLL2;
817 break;
818 default:
819 mclk_en = RT274_MCLK_MODE_DIS;
820 clk_src = RT274_CLK_SRC_MCLK;
821 dev_warn(codec->dev, "invalid sysclk source, use PLL1\n");
822 break;
823 }
824 snd_soc_update_bits(codec, RT274_MCLK_CTRL,
825 RT274_MCLK_MODE_MASK, mclk_en);
826 snd_soc_update_bits(codec, RT274_CLK_CTRL,
827 RT274_CLK_SRC_MASK, clk_src);
828
829 switch (freq) {
830 case 19200000:
831 if (clk_id == RT274_SCLK_S_MCLK) {
832 dev_err(codec->dev, "Should not use MCLK\n");
833 return -EINVAL;
834 }
835 snd_soc_update_bits(codec,
836 RT274_I2S_CTRL2, 0x40, 0x40);
837 break;
838 case 24000000:
839 if (clk_id == RT274_SCLK_S_MCLK) {
840 dev_err(codec->dev, "Should not use MCLK\n");
841 return -EINVAL;
842 }
843 snd_soc_update_bits(codec,
844 RT274_I2S_CTRL2, 0x40, 0x0);
845 break;
846 case 12288000:
847 case 11289600:
848 snd_soc_update_bits(codec,
849 RT274_MCLK_CTRL, 0x1fcf, 0x0008);
850 break;
851 case 24576000:
852 case 22579200:
853 snd_soc_update_bits(codec,
854 RT274_MCLK_CTRL, 0x1fcf, 0x1543);
855 break;
856 default:
857 dev_err(codec->dev, "Unsupported system clock\n");
858 return -EINVAL;
859 }
860
861 rt274->sys_clk = freq;
862 rt274->clk_id = clk_id;
863
864 return 0;
865}
866
867static int rt274_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio)
868{
869 struct snd_soc_codec *codec = dai->codec;
870 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
871
872 dev_dbg(codec->dev, "%s ratio=%d\n", __func__, ratio);
873 rt274->fs = ratio;
874 if ((ratio / 50) == 0)
875 snd_soc_update_bits(codec,
876 RT274_I2S_CTRL1, 0x1000, 0x1000);
877 else
878 snd_soc_update_bits(codec,
879 RT274_I2S_CTRL1, 0x1000, 0x0);
880
881
882 return 0;
883}
884
885static int rt274_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
886 unsigned int rx_mask, int slots, int slot_width)
887
888{
889 struct snd_soc_codec *codec = dai->codec;
890
891 if (rx_mask || tx_mask) {
892 snd_soc_update_bits(codec,
893 RT274_I2S_CTRL1, RT274_TDM_EN, RT274_TDM_EN);
894 } else {
895 snd_soc_update_bits(codec,
896 RT274_I2S_CTRL1, RT274_TDM_EN, RT274_TDM_DIS);
897 return 0;
898 }
899
900 switch (slots) {
901 case 4:
902 snd_soc_update_bits(codec,
903 RT274_I2S_CTRL1, RT274_TDM_CH_NUM, RT274_TDM_4CH);
904 break;
905 case 2:
906 snd_soc_update_bits(codec,
907 RT274_I2S_CTRL1, RT274_TDM_CH_NUM, RT274_TDM_2CH);
908 break;
909 default:
910 dev_err(codec->dev,
911 "Support 2 or 4 slots TDM only\n");
912 return -EINVAL;
913 }
914
915 return 0;
916}
917
918static int rt274_set_bias_level(struct snd_soc_codec *codec,
919 enum snd_soc_bias_level level)
920{
921 switch (level) {
922 case SND_SOC_BIAS_PREPARE:
923 if (SND_SOC_BIAS_STANDBY ==
924 snd_soc_codec_get_bias_level(codec)) {
925 snd_soc_write(codec,
926 RT274_SET_AUDIO_POWER, AC_PWRST_D0);
927 }
928 break;
929
930 case SND_SOC_BIAS_STANDBY:
931 snd_soc_write(codec,
932 RT274_SET_AUDIO_POWER, AC_PWRST_D3);
933 break;
934
935 default:
936 break;
937 }
938
939 return 0;
940}
941
942static irqreturn_t rt274_irq(int irq, void *data)
943{
944 struct rt274_priv *rt274 = data;
945 bool hp = false;
946 bool mic = false;
947 int ret, status = 0;
948
949 /* Clear IRQ */
950 regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL,
951 RT274_IRQ_CLR, RT274_IRQ_CLR);
952
953 ret = rt274_jack_detect(rt274, &hp, &mic);
954
955 if (ret == 0) {
956 if (hp == true)
957 status |= SND_JACK_HEADPHONE;
958
959 if (mic == true)
960 status |= SND_JACK_MICROPHONE;
961
962 snd_soc_jack_report(rt274->jack, status,
963 SND_JACK_MICROPHONE | SND_JACK_HEADPHONE);
964
965 pm_wakeup_event(&rt274->i2c->dev, 300);
966 }
967
968 return IRQ_HANDLED;
969}
970
971static int rt274_probe(struct snd_soc_codec *codec)
972{
973 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
974
975 rt274->codec = codec;
976
977 if (rt274->i2c->irq) {
978 INIT_DELAYED_WORK(&rt274->jack_detect_work,
979 rt274_jack_detect_work);
980 schedule_delayed_work(&rt274->jack_detect_work,
981 msecs_to_jiffies(1250));
982 }
983
984 return 0;
985}
986
987static int rt274_remove(struct snd_soc_codec *codec)
988{
989 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
990
991 cancel_delayed_work_sync(&rt274->jack_detect_work);
992
993 return 0;
994}
995
996#ifdef CONFIG_PM
997static int rt274_suspend(struct snd_soc_codec *codec)
998{
999 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
1000
1001 regcache_cache_only(rt274->regmap, true);
1002 regcache_mark_dirty(rt274->regmap);
1003
1004 return 0;
1005}
1006
1007static int rt274_resume(struct snd_soc_codec *codec)
1008{
1009 struct rt274_priv *rt274 = snd_soc_codec_get_drvdata(codec);
1010
1011 regcache_cache_only(rt274->regmap, false);
1012 rt274_index_sync(codec);
1013 regcache_sync(rt274->regmap);
1014
1015 return 0;
1016}
1017#else
1018#define rt274_suspend NULL
1019#define rt274_resume NULL
1020#endif
1021
1022#define RT274_STEREO_RATES (SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000)
1023#define RT274_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
1024 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
1025
1026static const struct snd_soc_dai_ops rt274_aif_dai_ops = {
1027 .hw_params = rt274_hw_params,
1028 .set_fmt = rt274_set_dai_fmt,
1029 .set_sysclk = rt274_set_dai_sysclk,
1030 .set_pll = rt274_set_dai_pll,
1031 .set_bclk_ratio = rt274_set_bclk_ratio,
1032 .set_tdm_slot = rt274_set_tdm_slot,
1033};
1034
1035static struct snd_soc_dai_driver rt274_dai[] = {
1036 {
1037 .name = "rt274-aif1",
1038 .id = RT274_AIF1,
1039 .playback = {
1040 .stream_name = "AIF1 Playback",
1041 .channels_min = 1,
1042 .channels_max = 2,
1043 .rates = RT274_STEREO_RATES,
1044 .formats = RT274_FORMATS,
1045 },
1046 .capture = {
1047 .stream_name = "AIF1 Capture",
1048 .channels_min = 1,
1049 .channels_max = 2,
1050 .rates = RT274_STEREO_RATES,
1051 .formats = RT274_FORMATS,
1052 },
1053 .ops = &rt274_aif_dai_ops,
1054 .symmetric_rates = 1,
1055 },
1056};
1057
1058static const struct snd_soc_codec_driver soc_codec_dev_rt274 = {
1059 .probe = rt274_probe,
1060 .remove = rt274_remove,
1061 .suspend = rt274_suspend,
1062 .resume = rt274_resume,
1063 .set_bias_level = rt274_set_bias_level,
1064 .idle_bias_off = true,
1065 .component_driver = {
1066 .controls = rt274_snd_controls,
1067 .num_controls = ARRAY_SIZE(rt274_snd_controls),
1068 .dapm_widgets = rt274_dapm_widgets,
1069 .num_dapm_widgets = ARRAY_SIZE(rt274_dapm_widgets),
1070 .dapm_routes = rt274_dapm_routes,
1071 .num_dapm_routes = ARRAY_SIZE(rt274_dapm_routes),
1072 },
1073 .set_jack = rt274_mic_detect,
1074};
1075
1076static const struct regmap_config rt274_regmap = {
1077 .reg_bits = 32,
1078 .val_bits = 32,
1079 .max_register = 0x05bfffff,
1080 .volatile_reg = rt274_volatile_register,
1081 .readable_reg = rt274_readable_register,
1082 .reg_write = rl6347a_hw_write,
1083 .reg_read = rl6347a_hw_read,
1084 .cache_type = REGCACHE_RBTREE,
1085 .reg_defaults = rt274_reg,
1086 .num_reg_defaults = ARRAY_SIZE(rt274_reg),
1087};
1088
1089#ifdef CONFIG_OF
1090static const struct of_device_id rt274_of_match[] = {
1091 {.compatible = "realtek,rt274"},
1092 {},
1093};
1094MODULE_DEVICE_TABLE(of, rt274_of_match);
1095#endif
1096
1097static const struct i2c_device_id rt274_i2c_id[] = {
1098 {"rt274", 0},
1099 {}
1100};
1101MODULE_DEVICE_TABLE(i2c, rt274_i2c_id);
1102
1103static const struct acpi_device_id rt274_acpi_match[] = {
1104 { "10EC0274", 0 },
1105 { "INT34C2", 0 },
1106 {},
1107};
1108MODULE_DEVICE_TABLE(acpi, rt274_acpi_match);
1109
1110static int rt274_i2c_probe(struct i2c_client *i2c,
1111 const struct i2c_device_id *id)
1112{
1113 struct rt274_priv *rt274;
1114
1115 int ret;
1116 unsigned int val;
1117
1118 rt274 = devm_kzalloc(&i2c->dev, sizeof(*rt274),
1119 GFP_KERNEL);
1120 if (rt274 == NULL)
1121 return -ENOMEM;
1122
1123 rt274->regmap = devm_regmap_init(&i2c->dev, NULL, i2c, &rt274_regmap);
1124 if (IS_ERR(rt274->regmap)) {
1125 ret = PTR_ERR(rt274->regmap);
1126 dev_err(&i2c->dev, "Failed to allocate register map: %d\n",
1127 ret);
1128 return ret;
1129 }
1130
1131 regmap_read(rt274->regmap,
1132 RT274_GET_PARAM(AC_NODE_ROOT, AC_PAR_VENDOR_ID), &val);
1133 if (val != RT274_VENDOR_ID) {
1134 dev_err(&i2c->dev,
1135 "Device with ID register %#x is not rt274\n", val);
1136 return -ENODEV;
1137 }
1138
1139 rt274->index_cache = devm_kmemdup(&i2c->dev, rt274_index_def,
1140 sizeof(rt274_index_def), GFP_KERNEL);
1141 if (!rt274->index_cache)
1142 return -ENOMEM;
1143
1144 rt274->index_cache_size = INDEX_CACHE_SIZE;
1145 rt274->i2c = i2c;
1146 i2c_set_clientdata(i2c, rt274);
1147
1148 /* reset codec */
1149 regmap_write(rt274->regmap, RT274_RESET, 0);
1150 regmap_update_bits(rt274->regmap, 0x1a, 0x4000, 0x4000);
1151
1152 /* Set Pad PDB is floating */
1153 regmap_update_bits(rt274->regmap, RT274_PAD_CTRL12, 0x3, 0x0);
1154 regmap_write(rt274->regmap, RT274_COEF5b_INDEX, 0x01);
1155 regmap_write(rt274->regmap, RT274_COEF5b_COEF, 0x8540);
1156 regmap_update_bits(rt274->regmap, 0x6f, 0x0100, 0x0100);
1157 /* Combo jack auto detect */
1158 regmap_write(rt274->regmap, 0x4a, 0x201b);
1159 /* Aux mode off */
1160 regmap_update_bits(rt274->regmap, 0x6f, 0x3000, 0x2000);
1161 /* HP DC Calibration */
1162 regmap_update_bits(rt274->regmap, 0x6f, 0xf, 0x0);
1163 /* Set NID=58h.Index 00h [15]= 1b; */
1164 regmap_write(rt274->regmap, RT274_COEF58_INDEX, 0x00);
1165 regmap_write(rt274->regmap, RT274_COEF58_COEF, 0xb888);
1166 msleep(500);
1167 regmap_update_bits(rt274->regmap, 0x6f, 0xf, 0xb);
1168 regmap_write(rt274->regmap, RT274_COEF58_INDEX, 0x00);
1169 regmap_write(rt274->regmap, RT274_COEF58_COEF, 0x3888);
1170 /* Set pin widget */
1171 regmap_write(rt274->regmap, RT274_SET_PIN_HPO, 0x40);
1172 regmap_write(rt274->regmap, RT274_SET_PIN_LOUT3, 0x40);
1173 regmap_write(rt274->regmap, RT274_SET_MIC, 0x20);
1174 regmap_write(rt274->regmap, RT274_SET_PIN_DMIC1, 0x20);
1175
1176 regmap_update_bits(rt274->regmap, RT274_I2S_CTRL2, 0xc004, 0x4004);
1177 regmap_update_bits(rt274->regmap, RT274_EAPD_GPIO_IRQ_CTRL,
1178 RT274_GPI2_SEL_MASK, RT274_GPI2_SEL_DMIC_CLK);
1179
1180 /* jack detection */
1181 regmap_write(rt274->regmap, RT274_UNSOLICITED_HP_OUT, 0x81);
1182 regmap_write(rt274->regmap, RT274_UNSOLICITED_MIC, 0x82);
1183
1184 if (rt274->i2c->irq) {
1185 ret = request_threaded_irq(rt274->i2c->irq, NULL, rt274_irq,
1186 IRQF_TRIGGER_HIGH | IRQF_ONESHOT, "rt274", rt274);
1187 if (ret != 0) {
1188 dev_err(&i2c->dev,
1189 "Failed to reguest IRQ: %d\n", ret);
1190 return ret;
1191 }
1192 }
1193
1194 ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_rt274,
1195 rt274_dai, ARRAY_SIZE(rt274_dai));
1196
1197 return ret;
1198}
1199
1200static int rt274_i2c_remove(struct i2c_client *i2c)
1201{
1202 struct rt274_priv *rt274 = i2c_get_clientdata(i2c);
1203
1204 if (i2c->irq)
1205 free_irq(i2c->irq, rt274);
1206 snd_soc_unregister_codec(&i2c->dev);
1207
1208 return 0;
1209}
1210
1211
1212static struct i2c_driver rt274_i2c_driver = {
1213 .driver = {
1214 .name = "rt274",
1215 .acpi_match_table = ACPI_PTR(rt274_acpi_match),
1216#ifdef CONFIG_OF
1217 .of_match_table = of_match_ptr(rt274_of_match),
1218#endif
1219 },
1220 .probe = rt274_i2c_probe,
1221 .remove = rt274_i2c_remove,
1222 .id_table = rt274_i2c_id,
1223};
1224
1225module_i2c_driver(rt274_i2c_driver);
1226
1227MODULE_DESCRIPTION("ASoC RT274 driver");
1228MODULE_AUTHOR("Bard Liao <bardliao@realtek.com>");
1229MODULE_LICENSE("GPL v2");
diff --git a/sound/soc/codecs/rt274.h b/sound/soc/codecs/rt274.h
new file mode 100644
index 000000000000..4fd1bcb73dba
--- /dev/null
+++ b/sound/soc/codecs/rt274.h
@@ -0,0 +1,217 @@
1/*
2 * rt274.h -- RT274 ALSA SoC audio driver
3 *
4 * Copyright 2016 Realtek Microelectronics
5 * Author: Bard Liao <bardliao@realtek.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef __RT274_H__
13#define __RT274_H__
14
15#define VERB_CMD(V, N, D) ((N << 20) | (V << 8) | D)
16
17#define RT274_AUDIO_FUNCTION_GROUP 0x01
18#define RT274_DAC_OUT0 0x02
19#define RT274_DAC_OUT1 0x03
20#define RT274_ADC_IN2 0x08
21#define RT274_ADC_IN1 0x09
22#define RT274_DIG_CVT 0x0a
23#define RT274_DMIC1 0x12
24#define RT274_DMIC2 0x13
25#define RT274_MIC 0x19
26#define RT274_LINE1 0x1a
27#define RT274_LINE2 0x1b
28#define RT274_LINE3 0x16
29#define RT274_SPDIF 0x1e
30#define RT274_VENDOR_REGISTERS 0x20
31#define RT274_HP_OUT 0x21
32#define RT274_MIXER_IN1 0x22
33#define RT274_MIXER_IN2 0x23
34#define RT274_INLINE_CMD 0x55
35
36#define RT274_SET_PIN_SFT 6
37#define RT274_SET_PIN_ENABLE 0x40
38#define RT274_SET_PIN_DISABLE 0
39#define RT274_SET_EAPD_HIGH 0x2
40#define RT274_SET_EAPD_LOW 0
41
42#define RT274_MUTE_SFT 7
43
44/* Verb commands */
45#define RT274_RESET\
46 VERB_CMD(AC_VERB_SET_CODEC_RESET, RT274_AUDIO_FUNCTION_GROUP, 0)
47#define RT274_GET_PARAM(NID, PARAM) VERB_CMD(AC_VERB_PARAMETERS, NID, PARAM)
48#define RT274_SET_POWER(NID) VERB_CMD(AC_VERB_SET_POWER_STATE, NID, 0)
49#define RT274_SET_AUDIO_POWER RT274_SET_POWER(RT274_AUDIO_FUNCTION_GROUP)
50#define RT274_SET_HPO_POWER RT274_SET_POWER(RT274_HP_OUT)
51#define RT274_SET_DMIC1_POWER RT274_SET_POWER(RT274_DMIC1)
52#define RT274_LOUT_MUX\
53 VERB_CMD(AC_VERB_SET_CONNECT_SEL, RT274_LINE3, 0)
54#define RT274_HPO_MUX\
55 VERB_CMD(AC_VERB_SET_CONNECT_SEL, RT274_HP_OUT, 0)
56#define RT274_ADC0_MUX\
57 VERB_CMD(AC_VERB_SET_CONNECT_SEL, RT274_MIXER_IN1, 0)
58#define RT274_ADC1_MUX\
59 VERB_CMD(AC_VERB_SET_CONNECT_SEL, RT274_MIXER_IN2, 0)
60#define RT274_SET_MIC\
61 VERB_CMD(AC_VERB_SET_PIN_WIDGET_CONTROL, RT274_MIC, 0)
62#define RT274_SET_PIN_LOUT3\
63 VERB_CMD(AC_VERB_SET_PIN_WIDGET_CONTROL, RT274_LINE3, 0)
64#define RT274_SET_PIN_HPO\
65 VERB_CMD(AC_VERB_SET_PIN_WIDGET_CONTROL, RT274_HP_OUT, 0)
66#define RT274_SET_PIN_DMIC1\
67 VERB_CMD(AC_VERB_SET_PIN_WIDGET_CONTROL, RT274_DMIC1, 0)
68#define RT274_SET_PIN_SPDIF\
69 VERB_CMD(AC_VERB_SET_PIN_WIDGET_CONTROL, RT274_SPDIF, 0)
70#define RT274_SET_PIN_DIG_CVT\
71 VERB_CMD(AC_VERB_SET_DIGI_CONVERT_1, RT274_DIG_CVT, 0)
72#define RT274_SET_AMP_GAIN_HPO\
73 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_HP_OUT, 0)
74#define RT274_SET_AMP_GAIN_ADC_IN1\
75 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_ADC_IN1, 0)
76#define RT274_SET_AMP_GAIN_ADC_IN2\
77 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_ADC_IN2, 0)
78#define RT274_GET_HP_SENSE\
79 VERB_CMD(AC_VERB_GET_PIN_SENSE, RT274_HP_OUT, 0)
80#define RT274_GET_MIC_SENSE\
81 VERB_CMD(AC_VERB_GET_PIN_SENSE, RT274_MIC, 0)
82#define RT274_SET_DMIC2_DEFAULT\
83 VERB_CMD(AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, RT274_DMIC2, 0)
84#define RT274_SET_SPDIF_DEFAULT\
85 VERB_CMD(AC_VERB_SET_CONFIG_DEFAULT_BYTES_3, RT274_SPDIF, 0)
86#define RT274_DAC0L_GAIN\
87 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_DAC_OUT0, 0xa000)
88#define RT274_DAC0R_GAIN\
89 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_DAC_OUT0, 0x9000)
90#define RT274_DAC1L_GAIN\
91 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_DAC_OUT1, 0xa000)
92#define RT274_DAC1R_GAIN\
93 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_DAC_OUT1, 0x9000)
94#define RT274_ADCL_GAIN\
95 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_ADC_IN1, 0x6000)
96#define RT274_ADCR_GAIN\
97 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_ADC_IN1, 0x5000)
98#define RT274_MIC_GAIN\
99 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_MIC, 0x7000)
100#define RT274_LOUTL_GAIN\
101 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_LINE3, 0xa000)
102#define RT274_LOUTR_GAIN\
103 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_LINE3, 0x9000)
104#define RT274_HPOL_GAIN\
105 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_HP_OUT, 0xa000)
106#define RT274_HPOR_GAIN\
107 VERB_CMD(AC_VERB_SET_AMP_GAIN_MUTE, RT274_HP_OUT, 0x9000)
108#define RT274_DAC_FORMAT\
109 VERB_CMD(AC_VERB_SET_STREAM_FORMAT, RT274_DAC_OUT0, 0)
110#define RT274_ADC_FORMAT\
111 VERB_CMD(AC_VERB_SET_STREAM_FORMAT, RT274_ADC_IN1, 0)
112#define RT274_COEF_INDEX\
113 VERB_CMD(AC_VERB_SET_COEF_INDEX, RT274_VENDOR_REGISTERS, 0)
114#define RT274_PROC_COEF\
115 VERB_CMD(AC_VERB_SET_PROC_COEF, RT274_VENDOR_REGISTERS, 0)
116#define RT274_UNSOLICITED_INLINE_CMD\
117 VERB_CMD(AC_VERB_SET_UNSOLICITED_ENABLE, RT274_INLINE_CMD, 0)
118#define RT274_UNSOLICITED_HP_OUT\
119 VERB_CMD(AC_VERB_SET_UNSOLICITED_ENABLE, RT274_HP_OUT, 0)
120#define RT274_UNSOLICITED_MIC\
121 VERB_CMD(AC_VERB_SET_UNSOLICITED_ENABLE, RT274_MIC, 0)
122#define RT274_COEF58_INDEX\
123 VERB_CMD(AC_VERB_SET_COEF_INDEX, 0x58, 0)
124#define RT274_COEF58_COEF\
125 VERB_CMD(AC_VERB_SET_PROC_COEF, 0x58, 0)
126#define RT274_COEF5b_INDEX\
127 VERB_CMD(AC_VERB_SET_COEF_INDEX, 0x5b, 0)
128#define RT274_COEF5b_COEF\
129 VERB_CMD(AC_VERB_SET_PROC_COEF, 0x5b, 0)
130#define RT274_SET_STREAMID_DAC0\
131 VERB_CMD(AC_VERB_SET_CHANNEL_STREAMID, RT274_DAC_OUT0, 0)
132#define RT274_SET_STREAMID_DAC1\
133 VERB_CMD(AC_VERB_SET_CHANNEL_STREAMID, RT274_DAC_OUT1, 0)
134#define RT274_SET_STREAMID_ADC1\
135 VERB_CMD(AC_VERB_SET_CHANNEL_STREAMID, RT274_ADC_IN1, 0)
136#define RT274_SET_STREAMID_ADC2\
137 VERB_CMD(AC_VERB_SET_CHANNEL_STREAMID, RT274_ADC_IN2, 0)
138
139/* Index registers */
140#define RT274_EAPD_GPIO_IRQ_CTRL 0x10
141#define RT274_PAD_CTRL12 0x35
142#define RT274_I2S_CTRL1 0x63
143#define RT274_I2S_CTRL2 0x64
144#define RT274_MCLK_CTRL 0x71
145#define RT274_CLK_CTRL 0x72
146#define RT274_PLL2_CTRL 0x7b
147
148
149/* EAPD GPIO IRQ control (Index 0x10) */
150#define RT274_IRQ_DIS (0x0 << 13)
151#define RT274_IRQ_EN (0x1 << 13)
152#define RT274_IRQ_CLR (0x1 << 12)
153#define RT274_GPI2_SEL_MASK (0x3 << 7)
154#define RT274_GPI2_SEL_GPIO2 (0x0 << 7)
155#define RT274_GPI2_SEL_I2S (0x1 << 7)
156#define RT274_GPI2_SEL_DMIC_CLK (0x2 << 7)
157#define RT274_GPI2_SEL_CBJ (0x3 << 7)
158
159/* Front I2S_Interface control 1 (Index 0x63) */
160#define RT274_I2S_MODE_MASK (0x1 << 11)
161#define RT274_I2S_MODE_S (0x0 << 11)
162#define RT274_I2S_MODE_M (0x1 << 11)
163#define RT274_TDM_DIS (0x0 << 10)
164#define RT274_TDM_EN (0x1 << 10)
165#define RT274_TDM_CH_NUM (0x1 << 7)
166#define RT274_TDM_2CH (0x0 << 7)
167#define RT274_TDM_4CH (0x1 << 7)
168#define RT274_I2S_FMT_MASK (0x3 << 8)
169#define RT274_I2S_FMT_I2S (0x0 << 8)
170#define RT274_I2S_FMT_LJ (0x1 << 8)
171#define RT274_I2S_FMT_PCMA (0x2 << 8)
172#define RT274_I2S_FMT_PCMB (0x3 << 8)
173
174/* MCLK clock domain control (Index 0x71) */
175#define RT274_MCLK_MODE_MASK (0x1 << 14)
176#define RT274_MCLK_MODE_DIS (0x0 << 14)
177#define RT274_MCLK_MODE_EN (0x1 << 14)
178
179/* Clock control (Index 0x72) */
180#define RT274_CLK_SRC_MASK (0x7 << 3)
181#define RT274_CLK_SRC_MCLK (0x0 << 3)
182#define RT274_CLK_SRC_PLL2 (0x3 << 3)
183
184/* PLL2 control (Index 0x7b) */
185#define RT274_PLL2_SRC_MASK (0x1 << 13)
186#define RT274_PLL2_SRC_MCLK (0x0 << 13)
187#define RT274_PLL2_SRC_BCLK (0x1 << 13)
188
189/* HP-OUT (0x21) */
190#define RT274_M_HP_MUX_SFT 14
191#define RT274_HP_SEL_MASK 0x1
192#define RT274_HP_SEL_SFT 0
193#define RT274_HP_SEL_F 0
194#define RT274_HP_SEL_S 1
195
196/* ADC (0x22) (0x23) */
197#define RT274_ADC_SEL_MASK 0x7
198#define RT274_ADC_SEL_SFT 0
199#define RT274_ADC_SEL_MIC 0
200#define RT274_ADC_SEL_LINE1 1
201#define RT274_ADC_SEL_LINE2 2
202#define RT274_ADC_SEL_DMIC 3
203
204#define RT274_SCLK_S_MCLK 0
205#define RT274_SCLK_S_PLL1 1
206#define RT274_SCLK_S_PLL2 2
207
208#define RT274_PLL2_S_MCLK 0
209#define RT274_PLL2_S_BCLK 1
210
211enum {
212 RT274_AIF1,
213 RT274_AIFS,
214};
215
216#endif /* __RT274_H__ */
217
diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 7899a2cdeb42..af6325c78292 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -1046,7 +1046,7 @@ static struct snd_soc_dai_driver rt286_dai[] = {
1046 1046
1047}; 1047};
1048 1048
1049static struct snd_soc_codec_driver soc_codec_dev_rt286 = { 1049static const struct snd_soc_codec_driver soc_codec_dev_rt286 = {
1050 .probe = rt286_probe, 1050 .probe = rt286_probe,
1051 .remove = rt286_remove, 1051 .remove = rt286_remove,
1052 .suspend = rt286_suspend, 1052 .suspend = rt286_suspend,
diff --git a/sound/soc/codecs/rt298.c b/sound/soc/codecs/rt298.c
index d9e96e65e1c4..ce963768449f 100644
--- a/sound/soc/codecs/rt298.c
+++ b/sound/soc/codecs/rt298.c
@@ -1113,7 +1113,7 @@ static struct snd_soc_dai_driver rt298_dai[] = {
1113 1113
1114}; 1114};
1115 1115
1116static struct snd_soc_codec_driver soc_codec_dev_rt298 = { 1116static const struct snd_soc_codec_driver soc_codec_dev_rt298 = {
1117 .probe = rt298_probe, 1117 .probe = rt298_probe,
1118 .remove = rt298_remove, 1118 .remove = rt298_remove,
1119 .suspend = rt298_suspend, 1119 .suspend = rt298_suspend,
diff --git a/sound/soc/codecs/rt5514-spi.c b/sound/soc/codecs/rt5514-spi.c
index 7ed62e8c80b4..ed6e5373916c 100644
--- a/sound/soc/codecs/rt5514-spi.c
+++ b/sound/soc/codecs/rt5514-spi.c
@@ -43,9 +43,7 @@ struct rt5514_dsp {
43 struct mutex dma_lock; 43 struct mutex dma_lock;
44 struct snd_pcm_substream *substream; 44 struct snd_pcm_substream *substream;
45 unsigned int buf_base, buf_limit, buf_rp; 45 unsigned int buf_base, buf_limit, buf_rp;
46 size_t buf_size; 46 size_t buf_size, get_size, dma_offset;
47 size_t dma_offset;
48 size_t dsp_offset;
49}; 47};
50 48
51static const struct snd_pcm_hardware rt5514_spi_pcm_hardware = { 49static const struct snd_pcm_hardware rt5514_spi_pcm_hardware = {
@@ -80,6 +78,8 @@ static void rt5514_spi_copy_work(struct work_struct *work)
80 container_of(work, struct rt5514_dsp, copy_work.work); 78 container_of(work, struct rt5514_dsp, copy_work.work);
81 struct snd_pcm_runtime *runtime; 79 struct snd_pcm_runtime *runtime;
82 size_t period_bytes, truncated_bytes = 0; 80 size_t period_bytes, truncated_bytes = 0;
81 unsigned int cur_wp, remain_data;
82 u8 buf[8];
83 83
84 mutex_lock(&rt5514_dsp->dma_lock); 84 mutex_lock(&rt5514_dsp->dma_lock);
85 if (!rt5514_dsp->substream) { 85 if (!rt5514_dsp->substream) {
@@ -90,8 +90,24 @@ static void rt5514_spi_copy_work(struct work_struct *work)
90 runtime = rt5514_dsp->substream->runtime; 90 runtime = rt5514_dsp->substream->runtime;
91 period_bytes = snd_pcm_lib_period_bytes(rt5514_dsp->substream); 91 period_bytes = snd_pcm_lib_period_bytes(rt5514_dsp->substream);
92 92
93 if (rt5514_dsp->buf_size - rt5514_dsp->dsp_offset < period_bytes) 93 if (rt5514_dsp->get_size >= rt5514_dsp->buf_size) {
94 period_bytes = rt5514_dsp->buf_size - rt5514_dsp->dsp_offset; 94 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_WP, (u8 *)&buf,
95 sizeof(buf));
96 cur_wp = buf[0] | buf[1] << 8 | buf[2] << 16 |
97 buf[3] << 24;
98
99 if (cur_wp >= rt5514_dsp->buf_rp)
100 remain_data = (cur_wp - rt5514_dsp->buf_rp);
101 else
102 remain_data =
103 (rt5514_dsp->buf_limit - rt5514_dsp->buf_rp) +
104 (cur_wp - rt5514_dsp->buf_base);
105
106 if (remain_data < period_bytes) {
107 schedule_delayed_work(&rt5514_dsp->copy_work, 5);
108 goto done;
109 }
110 }
95 111
96 if (rt5514_dsp->buf_rp + period_bytes <= rt5514_dsp->buf_limit) { 112 if (rt5514_dsp->buf_rp + period_bytes <= rt5514_dsp->buf_limit) {
97 rt5514_spi_burst_read(rt5514_dsp->buf_rp, 113 rt5514_spi_burst_read(rt5514_dsp->buf_rp,
@@ -112,24 +128,62 @@ static void rt5514_spi_copy_work(struct work_struct *work)
112 runtime->dma_area + rt5514_dsp->dma_offset + 128 runtime->dma_area + rt5514_dsp->dma_offset +
113 truncated_bytes, period_bytes - truncated_bytes); 129 truncated_bytes, period_bytes - truncated_bytes);
114 130
115 rt5514_dsp->buf_rp = rt5514_dsp->buf_base + 131 rt5514_dsp->buf_rp = rt5514_dsp->buf_base + period_bytes -
116 period_bytes - truncated_bytes; 132 truncated_bytes;
117 } 133 }
118 134
135 rt5514_dsp->get_size += period_bytes;
119 rt5514_dsp->dma_offset += period_bytes; 136 rt5514_dsp->dma_offset += period_bytes;
120 if (rt5514_dsp->dma_offset >= runtime->dma_bytes) 137 if (rt5514_dsp->dma_offset >= runtime->dma_bytes)
121 rt5514_dsp->dma_offset = 0; 138 rt5514_dsp->dma_offset = 0;
122 139
123 rt5514_dsp->dsp_offset += period_bytes;
124
125 snd_pcm_period_elapsed(rt5514_dsp->substream); 140 snd_pcm_period_elapsed(rt5514_dsp->substream);
126 141
127 if (rt5514_dsp->dsp_offset < rt5514_dsp->buf_size) 142 schedule_delayed_work(&rt5514_dsp->copy_work, 5);
128 schedule_delayed_work(&rt5514_dsp->copy_work, 5); 143
129done: 144done:
130 mutex_unlock(&rt5514_dsp->dma_lock); 145 mutex_unlock(&rt5514_dsp->dma_lock);
131} 146}
132 147
148static irqreturn_t rt5514_spi_irq(int irq, void *data)
149{
150 struct rt5514_dsp *rt5514_dsp = data;
151 u8 buf[8];
152
153 rt5514_dsp->get_size = 0;
154
155 /**
156 * The address area x1800XXXX is the register address, and it cannot
157 * support spi burst read perfectly. So we use the spi burst read
158 * individually to make sure the data correctly.
159 */
160 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_BASE, (u8 *)&buf,
161 sizeof(buf));
162 rt5514_dsp->buf_base = buf[0] | buf[1] << 8 | buf[2] << 16 |
163 buf[3] << 24;
164
165 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_LIMIT, (u8 *)&buf,
166 sizeof(buf));
167 rt5514_dsp->buf_limit = buf[0] | buf[1] << 8 | buf[2] << 16 |
168 buf[3] << 24;
169
170 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_WP, (u8 *)&buf,
171 sizeof(buf));
172 rt5514_dsp->buf_rp = buf[0] | buf[1] << 8 | buf[2] << 16 |
173 buf[3] << 24;
174
175 if (rt5514_dsp->buf_rp % 8)
176 rt5514_dsp->buf_rp = (rt5514_dsp->buf_rp / 8) * 8;
177
178 rt5514_dsp->buf_size = rt5514_dsp->buf_limit - rt5514_dsp->buf_base;
179
180 if (rt5514_dsp->buf_base && rt5514_dsp->buf_limit &&
181 rt5514_dsp->buf_rp && rt5514_dsp->buf_size)
182 schedule_delayed_work(&rt5514_dsp->copy_work, 0);
183
184 return IRQ_HANDLED;
185}
186
133/* PCM for streaming audio from the DSP buffer */ 187/* PCM for streaming audio from the DSP buffer */
134static int rt5514_spi_pcm_open(struct snd_pcm_substream *substream) 188static int rt5514_spi_pcm_open(struct snd_pcm_substream *substream)
135{ 189{
@@ -150,6 +204,7 @@ static int rt5514_spi_hw_params(struct snd_pcm_substream *substream,
150 ret = snd_pcm_lib_alloc_vmalloc_buffer(substream, 204 ret = snd_pcm_lib_alloc_vmalloc_buffer(substream,
151 params_buffer_bytes(hw_params)); 205 params_buffer_bytes(hw_params));
152 rt5514_dsp->substream = substream; 206 rt5514_dsp->substream = substream;
207 rt5514_dsp->dma_offset = 0;
153 mutex_unlock(&rt5514_dsp->dma_lock); 208 mutex_unlock(&rt5514_dsp->dma_lock);
154 209
155 return ret; 210 return ret;
@@ -170,59 +225,6 @@ static int rt5514_spi_hw_free(struct snd_pcm_substream *substream)
170 return snd_pcm_lib_free_vmalloc_buffer(substream); 225 return snd_pcm_lib_free_vmalloc_buffer(substream);
171} 226}
172 227
173static int rt5514_spi_prepare(struct snd_pcm_substream *substream)
174{
175 struct snd_soc_pcm_runtime *rtd = substream->private_data;
176 struct rt5514_dsp *rt5514_dsp =
177 snd_soc_platform_get_drvdata(rtd->platform);
178 u8 buf[8];
179
180 rt5514_dsp->dma_offset = 0;
181 rt5514_dsp->dsp_offset = 0;
182
183 /**
184 * The address area x1800XXXX is the register address, and it cannot
185 * support spi burst read perfectly. So we use the spi burst read
186 * individually to make sure the data correctly.
187 */
188 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_BASE, (u8 *)&buf,
189 sizeof(buf));
190 rt5514_dsp->buf_base = buf[0] | buf[1] << 8 | buf[2] << 16 |
191 buf[3] << 24;
192
193 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_LIMIT, (u8 *)&buf,
194 sizeof(buf));
195 rt5514_dsp->buf_limit = buf[0] | buf[1] << 8 | buf[2] << 16 |
196 buf[3] << 24;
197
198 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_RP, (u8 *)&buf,
199 sizeof(buf));
200 rt5514_dsp->buf_rp = buf[0] | buf[1] << 8 | buf[2] << 16 |
201 buf[3] << 24;
202
203 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_SIZE, (u8 *)&buf,
204 sizeof(buf));
205 rt5514_dsp->buf_size = buf[0] | buf[1] << 8 | buf[2] << 16 |
206 buf[3] << 24;
207
208 return 0;
209}
210
211static int rt5514_spi_trigger(struct snd_pcm_substream *substream, int cmd)
212{
213 struct snd_soc_pcm_runtime *rtd = substream->private_data;
214 struct rt5514_dsp *rt5514_dsp =
215 snd_soc_platform_get_drvdata(rtd->platform);
216
217 if (cmd == SNDRV_PCM_TRIGGER_START) {
218 if (rt5514_dsp->buf_base && rt5514_dsp->buf_limit &&
219 rt5514_dsp->buf_rp && rt5514_dsp->buf_size)
220 schedule_delayed_work(&rt5514_dsp->copy_work, 0);
221 }
222
223 return 0;
224}
225
226static snd_pcm_uframes_t rt5514_spi_pcm_pointer( 228static snd_pcm_uframes_t rt5514_spi_pcm_pointer(
227 struct snd_pcm_substream *substream) 229 struct snd_pcm_substream *substream)
228{ 230{
@@ -238,8 +240,6 @@ static const struct snd_pcm_ops rt5514_spi_pcm_ops = {
238 .open = rt5514_spi_pcm_open, 240 .open = rt5514_spi_pcm_open,
239 .hw_params = rt5514_spi_hw_params, 241 .hw_params = rt5514_spi_hw_params,
240 .hw_free = rt5514_spi_hw_free, 242 .hw_free = rt5514_spi_hw_free,
241 .trigger = rt5514_spi_trigger,
242 .prepare = rt5514_spi_prepare,
243 .pointer = rt5514_spi_pcm_pointer, 243 .pointer = rt5514_spi_pcm_pointer,
244 .mmap = snd_pcm_lib_mmap_vmalloc, 244 .mmap = snd_pcm_lib_mmap_vmalloc,
245 .page = snd_pcm_lib_get_vmalloc_page, 245 .page = snd_pcm_lib_get_vmalloc_page,
@@ -248,6 +248,7 @@ static const struct snd_pcm_ops rt5514_spi_pcm_ops = {
248static int rt5514_spi_pcm_probe(struct snd_soc_platform *platform) 248static int rt5514_spi_pcm_probe(struct snd_soc_platform *platform)
249{ 249{
250 struct rt5514_dsp *rt5514_dsp; 250 struct rt5514_dsp *rt5514_dsp;
251 int ret;
251 252
252 rt5514_dsp = devm_kzalloc(platform->dev, sizeof(*rt5514_dsp), 253 rt5514_dsp = devm_kzalloc(platform->dev, sizeof(*rt5514_dsp),
253 GFP_KERNEL); 254 GFP_KERNEL);
@@ -257,10 +258,21 @@ static int rt5514_spi_pcm_probe(struct snd_soc_platform *platform)
257 INIT_DELAYED_WORK(&rt5514_dsp->copy_work, rt5514_spi_copy_work); 258 INIT_DELAYED_WORK(&rt5514_dsp->copy_work, rt5514_spi_copy_work);
258 snd_soc_platform_set_drvdata(platform, rt5514_dsp); 259 snd_soc_platform_set_drvdata(platform, rt5514_dsp);
259 260
261 if (rt5514_spi->irq) {
262 ret = devm_request_threaded_irq(&rt5514_spi->dev,
263 rt5514_spi->irq, NULL, rt5514_spi_irq,
264 IRQF_TRIGGER_RISING | IRQF_ONESHOT, "rt5514-spi",
265 rt5514_dsp);
266 if (ret)
267 dev_err(&rt5514_spi->dev,
268 "%s Failed to reguest IRQ: %d\n", __func__,
269 ret);
270 }
271
260 return 0; 272 return 0;
261} 273}
262 274
263static struct snd_soc_platform_driver rt5514_spi_platform = { 275static const struct snd_soc_platform_driver rt5514_spi_platform = {
264 .probe = rt5514_spi_pcm_probe, 276 .probe = rt5514_spi_pcm_probe,
265 .ops = &rt5514_spi_pcm_ops, 277 .ops = &rt5514_spi_pcm_ops,
266}; 278};
diff --git a/sound/soc/codecs/rt5514-spi.h b/sound/soc/codecs/rt5514-spi.h
index f69b1cdf2f9b..a6434ee6ff03 100644
--- a/sound/soc/codecs/rt5514-spi.h
+++ b/sound/soc/codecs/rt5514-spi.h
@@ -17,10 +17,9 @@
17*/ 17*/
18#define RT5514_SPI_BUF_LEN 240 18#define RT5514_SPI_BUF_LEN 240
19 19
20#define RT5514_BUFFER_VOICE_BASE 0x18001034 20#define RT5514_BUFFER_VOICE_BASE 0x18000200
21#define RT5514_BUFFER_VOICE_LIMIT 0x18001038 21#define RT5514_BUFFER_VOICE_LIMIT 0x18000204
22#define RT5514_BUFFER_VOICE_RP 0x1800103c 22#define RT5514_BUFFER_VOICE_WP 0x1800020c
23#define RT5514_BUFFER_VOICE_SIZE 0x18001040
24 23
25/* SPI Command */ 24/* SPI Command */
26enum { 25enum {
diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c
index 1b6796c4c471..0945d212b8dc 100644
--- a/sound/soc/codecs/rt5514.c
+++ b/sound/soc/codecs/rt5514.c
@@ -31,7 +31,7 @@
31 31
32#include "rl6231.h" 32#include "rl6231.h"
33#include "rt5514.h" 33#include "rt5514.h"
34#if defined(CONFIG_SND_SOC_RT5514_SPI) 34#if IS_ENABLED(CONFIG_SND_SOC_RT5514_SPI)
35#include "rt5514-spi.h" 35#include "rt5514-spi.h"
36#endif 36#endif
37 37
@@ -63,6 +63,9 @@ static const struct reg_sequence rt5514_patch[] = {
63 {RT5514_SRC_CTRL, 0x44000eee}, 63 {RT5514_SRC_CTRL, 0x44000eee},
64 {RT5514_ANA_CTRL_LDO10, 0x00028604}, 64 {RT5514_ANA_CTRL_LDO10, 0x00028604},
65 {RT5514_ANA_CTRL_ADCFED, 0x00000800}, 65 {RT5514_ANA_CTRL_ADCFED, 0x00000800},
66 {RT5514_ASRC_IN_CTRL1, 0x00000003},
67 {RT5514_DOWNFILTER0_CTRL3, 0x10000362},
68 {RT5514_DOWNFILTER1_CTRL3, 0x10000362},
66}; 69};
67 70
68static const struct reg_default rt5514_reg[] = { 71static const struct reg_default rt5514_reg[] = {
@@ -88,10 +91,10 @@ static const struct reg_default rt5514_reg[] = {
88 {RT5514_DELAY_BUF_CTRL3, 0x00000000}, 91 {RT5514_DELAY_BUF_CTRL3, 0x00000000},
89 {RT5514_DOWNFILTER0_CTRL1, 0x00020c2f}, 92 {RT5514_DOWNFILTER0_CTRL1, 0x00020c2f},
90 {RT5514_DOWNFILTER0_CTRL2, 0x00020c2f}, 93 {RT5514_DOWNFILTER0_CTRL2, 0x00020c2f},
91 {RT5514_DOWNFILTER0_CTRL3, 0x00000362}, 94 {RT5514_DOWNFILTER0_CTRL3, 0x10000362},
92 {RT5514_DOWNFILTER1_CTRL1, 0x00020c2f}, 95 {RT5514_DOWNFILTER1_CTRL1, 0x00020c2f},
93 {RT5514_DOWNFILTER1_CTRL2, 0x00020c2f}, 96 {RT5514_DOWNFILTER1_CTRL2, 0x00020c2f},
94 {RT5514_DOWNFILTER1_CTRL3, 0x00000362}, 97 {RT5514_DOWNFILTER1_CTRL3, 0x10000362},
95 {RT5514_ANA_CTRL_LDO10, 0x00028604}, 98 {RT5514_ANA_CTRL_LDO10, 0x00028604},
96 {RT5514_ANA_CTRL_LDO18_16, 0x02000345}, 99 {RT5514_ANA_CTRL_LDO18_16, 0x02000345},
97 {RT5514_ANA_CTRL_ADC12, 0x0000a2a8}, 100 {RT5514_ANA_CTRL_ADC12, 0x0000a2a8},
@@ -311,7 +314,7 @@ static int rt5514_dsp_voice_wake_up_put(struct snd_kcontrol *kcontrol,
311 314
312 request_firmware(&fw, RT5514_FIRMWARE1, codec->dev); 315 request_firmware(&fw, RT5514_FIRMWARE1, codec->dev);
313 if (fw) { 316 if (fw) {
314#if defined(CONFIG_SND_SOC_RT5514_SPI) 317#if IS_ENABLED(CONFIG_SND_SOC_RT5514_SPI)
315 rt5514_spi_burst_write(0x4ff60000, fw->data, 318 rt5514_spi_burst_write(0x4ff60000, fw->data,
316 ((fw->size/8)+1)*8); 319 ((fw->size/8)+1)*8);
317#else 320#else
@@ -324,7 +327,7 @@ static int rt5514_dsp_voice_wake_up_put(struct snd_kcontrol *kcontrol,
324 327
325 request_firmware(&fw, RT5514_FIRMWARE2, codec->dev); 328 request_firmware(&fw, RT5514_FIRMWARE2, codec->dev);
326 if (fw) { 329 if (fw) {
327#if defined(CONFIG_SND_SOC_RT5514_SPI) 330#if IS_ENABLED(CONFIG_SND_SOC_RT5514_SPI)
328 rt5514_spi_burst_write(0x4ffc0000, fw->data, 331 rt5514_spi_burst_write(0x4ffc0000, fw->data,
329 ((fw->size/8)+1)*8); 332 ((fw->size/8)+1)*8);
330#else 333#else
@@ -335,6 +338,39 @@ static int rt5514_dsp_voice_wake_up_put(struct snd_kcontrol *kcontrol,
335 fw = NULL; 338 fw = NULL;
336 } 339 }
337 340
341 if (rt5514->model_buf && rt5514->model_len) {
342#if IS_ENABLED(CONFIG_SND_SOC_RT5514_SPI)
343 int ret;
344
345 ret = rt5514_spi_burst_write(0x4ff80000,
346 rt5514->model_buf,
347 ((rt5514->model_len / 8) + 1) * 8);
348 if (ret) {
349 dev_err(codec->dev,
350 "Model load failed %d\n", ret);
351 return ret;
352 }
353#else
354 dev_err(codec->dev,
355 "No SPI driver for loading firmware\n");
356#endif
357 } else {
358 request_firmware(&fw, RT5514_FIRMWARE3,
359 codec->dev);
360 if (fw) {
361#if IS_ENABLED(CONFIG_SND_SOC_RT5514_SPI)
362 rt5514_spi_burst_write(0x4ff80000,
363 fw->data,
364 ((fw->size/8)+1)*8);
365#else
366 dev_err(codec->dev,
367 "No SPI driver to load fw\n");
368#endif
369 release_firmware(fw);
370 fw = NULL;
371 }
372 }
373
338 /* DSP run */ 374 /* DSP run */
339 regmap_write(rt5514->i2c_regmap, 0x18002f00, 375 regmap_write(rt5514->i2c_regmap, 0x18002f00,
340 0x00055148); 376 0x00055148);
@@ -349,6 +385,34 @@ static int rt5514_dsp_voice_wake_up_put(struct snd_kcontrol *kcontrol,
349 return 0; 385 return 0;
350} 386}
351 387
388static int rt5514_hotword_model_put(struct snd_kcontrol *kcontrol,
389 const unsigned int __user *bytes, unsigned int size)
390{
391 struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
392 struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component);
393 struct snd_soc_codec *codec = rt5514->codec;
394 int ret = 0;
395
396 if (rt5514->model_buf || rt5514->model_len < size) {
397 if (rt5514->model_buf)
398 devm_kfree(codec->dev, rt5514->model_buf);
399 rt5514->model_buf = devm_kmalloc(codec->dev, size, GFP_KERNEL);
400 if (!rt5514->model_buf) {
401 ret = -ENOMEM;
402 goto done;
403 }
404 }
405
406 /* Skips the TLV header. */
407 bytes += 2;
408
409 if (copy_from_user(rt5514->model_buf, bytes, size))
410 ret = -EFAULT;
411done:
412 rt5514->model_len = (ret ? 0 : size);
413 return ret;
414}
415
352static const struct snd_kcontrol_new rt5514_snd_controls[] = { 416static const struct snd_kcontrol_new rt5514_snd_controls[] = {
353 SOC_DOUBLE_TLV("MIC Boost Volume", RT5514_ANA_CTRL_MICBST, 417 SOC_DOUBLE_TLV("MIC Boost Volume", RT5514_ANA_CTRL_MICBST,
354 RT5514_SEL_BSTL_SFT, RT5514_SEL_BSTR_SFT, 8, 0, bst_tlv), 418 RT5514_SEL_BSTL_SFT, RT5514_SEL_BSTR_SFT, 8, 0, bst_tlv),
@@ -360,6 +424,8 @@ static const struct snd_kcontrol_new rt5514_snd_controls[] = {
360 adc_vol_tlv), 424 adc_vol_tlv),
361 SOC_SINGLE_EXT("DSP Voice Wake Up", SND_SOC_NOPM, 0, 1, 0, 425 SOC_SINGLE_EXT("DSP Voice Wake Up", SND_SOC_NOPM, 0, 1, 0,
362 rt5514_dsp_voice_wake_up_get, rt5514_dsp_voice_wake_up_put), 426 rt5514_dsp_voice_wake_up_get, rt5514_dsp_voice_wake_up_put),
427 SND_SOC_BYTES_TLV("Hotword Model", 0x8504,
428 NULL, rt5514_hotword_model_put),
363}; 429};
364 430
365/* ADC Mixer*/ 431/* ADC Mixer*/
@@ -471,33 +537,13 @@ static int rt5514_is_sys_clk_from_pll(struct snd_soc_dapm_widget *source,
471 return 0; 537 return 0;
472} 538}
473 539
474static int rt5514_pre_event(struct snd_soc_dapm_widget *w, 540static int rt5514_i2s_use_asrc(struct snd_soc_dapm_widget *source,
475 struct snd_kcontrol *kcontrol, int event) 541 struct snd_soc_dapm_widget *sink)
476{ 542{
477 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); 543 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm);
478 struct rt5514_priv *rt5514 = snd_soc_codec_get_drvdata(codec); 544 struct rt5514_priv *rt5514 = snd_soc_codec_get_drvdata(codec);
479 545
480 switch (event) { 546 return (rt5514->sysclk > rt5514->lrck * 384);
481 case SND_SOC_DAPM_PRE_PMU:
482 /**
483 * If the DSP is enabled in start of recording, the DSP
484 * should be disabled, and sync back to normal recording
485 * settings to make sure recording properly.
486 */
487 if (rt5514->dsp_enabled) {
488 rt5514->dsp_enabled = 0;
489 regmap_multi_reg_write(rt5514->i2c_regmap,
490 rt5514_i2c_patch, ARRAY_SIZE(rt5514_i2c_patch));
491 regcache_mark_dirty(rt5514->regmap);
492 regcache_sync(rt5514->regmap);
493 }
494 break;
495
496 default:
497 return 0;
498 }
499
500 return 0;
501} 547}
502 548
503static const struct snd_soc_dapm_widget rt5514_dapm_widgets[] = { 549static const struct snd_soc_dapm_widget rt5514_dapm_widgets[] = {
@@ -570,6 +616,10 @@ static const struct snd_soc_dapm_widget rt5514_dapm_widgets[] = {
570 RT5514_POW_PLL1_LDO_BIT, 0, NULL, 0), 616 RT5514_POW_PLL1_LDO_BIT, 0, NULL, 0),
571 SND_SOC_DAPM_SUPPLY("PLL1", RT5514_PWR_ANA2, RT5514_POW_PLL1_BIT, 0, 617 SND_SOC_DAPM_SUPPLY("PLL1", RT5514_PWR_ANA2, RT5514_POW_PLL1_BIT, 0,
572 NULL, 0), 618 NULL, 0),
619 SND_SOC_DAPM_SUPPLY_S("ASRC AD1", 1, RT5514_CLK_CTRL2,
620 RT5514_CLK_AD0_ASRC_EN_BIT, 0, NULL, 0),
621 SND_SOC_DAPM_SUPPLY_S("ASRC AD2", 1, RT5514_CLK_CTRL2,
622 RT5514_CLK_AD1_ASRC_EN_BIT, 0, NULL, 0),
573 623
574 /* ADC Mux */ 624 /* ADC Mux */
575 SND_SOC_DAPM_MUX("Stereo1 DMIC Mux", SND_SOC_NOPM, 0, 0, 625 SND_SOC_DAPM_MUX("Stereo1 DMIC Mux", SND_SOC_NOPM, 0, 0,
@@ -607,8 +657,6 @@ static const struct snd_soc_dapm_widget rt5514_dapm_widgets[] = {
607 657
608 /* Audio Interface */ 658 /* Audio Interface */
609 SND_SOC_DAPM_AIF_OUT("AIF1TX", "AIF1 Capture", 0, SND_SOC_NOPM, 0, 0), 659 SND_SOC_DAPM_AIF_OUT("AIF1TX", "AIF1 Capture", 0, SND_SOC_NOPM, 0, 0),
610
611 SND_SOC_DAPM_PRE("DAPM Pre", rt5514_pre_event),
612}; 660};
613 661
614static const struct snd_soc_dapm_route rt5514_dapm_routes[] = { 662static const struct snd_soc_dapm_route rt5514_dapm_routes[] = {
@@ -669,6 +717,7 @@ static const struct snd_soc_dapm_route rt5514_dapm_routes[] = {
669 { "Stereo1 ADC MIX", NULL, "Stereo1 ADC MIXR" }, 717 { "Stereo1 ADC MIX", NULL, "Stereo1 ADC MIXR" },
670 { "Stereo1 ADC MIX", NULL, "adc stereo1 filter" }, 718 { "Stereo1 ADC MIX", NULL, "adc stereo1 filter" },
671 { "adc stereo1 filter", NULL, "PLL1", rt5514_is_sys_clk_from_pll }, 719 { "adc stereo1 filter", NULL, "PLL1", rt5514_is_sys_clk_from_pll },
720 { "adc stereo1 filter", NULL, "ASRC AD1", rt5514_i2s_use_asrc },
672 721
673 { "Stereo2 DMIC Mux", "DMIC1", "DMIC1" }, 722 { "Stereo2 DMIC Mux", "DMIC1", "DMIC1" },
674 { "Stereo2 DMIC Mux", "DMIC2", "DMIC2" }, 723 { "Stereo2 DMIC Mux", "DMIC2", "DMIC2" },
@@ -685,6 +734,7 @@ static const struct snd_soc_dapm_route rt5514_dapm_routes[] = {
685 { "Stereo2 ADC MIX", NULL, "Stereo2 ADC MIXR" }, 734 { "Stereo2 ADC MIX", NULL, "Stereo2 ADC MIXR" },
686 { "Stereo2 ADC MIX", NULL, "adc stereo2 filter" }, 735 { "Stereo2 ADC MIX", NULL, "adc stereo2 filter" },
687 { "adc stereo2 filter", NULL, "PLL1", rt5514_is_sys_clk_from_pll }, 736 { "adc stereo2 filter", NULL, "PLL1", rt5514_is_sys_clk_from_pll },
737 { "adc stereo2 filter", NULL, "ASRC AD2", rt5514_i2s_use_asrc },
688 738
689 { "AIF1TX", NULL, "Stereo1 ADC MIX"}, 739 { "AIF1TX", NULL, "Stereo1 ADC MIX"},
690 { "AIF1TX", NULL, "Stereo2 ADC MIX"}, 740 { "AIF1TX", NULL, "Stereo2 ADC MIX"},
@@ -737,6 +787,9 @@ static int rt5514_hw_params(struct snd_pcm_substream *substream,
737 787
738 regmap_update_bits(rt5514->regmap, RT5514_I2S_CTRL1, RT5514_I2S_DL_MASK, 788 regmap_update_bits(rt5514->regmap, RT5514_I2S_CTRL1, RT5514_I2S_DL_MASK,
739 val_len); 789 val_len);
790 regmap_update_bits(rt5514->regmap, RT5514_CLK_CTRL1,
791 RT5514_CLK_AD_ANA1_SEL_MASK,
792 (pre_div + 1) << RT5514_CLK_AD_ANA1_SEL_SFT);
740 regmap_update_bits(rt5514->regmap, RT5514_CLK_CTRL2, 793 regmap_update_bits(rt5514->regmap, RT5514_CLK_CTRL2,
741 RT5514_CLK_SYS_DIV_OUT_MASK | RT5514_SEL_ADC_OSR_MASK, 794 RT5514_CLK_SYS_DIV_OUT_MASK | RT5514_SEL_ADC_OSR_MASK,
742 pre_div << RT5514_CLK_SYS_DIV_OUT_SFT | 795 pre_div << RT5514_CLK_SYS_DIV_OUT_SFT |
@@ -902,11 +955,38 @@ static int rt5514_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
902{ 955{
903 struct snd_soc_codec *codec = dai->codec; 956 struct snd_soc_codec *codec = dai->codec;
904 struct rt5514_priv *rt5514 = snd_soc_codec_get_drvdata(codec); 957 struct rt5514_priv *rt5514 = snd_soc_codec_get_drvdata(codec);
905 unsigned int val = 0; 958 unsigned int val = 0, val2 = 0;
906 959
907 if (rx_mask || tx_mask) 960 if (rx_mask || tx_mask)
908 val |= RT5514_TDM_MODE; 961 val |= RT5514_TDM_MODE;
909 962
963 switch (tx_mask) {
964 case 0x3:
965 val2 |= RT5514_TDM_DOCKING_MODE | RT5514_TDM_DOCKING_VALID_CH2 |
966 RT5514_TDM_DOCKING_START_SLOT0;
967 break;
968
969 case 0x30:
970 val2 |= RT5514_TDM_DOCKING_MODE | RT5514_TDM_DOCKING_VALID_CH2 |
971 RT5514_TDM_DOCKING_START_SLOT4;
972 break;
973
974 case 0xf:
975 val2 |= RT5514_TDM_DOCKING_MODE | RT5514_TDM_DOCKING_VALID_CH4 |
976 RT5514_TDM_DOCKING_START_SLOT0;
977 break;
978
979 case 0xf0:
980 val2 |= RT5514_TDM_DOCKING_MODE | RT5514_TDM_DOCKING_VALID_CH4 |
981 RT5514_TDM_DOCKING_START_SLOT4;
982 break;
983
984 default:
985 break;
986 }
987
988
989
910 switch (slots) { 990 switch (slots) {
911 case 4: 991 case 4:
912 val |= RT5514_TDMSLOT_SEL_RX_4CH | RT5514_TDMSLOT_SEL_TX_4CH; 992 val |= RT5514_TDMSLOT_SEL_RX_4CH | RT5514_TDMSLOT_SEL_TX_4CH;
@@ -952,6 +1032,10 @@ static int rt5514_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
952 RT5514_CH_LEN_RX_MASK | RT5514_CH_LEN_TX_MASK | 1032 RT5514_CH_LEN_RX_MASK | RT5514_CH_LEN_TX_MASK |
953 RT5514_TDM_MODE2, val); 1033 RT5514_TDM_MODE2, val);
954 1034
1035 regmap_update_bits(rt5514->regmap, RT5514_I2S_CTRL2,
1036 RT5514_TDM_DOCKING_MODE | RT5514_TDM_DOCKING_VALID_CH_MASK |
1037 RT5514_TDM_DOCKING_START_MASK, val2);
1038
955 return 0; 1039 return 0;
956} 1040}
957 1041
@@ -975,6 +1059,24 @@ static int rt5514_set_bias_level(struct snd_soc_codec *codec,
975 } 1059 }
976 break; 1060 break;
977 1061
1062 case SND_SOC_BIAS_STANDBY:
1063 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) {
1064 /*
1065 * If the DSP is enabled in start of recording, the DSP
1066 * should be disabled, and sync back to normal recording
1067 * settings to make sure recording properly.
1068 */
1069 if (rt5514->dsp_enabled) {
1070 rt5514->dsp_enabled = 0;
1071 regmap_multi_reg_write(rt5514->i2c_regmap,
1072 rt5514_i2c_patch,
1073 ARRAY_SIZE(rt5514_i2c_patch));
1074 regcache_mark_dirty(rt5514->regmap);
1075 regcache_sync(rt5514->regmap);
1076 }
1077 }
1078 break;
1079
978 default: 1080 default:
979 break; 1081 break;
980 } 1082 }
@@ -1019,7 +1121,7 @@ static int rt5514_i2c_write(void *context, unsigned int reg, unsigned int val)
1019#define RT5514_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 1121#define RT5514_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
1020 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) 1122 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
1021 1123
1022struct snd_soc_dai_ops rt5514_aif_dai_ops = { 1124static const struct snd_soc_dai_ops rt5514_aif_dai_ops = {
1023 .hw_params = rt5514_hw_params, 1125 .hw_params = rt5514_hw_params,
1024 .set_fmt = rt5514_set_dai_fmt, 1126 .set_fmt = rt5514_set_dai_fmt,
1025 .set_sysclk = rt5514_set_dai_sysclk, 1127 .set_sysclk = rt5514_set_dai_sysclk,
@@ -1027,7 +1129,7 @@ struct snd_soc_dai_ops rt5514_aif_dai_ops = {
1027 .set_tdm_slot = rt5514_set_tdm_slot, 1129 .set_tdm_slot = rt5514_set_tdm_slot,
1028}; 1130};
1029 1131
1030struct snd_soc_dai_driver rt5514_dai[] = { 1132static struct snd_soc_dai_driver rt5514_dai[] = {
1031 { 1133 {
1032 .name = "rt5514-aif1", 1134 .name = "rt5514-aif1",
1033 .id = 0, 1135 .id = 0,
@@ -1042,7 +1144,7 @@ struct snd_soc_dai_driver rt5514_dai[] = {
1042 } 1144 }
1043}; 1145};
1044 1146
1045static struct snd_soc_codec_driver soc_codec_dev_rt5514 = { 1147static const struct snd_soc_codec_driver soc_codec_dev_rt5514 = {
1046 .probe = rt5514_probe, 1148 .probe = rt5514_probe,
1047 .idle_bias_off = true, 1149 .idle_bias_off = true,
1048 .set_bias_level = rt5514_set_bias_level, 1150 .set_bias_level = rt5514_set_bias_level,
@@ -1097,7 +1199,7 @@ MODULE_DEVICE_TABLE(of, rt5514_of_match);
1097#endif 1199#endif
1098 1200
1099#ifdef CONFIG_ACPI 1201#ifdef CONFIG_ACPI
1100static struct acpi_device_id rt5514_acpi_match[] = { 1202static const struct acpi_device_id rt5514_acpi_match[] = {
1101 { "10EC5514", 0}, 1203 { "10EC5514", 0},
1102 {}, 1204 {},
1103}; 1205};
diff --git a/sound/soc/codecs/rt5514.h b/sound/soc/codecs/rt5514.h
index 02bc212a86d9..803311cb7e2a 100644
--- a/sound/soc/codecs/rt5514.h
+++ b/sound/soc/codecs/rt5514.h
@@ -37,6 +37,7 @@
37#define RT5514_PLL3_CALIB_CTRL5 0x2124 37#define RT5514_PLL3_CALIB_CTRL5 0x2124
38#define RT5514_DELAY_BUF_CTRL1 0x2140 38#define RT5514_DELAY_BUF_CTRL1 0x2140
39#define RT5514_DELAY_BUF_CTRL3 0x2148 39#define RT5514_DELAY_BUF_CTRL3 0x2148
40#define RT5514_ASRC_IN_CTRL1 0x2180
40#define RT5514_DOWNFILTER0_CTRL1 0x2190 41#define RT5514_DOWNFILTER0_CTRL1 0x2190
41#define RT5514_DOWNFILTER0_CTRL2 0x2194 42#define RT5514_DOWNFILTER0_CTRL2 0x2194
42#define RT5514_DOWNFILTER0_CTRL3 0x2198 43#define RT5514_DOWNFILTER0_CTRL3 0x2198
@@ -164,6 +165,18 @@
164#define RT5514_I2S_DL_24 (0x2 << 0) 165#define RT5514_I2S_DL_24 (0x2 << 0)
165#define RT5514_I2S_DL_8 (0x3 << 0) 166#define RT5514_I2S_DL_8 (0x3 << 0)
166 167
168/* RT5514_I2S_CTRL2 (0x2014) */
169#define RT5514_TDM_DOCKING_MODE (0x1 << 31)
170#define RT5514_TDM_DOCKING_MODE_SFT 31
171#define RT5514_TDM_DOCKING_VALID_CH_MASK (0x1 << 29)
172#define RT5514_TDM_DOCKING_VALID_CH_SFT 29
173#define RT5514_TDM_DOCKING_VALID_CH2 (0x0 << 29)
174#define RT5514_TDM_DOCKING_VALID_CH4 (0x1 << 29)
175#define RT5514_TDM_DOCKING_START_MASK (0x1 << 28)
176#define RT5514_TDM_DOCKING_START_SFT 28
177#define RT5514_TDM_DOCKING_START_SLOT0 (0x0 << 28)
178#define RT5514_TDM_DOCKING_START_SLOT4 (0x1 << 28)
179
167/* RT5514_DIG_SOURCE_CTRL (0x20a4) */ 180/* RT5514_DIG_SOURCE_CTRL (0x20a4) */
168#define RT5514_AD1_DMIC_INPUT_SEL (0x1 << 1) 181#define RT5514_AD1_DMIC_INPUT_SEL (0x1 << 1)
169#define RT5514_AD1_DMIC_INPUT_SEL_SFT 1 182#define RT5514_AD1_DMIC_INPUT_SEL_SFT 1
@@ -185,8 +198,14 @@
185#define RT5514_CLK_AD0_EN_BIT 23 198#define RT5514_CLK_AD0_EN_BIT 23
186#define RT5514_CLK_DMIC_OUT_SEL_MASK (0x7 << 8) 199#define RT5514_CLK_DMIC_OUT_SEL_MASK (0x7 << 8)
187#define RT5514_CLK_DMIC_OUT_SEL_SFT 8 200#define RT5514_CLK_DMIC_OUT_SEL_SFT 8
201#define RT5514_CLK_AD_ANA1_SEL_MASK (0xf << 0)
202#define RT5514_CLK_AD_ANA1_SEL_SFT 0
188 203
189/* RT5514_CLK_CTRL2 (0x2108) */ 204/* RT5514_CLK_CTRL2 (0x2108) */
205#define RT5514_CLK_AD1_ASRC_EN (0x1 << 17)
206#define RT5514_CLK_AD1_ASRC_EN_BIT 17
207#define RT5514_CLK_AD0_ASRC_EN (0x1 << 16)
208#define RT5514_CLK_AD0_ASRC_EN_BIT 16
190#define RT5514_CLK_SYS_DIV_OUT_MASK (0x7 << 8) 209#define RT5514_CLK_SYS_DIV_OUT_MASK (0x7 << 8)
191#define RT5514_CLK_SYS_DIV_OUT_SFT 8 210#define RT5514_CLK_SYS_DIV_OUT_SFT 8
192#define RT5514_SEL_ADC_OSR_MASK (0x7 << 4) 211#define RT5514_SEL_ADC_OSR_MASK (0x7 << 4)
@@ -236,6 +255,7 @@
236 255
237#define RT5514_FIRMWARE1 "rt5514_dsp_fw1.bin" 256#define RT5514_FIRMWARE1 "rt5514_dsp_fw1.bin"
238#define RT5514_FIRMWARE2 "rt5514_dsp_fw2.bin" 257#define RT5514_FIRMWARE2 "rt5514_dsp_fw2.bin"
258#define RT5514_FIRMWARE3 "rt5514_dsp_fw3.bin"
239 259
240/* System Clock Source */ 260/* System Clock Source */
241enum { 261enum {
@@ -262,6 +282,8 @@ struct rt5514_priv {
262 int pll_in; 282 int pll_in;
263 int pll_out; 283 int pll_out;
264 int dsp_enabled; 284 int dsp_enabled;
285 u8 *model_buf;
286 unsigned int model_len;
265}; 287};
266 288
267#endif /* __RT5514_H__ */ 289#endif /* __RT5514_H__ */
diff --git a/sound/soc/codecs/rt5616.c b/sound/soc/codecs/rt5616.c
index 7d6e0823f98f..c94e94fe8297 100644
--- a/sound/soc/codecs/rt5616.c
+++ b/sound/soc/codecs/rt5616.c
@@ -1265,7 +1265,7 @@ static int rt5616_resume(struct snd_soc_codec *codec)
1265#define RT5616_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 1265#define RT5616_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
1266 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) 1266 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
1267 1267
1268static struct snd_soc_dai_ops rt5616_aif_dai_ops = { 1268static const struct snd_soc_dai_ops rt5616_aif_dai_ops = {
1269 .hw_params = rt5616_hw_params, 1269 .hw_params = rt5616_hw_params,
1270 .set_fmt = rt5616_set_dai_fmt, 1270 .set_fmt = rt5616_set_dai_fmt,
1271 .set_sysclk = rt5616_set_dai_sysclk, 1271 .set_sysclk = rt5616_set_dai_sysclk,
@@ -1294,7 +1294,7 @@ static struct snd_soc_dai_driver rt5616_dai[] = {
1294 }, 1294 },
1295}; 1295};
1296 1296
1297static struct snd_soc_codec_driver soc_codec_dev_rt5616 = { 1297static const struct snd_soc_codec_driver soc_codec_dev_rt5616 = {
1298 .probe = rt5616_probe, 1298 .probe = rt5616_probe,
1299 .suspend = rt5616_suspend, 1299 .suspend = rt5616_suspend,
1300 .resume = rt5616_resume, 1300 .resume = rt5616_resume,
diff --git a/sound/soc/codecs/rt5631.c b/sound/soc/codecs/rt5631.c
index 0e418089c053..55b04c55fb4b 100644
--- a/sound/soc/codecs/rt5631.c
+++ b/sound/soc/codecs/rt5631.c
@@ -1653,7 +1653,7 @@ static struct snd_soc_dai_driver rt5631_dai[] = {
1653 }, 1653 },
1654}; 1654};
1655 1655
1656static struct snd_soc_codec_driver soc_codec_dev_rt5631 = { 1656static const struct snd_soc_codec_driver soc_codec_dev_rt5631 = {
1657 .probe = rt5631_probe, 1657 .probe = rt5631_probe,
1658 .set_bias_level = rt5631_set_bias_level, 1658 .set_bias_level = rt5631_set_bias_level,
1659 .suspend_bias_off = true, 1659 .suspend_bias_off = true,
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c
index 1584ccc3a87b..438fe52a12df 100644
--- a/sound/soc/codecs/rt5640.c
+++ b/sound/soc/codecs/rt5640.c
@@ -2259,7 +2259,7 @@ static struct snd_soc_dai_driver rt5640_dai[] = {
2259 }, 2259 },
2260}; 2260};
2261 2261
2262static struct snd_soc_codec_driver soc_codec_dev_rt5640 = { 2262static const struct snd_soc_codec_driver soc_codec_dev_rt5640 = {
2263 .probe = rt5640_probe, 2263 .probe = rt5640_probe,
2264 .remove = rt5640_remove, 2264 .remove = rt5640_remove,
2265 .suspend = rt5640_suspend, 2265 .suspend = rt5640_suspend,
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 9ec58166f7c4..6a7778a44853 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3473,7 +3473,7 @@ static struct snd_soc_dai_driver rt5645_dai[] = {
3473 }, 3473 },
3474}; 3474};
3475 3475
3476static struct snd_soc_codec_driver soc_codec_dev_rt5645 = { 3476static const struct snd_soc_codec_driver soc_codec_dev_rt5645 = {
3477 .probe = rt5645_probe, 3477 .probe = rt5645_probe,
3478 .remove = rt5645_remove, 3478 .remove = rt5645_remove,
3479 .suspend = rt5645_suspend, 3479 .suspend = rt5645_suspend,
@@ -3559,7 +3559,7 @@ static const struct acpi_device_id rt5645_acpi_match[] = {
3559MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match); 3559MODULE_DEVICE_TABLE(acpi, rt5645_acpi_match);
3560#endif 3560#endif
3561 3561
3562static struct rt5645_platform_data general_platform_data = { 3562static const struct rt5645_platform_data general_platform_data = {
3563 .dmic1_data_pin = RT5645_DMIC1_DISABLE, 3563 .dmic1_data_pin = RT5645_DMIC1_DISABLE,
3564 .dmic2_data_pin = RT5645_DMIC_DATA_IN2P, 3564 .dmic2_data_pin = RT5645_DMIC_DATA_IN2P,
3565 .jd_mode = 3, 3565 .jd_mode = 3,
@@ -3593,7 +3593,7 @@ static const struct dmi_system_id dmi_platform_intel_braswell[] = {
3593 { } 3593 { }
3594}; 3594};
3595 3595
3596static struct rt5645_platform_data buddy_platform_data = { 3596static const struct rt5645_platform_data buddy_platform_data = {
3597 .dmic1_data_pin = RT5645_DMIC_DATA_GPIO5, 3597 .dmic1_data_pin = RT5645_DMIC_DATA_GPIO5,
3598 .dmic2_data_pin = RT5645_DMIC_DATA_IN2P, 3598 .dmic2_data_pin = RT5645_DMIC_DATA_IN2P,
3599 .jd_mode = 3, 3599 .jd_mode = 3,
@@ -3610,7 +3610,7 @@ static struct dmi_system_id dmi_platform_intel_broadwell[] = {
3610 { } 3610 { }
3611}; 3611};
3612 3612
3613static struct rt5645_platform_data gpd_win_platform_data = { 3613static const struct rt5645_platform_data gpd_win_platform_data = {
3614 .jd_mode = 3, 3614 .jd_mode = 3,
3615 .inv_jd1_1 = true, 3615 .inv_jd1_1 = true,
3616}; 3616};
@@ -3637,6 +3637,39 @@ static const struct dmi_system_id dmi_platform_gpd_win[] = {
3637 {} 3637 {}
3638}; 3638};
3639 3639
3640static struct rt5645_platform_data general_platform_data2 = {
3641 .dmic1_data_pin = RT5645_DMIC_DATA_IN2N,
3642 .dmic2_data_pin = RT5645_DMIC2_DISABLE,
3643 .jd_mode = 3,
3644 .inv_jd1_1 = true,
3645};
3646
3647static struct dmi_system_id dmi_platform_asus_t100ha[] = {
3648 {
3649 .ident = "ASUS T100HAN",
3650 .matches = {
3651 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
3652 DMI_MATCH(DMI_PRODUCT_NAME, "T100HAN"),
3653 },
3654 },
3655 { }
3656};
3657
3658static struct rt5645_platform_data minix_z83_4_platform_data = {
3659 .jd_mode = 3,
3660};
3661
3662static struct dmi_system_id dmi_platform_minix_z83_4[] = {
3663 {
3664 .ident = "MINIX Z83-4",
3665 .matches = {
3666 DMI_EXACT_MATCH(DMI_SYS_VENDOR, "MINIX"),
3667 DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"),
3668 },
3669 },
3670 { }
3671};
3672
3640static bool rt5645_check_dp(struct device *dev) 3673static bool rt5645_check_dp(struct device *dev)
3641{ 3674{
3642 if (device_property_present(dev, "realtek,in2-differential") || 3675 if (device_property_present(dev, "realtek,in2-differential") ||
@@ -3689,6 +3722,10 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
3689 rt5645->pdata = general_platform_data; 3722 rt5645->pdata = general_platform_data;
3690 else if (dmi_check_system(dmi_platform_gpd_win)) 3723 else if (dmi_check_system(dmi_platform_gpd_win))
3691 rt5645->pdata = gpd_win_platform_data; 3724 rt5645->pdata = gpd_win_platform_data;
3725 else if (dmi_check_system(dmi_platform_asus_t100ha))
3726 rt5645->pdata = general_platform_data2;
3727 else if (dmi_check_system(dmi_platform_minix_z83_4))
3728 rt5645->pdata = minix_z83_4_platform_data;
3692 3729
3693 if (quirk != -1) { 3730 if (quirk != -1) {
3694 rt5645->pdata.in2_diff = QUIRK_IN2_DIFF(quirk); 3731 rt5645->pdata.in2_diff = QUIRK_IN2_DIFF(quirk);
diff --git a/sound/soc/codecs/rt5651.c b/sound/soc/codecs/rt5651.c
index db05b60d5002..da60b28ba3df 100644
--- a/sound/soc/codecs/rt5651.c
+++ b/sound/soc/codecs/rt5651.c
@@ -1664,7 +1664,7 @@ static struct snd_soc_dai_driver rt5651_dai[] = {
1664 }, 1664 },
1665}; 1665};
1666 1666
1667static struct snd_soc_codec_driver soc_codec_dev_rt5651 = { 1667static const struct snd_soc_codec_driver soc_codec_dev_rt5651 = {
1668 .probe = rt5651_probe, 1668 .probe = rt5651_probe,
1669 .suspend = rt5651_suspend, 1669 .suspend = rt5651_suspend,
1670 .resume = rt5651_resume, 1670 .resume = rt5651_resume,
diff --git a/sound/soc/codecs/rt5659.c b/sound/soc/codecs/rt5659.c
index 1b7060850340..71216db15eab 100644
--- a/sound/soc/codecs/rt5659.c
+++ b/sound/soc/codecs/rt5659.c
@@ -3730,7 +3730,7 @@ static struct snd_soc_dai_driver rt5659_dai[] = {
3730 }, 3730 },
3731}; 3731};
3732 3732
3733static struct snd_soc_codec_driver soc_codec_dev_rt5659 = { 3733static const struct snd_soc_codec_driver soc_codec_dev_rt5659 = {
3734 .probe = rt5659_probe, 3734 .probe = rt5659_probe,
3735 .remove = rt5659_remove, 3735 .remove = rt5659_remove,
3736 .suspend = rt5659_suspend, 3736 .suspend = rt5659_suspend,
@@ -4222,7 +4222,7 @@ MODULE_DEVICE_TABLE(of, rt5659_of_match);
4222#endif 4222#endif
4223 4223
4224#ifdef CONFIG_ACPI 4224#ifdef CONFIG_ACPI
4225static struct acpi_device_id rt5659_acpi_match[] = { 4225static const struct acpi_device_id rt5659_acpi_match[] = {
4226 { "10EC5658", 0, }, 4226 { "10EC5658", 0, },
4227 { "10EC5659", 0, }, 4227 { "10EC5659", 0, },
4228 { }, 4228 { },
diff --git a/sound/soc/codecs/rt5660.c b/sound/soc/codecs/rt5660.c
index c93490d77f2a..d22ef00e0d96 100644
--- a/sound/soc/codecs/rt5660.c
+++ b/sound/soc/codecs/rt5660.c
@@ -1197,7 +1197,7 @@ static struct snd_soc_dai_driver rt5660_dai[] = {
1197 }, 1197 },
1198}; 1198};
1199 1199
1200static struct snd_soc_codec_driver soc_codec_dev_rt5660 = { 1200static const struct snd_soc_codec_driver soc_codec_dev_rt5660 = {
1201 .probe = rt5660_probe, 1201 .probe = rt5660_probe,
1202 .remove = rt5660_remove, 1202 .remove = rt5660_remove,
1203 .suspend = rt5660_suspend, 1203 .suspend = rt5660_suspend,
diff --git a/sound/soc/codecs/rt5663.c b/sound/soc/codecs/rt5663.c
index fa550e3c1332..ab9e0ebff5a7 100644
--- a/sound/soc/codecs/rt5663.c
+++ b/sound/soc/codecs/rt5663.c
@@ -40,6 +40,7 @@ enum {
40 40
41struct rt5663_priv { 41struct rt5663_priv {
42 struct snd_soc_codec *codec; 42 struct snd_soc_codec *codec;
43 struct rt5663_platform_data pdata;
43 struct regmap *regmap; 44 struct regmap *regmap;
44 struct delayed_work jack_detect_work; 45 struct delayed_work jack_detect_work;
45 struct snd_soc_jack *hs_jack; 46 struct snd_soc_jack *hs_jack;
@@ -57,6 +58,11 @@ struct rt5663_priv {
57 int jack_type; 58 int jack_type;
58}; 59};
59 60
61static const struct reg_sequence rt5663_patch_list[] = {
62 { 0x002a, 0x8020 },
63 { 0x0086, 0x0028 },
64};
65
60static const struct reg_default rt5663_v2_reg[] = { 66static const struct reg_default rt5663_v2_reg[] = {
61 { 0x0000, 0x0000 }, 67 { 0x0000, 0x0000 },
62 { 0x0001, 0xc8c8 }, 68 { 0x0001, 0xc8c8 },
@@ -476,7 +482,7 @@ static const struct reg_default rt5663_reg[] = {
476 { 0x0023, 0x0039 }, 482 { 0x0023, 0x0039 },
477 { 0x0026, 0xc0c0 }, 483 { 0x0026, 0xc0c0 },
478 { 0x0029, 0x8080 }, 484 { 0x0029, 0x8080 },
479 { 0x002a, 0xa0a0 }, 485 { 0x002a, 0x8020 },
480 { 0x002c, 0x000c }, 486 { 0x002c, 0x000c },
481 { 0x002d, 0x0000 }, 487 { 0x002d, 0x0000 },
482 { 0x0040, 0x0808 }, 488 { 0x0040, 0x0808 },
@@ -504,7 +510,7 @@ static const struct reg_default rt5663_reg[] = {
504 { 0x0082, 0x0000 }, 510 { 0x0082, 0x0000 },
505 { 0x0083, 0x0000 }, 511 { 0x0083, 0x0000 },
506 { 0x0084, 0x0000 }, 512 { 0x0084, 0x0000 },
507 { 0x0086, 0x0008 }, 513 { 0x0086, 0x0028 },
508 { 0x0087, 0x0000 }, 514 { 0x0087, 0x0000 },
509 { 0x008a, 0x0000 }, 515 { 0x008a, 0x0000 },
510 { 0x008b, 0x0000 }, 516 { 0x008b, 0x0000 },
@@ -1508,7 +1514,7 @@ static int rt5663_v2_jack_detect(struct snd_soc_codec *codec, int jack_insert)
1508static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert) 1514static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert)
1509{ 1515{
1510 struct rt5663_priv *rt5663 = snd_soc_codec_get_drvdata(codec); 1516 struct rt5663_priv *rt5663 = snd_soc_codec_get_drvdata(codec);
1511 int val, i = 0, sleep_time[5] = {300, 150, 100, 50, 30}; 1517 int val, i = 0;
1512 1518
1513 dev_dbg(codec->dev, "%s jack_insert:%d\n", __func__, jack_insert); 1519 dev_dbg(codec->dev, "%s jack_insert:%d\n", __func__, jack_insert);
1514 1520
@@ -1543,25 +1549,68 @@ static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert)
1543 RT5663_IRQ_POW_SAV_MASK, RT5663_IRQ_POW_SAV_EN); 1549 RT5663_IRQ_POW_SAV_MASK, RT5663_IRQ_POW_SAV_EN);
1544 snd_soc_update_bits(codec, RT5663_IRQ_1, 1550 snd_soc_update_bits(codec, RT5663_IRQ_1,
1545 RT5663_EN_IRQ_JD1_MASK, RT5663_EN_IRQ_JD1_EN); 1551 RT5663_EN_IRQ_JD1_MASK, RT5663_EN_IRQ_JD1_EN);
1546 while (i < 5) { 1552
1547 msleep(sleep_time[i]); 1553 while (true) {
1548 val = snd_soc_read(codec, RT5663_EM_JACK_TYPE_2) & 1554 regmap_read(rt5663->regmap, RT5663_INT_ST_2, &val);
1549 0x0003; 1555 if (!(val & 0x80))
1550 dev_dbg(codec->dev, "%s: MX-00e7 val=%x sleep %d\n", 1556 usleep_range(10000, 10005);
1551 __func__, val, sleep_time[i]); 1557 else
1552 i++;
1553 if (val == 0x1 || val == 0x2 || val == 0x3)
1554 break; 1558 break;
1559
1560 if (i > 200)
1561 break;
1562 i++;
1555 } 1563 }
1564
1565 val = snd_soc_read(codec, RT5663_EM_JACK_TYPE_2) & 0x0003;
1556 dev_dbg(codec->dev, "%s val = %d\n", __func__, val); 1566 dev_dbg(codec->dev, "%s val = %d\n", __func__, val);
1567
1568 snd_soc_update_bits(codec, RT5663_HP_CHARGE_PUMP_1,
1569 RT5663_OSW_HP_L_MASK | RT5663_OSW_HP_R_MASK,
1570 RT5663_OSW_HP_L_EN | RT5663_OSW_HP_R_EN);
1571
1557 switch (val) { 1572 switch (val) {
1558 case 1: 1573 case 1:
1559 case 2: 1574 case 2:
1560 rt5663->jack_type = SND_JACK_HEADSET; 1575 rt5663->jack_type = SND_JACK_HEADSET;
1561 rt5663_enable_push_button_irq(codec, true); 1576 rt5663_enable_push_button_irq(codec, true);
1577
1578 if (rt5663->pdata.dc_offset_l_manual_mic) {
1579 regmap_write(rt5663->regmap, RT5663_MIC_DECRO_2,
1580 rt5663->pdata.dc_offset_l_manual_mic >>
1581 16);
1582 regmap_write(rt5663->regmap, RT5663_MIC_DECRO_3,
1583 rt5663->pdata.dc_offset_l_manual_mic &
1584 0xffff);
1585 }
1586
1587 if (rt5663->pdata.dc_offset_r_manual_mic) {
1588 regmap_write(rt5663->regmap, RT5663_MIC_DECRO_5,
1589 rt5663->pdata.dc_offset_r_manual_mic >>
1590 16);
1591 regmap_write(rt5663->regmap, RT5663_MIC_DECRO_6,
1592 rt5663->pdata.dc_offset_r_manual_mic &
1593 0xffff);
1594 }
1562 break; 1595 break;
1563 default: 1596 default:
1564 rt5663->jack_type = SND_JACK_HEADPHONE; 1597 rt5663->jack_type = SND_JACK_HEADPHONE;
1598
1599 if (rt5663->pdata.dc_offset_l_manual) {
1600 regmap_write(rt5663->regmap, RT5663_MIC_DECRO_2,
1601 rt5663->pdata.dc_offset_l_manual >> 16);
1602 regmap_write(rt5663->regmap, RT5663_MIC_DECRO_3,
1603 rt5663->pdata.dc_offset_l_manual &
1604 0xffff);
1605 }
1606
1607 if (rt5663->pdata.dc_offset_r_manual) {
1608 regmap_write(rt5663->regmap, RT5663_MIC_DECRO_5,
1609 rt5663->pdata.dc_offset_r_manual >> 16);
1610 regmap_write(rt5663->regmap, RT5663_MIC_DECRO_6,
1611 rt5663->pdata.dc_offset_r_manual &
1612 0xffff);
1613 }
1565 break; 1614 break;
1566 } 1615 }
1567 } else { 1616 } else {
@@ -1656,6 +1705,9 @@ static void rt5663_jack_detect_work(struct work_struct *work)
1656 default: 1705 default:
1657 dev_err(codec->dev, "Unknown CODEC Version\n"); 1706 dev_err(codec->dev, "Unknown CODEC Version\n");
1658 } 1707 }
1708
1709 /* Delay the jack insert report to avoid pop noise */
1710 msleep(30);
1659 } else { 1711 } else {
1660 /* jack is already in, report button event */ 1712 /* jack is already in, report button event */
1661 report = SND_JACK_HEADSET; 1713 report = SND_JACK_HEADSET;
@@ -1953,13 +2005,9 @@ static const struct snd_kcontrol_new rt5663_adda_r_mix[] = {
1953static const struct snd_kcontrol_new rt5663_sto1_dac_l_mix[] = { 2005static const struct snd_kcontrol_new rt5663_sto1_dac_l_mix[] = {
1954 SOC_DAPM_SINGLE("DAC L Switch", RT5663_STO_DAC_MIXER, 2006 SOC_DAPM_SINGLE("DAC L Switch", RT5663_STO_DAC_MIXER,
1955 RT5663_M_DAC_L1_STO_L_SHIFT, 1, 1), 2007 RT5663_M_DAC_L1_STO_L_SHIFT, 1, 1),
1956 SOC_DAPM_SINGLE("DAC R Switch", RT5663_STO_DAC_MIXER,
1957 RT5663_M_DAC_R1_STO_L_SHIFT, 1, 1),
1958}; 2008};
1959 2009
1960static const struct snd_kcontrol_new rt5663_sto1_dac_r_mix[] = { 2010static const struct snd_kcontrol_new rt5663_sto1_dac_r_mix[] = {
1961 SOC_DAPM_SINGLE("DAC L Switch", RT5663_STO_DAC_MIXER,
1962 RT5663_M_DAC_L1_STO_R_SHIFT, 1, 1),
1963 SOC_DAPM_SINGLE("DAC R Switch", RT5663_STO_DAC_MIXER, 2011 SOC_DAPM_SINGLE("DAC R Switch", RT5663_STO_DAC_MIXER,
1964 RT5663_M_DAC_R1_STO_R_SHIFT, 1, 1), 2012 RT5663_M_DAC_R1_STO_R_SHIFT, 1, 1),
1965}; 2013};
@@ -2024,10 +2072,6 @@ static int rt5663_hp_event(struct snd_soc_dapm_widget *w,
2024 RT5663_HP_SIG_SRC1_SILENCE); 2072 RT5663_HP_SIG_SRC1_SILENCE);
2025 } else { 2073 } else {
2026 snd_soc_write(codec, RT5663_DEPOP_2, 0x3003); 2074 snd_soc_write(codec, RT5663_DEPOP_2, 0x3003);
2027 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x000b,
2028 0x000b);
2029 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x0030,
2030 0x0030);
2031 snd_soc_update_bits(codec, RT5663_HP_CHARGE_PUMP_1, 2075 snd_soc_update_bits(codec, RT5663_HP_CHARGE_PUMP_1,
2032 RT5663_OVCD_HP_MASK, RT5663_OVCD_HP_DIS); 2076 RT5663_OVCD_HP_MASK, RT5663_OVCD_HP_DIS);
2033 snd_soc_write(codec, RT5663_HP_CHARGE_PUMP_2, 0x1371); 2077 snd_soc_write(codec, RT5663_HP_CHARGE_PUMP_2, 0x1371);
@@ -2036,6 +2080,8 @@ static int rt5663_hp_event(struct snd_soc_dapm_widget *w,
2036 snd_soc_write(codec, RT5663_ANA_BIAS_CUR_1, 0x7766); 2080 snd_soc_write(codec, RT5663_ANA_BIAS_CUR_1, 0x7766);
2037 snd_soc_write(codec, RT5663_HP_BIAS, 0xafaa); 2081 snd_soc_write(codec, RT5663_HP_BIAS, 0xafaa);
2038 snd_soc_write(codec, RT5663_CHARGE_PUMP_2, 0x7777); 2082 snd_soc_write(codec, RT5663_CHARGE_PUMP_2, 0x7777);
2083 snd_soc_update_bits(codec, RT5663_STO_DRE_1, 0x8000,
2084 0x8000);
2039 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x3000, 2085 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x3000,
2040 0x3000); 2086 0x3000);
2041 } 2087 }
@@ -2050,9 +2096,36 @@ static int rt5663_hp_event(struct snd_soc_dapm_widget *w,
2050 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x3000, 0x0); 2096 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x3000, 0x0);
2051 snd_soc_update_bits(codec, RT5663_HP_CHARGE_PUMP_1, 2097 snd_soc_update_bits(codec, RT5663_HP_CHARGE_PUMP_1,
2052 RT5663_OVCD_HP_MASK, RT5663_OVCD_HP_EN); 2098 RT5663_OVCD_HP_MASK, RT5663_OVCD_HP_EN);
2053 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x0030, 0x0); 2099 }
2054 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x000b, 2100 break;
2055 0x000b); 2101
2102 default:
2103 return 0;
2104 }
2105
2106 return 0;
2107}
2108
2109static int rt5663_charge_pump_event(struct snd_soc_dapm_widget *w,
2110 struct snd_kcontrol *kcontrol, int event)
2111{
2112 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
2113 struct rt5663_priv *rt5663 = snd_soc_codec_get_drvdata(codec);
2114
2115 switch (event) {
2116 case SND_SOC_DAPM_PRE_PMU:
2117 if (rt5663->codec_ver == CODEC_VER_0) {
2118 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x0030,
2119 0x0030);
2120 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x0003,
2121 0x0003);
2122 }
2123 break;
2124
2125 case SND_SOC_DAPM_POST_PMD:
2126 if (rt5663->codec_ver == CODEC_VER_0) {
2127 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x0003, 0);
2128 snd_soc_update_bits(codec, RT5663_DEPOP_1, 0x0030, 0);
2056 } 2129 }
2057 break; 2130 break;
2058 2131
@@ -2182,6 +2255,9 @@ static const struct snd_soc_dapm_widget rt5663_dapm_widgets[] = {
2182 SND_SOC_DAPM_DAC("DAC R", NULL, SND_SOC_NOPM, 0, 0), 2255 SND_SOC_DAPM_DAC("DAC R", NULL, SND_SOC_NOPM, 0, 0),
2183 2256
2184 /* Headphone*/ 2257 /* Headphone*/
2258 SND_SOC_DAPM_SUPPLY("HP Charge Pump", SND_SOC_NOPM, 0, 0,
2259 rt5663_charge_pump_event, SND_SOC_DAPM_PRE_PMU |
2260 SND_SOC_DAPM_POST_PMD),
2185 SND_SOC_DAPM_PGA_S("HP Amp", 1, SND_SOC_NOPM, 0, 0, rt5663_hp_event, 2261 SND_SOC_DAPM_PGA_S("HP Amp", 1, SND_SOC_NOPM, 0, 0, rt5663_hp_event,
2186 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU), 2262 SND_SOC_DAPM_PRE_PMD | SND_SOC_DAPM_POST_PMU),
2187 2263
@@ -2330,14 +2406,13 @@ static const struct snd_soc_dapm_route rt5663_dapm_routes[] = {
2330 { "DAC R1", NULL, "ADDA MIXR" }, 2406 { "DAC R1", NULL, "ADDA MIXR" },
2331 2407
2332 { "STO1 DAC MIXL", "DAC L Switch", "DAC L1" }, 2408 { "STO1 DAC MIXL", "DAC L Switch", "DAC L1" },
2333 { "STO1 DAC MIXL", "DAC R Switch", "DAC R1" },
2334 { "STO1 DAC MIXL", NULL, "STO1 DAC L Power" }, 2409 { "STO1 DAC MIXL", NULL, "STO1 DAC L Power" },
2335 { "STO1 DAC MIXL", NULL, "STO1 DAC Filter" }, 2410 { "STO1 DAC MIXL", NULL, "STO1 DAC Filter" },
2336 { "STO1 DAC MIXR", "DAC R Switch", "DAC R1" }, 2411 { "STO1 DAC MIXR", "DAC R Switch", "DAC R1" },
2337 { "STO1 DAC MIXR", "DAC L Switch", "DAC L1" },
2338 { "STO1 DAC MIXR", NULL, "STO1 DAC R Power" }, 2412 { "STO1 DAC MIXR", NULL, "STO1 DAC R Power" },
2339 { "STO1 DAC MIXR", NULL, "STO1 DAC Filter" }, 2413 { "STO1 DAC MIXR", NULL, "STO1 DAC Filter" },
2340 2414
2415 { "HP Amp", NULL, "HP Charge Pump" },
2341 { "HP Amp", NULL, "DAC L" }, 2416 { "HP Amp", NULL, "DAC L" },
2342 { "HP Amp", NULL, "DAC R" }, 2417 { "HP Amp", NULL, "DAC R" },
2343}; 2418};
@@ -2860,7 +2935,7 @@ static int rt5663_resume(struct snd_soc_codec *codec)
2860#define RT5663_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ 2935#define RT5663_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \
2861 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8) 2936 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S8)
2862 2937
2863static struct snd_soc_dai_ops rt5663_aif_dai_ops = { 2938static const struct snd_soc_dai_ops rt5663_aif_dai_ops = {
2864 .hw_params = rt5663_hw_params, 2939 .hw_params = rt5663_hw_params,
2865 .set_fmt = rt5663_set_dai_fmt, 2940 .set_fmt = rt5663_set_dai_fmt,
2866 .set_sysclk = rt5663_set_dai_sysclk, 2941 .set_sysclk = rt5663_set_dai_sysclk,
@@ -2891,7 +2966,7 @@ static struct snd_soc_dai_driver rt5663_dai[] = {
2891 }, 2966 },
2892}; 2967};
2893 2968
2894static struct snd_soc_codec_driver soc_codec_dev_rt5663 = { 2969static const struct snd_soc_codec_driver soc_codec_dev_rt5663 = {
2895 .probe = rt5663_probe, 2970 .probe = rt5663_probe,
2896 .remove = rt5663_remove, 2971 .remove = rt5663_remove,
2897 .suspend = rt5663_suspend, 2972 .suspend = rt5663_suspend,
@@ -2956,7 +3031,7 @@ MODULE_DEVICE_TABLE(of, rt5663_of_match);
2956#endif 3031#endif
2957 3032
2958#ifdef CONFIG_ACPI 3033#ifdef CONFIG_ACPI
2959static struct acpi_device_id rt5663_acpi_match[] = { 3034static const struct acpi_device_id rt5663_acpi_match[] = {
2960 { "10EC5663", 0}, 3035 { "10EC5663", 0},
2961 {}, 3036 {},
2962}; 3037};
@@ -2986,47 +3061,93 @@ static void rt5663_calibrate(struct rt5663_priv *rt5663)
2986{ 3061{
2987 int value, count; 3062 int value, count;
2988 3063
2989 regmap_write(rt5663->regmap, RT5663_RC_CLK, 0x0280); 3064 regmap_write(rt5663->regmap, RT5663_RESET, 0x0000);
3065 msleep(20);
3066 regmap_write(rt5663->regmap, RT5663_ANA_BIAS_CUR_4, 0x00a1);
3067 regmap_write(rt5663->regmap, RT5663_RC_CLK, 0x0380);
2990 regmap_write(rt5663->regmap, RT5663_GLB_CLK, 0x8000); 3068 regmap_write(rt5663->regmap, RT5663_GLB_CLK, 0x8000);
2991 regmap_write(rt5663->regmap, RT5663_DIG_MISC, 0x8001); 3069 regmap_write(rt5663->regmap, RT5663_ADDA_CLK_1, 0x1000);
2992 regmap_write(rt5663->regmap, RT5663_VREF_RECMIX, 0x0032); 3070 regmap_write(rt5663->regmap, RT5663_VREF_RECMIX, 0x0032);
2993 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_1, 0xa2be); 3071 regmap_write(rt5663->regmap, RT5663_HP_IMP_SEN_19, 0x000c);
2994 msleep(20); 3072 regmap_write(rt5663->regmap, RT5663_DUMMY_1, 0x0324);
2995 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_1, 0xf2be); 3073 regmap_write(rt5663->regmap, RT5663_DIG_MISC, 0x8001);
2996 regmap_write(rt5663->regmap, RT5663_PWR_DIG_2, 0x8400); 3074 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_1, 0xa23b);
2997 regmap_write(rt5663->regmap, RT5663_CHOP_ADC, 0x3000); 3075 msleep(30);
2998 regmap_write(rt5663->regmap, RT5663_DEPOP_1, 0x003b); 3076 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_1, 0xf23b);
2999 regmap_write(rt5663->regmap, RT5663_PWR_DIG_1, 0x8df8); 3077 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_2, 0x8000);
3000 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_2, 0x0003); 3078 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_3, 0x0008);
3001 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_3, 0x018c);
3002 regmap_write(rt5663->regmap, RT5663_ADDA_CLK_1, 0x1111);
3003 regmap_write(rt5663->regmap, RT5663_PRE_DIV_GATING_1, 0xffff); 3079 regmap_write(rt5663->regmap, RT5663_PRE_DIV_GATING_1, 0xffff);
3004 regmap_write(rt5663->regmap, RT5663_PRE_DIV_GATING_2, 0xffff); 3080 regmap_write(rt5663->regmap, RT5663_PRE_DIV_GATING_2, 0xffff);
3081 regmap_write(rt5663->regmap, RT5663_CBJ_1, 0x8c10);
3082 regmap_write(rt5663->regmap, RT5663_IL_CMD_2, 0x00c1);
3083 regmap_write(rt5663->regmap, RT5663_EM_JACK_TYPE_1, 0xb880);
3084 regmap_write(rt5663->regmap, RT5663_EM_JACK_TYPE_2, 0x4110);
3085 regmap_write(rt5663->regmap, RT5663_EM_JACK_TYPE_2, 0x4118);
3086
3087 count = 0;
3088 while (true) {
3089 regmap_read(rt5663->regmap, RT5663_INT_ST_2, &value);
3090 if (!(value & 0x80))
3091 usleep_range(10000, 10005);
3092 else
3093 break;
3094
3095 if (++count > 200)
3096 break;
3097 }
3098
3099 regmap_write(rt5663->regmap, RT5663_HP_IMP_SEN_19, 0x0000);
3005 regmap_write(rt5663->regmap, RT5663_DEPOP_2, 0x3003); 3100 regmap_write(rt5663->regmap, RT5663_DEPOP_2, 0x3003);
3101 regmap_write(rt5663->regmap, RT5663_DEPOP_1, 0x0038);
3006 regmap_write(rt5663->regmap, RT5663_DEPOP_1, 0x003b); 3102 regmap_write(rt5663->regmap, RT5663_DEPOP_1, 0x003b);
3103 regmap_write(rt5663->regmap, RT5663_PWR_DIG_2, 0x8400);
3104 regmap_write(rt5663->regmap, RT5663_PWR_DIG_1, 0x8df8);
3105 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_2, 0x8003);
3106 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_3, 0x018c);
3007 regmap_write(rt5663->regmap, RT5663_HP_CHARGE_PUMP_1, 0x1e32); 3107 regmap_write(rt5663->regmap, RT5663_HP_CHARGE_PUMP_1, 0x1e32);
3008 regmap_write(rt5663->regmap, RT5663_HP_CHARGE_PUMP_2, 0x1371);
3009 regmap_write(rt5663->regmap, RT5663_DACREF_LDO, 0x3b0b); 3108 regmap_write(rt5663->regmap, RT5663_DACREF_LDO, 0x3b0b);
3010 regmap_write(rt5663->regmap, RT5663_STO_DAC_MIXER, 0x2080); 3109 msleep(40);
3110 regmap_write(rt5663->regmap, RT5663_STO_DAC_MIXER, 0x0000);
3011 regmap_write(rt5663->regmap, RT5663_BYPASS_STO_DAC, 0x000c); 3111 regmap_write(rt5663->regmap, RT5663_BYPASS_STO_DAC, 0x000c);
3012 regmap_write(rt5663->regmap, RT5663_HP_BIAS, 0xabba); 3112 regmap_write(rt5663->regmap, RT5663_HP_BIAS, 0xafaa);
3013 regmap_write(rt5663->regmap, RT5663_CHARGE_PUMP_1, 0x2224); 3113 regmap_write(rt5663->regmap, RT5663_CHARGE_PUMP_1, 0x2224);
3014 regmap_write(rt5663->regmap, RT5663_HP_OUT_EN, 0x8088); 3114 regmap_write(rt5663->regmap, RT5663_HP_OUT_EN, 0x8088);
3015 regmap_write(rt5663->regmap, RT5663_STO_DRE_9, 0x0017); 3115 regmap_write(rt5663->regmap, RT5663_STO_DRE_9, 0x0017);
3016 regmap_write(rt5663->regmap, RT5663_STO_DRE_10, 0x0017); 3116 regmap_write(rt5663->regmap, RT5663_STO_DRE_10, 0x0017);
3017 regmap_write(rt5663->regmap, RT5663_STO1_ADC_MIXER, 0x4040); 3117 regmap_write(rt5663->regmap, RT5663_STO1_ADC_MIXER, 0x4040);
3118 regmap_write(rt5663->regmap, RT5663_CHOP_ADC, 0x3000);
3018 regmap_write(rt5663->regmap, RT5663_RECMIX, 0x0005); 3119 regmap_write(rt5663->regmap, RT5663_RECMIX, 0x0005);
3019 regmap_write(rt5663->regmap, RT5663_ADDA_RST, 0xc000); 3120 regmap_write(rt5663->regmap, RT5663_ADDA_RST, 0xc000);
3020 regmap_write(rt5663->regmap, RT5663_STO1_HPF_ADJ1, 0x3320); 3121 regmap_write(rt5663->regmap, RT5663_STO1_HPF_ADJ1, 0x3320);
3021 regmap_write(rt5663->regmap, RT5663_HP_CALIB_2, 0x00c9); 3122 regmap_write(rt5663->regmap, RT5663_HP_CALIB_2, 0x00c9);
3022 regmap_write(rt5663->regmap, RT5663_DUMMY_1, 0x004c); 3123 regmap_write(rt5663->regmap, RT5663_DUMMY_1, 0x004c);
3023 regmap_write(rt5663->regmap, RT5663_ANA_BIAS_CUR_1, 0x7766); 3124 regmap_write(rt5663->regmap, RT5663_ANA_BIAS_CUR_1, 0x1111);
3024 regmap_write(rt5663->regmap, RT5663_BIAS_CUR_8, 0x4702); 3125 regmap_write(rt5663->regmap, RT5663_BIAS_CUR_8, 0x4402);
3025 msleep(200); 3126 regmap_write(rt5663->regmap, RT5663_CHARGE_PUMP_2, 0x3311);
3026 regmap_write(rt5663->regmap, RT5663_HP_CALIB_1, 0x0069); 3127 regmap_write(rt5663->regmap, RT5663_HP_CALIB_1, 0x0069);
3027 regmap_write(rt5663->regmap, RT5663_HP_CALIB_3, 0x06c2); 3128 regmap_write(rt5663->regmap, RT5663_HP_CALIB_3, 0x06ce);
3028 regmap_write(rt5663->regmap, RT5663_HP_CALIB_1_1, 0x7b00); 3129 regmap_write(rt5663->regmap, RT5663_HP_CALIB_1_1, 0x6800);
3029 regmap_write(rt5663->regmap, RT5663_HP_CALIB_1_1, 0xfb00); 3130 regmap_write(rt5663->regmap, RT5663_CHARGE_PUMP_2, 0x1100);
3131 regmap_write(rt5663->regmap, RT5663_HP_CALIB_7, 0x0057);
3132 regmap_write(rt5663->regmap, RT5663_HP_CALIB_1_1, 0xe800);
3133
3134 count = 0;
3135 while (true) {
3136 regmap_read(rt5663->regmap, RT5663_HP_CALIB_1_1, &value);
3137 if (value & 0x8000)
3138 usleep_range(10000, 10005);
3139 else
3140 break;
3141
3142 if (count > 200)
3143 return;
3144 count++;
3145 }
3146
3147 regmap_write(rt5663->regmap, RT5663_HP_CALIB_1_1, 0x6200);
3148 regmap_write(rt5663->regmap, RT5663_HP_CALIB_7, 0x0059);
3149 regmap_write(rt5663->regmap, RT5663_HP_CALIB_1_1, 0xe200);
3150
3030 count = 0; 3151 count = 0;
3031 while (true) { 3152 while (true) {
3032 regmap_read(rt5663->regmap, RT5663_HP_CALIB_1_1, &value); 3153 regmap_read(rt5663->regmap, RT5663_HP_CALIB_1_1, &value);
@@ -3039,11 +3160,39 @@ static void rt5663_calibrate(struct rt5663_priv *rt5663)
3039 return; 3160 return;
3040 count++; 3161 count++;
3041 } 3162 }
3163
3164 regmap_write(rt5663->regmap, RT5663_EM_JACK_TYPE_1, 0xb8e0);
3165 usleep_range(10000, 10005);
3166 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_1, 0x003b);
3167 usleep_range(10000, 10005);
3168 regmap_write(rt5663->regmap, RT5663_PWR_DIG_1, 0x0000);
3169 usleep_range(10000, 10005);
3170 regmap_write(rt5663->regmap, RT5663_DEPOP_1, 0x000b);
3171 usleep_range(10000, 10005);
3172 regmap_write(rt5663->regmap, RT5663_DEPOP_1, 0x0008);
3173 usleep_range(10000, 10005);
3174 regmap_write(rt5663->regmap, RT5663_PWR_ANLG_2, 0x0000);
3175 usleep_range(10000, 10005);
3176}
3177
3178static int rt5663_parse_dp(struct rt5663_priv *rt5663, struct device *dev)
3179{
3180 device_property_read_u32(dev, "realtek,dc_offset_l_manual",
3181 &rt5663->pdata.dc_offset_l_manual);
3182 device_property_read_u32(dev, "realtek,dc_offset_r_manual",
3183 &rt5663->pdata.dc_offset_r_manual);
3184 device_property_read_u32(dev, "realtek,dc_offset_l_manual_mic",
3185 &rt5663->pdata.dc_offset_l_manual_mic);
3186 device_property_read_u32(dev, "realtek,dc_offset_r_manual_mic",
3187 &rt5663->pdata.dc_offset_r_manual_mic);
3188
3189 return 0;
3042} 3190}
3043 3191
3044static int rt5663_i2c_probe(struct i2c_client *i2c, 3192static int rt5663_i2c_probe(struct i2c_client *i2c,
3045 const struct i2c_device_id *id) 3193 const struct i2c_device_id *id)
3046{ 3194{
3195 struct rt5663_platform_data *pdata = dev_get_platdata(&i2c->dev);
3047 struct rt5663_priv *rt5663; 3196 struct rt5663_priv *rt5663;
3048 int ret; 3197 int ret;
3049 unsigned int val; 3198 unsigned int val;
@@ -3057,6 +3206,11 @@ static int rt5663_i2c_probe(struct i2c_client *i2c,
3057 3206
3058 i2c_set_clientdata(i2c, rt5663); 3207 i2c_set_clientdata(i2c, rt5663);
3059 3208
3209 if (pdata)
3210 rt5663->pdata = *pdata;
3211 else
3212 rt5663_parse_dp(rt5663, &i2c->dev);
3213
3060 regmap = devm_regmap_init_i2c(i2c, &temp_regmap); 3214 regmap = devm_regmap_init_i2c(i2c, &temp_regmap);
3061 if (IS_ERR(regmap)) { 3215 if (IS_ERR(regmap)) {
3062 ret = PTR_ERR(regmap); 3216 ret = PTR_ERR(regmap);
@@ -3105,6 +3259,20 @@ static int rt5663_i2c_probe(struct i2c_client *i2c,
3105 regmap_write(rt5663->regmap, RT5663_RESET, 0); 3259 regmap_write(rt5663->regmap, RT5663_RESET, 0);
3106 dev_dbg(&i2c->dev, "calibrate done\n"); 3260 dev_dbg(&i2c->dev, "calibrate done\n");
3107 3261
3262 switch (rt5663->codec_ver) {
3263 case CODEC_VER_1:
3264 break;
3265 case CODEC_VER_0:
3266 ret = regmap_register_patch(rt5663->regmap, rt5663_patch_list,
3267 ARRAY_SIZE(rt5663_patch_list));
3268 if (ret != 0)
3269 dev_warn(&i2c->dev,
3270 "Failed to apply regmap patch: %d\n", ret);
3271 break;
3272 default:
3273 dev_err(&i2c->dev, "%s:Unknown codec type\n", __func__);
3274 }
3275
3108 /* GPIO1 as IRQ */ 3276 /* GPIO1 as IRQ */
3109 regmap_update_bits(rt5663->regmap, RT5663_GPIO_1, RT5663_GP1_PIN_MASK, 3277 regmap_update_bits(rt5663->regmap, RT5663_GPIO_1, RT5663_GP1_PIN_MASK,
3110 RT5663_GP1_PIN_IRQ); 3278 RT5663_GP1_PIN_IRQ);
diff --git a/sound/soc/codecs/rt5663.h b/sound/soc/codecs/rt5663.h
index 4621812c94d8..c5a9b69579ad 100644
--- a/sound/soc/codecs/rt5663.h
+++ b/sound/soc/codecs/rt5663.h
@@ -12,6 +12,8 @@
12#ifndef __RT5663_H__ 12#ifndef __RT5663_H__
13#define __RT5663_H__ 13#define __RT5663_H__
14 14
15#include <sound/rt5663.h>
16
15/* Info */ 17/* Info */
16#define RT5663_RESET 0x0000 18#define RT5663_RESET 0x0000
17#define RT5663_VENDOR_ID 0x00fd 19#define RT5663_VENDOR_ID 0x00fd
diff --git a/sound/soc/codecs/rt5665.c b/sound/soc/codecs/rt5665.c
index e597c893536d..f05d362c4e23 100644
--- a/sound/soc/codecs/rt5665.c
+++ b/sound/soc/codecs/rt5665.c
@@ -1381,6 +1381,16 @@ static void rt5665_jack_detect_handler(struct work_struct *work)
1381 mutex_unlock(&rt5665->calibrate_mutex); 1381 mutex_unlock(&rt5665->calibrate_mutex);
1382} 1382}
1383 1383
1384static const char * const rt5665_clk_sync[] = {
1385 "I2S1_1", "I2S1_2", "I2S2", "I2S3", "IF2 Slave", "IF3 Slave"
1386};
1387
1388static const struct soc_enum rt5665_enum[] = {
1389 SOC_ENUM_SINGLE(RT5665_I2S1_SDP, 11, 5, rt5665_clk_sync),
1390 SOC_ENUM_SINGLE(RT5665_I2S2_SDP, 11, 5, rt5665_clk_sync),
1391 SOC_ENUM_SINGLE(RT5665_I2S3_SDP, 11, 5, rt5665_clk_sync),
1392};
1393
1384static const struct snd_kcontrol_new rt5665_snd_controls[] = { 1394static const struct snd_kcontrol_new rt5665_snd_controls[] = {
1385 /* Headphone Output Volume */ 1395 /* Headphone Output Volume */
1386 SOC_DOUBLE_R_EXT_TLV("Headphone Playback Volume", RT5665_HPL_GAIN, 1396 SOC_DOUBLE_R_EXT_TLV("Headphone Playback Volume", RT5665_HPL_GAIN,
@@ -1392,6 +1402,9 @@ static const struct snd_kcontrol_new rt5665_snd_controls[] = {
1392 RT5665_L_VOL_SFT, 15, 1, snd_soc_get_volsw, 1402 RT5665_L_VOL_SFT, 15, 1, snd_soc_get_volsw,
1393 rt5665_mono_vol_put, mono_vol_tlv), 1403 rt5665_mono_vol_put, mono_vol_tlv),
1394 1404
1405 SOC_SINGLE_TLV("MONOVOL Playback Volume", RT5665_MONO_OUT,
1406 RT5665_L_VOL_SFT, 39, 1, out_vol_tlv),
1407
1395 /* Output Volume */ 1408 /* Output Volume */
1396 SOC_DOUBLE_TLV("OUT Playback Volume", RT5665_LOUT, RT5665_L_VOL_SFT, 1409 SOC_DOUBLE_TLV("OUT Playback Volume", RT5665_LOUT, RT5665_L_VOL_SFT,
1397 RT5665_R_VOL_SFT, 39, 1, out_vol_tlv), 1410 RT5665_R_VOL_SFT, 39, 1, out_vol_tlv),
@@ -1446,6 +1459,11 @@ static const struct snd_kcontrol_new rt5665_snd_controls[] = {
1446 SOC_DOUBLE_TLV("STO2 ADC Boost Gain Volume", RT5665_STO2_ADC_BOOST, 1459 SOC_DOUBLE_TLV("STO2 ADC Boost Gain Volume", RT5665_STO2_ADC_BOOST,
1447 RT5665_STO2_ADC_L_BST_SFT, RT5665_STO2_ADC_R_BST_SFT, 1460 RT5665_STO2_ADC_L_BST_SFT, RT5665_STO2_ADC_R_BST_SFT,
1448 3, 0, adc_bst_tlv), 1461 3, 0, adc_bst_tlv),
1462
1463 /* I2S3 CLK Source */
1464 SOC_ENUM("I2S1 Master Clk Sel", rt5665_enum[0]),
1465 SOC_ENUM("I2S2 Master Clk Sel", rt5665_enum[1]),
1466 SOC_ENUM("I2S3 Master Clk Sel", rt5665_enum[2]),
1449}; 1467};
1450 1468
1451/** 1469/**
@@ -4098,9 +4116,12 @@ static int rt5665_hw_params(struct snd_pcm_substream *substream,
4098 rt5665->lrck[dai->id] = params_rate(params); 4116 rt5665->lrck[dai->id] = params_rate(params);
4099 pre_div = rl6231_get_clk_info(rt5665->sysclk, rt5665->lrck[dai->id]); 4117 pre_div = rl6231_get_clk_info(rt5665->sysclk, rt5665->lrck[dai->id]);
4100 if (pre_div < 0) { 4118 if (pre_div < 0) {
4101 dev_err(codec->dev, "Unsupported clock setting %d for DAI %d\n", 4119 dev_warn(codec->dev, "Force using PLL");
4102 rt5665->lrck[dai->id], dai->id); 4120 snd_soc_codec_set_pll(codec, 0, RT5665_PLL1_S_MCLK,
4103 return -EINVAL; 4121 rt5665->sysclk, rt5665->lrck[dai->id] * 512);
4122 snd_soc_codec_set_sysclk(codec, RT5665_SCLK_S_PLL1, 0,
4123 rt5665->lrck[dai->id] * 512, 0);
4124 pre_div = 1;
4104 } 4125 }
4105 frame_size = snd_soc_params_to_frame_size(params); 4126 frame_size = snd_soc_params_to_frame_size(params);
4106 if (frame_size < 0) { 4127 if (frame_size < 0) {
@@ -4183,6 +4204,15 @@ static int rt5665_hw_params(struct snd_pcm_substream *substream,
4183 break; 4204 break;
4184 } 4205 }
4185 4206
4207 if (rt5665->master[RT5665_AIF2_1] || rt5665->master[RT5665_AIF2_2]) {
4208 snd_soc_update_bits(codec, RT5665_I2S_M_CLK_CTRL_1,
4209 RT5665_I2S2_M_PD_MASK, pre_div << RT5665_I2S2_M_PD_SFT);
4210 }
4211 if (rt5665->master[RT5665_AIF3]) {
4212 snd_soc_update_bits(codec, RT5665_I2S_M_CLK_CTRL_1,
4213 RT5665_I2S3_M_PD_MASK, pre_div << RT5665_I2S3_M_PD_SFT);
4214 }
4215
4186 return 0; 4216 return 0;
4187} 4217}
4188 4218
@@ -4259,7 +4289,7 @@ static int rt5665_set_codec_sysclk(struct snd_soc_codec *codec, int clk_id,
4259 int source, unsigned int freq, int dir) 4289 int source, unsigned int freq, int dir)
4260{ 4290{
4261 struct rt5665_priv *rt5665 = snd_soc_codec_get_drvdata(codec); 4291 struct rt5665_priv *rt5665 = snd_soc_codec_get_drvdata(codec);
4262 unsigned int reg_val = 0; 4292 unsigned int reg_val = 0, src = 0;
4263 4293
4264 if (freq == rt5665->sysclk && clk_id == rt5665->sysclk_src) 4294 if (freq == rt5665->sysclk && clk_id == rt5665->sysclk_src)
4265 return 0; 4295 return 0;
@@ -4267,12 +4297,15 @@ static int rt5665_set_codec_sysclk(struct snd_soc_codec *codec, int clk_id,
4267 switch (clk_id) { 4297 switch (clk_id) {
4268 case RT5665_SCLK_S_MCLK: 4298 case RT5665_SCLK_S_MCLK:
4269 reg_val |= RT5665_SCLK_SRC_MCLK; 4299 reg_val |= RT5665_SCLK_SRC_MCLK;
4300 src = RT5665_CLK_SRC_MCLK;
4270 break; 4301 break;
4271 case RT5665_SCLK_S_PLL1: 4302 case RT5665_SCLK_S_PLL1:
4272 reg_val |= RT5665_SCLK_SRC_PLL1; 4303 reg_val |= RT5665_SCLK_SRC_PLL1;
4304 src = RT5665_CLK_SRC_PLL1;
4273 break; 4305 break;
4274 case RT5665_SCLK_S_RCCLK: 4306 case RT5665_SCLK_S_RCCLK:
4275 reg_val |= RT5665_SCLK_SRC_RCCLK; 4307 reg_val |= RT5665_SCLK_SRC_RCCLK;
4308 src = RT5665_CLK_SRC_RCCLK;
4276 break; 4309 break;
4277 default: 4310 default:
4278 dev_err(codec->dev, "Invalid clock id (%d)\n", clk_id); 4311 dev_err(codec->dev, "Invalid clock id (%d)\n", clk_id);
@@ -4280,6 +4313,16 @@ static int rt5665_set_codec_sysclk(struct snd_soc_codec *codec, int clk_id,
4280 } 4313 }
4281 snd_soc_update_bits(codec, RT5665_GLB_CLK, 4314 snd_soc_update_bits(codec, RT5665_GLB_CLK,
4282 RT5665_SCLK_SRC_MASK, reg_val); 4315 RT5665_SCLK_SRC_MASK, reg_val);
4316
4317 if (rt5665->master[RT5665_AIF2_1] || rt5665->master[RT5665_AIF2_2]) {
4318 snd_soc_update_bits(codec, RT5665_I2S_M_CLK_CTRL_1,
4319 RT5665_I2S2_SRC_MASK, src << RT5665_I2S2_SRC_SFT);
4320 }
4321 if (rt5665->master[RT5665_AIF3]) {
4322 snd_soc_update_bits(codec, RT5665_I2S_M_CLK_CTRL_1,
4323 RT5665_I2S3_SRC_MASK, src << RT5665_I2S3_SRC_SFT);
4324 }
4325
4283 rt5665->sysclk = freq; 4326 rt5665->sysclk = freq;
4284 rt5665->sysclk_src = clk_id; 4327 rt5665->sysclk_src = clk_id;
4285 4328
@@ -4562,7 +4605,7 @@ static struct snd_soc_dai_driver rt5665_dai[] = {
4562 }, 4605 },
4563}; 4606};
4564 4607
4565static struct snd_soc_codec_driver soc_codec_dev_rt5665 = { 4608static const struct snd_soc_codec_driver soc_codec_dev_rt5665 = {
4566 .probe = rt5665_probe, 4609 .probe = rt5665_probe,
4567 .remove = rt5665_remove, 4610 .remove = rt5665_remove,
4568 .suspend = rt5665_suspend, 4611 .suspend = rt5665_suspend,
@@ -4927,7 +4970,7 @@ MODULE_DEVICE_TABLE(of, rt5665_of_match);
4927#endif 4970#endif
4928 4971
4929#ifdef CONFIG_ACPI 4972#ifdef CONFIG_ACPI
4930static struct acpi_device_id rt5665_acpi_match[] = { 4973static const struct acpi_device_id rt5665_acpi_match[] = {
4931 {"10EC5665", 0,}, 4974 {"10EC5665", 0,},
4932 {"10EC5666", 0,}, 4975 {"10EC5666", 0,},
4933 {"10EC5668", 0,}, 4976 {"10EC5668", 0,},
diff --git a/sound/soc/codecs/rt5665.h b/sound/soc/codecs/rt5665.h
index d95249c4c47b..5ddebd6a4a1b 100644
--- a/sound/soc/codecs/rt5665.h
+++ b/sound/soc/codecs/rt5665.h
@@ -1628,6 +1628,27 @@
1628#define RT5665_PWR_CLK1M_PD (0x0 << 8) 1628#define RT5665_PWR_CLK1M_PD (0x0 << 8)
1629#define RT5665_PWR_CLK1M_PU (0x1 << 8) 1629#define RT5665_PWR_CLK1M_PU (0x1 << 8)
1630 1630
1631/* I2S Master Mode Clock Control 1 (0x00a0) */
1632#define RT5665_CLK_SRC_MCLK (0x0)
1633#define RT5665_CLK_SRC_PLL1 (0x1)
1634#define RT5665_CLK_SRC_RCCLK (0x2)
1635#define RT5665_I2S_PD_1 (0x0)
1636#define RT5665_I2S_PD_2 (0x1)
1637#define RT5665_I2S_PD_3 (0x2)
1638#define RT5665_I2S_PD_4 (0x3)
1639#define RT5665_I2S_PD_6 (0x4)
1640#define RT5665_I2S_PD_8 (0x5)
1641#define RT5665_I2S_PD_12 (0x6)
1642#define RT5665_I2S_PD_16 (0x7)
1643#define RT5665_I2S2_SRC_MASK (0x3 << 12)
1644#define RT5665_I2S2_SRC_SFT 12
1645#define RT5665_I2S2_M_PD_MASK (0x7 << 8)
1646#define RT5665_I2S2_M_PD_SFT 8
1647#define RT5665_I2S3_SRC_MASK (0x3 << 4)
1648#define RT5665_I2S3_SRC_SFT 4
1649#define RT5665_I2S3_M_PD_MASK (0x7 << 0)
1650#define RT5665_I2S3_M_PD_SFT 0
1651
1631 1652
1632/* EQ Control 1 (0x00b0) */ 1653/* EQ Control 1 (0x00b0) */
1633#define RT5665_EQ_SRC_DAC (0x0 << 15) 1654#define RT5665_EQ_SRC_DAC (0x0 << 15)
diff --git a/sound/soc/codecs/rt5670.c b/sound/soc/codecs/rt5670.c
index 0ec7985ed306..9545764ef3eb 100644
--- a/sound/soc/codecs/rt5670.c
+++ b/sound/soc/codecs/rt5670.c
@@ -567,7 +567,7 @@ int rt5670_set_jack_detect(struct snd_soc_codec *codec,
567 567
568 rt5670->jack = jack; 568 rt5670->jack = jack;
569 rt5670->hp_gpio.gpiod_dev = codec->dev; 569 rt5670->hp_gpio.gpiod_dev = codec->dev;
570 rt5670->hp_gpio.name = "headphone detect"; 570 rt5670->hp_gpio.name = "headset";
571 rt5670->hp_gpio.report = SND_JACK_HEADSET | 571 rt5670->hp_gpio.report = SND_JACK_HEADSET |
572 SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2; 572 SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2;
573 rt5670->hp_gpio.debounce_time = 150; 573 rt5670->hp_gpio.debounce_time = 150;
@@ -1151,20 +1151,15 @@ static const char * const rt5670_stereo_adc1_src[] = {
1151static SOC_ENUM_SINGLE_DECL(rt5670_stereo1_adc1_enum, RT5670_STO1_ADC_MIXER, 1151static SOC_ENUM_SINGLE_DECL(rt5670_stereo1_adc1_enum, RT5670_STO1_ADC_MIXER,
1152 RT5670_ADC_1_SRC_SFT, rt5670_stereo_adc1_src); 1152 RT5670_ADC_1_SRC_SFT, rt5670_stereo_adc1_src);
1153 1153
1154static const struct snd_kcontrol_new rt5670_sto_adc_l1_mux = 1154static const struct snd_kcontrol_new rt5670_sto_adc_1_mux =
1155 SOC_DAPM_ENUM("Stereo1 ADC L1 source", rt5670_stereo1_adc1_enum); 1155 SOC_DAPM_ENUM("Stereo1 ADC 1 Mux", rt5670_stereo1_adc1_enum);
1156
1157static const struct snd_kcontrol_new rt5670_sto_adc_r1_mux =
1158 SOC_DAPM_ENUM("Stereo1 ADC R1 source", rt5670_stereo1_adc1_enum);
1159 1156
1160static SOC_ENUM_SINGLE_DECL(rt5670_stereo2_adc1_enum, RT5670_STO2_ADC_MIXER, 1157static SOC_ENUM_SINGLE_DECL(rt5670_stereo2_adc1_enum, RT5670_STO2_ADC_MIXER,
1161 RT5670_ADC_1_SRC_SFT, rt5670_stereo_adc1_src); 1158 RT5670_ADC_1_SRC_SFT, rt5670_stereo_adc1_src);
1162 1159
1163static const struct snd_kcontrol_new rt5670_sto2_adc_l1_mux = 1160static const struct snd_kcontrol_new rt5670_sto2_adc_1_mux =
1164 SOC_DAPM_ENUM("Stereo2 ADC L1 source", rt5670_stereo2_adc1_enum); 1161 SOC_DAPM_ENUM("Stereo2 ADC 1 Mux", rt5670_stereo2_adc1_enum);
1165 1162
1166static const struct snd_kcontrol_new rt5670_sto2_adc_r1_mux =
1167 SOC_DAPM_ENUM("Stereo2 ADC R1 source", rt5670_stereo2_adc1_enum);
1168 1163
1169/* MX-27 MX-26 [11] */ 1164/* MX-27 MX-26 [11] */
1170static const char * const rt5670_stereo_adc2_src[] = { 1165static const char * const rt5670_stereo_adc2_src[] = {
@@ -1174,20 +1169,15 @@ static const char * const rt5670_stereo_adc2_src[] = {
1174static SOC_ENUM_SINGLE_DECL(rt5670_stereo1_adc2_enum, RT5670_STO1_ADC_MIXER, 1169static SOC_ENUM_SINGLE_DECL(rt5670_stereo1_adc2_enum, RT5670_STO1_ADC_MIXER,
1175 RT5670_ADC_2_SRC_SFT, rt5670_stereo_adc2_src); 1170 RT5670_ADC_2_SRC_SFT, rt5670_stereo_adc2_src);
1176 1171
1177static const struct snd_kcontrol_new rt5670_sto_adc_l2_mux = 1172static const struct snd_kcontrol_new rt5670_sto_adc_2_mux =
1178 SOC_DAPM_ENUM("Stereo1 ADC L2 source", rt5670_stereo1_adc2_enum); 1173 SOC_DAPM_ENUM("Stereo1 ADC 2 Mux", rt5670_stereo1_adc2_enum);
1179
1180static const struct snd_kcontrol_new rt5670_sto_adc_r2_mux =
1181 SOC_DAPM_ENUM("Stereo1 ADC R2 source", rt5670_stereo1_adc2_enum);
1182 1174
1183static SOC_ENUM_SINGLE_DECL(rt5670_stereo2_adc2_enum, RT5670_STO2_ADC_MIXER, 1175static SOC_ENUM_SINGLE_DECL(rt5670_stereo2_adc2_enum, RT5670_STO2_ADC_MIXER,
1184 RT5670_ADC_2_SRC_SFT, rt5670_stereo_adc2_src); 1176 RT5670_ADC_2_SRC_SFT, rt5670_stereo_adc2_src);
1185 1177
1186static const struct snd_kcontrol_new rt5670_sto2_adc_l2_mux = 1178static const struct snd_kcontrol_new rt5670_sto2_adc_2_mux =
1187 SOC_DAPM_ENUM("Stereo2 ADC L2 source", rt5670_stereo2_adc2_enum); 1179 SOC_DAPM_ENUM("Stereo2 ADC 2 Mux", rt5670_stereo2_adc2_enum);
1188 1180
1189static const struct snd_kcontrol_new rt5670_sto2_adc_r2_mux =
1190 SOC_DAPM_ENUM("Stereo2 ADC R2 source", rt5670_stereo2_adc2_enum);
1191 1181
1192/* MX-27 MX26 [10] */ 1182/* MX-27 MX26 [10] */
1193static const char * const rt5670_stereo_adc_src[] = { 1183static const char * const rt5670_stereo_adc_src[] = {
@@ -1642,23 +1632,23 @@ static const struct snd_soc_dapm_widget rt5670_dapm_widgets[] = {
1642 SND_SOC_DAPM_MUX("Stereo1 DMIC Mux", SND_SOC_NOPM, 0, 0, 1632 SND_SOC_DAPM_MUX("Stereo1 DMIC Mux", SND_SOC_NOPM, 0, 0,
1643 &rt5670_sto1_dmic_mux), 1633 &rt5670_sto1_dmic_mux),
1644 SND_SOC_DAPM_MUX("Stereo1 ADC L2 Mux", SND_SOC_NOPM, 0, 0, 1634 SND_SOC_DAPM_MUX("Stereo1 ADC L2 Mux", SND_SOC_NOPM, 0, 0,
1645 &rt5670_sto_adc_l2_mux), 1635 &rt5670_sto_adc_2_mux),
1646 SND_SOC_DAPM_MUX("Stereo1 ADC R2 Mux", SND_SOC_NOPM, 0, 0, 1636 SND_SOC_DAPM_MUX("Stereo1 ADC R2 Mux", SND_SOC_NOPM, 0, 0,
1647 &rt5670_sto_adc_r2_mux), 1637 &rt5670_sto_adc_2_mux),
1648 SND_SOC_DAPM_MUX("Stereo1 ADC L1 Mux", SND_SOC_NOPM, 0, 0, 1638 SND_SOC_DAPM_MUX("Stereo1 ADC L1 Mux", SND_SOC_NOPM, 0, 0,
1649 &rt5670_sto_adc_l1_mux), 1639 &rt5670_sto_adc_1_mux),
1650 SND_SOC_DAPM_MUX("Stereo1 ADC R1 Mux", SND_SOC_NOPM, 0, 0, 1640 SND_SOC_DAPM_MUX("Stereo1 ADC R1 Mux", SND_SOC_NOPM, 0, 0,
1651 &rt5670_sto_adc_r1_mux), 1641 &rt5670_sto_adc_1_mux),
1652 SND_SOC_DAPM_MUX("Stereo2 DMIC Mux", SND_SOC_NOPM, 0, 0, 1642 SND_SOC_DAPM_MUX("Stereo2 DMIC Mux", SND_SOC_NOPM, 0, 0,
1653 &rt5670_sto2_dmic_mux), 1643 &rt5670_sto2_dmic_mux),
1654 SND_SOC_DAPM_MUX("Stereo2 ADC L2 Mux", SND_SOC_NOPM, 0, 0, 1644 SND_SOC_DAPM_MUX("Stereo2 ADC L2 Mux", SND_SOC_NOPM, 0, 0,
1655 &rt5670_sto2_adc_l2_mux), 1645 &rt5670_sto2_adc_2_mux),
1656 SND_SOC_DAPM_MUX("Stereo2 ADC R2 Mux", SND_SOC_NOPM, 0, 0, 1646 SND_SOC_DAPM_MUX("Stereo2 ADC R2 Mux", SND_SOC_NOPM, 0, 0,
1657 &rt5670_sto2_adc_r2_mux), 1647 &rt5670_sto2_adc_2_mux),
1658 SND_SOC_DAPM_MUX("Stereo2 ADC L1 Mux", SND_SOC_NOPM, 0, 0, 1648 SND_SOC_DAPM_MUX("Stereo2 ADC L1 Mux", SND_SOC_NOPM, 0, 0,
1659 &rt5670_sto2_adc_l1_mux), 1649 &rt5670_sto2_adc_1_mux),
1660 SND_SOC_DAPM_MUX("Stereo2 ADC R1 Mux", SND_SOC_NOPM, 0, 0, 1650 SND_SOC_DAPM_MUX("Stereo2 ADC R1 Mux", SND_SOC_NOPM, 0, 0,
1661 &rt5670_sto2_adc_r1_mux), 1651 &rt5670_sto2_adc_1_mux),
1662 SND_SOC_DAPM_MUX("Stereo2 ADC LR Mux", SND_SOC_NOPM, 0, 0, 1652 SND_SOC_DAPM_MUX("Stereo2 ADC LR Mux", SND_SOC_NOPM, 0, 0,
1663 &rt5670_sto2_adc_lr_mux), 1653 &rt5670_sto2_adc_lr_mux),
1664 SND_SOC_DAPM_MUX("Mono DMIC L Mux", SND_SOC_NOPM, 0, 0, 1654 SND_SOC_DAPM_MUX("Mono DMIC L Mux", SND_SOC_NOPM, 0, 0,
@@ -2743,6 +2733,7 @@ static struct snd_soc_dai_driver rt5670_dai[] = {
2743 .formats = RT5670_FORMATS, 2733 .formats = RT5670_FORMATS,
2744 }, 2734 },
2745 .ops = &rt5670_aif_dai_ops, 2735 .ops = &rt5670_aif_dai_ops,
2736 .symmetric_rates = 1,
2746 }, 2737 },
2747 { 2738 {
2748 .name = "rt5670-aif2", 2739 .name = "rt5670-aif2",
@@ -2762,10 +2753,11 @@ static struct snd_soc_dai_driver rt5670_dai[] = {
2762 .formats = RT5670_FORMATS, 2753 .formats = RT5670_FORMATS,
2763 }, 2754 },
2764 .ops = &rt5670_aif_dai_ops, 2755 .ops = &rt5670_aif_dai_ops,
2756 .symmetric_rates = 1,
2765 }, 2757 },
2766}; 2758};
2767 2759
2768static struct snd_soc_codec_driver soc_codec_dev_rt5670 = { 2760static const struct snd_soc_codec_driver soc_codec_dev_rt5670 = {
2769 .probe = rt5670_probe, 2761 .probe = rt5670_probe,
2770 .remove = rt5670_remove, 2762 .remove = rt5670_remove,
2771 .suspend = rt5670_suspend, 2763 .suspend = rt5670_suspend,
@@ -2859,6 +2851,17 @@ static const struct dmi_system_id dmi_platform_intel_bytcht_jdmode2[] = {
2859 {} 2851 {}
2860}; 2852};
2861 2853
2854static const struct dmi_system_id dmi_platform_intel_bytcht_jdmode3[] = {
2855 {
2856 .ident = "Dell Venue 8 Pro 5855",
2857 .matches = {
2858 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
2859 DMI_MATCH(DMI_PRODUCT_NAME, "Venue 8 Pro 5855"),
2860 },
2861 },
2862 {}
2863};
2864
2862static int rt5670_i2c_probe(struct i2c_client *i2c, 2865static int rt5670_i2c_probe(struct i2c_client *i2c,
2863 const struct i2c_device_id *id) 2866 const struct i2c_device_id *id)
2864{ 2867{
@@ -2888,6 +2891,11 @@ static int rt5670_i2c_probe(struct i2c_client *i2c,
2888 rt5670->pdata.dmic1_data_pin = RT5670_DMIC_DATA_IN2P; 2891 rt5670->pdata.dmic1_data_pin = RT5670_DMIC_DATA_IN2P;
2889 rt5670->pdata.dev_gpio = true; 2892 rt5670->pdata.dev_gpio = true;
2890 rt5670->pdata.jd_mode = 2; 2893 rt5670->pdata.jd_mode = 2;
2894 } else if (dmi_check_system(dmi_platform_intel_bytcht_jdmode3)) {
2895 rt5670->pdata.dmic_en = true;
2896 rt5670->pdata.dmic1_data_pin = RT5670_DMIC_DATA_IN2P;
2897 rt5670->pdata.dev_gpio = true;
2898 rt5670->pdata.jd_mode = 3;
2891 } 2899 }
2892 2900
2893 rt5670->regmap = devm_regmap_init_i2c(i2c, &rt5670_regmap); 2901 rt5670->regmap = devm_regmap_init_i2c(i2c, &rt5670_regmap);
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index 9875c8d05b5c..0791fec398fb 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -4959,7 +4959,7 @@ static struct snd_soc_dai_driver rt5677_dai[] = {
4959 }, 4959 },
4960}; 4960};
4961 4961
4962static struct snd_soc_codec_driver soc_codec_dev_rt5677 = { 4962static const struct snd_soc_codec_driver soc_codec_dev_rt5677 = {
4963 .probe = rt5677_probe, 4963 .probe = rt5677_probe,
4964 .remove = rt5677_remove, 4964 .remove = rt5677_remove,
4965 .suspend = rt5677_suspend, 4965 .suspend = rt5677_suspend,
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index 80f6d1da7095..f2bb4feba3b6 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -1248,7 +1248,7 @@ static int sgtl5000_remove(struct snd_soc_codec *codec)
1248 return 0; 1248 return 0;
1249} 1249}
1250 1250
1251static struct snd_soc_codec_driver sgtl5000_driver = { 1251static const struct snd_soc_codec_driver sgtl5000_driver = {
1252 .probe = sgtl5000_probe, 1252 .probe = sgtl5000_probe,
1253 .remove = sgtl5000_remove, 1253 .remove = sgtl5000_remove,
1254 .set_bias_level = sgtl5000_set_bias_level, 1254 .set_bias_level = sgtl5000_set_bias_level,
diff --git a/sound/soc/codecs/si476x.c b/sound/soc/codecs/si476x.c
index 5344f4aa8fde..354dc0d64f11 100644
--- a/sound/soc/codecs/si476x.c
+++ b/sound/soc/codecs/si476x.c
@@ -236,7 +236,7 @@ static struct regmap *si476x_get_regmap(struct device *dev)
236 return dev_get_regmap(dev->parent, NULL); 236 return dev_get_regmap(dev->parent, NULL);
237} 237}
238 238
239static struct snd_soc_codec_driver soc_codec_dev_si476x = { 239static const struct snd_soc_codec_driver soc_codec_dev_si476x = {
240 .get_regmap = si476x_get_regmap, 240 .get_regmap = si476x_get_regmap,
241 .component_driver = { 241 .component_driver = {
242 .dapm_widgets = si476x_dapm_widgets, 242 .dapm_widgets = si476x_dapm_widgets,
diff --git a/sound/soc/codecs/sirf-audio-codec.c b/sound/soc/codecs/sirf-audio-codec.c
index 6bfd25c289d1..7ae8c181d1a4 100644
--- a/sound/soc/codecs/sirf-audio-codec.c
+++ b/sound/soc/codecs/sirf-audio-codec.c
@@ -429,13 +429,15 @@ static int sirf_audio_codec_remove(struct snd_soc_codec *codec)
429 return 0; 429 return 0;
430} 430}
431 431
432static struct snd_soc_codec_driver soc_codec_device_sirf_audio_codec = { 432static const struct snd_soc_codec_driver soc_codec_device_sirf_audio_codec = {
433 .probe = sirf_audio_codec_probe, 433 .probe = sirf_audio_codec_probe,
434 .remove = sirf_audio_codec_remove, 434 .remove = sirf_audio_codec_remove,
435 .dapm_widgets = sirf_audio_codec_dapm_widgets, 435 .component_driver = {
436 .num_dapm_widgets = ARRAY_SIZE(sirf_audio_codec_dapm_widgets), 436 .dapm_widgets = sirf_audio_codec_dapm_widgets,
437 .dapm_routes = sirf_audio_codec_map, 437 .num_dapm_widgets = ARRAY_SIZE(sirf_audio_codec_dapm_widgets),
438 .num_dapm_routes = ARRAY_SIZE(sirf_audio_codec_map), 438 .dapm_routes = sirf_audio_codec_map,
439 .num_dapm_routes = ARRAY_SIZE(sirf_audio_codec_map),
440 },
439 .idle_bias_off = true, 441 .idle_bias_off = true,
440}; 442};
441 443
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
index eae54c37cff9..887923e68849 100644
--- a/sound/soc/codecs/sn95031.c
+++ b/sound/soc/codecs/sn95031.c
@@ -883,7 +883,7 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
883 return 0; 883 return 0;
884} 884}
885 885
886static struct snd_soc_codec_driver sn95031_codec = { 886static const struct snd_soc_codec_driver sn95031_codec = {
887 .probe = sn95031_codec_probe, 887 .probe = sn95031_codec_probe,
888 .set_bias_level = sn95031_set_vaud_bias, 888 .set_bias_level = sn95031_set_vaud_bias,
889 .idle_bias_off = true, 889 .idle_bias_off = true,
diff --git a/sound/soc/codecs/spdif_receiver.c b/sound/soc/codecs/spdif_receiver.c
index 234f87b54838..7acd05140a81 100644
--- a/sound/soc/codecs/spdif_receiver.c
+++ b/sound/soc/codecs/spdif_receiver.c
@@ -37,7 +37,7 @@ static const struct snd_soc_dapm_route dir_routes[] = {
37 SNDRV_PCM_FMTBIT_S24_LE | \ 37 SNDRV_PCM_FMTBIT_S24_LE | \
38 SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) 38 SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE)
39 39
40static struct snd_soc_codec_driver soc_codec_spdif_dir = { 40static const struct snd_soc_codec_driver soc_codec_spdif_dir = {
41 .component_driver = { 41 .component_driver = {
42 .dapm_widgets = dir_widgets, 42 .dapm_widgets = dir_widgets,
43 .num_dapm_widgets = ARRAY_SIZE(dir_widgets), 43 .num_dapm_widgets = ARRAY_SIZE(dir_widgets),
diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c
index ee367536a498..063a64ff82d3 100644
--- a/sound/soc/codecs/spdif_transmitter.c
+++ b/sound/soc/codecs/spdif_transmitter.c
@@ -37,7 +37,7 @@ static const struct snd_soc_dapm_route dit_routes[] = {
37 { "spdif-out", NULL, "Playback" }, 37 { "spdif-out", NULL, "Playback" },
38}; 38};
39 39
40static struct snd_soc_codec_driver soc_codec_spdif_dit = { 40static const struct snd_soc_codec_driver soc_codec_spdif_dit = {
41 .component_driver = { 41 .component_driver = {
42 .dapm_widgets = dit_widgets, 42 .dapm_widgets = dit_widgets,
43 .num_dapm_widgets = ARRAY_SIZE(dit_widgets), 43 .num_dapm_widgets = ARRAY_SIZE(dit_widgets),
diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c
index 38a85f3adc80..15486fd16269 100644
--- a/sound/soc/codecs/ssm2518.c
+++ b/sound/soc/codecs/ssm2518.c
@@ -710,7 +710,7 @@ static int ssm2518_set_sysclk(struct snd_soc_codec *codec, int clk_id,
710 SSM2518_POWER1_NO_BCLK, val); 710 SSM2518_POWER1_NO_BCLK, val);
711} 711}
712 712
713static struct snd_soc_codec_driver ssm2518_codec_driver = { 713static const struct snd_soc_codec_driver ssm2518_codec_driver = {
714 .set_bias_level = ssm2518_set_bias_level, 714 .set_bias_level = ssm2518_set_bias_level,
715 .set_sysclk = ssm2518_set_sysclk, 715 .set_sysclk = ssm2518_set_sysclk,
716 .idle_bias_off = true, 716 .idle_bias_off = true,
diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
index 993bde29ca1b..9b341c23f62b 100644
--- a/sound/soc/codecs/ssm2602.c
+++ b/sound/soc/codecs/ssm2602.c
@@ -591,7 +591,7 @@ static int ssm260x_codec_probe(struct snd_soc_codec *codec)
591 return ret; 591 return ret;
592} 592}
593 593
594static struct snd_soc_codec_driver soc_codec_dev_ssm2602 = { 594static const struct snd_soc_codec_driver soc_codec_dev_ssm2602 = {
595 .probe = ssm260x_codec_probe, 595 .probe = ssm260x_codec_probe,
596 .resume = ssm2602_resume, 596 .resume = ssm2602_resume,
597 .set_bias_level = ssm2602_set_bias_level, 597 .set_bias_level = ssm2602_set_bias_level,
diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c
index a622623e8558..4afeddef7728 100644
--- a/sound/soc/codecs/ssm4567.c
+++ b/sound/soc/codecs/ssm4567.c
@@ -417,7 +417,7 @@ static struct snd_soc_dai_driver ssm4567_dai = {
417 .ops = &ssm4567_dai_ops, 417 .ops = &ssm4567_dai_ops,
418}; 418};
419 419
420static struct snd_soc_codec_driver ssm4567_codec_driver = { 420static const struct snd_soc_codec_driver ssm4567_codec_driver = {
421 .set_bias_level = ssm4567_set_bias_level, 421 .set_bias_level = ssm4567_set_bias_level,
422 .idle_bias_off = true, 422 .idle_bias_off = true,
423 423
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index 9de7fe8af255..c66363a2cac7 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -307,7 +307,7 @@ static int stac9766_codec_remove(struct snd_soc_codec *codec)
307 return 0; 307 return 0;
308} 308}
309 309
310static struct snd_soc_codec_driver soc_codec_dev_stac9766 = { 310static const struct snd_soc_codec_driver soc_codec_dev_stac9766 = {
311 .component_driver = { 311 .component_driver = {
312 .controls = stac9766_snd_ac97_controls, 312 .controls = stac9766_snd_ac97_controls,
313 .num_controls = ARRAY_SIZE(stac9766_snd_ac97_controls), 313 .num_controls = ARRAY_SIZE(stac9766_snd_ac97_controls),
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index 8840f72f3c4a..49cf9bc32eb6 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -660,7 +660,7 @@ static int tas2552_resume(struct snd_soc_codec *codec)
660#define tas2552_resume NULL 660#define tas2552_resume NULL
661#endif 661#endif
662 662
663static struct snd_soc_codec_driver soc_codec_dev_tas2552 = { 663static const struct snd_soc_codec_driver soc_codec_dev_tas2552 = {
664 .probe = tas2552_codec_probe, 664 .probe = tas2552_codec_probe,
665 .remove = tas2552_codec_remove, 665 .remove = tas2552_codec_remove,
666 .suspend = tas2552_suspend, 666 .suspend = tas2552_suspend,
diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
index b7de857abb16..199272d5cb6a 100644
--- a/sound/soc/codecs/tas5086.c
+++ b/sound/soc/codecs/tas5086.c
@@ -885,7 +885,7 @@ static int tas5086_remove(struct snd_soc_codec *codec)
885 return 0; 885 return 0;
886}; 886};
887 887
888static struct snd_soc_codec_driver soc_codec_dev_tas5086 = { 888static const struct snd_soc_codec_driver soc_codec_dev_tas5086 = {
889 .probe = tas5086_probe, 889 .probe = tas5086_probe,
890 .remove = tas5086_remove, 890 .remove = tas5086_remove,
891 .suspend = tas5086_soc_suspend, 891 .suspend = tas5086_soc_suspend,
diff --git a/sound/soc/codecs/tas5720.c b/sound/soc/codecs/tas5720.c
index c65b917598d2..a736a2a6976c 100644
--- a/sound/soc/codecs/tas5720.c
+++ b/sound/soc/codecs/tas5720.c
@@ -483,7 +483,7 @@ static const struct snd_soc_dapm_route tas5720_audio_map[] = {
483 { "OUT", NULL, "DAC" }, 483 { "OUT", NULL, "DAC" },
484}; 484};
485 485
486static struct snd_soc_codec_driver soc_codec_dev_tas5720 = { 486static const struct snd_soc_codec_driver soc_codec_dev_tas5720 = {
487 .probe = tas5720_codec_probe, 487 .probe = tas5720_codec_probe,
488 .remove = tas5720_codec_remove, 488 .remove = tas5720_codec_remove,
489 .suspend = tas5720_suspend, 489 .suspend = tas5720_suspend,
@@ -507,7 +507,7 @@ static struct snd_soc_codec_driver soc_codec_dev_tas5720 = {
507#define TAS5720_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S18_3LE |\ 507#define TAS5720_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S18_3LE |\
508 SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S24_LE) 508 SNDRV_PCM_FMTBIT_S20_3LE | SNDRV_PCM_FMTBIT_S24_LE)
509 509
510static struct snd_soc_dai_ops tas5720_speaker_dai_ops = { 510static const struct snd_soc_dai_ops tas5720_speaker_dai_ops = {
511 .hw_params = tas5720_hw_params, 511 .hw_params = tas5720_hw_params,
512 .set_fmt = tas5720_set_dai_fmt, 512 .set_fmt = tas5720_set_dai_fmt,
513 .set_tdm_slot = tas5720_set_dai_tdm_slot, 513 .set_tdm_slot = tas5720_set_dai_tdm_slot,
diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 628a8eeaab68..3d42138a7974 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -576,7 +576,7 @@ static int tlv320aic23_codec_probe(struct snd_soc_codec *codec)
576 return 0; 576 return 0;
577} 577}
578 578
579static struct snd_soc_codec_driver soc_codec_dev_tlv320aic23 = { 579static const struct snd_soc_codec_driver soc_codec_dev_tlv320aic23 = {
580 .probe = tlv320aic23_codec_probe, 580 .probe = tlv320aic23_codec_probe,
581 .resume = tlv320aic23_resume, 581 .resume = tlv320aic23_resume,
582 .set_bias_level = tlv320aic23_set_bias_level, 582 .set_bias_level = tlv320aic23_set_bias_level,
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index 14aa96d41719..89421caaeb70 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -319,7 +319,7 @@ static int aic26_probe(struct snd_soc_codec *codec)
319 return 0; 319 return 0;
320} 320}
321 321
322static struct snd_soc_codec_driver aic26_soc_codec_dev = { 322static const struct snd_soc_codec_driver aic26_soc_codec_dev = {
323 .probe = aic26_probe, 323 .probe = aic26_probe,
324 .component_driver = { 324 .component_driver = {
325 .controls = aic26_snd_controls, 325 .controls = aic26_snd_controls,
diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c
index d7d03c92cb8a..54a87a905eb6 100644
--- a/sound/soc/codecs/tlv320aic31xx.c
+++ b/sound/soc/codecs/tlv320aic31xx.c
@@ -1185,7 +1185,7 @@ static int aic31xx_codec_remove(struct snd_soc_codec *codec)
1185 return 0; 1185 return 0;
1186} 1186}
1187 1187
1188static struct snd_soc_codec_driver soc_codec_driver_aic31xx = { 1188static const struct snd_soc_codec_driver soc_codec_driver_aic31xx = {
1189 .probe = aic31xx_codec_probe, 1189 .probe = aic31xx_codec_probe,
1190 .remove = aic31xx_codec_remove, 1190 .remove = aic31xx_codec_remove,
1191 .set_bias_level = aic31xx_set_bias_level, 1191 .set_bias_level = aic31xx_set_bias_level,
diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c
index 28fdfc5ec544..ccfc955321ae 100644
--- a/sound/soc/codecs/tlv320aic32x4.c
+++ b/sound/soc/codecs/tlv320aic32x4.c
@@ -792,7 +792,7 @@ static int aic32x4_codec_probe(struct snd_soc_codec *codec)
792 return 0; 792 return 0;
793} 793}
794 794
795static struct snd_soc_codec_driver soc_codec_dev_aic32x4 = { 795static const struct snd_soc_codec_driver soc_codec_dev_aic32x4 = {
796 .probe = aic32x4_codec_probe, 796 .probe = aic32x4_codec_probe,
797 .set_bias_level = aic32x4_set_bias_level, 797 .set_bias_level = aic32x4_set_bias_level,
798 .suspend_bias_off = true, 798 .suspend_bias_off = true,
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 29bf8c81ae02..405f4602888a 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1684,7 +1684,7 @@ static int aic3x_remove(struct snd_soc_codec *codec)
1684 return 0; 1684 return 0;
1685} 1685}
1686 1686
1687static struct snd_soc_codec_driver soc_codec_dev_aic3x = { 1687static const struct snd_soc_codec_driver soc_codec_dev_aic3x = {
1688 .set_bias_level = aic3x_set_bias_level, 1688 .set_bias_level = aic3x_set_bias_level,
1689 .idle_bias_off = true, 1689 .idle_bias_off = true,
1690 .probe = aic3x_probe, 1690 .probe = aic3x_probe,
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 7bcf01efdf9a..5b94a151539c 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -1433,7 +1433,7 @@ static int dac33_soc_remove(struct snd_soc_codec *codec)
1433 return 0; 1433 return 0;
1434} 1434}
1435 1435
1436static struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = { 1436static const struct snd_soc_codec_driver soc_codec_dev_tlv320dac33 = {
1437 .read = dac33_read_reg_cache, 1437 .read = dac33_read_reg_cache,
1438 .write = dac33_write_locked, 1438 .write = dac33_write_locked,
1439 .set_bias_level = dac33_set_bias_level, 1439 .set_bias_level = dac33_set_bias_level,
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index a2104d68169d..d439c4c6fe50 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -2191,7 +2191,7 @@ static int twl4030_soc_remove(struct snd_soc_codec *codec)
2191 return 0; 2191 return 0;
2192} 2192}
2193 2193
2194static struct snd_soc_codec_driver soc_codec_dev_twl4030 = { 2194static const struct snd_soc_codec_driver soc_codec_dev_twl4030 = {
2195 .probe = twl4030_soc_probe, 2195 .probe = twl4030_soc_probe,
2196 .remove = twl4030_soc_remove, 2196 .remove = twl4030_soc_remove,
2197 .read = twl4030_read, 2197 .read = twl4030_read,
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index 2b6ad09e0886..0dc21f7e0af9 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -1155,7 +1155,7 @@ static int twl6040_remove(struct snd_soc_codec *codec)
1155 return 0; 1155 return 0;
1156} 1156}
1157 1157
1158static struct snd_soc_codec_driver soc_codec_dev_twl6040 = { 1158static const struct snd_soc_codec_driver soc_codec_dev_twl6040 = {
1159 .probe = twl6040_probe, 1159 .probe = twl6040_probe,
1160 .remove = twl6040_remove, 1160 .remove = twl6040_remove,
1161 .read = twl6040_read, 1161 .read = twl6040_read,
diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c
index 5fdee874406d..77c9cc4467b8 100644
--- a/sound/soc/codecs/uda134x.c
+++ b/sound/soc/codecs/uda134x.c
@@ -518,7 +518,7 @@ static int uda134x_soc_probe(struct snd_soc_codec *codec)
518 return 0; 518 return 0;
519} 519}
520 520
521static struct snd_soc_codec_driver soc_codec_dev_uda134x = { 521static const struct snd_soc_codec_driver soc_codec_dev_uda134x = {
522 .probe = uda134x_soc_probe, 522 .probe = uda134x_soc_probe,
523 .set_bias_level = uda134x_set_bias_level, 523 .set_bias_level = uda134x_set_bias_level,
524 .suspend_bias_off = true, 524 .suspend_bias_off = true,
diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 61cdc79840e7..926c81ae8185 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -720,7 +720,7 @@ static int uda1380_probe(struct snd_soc_codec *codec)
720 return 0; 720 return 0;
721} 721}
722 722
723static struct snd_soc_codec_driver soc_codec_dev_uda1380 = { 723static const struct snd_soc_codec_driver soc_codec_dev_uda1380 = {
724 .probe = uda1380_probe, 724 .probe = uda1380_probe,
725 .read = uda1380_read_reg_cache, 725 .read = uda1380_read_reg_cache,
726 .write = uda1380_write, 726 .write = uda1380_write,
diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c
index fcffb6e707d9..942f1644973e 100644
--- a/sound/soc/codecs/wl1273.c
+++ b/sound/soc/codecs/wl1273.c
@@ -480,7 +480,7 @@ static int wl1273_remove(struct snd_soc_codec *codec)
480 return 0; 480 return 0;
481} 481}
482 482
483static struct snd_soc_codec_driver soc_codec_dev_wl1273 = { 483static const struct snd_soc_codec_driver soc_codec_dev_wl1273 = {
484 .probe = wl1273_probe, 484 .probe = wl1273_probe,
485 .remove = wl1273_remove, 485 .remove = wl1273_remove,
486 486
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 1fe358e6be61..72486bf072f2 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -2017,7 +2017,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_wm5102 = {
2017 }, 2017 },
2018}; 2018};
2019 2019
2020static struct snd_compr_ops wm5102_compr_ops = { 2020static const struct snd_compr_ops wm5102_compr_ops = {
2021 .open = wm5102_open, 2021 .open = wm5102_open,
2022 .free = wm_adsp_compr_free, 2022 .free = wm_adsp_compr_free,
2023 .set_params = wm_adsp_compr_set_params, 2023 .set_params = wm_adsp_compr_set_params,
@@ -2027,7 +2027,7 @@ static struct snd_compr_ops wm5102_compr_ops = {
2027 .copy = wm_adsp_compr_copy, 2027 .copy = wm_adsp_compr_copy,
2028}; 2028};
2029 2029
2030static struct snd_soc_platform_driver wm5102_compr_platform = { 2030static const struct snd_soc_platform_driver wm5102_compr_platform = {
2031 .compr_ops = &wm5102_compr_ops, 2031 .compr_ops = &wm5102_compr_ops,
2032}; 2032};
2033 2033
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 1bc942152eff..858a24fc28e8 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -2372,7 +2372,7 @@ static const struct snd_soc_codec_driver soc_codec_dev_wm5110 = {
2372 }, 2372 },
2373}; 2373};
2374 2374
2375static struct snd_compr_ops wm5110_compr_ops = { 2375static const struct snd_compr_ops wm5110_compr_ops = {
2376 .open = wm5110_open, 2376 .open = wm5110_open,
2377 .free = wm_adsp_compr_free, 2377 .free = wm_adsp_compr_free,
2378 .set_params = wm_adsp_compr_set_params, 2378 .set_params = wm_adsp_compr_set_params,
@@ -2382,7 +2382,7 @@ static struct snd_compr_ops wm5110_compr_ops = {
2382 .copy = wm_adsp_compr_copy, 2382 .copy = wm_adsp_compr_copy,
2383}; 2383};
2384 2384
2385static struct snd_soc_platform_driver wm5110_compr_platform = { 2385static const struct snd_soc_platform_driver wm5110_compr_platform = {
2386 .compr_ops = &wm5110_compr_ops, 2386 .compr_ops = &wm5110_compr_ops,
2387}; 2387};
2388 2388
diff --git a/sound/soc/codecs/zx_aud96p22.c b/sound/soc/codecs/zx_aud96p22.c
index 032fb7cf6cbd..51fad48892d3 100644
--- a/sound/soc/codecs/zx_aud96p22.c
+++ b/sound/soc/codecs/zx_aud96p22.c
@@ -261,7 +261,7 @@ static const struct snd_soc_dapm_route aud96p22_dapm_routes[] = {
261 { "LINEOUTMN", NULL, "LD2" }, 261 { "LINEOUTMN", NULL, "LD2" },
262}; 262};
263 263
264static struct snd_soc_codec_driver aud96p22_driver = { 264static const struct snd_soc_codec_driver aud96p22_driver = {
265 .component_driver = { 265 .component_driver = {
266 .controls = aud96p22_snd_controls, 266 .controls = aud96p22_snd_controls,
267 .num_controls = ARRAY_SIZE(aud96p22_snd_controls), 267 .num_controls = ARRAY_SIZE(aud96p22_snd_controls),
@@ -312,7 +312,7 @@ static int aud96p22_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
312 return 0; 312 return 0;
313} 313}
314 314
315static struct snd_soc_dai_ops aud96p22_dai_ops = { 315static const struct snd_soc_dai_ops aud96p22_dai_ops = {
316 .set_fmt = aud96p22_set_fmt, 316 .set_fmt = aud96p22_set_fmt,
317}; 317};
318 318
diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c
index 56ec1d301ac2..f395bbc7c354 100644
--- a/sound/soc/davinci/davinci-mcasp.c
+++ b/sound/soc/davinci/davinci-mcasp.c
@@ -1602,8 +1602,6 @@ static struct davinci_mcasp_pdata *davinci_mcasp_set_pdata_from_of(
1602 pdata = devm_kmemdup(&pdev->dev, match->data, sizeof(*pdata), 1602 pdata = devm_kmemdup(&pdev->dev, match->data, sizeof(*pdata),
1603 GFP_KERNEL); 1603 GFP_KERNEL);
1604 if (!pdata) { 1604 if (!pdata) {
1605 dev_err(&pdev->dev,
1606 "Failed to allocate memory for pdata\n");
1607 ret = -ENOMEM; 1605 ret = -ENOMEM;
1608 return pdata; 1606 return pdata;
1609 } 1607 }
@@ -1853,6 +1851,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
1853 mcasp->context.xrsr_regs = devm_kzalloc(&pdev->dev, 1851 mcasp->context.xrsr_regs = devm_kzalloc(&pdev->dev,
1854 sizeof(u32) * mcasp->num_serializer, 1852 sizeof(u32) * mcasp->num_serializer,
1855 GFP_KERNEL); 1853 GFP_KERNEL);
1854 if (!mcasp->context.xrsr_regs) {
1855 ret = -ENOMEM;
1856 goto err;
1857 }
1856#endif 1858#endif
1857 mcasp->serial_dir = pdata->serial_dir; 1859 mcasp->serial_dir = pdata->serial_dir;
1858 mcasp->version = pdata->version; 1860 mcasp->version = pdata->version;
diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c
index c77d9218795a..5415b72393fa 100644
--- a/sound/soc/davinci/davinci-vcif.c
+++ b/sound/soc/davinci/davinci-vcif.c
@@ -210,11 +210,8 @@ static int davinci_vcif_probe(struct platform_device *pdev)
210 davinci_vcif_dev = devm_kzalloc(&pdev->dev, 210 davinci_vcif_dev = devm_kzalloc(&pdev->dev,
211 sizeof(struct davinci_vcif_dev), 211 sizeof(struct davinci_vcif_dev),
212 GFP_KERNEL); 212 GFP_KERNEL);
213 if (!davinci_vcif_dev) { 213 if (!davinci_vcif_dev)
214 dev_dbg(&pdev->dev,
215 "could not allocate memory for private data\n");
216 return -ENOMEM; 214 return -ENOMEM;
217 }
218 215
219 /* DMA tx params */ 216 /* DMA tx params */
220 davinci_vcif_dev->davinci_vc = davinci_vc; 217 davinci_vcif_dev->davinci_vc = davinci_vc;
diff --git a/sound/soc/dwc/dwc-i2s.c b/sound/soc/dwc/dwc-i2s.c
index 916067638180..e27e21f8569a 100644
--- a/sound/soc/dwc/dwc-i2s.c
+++ b/sound/soc/dwc/dwc-i2s.c
@@ -381,7 +381,7 @@ static int dw_i2s_set_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt)
381 return ret; 381 return ret;
382} 382}
383 383
384static struct snd_soc_dai_ops dw_i2s_dai_ops = { 384static const struct snd_soc_dai_ops dw_i2s_dai_ops = {
385 .startup = dw_i2s_startup, 385 .startup = dw_i2s_startup,
386 .shutdown = dw_i2s_shutdown, 386 .shutdown = dw_i2s_shutdown,
387 .hw_params = dw_i2s_hw_params, 387 .hw_params = dw_i2s_hw_params,
@@ -617,10 +617,8 @@ static int dw_i2s_probe(struct platform_device *pdev)
617 const char *clk_id; 617 const char *clk_id;
618 618
619 dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); 619 dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
620 if (!dev) { 620 if (!dev)
621 dev_warn(&pdev->dev, "kzalloc fail\n");
622 return -ENOMEM; 621 return -ENOMEM;
623 }
624 622
625 dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL); 623 dw_i2s_dai = devm_kzalloc(&pdev->dev, sizeof(*dw_i2s_dai), GFP_KERNEL);
626 if (!dw_i2s_dai) 624 if (!dw_i2s_dai)
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c
index 9998aea23597..2db4d0c80d33 100644
--- a/sound/soc/fsl/fsl-asoc-card.c
+++ b/sound/soc/fsl/fsl-asoc-card.c
@@ -683,7 +683,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev)
683 snd_soc_card_set_drvdata(&priv->card, priv); 683 snd_soc_card_set_drvdata(&priv->card, priv);
684 684
685 ret = devm_snd_soc_register_card(&pdev->dev, &priv->card); 685 ret = devm_snd_soc_register_card(&pdev->dev, &priv->card);
686 if (ret) 686 if (ret && ret != -EPROBE_DEFER)
687 dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret); 687 dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
688 688
689asrc_fail: 689asrc_fail:
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c
index 8cfffa70c144..806d39927318 100644
--- a/sound/soc/fsl/fsl_asrc.c
+++ b/sound/soc/fsl/fsl_asrc.c
@@ -542,7 +542,7 @@ static int fsl_asrc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
542 return 0; 542 return 0;
543} 543}
544 544
545static struct snd_soc_dai_ops fsl_asrc_dai_ops = { 545static const struct snd_soc_dai_ops fsl_asrc_dai_ops = {
546 .hw_params = fsl_asrc_dai_hw_params, 546 .hw_params = fsl_asrc_dai_hw_params,
547 .hw_free = fsl_asrc_dai_hw_free, 547 .hw_free = fsl_asrc_dai_hw_free,
548 .trigger = fsl_asrc_dai_trigger, 548 .trigger = fsl_asrc_dai_trigger,
diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c
index 282d841840b1..e1b97e59275a 100644
--- a/sound/soc/fsl/fsl_asrc_dma.c
+++ b/sound/soc/fsl/fsl_asrc_dma.c
@@ -20,7 +20,7 @@
20 20
21#define FSL_ASRC_DMABUF_SIZE (256 * 1024) 21#define FSL_ASRC_DMABUF_SIZE (256 * 1024)
22 22
23static struct snd_pcm_hardware snd_imx_hardware = { 23static const struct snd_pcm_hardware snd_imx_hardware = {
24 .info = SNDRV_PCM_INFO_INTERLEAVED | 24 .info = SNDRV_PCM_INFO_INTERLEAVED |
25 SNDRV_PCM_INFO_BLOCK_TRANSFER | 25 SNDRV_PCM_INFO_BLOCK_TRANSFER |
26 SNDRV_PCM_INFO_MMAP | 26 SNDRV_PCM_INFO_MMAP |
@@ -279,10 +279,8 @@ static int fsl_asrc_dma_startup(struct snd_pcm_substream *substream)
279 struct fsl_asrc_pair *pair; 279 struct fsl_asrc_pair *pair;
280 280
281 pair = kzalloc(sizeof(struct fsl_asrc_pair), GFP_KERNEL); 281 pair = kzalloc(sizeof(struct fsl_asrc_pair), GFP_KERNEL);
282 if (!pair) { 282 if (!pair)
283 dev_err(dev, "failed to allocate pair\n");
284 return -ENOMEM; 283 return -ENOMEM;
285 }
286 284
287 pair->asrc_priv = asrc_priv; 285 pair->asrc_priv = asrc_priv;
288 286
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index ccadefceeff2..0c11f434a374 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -63,7 +63,6 @@ struct dma_object {
63 struct ccsr_dma_channel __iomem *channel; 63 struct ccsr_dma_channel __iomem *channel;
64 unsigned int irq; 64 unsigned int irq;
65 bool assigned; 65 bool assigned;
66 char path[1];
67}; 66};
68 67
69/* 68/*
@@ -870,7 +869,7 @@ static struct device_node *find_ssi_node(struct device_node *dma_channel_np)
870 return NULL; 869 return NULL;
871} 870}
872 871
873static struct snd_pcm_ops fsl_dma_ops = { 872static const struct snd_pcm_ops fsl_dma_ops = {
874 .open = fsl_dma_open, 873 .open = fsl_dma_open,
875 .close = fsl_dma_close, 874 .close = fsl_dma_close,
876 .ioctl = snd_pcm_lib_ioctl, 875 .ioctl = snd_pcm_lib_ioctl,
@@ -897,20 +896,18 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
897 896
898 ret = of_address_to_resource(ssi_np, 0, &res); 897 ret = of_address_to_resource(ssi_np, 0, &res);
899 if (ret) { 898 if (ret) {
900 dev_err(&pdev->dev, "could not determine resources for %s\n", 899 dev_err(&pdev->dev, "could not determine resources for %pOF\n",
901 ssi_np->full_name); 900 ssi_np);
902 of_node_put(ssi_np); 901 of_node_put(ssi_np);
903 return ret; 902 return ret;
904 } 903 }
905 904
906 dma = kzalloc(sizeof(*dma) + strlen(np->full_name), GFP_KERNEL); 905 dma = kzalloc(sizeof(*dma), GFP_KERNEL);
907 if (!dma) { 906 if (!dma) {
908 dev_err(&pdev->dev, "could not allocate dma object\n");
909 of_node_put(ssi_np); 907 of_node_put(ssi_np);
910 return -ENOMEM; 908 return -ENOMEM;
911 } 909 }
912 910
913 strcpy(dma->path, np->full_name);
914 dma->dai.ops = &fsl_dma_ops; 911 dma->dai.ops = &fsl_dma_ops;
915 dma->dai.pcm_new = fsl_dma_new; 912 dma->dai.pcm_new = fsl_dma_new;
916 dma->dai.pcm_free = fsl_dma_free_dma_buffers; 913 dma->dai.pcm_free = fsl_dma_free_dma_buffers;
diff --git a/sound/soc/fsl/fsl_esai.c b/sound/soc/fsl/fsl_esai.c
index 809a069d490b..cef79a1a620b 100644
--- a/sound/soc/fsl/fsl_esai.c
+++ b/sound/soc/fsl/fsl_esai.c
@@ -620,7 +620,7 @@ static int fsl_esai_trigger(struct snd_pcm_substream *substream, int cmd,
620 return 0; 620 return 0;
621} 621}
622 622
623static struct snd_soc_dai_ops fsl_esai_dai_ops = { 623static const struct snd_soc_dai_ops fsl_esai_dai_ops = {
624 .startup = fsl_esai_startup, 624 .startup = fsl_esai_startup,
625 .shutdown = fsl_esai_shutdown, 625 .shutdown = fsl_esai_shutdown,
626 .trigger = fsl_esai_trigger, 626 .trigger = fsl_esai_trigger,
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 1ff467c9598a..7e6cc4da0088 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -626,7 +626,7 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream,
626 return 0; 626 return 0;
627} 627}
628 628
629static struct snd_soc_dai_ops fsl_spdif_dai_ops = { 629static const struct snd_soc_dai_ops fsl_spdif_dai_ops = {
630 .startup = fsl_spdif_startup, 630 .startup = fsl_spdif_startup,
631 .hw_params = fsl_spdif_hw_params, 631 .hw_params = fsl_spdif_hw_params,
632 .trigger = fsl_spdif_trigger, 632 .trigger = fsl_spdif_trigger,
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 173cb8496641..64598d1183f8 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1432,10 +1432,8 @@ static int fsl_ssi_probe(struct platform_device *pdev)
1432 1432
1433 ssi_private = devm_kzalloc(&pdev->dev, sizeof(*ssi_private), 1433 ssi_private = devm_kzalloc(&pdev->dev, sizeof(*ssi_private),
1434 GFP_KERNEL); 1434 GFP_KERNEL);
1435 if (!ssi_private) { 1435 if (!ssi_private)
1436 dev_err(&pdev->dev, "could not allocate DAI object\n");
1437 return -ENOMEM; 1436 return -ENOMEM;
1438 }
1439 1437
1440 ssi_private->soc = of_id->data; 1438 ssi_private->soc = of_id->data;
1441 ssi_private->dev = &pdev->dev; 1439 ssi_private->dev = &pdev->dev;
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index fc57da341d61..392d5eef356d 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -268,13 +268,13 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
268 268
269 ret = of_property_read_u32(child, "fsl,audmux-port", &port); 269 ret = of_property_read_u32(child, "fsl,audmux-port", &port);
270 if (ret) { 270 if (ret) {
271 dev_warn(&pdev->dev, "Failed to get fsl,audmux-port of child node \"%s\"\n", 271 dev_warn(&pdev->dev, "Failed to get fsl,audmux-port of child node \"%pOF\"\n",
272 child->full_name); 272 child);
273 continue; 273 continue;
274 } 274 }
275 if (!of_property_read_bool(child, "fsl,port-config")) { 275 if (!of_property_read_bool(child, "fsl,port-config")) {
276 dev_warn(&pdev->dev, "child node \"%s\" does not have property fsl,port-config\n", 276 dev_warn(&pdev->dev, "child node \"%pOF\" does not have property fsl,port-config\n",
277 child->full_name); 277 child);
278 continue; 278 continue;
279 } 279 }
280 280
@@ -292,15 +292,15 @@ static int imx_audmux_parse_dt_defaults(struct platform_device *pdev,
292 } 292 }
293 293
294 if (ret != -EOVERFLOW) { 294 if (ret != -EOVERFLOW) {
295 dev_err(&pdev->dev, "Failed to read u32 at index %d of child %s\n", 295 dev_err(&pdev->dev, "Failed to read u32 at index %d of child %pOF\n",
296 i, child->full_name); 296 i, child);
297 continue; 297 continue;
298 } 298 }
299 299
300 if (audmux_type == IMX31_AUDMUX) { 300 if (audmux_type == IMX31_AUDMUX) {
301 if (i % 2) { 301 if (i % 2) {
302 dev_err(&pdev->dev, "One pdcr value is missing in child node %s\n", 302 dev_err(&pdev->dev, "One pdcr value is missing in child node %pOF\n",
303 child->full_name); 303 child);
304 continue; 304 continue;
305 } 305 }
306 imx_audmux_v2_configure_port(port, ptcr, pdcr); 306 imx_audmux_v2_configure_port(port, ptcr, pdcr);
diff --git a/sound/soc/fsl/imx-es8328.c b/sound/soc/fsl/imx-es8328.c
index 20e7400e2611..9953438086e4 100644
--- a/sound/soc/fsl/imx-es8328.c
+++ b/sound/soc/fsl/imx-es8328.c
@@ -203,9 +203,6 @@ static int imx_es8328_remove(struct platform_device *pdev)
203{ 203{
204 struct imx_es8328_data *data = platform_get_drvdata(pdev); 204 struct imx_es8328_data *data = platform_get_drvdata(pdev);
205 205
206 snd_soc_jack_free_gpios(&headset_jack, ARRAY_SIZE(headset_jack_gpios),
207 headset_jack_gpios);
208
209 snd_soc_unregister_card(&data->card); 206 snd_soc_unregister_card(&data->card);
210 207
211 return 0; 208 return 0;
diff --git a/sound/soc/fsl/imx-pcm-fiq.c b/sound/soc/fsl/imx-pcm-fiq.c
index 92410f7ca1fa..4e5fefee111e 100644
--- a/sound/soc/fsl/imx-pcm-fiq.c
+++ b/sound/soc/fsl/imx-pcm-fiq.c
@@ -154,7 +154,7 @@ static snd_pcm_uframes_t snd_imx_pcm_pointer(struct snd_pcm_substream *substream
154 return bytes_to_frames(substream->runtime, iprtd->offset); 154 return bytes_to_frames(substream->runtime, iprtd->offset);
155} 155}
156 156
157static struct snd_pcm_hardware snd_imx_hardware = { 157static const struct snd_pcm_hardware snd_imx_hardware = {
158 .info = SNDRV_PCM_INFO_INTERLEAVED | 158 .info = SNDRV_PCM_INFO_INTERLEAVED |
159 SNDRV_PCM_INFO_BLOCK_TRANSFER | 159 SNDRV_PCM_INFO_BLOCK_TRANSFER |
160 SNDRV_PCM_INFO_MMAP | 160 SNDRV_PCM_INFO_MMAP |
@@ -227,7 +227,7 @@ static int snd_imx_pcm_mmap(struct snd_pcm_substream *substream,
227 return ret; 227 return ret;
228} 228}
229 229
230static struct snd_pcm_ops imx_pcm_ops = { 230static const struct snd_pcm_ops imx_pcm_ops = {
231 .open = snd_imx_open, 231 .open = snd_imx_open,
232 .close = snd_imx_close, 232 .close = snd_imx_close,
233 .ioctl = snd_pcm_lib_ioctl, 233 .ioctl = snd_pcm_lib_ioctl,
@@ -341,7 +341,7 @@ static void imx_pcm_fiq_free(struct snd_pcm *pcm)
341 imx_pcm_free(pcm); 341 imx_pcm_free(pcm);
342} 342}
343 343
344static struct snd_soc_platform_driver imx_soc_platform_fiq = { 344static const struct snd_soc_platform_driver imx_soc_platform_fiq = {
345 .ops = &imx_pcm_ops, 345 .ops = &imx_pcm_ops,
346 .pcm_new = imx_pcm_fiq_new, 346 .pcm_new = imx_pcm_fiq_new,
347 .pcm_free = imx_pcm_fiq_free, 347 .pcm_free = imx_pcm_fiq_free,
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index 1f7e70bfbd55..e63029f1aabc 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -287,7 +287,7 @@ psc_dma_hw_params(struct snd_pcm_substream *substream,
287 return 0; 287 return 0;
288} 288}
289 289
290static struct snd_pcm_ops psc_dma_ops = { 290static const struct snd_pcm_ops psc_dma_ops = {
291 .open = psc_dma_open, 291 .open = psc_dma_open,
292 .close = psc_dma_close, 292 .close = psc_dma_close,
293 .hw_free = psc_dma_hw_free, 293 .hw_free = psc_dma_hw_free,
@@ -356,7 +356,7 @@ static void psc_dma_free(struct snd_pcm *pcm)
356 } 356 }
357} 357}
358 358
359static struct snd_soc_platform_driver mpc5200_audio_dma_platform = { 359static const struct snd_soc_platform_driver mpc5200_audio_dma_platform = {
360 .ops = &psc_dma_ops, 360 .ops = &psc_dma_ops,
361 .pcm_new = &psc_dma_new, 361 .pcm_new = &psc_dma_new,
362 .pcm_free = &psc_dma_free, 362 .pcm_free = &psc_dma_free,
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index de2550c7a96b..2f7c8cf6f123 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -95,7 +95,7 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
95 asoc_simple_card_clk_disable(&dai_props->codec_dai); 95 asoc_simple_card_clk_disable(&dai_props->codec_dai);
96} 96}
97 97
98static struct snd_soc_ops asoc_graph_card_ops = { 98static const struct snd_soc_ops asoc_graph_card_ops = {
99 .startup = asoc_graph_card_startup, 99 .startup = asoc_graph_card_startup,
100 .shutdown = asoc_graph_card_shutdown, 100 .shutdown = asoc_graph_card_shutdown,
101}; 101};
diff --git a/sound/soc/generic/audio-graph-scu-card.c b/sound/soc/generic/audio-graph-scu-card.c
index 758ac06f3a99..06b6fcf0513e 100644
--- a/sound/soc/generic/audio-graph-scu-card.c
+++ b/sound/soc/generic/audio-graph-scu-card.c
@@ -56,7 +56,7 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
56 asoc_simple_card_clk_disable(dai_props); 56 asoc_simple_card_clk_disable(dai_props);
57} 57}
58 58
59static struct snd_soc_ops asoc_graph_card_ops = { 59static const struct snd_soc_ops asoc_graph_card_ops = {
60 .startup = asoc_graph_card_startup, 60 .startup = asoc_graph_card_startup,
61 .shutdown = asoc_graph_card_shutdown, 61 .shutdown = asoc_graph_card_shutdown,
62}; 62};
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 7d7ab4aee42e..d72f7d58102f 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -132,7 +132,7 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card,
132 132
133 /* Parse the card name from DT */ 133 /* Parse the card name from DT */
134 ret = snd_soc_of_parse_card_name(card, "label"); 134 ret = snd_soc_of_parse_card_name(card, "label");
135 if (ret < 0) { 135 if (ret < 0 || !card->name) {
136 char prop[128]; 136 char prop[128];
137 137
138 snprintf(prop, sizeof(prop), "%sname", prefix); 138 snprintf(prop, sizeof(prop), "%sname", prefix);
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index dfaf48ff88b0..6959a74a6f49 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -104,12 +104,6 @@ static int asoc_simple_card_init_jack(struct snd_soc_card *card,
104 return 0; 104 return 0;
105} 105}
106 106
107static void asoc_simple_card_remove_jack(struct asoc_simple_jack *sjack)
108{
109 if (gpio_is_valid(sjack->gpio.gpio))
110 snd_soc_jack_free_gpios(&sjack->jack, 1, &sjack->gpio);
111}
112
113static int asoc_simple_card_startup(struct snd_pcm_substream *substream) 107static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
114{ 108{
115 struct snd_soc_pcm_runtime *rtd = substream->private_data; 109 struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -493,10 +487,6 @@ err:
493static int asoc_simple_card_remove(struct platform_device *pdev) 487static int asoc_simple_card_remove(struct platform_device *pdev)
494{ 488{
495 struct snd_soc_card *card = platform_get_drvdata(pdev); 489 struct snd_soc_card *card = platform_get_drvdata(pdev);
496 struct simple_card_data *priv = snd_soc_card_get_drvdata(card);
497
498 asoc_simple_card_remove_jack(&priv->hp_jack);
499 asoc_simple_card_remove_jack(&priv->mic_jack);
500 490
501 return asoc_simple_card_clean_reference(card); 491 return asoc_simple_card_clean_reference(card);
502} 492}
diff --git a/sound/soc/hisilicon/hi6210-i2s.c b/sound/soc/hisilicon/hi6210-i2s.c
index b193d3beb253..0c8f86d4020e 100644
--- a/sound/soc/hisilicon/hi6210-i2s.c
+++ b/sound/soc/hisilicon/hi6210-i2s.c
@@ -517,7 +517,7 @@ static int hi6210_i2s_dai_probe(struct snd_soc_dai *dai)
517} 517}
518 518
519 519
520static struct snd_soc_dai_ops hi6210_i2s_dai_ops = { 520static const struct snd_soc_dai_ops hi6210_i2s_dai_ops = {
521 .trigger = hi6210_i2s_trigger, 521 .trigger = hi6210_i2s_trigger,
522 .hw_params = hi6210_i2s_hw_params, 522 .hw_params = hi6210_i2s_hw_params,
523 .set_fmt = hi6210_i2s_set_fmt, 523 .set_fmt = hi6210_i2s_set_fmt,
diff --git a/sound/soc/img/img-i2s-in.c b/sound/soc/img/img-i2s-in.c
index 0389203f8560..567f9767fb73 100644
--- a/sound/soc/img/img-i2s-in.c
+++ b/sound/soc/img/img-i2s-in.c
@@ -443,7 +443,7 @@ static int img_i2s_in_probe(struct platform_device *pdev)
443 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE; 443 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE;
444 i2s->dai_driver.ops = &img_i2s_in_dai_ops; 444 i2s->dai_driver.ops = &img_i2s_in_dai_ops;
445 445
446 rst = devm_reset_control_get(dev, "rst"); 446 rst = devm_reset_control_get_exclusive(dev, "rst");
447 if (IS_ERR(rst)) { 447 if (IS_ERR(rst)) {
448 if (PTR_ERR(rst) == -EPROBE_DEFER) { 448 if (PTR_ERR(rst) == -EPROBE_DEFER) {
449 ret = -EPROBE_DEFER; 449 ret = -EPROBE_DEFER;
diff --git a/sound/soc/img/img-i2s-out.c b/sound/soc/img/img-i2s-out.c
index 5f997135a8ae..78b7f6cd675b 100644
--- a/sound/soc/img/img-i2s-out.c
+++ b/sound/soc/img/img-i2s-out.c
@@ -446,7 +446,7 @@ static int img_i2s_out_probe(struct platform_device *pdev)
446 446
447 i2s->channel_base = base + (max_i2s_chan_pow_2 * 0x20); 447 i2s->channel_base = base + (max_i2s_chan_pow_2 * 0x20);
448 448
449 i2s->rst = devm_reset_control_get(&pdev->dev, "rst"); 449 i2s->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
450 if (IS_ERR(i2s->rst)) { 450 if (IS_ERR(i2s->rst)) {
451 if (PTR_ERR(i2s->rst) != -EPROBE_DEFER) 451 if (PTR_ERR(i2s->rst) != -EPROBE_DEFER)
452 dev_err(&pdev->dev, "No top level reset found\n"); 452 dev_err(&pdev->dev, "No top level reset found\n");
diff --git a/sound/soc/img/img-parallel-out.c b/sound/soc/img/img-parallel-out.c
index 33ceb207ee70..23b0f0f6ec9c 100644
--- a/sound/soc/img/img-parallel-out.c
+++ b/sound/soc/img/img-parallel-out.c
@@ -224,7 +224,7 @@ static int img_prl_out_probe(struct platform_device *pdev)
224 224
225 prl->base = base; 225 prl->base = base;
226 226
227 prl->rst = devm_reset_control_get(&pdev->dev, "rst"); 227 prl->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
228 if (IS_ERR(prl->rst)) { 228 if (IS_ERR(prl->rst)) {
229 if (PTR_ERR(prl->rst) != -EPROBE_DEFER) 229 if (PTR_ERR(prl->rst) != -EPROBE_DEFER)
230 dev_err(&pdev->dev, "No top level reset found\n"); 230 dev_err(&pdev->dev, "No top level reset found\n");
diff --git a/sound/soc/img/img-spdif-in.c b/sound/soc/img/img-spdif-in.c
index 4d9953d318af..8adfd65d4390 100644
--- a/sound/soc/img/img-spdif-in.c
+++ b/sound/soc/img/img-spdif-in.c
@@ -727,7 +727,7 @@ static int img_spdif_in_probe(struct platform_device *pdev)
727 if (ret) 727 if (ret)
728 return ret; 728 return ret;
729 729
730 rst = devm_reset_control_get(&pdev->dev, "rst"); 730 rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
731 if (IS_ERR(rst)) { 731 if (IS_ERR(rst)) {
732 if (PTR_ERR(rst) == -EPROBE_DEFER) { 732 if (PTR_ERR(rst) == -EPROBE_DEFER) {
733 ret = -EPROBE_DEFER; 733 ret = -EPROBE_DEFER;
diff --git a/sound/soc/img/img-spdif-out.c b/sound/soc/img/img-spdif-out.c
index 08f93a5dadfe..383655da2e60 100644
--- a/sound/soc/img/img-spdif-out.c
+++ b/sound/soc/img/img-spdif-out.c
@@ -334,7 +334,7 @@ static int img_spdif_out_probe(struct platform_device *pdev)
334 334
335 spdif->base = base; 335 spdif->base = base;
336 336
337 spdif->rst = devm_reset_control_get(&pdev->dev, "rst"); 337 spdif->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
338 if (IS_ERR(spdif->rst)) { 338 if (IS_ERR(spdif->rst)) {
339 if (PTR_ERR(spdif->rst) != -EPROBE_DEFER) 339 if (PTR_ERR(spdif->rst) != -EPROBE_DEFER)
340 dev_err(&pdev->dev, "No top level reset found\n"); 340 dev_err(&pdev->dev, "No top level reset found\n");
diff --git a/sound/soc/intel/Kconfig b/sound/soc/intel/Kconfig
index b301bfff1c09..b3c7f554ec30 100644
--- a/sound/soc/intel/Kconfig
+++ b/sound/soc/intel/Kconfig
@@ -255,11 +255,12 @@ config SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH
255 255
256config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH 256config SND_SOC_INTEL_KBL_RT5663_RT5514_MAX98927_MACH
257 tristate "ASoC Audio driver for KBL with RT5663, RT5514 and MAX98927 in I2S Mode" 257 tristate "ASoC Audio driver for KBL with RT5663, RT5514 and MAX98927 in I2S Mode"
258 depends on X86_INTEL_LPSS && I2C 258 depends on X86_INTEL_LPSS && I2C && SPI
259 select SND_SOC_INTEL_SST 259 select SND_SOC_INTEL_SST
260 select SND_SOC_INTEL_SKYLAKE 260 select SND_SOC_INTEL_SKYLAKE
261 select SND_SOC_RT5663 261 select SND_SOC_RT5663
262 select SND_SOC_RT5514 262 select SND_SOC_RT5514
263 select SND_SOC_RT5514_SPI
263 select SND_SOC_MAX98927 264 select SND_SOC_MAX98927
264 select SND_SOC_HDAC_HDMI 265 select SND_SOC_HDAC_HDMI
265 help 266 help
diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
index b082b31023d5..43e7fdd19f29 100644
--- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c
+++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c
@@ -76,7 +76,7 @@ int sst_unregister_dsp(struct sst_device *dev)
76} 76}
77EXPORT_SYMBOL_GPL(sst_unregister_dsp); 77EXPORT_SYMBOL_GPL(sst_unregister_dsp);
78 78
79static struct snd_pcm_hardware sst_platform_pcm_hw = { 79static const struct snd_pcm_hardware sst_platform_pcm_hw = {
80 .info = (SNDRV_PCM_INFO_INTERLEAVED | 80 .info = (SNDRV_PCM_INFO_INTERLEAVED |
81 SNDRV_PCM_INFO_DOUBLE | 81 SNDRV_PCM_INFO_DOUBLE |
82 SNDRV_PCM_INFO_PAUSE | 82 SNDRV_PCM_INFO_PAUSE |
@@ -471,7 +471,7 @@ static void sst_disable_ssp(struct snd_pcm_substream *substream,
471 } 471 }
472} 472}
473 473
474static struct snd_soc_dai_ops sst_media_dai_ops = { 474static const struct snd_soc_dai_ops sst_media_dai_ops = {
475 .startup = sst_media_open, 475 .startup = sst_media_open,
476 .shutdown = sst_media_close, 476 .shutdown = sst_media_close,
477 .prepare = sst_media_prepare, 477 .prepare = sst_media_prepare,
@@ -480,11 +480,11 @@ static struct snd_soc_dai_ops sst_media_dai_ops = {
480 .mute_stream = sst_media_digital_mute, 480 .mute_stream = sst_media_digital_mute,
481}; 481};
482 482
483static struct snd_soc_dai_ops sst_compr_dai_ops = { 483static const struct snd_soc_dai_ops sst_compr_dai_ops = {
484 .mute_stream = sst_media_digital_mute, 484 .mute_stream = sst_media_digital_mute,
485}; 485};
486 486
487static struct snd_soc_dai_ops sst_be_dai_ops = { 487static const struct snd_soc_dai_ops sst_be_dai_ops = {
488 .startup = sst_enable_ssp, 488 .startup = sst_enable_ssp,
489 .hw_params = sst_be_hw_params, 489 .hw_params = sst_be_hw_params,
490 .set_fmt = sst_set_format, 490 .set_fmt = sst_set_format,
@@ -705,7 +705,7 @@ static int sst_soc_probe(struct snd_soc_platform *platform)
705 return sst_dsp_init_v2_dpcm(platform); 705 return sst_dsp_init_v2_dpcm(platform);
706} 706}
707 707
708static struct snd_soc_platform_driver sst_soc_platform_drv = { 708static const struct snd_soc_platform_driver sst_soc_platform_drv = {
709 .probe = sst_soc_probe, 709 .probe = sst_soc_probe,
710 .ops = &sst_platform_ops, 710 .ops = &sst_platform_ops,
711 .compr_ops = &sst_platform_compr_ops, 711 .compr_ops = &sst_platform_compr_ops,
diff --git a/sound/soc/intel/atom/sst/sst_drv_interface.c b/sound/soc/intel/atom/sst/sst_drv_interface.c
index ce689c5af5ab..71af5449be90 100644
--- a/sound/soc/intel/atom/sst/sst_drv_interface.c
+++ b/sound/soc/intel/atom/sst/sst_drv_interface.c
@@ -407,7 +407,7 @@ static int sst_cdev_caps(struct snd_compr_caps *caps)
407 return 0; 407 return 0;
408} 408}
409 409
410static struct snd_compr_codec_caps caps_mp3 = { 410static const struct snd_compr_codec_caps caps_mp3 = {
411 .num_descriptors = 1, 411 .num_descriptors = 1,
412 .descriptor[0].max_ch = 2, 412 .descriptor[0].max_ch = 2,
413 .descriptor[0].sample_rates[0] = 48000, 413 .descriptor[0].sample_rates[0] = 48000,
@@ -424,7 +424,7 @@ static struct snd_compr_codec_caps caps_mp3 = {
424 .descriptor[0].formats = 0, 424 .descriptor[0].formats = 0,
425}; 425};
426 426
427static struct snd_compr_codec_caps caps_aac = { 427static const struct snd_compr_codec_caps caps_aac = {
428 .num_descriptors = 2, 428 .num_descriptors = 2,
429 .descriptor[1].max_ch = 2, 429 .descriptor[1].max_ch = 2,
430 .descriptor[0].sample_rates[0] = 48000, 430 .descriptor[0].sample_rates[0] = 48000,
diff --git a/sound/soc/intel/atom/sst/sst_pci.c b/sound/soc/intel/atom/sst/sst_pci.c
index 3a0b3bf0af97..6906ee624cf6 100644
--- a/sound/soc/intel/atom/sst/sst_pci.c
+++ b/sound/soc/intel/atom/sst/sst_pci.c
@@ -181,7 +181,7 @@ static void intel_sst_remove(struct pci_dev *pci)
181} 181}
182 182
183/* PCI Routines */ 183/* PCI Routines */
184static struct pci_device_id intel_sst_ids[] = { 184static const struct pci_device_id intel_sst_ids[] = {
185 { PCI_VDEVICE(INTEL, SST_MRFLD_PCI_ID), 0}, 185 { PCI_VDEVICE(INTEL, SST_MRFLD_PCI_ID), 0},
186 { 0, } 186 { 0, }
187}; 187};
diff --git a/sound/soc/intel/baytrail/sst-baytrail-pcm.c b/sound/soc/intel/baytrail/sst-baytrail-pcm.c
index 4765ad474544..c54529320f07 100644
--- a/sound/soc/intel/baytrail/sst-baytrail-pcm.c
+++ b/sound/soc/intel/baytrail/sst-baytrail-pcm.c
@@ -309,7 +309,7 @@ static int sst_byt_pcm_mmap(struct snd_pcm_substream *substream,
309 return snd_pcm_lib_default_mmap(substream, vma); 309 return snd_pcm_lib_default_mmap(substream, vma);
310} 310}
311 311
312static struct snd_pcm_ops sst_byt_pcm_ops = { 312static const struct snd_pcm_ops sst_byt_pcm_ops = {
313 .open = sst_byt_pcm_open, 313 .open = sst_byt_pcm_open,
314 .close = sst_byt_pcm_close, 314 .close = sst_byt_pcm_close,
315 .ioctl = snd_pcm_lib_ioctl, 315 .ioctl = snd_pcm_lib_ioctl,
@@ -395,7 +395,7 @@ static int sst_byt_pcm_remove(struct snd_soc_platform *platform)
395 return 0; 395 return 0;
396} 396}
397 397
398static struct snd_soc_platform_driver byt_soc_platform = { 398static const struct snd_soc_platform_driver byt_soc_platform = {
399 .probe = sst_byt_pcm_probe, 399 .probe = sst_byt_pcm_probe,
400 .remove = sst_byt_pcm_remove, 400 .remove = sst_byt_pcm_remove,
401 .ops = &sst_byt_pcm_ops, 401 .ops = &sst_byt_pcm_ops,
diff --git a/sound/soc/intel/boards/bxt_rt298.c b/sound/soc/intel/boards/bxt_rt298.c
index 0c3a3cbcb884..7843104fadcb 100644
--- a/sound/soc/intel/boards/bxt_rt298.c
+++ b/sound/soc/intel/boards/bxt_rt298.c
@@ -114,7 +114,44 @@ static const struct snd_soc_dapm_route broxton_rt298_map[] = {
114 { "iDisp2 Tx", NULL, "iDisp2_out"}, 114 { "iDisp2 Tx", NULL, "iDisp2_out"},
115 { "hifi1", NULL, "iDisp1 Tx"}, 115 { "hifi1", NULL, "iDisp1 Tx"},
116 { "iDisp1 Tx", NULL, "iDisp1_out"}, 116 { "iDisp1 Tx", NULL, "iDisp1_out"},
117};
118
119static const struct snd_soc_dapm_route geminilake_rt298_map[] = {
120 /* speaker */
121 {"Speaker", NULL, "SPOR"},
122 {"Speaker", NULL, "SPOL"},
123
124 /* HP jack connectors - unknown if we have jack detect */
125 {"Headphone Jack", NULL, "HPO Pin"},
126
127 /* other jacks */
128 {"MIC1", NULL, "Mic Jack"},
129
130 /* digital mics */
131 {"DMIC1 Pin", NULL, "DMIC2"},
132 {"DMic", NULL, "SoC DMIC"},
133
134 {"HDMI1", NULL, "hif5-0 Output"},
135 {"HDMI2", NULL, "hif6-0 Output"},
136 {"HDMI2", NULL, "hif7-0 Output"},
137
138 /* CODEC BE connections */
139 { "AIF1 Playback", NULL, "ssp2 Tx"},
140 { "ssp2 Tx", NULL, "codec0_out"},
141 { "ssp2 Tx", NULL, "codec1_out"},
142
143 { "codec0_in", NULL, "ssp2 Rx" },
144 { "ssp2 Rx", NULL, "AIF1 Capture" },
117 145
146 { "dmic01_hifi", NULL, "DMIC01 Rx" },
147 { "DMIC01 Rx", NULL, "Capture" },
148
149 { "hifi3", NULL, "iDisp3 Tx"},
150 { "iDisp3 Tx", NULL, "iDisp3_out"},
151 { "hifi2", NULL, "iDisp2 Tx"},
152 { "iDisp2 Tx", NULL, "iDisp2_out"},
153 { "hifi1", NULL, "iDisp1 Tx"},
154 { "iDisp1 Tx", NULL, "iDisp1_out"},
118}; 155};
119 156
120static int broxton_rt298_fe_init(struct snd_soc_pcm_runtime *rtd) 157static int broxton_rt298_fe_init(struct snd_soc_pcm_runtime *rtd)
@@ -492,7 +529,6 @@ static int bxt_card_late_probe(struct snd_soc_card *card)
492/* broxton audio machine driver for SPT + RT298S */ 529/* broxton audio machine driver for SPT + RT298S */
493static struct snd_soc_card broxton_rt298 = { 530static struct snd_soc_card broxton_rt298 = {
494 .name = "broxton-rt298", 531 .name = "broxton-rt298",
495 .owner = THIS_MODULE,
496 .dai_link = broxton_rt298_dais, 532 .dai_link = broxton_rt298_dais,
497 .num_links = ARRAY_SIZE(broxton_rt298_dais), 533 .num_links = ARRAY_SIZE(broxton_rt298_dais),
498 .controls = broxton_controls, 534 .controls = broxton_controls,
@@ -506,9 +542,41 @@ static struct snd_soc_card broxton_rt298 = {
506 542
507}; 543};
508 544
545static struct snd_soc_card geminilake_rt298 = {
546 .name = "geminilake-rt298",
547 .dai_link = broxton_rt298_dais,
548 .num_links = ARRAY_SIZE(broxton_rt298_dais),
549 .controls = broxton_controls,
550 .num_controls = ARRAY_SIZE(broxton_controls),
551 .dapm_widgets = broxton_widgets,
552 .num_dapm_widgets = ARRAY_SIZE(broxton_widgets),
553 .dapm_routes = geminilake_rt298_map,
554 .num_dapm_routes = ARRAY_SIZE(geminilake_rt298_map),
555 .fully_routed = true,
556 .late_probe = bxt_card_late_probe,
557};
558
509static int broxton_audio_probe(struct platform_device *pdev) 559static int broxton_audio_probe(struct platform_device *pdev)
510{ 560{
511 struct bxt_rt286_private *ctx; 561 struct bxt_rt286_private *ctx;
562 struct snd_soc_card *card =
563 (struct snd_soc_card *)pdev->id_entry->driver_data;
564 int i;
565
566 for (i = 0; i < ARRAY_SIZE(broxton_rt298_dais); i++) {
567 if (!strncmp(card->dai_link[i].codec_name, "i2c-INT343A:00",
568 I2C_NAME_SIZE)) {
569 if (!strncmp(card->name, "broxton-rt298",
570 PLATFORM_NAME_SIZE)) {
571 card->dai_link[i].name = "SSP5-Codec";
572 card->dai_link[i].cpu_dai_name = "SSP5 Pin";
573 } else if (!strncmp(card->name, "geminilake-rt298",
574 PLATFORM_NAME_SIZE)) {
575 card->dai_link[i].name = "SSP2-Codec";
576 card->dai_link[i].cpu_dai_name = "SSP2 Pin";
577 }
578 }
579 }
512 580
513 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC); 581 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_ATOMIC);
514 if (!ctx) 582 if (!ctx)
@@ -516,18 +584,27 @@ static int broxton_audio_probe(struct platform_device *pdev)
516 584
517 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); 585 INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
518 586
519 broxton_rt298.dev = &pdev->dev; 587 card->dev = &pdev->dev;
520 snd_soc_card_set_drvdata(&broxton_rt298, ctx); 588 snd_soc_card_set_drvdata(card, ctx);
521 589
522 return devm_snd_soc_register_card(&pdev->dev, &broxton_rt298); 590 return devm_snd_soc_register_card(&pdev->dev, card);
523} 591}
524 592
593static const struct platform_device_id bxt_board_ids[] = {
594 { .name = "bxt_alc298s_i2s", .driver_data =
595 (unsigned long)&broxton_rt298 },
596 { .name = "glk_alc298s_i2s", .driver_data =
597 (unsigned long)&geminilake_rt298 },
598 {}
599};
600
525static struct platform_driver broxton_audio = { 601static struct platform_driver broxton_audio = {
526 .probe = broxton_audio_probe, 602 .probe = broxton_audio_probe,
527 .driver = { 603 .driver = {
528 .name = "bxt_alc298s_i2s", 604 .name = "bxt_alc298s_i2s",
529 .pm = &snd_soc_pm_ops, 605 .pm = &snd_soc_pm_ops,
530 }, 606 },
607 .id_table = bxt_board_ids,
531}; 608};
532module_platform_driver(broxton_audio) 609module_platform_driver(broxton_audio)
533 610
@@ -537,3 +614,4 @@ MODULE_AUTHOR("Senthilnathan Veppur <senthilnathanx.veppur@intel.com>");
537MODULE_DESCRIPTION("Intel SST Audio for Broxton"); 614MODULE_DESCRIPTION("Intel SST Audio for Broxton");
538MODULE_LICENSE("GPL v2"); 615MODULE_LICENSE("GPL v2");
539MODULE_ALIAS("platform:bxt_alc298s_i2s"); 616MODULE_ALIAS("platform:bxt_alc298s_i2s");
617MODULE_ALIAS("platform:glk_alc298s_i2s");
diff --git a/sound/soc/intel/boards/byt-max98090.c b/sound/soc/intel/boards/byt-max98090.c
index 047be7fa0ce9..0f8b8209c020 100644
--- a/sound/soc/intel/boards/byt-max98090.c
+++ b/sound/soc/intel/boards/byt-max98090.c
@@ -173,20 +173,8 @@ static int byt_max98090_probe(struct platform_device *pdev)
173 return 0; 173 return 0;
174} 174}
175 175
176static int byt_max98090_remove(struct platform_device *pdev)
177{
178 struct snd_soc_card *card = platform_get_drvdata(pdev);
179 struct byt_max98090_private *priv = snd_soc_card_get_drvdata(card);
180
181 snd_soc_jack_free_gpios(&priv->jack, ARRAY_SIZE(hs_jack_gpios),
182 hs_jack_gpios);
183
184 return 0;
185}
186
187static struct platform_driver byt_max98090_driver = { 176static struct platform_driver byt_max98090_driver = {
188 .probe = byt_max98090_probe, 177 .probe = byt_max98090_probe,
189 .remove = byt_max98090_remove,
190 .driver = { 178 .driver = {
191 .name = "byt-max98090", 179 .name = "byt-max98090",
192 .pm = &snd_soc_pm_ops, 180 .pm = &snd_soc_pm_ops,
diff --git a/sound/soc/intel/boards/cht_bsw_rt5672.c b/sound/soc/intel/boards/cht_bsw_rt5672.c
index bc2a52de06a3..f597d5582223 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5672.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5672.c
@@ -184,6 +184,13 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream,
184 return 0; 184 return 0;
185} 185}
186 186
187static const struct acpi_gpio_params headset_gpios = { 0, 0, false };
188
189static const struct acpi_gpio_mapping cht_rt5672_gpios[] = {
190 { "headset-gpios", &headset_gpios, 1 },
191 {},
192};
193
187static int cht_codec_init(struct snd_soc_pcm_runtime *runtime) 194static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
188{ 195{
189 int ret; 196 int ret;
@@ -191,6 +198,9 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
191 struct snd_soc_codec *codec = codec_dai->codec; 198 struct snd_soc_codec *codec = codec_dai->codec;
192 struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card); 199 struct cht_mc_private *ctx = snd_soc_card_get_drvdata(runtime->card);
193 200
201 if (devm_acpi_dev_add_driver_gpios(codec->dev, cht_rt5672_gpios))
202 dev_warn(runtime->dev, "Unable to add GPIO mapping table\n");
203
194 /* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */ 204 /* TDM 4 slots 24 bit, set Rx & Tx bitmask to 4 active slots */
195 ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xF, 0xF, 4, 24); 205 ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xF, 0xF, 4, 24);
196 if (ret < 0) { 206 if (ret < 0) {
diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index f9ba97788157..7f7607420706 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -34,7 +34,7 @@
34#define MAXIM_DEV0_NAME "i2c-MX98927:00" 34#define MAXIM_DEV0_NAME "i2c-MX98927:00"
35#define MAXIM_DEV1_NAME "i2c-MX98927:01" 35#define MAXIM_DEV1_NAME "i2c-MX98927:01"
36 36
37static struct snd_soc_card kabylake_audio_card; 37static struct snd_soc_card *kabylake_audio_card;
38static const struct snd_pcm_hw_constraint_list *dmic_constraints; 38static const struct snd_pcm_hw_constraint_list *dmic_constraints;
39static struct snd_soc_jack skylake_hdmi[3]; 39static struct snd_soc_jack skylake_hdmi[3];
40 40
@@ -52,6 +52,8 @@ struct kbl_rt5663_private {
52enum { 52enum {
53 KBL_DPCM_AUDIO_PB = 0, 53 KBL_DPCM_AUDIO_PB = 0,
54 KBL_DPCM_AUDIO_CP, 54 KBL_DPCM_AUDIO_CP,
55 KBL_DPCM_AUDIO_HS_PB,
56 KBL_DPCM_AUDIO_ECHO_REF_CP,
55 KBL_DPCM_AUDIO_REF_CP, 57 KBL_DPCM_AUDIO_REF_CP,
56 KBL_DPCM_AUDIO_DMIC_CP, 58 KBL_DPCM_AUDIO_DMIC_CP,
57 KBL_DPCM_AUDIO_HDMI1_PB, 59 KBL_DPCM_AUDIO_HDMI1_PB,
@@ -72,8 +74,9 @@ static const struct snd_soc_dapm_widget kabylake_widgets[] = {
72 SND_SOC_DAPM_SPK("Left Spk", NULL), 74 SND_SOC_DAPM_SPK("Left Spk", NULL),
73 SND_SOC_DAPM_SPK("Right Spk", NULL), 75 SND_SOC_DAPM_SPK("Right Spk", NULL),
74 SND_SOC_DAPM_MIC("SoC DMIC", NULL), 76 SND_SOC_DAPM_MIC("SoC DMIC", NULL),
75 SND_SOC_DAPM_SPK("DP", NULL), 77 SND_SOC_DAPM_SPK("HDMI1", NULL),
76 SND_SOC_DAPM_SPK("HDMI", NULL), 78 SND_SOC_DAPM_SPK("HDMI2", NULL),
79 SND_SOC_DAPM_SPK("HDMI3", NULL),
77 80
78}; 81};
79 82
@@ -91,20 +94,22 @@ static const struct snd_soc_dapm_route kabylake_map[] = {
91 { "IN1N", NULL, "Headset Mic" }, 94 { "IN1N", NULL, "Headset Mic" },
92 { "DMic", NULL, "SoC DMIC" }, 95 { "DMic", NULL, "SoC DMIC" },
93 96
94 { "HDMI", NULL, "hif5 Output" },
95 { "DP", NULL, "hif6 Output" },
96
97 /* CODEC BE connections */ 97 /* CODEC BE connections */
98 { "Left HiFi Playback", NULL, "ssp0 Tx" }, 98 { "Left HiFi Playback", NULL, "ssp0 Tx" },
99 { "Right HiFi Playback", NULL, "ssp0 Tx" }, 99 { "Right HiFi Playback", NULL, "ssp0 Tx" },
100 { "ssp0 Tx", NULL, "codec0_out" }, 100 { "ssp0 Tx", NULL, "spk_out" },
101 101
102 { "AIF Playback", NULL, "ssp1 Tx" }, 102 { "AIF Playback", NULL, "ssp1 Tx" },
103 { "ssp1 Tx", NULL, "codec1_out" }, 103 { "ssp1 Tx", NULL, "hs_out" },
104 104
105 { "codec0_in", NULL, "ssp1 Rx" }, 105 { "hs_in", NULL, "ssp1 Rx" },
106 { "ssp1 Rx", NULL, "AIF Capture" }, 106 { "ssp1 Rx", NULL, "AIF Capture" },
107 107
108 /* IV feedback path */
109 { "codec0_fb_in", NULL, "ssp0 Rx"},
110 { "ssp0 Rx", NULL, "Left HiFi Capture" },
111 { "ssp0 Rx", NULL, "Right HiFi Capture" },
112
108 /* DMIC */ 113 /* DMIC */
109 { "dmic01_hifi", NULL, "DMIC01 Rx" }, 114 { "dmic01_hifi", NULL, "DMIC01 Rx" },
110 { "DMIC01 Rx", NULL, "DMIC AIF" }, 115 { "DMIC01 Rx", NULL, "DMIC AIF" },
@@ -117,6 +122,49 @@ static const struct snd_soc_dapm_route kabylake_map[] = {
117 { "iDisp1 Tx", NULL, "iDisp1_out"}, 122 { "iDisp1 Tx", NULL, "iDisp1_out"},
118}; 123};
119 124
125enum {
126 KBL_DPCM_AUDIO_5663_PB = 0,
127 KBL_DPCM_AUDIO_5663_CP,
128 KBL_DPCM_AUDIO_5663_HDMI1_PB,
129 KBL_DPCM_AUDIO_5663_HDMI2_PB,
130};
131
132static const struct snd_kcontrol_new kabylake_5663_controls[] = {
133 SOC_DAPM_PIN_SWITCH("Headphone Jack"),
134 SOC_DAPM_PIN_SWITCH("Headset Mic"),
135};
136
137static const struct snd_soc_dapm_widget kabylake_5663_widgets[] = {
138 SND_SOC_DAPM_HP("Headphone Jack", NULL),
139 SND_SOC_DAPM_MIC("Headset Mic", NULL),
140 SND_SOC_DAPM_SPK("DP", NULL),
141 SND_SOC_DAPM_SPK("HDMI", NULL),
142};
143
144static const struct snd_soc_dapm_route kabylake_5663_map[] = {
145 { "Headphone Jack", NULL, "HPOL" },
146 { "Headphone Jack", NULL, "HPOR" },
147
148 /* other jacks */
149 { "IN1P", NULL, "Headset Mic" },
150 { "IN1N", NULL, "Headset Mic" },
151
152 { "HDMI", NULL, "hif5 Output" },
153 { "DP", NULL, "hif6 Output" },
154
155 /* CODEC BE connections */
156 { "AIF Playback", NULL, "ssp1 Tx" },
157 { "ssp1 Tx", NULL, "codec1_out" },
158
159 { "codec0_in", NULL, "ssp1 Rx" },
160 { "ssp1 Rx", NULL, "AIF Capture" },
161
162 { "hifi2", NULL, "iDisp2 Tx"},
163 { "iDisp2 Tx", NULL, "iDisp2_out"},
164 { "hifi1", NULL, "iDisp1 Tx"},
165 { "iDisp1 Tx", NULL, "iDisp1_out"},
166};
167
120static struct snd_soc_codec_conf max98927_codec_conf[] = { 168static struct snd_soc_codec_conf max98927_codec_conf[] = {
121 { 169 {
122 .dev_name = MAXIM_DEV0_NAME, 170 .dev_name = MAXIM_DEV0_NAME,
@@ -165,7 +213,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
165 * Headset buttons map to the google Reference headset. 213 * Headset buttons map to the google Reference headset.
166 * These can be configured by userspace. 214 * These can be configured by userspace.
167 */ 215 */
168 ret = snd_soc_card_jack_new(&kabylake_audio_card, "Headset Jack", 216 ret = snd_soc_card_jack_new(kabylake_audio_card, "Headset Jack",
169 SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 | 217 SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 |
170 SND_JACK_BTN_2 | SND_JACK_BTN_3, &ctx->kabylake_headset, 218 SND_JACK_BTN_2 | SND_JACK_BTN_3, &ctx->kabylake_headset,
171 NULL, 0); 219 NULL, 0);
@@ -173,8 +221,18 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
173 dev_err(rtd->dev, "Headset Jack creation failed %d\n", ret); 221 dev_err(rtd->dev, "Headset Jack creation failed %d\n", ret);
174 return ret; 222 return ret;
175 } 223 }
176
177 rt5663_set_jack_detect(codec, &ctx->kabylake_headset); 224 rt5663_set_jack_detect(codec, &ctx->kabylake_headset);
225 return ret;
226}
227
228static int kabylake_rt5663_max98927_codec_init(struct snd_soc_pcm_runtime *rtd)
229{
230 int ret;
231
232 ret = kabylake_rt5663_codec_init(rtd);
233 if (ret)
234 return ret;
235
178 ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC"); 236 ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC");
179 if (ret) { 237 if (ret) {
180 dev_err(rtd->dev, "SoC DMIC ignore suspend failed %d\n", ret); 238 dev_err(rtd->dev, "SoC DMIC ignore suspend failed %d\n", ret);
@@ -184,7 +242,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
184 return ret; 242 return ret;
185} 243}
186 244
187static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd) 245static int kabylake_hdmi_init(struct snd_soc_pcm_runtime *rtd, int device)
188{ 246{
189 struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(rtd->card); 247 struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(rtd->card);
190 struct snd_soc_dai *dai = rtd->codec_dai; 248 struct snd_soc_dai *dai = rtd->codec_dai;
@@ -194,7 +252,7 @@ static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd)
194 if (!pcm) 252 if (!pcm)
195 return -ENOMEM; 253 return -ENOMEM;
196 254
197 pcm->device = KBL_DPCM_AUDIO_HDMI1_PB; 255 pcm->device = device;
198 pcm->codec_dai = dai; 256 pcm->codec_dai = dai;
199 257
200 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); 258 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list);
@@ -202,47 +260,36 @@ static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd)
202 return 0; 260 return 0;
203} 261}
204 262
205static int kabylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd) 263static int kabylake_hdmi1_init(struct snd_soc_pcm_runtime *rtd)
206{ 264{
207 struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(rtd->card); 265 return kabylake_hdmi_init(rtd, KBL_DPCM_AUDIO_HDMI1_PB);
208 struct snd_soc_dai *dai = rtd->codec_dai; 266}
209 struct kbl_hdmi_pcm *pcm;
210
211 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
212 if (!pcm)
213 return -ENOMEM;
214
215 pcm->device = KBL_DPCM_AUDIO_HDMI2_PB;
216 pcm->codec_dai = dai;
217
218 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list);
219 267
220 return 0; 268static int kabylake_hdmi2_init(struct snd_soc_pcm_runtime *rtd)
269{
270 return kabylake_hdmi_init(rtd, KBL_DPCM_AUDIO_HDMI2_PB);
221} 271}
222 272
223static int kabylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd) 273static int kabylake_hdmi3_init(struct snd_soc_pcm_runtime *rtd)
224{ 274{
225 struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(rtd->card); 275 return kabylake_hdmi_init(rtd, KBL_DPCM_AUDIO_HDMI3_PB);
226 struct snd_soc_dai *dai = rtd->codec_dai; 276}
227 struct kbl_hdmi_pcm *pcm;
228
229 pcm = devm_kzalloc(rtd->card->dev, sizeof(*pcm), GFP_KERNEL);
230 if (!pcm)
231 return -ENOMEM;
232
233 pcm->device = KBL_DPCM_AUDIO_HDMI3_PB;
234 pcm->codec_dai = dai;
235 277
236 list_add_tail(&pcm->head, &ctx->hdmi_pcm_list); 278static int kabylake_5663_hdmi1_init(struct snd_soc_pcm_runtime *rtd)
279{
280 return kabylake_hdmi_init(rtd, KBL_DPCM_AUDIO_5663_HDMI1_PB);
281}
237 282
238 return 0; 283static int kabylake_5663_hdmi2_init(struct snd_soc_pcm_runtime *rtd)
284{
285 return kabylake_hdmi_init(rtd, KBL_DPCM_AUDIO_5663_HDMI2_PB);
239} 286}
240 287
241static unsigned int rates[] = { 288static unsigned int rates[] = {
242 48000, 289 48000,
243}; 290};
244 291
245static struct snd_pcm_hw_constraint_list constraints_rates = { 292static const struct snd_pcm_hw_constraint_list constraints_rates = {
246 .count = ARRAY_SIZE(rates), 293 .count = ARRAY_SIZE(rates),
247 .list = rates, 294 .list = rates,
248 .mask = 0, 295 .mask = 0,
@@ -252,7 +299,7 @@ static unsigned int channels[] = {
252 2, 299 2,
253}; 300};
254 301
255static struct snd_pcm_hw_constraint_list constraints_channels = { 302static const struct snd_pcm_hw_constraint_list constraints_channels = {
256 .count = ARRAY_SIZE(channels), 303 .count = ARRAY_SIZE(channels),
257 .list = channels, 304 .list = channels,
258 .mask = 0, 305 .mask = 0,
@@ -312,11 +359,13 @@ static int kabylake_rt5663_hw_params(struct snd_pcm_substream *substream,
312 struct snd_soc_dai *codec_dai = rtd->codec_dai; 359 struct snd_soc_dai *codec_dai = rtd->codec_dai;
313 int ret; 360 int ret;
314 361
315 ret = snd_soc_dai_set_sysclk(codec_dai,
316 RT5663_SCLK_S_MCLK, 24576000, SND_SOC_CLOCK_IN);
317 /* use ASRC for internal clocks, as PLL rate isn't multiple of BCLK */ 362 /* use ASRC for internal clocks, as PLL rate isn't multiple of BCLK */
318 rt5663_sel_asrc_clk_src(codec_dai->codec, RT5663_DA_STEREO_FILTER, 1); 363 rt5663_sel_asrc_clk_src(codec_dai->codec,
364 RT5663_DA_STEREO_FILTER | RT5663_AD_STEREO_FILTER,
365 RT5663_CLK_SEL_I2S1_ASRC);
319 366
367 ret = snd_soc_dai_set_sysclk(codec_dai,
368 RT5663_SCLK_S_MCLK, 24576000, SND_SOC_CLOCK_IN);
320 if (ret < 0) 369 if (ret < 0)
321 dev_err(rtd->dev, "snd_soc_dai_set_sysclk err = %d\n", ret); 370 dev_err(rtd->dev, "snd_soc_dai_set_sysclk err = %d\n", ret);
322 371
@@ -381,7 +430,7 @@ static unsigned int rates_16000[] = {
381 16000, 430 16000,
382}; 431};
383 432
384static struct snd_pcm_hw_constraint_list constraints_16000 = { 433static const struct snd_pcm_hw_constraint_list constraints_16000 = {
385 .count = ARRAY_SIZE(rates_16000), 434 .count = ARRAY_SIZE(rates_16000),
386 .list = rates_16000, 435 .list = rates_16000,
387}; 436};
@@ -443,6 +492,28 @@ static struct snd_soc_dai_link kabylake_dais[] = {
443 .dpcm_capture = 1, 492 .dpcm_capture = 1,
444 .ops = &kabylake_rt5663_fe_ops, 493 .ops = &kabylake_rt5663_fe_ops,
445 }, 494 },
495 [KBL_DPCM_AUDIO_HS_PB] = {
496 .name = "Kbl Audio Headset Playback",
497 .stream_name = "Headset Audio",
498 .cpu_dai_name = "System Pin2",
499 .codec_name = "snd-soc-dummy",
500 .codec_dai_name = "snd-soc-dummy-dai",
501 .platform_name = "0000:00:1f.3",
502 .dpcm_playback = 1,
503 .nonatomic = 1,
504 .dynamic = 1,
505 },
506 [KBL_DPCM_AUDIO_ECHO_REF_CP] = {
507 .name = "Kbl Audio Echo Reference cap",
508 .stream_name = "Echoreference Capture",
509 .cpu_dai_name = "Echoref Pin",
510 .codec_name = "snd-soc-dummy",
511 .codec_dai_name = "snd-soc-dummy-dai",
512 .platform_name = "0000:00:1f.3",
513 .init = NULL,
514 .capture_only = 1,
515 .nonatomic = 1,
516 },
446 [KBL_DPCM_AUDIO_REF_CP] = { 517 [KBL_DPCM_AUDIO_REF_CP] = {
447 .name = "Kbl Audio Reference cap", 518 .name = "Kbl Audio Reference cap",
448 .stream_name = "Wake on Voice", 519 .stream_name = "Wake on Voice",
@@ -538,7 +609,7 @@ static struct snd_soc_dai_link kabylake_dais[] = {
538 .no_pcm = 1, 609 .no_pcm = 1,
539 .codec_name = "i2c-10EC5663:00", 610 .codec_name = "i2c-10EC5663:00",
540 .codec_dai_name = KBL_REALTEK_CODEC_DAI, 611 .codec_dai_name = KBL_REALTEK_CODEC_DAI,
541 .init = kabylake_rt5663_codec_init, 612 .init = kabylake_rt5663_max98927_codec_init,
542 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 613 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
543 SND_SOC_DAIFMT_CBS_CFS, 614 SND_SOC_DAIFMT_CBS_CFS,
544 .ignore_pmdown_time = 1, 615 .ignore_pmdown_time = 1,
@@ -594,15 +665,119 @@ static struct snd_soc_dai_link kabylake_dais[] = {
594 }, 665 },
595}; 666};
596 667
668static struct snd_soc_dai_link kabylake_5663_dais[] = {
669 /* Front End DAI links */
670 [KBL_DPCM_AUDIO_5663_PB] = {
671 .name = "Kbl Audio Port",
672 .stream_name = "Audio",
673 .cpu_dai_name = "System Pin",
674 .platform_name = "0000:00:1f.3",
675 .dynamic = 1,
676 .codec_name = "snd-soc-dummy",
677 .codec_dai_name = "snd-soc-dummy-dai",
678 .nonatomic = 1,
679 .trigger = {
680 SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
681 .dpcm_playback = 1,
682 .ops = &kabylake_rt5663_fe_ops,
683 },
684 [KBL_DPCM_AUDIO_5663_CP] = {
685 .name = "Kbl Audio Capture Port",
686 .stream_name = "Audio Record",
687 .cpu_dai_name = "System Pin",
688 .platform_name = "0000:00:1f.3",
689 .dynamic = 1,
690 .codec_name = "snd-soc-dummy",
691 .codec_dai_name = "snd-soc-dummy-dai",
692 .nonatomic = 1,
693 .trigger = {
694 SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
695 .dpcm_capture = 1,
696 .ops = &kabylake_rt5663_fe_ops,
697 },
698 [KBL_DPCM_AUDIO_5663_HDMI1_PB] = {
699 .name = "Kbl HDMI Port1",
700 .stream_name = "Hdmi1",
701 .cpu_dai_name = "HDMI1 Pin",
702 .codec_name = "snd-soc-dummy",
703 .codec_dai_name = "snd-soc-dummy-dai",
704 .platform_name = "0000:00:1f.3",
705 .dpcm_playback = 1,
706 .init = NULL,
707 .trigger = {
708 SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
709 .nonatomic = 1,
710 .dynamic = 1,
711 },
712 [KBL_DPCM_AUDIO_5663_HDMI2_PB] = {
713 .name = "Kbl HDMI Port2",
714 .stream_name = "Hdmi2",
715 .cpu_dai_name = "HDMI2 Pin",
716 .codec_name = "snd-soc-dummy",
717 .codec_dai_name = "snd-soc-dummy-dai",
718 .platform_name = "0000:00:1f.3",
719 .dpcm_playback = 1,
720 .init = NULL,
721 .trigger = {
722 SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
723 .nonatomic = 1,
724 .dynamic = 1,
725 },
726
727 /* Back End DAI links */
728 {
729 /* SSP1 - Codec */
730 .name = "SSP1-Codec",
731 .id = 0,
732 .cpu_dai_name = "SSP1 Pin",
733 .platform_name = "0000:00:1f.3",
734 .no_pcm = 1,
735 .codec_name = "i2c-10EC5663:00",
736 .codec_dai_name = KBL_REALTEK_CODEC_DAI,
737 .init = kabylake_rt5663_codec_init,
738 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
739 SND_SOC_DAIFMT_CBS_CFS,
740 .ignore_pmdown_time = 1,
741 .be_hw_params_fixup = kabylake_ssp_fixup,
742 .ops = &kabylake_rt5663_ops,
743 .dpcm_playback = 1,
744 .dpcm_capture = 1,
745 },
746 {
747 .name = "iDisp1",
748 .id = 1,
749 .cpu_dai_name = "iDisp1 Pin",
750 .codec_name = "ehdaudio0D2",
751 .codec_dai_name = "intel-hdmi-hifi1",
752 .platform_name = "0000:00:1f.3",
753 .dpcm_playback = 1,
754 .init = kabylake_5663_hdmi1_init,
755 .no_pcm = 1,
756 },
757 {
758 .name = "iDisp2",
759 .id = 2,
760 .cpu_dai_name = "iDisp2 Pin",
761 .codec_name = "ehdaudio0D2",
762 .codec_dai_name = "intel-hdmi-hifi2",
763 .platform_name = "0000:00:1f.3",
764 .init = kabylake_5663_hdmi2_init,
765 .dpcm_playback = 1,
766 .no_pcm = 1,
767 },
768};
769
597#define NAME_SIZE 32 770#define NAME_SIZE 32
598static int kabylake_card_late_probe(struct snd_soc_card *card) 771static int kabylake_card_late_probe(struct snd_soc_card *card)
599{ 772{
600 struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(card); 773 struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(card);
601 struct kbl_hdmi_pcm *pcm; 774 struct kbl_hdmi_pcm *pcm;
775 struct snd_soc_codec *codec = NULL;
602 int err, i = 0; 776 int err, i = 0;
603 char jack_name[NAME_SIZE]; 777 char jack_name[NAME_SIZE];
604 778
605 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { 779 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
780 codec = pcm->codec_dai->codec;
606 snprintf(jack_name, sizeof(jack_name), 781 snprintf(jack_name, sizeof(jack_name),
607 "HDMI/DP, pcm=%d Jack", pcm->device); 782 "HDMI/DP, pcm=%d Jack", pcm->device);
608 err = snd_soc_card_jack_new(card, jack_name, 783 err = snd_soc_card_jack_new(card, jack_name,
@@ -620,11 +795,14 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
620 i++; 795 i++;
621 } 796 }
622 797
623 return 0; 798 if (!codec)
799 return -EINVAL;
800
801 return hdac_hdmi_jack_port_init(codec, &card->dapm);
624} 802}
625 803
626/* kabylake audio machine driver for SPT + RT5663 */ 804/* kabylake audio machine driver for SPT + RT5663 */
627static struct snd_soc_card kabylake_audio_card = { 805static struct snd_soc_card kabylake_audio_card_rt5663_m98927 = {
628 .name = "kblrt5663max", 806 .name = "kblrt5663max",
629 .owner = THIS_MODULE, 807 .owner = THIS_MODULE,
630 .dai_link = kabylake_dais, 808 .dai_link = kabylake_dais,
@@ -641,6 +819,22 @@ static struct snd_soc_card kabylake_audio_card = {
641 .late_probe = kabylake_card_late_probe, 819 .late_probe = kabylake_card_late_probe,
642}; 820};
643 821
822/* kabylake audio machine driver for RT5663 */
823static struct snd_soc_card kabylake_audio_card_rt5663 = {
824 .name = "kblrt5663",
825 .owner = THIS_MODULE,
826 .dai_link = kabylake_5663_dais,
827 .num_links = ARRAY_SIZE(kabylake_5663_dais),
828 .controls = kabylake_5663_controls,
829 .num_controls = ARRAY_SIZE(kabylake_5663_controls),
830 .dapm_widgets = kabylake_5663_widgets,
831 .num_dapm_widgets = ARRAY_SIZE(kabylake_5663_widgets),
832 .dapm_routes = kabylake_5663_map,
833 .num_dapm_routes = ARRAY_SIZE(kabylake_5663_map),
834 .fully_routed = true,
835 .late_probe = kabylake_card_late_probe,
836};
837
644static int kabylake_audio_probe(struct platform_device *pdev) 838static int kabylake_audio_probe(struct platform_device *pdev)
645{ 839{
646 struct kbl_rt5663_private *ctx; 840 struct kbl_rt5663_private *ctx;
@@ -652,19 +846,30 @@ static int kabylake_audio_probe(struct platform_device *pdev)
652 846
653 INIT_LIST_HEAD(&ctx->hdmi_pcm_list); 847 INIT_LIST_HEAD(&ctx->hdmi_pcm_list);
654 848
655 kabylake_audio_card.dev = &pdev->dev; 849 kabylake_audio_card =
656 snd_soc_card_set_drvdata(&kabylake_audio_card, ctx); 850 (struct snd_soc_card *)pdev->id_entry->driver_data;
851
852 kabylake_audio_card->dev = &pdev->dev;
853 snd_soc_card_set_drvdata(kabylake_audio_card, ctx);
657 854
658 pdata = dev_get_drvdata(&pdev->dev); 855 pdata = dev_get_drvdata(&pdev->dev);
659 if (pdata) 856 if (pdata)
660 dmic_constraints = pdata->dmic_num == 2 ? 857 dmic_constraints = pdata->dmic_num == 2 ?
661 &constraints_dmic_2ch : &constraints_dmic_channels; 858 &constraints_dmic_2ch : &constraints_dmic_channels;
662 859
663 return devm_snd_soc_register_card(&pdev->dev, &kabylake_audio_card); 860 return devm_snd_soc_register_card(&pdev->dev, kabylake_audio_card);
664} 861}
665 862
666static const struct platform_device_id kbl_board_ids[] = { 863static const struct platform_device_id kbl_board_ids[] = {
667 { .name = "kbl_rt5663_m98927" }, 864 {
865 .name = "kbl_rt5663",
866 .driver_data = (kernel_ulong_t)&kabylake_audio_card_rt5663,
867 },
868 {
869 .name = "kbl_rt5663_m98927",
870 .driver_data =
871 (kernel_ulong_t)&kabylake_audio_card_rt5663_m98927,
872 },
668 { } 873 { }
669}; 874};
670 875
@@ -684,4 +889,5 @@ MODULE_DESCRIPTION("Audio Machine driver-RT5663 & MAX98927 in I2S mode");
684MODULE_AUTHOR("Naveen M <naveen.m@intel.com>"); 889MODULE_AUTHOR("Naveen M <naveen.m@intel.com>");
685MODULE_AUTHOR("Harsha Priya <harshapriya.n@intel.com>"); 890MODULE_AUTHOR("Harsha Priya <harshapriya.n@intel.com>");
686MODULE_LICENSE("GPL v2"); 891MODULE_LICENSE("GPL v2");
892MODULE_ALIAS("platform:kbl_rt5663");
687MODULE_ALIAS("platform:kbl_rt5663_m98927"); 893MODULE_ALIAS("platform:kbl_rt5663_m98927");
diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index cfd89ca6a18d..88ff54220007 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -18,6 +18,7 @@
18 * GNU General Public License for more details. 18 * GNU General Public License for more details.
19 */ 19 */
20 20
21#include <linux/input.h>
21#include <linux/module.h> 22#include <linux/module.h>
22#include <linux/platform_device.h> 23#include <linux/platform_device.h>
23#include <sound/core.h> 24#include <sound/core.h>
@@ -62,7 +63,10 @@ struct kbl_codec_private {
62enum { 63enum {
63 KBL_DPCM_AUDIO_PB = 0, 64 KBL_DPCM_AUDIO_PB = 0,
64 KBL_DPCM_AUDIO_CP, 65 KBL_DPCM_AUDIO_CP,
66 KBL_DPCM_AUDIO_HS_PB,
67 KBL_DPCM_AUDIO_ECHO_REF_CP,
65 KBL_DPCM_AUDIO_DMIC_CP, 68 KBL_DPCM_AUDIO_DMIC_CP,
69 KBL_DPCM_AUDIO_RT5514_DSP,
66 KBL_DPCM_AUDIO_HDMI1_PB, 70 KBL_DPCM_AUDIO_HDMI1_PB,
67 KBL_DPCM_AUDIO_HDMI2_PB, 71 KBL_DPCM_AUDIO_HDMI2_PB,
68}; 72};
@@ -81,8 +85,8 @@ static const struct snd_soc_dapm_widget kabylake_widgets[] = {
81 SND_SOC_DAPM_SPK("Left Spk", NULL), 85 SND_SOC_DAPM_SPK("Left Spk", NULL),
82 SND_SOC_DAPM_SPK("Right Spk", NULL), 86 SND_SOC_DAPM_SPK("Right Spk", NULL),
83 SND_SOC_DAPM_MIC("DMIC", NULL), 87 SND_SOC_DAPM_MIC("DMIC", NULL),
84 SND_SOC_DAPM_SPK("DP", NULL), 88 SND_SOC_DAPM_SPK("HDMI1", NULL),
85 SND_SOC_DAPM_SPK("HDMI", NULL), 89 SND_SOC_DAPM_SPK("HDMI2", NULL),
86 90
87}; 91};
88 92
@@ -99,23 +103,25 @@ static const struct snd_soc_dapm_route kabylake_map[] = {
99 { "IN1P", NULL, "Headset Mic" }, 103 { "IN1P", NULL, "Headset Mic" },
100 { "IN1N", NULL, "Headset Mic" }, 104 { "IN1N", NULL, "Headset Mic" },
101 105
102 { "HDMI", NULL, "hif5 Output" },
103 { "DP", NULL, "hif6 Output" },
104
105 /* CODEC BE connections */ 106 /* CODEC BE connections */
106 { "Left HiFi Playback", NULL, "ssp0 Tx" }, 107 { "Left HiFi Playback", NULL, "ssp0 Tx" },
107 { "Right HiFi Playback", NULL, "ssp0 Tx" }, 108 { "Right HiFi Playback", NULL, "ssp0 Tx" },
108 { "ssp0 Tx", NULL, "codec0_out" }, 109 { "ssp0 Tx", NULL, "spk_out" },
109 110
110 { "AIF Playback", NULL, "ssp1 Tx" }, 111 { "AIF Playback", NULL, "ssp1 Tx" },
111 { "ssp1 Tx", NULL, "codec1_out" }, 112 { "ssp1 Tx", NULL, "hs_out" },
112 113
113 { "codec0_in", NULL, "ssp1 Rx" }, 114 { "hs_in", NULL, "ssp1 Rx" },
114 { "ssp1 Rx", NULL, "AIF Capture" }, 115 { "ssp1 Rx", NULL, "AIF Capture" },
115 116
116 { "codec1_in", NULL, "ssp0 Rx" }, 117 { "codec1_in", NULL, "ssp0 Rx" },
117 { "ssp0 Rx", NULL, "AIF1 Capture" }, 118 { "ssp0 Rx", NULL, "AIF1 Capture" },
118 119
120 /* IV feedback path */
121 { "codec0_fb_in", NULL, "ssp0 Rx"},
122 { "ssp0 Rx", NULL, "Left HiFi Capture" },
123 { "ssp0 Rx", NULL, "Right HiFi Capture" },
124
119 /* DMIC */ 125 /* DMIC */
120 { "DMIC1L", NULL, "DMIC" }, 126 { "DMIC1L", NULL, "DMIC" },
121 { "DMIC1R", NULL, "DMIC" }, 127 { "DMIC1R", NULL, "DMIC" },
@@ -173,6 +179,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
173 int ret; 179 int ret;
174 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card); 180 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card);
175 struct snd_soc_codec *codec = rtd->codec; 181 struct snd_soc_codec *codec = rtd->codec;
182 struct snd_soc_jack *jack;
176 183
177 /* 184 /*
178 * Headset buttons map to the google Reference headset. 185 * Headset buttons map to the google Reference headset.
@@ -187,6 +194,12 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
187 return ret; 194 return ret;
188 } 195 }
189 196
197 jack = &ctx->kabylake_headset;
198 snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
199 snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
200 snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
201 snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
202
190 rt5663_set_jack_detect(codec, &ctx->kabylake_headset); 203 rt5663_set_jack_detect(codec, &ctx->kabylake_headset);
191 204
192 ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "DMIC"); 205 ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "DMIC");
@@ -358,11 +371,18 @@ static int kabylake_ssp0_hw_params(struct snd_pcm_substream *substream,
358 return ret; 371 return ret;
359 } 372 }
360 } 373 }
361 if (!strcmp(codec_dai->component->name, MAXIM_DEV0_NAME) || 374 if (!strcmp(codec_dai->component->name, MAXIM_DEV0_NAME)) {
362 !strcmp(codec_dai->component->name, MAXIM_DEV1_NAME)) { 375 ret = snd_soc_dai_set_tdm_slot(codec_dai, 0x30, 3, 8, 16);
363 ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xF0, 3, 8, 16);
364 if (ret < 0) { 376 if (ret < 0) {
365 dev_err(rtd->dev, "set TDM slot err:%d\n", ret); 377 dev_err(rtd->dev, "DEV0 TDM slot err:%d\n", ret);
378 return ret;
379 }
380 }
381
382 if (!strcmp(codec_dai->component->name, MAXIM_DEV1_NAME)) {
383 ret = snd_soc_dai_set_tdm_slot(codec_dai, 0xC0, 3, 8, 16);
384 if (ret < 0) {
385 dev_err(rtd->dev, "DEV1 TDM slot err:%d\n", ret);
366 return ret; 386 return ret;
367 } 387 }
368 } 388 }
@@ -442,6 +462,36 @@ static struct snd_soc_dai_link kabylake_dais[] = {
442 .dpcm_capture = 1, 462 .dpcm_capture = 1,
443 .ops = &kabylake_rt5663_fe_ops, 463 .ops = &kabylake_rt5663_fe_ops,
444 }, 464 },
465 [KBL_DPCM_AUDIO_HS_PB] = {
466 .name = "Kbl Audio Headset Playback",
467 .stream_name = "Headset Audio",
468 .cpu_dai_name = "System Pin2",
469 .codec_name = "snd-soc-dummy",
470 .codec_dai_name = "snd-soc-dummy-dai",
471 .platform_name = "0000:00:1f.3",
472 .dpcm_playback = 1,
473 .nonatomic = 1,
474 .dynamic = 1,
475 },
476 [KBL_DPCM_AUDIO_ECHO_REF_CP] = {
477 .name = "Kbl Audio Echo Reference cap",
478 .stream_name = "Echoreference Capture",
479 .cpu_dai_name = "Echoref Pin",
480 .codec_name = "snd-soc-dummy",
481 .codec_dai_name = "snd-soc-dummy-dai",
482 .platform_name = "0000:00:1f.3",
483 .init = NULL,
484 .capture_only = 1,
485 .nonatomic = 1,
486 },
487 [KBL_DPCM_AUDIO_RT5514_DSP] = {
488 .name = "rt5514 dsp",
489 .stream_name = "Wake on Voice",
490 .cpu_dai_name = "spi-PRP0001:00",
491 .platform_name = "spi-PRP0001:00",
492 .codec_name = "snd-soc-dummy",
493 .codec_dai_name = "snd-soc-dummy-dai",
494 },
445 [KBL_DPCM_AUDIO_DMIC_CP] = { 495 [KBL_DPCM_AUDIO_DMIC_CP] = {
446 .name = "Kbl Audio DMIC cap", 496 .name = "Kbl Audio DMIC cap",
447 .stream_name = "dmiccap", 497 .stream_name = "dmiccap",
@@ -548,10 +598,12 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
548{ 598{
549 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(card); 599 struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(card);
550 struct kbl_hdmi_pcm *pcm; 600 struct kbl_hdmi_pcm *pcm;
601 struct snd_soc_codec *codec = NULL;
551 int err, i = 0; 602 int err, i = 0;
552 char jack_name[NAME_SIZE]; 603 char jack_name[NAME_SIZE];
553 604
554 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { 605 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) {
606 codec = pcm->codec_dai->codec;
555 err = snd_soc_card_jack_new(card, jack_name, 607 err = snd_soc_card_jack_new(card, jack_name,
556 SND_JACK_AVOUT, &ctx->kabylake_hdmi[i], 608 SND_JACK_AVOUT, &ctx->kabylake_hdmi[i],
557 NULL, 0); 609 NULL, 0);
@@ -565,7 +617,10 @@ static int kabylake_card_late_probe(struct snd_soc_card *card)
565 i++; 617 i++;
566 } 618 }
567 619
568 return 0; 620 if (!codec)
621 return -EINVAL;
622
623 return hdac_hdmi_jack_port_init(codec, &card->dapm);
569} 624}
570 625
571/* 626/*
diff --git a/sound/soc/intel/boards/mfld_machine.c b/sound/soc/intel/boards/mfld_machine.c
index 4e08885f37aa..6f44acfb4aae 100644
--- a/sound/soc/intel/boards/mfld_machine.c
+++ b/sound/soc/intel/boards/mfld_machine.c
@@ -376,10 +376,8 @@ static int snd_mfld_mc_probe(struct platform_device *pdev)
376 /* audio interrupt base of SRAM location where 376 /* audio interrupt base of SRAM location where
377 * interrupts are stored by System FW */ 377 * interrupts are stored by System FW */
378 mc_drv_ctx = devm_kzalloc(&pdev->dev, sizeof(*mc_drv_ctx), GFP_ATOMIC); 378 mc_drv_ctx = devm_kzalloc(&pdev->dev, sizeof(*mc_drv_ctx), GFP_ATOMIC);
379 if (!mc_drv_ctx) { 379 if (!mc_drv_ctx)
380 pr_err("allocation failed\n");
381 return -ENOMEM; 380 return -ENOMEM;
382 }
383 381
384 irq_mem = platform_get_resource_byname( 382 irq_mem = platform_get_resource_byname(
385 pdev, IORESOURCE_MEM, "IRQ_BASE"); 383 pdev, IORESOURCE_MEM, "IRQ_BASE");
diff --git a/sound/soc/intel/haswell/sst-haswell-pcm.c b/sound/soc/intel/haswell/sst-haswell-pcm.c
index 9e4094e2c6e3..c044400540ec 100644
--- a/sound/soc/intel/haswell/sst-haswell-pcm.c
+++ b/sound/soc/intel/haswell/sst-haswell-pcm.c
@@ -1135,7 +1135,7 @@ static int hsw_pcm_remove(struct snd_soc_platform *platform)
1135 return 0; 1135 return 0;
1136} 1136}
1137 1137
1138static struct snd_soc_platform_driver hsw_soc_platform = { 1138static const struct snd_soc_platform_driver hsw_soc_platform = {
1139 .probe = hsw_pcm_probe, 1139 .probe = hsw_pcm_probe,
1140 .remove = hsw_pcm_remove, 1140 .remove = hsw_pcm_remove,
1141 .ops = &hsw_pcm_ops, 1141 .ops = &hsw_pcm_ops,
diff --git a/sound/soc/intel/skylake/Makefile b/sound/soc/intel/skylake/Makefile
index e7d77722d560..3380deb81015 100644
--- a/sound/soc/intel/skylake/Makefile
+++ b/sound/soc/intel/skylake/Makefile
@@ -8,7 +8,8 @@ endif
8obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += snd-soc-skl.o 8obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += snd-soc-skl.o
9 9
10# Skylake IPC Support 10# Skylake IPC Support
11snd-soc-skl-ipc-objs := skl-sst-ipc.o skl-sst-dsp.o skl-sst-cldma.o \ 11snd-soc-skl-ipc-objs := skl-sst-ipc.o skl-sst-dsp.o cnl-sst-dsp.o \
12 skl-sst.o bxt-sst.o skl-sst-utils.o 12 skl-sst-cldma.o skl-sst.o bxt-sst.o cnl-sst.o \
13 skl-sst-utils.o
13 14
14obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += snd-soc-skl-ipc.o 15obj-$(CONFIG_SND_SOC_INTEL_SKYLAKE) += snd-soc-skl-ipc.o
diff --git a/sound/soc/intel/skylake/bxt-sst.c b/sound/soc/intel/skylake/bxt-sst.c
index cf11b84888b9..4524211960e4 100644
--- a/sound/soc/intel/skylake/bxt-sst.c
+++ b/sound/soc/intel/skylake/bxt-sst.c
@@ -530,7 +530,7 @@ static int bxt_set_dsp_D3(struct sst_dsp *ctx, unsigned int core_id)
530 return 0; 530 return 0;
531} 531}
532 532
533static struct skl_dsp_fw_ops bxt_fw_ops = { 533static const struct skl_dsp_fw_ops bxt_fw_ops = {
534 .set_state_D0 = bxt_set_dsp_D0, 534 .set_state_D0 = bxt_set_dsp_D0,
535 .set_state_D3 = bxt_set_dsp_D3, 535 .set_state_D3 = bxt_set_dsp_D3,
536 .set_state_D0i3 = bxt_schedule_dsp_D0i3, 536 .set_state_D0i3 = bxt_schedule_dsp_D0i3,
@@ -581,10 +581,15 @@ int bxt_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
581 sst_dsp_mailbox_init(sst, (BXT_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ), 581 sst_dsp_mailbox_init(sst, (BXT_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ),
582 SKL_ADSP_W0_UP_SZ, BXT_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ); 582 SKL_ADSP_W0_UP_SZ, BXT_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ);
583 583
584 ret = skl_ipc_init(dev, skl);
585 if (ret) {
586 skl_dsp_free(sst);
587 return ret;
588 }
589
584 /* set the D0i3 check */ 590 /* set the D0i3 check */
585 skl->ipc.ops.check_dsp_lp_on = skl_ipc_check_D0i0; 591 skl->ipc.ops.check_dsp_lp_on = skl_ipc_check_D0i0;
586 592
587 skl->cores.count = 2;
588 skl->boot_complete = false; 593 skl->boot_complete = false;
589 init_waitqueue_head(&skl->boot_wait); 594 init_waitqueue_head(&skl->boot_wait);
590 INIT_DELAYED_WORK(&skl->d0i3.work, bxt_set_dsp_D0i3); 595 INIT_DELAYED_WORK(&skl->d0i3.work, bxt_set_dsp_D0i3);
@@ -629,11 +634,6 @@ void bxt_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx)
629 release_firmware(ctx->dsp->fw); 634 release_firmware(ctx->dsp->fw);
630 skl_freeup_uuid_list(ctx); 635 skl_freeup_uuid_list(ctx);
631 skl_ipc_free(&ctx->ipc); 636 skl_ipc_free(&ctx->ipc);
632 ctx->dsp->cl_dev.ops.cl_cleanup_controller(ctx->dsp);
633
634 if (ctx->dsp->addr.lpe)
635 iounmap(ctx->dsp->addr.lpe);
636
637 ctx->dsp->ops->free(ctx->dsp); 637 ctx->dsp->ops->free(ctx->dsp);
638} 638}
639EXPORT_SYMBOL_GPL(bxt_sst_dsp_cleanup); 639EXPORT_SYMBOL_GPL(bxt_sst_dsp_cleanup);
diff --git a/sound/soc/intel/skylake/cnl-sst-dsp.c b/sound/soc/intel/skylake/cnl-sst-dsp.c
new file mode 100644
index 000000000000..2f8326707c21
--- /dev/null
+++ b/sound/soc/intel/skylake/cnl-sst-dsp.c
@@ -0,0 +1,274 @@
1/*
2 * cnl-sst-dsp.c - CNL SST library generic function
3 *
4 * Copyright (C) 2016-17, Intel Corporation.
5 * Author: Guneshwor Singh <guneshwor.o.singh@intel.com>
6 *
7 * Modified from:
8 * SKL SST library generic function
9 * Copyright (C) 2014-15, Intel Corporation.
10 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as version 2, as
14 * published by the Free Software Foundation.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
22 */
23#include <linux/device.h>
24#include "../common/sst-dsp.h"
25#include "../common/sst-ipc.h"
26#include "../common/sst-dsp-priv.h"
27#include "cnl-sst-dsp.h"
28
29/* various timeout values */
30#define CNL_DSP_PU_TO 50
31#define CNL_DSP_PD_TO 50
32#define CNL_DSP_RESET_TO 50
33
34static int
35cnl_dsp_core_set_reset_state(struct sst_dsp *ctx, unsigned int core_mask)
36{
37 /* update bits */
38 sst_dsp_shim_update_bits_unlocked(ctx,
39 CNL_ADSP_REG_ADSPCS, CNL_ADSPCS_CRST(core_mask),
40 CNL_ADSPCS_CRST(core_mask));
41
42 /* poll with timeout to check if operation successful */
43 return sst_dsp_register_poll(ctx,
44 CNL_ADSP_REG_ADSPCS,
45 CNL_ADSPCS_CRST(core_mask),
46 CNL_ADSPCS_CRST(core_mask),
47 CNL_DSP_RESET_TO,
48 "Set reset");
49}
50
51static int
52cnl_dsp_core_unset_reset_state(struct sst_dsp *ctx, unsigned int core_mask)
53{
54 /* update bits */
55 sst_dsp_shim_update_bits_unlocked(ctx, CNL_ADSP_REG_ADSPCS,
56 CNL_ADSPCS_CRST(core_mask), 0);
57
58 /* poll with timeout to check if operation successful */
59 return sst_dsp_register_poll(ctx,
60 CNL_ADSP_REG_ADSPCS,
61 CNL_ADSPCS_CRST(core_mask),
62 0,
63 CNL_DSP_RESET_TO,
64 "Unset reset");
65}
66
67static bool is_cnl_dsp_core_enable(struct sst_dsp *ctx, unsigned int core_mask)
68{
69 int val;
70 bool is_enable;
71
72 val = sst_dsp_shim_read_unlocked(ctx, CNL_ADSP_REG_ADSPCS);
73
74 is_enable = (val & CNL_ADSPCS_CPA(core_mask)) &&
75 (val & CNL_ADSPCS_SPA(core_mask)) &&
76 !(val & CNL_ADSPCS_CRST(core_mask)) &&
77 !(val & CNL_ADSPCS_CSTALL(core_mask));
78
79 dev_dbg(ctx->dev, "DSP core(s) enabled? %d: core_mask %#x\n",
80 is_enable, core_mask);
81
82 return is_enable;
83}
84
85static int cnl_dsp_reset_core(struct sst_dsp *ctx, unsigned int core_mask)
86{
87 /* stall core */
88 sst_dsp_shim_update_bits_unlocked(ctx, CNL_ADSP_REG_ADSPCS,
89 CNL_ADSPCS_CSTALL(core_mask),
90 CNL_ADSPCS_CSTALL(core_mask));
91
92 /* set reset state */
93 return cnl_dsp_core_set_reset_state(ctx, core_mask);
94}
95
96static int cnl_dsp_start_core(struct sst_dsp *ctx, unsigned int core_mask)
97{
98 int ret;
99
100 /* unset reset state */
101 ret = cnl_dsp_core_unset_reset_state(ctx, core_mask);
102 if (ret < 0)
103 return ret;
104
105 /* run core */
106 sst_dsp_shim_update_bits_unlocked(ctx, CNL_ADSP_REG_ADSPCS,
107 CNL_ADSPCS_CSTALL(core_mask), 0);
108
109 if (!is_cnl_dsp_core_enable(ctx, core_mask)) {
110 cnl_dsp_reset_core(ctx, core_mask);
111 dev_err(ctx->dev, "DSP core mask %#x enable failed\n",
112 core_mask);
113 ret = -EIO;
114 }
115
116 return ret;
117}
118
119static int cnl_dsp_core_power_up(struct sst_dsp *ctx, unsigned int core_mask)
120{
121 /* update bits */
122 sst_dsp_shim_update_bits_unlocked(ctx, CNL_ADSP_REG_ADSPCS,
123 CNL_ADSPCS_SPA(core_mask),
124 CNL_ADSPCS_SPA(core_mask));
125
126 /* poll with timeout to check if operation successful */
127 return sst_dsp_register_poll(ctx, CNL_ADSP_REG_ADSPCS,
128 CNL_ADSPCS_CPA(core_mask),
129 CNL_ADSPCS_CPA(core_mask),
130 CNL_DSP_PU_TO,
131 "Power up");
132}
133
134static int cnl_dsp_core_power_down(struct sst_dsp *ctx, unsigned int core_mask)
135{
136 /* update bits */
137 sst_dsp_shim_update_bits_unlocked(ctx, CNL_ADSP_REG_ADSPCS,
138 CNL_ADSPCS_SPA(core_mask), 0);
139
140 /* poll with timeout to check if operation successful */
141 return sst_dsp_register_poll(ctx,
142 CNL_ADSP_REG_ADSPCS,
143 CNL_ADSPCS_CPA(core_mask),
144 0,
145 CNL_DSP_PD_TO,
146 "Power down");
147}
148
149int cnl_dsp_enable_core(struct sst_dsp *ctx, unsigned int core_mask)
150{
151 int ret;
152
153 /* power up */
154 ret = cnl_dsp_core_power_up(ctx, core_mask);
155 if (ret < 0) {
156 dev_dbg(ctx->dev, "DSP core mask %#x power up failed",
157 core_mask);
158 return ret;
159 }
160
161 return cnl_dsp_start_core(ctx, core_mask);
162}
163
164int cnl_dsp_disable_core(struct sst_dsp *ctx, unsigned int core_mask)
165{
166 int ret;
167
168 ret = cnl_dsp_reset_core(ctx, core_mask);
169 if (ret < 0) {
170 dev_err(ctx->dev, "DSP core mask %#x reset failed\n",
171 core_mask);
172 return ret;
173 }
174
175 /* power down core*/
176 ret = cnl_dsp_core_power_down(ctx, core_mask);
177 if (ret < 0) {
178 dev_err(ctx->dev, "DSP core mask %#x power down failed\n",
179 core_mask);
180 return ret;
181 }
182
183 if (is_cnl_dsp_core_enable(ctx, core_mask)) {
184 dev_err(ctx->dev, "DSP core mask %#x disable failed\n",
185 core_mask);
186 ret = -EIO;
187 }
188
189 return ret;
190}
191
192irqreturn_t cnl_dsp_sst_interrupt(int irq, void *dev_id)
193{
194 struct sst_dsp *ctx = dev_id;
195 u32 val;
196 irqreturn_t ret = IRQ_NONE;
197
198 spin_lock(&ctx->spinlock);
199
200 val = sst_dsp_shim_read_unlocked(ctx, CNL_ADSP_REG_ADSPIS);
201 ctx->intr_status = val;
202
203 if (val == 0xffffffff) {
204 spin_unlock(&ctx->spinlock);
205 return IRQ_NONE;
206 }
207
208 if (val & CNL_ADSPIS_IPC) {
209 cnl_ipc_int_disable(ctx);
210 ret = IRQ_WAKE_THREAD;
211 }
212
213 spin_unlock(&ctx->spinlock);
214
215 return ret;
216}
217
218void cnl_dsp_free(struct sst_dsp *dsp)
219{
220 cnl_ipc_int_disable(dsp);
221
222 free_irq(dsp->irq, dsp);
223 cnl_ipc_op_int_disable(dsp);
224 cnl_dsp_disable_core(dsp, SKL_DSP_CORE0_MASK);
225}
226EXPORT_SYMBOL_GPL(cnl_dsp_free);
227
228void cnl_ipc_int_enable(struct sst_dsp *ctx)
229{
230 sst_dsp_shim_update_bits(ctx, CNL_ADSP_REG_ADSPIC,
231 CNL_ADSPIC_IPC, CNL_ADSPIC_IPC);
232}
233
234void cnl_ipc_int_disable(struct sst_dsp *ctx)
235{
236 sst_dsp_shim_update_bits_unlocked(ctx, CNL_ADSP_REG_ADSPIC,
237 CNL_ADSPIC_IPC, 0);
238}
239
240void cnl_ipc_op_int_enable(struct sst_dsp *ctx)
241{
242 /* enable IPC DONE interrupt */
243 sst_dsp_shim_update_bits(ctx, CNL_ADSP_REG_HIPCCTL,
244 CNL_ADSP_REG_HIPCCTL_DONE,
245 CNL_ADSP_REG_HIPCCTL_DONE);
246
247 /* enable IPC BUSY interrupt */
248 sst_dsp_shim_update_bits(ctx, CNL_ADSP_REG_HIPCCTL,
249 CNL_ADSP_REG_HIPCCTL_BUSY,
250 CNL_ADSP_REG_HIPCCTL_BUSY);
251}
252
253void cnl_ipc_op_int_disable(struct sst_dsp *ctx)
254{
255 /* disable IPC DONE interrupt */
256 sst_dsp_shim_update_bits(ctx, CNL_ADSP_REG_HIPCCTL,
257 CNL_ADSP_REG_HIPCCTL_DONE, 0);
258
259 /* disable IPC BUSY interrupt */
260 sst_dsp_shim_update_bits(ctx, CNL_ADSP_REG_HIPCCTL,
261 CNL_ADSP_REG_HIPCCTL_BUSY, 0);
262}
263
264bool cnl_ipc_int_status(struct sst_dsp *ctx)
265{
266 return sst_dsp_shim_read_unlocked(ctx, CNL_ADSP_REG_ADSPIS) &
267 CNL_ADSPIS_IPC;
268}
269
270void cnl_ipc_free(struct sst_generic_ipc *ipc)
271{
272 cnl_ipc_op_int_disable(ipc->dsp);
273 sst_ipc_fini(ipc);
274}
diff --git a/sound/soc/intel/skylake/cnl-sst-dsp.h b/sound/soc/intel/skylake/cnl-sst-dsp.h
new file mode 100644
index 000000000000..09bd218df5c4
--- /dev/null
+++ b/sound/soc/intel/skylake/cnl-sst-dsp.h
@@ -0,0 +1,112 @@
1/*
2 * Cannonlake SST DSP Support
3 *
4 * Copyright (C) 2016-17, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as version 2, as
8 * published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 */
15
16#ifndef __CNL_SST_DSP_H__
17#define __CNL_SST_DSP_H__
18
19struct sst_dsp;
20struct skl_sst;
21struct sst_dsp_device;
22struct sst_generic_ipc;
23
24/* Intel HD Audio General DSP Registers */
25#define CNL_ADSP_GEN_BASE 0x0
26#define CNL_ADSP_REG_ADSPCS (CNL_ADSP_GEN_BASE + 0x04)
27#define CNL_ADSP_REG_ADSPIC (CNL_ADSP_GEN_BASE + 0x08)
28#define CNL_ADSP_REG_ADSPIS (CNL_ADSP_GEN_BASE + 0x0c)
29
30/* Intel HD Audio Inter-Processor Communication Registers */
31#define CNL_ADSP_IPC_BASE 0xc0
32#define CNL_ADSP_REG_HIPCTDR (CNL_ADSP_IPC_BASE + 0x00)
33#define CNL_ADSP_REG_HIPCTDA (CNL_ADSP_IPC_BASE + 0x04)
34#define CNL_ADSP_REG_HIPCTDD (CNL_ADSP_IPC_BASE + 0x08)
35#define CNL_ADSP_REG_HIPCIDR (CNL_ADSP_IPC_BASE + 0x10)
36#define CNL_ADSP_REG_HIPCIDA (CNL_ADSP_IPC_BASE + 0x14)
37#define CNL_ADSP_REG_HIPCIDD (CNL_ADSP_IPC_BASE + 0x18)
38#define CNL_ADSP_REG_HIPCCTL (CNL_ADSP_IPC_BASE + 0x28)
39
40/* HIPCTDR */
41#define CNL_ADSP_REG_HIPCTDR_BUSY BIT(31)
42
43/* HIPCTDA */
44#define CNL_ADSP_REG_HIPCTDA_DONE BIT(31)
45
46/* HIPCIDR */
47#define CNL_ADSP_REG_HIPCIDR_BUSY BIT(31)
48
49/* HIPCIDA */
50#define CNL_ADSP_REG_HIPCIDA_DONE BIT(31)
51
52/* CNL HIPCCTL */
53#define CNL_ADSP_REG_HIPCCTL_DONE BIT(1)
54#define CNL_ADSP_REG_HIPCCTL_BUSY BIT(0)
55
56/* CNL HIPCT */
57#define CNL_ADSP_REG_HIPCT_BUSY BIT(31)
58
59/* Intel HD Audio SRAM Window 1 */
60#define CNL_ADSP_SRAM1_BASE 0xa0000
61
62#define CNL_ADSP_MMIO_LEN 0x10000
63
64#define CNL_ADSP_W0_STAT_SZ 0x1000
65
66#define CNL_ADSP_W0_UP_SZ 0x1000
67
68#define CNL_ADSP_W1_SZ 0x1000
69
70#define CNL_FW_STS_MASK 0xf
71
72#define CNL_ADSPIC_IPC 0x1
73#define CNL_ADSPIS_IPC 0x1
74
75#define CNL_DSP_CORES 4
76#define CNL_DSP_CORES_MASK ((1 << CNL_DSP_CORES) - 1)
77
78/* core reset - asserted high */
79#define CNL_ADSPCS_CRST_SHIFT 0
80#define CNL_ADSPCS_CRST(x) (x << CNL_ADSPCS_CRST_SHIFT)
81
82/* core run/stall - when set to 1 core is stalled */
83#define CNL_ADSPCS_CSTALL_SHIFT 8
84#define CNL_ADSPCS_CSTALL(x) (x << CNL_ADSPCS_CSTALL_SHIFT)
85
86/* set power active - when set to 1 turn core on */
87#define CNL_ADSPCS_SPA_SHIFT 16
88#define CNL_ADSPCS_SPA(x) (x << CNL_ADSPCS_SPA_SHIFT)
89
90/* current power active - power status of cores, set by hardware */
91#define CNL_ADSPCS_CPA_SHIFT 24
92#define CNL_ADSPCS_CPA(x) (x << CNL_ADSPCS_CPA_SHIFT)
93
94int cnl_dsp_enable_core(struct sst_dsp *ctx, unsigned int core);
95int cnl_dsp_disable_core(struct sst_dsp *ctx, unsigned int core);
96irqreturn_t cnl_dsp_sst_interrupt(int irq, void *dev_id);
97void cnl_dsp_free(struct sst_dsp *dsp);
98
99void cnl_ipc_int_enable(struct sst_dsp *ctx);
100void cnl_ipc_int_disable(struct sst_dsp *ctx);
101void cnl_ipc_op_int_enable(struct sst_dsp *ctx);
102void cnl_ipc_op_int_disable(struct sst_dsp *ctx);
103bool cnl_ipc_int_status(struct sst_dsp *ctx);
104void cnl_ipc_free(struct sst_generic_ipc *ipc);
105
106int cnl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
107 const char *fw_name, struct skl_dsp_loader_ops dsp_ops,
108 struct skl_sst **dsp);
109int cnl_sst_init_fw(struct device *dev, struct skl_sst *ctx);
110void cnl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx);
111
112#endif /*__CNL_SST_DSP_H__*/
diff --git a/sound/soc/intel/skylake/cnl-sst.c b/sound/soc/intel/skylake/cnl-sst.c
new file mode 100644
index 000000000000..387de388ce29
--- /dev/null
+++ b/sound/soc/intel/skylake/cnl-sst.c
@@ -0,0 +1,497 @@
1/*
2 * cnl-sst.c - DSP library functions for CNL platform
3 *
4 * Copyright (C) 2016-17, Intel Corporation.
5 *
6 * Author: Guneshwor Singh <guneshwor.o.singh@intel.com>
7 *
8 * Modified from:
9 * HDA DSP library functions for SKL platform
10 * Copyright (C) 2014-15, Intel Corporation.
11 *
12 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13 *
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as version 2, as
16 * published by the Free Software Foundation.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
22 *
23 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24 */
25
26#include <linux/module.h>
27#include <linux/delay.h>
28#include <linux/firmware.h>
29#include <linux/device.h>
30
31#include "../common/sst-dsp.h"
32#include "../common/sst-dsp-priv.h"
33#include "../common/sst-ipc.h"
34#include "cnl-sst-dsp.h"
35#include "skl-sst-dsp.h"
36#include "skl-sst-ipc.h"
37
38#define CNL_FW_ROM_INIT 0x1
39#define CNL_FW_INIT 0x5
40#define CNL_IPC_PURGE 0x01004000
41#define CNL_INIT_TIMEOUT 300
42#define CNL_BASEFW_TIMEOUT 3000
43
44#define CNL_ADSP_SRAM0_BASE 0x80000
45
46/* Firmware status window */
47#define CNL_ADSP_FW_STATUS CNL_ADSP_SRAM0_BASE
48#define CNL_ADSP_ERROR_CODE (CNL_ADSP_FW_STATUS + 0x4)
49
50#define CNL_INSTANCE_ID 0
51#define CNL_BASE_FW_MODULE_ID 0
52#define CNL_ADSP_FW_HDR_OFFSET 0x2000
53#define CNL_ROM_CTRL_DMA_ID 0x9
54
55static int cnl_prepare_fw(struct sst_dsp *ctx, const void *fwdata, u32 fwsize)
56{
57
58 int ret, stream_tag;
59
60 stream_tag = ctx->dsp_ops.prepare(ctx->dev, 0x40, fwsize, &ctx->dmab);
61 if (stream_tag <= 0) {
62 dev_err(ctx->dev, "dma prepare failed: 0%#x\n", stream_tag);
63 return stream_tag;
64 }
65
66 ctx->dsp_ops.stream_tag = stream_tag;
67 memcpy(ctx->dmab.area, fwdata, fwsize);
68
69 /* purge FW request */
70 sst_dsp_shim_write(ctx, CNL_ADSP_REG_HIPCIDR,
71 CNL_ADSP_REG_HIPCIDR_BUSY | (CNL_IPC_PURGE |
72 ((stream_tag - 1) << CNL_ROM_CTRL_DMA_ID)));
73
74 ret = cnl_dsp_enable_core(ctx, SKL_DSP_CORE0_MASK);
75 if (ret < 0) {
76 dev_err(ctx->dev, "dsp boot core failed ret: %d\n", ret);
77 ret = -EIO;
78 goto base_fw_load_failed;
79 }
80
81 /* enable interrupt */
82 cnl_ipc_int_enable(ctx);
83 cnl_ipc_op_int_enable(ctx);
84
85 ret = sst_dsp_register_poll(ctx, CNL_ADSP_FW_STATUS, CNL_FW_STS_MASK,
86 CNL_FW_ROM_INIT, CNL_INIT_TIMEOUT,
87 "rom load");
88 if (ret < 0) {
89 dev_err(ctx->dev, "rom init timeout, ret: %d\n", ret);
90 goto base_fw_load_failed;
91 }
92
93 return 0;
94
95base_fw_load_failed:
96 ctx->dsp_ops.cleanup(ctx->dev, &ctx->dmab, stream_tag);
97 cnl_dsp_disable_core(ctx, SKL_DSP_CORE0_MASK);
98
99 return ret;
100}
101
102static int sst_transfer_fw_host_dma(struct sst_dsp *ctx)
103{
104 int ret;
105
106 ctx->dsp_ops.trigger(ctx->dev, true, ctx->dsp_ops.stream_tag);
107 ret = sst_dsp_register_poll(ctx, CNL_ADSP_FW_STATUS, CNL_FW_STS_MASK,
108 CNL_FW_INIT, CNL_BASEFW_TIMEOUT,
109 "firmware boot");
110
111 ctx->dsp_ops.trigger(ctx->dev, false, ctx->dsp_ops.stream_tag);
112 ctx->dsp_ops.cleanup(ctx->dev, &ctx->dmab, ctx->dsp_ops.stream_tag);
113
114 return ret;
115}
116
117static int cnl_load_base_firmware(struct sst_dsp *ctx)
118{
119 struct firmware stripped_fw;
120 struct skl_sst *cnl = ctx->thread_context;
121 int ret;
122
123 if (!ctx->fw) {
124 ret = request_firmware(&ctx->fw, ctx->fw_name, ctx->dev);
125 if (ret < 0) {
126 dev_err(ctx->dev, "request firmware failed: %d\n", ret);
127 goto cnl_load_base_firmware_failed;
128 }
129 }
130
131 /* parse uuids if first boot */
132 if (cnl->is_first_boot) {
133 ret = snd_skl_parse_uuids(ctx, ctx->fw,
134 CNL_ADSP_FW_HDR_OFFSET, 0);
135 if (ret < 0)
136 goto cnl_load_base_firmware_failed;
137 }
138
139 stripped_fw.data = ctx->fw->data;
140 stripped_fw.size = ctx->fw->size;
141 skl_dsp_strip_extended_manifest(&stripped_fw);
142
143 ret = cnl_prepare_fw(ctx, stripped_fw.data, stripped_fw.size);
144 if (ret < 0) {
145 dev_err(ctx->dev, "prepare firmware failed: %d\n", ret);
146 goto cnl_load_base_firmware_failed;
147 }
148
149 ret = sst_transfer_fw_host_dma(ctx);
150 if (ret < 0) {
151 dev_err(ctx->dev, "transfer firmware failed: %d\n", ret);
152 cnl_dsp_disable_core(ctx, SKL_DSP_CORE0_MASK);
153 goto cnl_load_base_firmware_failed;
154 }
155
156 ret = wait_event_timeout(cnl->boot_wait, cnl->boot_complete,
157 msecs_to_jiffies(SKL_IPC_BOOT_MSECS));
158 if (ret == 0) {
159 dev_err(ctx->dev, "FW ready timed-out\n");
160 cnl_dsp_disable_core(ctx, SKL_DSP_CORE0_MASK);
161 ret = -EIO;
162 goto cnl_load_base_firmware_failed;
163 }
164
165 cnl->fw_loaded = true;
166
167 return 0;
168
169cnl_load_base_firmware_failed:
170 release_firmware(ctx->fw);
171 ctx->fw = NULL;
172
173 return ret;
174}
175
176static int cnl_set_dsp_D0(struct sst_dsp *ctx, unsigned int core_id)
177{
178 struct skl_sst *cnl = ctx->thread_context;
179 unsigned int core_mask = SKL_DSP_CORE_MASK(core_id);
180 struct skl_ipc_dxstate_info dx;
181 int ret;
182
183 if (!cnl->fw_loaded) {
184 cnl->boot_complete = false;
185 ret = cnl_load_base_firmware(ctx);
186 if (ret < 0) {
187 dev_err(ctx->dev, "fw reload failed: %d\n", ret);
188 return ret;
189 }
190
191 cnl->cores.state[core_id] = SKL_DSP_RUNNING;
192 return ret;
193 }
194
195 ret = cnl_dsp_enable_core(ctx, core_mask);
196 if (ret < 0) {
197 dev_err(ctx->dev, "enable dsp core %d failed: %d\n",
198 core_id, ret);
199 goto err;
200 }
201
202 if (core_id == SKL_DSP_CORE0_ID) {
203 /* enable interrupt */
204 cnl_ipc_int_enable(ctx);
205 cnl_ipc_op_int_enable(ctx);
206 cnl->boot_complete = false;
207
208 ret = wait_event_timeout(cnl->boot_wait, cnl->boot_complete,
209 msecs_to_jiffies(SKL_IPC_BOOT_MSECS));
210 if (ret == 0) {
211 dev_err(ctx->dev,
212 "dsp boot timeout, status=%#x error=%#x\n",
213 sst_dsp_shim_read(ctx, CNL_ADSP_FW_STATUS),
214 sst_dsp_shim_read(ctx, CNL_ADSP_ERROR_CODE));
215 goto err;
216 }
217 } else {
218 dx.core_mask = core_mask;
219 dx.dx_mask = core_mask;
220
221 ret = skl_ipc_set_dx(&cnl->ipc, CNL_INSTANCE_ID,
222 CNL_BASE_FW_MODULE_ID, &dx);
223 if (ret < 0) {
224 dev_err(ctx->dev, "set_dx failed, core: %d ret: %d\n",
225 core_id, ret);
226 goto err;
227 }
228 }
229 cnl->cores.state[core_id] = SKL_DSP_RUNNING;
230
231 return 0;
232err:
233 cnl_dsp_disable_core(ctx, core_mask);
234
235 return ret;
236}
237
238static int cnl_set_dsp_D3(struct sst_dsp *ctx, unsigned int core_id)
239{
240 struct skl_sst *cnl = ctx->thread_context;
241 unsigned int core_mask = SKL_DSP_CORE_MASK(core_id);
242 struct skl_ipc_dxstate_info dx;
243 int ret;
244
245 dx.core_mask = core_mask;
246 dx.dx_mask = SKL_IPC_D3_MASK;
247
248 ret = skl_ipc_set_dx(&cnl->ipc, CNL_INSTANCE_ID,
249 CNL_BASE_FW_MODULE_ID, &dx);
250 if (ret < 0) {
251 dev_err(ctx->dev,
252 "dsp core %d to d3 failed; continue reset\n",
253 core_id);
254 cnl->fw_loaded = false;
255 }
256
257 /* disable interrupts if core 0 */
258 if (core_id == SKL_DSP_CORE0_ID) {
259 skl_ipc_op_int_disable(ctx);
260 skl_ipc_int_disable(ctx);
261 }
262
263 ret = cnl_dsp_disable_core(ctx, core_mask);
264 if (ret < 0) {
265 dev_err(ctx->dev, "disable dsp core %d failed: %d\n",
266 core_id, ret);
267 return ret;
268 }
269
270 cnl->cores.state[core_id] = SKL_DSP_RESET;
271
272 return ret;
273}
274
275static unsigned int cnl_get_errno(struct sst_dsp *ctx)
276{
277 return sst_dsp_shim_read(ctx, CNL_ADSP_ERROR_CODE);
278}
279
280static const struct skl_dsp_fw_ops cnl_fw_ops = {
281 .set_state_D0 = cnl_set_dsp_D0,
282 .set_state_D3 = cnl_set_dsp_D3,
283 .load_fw = cnl_load_base_firmware,
284 .get_fw_errcode = cnl_get_errno,
285};
286
287static struct sst_ops cnl_ops = {
288 .irq_handler = cnl_dsp_sst_interrupt,
289 .write = sst_shim32_write,
290 .read = sst_shim32_read,
291 .ram_read = sst_memcpy_fromio_32,
292 .ram_write = sst_memcpy_toio_32,
293 .free = cnl_dsp_free,
294};
295
296#define CNL_IPC_GLB_NOTIFY_RSP_SHIFT 29
297#define CNL_IPC_GLB_NOTIFY_RSP_MASK 0x1
298#define CNL_IPC_GLB_NOTIFY_RSP_TYPE(x) (((x) >> CNL_IPC_GLB_NOTIFY_RSP_SHIFT) \
299 & CNL_IPC_GLB_NOTIFY_RSP_MASK)
300
301static irqreturn_t cnl_dsp_irq_thread_handler(int irq, void *context)
302{
303 struct sst_dsp *dsp = context;
304 struct skl_sst *cnl = sst_dsp_get_thread_context(dsp);
305 struct sst_generic_ipc *ipc = &cnl->ipc;
306 struct skl_ipc_header header = {0};
307 u32 hipcida, hipctdr, hipctdd;
308 int ipc_irq = 0;
309
310 /* here we handle ipc interrupts only */
311 if (!(dsp->intr_status & CNL_ADSPIS_IPC))
312 return IRQ_NONE;
313
314 hipcida = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCIDA);
315 hipctdr = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCTDR);
316
317 /* reply message from dsp */
318 if (hipcida & CNL_ADSP_REG_HIPCIDA_DONE) {
319 sst_dsp_shim_update_bits(dsp, CNL_ADSP_REG_HIPCCTL,
320 CNL_ADSP_REG_HIPCCTL_DONE, 0);
321
322 /* clear done bit - tell dsp operation is complete */
323 sst_dsp_shim_update_bits_forced(dsp, CNL_ADSP_REG_HIPCIDA,
324 CNL_ADSP_REG_HIPCIDA_DONE, CNL_ADSP_REG_HIPCIDA_DONE);
325
326 ipc_irq = 1;
327
328 /* unmask done interrupt */
329 sst_dsp_shim_update_bits(dsp, CNL_ADSP_REG_HIPCCTL,
330 CNL_ADSP_REG_HIPCCTL_DONE, CNL_ADSP_REG_HIPCCTL_DONE);
331 }
332
333 /* new message from dsp */
334 if (hipctdr & CNL_ADSP_REG_HIPCTDR_BUSY) {
335 hipctdd = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCTDD);
336 header.primary = hipctdr;
337 header.extension = hipctdd;
338 dev_dbg(dsp->dev, "IPC irq: Firmware respond primary:%x",
339 header.primary);
340 dev_dbg(dsp->dev, "IPC irq: Firmware respond extension:%x",
341 header.extension);
342
343 if (CNL_IPC_GLB_NOTIFY_RSP_TYPE(header.primary)) {
344 /* Handle Immediate reply from DSP Core */
345 skl_ipc_process_reply(ipc, header);
346 } else {
347 dev_dbg(dsp->dev, "IPC irq: Notification from firmware\n");
348 skl_ipc_process_notification(ipc, header);
349 }
350 /* clear busy interrupt */
351 sst_dsp_shim_update_bits_forced(dsp, CNL_ADSP_REG_HIPCTDR,
352 CNL_ADSP_REG_HIPCTDR_BUSY, CNL_ADSP_REG_HIPCTDR_BUSY);
353
354 /* set done bit to ack dsp */
355 sst_dsp_shim_update_bits_forced(dsp, CNL_ADSP_REG_HIPCTDA,
356 CNL_ADSP_REG_HIPCTDA_DONE, CNL_ADSP_REG_HIPCTDA_DONE);
357 ipc_irq = 1;
358 }
359
360 if (ipc_irq == 0)
361 return IRQ_NONE;
362
363 cnl_ipc_int_enable(dsp);
364
365 /* continue to send any remaining messages */
366 schedule_work(&ipc->kwork);
367
368 return IRQ_HANDLED;
369}
370
371static struct sst_dsp_device cnl_dev = {
372 .thread = cnl_dsp_irq_thread_handler,
373 .ops = &cnl_ops,
374};
375
376static void cnl_ipc_tx_msg(struct sst_generic_ipc *ipc, struct ipc_message *msg)
377{
378 struct skl_ipc_header *header = (struct skl_ipc_header *)(&msg->header);
379
380 if (msg->tx_size)
381 sst_dsp_outbox_write(ipc->dsp, msg->tx_data, msg->tx_size);
382 sst_dsp_shim_write_unlocked(ipc->dsp, CNL_ADSP_REG_HIPCIDD,
383 header->extension);
384 sst_dsp_shim_write_unlocked(ipc->dsp, CNL_ADSP_REG_HIPCIDR,
385 header->primary | CNL_ADSP_REG_HIPCIDR_BUSY);
386}
387
388static bool cnl_ipc_is_dsp_busy(struct sst_dsp *dsp)
389{
390 u32 hipcidr;
391
392 hipcidr = sst_dsp_shim_read_unlocked(dsp, CNL_ADSP_REG_HIPCIDR);
393
394 return (hipcidr & CNL_ADSP_REG_HIPCIDR_BUSY);
395}
396
397static int cnl_ipc_init(struct device *dev, struct skl_sst *cnl)
398{
399 struct sst_generic_ipc *ipc;
400 int err;
401
402 ipc = &cnl->ipc;
403 ipc->dsp = cnl->dsp;
404 ipc->dev = dev;
405
406 ipc->tx_data_max_size = CNL_ADSP_W1_SZ;
407 ipc->rx_data_max_size = CNL_ADSP_W0_UP_SZ;
408
409 err = sst_ipc_init(ipc);
410 if (err)
411 return err;
412
413 /*
414 * overriding tx_msg and is_dsp_busy since
415 * ipc registers are different for cnl
416 */
417 ipc->ops.tx_msg = cnl_ipc_tx_msg;
418 ipc->ops.tx_data_copy = skl_ipc_tx_data_copy;
419 ipc->ops.is_dsp_busy = cnl_ipc_is_dsp_busy;
420
421 return 0;
422}
423
424int cnl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
425 const char *fw_name, struct skl_dsp_loader_ops dsp_ops,
426 struct skl_sst **dsp)
427{
428 struct skl_sst *cnl;
429 struct sst_dsp *sst;
430 int ret;
431
432 ret = skl_sst_ctx_init(dev, irq, fw_name, dsp_ops, dsp, &cnl_dev);
433 if (ret < 0) {
434 dev_err(dev, "%s: no device\n", __func__);
435 return ret;
436 }
437
438 cnl = *dsp;
439 sst = cnl->dsp;
440 sst->fw_ops = cnl_fw_ops;
441 sst->addr.lpe = mmio_base;
442 sst->addr.shim = mmio_base;
443 sst->addr.sram0_base = CNL_ADSP_SRAM0_BASE;
444 sst->addr.sram1_base = CNL_ADSP_SRAM1_BASE;
445 sst->addr.w0_stat_sz = CNL_ADSP_W0_STAT_SZ;
446 sst->addr.w0_up_sz = CNL_ADSP_W0_UP_SZ;
447
448 sst_dsp_mailbox_init(sst, (CNL_ADSP_SRAM0_BASE + CNL_ADSP_W0_STAT_SZ),
449 CNL_ADSP_W0_UP_SZ, CNL_ADSP_SRAM1_BASE,
450 CNL_ADSP_W1_SZ);
451
452 ret = cnl_ipc_init(dev, cnl);
453 if (ret) {
454 skl_dsp_free(sst);
455 return ret;
456 }
457
458 cnl->boot_complete = false;
459 init_waitqueue_head(&cnl->boot_wait);
460
461 return 0;
462}
463EXPORT_SYMBOL_GPL(cnl_sst_dsp_init);
464
465int cnl_sst_init_fw(struct device *dev, struct skl_sst *ctx)
466{
467 int ret;
468 struct sst_dsp *sst = ctx->dsp;
469
470 ret = ctx->dsp->fw_ops.load_fw(sst);
471 if (ret < 0) {
472 dev_err(dev, "load base fw failed: %d", ret);
473 return ret;
474 }
475
476 skl_dsp_init_core_state(sst);
477
478 ctx->is_first_boot = false;
479
480 return 0;
481}
482EXPORT_SYMBOL_GPL(cnl_sst_init_fw);
483
484void cnl_sst_dsp_cleanup(struct device *dev, struct skl_sst *ctx)
485{
486 if (ctx->dsp->fw)
487 release_firmware(ctx->dsp->fw);
488
489 skl_freeup_uuid_list(ctx);
490 cnl_ipc_free(&ctx->ipc);
491
492 ctx->dsp->ops->free(ctx->dsp);
493}
494EXPORT_SYMBOL_GPL(cnl_sst_dsp_cleanup);
495
496MODULE_LICENSE("GPL v2");
497MODULE_DESCRIPTION("Intel Cannonlake IPC driver");
diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c
index fb2f1f603f3c..89f70133c8e4 100644
--- a/sound/soc/intel/skylake/skl-messages.c
+++ b/sound/soc/intel/skylake/skl-messages.c
@@ -22,6 +22,7 @@
22#include <sound/core.h> 22#include <sound/core.h>
23#include <sound/pcm.h> 23#include <sound/pcm.h>
24#include "skl-sst-dsp.h" 24#include "skl-sst-dsp.h"
25#include "cnl-sst-dsp.h"
25#include "skl-sst-ipc.h" 26#include "skl-sst-ipc.h"
26#include "skl.h" 27#include "skl.h"
27#include "../common/sst-dsp.h" 28#include "../common/sst-dsp.h"
@@ -201,6 +202,7 @@ static struct skl_dsp_loader_ops bxt_get_loader_ops(void)
201static const struct skl_dsp_ops dsp_ops[] = { 202static const struct skl_dsp_ops dsp_ops[] = {
202 { 203 {
203 .id = 0x9d70, 204 .id = 0x9d70,
205 .num_cores = 2,
204 .loader_ops = skl_get_loader_ops, 206 .loader_ops = skl_get_loader_ops,
205 .init = skl_sst_dsp_init, 207 .init = skl_sst_dsp_init,
206 .init_fw = skl_sst_init_fw, 208 .init_fw = skl_sst_init_fw,
@@ -208,6 +210,7 @@ static const struct skl_dsp_ops dsp_ops[] = {
208 }, 210 },
209 { 211 {
210 .id = 0x9d71, 212 .id = 0x9d71,
213 .num_cores = 2,
211 .loader_ops = skl_get_loader_ops, 214 .loader_ops = skl_get_loader_ops,
212 .init = kbl_sst_dsp_init, 215 .init = kbl_sst_dsp_init,
213 .init_fw = skl_sst_init_fw, 216 .init_fw = skl_sst_init_fw,
@@ -215,6 +218,7 @@ static const struct skl_dsp_ops dsp_ops[] = {
215 }, 218 },
216 { 219 {
217 .id = 0x5a98, 220 .id = 0x5a98,
221 .num_cores = 2,
218 .loader_ops = bxt_get_loader_ops, 222 .loader_ops = bxt_get_loader_ops,
219 .init = bxt_sst_dsp_init, 223 .init = bxt_sst_dsp_init,
220 .init_fw = bxt_sst_init_fw, 224 .init_fw = bxt_sst_init_fw,
@@ -222,11 +226,20 @@ static const struct skl_dsp_ops dsp_ops[] = {
222 }, 226 },
223 { 227 {
224 .id = 0x3198, 228 .id = 0x3198,
229 .num_cores = 2,
225 .loader_ops = bxt_get_loader_ops, 230 .loader_ops = bxt_get_loader_ops,
226 .init = bxt_sst_dsp_init, 231 .init = bxt_sst_dsp_init,
227 .init_fw = bxt_sst_init_fw, 232 .init_fw = bxt_sst_init_fw,
228 .cleanup = bxt_sst_dsp_cleanup 233 .cleanup = bxt_sst_dsp_cleanup
229 }, 234 },
235 {
236 .id = 0x9dc8,
237 .num_cores = 4,
238 .loader_ops = bxt_get_loader_ops,
239 .init = cnl_sst_dsp_init,
240 .init_fw = cnl_sst_init_fw,
241 .cleanup = cnl_sst_dsp_cleanup
242 },
230}; 243};
231 244
232const struct skl_dsp_ops *skl_get_dsp_ops(int pci_id) 245const struct skl_dsp_ops *skl_get_dsp_ops(int pci_id)
@@ -249,6 +262,7 @@ int skl_init_dsp(struct skl *skl)
249 struct skl_dsp_loader_ops loader_ops; 262 struct skl_dsp_loader_ops loader_ops;
250 int irq = bus->irq; 263 int irq = bus->irq;
251 const struct skl_dsp_ops *ops; 264 const struct skl_dsp_ops *ops;
265 struct skl_dsp_cores *cores;
252 int ret; 266 int ret;
253 267
254 /* enable ppcap interrupt */ 268 /* enable ppcap interrupt */
@@ -263,8 +277,10 @@ int skl_init_dsp(struct skl *skl)
263 } 277 }
264 278
265 ops = skl_get_dsp_ops(skl->pci->device); 279 ops = skl_get_dsp_ops(skl->pci->device);
266 if (!ops) 280 if (!ops) {
267 return -EIO; 281 ret = -EIO;
282 goto unmap_mmio;
283 }
268 284
269 loader_ops = ops->loader_ops(); 285 loader_ops = ops->loader_ops();
270 ret = ops->init(bus->dev, mmio_base, irq, 286 ret = ops->init(bus->dev, mmio_base, irq,
@@ -272,11 +288,35 @@ int skl_init_dsp(struct skl *skl)
272 &skl->skl_sst); 288 &skl->skl_sst);
273 289
274 if (ret < 0) 290 if (ret < 0)
275 return ret; 291 goto unmap_mmio;
276 292
277 skl->skl_sst->dsp_ops = ops; 293 skl->skl_sst->dsp_ops = ops;
294 cores = &skl->skl_sst->cores;
295 cores->count = ops->num_cores;
296
297 cores->state = kcalloc(cores->count, sizeof(*cores->state), GFP_KERNEL);
298 if (!cores->state) {
299 ret = -ENOMEM;
300 goto unmap_mmio;
301 }
302
303 cores->usage_count = kcalloc(cores->count, sizeof(*cores->usage_count),
304 GFP_KERNEL);
305 if (!cores->usage_count) {
306 ret = -ENOMEM;
307 goto free_core_state;
308 }
309
278 dev_dbg(bus->dev, "dsp registration status=%d\n", ret); 310 dev_dbg(bus->dev, "dsp registration status=%d\n", ret);
279 311
312 return 0;
313
314free_core_state:
315 kfree(cores->state);
316
317unmap_mmio:
318 iounmap(mmio_base);
319
280 return ret; 320 return ret;
281} 321}
282 322
@@ -291,6 +331,9 @@ int skl_free_dsp(struct skl *skl)
291 331
292 ctx->dsp_ops->cleanup(bus->dev, ctx); 332 ctx->dsp_ops->cleanup(bus->dev, ctx);
293 333
334 kfree(ctx->cores.state);
335 kfree(ctx->cores.usage_count);
336
294 if (ctx->dsp->addr.lpe) 337 if (ctx->dsp->addr.lpe)
295 iounmap(ctx->dsp->addr.lpe); 338 iounmap(ctx->dsp->addr.lpe);
296 339
@@ -400,9 +443,12 @@ static void skl_set_base_module_format(struct skl_sst *ctx,
400 struct skl_module_cfg *mconfig, 443 struct skl_module_cfg *mconfig,
401 struct skl_base_cfg *base_cfg) 444 struct skl_base_cfg *base_cfg)
402{ 445{
403 struct skl_module_fmt *format = &mconfig->in_fmt[0]; 446 struct skl_module *module = mconfig->module;
447 struct skl_module_res *res = &module->resources[mconfig->res_idx];
448 struct skl_module_iface *fmt = &module->formats[mconfig->fmt_idx];
449 struct skl_module_fmt *format = &fmt->inputs[0].fmt;
404 450
405 base_cfg->audio_fmt.number_of_channels = (u8)format->channels; 451 base_cfg->audio_fmt.number_of_channels = format->channels;
406 452
407 base_cfg->audio_fmt.s_freq = format->s_freq; 453 base_cfg->audio_fmt.s_freq = format->s_freq;
408 base_cfg->audio_fmt.bit_depth = format->bit_depth; 454 base_cfg->audio_fmt.bit_depth = format->bit_depth;
@@ -417,10 +463,10 @@ static void skl_set_base_module_format(struct skl_sst *ctx,
417 463
418 base_cfg->audio_fmt.interleaving = format->interleaving_style; 464 base_cfg->audio_fmt.interleaving = format->interleaving_style;
419 465
420 base_cfg->cps = mconfig->mcps; 466 base_cfg->cps = res->cps;
421 base_cfg->ibs = mconfig->ibs; 467 base_cfg->ibs = res->ibs;
422 base_cfg->obs = mconfig->obs; 468 base_cfg->obs = res->obs;
423 base_cfg->is_pages = mconfig->mem_pages; 469 base_cfg->is_pages = res->is_pages;
424} 470}
425 471
426/* 472/*
@@ -508,6 +554,9 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
508 struct skl_cpr_cfg *cpr_mconfig) 554 struct skl_cpr_cfg *cpr_mconfig)
509{ 555{
510 u32 dma_io_buf; 556 u32 dma_io_buf;
557 struct skl_module_res *res;
558 int res_idx = mconfig->res_idx;
559 struct skl *skl = get_skl_ctx(ctx->dev);
511 560
512 cpr_mconfig->gtw_cfg.node_id = skl_get_node_id(ctx, mconfig); 561 cpr_mconfig->gtw_cfg.node_id = skl_get_node_id(ctx, mconfig);
513 562
@@ -516,19 +565,27 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
516 return; 565 return;
517 } 566 }
518 567
568 if (skl->nr_modules) {
569 res = &mconfig->module->resources[mconfig->res_idx];
570 cpr_mconfig->gtw_cfg.dma_buffer_size = res->dma_buffer_size;
571 goto skip_buf_size_calc;
572 } else {
573 res = &mconfig->module->resources[res_idx];
574 }
575
519 switch (mconfig->hw_conn_type) { 576 switch (mconfig->hw_conn_type) {
520 case SKL_CONN_SOURCE: 577 case SKL_CONN_SOURCE:
521 if (mconfig->dev_type == SKL_DEVICE_HDAHOST) 578 if (mconfig->dev_type == SKL_DEVICE_HDAHOST)
522 dma_io_buf = mconfig->ibs; 579 dma_io_buf = res->ibs;
523 else 580 else
524 dma_io_buf = mconfig->obs; 581 dma_io_buf = res->obs;
525 break; 582 break;
526 583
527 case SKL_CONN_SINK: 584 case SKL_CONN_SINK:
528 if (mconfig->dev_type == SKL_DEVICE_HDAHOST) 585 if (mconfig->dev_type == SKL_DEVICE_HDAHOST)
529 dma_io_buf = mconfig->obs; 586 dma_io_buf = res->obs;
530 else 587 else
531 dma_io_buf = mconfig->ibs; 588 dma_io_buf = res->ibs;
532 break; 589 break;
533 590
534 default: 591 default:
@@ -543,11 +600,12 @@ static void skl_setup_cpr_gateway_cfg(struct skl_sst *ctx,
543 /* fallback to 2ms default value */ 600 /* fallback to 2ms default value */
544 if (!cpr_mconfig->gtw_cfg.dma_buffer_size) { 601 if (!cpr_mconfig->gtw_cfg.dma_buffer_size) {
545 if (mconfig->hw_conn_type == SKL_CONN_SOURCE) 602 if (mconfig->hw_conn_type == SKL_CONN_SOURCE)
546 cpr_mconfig->gtw_cfg.dma_buffer_size = 2 * mconfig->obs; 603 cpr_mconfig->gtw_cfg.dma_buffer_size = 2 * res->obs;
547 else 604 else
548 cpr_mconfig->gtw_cfg.dma_buffer_size = 2 * mconfig->ibs; 605 cpr_mconfig->gtw_cfg.dma_buffer_size = 2 * res->ibs;
549 } 606 }
550 607
608skip_buf_size_calc:
551 cpr_mconfig->cpr_feature_mask = 0; 609 cpr_mconfig->cpr_feature_mask = 0;
552 cpr_mconfig->gtw_cfg.config_length = 0; 610 cpr_mconfig->gtw_cfg.config_length = 0;
553 611
@@ -595,7 +653,9 @@ static void skl_setup_out_format(struct skl_sst *ctx,
595 struct skl_module_cfg *mconfig, 653 struct skl_module_cfg *mconfig,
596 struct skl_audio_data_format *out_fmt) 654 struct skl_audio_data_format *out_fmt)
597{ 655{
598 struct skl_module_fmt *format = &mconfig->out_fmt[0]; 656 struct skl_module *module = mconfig->module;
657 struct skl_module_iface *fmt = &module->formats[mconfig->fmt_idx];
658 struct skl_module_fmt *format = &fmt->outputs[0].fmt;
599 659
600 out_fmt->number_of_channels = (u8)format->channels; 660 out_fmt->number_of_channels = (u8)format->channels;
601 out_fmt->s_freq = format->s_freq; 661 out_fmt->s_freq = format->s_freq;
@@ -620,7 +680,9 @@ static void skl_set_src_format(struct skl_sst *ctx,
620 struct skl_module_cfg *mconfig, 680 struct skl_module_cfg *mconfig,
621 struct skl_src_module_cfg *src_mconfig) 681 struct skl_src_module_cfg *src_mconfig)
622{ 682{
623 struct skl_module_fmt *fmt = &mconfig->out_fmt[0]; 683 struct skl_module *module = mconfig->module;
684 struct skl_module_iface *iface = &module->formats[mconfig->fmt_idx];
685 struct skl_module_fmt *fmt = &iface->outputs[0].fmt;
624 686
625 skl_set_base_module_format(ctx, mconfig, 687 skl_set_base_module_format(ctx, mconfig,
626 (struct skl_base_cfg *)src_mconfig); 688 (struct skl_base_cfg *)src_mconfig);
@@ -637,7 +699,9 @@ static void skl_set_updown_mixer_format(struct skl_sst *ctx,
637 struct skl_module_cfg *mconfig, 699 struct skl_module_cfg *mconfig,
638 struct skl_up_down_mixer_cfg *mixer_mconfig) 700 struct skl_up_down_mixer_cfg *mixer_mconfig)
639{ 701{
640 struct skl_module_fmt *fmt = &mconfig->out_fmt[0]; 702 struct skl_module *module = mconfig->module;
703 struct skl_module_iface *iface = &module->formats[mconfig->fmt_idx];
704 struct skl_module_fmt *fmt = &iface->outputs[0].fmt;
641 int i = 0; 705 int i = 0;
642 706
643 skl_set_base_module_format(ctx, mconfig, 707 skl_set_base_module_format(ctx, mconfig,
@@ -950,7 +1014,7 @@ static void skl_dump_bind_info(struct skl_sst *ctx, struct skl_module_cfg
950{ 1014{
951 dev_dbg(ctx->dev, "%s: src module_id = %d src_instance=%d\n", 1015 dev_dbg(ctx->dev, "%s: src module_id = %d src_instance=%d\n",
952 __func__, src_module->id.module_id, src_module->id.pvt_id); 1016 __func__, src_module->id.module_id, src_module->id.pvt_id);
953 dev_dbg(ctx->dev, "%s: dst_module=%d dst_instacne=%d\n", __func__, 1017 dev_dbg(ctx->dev, "%s: dst_module=%d dst_instance=%d\n", __func__,
954 dst_module->id.module_id, dst_module->id.pvt_id); 1018 dst_module->id.module_id, dst_module->id.pvt_id);
955 1019
956 dev_dbg(ctx->dev, "src_module state = %d dst module state = %d\n", 1020 dev_dbg(ctx->dev, "src_module state = %d dst module state = %d\n",
@@ -970,8 +1034,8 @@ int skl_unbind_modules(struct skl_sst *ctx,
970 struct skl_ipc_bind_unbind_msg msg; 1034 struct skl_ipc_bind_unbind_msg msg;
971 struct skl_module_inst_id src_id = src_mcfg->id; 1035 struct skl_module_inst_id src_id = src_mcfg->id;
972 struct skl_module_inst_id dst_id = dst_mcfg->id; 1036 struct skl_module_inst_id dst_id = dst_mcfg->id;
973 int in_max = dst_mcfg->max_in_queue; 1037 int in_max = dst_mcfg->module->max_input_pins;
974 int out_max = src_mcfg->max_out_queue; 1038 int out_max = src_mcfg->module->max_output_pins;
975 int src_index, dst_index, src_pin_state, dst_pin_state; 1039 int src_index, dst_index, src_pin_state, dst_pin_state;
976 1040
977 skl_dump_bind_info(ctx, src_mcfg, dst_mcfg); 1041 skl_dump_bind_info(ctx, src_mcfg, dst_mcfg);
@@ -1019,6 +1083,21 @@ int skl_unbind_modules(struct skl_sst *ctx,
1019 return ret; 1083 return ret;
1020} 1084}
1021 1085
1086static void fill_pin_params(struct skl_audio_data_format *pin_fmt,
1087 struct skl_module_fmt *format)
1088{
1089 pin_fmt->number_of_channels = format->channels;
1090 pin_fmt->s_freq = format->s_freq;
1091 pin_fmt->bit_depth = format->bit_depth;
1092 pin_fmt->valid_bit_depth = format->valid_bit_depth;
1093 pin_fmt->ch_cfg = format->ch_cfg;
1094 pin_fmt->sample_type = format->sample_type;
1095 pin_fmt->channel_map = format->ch_map;
1096 pin_fmt->interleaving = format->interleaving_style;
1097}
1098
1099#define CPR_SINK_FMT_PARAM_ID 2
1100
1022/* 1101/*
1023 * Once a module is instantiated it need to be 'bind' with other modules in 1102 * Once a module is instantiated it need to be 'bind' with other modules in
1024 * the pipeline. For binding we need to find the module pins which are bind 1103 * the pipeline. For binding we need to find the module pins which are bind
@@ -1030,11 +1109,15 @@ int skl_bind_modules(struct skl_sst *ctx,
1030 struct skl_module_cfg *src_mcfg, 1109 struct skl_module_cfg *src_mcfg,
1031 struct skl_module_cfg *dst_mcfg) 1110 struct skl_module_cfg *dst_mcfg)
1032{ 1111{
1033 int ret; 1112 int ret = 0;
1034 struct skl_ipc_bind_unbind_msg msg; 1113 struct skl_ipc_bind_unbind_msg msg;
1035 int in_max = dst_mcfg->max_in_queue; 1114 int in_max = dst_mcfg->module->max_input_pins;
1036 int out_max = src_mcfg->max_out_queue; 1115 int out_max = src_mcfg->module->max_output_pins;
1037 int src_index, dst_index; 1116 int src_index, dst_index;
1117 struct skl_module_fmt *format;
1118 struct skl_cpr_pin_fmt pin_fmt;
1119 struct skl_module *module;
1120 struct skl_module_iface *fmt;
1038 1121
1039 skl_dump_bind_info(ctx, src_mcfg, dst_mcfg); 1122 skl_dump_bind_info(ctx, src_mcfg, dst_mcfg);
1040 1123
@@ -1053,6 +1136,29 @@ int skl_bind_modules(struct skl_sst *ctx,
1053 return -EINVAL; 1136 return -EINVAL;
1054 } 1137 }
1055 1138
1139 /*
1140 * Copier module requires the separate large_config_set_ipc to
1141 * configure the pins other than 0
1142 */
1143 if (src_mcfg->m_type == SKL_MODULE_TYPE_COPIER && src_index > 0) {
1144 pin_fmt.sink_id = src_index;
1145 module = src_mcfg->module;
1146 fmt = &module->formats[src_mcfg->fmt_idx];
1147
1148 /* Input fmt is same as that of src module input cfg */
1149 format = &fmt->inputs[0].fmt;
1150 fill_pin_params(&(pin_fmt.src_fmt), format);
1151
1152 format = &fmt->outputs[src_index].fmt;
1153 fill_pin_params(&(pin_fmt.dst_fmt), format);
1154 ret = skl_set_module_params(ctx, (void *)&pin_fmt,
1155 sizeof(struct skl_cpr_pin_fmt),
1156 CPR_SINK_FMT_PARAM_ID, src_mcfg);
1157
1158 if (ret < 0)
1159 goto out;
1160 }
1161
1056 msg.dst_queue = dst_index; 1162 msg.dst_queue = dst_index;
1057 1163
1058 dev_dbg(ctx->dev, "src queue = %d dst queue =%d\n", 1164 dev_dbg(ctx->dev, "src queue = %d dst queue =%d\n",
@@ -1070,11 +1176,12 @@ int skl_bind_modules(struct skl_sst *ctx,
1070 src_mcfg->m_state = SKL_MODULE_BIND_DONE; 1176 src_mcfg->m_state = SKL_MODULE_BIND_DONE;
1071 src_mcfg->m_out_pin[src_index].pin_state = SKL_PIN_BIND_DONE; 1177 src_mcfg->m_out_pin[src_index].pin_state = SKL_PIN_BIND_DONE;
1072 dst_mcfg->m_in_pin[dst_index].pin_state = SKL_PIN_BIND_DONE; 1178 dst_mcfg->m_in_pin[dst_index].pin_state = SKL_PIN_BIND_DONE;
1073 } else { 1179 return ret;
1074 /* error case , if IPC fails, clear the queue index */
1075 skl_free_queue(src_mcfg->m_out_pin, src_index);
1076 skl_free_queue(dst_mcfg->m_in_pin, dst_index);
1077 } 1180 }
1181out:
1182 /* error case , if IPC fails, clear the queue index */
1183 skl_free_queue(src_mcfg->m_out_pin, src_index);
1184 skl_free_queue(dst_mcfg->m_in_pin, dst_index);
1078 1185
1079 return ret; 1186 return ret;
1080} 1187}
diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c
index 0ebea34a4988..2b1e513b1680 100644
--- a/sound/soc/intel/skylake/skl-pcm.c
+++ b/sound/soc/intel/skylake/skl-pcm.c
@@ -33,7 +33,7 @@
33#define HDA_STEREO 2 33#define HDA_STEREO 2
34#define HDA_QUAD 4 34#define HDA_QUAD 4
35 35
36static struct snd_pcm_hardware azx_pcm_hw = { 36static const struct snd_pcm_hardware azx_pcm_hw = {
37 .info = (SNDRV_PCM_INFO_MMAP | 37 .info = (SNDRV_PCM_INFO_MMAP |
38 SNDRV_PCM_INFO_INTERLEAVED | 38 SNDRV_PCM_INFO_INTERLEAVED |
39 SNDRV_PCM_INFO_BLOCK_TRANSFER | 39 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -628,7 +628,7 @@ static int skl_link_hw_free(struct snd_pcm_substream *substream,
628 return 0; 628 return 0;
629} 629}
630 630
631static struct snd_soc_dai_ops skl_pcm_dai_ops = { 631static const struct snd_soc_dai_ops skl_pcm_dai_ops = {
632 .startup = skl_pcm_open, 632 .startup = skl_pcm_open,
633 .shutdown = skl_pcm_close, 633 .shutdown = skl_pcm_close,
634 .prepare = skl_pcm_prepare, 634 .prepare = skl_pcm_prepare,
@@ -637,15 +637,15 @@ static struct snd_soc_dai_ops skl_pcm_dai_ops = {
637 .trigger = skl_pcm_trigger, 637 .trigger = skl_pcm_trigger,
638}; 638};
639 639
640static struct snd_soc_dai_ops skl_dmic_dai_ops = { 640static const struct snd_soc_dai_ops skl_dmic_dai_ops = {
641 .hw_params = skl_be_hw_params, 641 .hw_params = skl_be_hw_params,
642}; 642};
643 643
644static struct snd_soc_dai_ops skl_be_ssp_dai_ops = { 644static const struct snd_soc_dai_ops skl_be_ssp_dai_ops = {
645 .hw_params = skl_be_hw_params, 645 .hw_params = skl_be_hw_params,
646}; 646};
647 647
648static struct snd_soc_dai_ops skl_link_dai_ops = { 648static const struct snd_soc_dai_ops skl_link_dai_ops = {
649 .prepare = skl_link_pcm_prepare, 649 .prepare = skl_link_pcm_prepare,
650 .hw_params = skl_link_hw_params, 650 .hw_params = skl_link_hw_params,
651 .hw_free = skl_link_hw_free, 651 .hw_free = skl_link_hw_free,
@@ -675,6 +675,32 @@ static struct snd_soc_dai_driver skl_platform_dai[] = {
675 }, 675 },
676}, 676},
677{ 677{
678 .name = "System Pin2",
679 .ops = &skl_pcm_dai_ops,
680 .playback = {
681 .stream_name = "Headset Playback",
682 .channels_min = HDA_MONO,
683 .channels_max = HDA_STEREO,
684 .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_16000 |
685 SNDRV_PCM_RATE_8000,
686 .formats = SNDRV_PCM_FMTBIT_S16_LE |
687 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE,
688 },
689},
690{
691 .name = "Echoref Pin",
692 .ops = &skl_pcm_dai_ops,
693 .capture = {
694 .stream_name = "Echoreference Capture",
695 .channels_min = HDA_STEREO,
696 .channels_max = HDA_STEREO,
697 .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_16000 |
698 SNDRV_PCM_RATE_8000,
699 .formats = SNDRV_PCM_FMTBIT_S16_LE |
700 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE,
701 },
702},
703{
678 .name = "Reference Pin", 704 .name = "Reference Pin",
679 .ops = &skl_pcm_dai_ops, 705 .ops = &skl_pcm_dai_ops,
680 .capture = { 706 .capture = {
@@ -1194,8 +1220,11 @@ static int skl_pcm_new(struct snd_soc_pcm_runtime *rtd)
1194static int skl_get_module_info(struct skl *skl, struct skl_module_cfg *mconfig) 1220static int skl_get_module_info(struct skl *skl, struct skl_module_cfg *mconfig)
1195{ 1221{
1196 struct skl_sst *ctx = skl->skl_sst; 1222 struct skl_sst *ctx = skl->skl_sst;
1223 struct skl_module_inst_id *pin_id;
1224 uuid_le *uuid_mod, *uuid_tplg;
1225 struct skl_module *skl_module;
1197 struct uuid_module *module; 1226 struct uuid_module *module;
1198 uuid_le *uuid_mod; 1227 int i, ret = -EIO;
1199 1228
1200 uuid_mod = (uuid_le *)mconfig->guid; 1229 uuid_mod = (uuid_le *)mconfig->guid;
1201 1230
@@ -1207,12 +1236,45 @@ static int skl_get_module_info(struct skl *skl, struct skl_module_cfg *mconfig)
1207 list_for_each_entry(module, &ctx->uuid_list, list) { 1236 list_for_each_entry(module, &ctx->uuid_list, list) {
1208 if (uuid_le_cmp(*uuid_mod, module->uuid) == 0) { 1237 if (uuid_le_cmp(*uuid_mod, module->uuid) == 0) {
1209 mconfig->id.module_id = module->id; 1238 mconfig->id.module_id = module->id;
1210 mconfig->is_loadable = module->is_loadable; 1239 if (mconfig->module)
1211 return 0; 1240 mconfig->module->loadable = module->is_loadable;
1241 ret = 0;
1242 break;
1243 }
1244 }
1245
1246 if (ret)
1247 return ret;
1248
1249 uuid_mod = &module->uuid;
1250 ret = -EIO;
1251 for (i = 0; i < skl->nr_modules; i++) {
1252 skl_module = skl->modules[i];
1253 uuid_tplg = &skl_module->uuid;
1254 if (!uuid_le_cmp(*uuid_mod, *uuid_tplg)) {
1255 mconfig->module = skl_module;
1256 ret = 0;
1257 break;
1212 } 1258 }
1213 } 1259 }
1260 if (skl->nr_modules && ret)
1261 return ret;
1214 1262
1215 return -EIO; 1263 list_for_each_entry(module, &ctx->uuid_list, list) {
1264 for (i = 0; i < MAX_IN_QUEUE; i++) {
1265 pin_id = &mconfig->m_in_pin[i].id;
1266 if (!uuid_le_cmp(pin_id->mod_uuid, module->uuid))
1267 pin_id->module_id = module->id;
1268 }
1269
1270 for (i = 0; i < MAX_OUT_QUEUE; i++) {
1271 pin_id = &mconfig->m_out_pin[i].id;
1272 if (!uuid_le_cmp(pin_id->mod_uuid, module->uuid))
1273 pin_id->module_id = module->id;
1274 }
1275 }
1276
1277 return 0;
1216} 1278}
1217 1279
1218static int skl_populate_modules(struct skl *skl) 1280static int skl_populate_modules(struct skl *skl)
@@ -1284,7 +1346,7 @@ static int skl_platform_soc_probe(struct snd_soc_platform *platform)
1284 1346
1285 return 0; 1347 return 0;
1286} 1348}
1287static struct snd_soc_platform_driver skl_platform_drv = { 1349static const struct snd_soc_platform_driver skl_platform_drv = {
1288 .probe = skl_platform_soc_probe, 1350 .probe = skl_platform_soc_probe,
1289 .ops = &skl_platform_ops, 1351 .ops = &skl_platform_ops,
1290 .pcm_new = skl_pcm_new, 1352 .pcm_new = skl_pcm_new,
diff --git a/sound/soc/intel/skylake/skl-sst-dsp.c b/sound/soc/intel/skylake/skl-sst-dsp.c
index 08332723c700..19ee1d4f3bdf 100644
--- a/sound/soc/intel/skylake/skl-sst-dsp.c
+++ b/sound/soc/intel/skylake/skl-sst-dsp.c
@@ -47,7 +47,7 @@ void skl_dsp_init_core_state(struct sst_dsp *ctx)
47 skl->cores.state[SKL_DSP_CORE0_ID] = SKL_DSP_RUNNING; 47 skl->cores.state[SKL_DSP_CORE0_ID] = SKL_DSP_RUNNING;
48 skl->cores.usage_count[SKL_DSP_CORE0_ID] = 1; 48 skl->cores.usage_count[SKL_DSP_CORE0_ID] = 1;
49 49
50 for (i = SKL_DSP_CORE0_ID + 1; i < SKL_DSP_CORES_MAX; i++) { 50 for (i = SKL_DSP_CORE0_ID + 1; i < skl->cores.count; i++) {
51 skl->cores.state[i] = SKL_DSP_RESET; 51 skl->cores.state[i] = SKL_DSP_RESET;
52 skl->cores.usage_count[i] = 0; 52 skl->cores.usage_count[i] = 0;
53 } 53 }
@@ -351,6 +351,8 @@ int skl_dsp_get_core(struct sst_dsp *ctx, unsigned int core_id)
351 return -EINVAL; 351 return -EINVAL;
352 } 352 }
353 353
354 skl->cores.usage_count[core_id]++;
355
354 if (skl->cores.state[core_id] == SKL_DSP_RESET) { 356 if (skl->cores.state[core_id] == SKL_DSP_RESET) {
355 ret = ctx->fw_ops.set_state_D0(ctx, core_id); 357 ret = ctx->fw_ops.set_state_D0(ctx, core_id);
356 if (ret < 0) { 358 if (ret < 0) {
@@ -359,8 +361,6 @@ int skl_dsp_get_core(struct sst_dsp *ctx, unsigned int core_id)
359 } 361 }
360 } 362 }
361 363
362 skl->cores.usage_count[core_id]++;
363
364out: 364out:
365 dev_dbg(ctx->dev, "core id %d state %d usage_count %d\n", 365 dev_dbg(ctx->dev, "core id %d state %d usage_count %d\n",
366 core_id, skl->cores.state[core_id], 366 core_id, skl->cores.state[core_id],
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c
index 498b15345b1a..5234fafb758a 100644
--- a/sound/soc/intel/skylake/skl-sst-ipc.c
+++ b/sound/soc/intel/skylake/skl-sst-ipc.c
@@ -283,7 +283,7 @@ enum skl_ipc_module_msg {
283 IPC_MOD_SET_D0IX = 8 283 IPC_MOD_SET_D0IX = 8
284}; 284};
285 285
286static void skl_ipc_tx_data_copy(struct ipc_message *msg, char *tx_data, 286void skl_ipc_tx_data_copy(struct ipc_message *msg, char *tx_data,
287 size_t tx_size) 287 size_t tx_size)
288{ 288{
289 if (tx_size) 289 if (tx_size)
@@ -347,7 +347,7 @@ out:
347 347
348} 348}
349 349
350static int skl_ipc_process_notification(struct sst_generic_ipc *ipc, 350int skl_ipc_process_notification(struct sst_generic_ipc *ipc,
351 struct skl_ipc_header header) 351 struct skl_ipc_header header)
352{ 352{
353 struct skl_sst *skl = container_of(ipc, struct skl_sst, ipc); 353 struct skl_sst *skl = container_of(ipc, struct skl_sst, ipc);
@@ -406,7 +406,7 @@ static int skl_ipc_set_reply_error_code(u32 reply)
406 } 406 }
407} 407}
408 408
409static void skl_ipc_process_reply(struct sst_generic_ipc *ipc, 409void skl_ipc_process_reply(struct sst_generic_ipc *ipc,
410 struct skl_ipc_header header) 410 struct skl_ipc_header header)
411{ 411{
412 struct ipc_message *msg; 412 struct ipc_message *msg;
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.h b/sound/soc/intel/skylake/skl-sst-ipc.h
index e057da2713c6..55f2d2ce09df 100644
--- a/sound/soc/intel/skylake/skl-sst-ipc.h
+++ b/sound/soc/intel/skylake/skl-sst-ipc.h
@@ -44,12 +44,10 @@ struct skl_ipc_header {
44 u32 extension; 44 u32 extension;
45}; 45};
46 46
47#define SKL_DSP_CORES_MAX 2
48
49struct skl_dsp_cores { 47struct skl_dsp_cores {
50 unsigned int count; 48 unsigned int count;
51 enum skl_dsp_states state[SKL_DSP_CORES_MAX]; 49 enum skl_dsp_states *state;
52 int usage_count[SKL_DSP_CORES_MAX]; 50 int *usage_count;
53}; 51};
54 52
55/** 53/**
@@ -214,4 +212,10 @@ void skl_ipc_free(struct sst_generic_ipc *ipc);
214int skl_ipc_init(struct device *dev, struct skl_sst *skl); 212int skl_ipc_init(struct device *dev, struct skl_sst *skl);
215void skl_clear_module_cnt(struct sst_dsp *ctx); 213void skl_clear_module_cnt(struct sst_dsp *ctx);
216 214
215void skl_ipc_process_reply(struct sst_generic_ipc *ipc,
216 struct skl_ipc_header header);
217int skl_ipc_process_notification(struct sst_generic_ipc *ipc,
218 struct skl_ipc_header header);
219void skl_ipc_tx_data_copy(struct ipc_message *msg, char *tx_data,
220 size_t tx_size);
217#endif /* __SKL_IPC_H */ 221#endif /* __SKL_IPC_H */
diff --git a/sound/soc/intel/skylake/skl-sst-utils.c b/sound/soc/intel/skylake/skl-sst-utils.c
index 81ee251881b4..369ef7ce981c 100644
--- a/sound/soc/intel/skylake/skl-sst-utils.c
+++ b/sound/soc/intel/skylake/skl-sst-utils.c
@@ -368,7 +368,6 @@ int skl_sst_ctx_init(struct device *dev, int irq, const char *fw_name,
368{ 368{
369 struct skl_sst *skl; 369 struct skl_sst *skl;
370 struct sst_dsp *sst; 370 struct sst_dsp *sst;
371 int ret;
372 371
373 skl = devm_kzalloc(dev, sizeof(*skl), GFP_KERNEL); 372 skl = devm_kzalloc(dev, sizeof(*skl), GFP_KERNEL);
374 if (skl == NULL) 373 if (skl == NULL)
@@ -388,15 +387,12 @@ int skl_sst_ctx_init(struct device *dev, int irq, const char *fw_name,
388 sst->dsp_ops = dsp_ops; 387 sst->dsp_ops = dsp_ops;
389 init_waitqueue_head(&skl->mod_load_wait); 388 init_waitqueue_head(&skl->mod_load_wait);
390 INIT_LIST_HEAD(&sst->module_list); 389 INIT_LIST_HEAD(&sst->module_list);
391 ret = skl_ipc_init(dev, skl);
392 if (ret)
393 return ret;
394 390
395 skl->is_first_boot = true; 391 skl->is_first_boot = true;
396 if (dsp) 392 if (dsp)
397 *dsp = skl; 393 *dsp = skl;
398 394
399 return ret; 395 return 0;
400} 396}
401 397
402int skl_prepare_lib_load(struct skl_sst *skl, struct skl_lib_info *linfo, 398int skl_prepare_lib_load(struct skl_sst *skl, struct skl_lib_info *linfo,
diff --git a/sound/soc/intel/skylake/skl-sst.c b/sound/soc/intel/skylake/skl-sst.c
index aba9ea11ac74..a436abf2fe3f 100644
--- a/sound/soc/intel/skylake/skl-sst.c
+++ b/sound/soc/intel/skylake/skl-sst.c
@@ -503,7 +503,7 @@ static void skl_clear_module_table(struct sst_dsp *ctx)
503 } 503 }
504} 504}
505 505
506static struct skl_dsp_fw_ops skl_fw_ops = { 506static const struct skl_dsp_fw_ops skl_fw_ops = {
507 .set_state_D0 = skl_set_dsp_D0, 507 .set_state_D0 = skl_set_dsp_D0,
508 .set_state_D3 = skl_set_dsp_D3, 508 .set_state_D3 = skl_set_dsp_D3,
509 .load_fw = skl_load_base_firmware, 509 .load_fw = skl_load_base_firmware,
@@ -512,7 +512,7 @@ static struct skl_dsp_fw_ops skl_fw_ops = {
512 .unload_mod = skl_unload_module, 512 .unload_mod = skl_unload_module,
513}; 513};
514 514
515static struct skl_dsp_fw_ops kbl_fw_ops = { 515static const struct skl_dsp_fw_ops kbl_fw_ops = {
516 .set_state_D0 = skl_set_dsp_D0, 516 .set_state_D0 = skl_set_dsp_D0,
517 .set_state_D3 = skl_set_dsp_D3, 517 .set_state_D3 = skl_set_dsp_D3,
518 .load_fw = skl_load_base_firmware, 518 .load_fw = skl_load_base_firmware,
@@ -561,9 +561,13 @@ int skl_sst_dsp_init(struct device *dev, void __iomem *mmio_base, int irq,
561 sst_dsp_mailbox_init(sst, (SKL_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ), 561 sst_dsp_mailbox_init(sst, (SKL_ADSP_SRAM0_BASE + SKL_ADSP_W0_STAT_SZ),
562 SKL_ADSP_W0_UP_SZ, SKL_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ); 562 SKL_ADSP_W0_UP_SZ, SKL_ADSP_SRAM1_BASE, SKL_ADSP_W1_SZ);
563 563
564 sst->fw_ops = skl_fw_ops; 564 ret = skl_ipc_init(dev, skl);
565 if (ret) {
566 skl_dsp_free(sst);
567 return ret;
568 }
565 569
566 skl->cores.count = 2; 570 sst->fw_ops = skl_fw_ops;
567 571
568 return 0; 572 return 0;
569} 573}
diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c
index 68c3f121efc3..22f768ca3c73 100644
--- a/sound/soc/intel/skylake/skl-topology.c
+++ b/sound/soc/intel/skylake/skl-topology.c
@@ -49,6 +49,9 @@ static const int mic_quatro_list[][SKL_CH_QUATRO] = {
49{0, 1, 2, 3}, 49{0, 1, 2, 3},
50}; 50};
51 51
52#define CHECK_HW_PARAMS(ch, freq, bps, prm_ch, prm_freq, prm_bps) \
53 ((ch == prm_ch) && (bps == prm_bps) && (freq == prm_freq))
54
52void skl_tplg_d0i3_get(struct skl *skl, enum d0i3_capability caps) 55void skl_tplg_d0i3_get(struct skl *skl, enum d0i3_capability caps)
53{ 56{
54 struct skl_d0i3_data *d0i3 = &skl->skl_sst->d0i3; 57 struct skl_d0i3_data *d0i3 = &skl->skl_sst->d0i3;
@@ -153,8 +156,10 @@ static bool skl_is_pipe_mcps_avail(struct skl *skl,
153 struct skl_module_cfg *mconfig) 156 struct skl_module_cfg *mconfig)
154{ 157{
155 struct skl_sst *ctx = skl->skl_sst; 158 struct skl_sst *ctx = skl->skl_sst;
159 u8 res_idx = mconfig->res_idx;
160 struct skl_module_res *res = &mconfig->module->resources[res_idx];
156 161
157 if (skl->resource.mcps + mconfig->mcps > skl->resource.max_mcps) { 162 if (skl->resource.mcps + res->cps > skl->resource.max_mcps) {
158 dev_err(ctx->dev, 163 dev_err(ctx->dev,
159 "%s: module_id %d instance %d\n", __func__, 164 "%s: module_id %d instance %d\n", __func__,
160 mconfig->id.module_id, mconfig->id.instance_id); 165 mconfig->id.module_id, mconfig->id.instance_id);
@@ -170,7 +175,10 @@ static bool skl_is_pipe_mcps_avail(struct skl *skl,
170static void skl_tplg_alloc_pipe_mcps(struct skl *skl, 175static void skl_tplg_alloc_pipe_mcps(struct skl *skl,
171 struct skl_module_cfg *mconfig) 176 struct skl_module_cfg *mconfig)
172{ 177{
173 skl->resource.mcps += mconfig->mcps; 178 u8 res_idx = mconfig->res_idx;
179 struct skl_module_res *res = &mconfig->module->resources[res_idx];
180
181 skl->resource.mcps += res->cps;
174} 182}
175 183
176/* 184/*
@@ -179,7 +187,11 @@ static void skl_tplg_alloc_pipe_mcps(struct skl *skl,
179static void 187static void
180skl_tplg_free_pipe_mcps(struct skl *skl, struct skl_module_cfg *mconfig) 188skl_tplg_free_pipe_mcps(struct skl *skl, struct skl_module_cfg *mconfig)
181{ 189{
182 skl->resource.mcps -= mconfig->mcps; 190 u8 res_idx = mconfig->res_idx;
191 struct skl_module_res *res = &mconfig->module->resources[res_idx];
192
193 res = &mconfig->module->resources[res_idx];
194 skl->resource.mcps -= res->cps;
183} 195}
184 196
185/* 197/*
@@ -195,17 +207,21 @@ skl_tplg_free_pipe_mem(struct skl *skl, struct skl_module_cfg *mconfig)
195static void skl_dump_mconfig(struct skl_sst *ctx, 207static void skl_dump_mconfig(struct skl_sst *ctx,
196 struct skl_module_cfg *mcfg) 208 struct skl_module_cfg *mcfg)
197{ 209{
210 struct skl_module_iface *iface = &mcfg->module->formats[0];
211
198 dev_dbg(ctx->dev, "Dumping config\n"); 212 dev_dbg(ctx->dev, "Dumping config\n");
199 dev_dbg(ctx->dev, "Input Format:\n"); 213 dev_dbg(ctx->dev, "Input Format:\n");
200 dev_dbg(ctx->dev, "channels = %d\n", mcfg->in_fmt[0].channels); 214 dev_dbg(ctx->dev, "channels = %d\n", iface->inputs[0].fmt.channels);
201 dev_dbg(ctx->dev, "s_freq = %d\n", mcfg->in_fmt[0].s_freq); 215 dev_dbg(ctx->dev, "s_freq = %d\n", iface->inputs[0].fmt.s_freq);
202 dev_dbg(ctx->dev, "ch_cfg = %d\n", mcfg->in_fmt[0].ch_cfg); 216 dev_dbg(ctx->dev, "ch_cfg = %d\n", iface->inputs[0].fmt.ch_cfg);
203 dev_dbg(ctx->dev, "valid bit depth = %d\n", mcfg->in_fmt[0].valid_bit_depth); 217 dev_dbg(ctx->dev, "valid bit depth = %d\n",
218 iface->inputs[0].fmt.valid_bit_depth);
204 dev_dbg(ctx->dev, "Output Format:\n"); 219 dev_dbg(ctx->dev, "Output Format:\n");
205 dev_dbg(ctx->dev, "channels = %d\n", mcfg->out_fmt[0].channels); 220 dev_dbg(ctx->dev, "channels = %d\n", iface->outputs[0].fmt.channels);
206 dev_dbg(ctx->dev, "s_freq = %d\n", mcfg->out_fmt[0].s_freq); 221 dev_dbg(ctx->dev, "s_freq = %d\n", iface->outputs[0].fmt.s_freq);
207 dev_dbg(ctx->dev, "valid bit depth = %d\n", mcfg->out_fmt[0].valid_bit_depth); 222 dev_dbg(ctx->dev, "valid bit depth = %d\n",
208 dev_dbg(ctx->dev, "ch_cfg = %d\n", mcfg->out_fmt[0].ch_cfg); 223 iface->outputs[0].fmt.valid_bit_depth);
224 dev_dbg(ctx->dev, "ch_cfg = %d\n", iface->outputs[0].fmt.ch_cfg);
209} 225}
210 226
211static void skl_tplg_update_chmap(struct skl_module_fmt *fmt, int chs) 227static void skl_tplg_update_chmap(struct skl_module_fmt *fmt, int chs)
@@ -273,8 +289,8 @@ static void skl_tplg_update_params_fixup(struct skl_module_cfg *m_cfg,
273 struct skl_module_fmt *in_fmt, *out_fmt; 289 struct skl_module_fmt *in_fmt, *out_fmt;
274 290
275 /* Fixups will be applied to pin 0 only */ 291 /* Fixups will be applied to pin 0 only */
276 in_fmt = &m_cfg->in_fmt[0]; 292 in_fmt = &m_cfg->module->formats[0].inputs[0].fmt;
277 out_fmt = &m_cfg->out_fmt[0]; 293 out_fmt = &m_cfg->module->formats[0].outputs[0].fmt;
278 294
279 if (params->stream == SNDRV_PCM_STREAM_PLAYBACK) { 295 if (params->stream == SNDRV_PCM_STREAM_PLAYBACK) {
280 if (is_fe) { 296 if (is_fe) {
@@ -312,21 +328,23 @@ static void skl_tplg_update_buffer_size(struct skl_sst *ctx,
312{ 328{
313 int multiplier = 1; 329 int multiplier = 1;
314 struct skl_module_fmt *in_fmt, *out_fmt; 330 struct skl_module_fmt *in_fmt, *out_fmt;
331 struct skl_module_res *res;
315 332
316 /* Since fixups is applied to pin 0 only, ibs, obs needs 333 /* Since fixups is applied to pin 0 only, ibs, obs needs
317 * change for pin 0 only 334 * change for pin 0 only
318 */ 335 */
319 in_fmt = &mcfg->in_fmt[0]; 336 res = &mcfg->module->resources[0];
320 out_fmt = &mcfg->out_fmt[0]; 337 in_fmt = &mcfg->module->formats[0].inputs[0].fmt;
338 out_fmt = &mcfg->module->formats[0].outputs[0].fmt;
321 339
322 if (mcfg->m_type == SKL_MODULE_TYPE_SRCINT) 340 if (mcfg->m_type == SKL_MODULE_TYPE_SRCINT)
323 multiplier = 5; 341 multiplier = 5;
324 342
325 mcfg->ibs = DIV_ROUND_UP(in_fmt->s_freq, 1000) * 343 res->ibs = DIV_ROUND_UP(in_fmt->s_freq, 1000) *
326 in_fmt->channels * (in_fmt->bit_depth >> 3) * 344 in_fmt->channels * (in_fmt->bit_depth >> 3) *
327 multiplier; 345 multiplier;
328 346
329 mcfg->obs = DIV_ROUND_UP(out_fmt->s_freq, 1000) * 347 res->obs = DIV_ROUND_UP(out_fmt->s_freq, 1000) *
330 out_fmt->channels * (out_fmt->bit_depth >> 3) * 348 out_fmt->channels * (out_fmt->bit_depth >> 3) *
331 multiplier; 349 multiplier;
332} 350}
@@ -365,6 +383,8 @@ static int skl_tplg_update_be_blob(struct snd_soc_dapm_widget *w,
365 struct nhlt_specific_cfg *cfg; 383 struct nhlt_specific_cfg *cfg;
366 struct skl *skl = get_skl_ctx(ctx->dev); 384 struct skl *skl = get_skl_ctx(ctx->dev);
367 u8 dev_type = skl_tplg_be_dev_type(m_cfg->dev_type); 385 u8 dev_type = skl_tplg_be_dev_type(m_cfg->dev_type);
386 int fmt_idx = m_cfg->fmt_idx;
387 struct skl_module_iface *m_iface = &m_cfg->module->formats[fmt_idx];
368 388
369 /* check if we already have blob */ 389 /* check if we already have blob */
370 if (m_cfg->formats_config.caps_size > 0) 390 if (m_cfg->formats_config.caps_size > 0)
@@ -375,23 +395,23 @@ static int skl_tplg_update_be_blob(struct snd_soc_dapm_widget *w,
375 case SKL_DEVICE_DMIC: 395 case SKL_DEVICE_DMIC:
376 link_type = NHLT_LINK_DMIC; 396 link_type = NHLT_LINK_DMIC;
377 dir = SNDRV_PCM_STREAM_CAPTURE; 397 dir = SNDRV_PCM_STREAM_CAPTURE;
378 s_freq = m_cfg->in_fmt[0].s_freq; 398 s_freq = m_iface->inputs[0].fmt.s_freq;
379 s_fmt = m_cfg->in_fmt[0].bit_depth; 399 s_fmt = m_iface->inputs[0].fmt.bit_depth;
380 ch = m_cfg->in_fmt[0].channels; 400 ch = m_iface->inputs[0].fmt.channels;
381 break; 401 break;
382 402
383 case SKL_DEVICE_I2S: 403 case SKL_DEVICE_I2S:
384 link_type = NHLT_LINK_SSP; 404 link_type = NHLT_LINK_SSP;
385 if (m_cfg->hw_conn_type == SKL_CONN_SOURCE) { 405 if (m_cfg->hw_conn_type == SKL_CONN_SOURCE) {
386 dir = SNDRV_PCM_STREAM_PLAYBACK; 406 dir = SNDRV_PCM_STREAM_PLAYBACK;
387 s_freq = m_cfg->out_fmt[0].s_freq; 407 s_freq = m_iface->outputs[0].fmt.s_freq;
388 s_fmt = m_cfg->out_fmt[0].bit_depth; 408 s_fmt = m_iface->outputs[0].fmt.bit_depth;
389 ch = m_cfg->out_fmt[0].channels; 409 ch = m_iface->outputs[0].fmt.channels;
390 } else { 410 } else {
391 dir = SNDRV_PCM_STREAM_CAPTURE; 411 dir = SNDRV_PCM_STREAM_CAPTURE;
392 s_freq = m_cfg->in_fmt[0].s_freq; 412 s_freq = m_iface->inputs[0].fmt.s_freq;
393 s_fmt = m_cfg->in_fmt[0].bit_depth; 413 s_fmt = m_iface->inputs[0].fmt.bit_depth;
394 ch = m_cfg->in_fmt[0].channels; 414 ch = m_iface->inputs[0].fmt.channels;
395 } 415 }
396 break; 416 break;
397 417
@@ -549,6 +569,7 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
549 struct snd_soc_dapm_widget *w; 569 struct snd_soc_dapm_widget *w;
550 struct skl_module_cfg *mconfig; 570 struct skl_module_cfg *mconfig;
551 struct skl_sst *ctx = skl->skl_sst; 571 struct skl_sst *ctx = skl->skl_sst;
572 u8 cfg_idx;
552 int ret = 0; 573 int ret = 0;
553 574
554 list_for_each_entry(w_module, &pipe->w_list, node) { 575 list_for_each_entry(w_module, &pipe->w_list, node) {
@@ -564,11 +585,15 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
564 return -EIO; 585 return -EIO;
565 } 586 }
566 587
588 cfg_idx = mconfig->pipe->cur_config_idx;
589 mconfig->fmt_idx = mconfig->mod_cfg[cfg_idx].fmt_idx;
590 mconfig->res_idx = mconfig->mod_cfg[cfg_idx].res_idx;
591
567 /* check resource available */ 592 /* check resource available */
568 if (!skl_is_pipe_mcps_avail(skl, mconfig)) 593 if (!skl_is_pipe_mcps_avail(skl, mconfig))
569 return -ENOMEM; 594 return -ENOMEM;
570 595
571 if (mconfig->is_loadable && ctx->dsp->fw_ops.load_mod) { 596 if (mconfig->module->loadable && ctx->dsp->fw_ops.load_mod) {
572 ret = ctx->dsp->fw_ops.load_mod(ctx->dsp, 597 ret = ctx->dsp->fw_ops.load_mod(ctx->dsp,
573 mconfig->id.module_id, mconfig->guid); 598 mconfig->id.module_id, mconfig->guid);
574 if (ret < 0) 599 if (ret < 0)
@@ -596,24 +621,35 @@ skl_tplg_init_pipe_modules(struct skl *skl, struct skl_pipe *pipe)
596 if (mconfig->id.pvt_id < 0) 621 if (mconfig->id.pvt_id < 0)
597 return ret; 622 return ret;
598 skl_tplg_set_module_init_data(w); 623 skl_tplg_set_module_init_data(w);
624
625 ret = skl_dsp_get_core(ctx->dsp, mconfig->core_id);
626 if (ret < 0) {
627 dev_err(ctx->dev, "Failed to wake up core %d ret=%d\n",
628 mconfig->core_id, ret);
629 return ret;
630 }
631
599 ret = skl_init_module(ctx, mconfig); 632 ret = skl_init_module(ctx, mconfig);
600 if (ret < 0) { 633 if (ret < 0) {
601 skl_put_pvt_id(ctx, uuid_mod, &mconfig->id.pvt_id); 634 skl_put_pvt_id(ctx, uuid_mod, &mconfig->id.pvt_id);
602 return ret; 635 goto err;
603 } 636 }
604 skl_tplg_alloc_pipe_mcps(skl, mconfig); 637 skl_tplg_alloc_pipe_mcps(skl, mconfig);
605 ret = skl_tplg_set_module_params(w, ctx); 638 ret = skl_tplg_set_module_params(w, ctx);
606 if (ret < 0) 639 if (ret < 0)
607 return ret; 640 goto err;
608 } 641 }
609 642
610 return 0; 643 return 0;
644err:
645 skl_dsp_put_core(ctx->dsp, mconfig->core_id);
646 return ret;
611} 647}
612 648
613static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx, 649static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx,
614 struct skl_pipe *pipe) 650 struct skl_pipe *pipe)
615{ 651{
616 int ret; 652 int ret = 0;
617 struct skl_pipe_module *w_module = NULL; 653 struct skl_pipe_module *w_module = NULL;
618 struct skl_module_cfg *mconfig = NULL; 654 struct skl_module_cfg *mconfig = NULL;
619 655
@@ -622,7 +658,7 @@ static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx,
622 mconfig = w_module->w->priv; 658 mconfig = w_module->w->priv;
623 uuid_mod = (uuid_le *)mconfig->guid; 659 uuid_mod = (uuid_le *)mconfig->guid;
624 660
625 if (mconfig->is_loadable && ctx->dsp->fw_ops.unload_mod && 661 if (mconfig->module->loadable && ctx->dsp->fw_ops.unload_mod &&
626 mconfig->m_state > SKL_MODULE_UNINIT) { 662 mconfig->m_state > SKL_MODULE_UNINIT) {
627 ret = ctx->dsp->fw_ops.unload_mod(ctx->dsp, 663 ret = ctx->dsp->fw_ops.unload_mod(ctx->dsp,
628 mconfig->id.module_id); 664 mconfig->id.module_id);
@@ -630,10 +666,76 @@ static int skl_tplg_unload_pipe_modules(struct skl_sst *ctx,
630 return -EIO; 666 return -EIO;
631 } 667 }
632 skl_put_pvt_id(ctx, uuid_mod, &mconfig->id.pvt_id); 668 skl_put_pvt_id(ctx, uuid_mod, &mconfig->id.pvt_id);
669
670 ret = skl_dsp_put_core(ctx->dsp, mconfig->core_id);
671 if (ret < 0) {
672 /* don't return; continue with other modules */
673 dev_err(ctx->dev, "Failed to sleep core %d ret=%d\n",
674 mconfig->core_id, ret);
675 }
633 } 676 }
634 677
635 /* no modules to unload in this path, so return */ 678 /* no modules to unload in this path, so return */
636 return 0; 679 return ret;
680}
681
682/*
683 * Here, we select pipe format based on the pipe type and pipe
684 * direction to determine the current config index for the pipeline.
685 * The config index is then used to select proper module resources.
686 * Intermediate pipes currently have a fixed format hence we select the
687 * 0th configuratation by default for such pipes.
688 */
689static int
690skl_tplg_get_pipe_config(struct skl *skl, struct skl_module_cfg *mconfig)
691{
692 struct skl_sst *ctx = skl->skl_sst;
693 struct skl_pipe *pipe = mconfig->pipe;
694 struct skl_pipe_params *params = pipe->p_params;
695 struct skl_path_config *pconfig = &pipe->configs[0];
696 struct skl_pipe_fmt *fmt = NULL;
697 bool in_fmt = false;
698 int i;
699
700 if (pipe->nr_cfgs == 0) {
701 pipe->cur_config_idx = 0;
702 return 0;
703 }
704
705 if (pipe->conn_type == SKL_PIPE_CONN_TYPE_NONE) {
706 dev_dbg(ctx->dev, "No conn_type detected, take 0th config\n");
707 pipe->cur_config_idx = 0;
708 pipe->memory_pages = pconfig->mem_pages;
709
710 return 0;
711 }
712
713 if ((pipe->conn_type == SKL_PIPE_CONN_TYPE_FE &&
714 pipe->direction == SNDRV_PCM_STREAM_PLAYBACK) ||
715 (pipe->conn_type == SKL_PIPE_CONN_TYPE_BE &&
716 pipe->direction == SNDRV_PCM_STREAM_CAPTURE))
717 in_fmt = true;
718
719 for (i = 0; i < pipe->nr_cfgs; i++) {
720 pconfig = &pipe->configs[i];
721 if (in_fmt)
722 fmt = &pconfig->in_fmt;
723 else
724 fmt = &pconfig->out_fmt;
725
726 if (CHECK_HW_PARAMS(params->ch, params->s_freq, params->s_fmt,
727 fmt->channels, fmt->freq, fmt->bps)) {
728 pipe->cur_config_idx = i;
729 pipe->memory_pages = pconfig->mem_pages;
730 dev_dbg(ctx->dev, "Using pipe config: %d\n", i);
731
732 return 0;
733 }
734 }
735
736 dev_err(ctx->dev, "Invalid pipe config: %d %d %d for pipe: %d\n",
737 params->ch, params->s_freq, params->s_fmt, pipe->ppl_id);
738 return -EINVAL;
637} 739}
638 740
639/* 741/*
@@ -655,6 +757,10 @@ static int skl_tplg_mixer_dapm_pre_pmu_event(struct snd_soc_dapm_widget *w,
655 struct skl_sst *ctx = skl->skl_sst; 757 struct skl_sst *ctx = skl->skl_sst;
656 struct skl_module_deferred_bind *modules; 758 struct skl_module_deferred_bind *modules;
657 759
760 ret = skl_tplg_get_pipe_config(skl, mconfig);
761 if (ret < 0)
762 return ret;
763
658 /* check resource available */ 764 /* check resource available */
659 if (!skl_is_pipe_mcps_avail(skl, mconfig)) 765 if (!skl_is_pipe_mcps_avail(skl, mconfig))
660 return -EBUSY; 766 return -EBUSY;
@@ -758,12 +864,12 @@ static int skl_tplg_set_module_bind_params(struct snd_soc_dapm_widget *w,
758 * check all out/in pins are in bind state. 864 * check all out/in pins are in bind state.
759 * if so set the module param 865 * if so set the module param
760 */ 866 */
761 for (i = 0; i < mcfg->max_out_queue; i++) { 867 for (i = 0; i < mcfg->module->max_output_pins; i++) {
762 if (mcfg->m_out_pin[i].pin_state != SKL_PIN_BIND_DONE) 868 if (mcfg->m_out_pin[i].pin_state != SKL_PIN_BIND_DONE)
763 return 0; 869 return 0;
764 } 870 }
765 871
766 for (i = 0; i < mcfg->max_in_queue; i++) { 872 for (i = 0; i < mcfg->module->max_input_pins; i++) {
767 if (mcfg->m_in_pin[i].pin_state != SKL_PIN_BIND_DONE) 873 if (mcfg->m_in_pin[i].pin_state != SKL_PIN_BIND_DONE)
768 return 0; 874 return 0;
769 } 875 }
@@ -814,7 +920,7 @@ static int skl_tplg_module_add_deferred_bind(struct skl *skl,
814 int i; 920 int i;
815 921
816 /* only supported for module with static pin connection */ 922 /* only supported for module with static pin connection */
817 for (i = 0; i < dst->max_in_queue; i++) { 923 for (i = 0; i < dst->module->max_input_pins; i++) {
818 struct skl_module_pin *pin = &dst->m_in_pin[i]; 924 struct skl_module_pin *pin = &dst->m_in_pin[i];
819 925
820 if (pin->is_dynamic) 926 if (pin->is_dynamic)
@@ -925,7 +1031,7 @@ static int skl_tplg_bind_sinks(struct snd_soc_dapm_widget *w,
925 } 1031 }
926 } 1032 }
927 1033
928 if (!sink) 1034 if (!sink && next_sink)
929 return skl_tplg_bind_sinks(next_sink, skl, src_w, src_mconfig); 1035 return skl_tplg_bind_sinks(next_sink, skl, src_w, src_mconfig);
930 1036
931 return 0; 1037 return 0;
@@ -1074,7 +1180,7 @@ static int skl_tplg_mixer_dapm_pre_pmd_event(struct snd_soc_dapm_widget *w,
1074 if (ret) 1180 if (ret)
1075 return ret; 1181 return ret;
1076 1182
1077 for (i = 0; i < sink_mconfig->max_in_queue; i++) { 1183 for (i = 0; i < sink_mconfig->module->max_input_pins; i++) {
1078 if (sink_mconfig->m_in_pin[i].pin_state == SKL_PIN_BIND_DONE) { 1184 if (sink_mconfig->m_in_pin[i].pin_state == SKL_PIN_BIND_DONE) {
1079 src_mconfig = sink_mconfig->m_in_pin[i].tgt_mcfg; 1185 src_mconfig = sink_mconfig->m_in_pin[i].tgt_mcfg;
1080 if (!src_mconfig) 1186 if (!src_mconfig)
@@ -1185,7 +1291,7 @@ static int skl_tplg_pga_dapm_post_pmd_event(struct snd_soc_dapm_widget *w,
1185 if (ret) 1291 if (ret)
1186 return ret; 1292 return ret;
1187 1293
1188 for (i = 0; i < src_mconfig->max_out_queue; i++) { 1294 for (i = 0; i < src_mconfig->module->max_output_pins; i++) {
1189 if (src_mconfig->m_out_pin[i].pin_state == SKL_PIN_BIND_DONE) { 1295 if (src_mconfig->m_out_pin[i].pin_state == SKL_PIN_BIND_DONE) {
1190 sink_mconfig = src_mconfig->m_out_pin[i].tgt_mcfg; 1296 sink_mconfig = src_mconfig->m_out_pin[i].tgt_mcfg;
1191 if (!sink_mconfig) 1297 if (!sink_mconfig)
@@ -1479,14 +1585,22 @@ int skl_tplg_update_pipe_params(struct device *dev,
1479 struct skl_module_cfg *mconfig, 1585 struct skl_module_cfg *mconfig,
1480 struct skl_pipe_params *params) 1586 struct skl_pipe_params *params)
1481{ 1587{
1588 struct skl_module_res *res = &mconfig->module->resources[0];
1589 struct skl *skl = get_skl_ctx(dev);
1482 struct skl_module_fmt *format = NULL; 1590 struct skl_module_fmt *format = NULL;
1591 u8 cfg_idx = mconfig->pipe->cur_config_idx;
1483 1592
1484 skl_tplg_fill_dma_id(mconfig, params); 1593 skl_tplg_fill_dma_id(mconfig, params);
1594 mconfig->fmt_idx = mconfig->mod_cfg[cfg_idx].fmt_idx;
1595 mconfig->res_idx = mconfig->mod_cfg[cfg_idx].res_idx;
1596
1597 if (skl->nr_modules)
1598 return 0;
1485 1599
1486 if (params->stream == SNDRV_PCM_STREAM_PLAYBACK) 1600 if (params->stream == SNDRV_PCM_STREAM_PLAYBACK)
1487 format = &mconfig->in_fmt[0]; 1601 format = &mconfig->module->formats[0].inputs[0].fmt;
1488 else 1602 else
1489 format = &mconfig->out_fmt[0]; 1603 format = &mconfig->module->formats[0].outputs[0].fmt;
1490 1604
1491 /* set the hw_params */ 1605 /* set the hw_params */
1492 format->s_freq = params->s_freq; 1606 format->s_freq = params->s_freq;
@@ -1514,11 +1628,11 @@ int skl_tplg_update_pipe_params(struct device *dev,
1514 } 1628 }
1515 1629
1516 if (params->stream == SNDRV_PCM_STREAM_PLAYBACK) { 1630 if (params->stream == SNDRV_PCM_STREAM_PLAYBACK) {
1517 mconfig->ibs = (format->s_freq / 1000) * 1631 res->ibs = (format->s_freq / 1000) *
1518 (format->channels) * 1632 (format->channels) *
1519 (format->bit_depth >> 3); 1633 (format->bit_depth >> 3);
1520 } else { 1634 } else {
1521 mconfig->obs = (format->s_freq / 1000) * 1635 res->obs = (format->s_freq / 1000) *
1522 (format->channels) * 1636 (format->channels) *
1523 (format->bit_depth >> 3); 1637 (format->bit_depth >> 3);
1524 } 1638 }
@@ -1792,6 +1906,54 @@ static const struct snd_soc_tplg_kcontrol_ops skl_tplg_kcontrol_ops[] = {
1792 }, 1906 },
1793}; 1907};
1794 1908
1909static int skl_tplg_fill_pipe_cfg(struct device *dev,
1910 struct skl_pipe *pipe, u32 tkn,
1911 u32 tkn_val, int conf_idx, int dir)
1912{
1913 struct skl_pipe_fmt *fmt;
1914 struct skl_path_config *config;
1915
1916 switch (dir) {
1917 case SKL_DIR_IN:
1918 fmt = &pipe->configs[conf_idx].in_fmt;
1919 break;
1920
1921 case SKL_DIR_OUT:
1922 fmt = &pipe->configs[conf_idx].out_fmt;
1923 break;
1924
1925 default:
1926 dev_err(dev, "Invalid direction: %d\n", dir);
1927 return -EINVAL;
1928 }
1929
1930 config = &pipe->configs[conf_idx];
1931
1932 switch (tkn) {
1933 case SKL_TKN_U32_CFG_FREQ:
1934 fmt->freq = tkn_val;
1935 break;
1936
1937 case SKL_TKN_U8_CFG_CHAN:
1938 fmt->channels = tkn_val;
1939 break;
1940
1941 case SKL_TKN_U8_CFG_BPS:
1942 fmt->bps = tkn_val;
1943 break;
1944
1945 case SKL_TKN_U32_PATH_MEM_PGS:
1946 config->mem_pages = tkn_val;
1947 break;
1948
1949 default:
1950 dev_err(dev, "Invalid token config: %d\n", tkn);
1951 return -EINVAL;
1952 }
1953
1954 return 0;
1955}
1956
1795static int skl_tplg_fill_pipe_tkn(struct device *dev, 1957static int skl_tplg_fill_pipe_tkn(struct device *dev,
1796 struct skl_pipe *pipe, u32 tkn, 1958 struct skl_pipe *pipe, u32 tkn,
1797 u32 tkn_val) 1959 u32 tkn_val)
@@ -1814,6 +1976,14 @@ static int skl_tplg_fill_pipe_tkn(struct device *dev,
1814 pipe->lp_mode = tkn_val; 1976 pipe->lp_mode = tkn_val;
1815 break; 1977 break;
1816 1978
1979 case SKL_TKN_U32_PIPE_DIRECTION:
1980 pipe->direction = tkn_val;
1981 break;
1982
1983 case SKL_TKN_U32_NUM_CONFIGS:
1984 pipe->nr_cfgs = tkn_val;
1985 break;
1986
1817 default: 1987 default:
1818 dev_err(dev, "Token not handled %d\n", tkn); 1988 dev_err(dev, "Token not handled %d\n", tkn);
1819 return -EINVAL; 1989 return -EINVAL;
@@ -1930,27 +2100,9 @@ static int skl_tplg_fill_pins_info(struct device *dev,
1930 * on the direction 2100 * on the direction
1931 */ 2101 */
1932static int skl_tplg_fill_fmt(struct device *dev, 2102static int skl_tplg_fill_fmt(struct device *dev,
1933 struct skl_module_cfg *mconfig, u32 tkn, 2103 struct skl_module_fmt *dst_fmt,
1934 u32 value, u32 dir, u32 pin_count) 2104 u32 tkn, u32 value)
1935{ 2105{
1936 struct skl_module_fmt *dst_fmt;
1937
1938 switch (dir) {
1939 case SKL_DIR_IN:
1940 dst_fmt = mconfig->in_fmt;
1941 dst_fmt += pin_count;
1942 break;
1943
1944 case SKL_DIR_OUT:
1945 dst_fmt = mconfig->out_fmt;
1946 dst_fmt += pin_count;
1947 break;
1948
1949 default:
1950 dev_err(dev, "Invalid direction value\n");
1951 return -EINVAL;
1952 }
1953
1954 switch (tkn) { 2106 switch (tkn) {
1955 case SKL_TKN_U32_FMT_CH: 2107 case SKL_TKN_U32_FMT_CH:
1956 dst_fmt->channels = value; 2108 dst_fmt->channels = value;
@@ -1992,6 +2144,32 @@ static int skl_tplg_fill_fmt(struct device *dev,
1992 return 0; 2144 return 0;
1993} 2145}
1994 2146
2147static int skl_tplg_widget_fill_fmt(struct device *dev,
2148 struct skl_module_iface *fmt,
2149 u32 tkn, u32 val, u32 dir, int fmt_idx)
2150{
2151 struct skl_module_fmt *dst_fmt;
2152
2153 if (!fmt)
2154 return -EINVAL;
2155
2156 switch (dir) {
2157 case SKL_DIR_IN:
2158 dst_fmt = &fmt->inputs[fmt_idx].fmt;
2159 break;
2160
2161 case SKL_DIR_OUT:
2162 dst_fmt = &fmt->outputs[fmt_idx].fmt;
2163 break;
2164
2165 default:
2166 dev_err(dev, "Invalid direction: %d\n", dir);
2167 return -EINVAL;
2168 }
2169
2170 return skl_tplg_fill_fmt(dev, dst_fmt, tkn, val);
2171}
2172
1995static int skl_tplg_get_uuid(struct device *dev, struct skl_module_cfg *mconfig, 2173static int skl_tplg_get_uuid(struct device *dev, struct skl_module_cfg *mconfig,
1996 struct snd_soc_tplg_vendor_uuid_elem *uuid_tkn) 2174 struct snd_soc_tplg_vendor_uuid_elem *uuid_tkn)
1997{ 2175{
@@ -2015,6 +2193,108 @@ static void skl_tplg_fill_pin_dynamic_val(
2015} 2193}
2016 2194
2017/* 2195/*
2196 * Resource table in the manifest has pin specific resources
2197 * like pin and pin buffer size
2198 */
2199static int skl_tplg_manifest_pin_res_tkn(struct device *dev,
2200 struct snd_soc_tplg_vendor_value_elem *tkn_elem,
2201 struct skl_module_res *res, int pin_idx, int dir)
2202{
2203 struct skl_module_pin_resources *m_pin;
2204
2205 switch (dir) {
2206 case SKL_DIR_IN:
2207 m_pin = &res->input[pin_idx];
2208 break;
2209
2210 case SKL_DIR_OUT:
2211 m_pin = &res->output[pin_idx];
2212 break;
2213
2214 default:
2215 dev_err(dev, "Invalid pin direction: %d\n", dir);
2216 return -EINVAL;
2217 }
2218
2219 switch (tkn_elem->token) {
2220 case SKL_TKN_MM_U32_RES_PIN_ID:
2221 m_pin->pin_index = tkn_elem->value;
2222 break;
2223
2224 case SKL_TKN_MM_U32_PIN_BUF:
2225 m_pin->buf_size = tkn_elem->value;
2226 break;
2227
2228 default:
2229 dev_err(dev, "Invalid token: %d\n", tkn_elem->token);
2230 return -EINVAL;
2231 }
2232
2233 return 0;
2234}
2235
2236/*
2237 * Fill module specific resources from the manifest's resource
2238 * table like CPS, DMA size, mem_pages.
2239 */
2240static int skl_tplg_fill_res_tkn(struct device *dev,
2241 struct snd_soc_tplg_vendor_value_elem *tkn_elem,
2242 struct skl_module_res *res,
2243 int pin_idx, int dir)
2244{
2245 int ret, tkn_count = 0;
2246
2247 if (!res)
2248 return -EINVAL;
2249
2250 switch (tkn_elem->token) {
2251 case SKL_TKN_MM_U32_CPS:
2252 res->cps = tkn_elem->value;
2253 break;
2254
2255 case SKL_TKN_MM_U32_DMA_SIZE:
2256 res->dma_buffer_size = tkn_elem->value;
2257 break;
2258
2259 case SKL_TKN_MM_U32_CPC:
2260 res->cpc = tkn_elem->value;
2261 break;
2262
2263 case SKL_TKN_U32_MEM_PAGES:
2264 res->is_pages = tkn_elem->value;
2265 break;
2266
2267 case SKL_TKN_U32_OBS:
2268 res->obs = tkn_elem->value;
2269 break;
2270
2271 case SKL_TKN_U32_IBS:
2272 res->ibs = tkn_elem->value;
2273 break;
2274
2275 case SKL_TKN_U32_MAX_MCPS:
2276 res->cps = tkn_elem->value;
2277 break;
2278
2279 case SKL_TKN_MM_U32_RES_PIN_ID:
2280 case SKL_TKN_MM_U32_PIN_BUF:
2281 ret = skl_tplg_manifest_pin_res_tkn(dev, tkn_elem, res,
2282 pin_idx, dir);
2283 if (ret < 0)
2284 return ret;
2285 break;
2286
2287 default:
2288 dev_err(dev, "Not a res type token: %d", tkn_elem->token);
2289 return -EINVAL;
2290
2291 }
2292 tkn_count++;
2293
2294 return tkn_count;
2295}
2296
2297/*
2018 * Parse tokens to fill up the module private data 2298 * Parse tokens to fill up the module private data
2019 */ 2299 */
2020static int skl_tplg_get_token(struct device *dev, 2300static int skl_tplg_get_token(struct device *dev,
@@ -2024,49 +2304,54 @@ static int skl_tplg_get_token(struct device *dev,
2024 int tkn_count = 0; 2304 int tkn_count = 0;
2025 int ret; 2305 int ret;
2026 static int is_pipe_exists; 2306 static int is_pipe_exists;
2027 static int pin_index, dir; 2307 static int pin_index, dir, conf_idx;
2308 struct skl_module_iface *iface = NULL;
2309 struct skl_module_res *res = NULL;
2310 int res_idx = mconfig->res_idx;
2311 int fmt_idx = mconfig->fmt_idx;
2312
2313 /*
2314 * If the manifest structure contains no modules, fill all
2315 * the module data to 0th index.
2316 * res_idx and fmt_idx are default set to 0.
2317 */
2318 if (skl->nr_modules == 0) {
2319 res = &mconfig->module->resources[res_idx];
2320 iface = &mconfig->module->formats[fmt_idx];
2321 }
2028 2322
2029 if (tkn_elem->token > SKL_TKN_MAX) 2323 if (tkn_elem->token > SKL_TKN_MAX)
2030 return -EINVAL; 2324 return -EINVAL;
2031 2325
2032 switch (tkn_elem->token) { 2326 switch (tkn_elem->token) {
2033 case SKL_TKN_U8_IN_QUEUE_COUNT: 2327 case SKL_TKN_U8_IN_QUEUE_COUNT:
2034 mconfig->max_in_queue = tkn_elem->value; 2328 mconfig->module->max_input_pins = tkn_elem->value;
2035 mconfig->m_in_pin = devm_kzalloc(dev, mconfig->max_in_queue *
2036 sizeof(*mconfig->m_in_pin),
2037 GFP_KERNEL);
2038 if (!mconfig->m_in_pin)
2039 return -ENOMEM;
2040
2041 break; 2329 break;
2042 2330
2043 case SKL_TKN_U8_OUT_QUEUE_COUNT: 2331 case SKL_TKN_U8_OUT_QUEUE_COUNT:
2044 mconfig->max_out_queue = tkn_elem->value; 2332 mconfig->module->max_output_pins = tkn_elem->value;
2045 mconfig->m_out_pin = devm_kzalloc(dev, mconfig->max_out_queue *
2046 sizeof(*mconfig->m_out_pin),
2047 GFP_KERNEL);
2048
2049 if (!mconfig->m_out_pin)
2050 return -ENOMEM;
2051
2052 break; 2333 break;
2053 2334
2054 case SKL_TKN_U8_DYN_IN_PIN: 2335 case SKL_TKN_U8_DYN_IN_PIN:
2055 if (!mconfig->m_in_pin) 2336 if (!mconfig->m_in_pin)
2337 mconfig->m_in_pin = devm_kzalloc(dev, MAX_IN_QUEUE *
2338 sizeof(*mconfig->m_in_pin), GFP_KERNEL);
2339 if (!mconfig->m_in_pin)
2056 return -ENOMEM; 2340 return -ENOMEM;
2057 2341
2058 skl_tplg_fill_pin_dynamic_val(mconfig->m_in_pin, 2342 skl_tplg_fill_pin_dynamic_val(mconfig->m_in_pin, MAX_IN_QUEUE,
2059 mconfig->max_in_queue, tkn_elem->value); 2343 tkn_elem->value);
2060
2061 break; 2344 break;
2062 2345
2063 case SKL_TKN_U8_DYN_OUT_PIN: 2346 case SKL_TKN_U8_DYN_OUT_PIN:
2064 if (!mconfig->m_out_pin) 2347 if (!mconfig->m_out_pin)
2348 mconfig->m_out_pin = devm_kzalloc(dev, MAX_IN_QUEUE *
2349 sizeof(*mconfig->m_in_pin), GFP_KERNEL);
2350 if (!mconfig->m_out_pin)
2065 return -ENOMEM; 2351 return -ENOMEM;
2066 2352
2067 skl_tplg_fill_pin_dynamic_val(mconfig->m_out_pin, 2353 skl_tplg_fill_pin_dynamic_val(mconfig->m_out_pin, MAX_OUT_QUEUE,
2068 mconfig->max_out_queue, tkn_elem->value); 2354 tkn_elem->value);
2069
2070 break; 2355 break;
2071 2356
2072 case SKL_TKN_U8_TIME_SLOT: 2357 case SKL_TKN_U8_TIME_SLOT:
@@ -2094,19 +2379,13 @@ static int skl_tplg_get_token(struct device *dev,
2094 break; 2379 break;
2095 2380
2096 case SKL_TKN_U32_MEM_PAGES: 2381 case SKL_TKN_U32_MEM_PAGES:
2097 mconfig->mem_pages = tkn_elem->value;
2098 break;
2099
2100 case SKL_TKN_U32_MAX_MCPS: 2382 case SKL_TKN_U32_MAX_MCPS:
2101 mconfig->mcps = tkn_elem->value;
2102 break;
2103
2104 case SKL_TKN_U32_OBS: 2383 case SKL_TKN_U32_OBS:
2105 mconfig->obs = tkn_elem->value;
2106 break;
2107
2108 case SKL_TKN_U32_IBS: 2384 case SKL_TKN_U32_IBS:
2109 mconfig->ibs = tkn_elem->value; 2385 ret = skl_tplg_fill_res_tkn(dev, tkn_elem, res, dir, pin_index);
2386 if (ret < 0)
2387 return ret;
2388
2110 break; 2389 break;
2111 2390
2112 case SKL_TKN_U32_VBUS_ID: 2391 case SKL_TKN_U32_VBUS_ID:
@@ -2139,10 +2418,16 @@ static int skl_tplg_get_token(struct device *dev,
2139 2418
2140 break; 2419 break;
2141 2420
2421 case SKL_TKN_U32_PIPE_CONFIG_ID:
2422 conf_idx = tkn_elem->value;
2423 break;
2424
2142 case SKL_TKN_U32_PIPE_CONN_TYPE: 2425 case SKL_TKN_U32_PIPE_CONN_TYPE:
2143 case SKL_TKN_U32_PIPE_PRIORITY: 2426 case SKL_TKN_U32_PIPE_PRIORITY:
2144 case SKL_TKN_U32_PIPE_MEM_PGS: 2427 case SKL_TKN_U32_PIPE_MEM_PGS:
2145 case SKL_TKN_U32_PMODE: 2428 case SKL_TKN_U32_PMODE:
2429 case SKL_TKN_U32_PIPE_DIRECTION:
2430 case SKL_TKN_U32_NUM_CONFIGS:
2146 if (is_pipe_exists) { 2431 if (is_pipe_exists) {
2147 ret = skl_tplg_fill_pipe_tkn(dev, mconfig->pipe, 2432 ret = skl_tplg_fill_pipe_tkn(dev, mconfig->pipe,
2148 tkn_elem->token, tkn_elem->value); 2433 tkn_elem->token, tkn_elem->value);
@@ -2152,6 +2437,27 @@ static int skl_tplg_get_token(struct device *dev,
2152 2437
2153 break; 2438 break;
2154 2439
2440 case SKL_TKN_U32_PATH_MEM_PGS:
2441 case SKL_TKN_U32_CFG_FREQ:
2442 case SKL_TKN_U8_CFG_CHAN:
2443 case SKL_TKN_U8_CFG_BPS:
2444 if (mconfig->pipe->nr_cfgs) {
2445 ret = skl_tplg_fill_pipe_cfg(dev, mconfig->pipe,
2446 tkn_elem->token, tkn_elem->value,
2447 conf_idx, dir);
2448 if (ret < 0)
2449 return ret;
2450 }
2451 break;
2452
2453 case SKL_TKN_CFG_MOD_RES_ID:
2454 mconfig->mod_cfg[conf_idx].res_idx = tkn_elem->value;
2455 break;
2456
2457 case SKL_TKN_CFG_MOD_FMT_ID:
2458 mconfig->mod_cfg[conf_idx].fmt_idx = tkn_elem->value;
2459 break;
2460
2155 /* 2461 /*
2156 * SKL_TKN_U32_DIR_PIN_COUNT token has the value for both 2462 * SKL_TKN_U32_DIR_PIN_COUNT token has the value for both
2157 * direction and the pin count. The first four bits represent 2463 * direction and the pin count. The first four bits represent
@@ -2172,7 +2478,7 @@ static int skl_tplg_get_token(struct device *dev,
2172 case SKL_TKN_U32_FMT_INTERLEAVE: 2478 case SKL_TKN_U32_FMT_INTERLEAVE:
2173 case SKL_TKN_U32_FMT_SAMPLE_TYPE: 2479 case SKL_TKN_U32_FMT_SAMPLE_TYPE:
2174 case SKL_TKN_U32_FMT_CH_MAP: 2480 case SKL_TKN_U32_FMT_CH_MAP:
2175 ret = skl_tplg_fill_fmt(dev, mconfig, tkn_elem->token, 2481 ret = skl_tplg_widget_fill_fmt(dev, iface, tkn_elem->token,
2176 tkn_elem->value, dir, pin_index); 2482 tkn_elem->value, dir, pin_index);
2177 2483
2178 if (ret < 0) 2484 if (ret < 0)
@@ -2397,11 +2703,11 @@ static void skl_clear_pin_config(struct snd_soc_platform *platform,
2397 strlen(platform->component.name))) { 2703 strlen(platform->component.name))) {
2398 mconfig = w->priv; 2704 mconfig = w->priv;
2399 pipe = mconfig->pipe; 2705 pipe = mconfig->pipe;
2400 for (i = 0; i < mconfig->max_in_queue; i++) { 2706 for (i = 0; i < mconfig->module->max_input_pins; i++) {
2401 mconfig->m_in_pin[i].in_use = false; 2707 mconfig->m_in_pin[i].in_use = false;
2402 mconfig->m_in_pin[i].pin_state = SKL_PIN_UNBIND; 2708 mconfig->m_in_pin[i].pin_state = SKL_PIN_UNBIND;
2403 } 2709 }
2404 for (i = 0; i < mconfig->max_out_queue; i++) { 2710 for (i = 0; i < mconfig->module->max_output_pins; i++) {
2405 mconfig->m_out_pin[i].in_use = false; 2711 mconfig->m_out_pin[i].in_use = false;
2406 mconfig->m_out_pin[i].pin_state = SKL_PIN_UNBIND; 2712 mconfig->m_out_pin[i].pin_state = SKL_PIN_UNBIND;
2407 } 2713 }
@@ -2460,6 +2766,13 @@ static int skl_tplg_widget_load(struct snd_soc_component *cmpnt,
2460 if (!mconfig) 2766 if (!mconfig)
2461 return -ENOMEM; 2767 return -ENOMEM;
2462 2768
2769 if (skl->nr_modules == 0) {
2770 mconfig->module = devm_kzalloc(bus->dev,
2771 sizeof(*mconfig->module), GFP_KERNEL);
2772 if (!mconfig->module)
2773 return -ENOMEM;
2774 }
2775
2463 w->priv = mconfig; 2776 w->priv = mconfig;
2464 2777
2465 /* 2778 /*
@@ -2602,13 +2915,13 @@ static int skl_tplg_fill_str_mfest_tkn(struct device *dev,
2602 str_elem->string, 2915 str_elem->string,
2603 ARRAY_SIZE(skl->skl_sst->lib_info[ref_count].name)); 2916 ARRAY_SIZE(skl->skl_sst->lib_info[ref_count].name));
2604 ref_count++; 2917 ref_count++;
2605 tkn_count++;
2606 break; 2918 break;
2607 2919
2608 default: 2920 default:
2609 dev_err(dev, "Not a string token %d\n", str_elem->token); 2921 dev_err(dev, "Not a string token %d\n", str_elem->token);
2610 break; 2922 break;
2611 } 2923 }
2924 tkn_count++;
2612 2925
2613 return tkn_count; 2926 return tkn_count;
2614} 2927}
@@ -2634,26 +2947,236 @@ static int skl_tplg_get_str_tkn(struct device *dev,
2634 return tkn_count; 2947 return tkn_count;
2635} 2948}
2636 2949
2950static int skl_tplg_manifest_fill_fmt(struct device *dev,
2951 struct skl_module_iface *fmt,
2952 struct snd_soc_tplg_vendor_value_elem *tkn_elem,
2953 u32 dir, int fmt_idx)
2954{
2955 struct skl_module_pin_fmt *dst_fmt;
2956 struct skl_module_fmt *mod_fmt;
2957 int ret;
2958
2959 if (!fmt)
2960 return -EINVAL;
2961
2962 switch (dir) {
2963 case SKL_DIR_IN:
2964 dst_fmt = &fmt->inputs[fmt_idx];
2965 break;
2966
2967 case SKL_DIR_OUT:
2968 dst_fmt = &fmt->outputs[fmt_idx];
2969 break;
2970
2971 default:
2972 dev_err(dev, "Invalid direction: %d\n", dir);
2973 return -EINVAL;
2974 }
2975
2976 mod_fmt = &dst_fmt->fmt;
2977
2978 switch (tkn_elem->token) {
2979 case SKL_TKN_MM_U32_INTF_PIN_ID:
2980 dst_fmt->id = tkn_elem->value;
2981 break;
2982
2983 default:
2984 ret = skl_tplg_fill_fmt(dev, mod_fmt, tkn_elem->token,
2985 tkn_elem->value);
2986 if (ret < 0)
2987 return ret;
2988 break;
2989 }
2990
2991 return 0;
2992}
2993
2994static int skl_tplg_fill_mod_info(struct device *dev,
2995 struct snd_soc_tplg_vendor_value_elem *tkn_elem,
2996 struct skl_module *mod)
2997{
2998
2999 if (!mod)
3000 return -EINVAL;
3001
3002 switch (tkn_elem->token) {
3003 case SKL_TKN_U8_IN_PIN_TYPE:
3004 mod->input_pin_type = tkn_elem->value;
3005 break;
3006
3007 case SKL_TKN_U8_OUT_PIN_TYPE:
3008 mod->output_pin_type = tkn_elem->value;
3009 break;
3010
3011 case SKL_TKN_U8_IN_QUEUE_COUNT:
3012 mod->max_input_pins = tkn_elem->value;
3013 break;
3014
3015 case SKL_TKN_U8_OUT_QUEUE_COUNT:
3016 mod->max_output_pins = tkn_elem->value;
3017 break;
3018
3019 case SKL_TKN_MM_U8_NUM_RES:
3020 mod->nr_resources = tkn_elem->value;
3021 break;
3022
3023 case SKL_TKN_MM_U8_NUM_INTF:
3024 mod->nr_interfaces = tkn_elem->value;
3025 break;
3026
3027 default:
3028 dev_err(dev, "Invalid mod info token %d", tkn_elem->token);
3029 return -EINVAL;
3030 }
3031
3032 return 0;
3033}
3034
3035
2637static int skl_tplg_get_int_tkn(struct device *dev, 3036static int skl_tplg_get_int_tkn(struct device *dev,
2638 struct snd_soc_tplg_vendor_value_elem *tkn_elem, 3037 struct snd_soc_tplg_vendor_value_elem *tkn_elem,
2639 struct skl *skl) 3038 struct skl *skl)
2640{ 3039{
2641 int tkn_count = 0; 3040 int tkn_count = 0, ret;
3041 static int mod_idx, res_val_idx, intf_val_idx, dir, pin_idx;
3042 struct skl_module_res *res = NULL;
3043 struct skl_module_iface *fmt = NULL;
3044 struct skl_module *mod = NULL;
3045 int i;
3046
3047 if (skl->modules) {
3048 mod = skl->modules[mod_idx];
3049 res = &mod->resources[res_val_idx];
3050 fmt = &mod->formats[intf_val_idx];
3051 }
2642 3052
2643 switch (tkn_elem->token) { 3053 switch (tkn_elem->token) {
2644 case SKL_TKN_U32_LIB_COUNT: 3054 case SKL_TKN_U32_LIB_COUNT:
2645 skl->skl_sst->lib_count = tkn_elem->value; 3055 skl->skl_sst->lib_count = tkn_elem->value;
2646 tkn_count++; 3056 break;
3057
3058 case SKL_TKN_U8_NUM_MOD:
3059 skl->nr_modules = tkn_elem->value;
3060 skl->modules = devm_kcalloc(dev, skl->nr_modules,
3061 sizeof(*skl->modules), GFP_KERNEL);
3062 if (!skl->modules)
3063 return -ENOMEM;
3064
3065 for (i = 0; i < skl->nr_modules; i++) {
3066 skl->modules[i] = devm_kzalloc(dev,
3067 sizeof(struct skl_module), GFP_KERNEL);
3068 if (!skl->modules[i])
3069 return -ENOMEM;
3070 }
3071 break;
3072
3073 case SKL_TKN_MM_U8_MOD_IDX:
3074 mod_idx = tkn_elem->value;
3075 break;
3076
3077 case SKL_TKN_U8_IN_PIN_TYPE:
3078 case SKL_TKN_U8_OUT_PIN_TYPE:
3079 case SKL_TKN_U8_IN_QUEUE_COUNT:
3080 case SKL_TKN_U8_OUT_QUEUE_COUNT:
3081 case SKL_TKN_MM_U8_NUM_RES:
3082 case SKL_TKN_MM_U8_NUM_INTF:
3083 ret = skl_tplg_fill_mod_info(dev, tkn_elem, mod);
3084 if (ret < 0)
3085 return ret;
3086 break;
3087
3088 case SKL_TKN_U32_DIR_PIN_COUNT:
3089 dir = tkn_elem->value & SKL_IN_DIR_BIT_MASK;
3090 pin_idx = (tkn_elem->value & SKL_PIN_COUNT_MASK) >> 4;
3091 break;
3092
3093 case SKL_TKN_MM_U32_RES_ID:
3094 if (!res)
3095 return -EINVAL;
3096
3097 res->id = tkn_elem->value;
3098 res_val_idx = tkn_elem->value;
3099 break;
3100
3101 case SKL_TKN_MM_U32_FMT_ID:
3102 if (!fmt)
3103 return -EINVAL;
3104
3105 fmt->fmt_idx = tkn_elem->value;
3106 intf_val_idx = tkn_elem->value;
3107 break;
3108
3109 case SKL_TKN_MM_U32_CPS:
3110 case SKL_TKN_MM_U32_DMA_SIZE:
3111 case SKL_TKN_MM_U32_CPC:
3112 case SKL_TKN_U32_MEM_PAGES:
3113 case SKL_TKN_U32_OBS:
3114 case SKL_TKN_U32_IBS:
3115 case SKL_TKN_MM_U32_RES_PIN_ID:
3116 case SKL_TKN_MM_U32_PIN_BUF:
3117 ret = skl_tplg_fill_res_tkn(dev, tkn_elem, res, pin_idx, dir);
3118 if (ret < 0)
3119 return ret;
3120
3121 break;
3122
3123 case SKL_TKN_MM_U32_NUM_IN_FMT:
3124 if (!fmt)
3125 return -EINVAL;
3126
3127 res->nr_input_pins = tkn_elem->value;
3128 break;
3129
3130 case SKL_TKN_MM_U32_NUM_OUT_FMT:
3131 if (!fmt)
3132 return -EINVAL;
3133
3134 res->nr_output_pins = tkn_elem->value;
3135 break;
3136
3137 case SKL_TKN_U32_FMT_CH:
3138 case SKL_TKN_U32_FMT_FREQ:
3139 case SKL_TKN_U32_FMT_BIT_DEPTH:
3140 case SKL_TKN_U32_FMT_SAMPLE_SIZE:
3141 case SKL_TKN_U32_FMT_CH_CONFIG:
3142 case SKL_TKN_U32_FMT_INTERLEAVE:
3143 case SKL_TKN_U32_FMT_SAMPLE_TYPE:
3144 case SKL_TKN_U32_FMT_CH_MAP:
3145 case SKL_TKN_MM_U32_INTF_PIN_ID:
3146 ret = skl_tplg_manifest_fill_fmt(dev, fmt, tkn_elem,
3147 dir, pin_idx);
3148 if (ret < 0)
3149 return ret;
2647 break; 3150 break;
2648 3151
2649 default: 3152 default:
2650 dev_err(dev, "Not a manifest token %d\n", tkn_elem->token); 3153 dev_err(dev, "Not a manifest token %d\n", tkn_elem->token);
2651 return -EINVAL; 3154 return -EINVAL;
2652 } 3155 }
3156 tkn_count++;
2653 3157
2654 return tkn_count; 3158 return tkn_count;
2655} 3159}
2656 3160
3161static int skl_tplg_get_manifest_uuid(struct device *dev,
3162 struct skl *skl,
3163 struct snd_soc_tplg_vendor_uuid_elem *uuid_tkn)
3164{
3165 static int ref_count;
3166 struct skl_module *mod;
3167
3168 if (uuid_tkn->token == SKL_TKN_UUID) {
3169 mod = skl->modules[ref_count];
3170 memcpy(&mod->uuid, &uuid_tkn->uuid, sizeof(uuid_tkn->uuid));
3171 ref_count++;
3172 } else {
3173 dev_err(dev, "Not an UUID token tkn %d\n", uuid_tkn->token);
3174 return -EINVAL;
3175 }
3176
3177 return 0;
3178}
3179
2657/* 3180/*
2658 * Fill the manifest structure by parsing the tokens based on the 3181 * Fill the manifest structure by parsing the tokens based on the
2659 * type. 3182 * type.
@@ -2686,7 +3209,11 @@ static int skl_tplg_get_manifest_tkn(struct device *dev,
2686 continue; 3209 continue;
2687 3210
2688 case SND_SOC_TPLG_TUPLE_TYPE_UUID: 3211 case SND_SOC_TPLG_TUPLE_TYPE_UUID:
2689 dev_warn(dev, "no uuid tokens for skl tplf manifest\n"); 3212 ret = skl_tplg_get_manifest_uuid(dev, skl, array->uuid);
3213 if (ret < 0)
3214 return ret;
3215
3216 tuple_size += sizeof(*array->uuid);
2690 continue; 3217 continue;
2691 3218
2692 default: 3219 default:
@@ -2703,14 +3230,12 @@ static int skl_tplg_get_manifest_tkn(struct device *dev,
2703 3230
2704 tkn_count = tkn_count + ret; 3231 tkn_count = tkn_count + ret;
2705 tkn_elem++; 3232 tkn_elem++;
2706 tuple_size += tkn_count *
2707 sizeof(struct snd_soc_tplg_vendor_value_elem);
2708 break;
2709 } 3233 }
3234 tuple_size += (tkn_count * sizeof(*tkn_elem));
2710 tkn_count = 0; 3235 tkn_count = 0;
2711 } 3236 }
2712 3237
2713 return 0; 3238 return off;
2714} 3239}
2715 3240
2716/* 3241/*
@@ -2733,11 +3258,10 @@ static int skl_tplg_get_manifest_data(struct snd_soc_tplg_manifest *manifest,
2733 num_blocks = ret; 3258 num_blocks = ret;
2734 3259
2735 off += array->size; 3260 off += array->size;
2736 array = (struct snd_soc_tplg_vendor_array *)
2737 (manifest->priv.data + off);
2738
2739 /* Read the BLOCK_TYPE and BLOCK_SIZE descriptor */ 3261 /* Read the BLOCK_TYPE and BLOCK_SIZE descriptor */
2740 while (num_blocks > 0) { 3262 while (num_blocks > 0) {
3263 array = (struct snd_soc_tplg_vendor_array *)
3264 (manifest->priv.data + off);
2741 ret = skl_tplg_get_desc_blocks(dev, array); 3265 ret = skl_tplg_get_desc_blocks(dev, array);
2742 3266
2743 if (ret < 0) 3267 if (ret < 0)
@@ -2771,6 +3295,7 @@ static int skl_tplg_get_manifest_data(struct snd_soc_tplg_manifest *manifest,
2771 } else { 3295 } else {
2772 return -EINVAL; 3296 return -EINVAL;
2773 } 3297 }
3298 off += ret;
2774 } 3299 }
2775 3300
2776 return 0; 3301 return 0;
diff --git a/sound/soc/intel/skylake/skl-topology.h b/sound/soc/intel/skylake/skl-topology.h
index c25e8868b84e..2717db92036b 100644
--- a/sound/soc/intel/skylake/skl-topology.h
+++ b/sound/soc/intel/skylake/skl-topology.h
@@ -44,6 +44,13 @@
44#define SKL_DEFAULT_MIC_SEL_GAIN 0x3FF 44#define SKL_DEFAULT_MIC_SEL_GAIN 0x3FF
45#define SKL_MIC_SEL_SWITCH 0x3 45#define SKL_MIC_SEL_SWITCH 0x3
46 46
47#define SKL_OUTPUT_PIN 0
48#define SKL_INPUT_PIN 1
49#define SKL_MAX_PATH_CONFIGS 8
50#define SKL_MAX_MODULES_IN_PIPE 8
51#define SKL_MAX_MODULE_FORMATS 32
52#define SKL_MAX_MODULE_RESOURCES 32
53
47enum skl_channel_index { 54enum skl_channel_index {
48 SKL_CHANNEL_LEFT = 0, 55 SKL_CHANNEL_LEFT = 0,
49 SKL_CHANNEL_RIGHT = 1, 56 SKL_CHANNEL_RIGHT = 1,
@@ -131,6 +138,11 @@ struct skl_cpr_cfg {
131 struct skl_cpr_gtw_cfg gtw_cfg; 138 struct skl_cpr_gtw_cfg gtw_cfg;
132} __packed; 139} __packed;
133 140
141struct skl_cpr_pin_fmt {
142 u32 sink_id;
143 struct skl_audio_data_format src_fmt;
144 struct skl_audio_data_format dst_fmt;
145} __packed;
134 146
135struct skl_src_module_cfg { 147struct skl_src_module_cfg {
136 struct skl_base_cfg base_cfg; 148 struct skl_base_cfg base_cfg;
@@ -214,6 +226,7 @@ struct skl_kpb_params {
214}; 226};
215 227
216struct skl_module_inst_id { 228struct skl_module_inst_id {
229 uuid_le mod_uuid;
217 int module_id; 230 int module_id;
218 u32 instance_id; 231 u32 instance_id;
219 int pvt_id; 232 int pvt_id;
@@ -266,6 +279,23 @@ struct skl_pipe_params {
266 unsigned int link_bps; 279 unsigned int link_bps;
267}; 280};
268 281
282struct skl_pipe_fmt {
283 u32 freq;
284 u8 channels;
285 u8 bps;
286};
287
288struct skl_pipe_mcfg {
289 u8 res_idx;
290 u8 fmt_idx;
291};
292
293struct skl_path_config {
294 u8 mem_pages;
295 struct skl_pipe_fmt in_fmt;
296 struct skl_pipe_fmt out_fmt;
297};
298
269struct skl_pipe { 299struct skl_pipe {
270 u8 ppl_id; 300 u8 ppl_id;
271 u8 pipe_priority; 301 u8 pipe_priority;
@@ -274,6 +304,10 @@ struct skl_pipe {
274 u8 lp_mode; 304 u8 lp_mode;
275 struct skl_pipe_params *p_params; 305 struct skl_pipe_params *p_params;
276 enum skl_pipe_state state; 306 enum skl_pipe_state state;
307 u8 direction;
308 u8 cur_config_idx;
309 u8 nr_cfgs;
310 struct skl_path_config configs[SKL_MAX_PATH_CONFIGS];
277 struct list_head w_list; 311 struct list_head w_list;
278 bool passthru; 312 bool passthru;
279}; 313};
@@ -292,9 +326,57 @@ enum d0i3_capability {
292 SKL_D0I3_NON_STREAMING = 2, 326 SKL_D0I3_NON_STREAMING = 2,
293}; 327};
294 328
329struct skl_module_pin_fmt {
330 u8 id;
331 struct skl_module_fmt fmt;
332};
333
334struct skl_module_iface {
335 u8 fmt_idx;
336 u8 nr_in_fmt;
337 u8 nr_out_fmt;
338 struct skl_module_pin_fmt inputs[MAX_IN_QUEUE];
339 struct skl_module_pin_fmt outputs[MAX_OUT_QUEUE];
340};
341
342struct skl_module_pin_resources {
343 u8 pin_index;
344 u32 buf_size;
345};
346
347struct skl_module_res {
348 u8 id;
349 u32 is_pages;
350 u32 cps;
351 u32 ibs;
352 u32 obs;
353 u32 dma_buffer_size;
354 u32 cpc;
355 u8 nr_input_pins;
356 u8 nr_output_pins;
357 struct skl_module_pin_resources input[MAX_IN_QUEUE];
358 struct skl_module_pin_resources output[MAX_OUT_QUEUE];
359};
360
361struct skl_module {
362 uuid_le uuid;
363 u8 loadable;
364 u8 input_pin_type;
365 u8 output_pin_type;
366 u8 max_input_pins;
367 u8 max_output_pins;
368 u8 nr_resources;
369 u8 nr_interfaces;
370 struct skl_module_res resources[SKL_MAX_MODULE_RESOURCES];
371 struct skl_module_iface formats[SKL_MAX_MODULE_FORMATS];
372};
373
295struct skl_module_cfg { 374struct skl_module_cfg {
296 u8 guid[16]; 375 u8 guid[16];
297 struct skl_module_inst_id id; 376 struct skl_module_inst_id id;
377 struct skl_module *module;
378 int res_idx;
379 int fmt_idx;
298 u8 domain; 380 u8 domain;
299 bool homogenous_inputs; 381 bool homogenous_inputs;
300 bool homogenous_outputs; 382 bool homogenous_outputs;
@@ -329,6 +411,7 @@ struct skl_module_cfg {
329 enum skl_module_state m_state; 411 enum skl_module_state m_state;
330 struct skl_pipe *pipe; 412 struct skl_pipe *pipe;
331 struct skl_specific_cfg formats_config; 413 struct skl_specific_cfg formats_config;
414 struct skl_pipe_mcfg mod_cfg[SKL_MAX_MODULES_IN_PIPE];
332}; 415};
333 416
334struct skl_algo_data { 417struct skl_algo_data {
diff --git a/sound/soc/intel/skylake/skl.c b/sound/soc/intel/skylake/skl.c
index 9e3f8c04dd32..f94b484abb99 100644
--- a/sound/soc/intel/skylake/skl.c
+++ b/sound/soc/intel/skylake/skl.c
@@ -415,7 +415,7 @@ static int skl_free(struct hdac_ext_bus *ebus)
415 snd_hdac_ext_stop_streams(ebus); 415 snd_hdac_ext_stop_streams(ebus);
416 416
417 if (bus->irq >= 0) 417 if (bus->irq >= 0)
418 free_irq(bus->irq, (void *)bus); 418 free_irq(bus->irq, (void *)ebus);
419 snd_hdac_bus_free_stream_pages(bus); 419 snd_hdac_bus_free_stream_pages(bus);
420 snd_hdac_stream_free_all(ebus); 420 snd_hdac_stream_free_all(ebus);
421 snd_hdac_link_free_all(ebus); 421 snd_hdac_link_free_all(ebus);
@@ -528,7 +528,7 @@ static int probe_codec(struct hdac_ext_bus *ebus, int addr)
528} 528}
529 529
530/* Codec initialization */ 530/* Codec initialization */
531static int skl_codec_create(struct hdac_ext_bus *ebus) 531static void skl_codec_create(struct hdac_ext_bus *ebus)
532{ 532{
533 struct hdac_bus *bus = ebus_to_hbus(ebus); 533 struct hdac_bus *bus = ebus_to_hbus(ebus);
534 int c, max_slots; 534 int c, max_slots;
@@ -559,8 +559,6 @@ static int skl_codec_create(struct hdac_ext_bus *ebus)
559 } 559 }
560 } 560 }
561 } 561 }
562
563 return 0;
564} 562}
565 563
566static const struct hdac_bus_ops bus_core_ops = { 564static const struct hdac_bus_ops bus_core_ops = {
@@ -612,9 +610,7 @@ static void skl_probe_work(struct work_struct *work)
612 dev_info(bus->dev, "no hda codecs found!\n"); 610 dev_info(bus->dev, "no hda codecs found!\n");
613 611
614 /* create codec instances */ 612 /* create codec instances */
615 err = skl_codec_create(ebus); 613 skl_codec_create(ebus);
616 if (err < 0)
617 goto out_err;
618 614
619 if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) { 615 if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) {
620 err = snd_hdac_display_power(bus, false); 616 err = snd_hdac_display_power(bus, false);
@@ -702,6 +698,8 @@ static int skl_first_init(struct hdac_ext_bus *ebus)
702 return -ENXIO; 698 return -ENXIO;
703 } 699 }
704 700
701 skl_init_chip(bus, true);
702
705 snd_hdac_bus_parse_capabilities(bus); 703 snd_hdac_bus_parse_capabilities(bus);
706 704
707 if (skl_acquire_irq(ebus, 0) < 0) 705 if (skl_acquire_irq(ebus, 0) < 0)
@@ -879,12 +877,12 @@ static void skl_remove(struct pci_dev *pci)
879 877
880static struct sst_codecs skl_codecs = { 878static struct sst_codecs skl_codecs = {
881 .num_codecs = 1, 879 .num_codecs = 1,
882 .codecs = {"NAU88L25"} 880 .codecs = {"10508825"}
883}; 881};
884 882
885static struct sst_codecs kbl_codecs = { 883static struct sst_codecs kbl_codecs = {
886 .num_codecs = 1, 884 .num_codecs = 1,
887 .codecs = {"NAU88L25"} 885 .codecs = {"10508825"}
888}; 886};
889 887
890static struct sst_codecs bxt_codecs = { 888static struct sst_codecs bxt_codecs = {
@@ -982,6 +980,11 @@ static struct sst_acpi_mach sst_kbl_devdata[] = {
982 .quirk_data = &kbl_poppy_codecs, 980 .quirk_data = &kbl_poppy_codecs,
983 .pdata = &skl_dmic_data 981 .pdata = &skl_dmic_data
984 }, 982 },
983 {
984 .id = "10EC5663",
985 .drv_name = "kbl_rt5663",
986 .fw_filename = "intel/dsp_fw_kbl.bin",
987 },
985 988
986 {} 989 {}
987}; 990};
@@ -995,6 +998,14 @@ static struct sst_acpi_mach sst_glk_devdata[] = {
995 {} 998 {}
996}; 999};
997 1000
1001static const struct sst_acpi_mach sst_cnl_devdata[] = {
1002 {
1003 .id = "INT34C2",
1004 .drv_name = "cnl_rt274",
1005 .fw_filename = "intel/dsp_fw_cnl.bin",
1006 },
1007};
1008
998/* PCI IDs */ 1009/* PCI IDs */
999static const struct pci_device_id skl_ids[] = { 1010static const struct pci_device_id skl_ids[] = {
1000 /* Sunrise Point-LP */ 1011 /* Sunrise Point-LP */
@@ -1009,6 +1020,9 @@ static const struct pci_device_id skl_ids[] = {
1009 /* GLK */ 1020 /* GLK */
1010 { PCI_DEVICE(0x8086, 0x3198), 1021 { PCI_DEVICE(0x8086, 0x3198),
1011 .driver_data = (unsigned long)&sst_glk_devdata}, 1022 .driver_data = (unsigned long)&sst_glk_devdata},
1023 /* CNL */
1024 { PCI_DEVICE(0x8086, 0x9dc8),
1025 .driver_data = (unsigned long)&sst_cnl_devdata},
1012 { 0, } 1026 { 0, }
1013}; 1027};
1014MODULE_DEVICE_TABLE(pci, skl_ids); 1028MODULE_DEVICE_TABLE(pci, skl_ids);
diff --git a/sound/soc/intel/skylake/skl.h b/sound/soc/intel/skylake/skl.h
index a6b134b4c037..8d9d6899f761 100644
--- a/sound/soc/intel/skylake/skl.h
+++ b/sound/soc/intel/skylake/skl.h
@@ -71,6 +71,8 @@ struct skl {
71 struct work_struct probe_work; 71 struct work_struct probe_work;
72 72
73 struct skl_debug *debugfs; 73 struct skl_debug *debugfs;
74 u8 nr_modules;
75 struct skl_module **modules;
74}; 76};
75 77
76#define skl_to_ebus(s) (&(s)->ebus) 78#define skl_to_ebus(s) (&(s)->ebus)
@@ -90,6 +92,7 @@ struct skl_machine_pdata {
90 92
91struct skl_dsp_ops { 93struct skl_dsp_ops {
92 int id; 94 int id;
95 unsigned int num_cores;
93 struct skl_dsp_loader_ops (*loader_ops)(void); 96 struct skl_dsp_loader_ops (*loader_ops)(void);
94 int (*init)(struct device *dev, void __iomem *mmio_base, 97 int (*init)(struct device *dev, void __iomem *mmio_base,
95 int irq, const char *fw_name, 98 int irq, const char *fw_name,
diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index 794a3499e567..99394c036998 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -133,6 +133,7 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream,
133{ 133{
134 struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); 134 struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai);
135 uint32_t conf, ctrl; 135 uint32_t conf, ctrl;
136 int ret;
136 137
137 if (dai->active) 138 if (dai->active)
138 return 0; 139 return 0;
@@ -141,7 +142,9 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream,
141 ctrl |= JZ_AIC_CTRL_FLUSH; 142 ctrl |= JZ_AIC_CTRL_FLUSH;
142 jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl); 143 jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl);
143 144
144 clk_prepare_enable(i2s->clk_i2s); 145 ret = clk_prepare_enable(i2s->clk_i2s);
146 if (ret)
147 return ret;
145 148
146 conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); 149 conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF);
147 conf |= JZ_AIC_CONF_ENABLE; 150 conf |= JZ_AIC_CONF_ENABLE;
@@ -352,11 +355,18 @@ static int jz4740_i2s_resume(struct snd_soc_dai *dai)
352{ 355{
353 struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); 356 struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai);
354 uint32_t conf; 357 uint32_t conf;
358 int ret;
355 359
356 clk_prepare_enable(i2s->clk_aic); 360 ret = clk_prepare_enable(i2s->clk_aic);
361 if (ret)
362 return ret;
357 363
358 if (dai->active) { 364 if (dai->active) {
359 clk_prepare_enable(i2s->clk_i2s); 365 ret = clk_prepare_enable(i2s->clk_i2s);
366 if (ret) {
367 clk_disable_unprepare(i2s->clk_aic);
368 return ret;
369 }
360 370
361 conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF); 371 conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF);
362 conf |= JZ_AIC_CONF_ENABLE; 372 conf |= JZ_AIC_CONF_ENABLE;
@@ -387,8 +397,11 @@ static int jz4740_i2s_dai_probe(struct snd_soc_dai *dai)
387{ 397{
388 struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); 398 struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai);
389 uint32_t conf; 399 uint32_t conf;
400 int ret;
390 401
391 clk_prepare_enable(i2s->clk_aic); 402 ret = clk_prepare_enable(i2s->clk_aic);
403 if (ret)
404 return ret;
392 405
393 jz4740_i2c_init_pcm_config(i2s); 406 jz4740_i2c_init_pcm_config(i2s);
394 snd_soc_dai_init_dma_data(dai, &i2s->playback_dma_data, 407 snd_soc_dai_init_dma_data(dai, &i2s->playback_dma_data,
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c
index dafd22e874e9..cf23af159acf 100644
--- a/sound/soc/kirkwood/kirkwood-dma.c
+++ b/sound/soc/kirkwood/kirkwood-dma.c
@@ -27,7 +27,7 @@ static struct kirkwood_dma_data *kirkwood_priv(struct snd_pcm_substream *subs)
27 return snd_soc_dai_get_drvdata(soc_runtime->cpu_dai); 27 return snd_soc_dai_get_drvdata(soc_runtime->cpu_dai);
28} 28}
29 29
30static struct snd_pcm_hardware kirkwood_dma_snd_hw = { 30static const struct snd_pcm_hardware kirkwood_dma_snd_hw = {
31 .info = SNDRV_PCM_INFO_INTERLEAVED | 31 .info = SNDRV_PCM_INFO_INTERLEAVED |
32 SNDRV_PCM_INFO_MMAP | 32 SNDRV_PCM_INFO_MMAP |
33 SNDRV_PCM_INFO_MMAP_VALID | 33 SNDRV_PCM_INFO_MMAP_VALID |
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 3a36d60e1785..105a73cc5158 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -538,10 +538,9 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
538 int err; 538 int err;
539 539
540 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 540 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
541 if (!priv) { 541 if (!priv)
542 dev_err(&pdev->dev, "allocation failed\n");
543 return -ENOMEM; 542 return -ENOMEM;
544 } 543
545 dev_set_drvdata(&pdev->dev, priv); 544 dev_set_drvdata(&pdev->dev, priv);
546 545
547 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 546 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -550,9 +549,9 @@ static int kirkwood_i2s_dev_probe(struct platform_device *pdev)
550 return PTR_ERR(priv->io); 549 return PTR_ERR(priv->io);
551 550
552 priv->irq = platform_get_irq(pdev, 0); 551 priv->irq = platform_get_irq(pdev, 0);
553 if (priv->irq <= 0) { 552 if (priv->irq < 0) {
554 dev_err(&pdev->dev, "platform_get_irq failed\n"); 553 dev_err(&pdev->dev, "platform_get_irq failed: %d\n", priv->irq);
555 return -ENXIO; 554 return priv->irq;
556 } 555 }
557 556
558 if (np) { 557 if (np) {
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
index b815ecc6bbf6..affa7fb25dd9 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.c
@@ -75,7 +75,7 @@ int mt2701_init_clock(struct mtk_base_afe *afe)
75 75
76 for (i = 0; i < MT2701_CLOCK_NUM; i++) { 76 for (i = 0; i < MT2701_CLOCK_NUM; i++) {
77 afe_priv->clocks[i] = devm_clk_get(afe->dev, aud_clks[i]); 77 afe_priv->clocks[i] = devm_clk_get(afe->dev, aud_clks[i]);
78 if (IS_ERR(aud_clks[i])) { 78 if (IS_ERR(afe_priv->clocks[i])) {
79 dev_warn(afe->dev, "%s devm_clk_get %s fail\n", 79 dev_warn(afe->dev, "%s devm_clk_get %s fail\n",
80 __func__, aud_clks[i]); 80 __func__, aud_clks[i]);
81 return PTR_ERR(aud_clks[i]); 81 return PTR_ERR(aud_clks[i]);
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
index bc5d4db94de6..8fda182f849b 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -595,7 +595,7 @@ static const struct snd_soc_dai_ops mt2701_afe_i2s_ops = {
595}; 595};
596 596
597/* MRG BE DAIs */ 597/* MRG BE DAIs */
598static struct snd_soc_dai_ops mt2701_btmrg_ops = { 598static const struct snd_soc_dai_ops mt2701_btmrg_ops = {
599 .startup = mt2701_btmrg_startup, 599 .startup = mt2701_btmrg_startup,
600 .shutdown = mt2701_btmrg_shutdown, 600 .shutdown = mt2701_btmrg_shutdown,
601 .hw_params = mt2701_btmrg_hw_params, 601 .hw_params = mt2701_btmrg_hw_params,
@@ -1496,14 +1496,12 @@ static int mt2701_afe_runtime_resume(struct device *dev)
1496 1496
1497static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) 1497static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
1498{ 1498{
1499 int ret, i;
1500 unsigned int irq_id;
1501 struct mtk_base_afe *afe; 1499 struct mtk_base_afe *afe;
1502 struct mt2701_afe_private *afe_priv; 1500 struct mt2701_afe_private *afe_priv;
1503 struct resource *res; 1501 struct resource *res;
1504 struct device *dev; 1502 struct device *dev;
1503 int i, irq_id, ret;
1505 1504
1506 ret = 0;
1507 afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL); 1505 afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
1508 if (!afe) 1506 if (!afe)
1509 return -ENOMEM; 1507 return -ENOMEM;
@@ -1516,11 +1514,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
1516 afe->dev = &pdev->dev; 1514 afe->dev = &pdev->dev;
1517 dev = afe->dev; 1515 dev = afe->dev;
1518 1516
1519 irq_id = platform_get_irq(pdev, 0); 1517 irq_id = platform_get_irq_byname(pdev, "asys");
1520 if (!irq_id) { 1518 if (irq_id < 0) {
1521 dev_err(dev, "%s no irq found\n", dev->of_node->name); 1519 dev_err(dev, "unable to get ASYS IRQ\n");
1522 return -ENXIO; 1520 return irq_id;
1523 } 1521 }
1522
1524 ret = devm_request_irq(dev, irq_id, mt2701_asys_isr, 1523 ret = devm_request_irq(dev, irq_id, mt2701_asys_isr,
1525 IRQF_TRIGGER_NONE, "asys-isr", (void *)afe); 1524 IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
1526 if (ret) { 1525 if (ret) {
diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
index 5e383eb456a4..99c15219dbc8 100644
--- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
+++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5514.c
@@ -222,7 +222,6 @@ static int mt8173_rt5650_rt5514_dev_probe(struct platform_device *pdev)
222 mt8173_rt5650_rt5514_codecs[1].of_node; 222 mt8173_rt5650_rt5514_codecs[1].of_node;
223 223
224 card->dev = &pdev->dev; 224 card->dev = &pdev->dev;
225 platform_set_drvdata(pdev, card);
226 225
227 ret = devm_snd_soc_register_card(&pdev->dev, card); 226 ret = devm_snd_soc_register_card(&pdev->dev, card);
228 if (ret) 227 if (ret)
diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
index fed1f15a39c2..42de84ca8c84 100644
--- a/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
+++ b/sound/soc/mediatek/mt8173/mt8173-rt5650-rt5676.c
@@ -279,7 +279,6 @@ static int mt8173_rt5650_rt5676_dev_probe(struct platform_device *pdev)
279 } 279 }
280 280
281 card->dev = &pdev->dev; 281 card->dev = &pdev->dev;
282 platform_set_drvdata(pdev, card);
283 282
284 ret = devm_snd_soc_register_card(&pdev->dev, card); 283 ret = devm_snd_soc_register_card(&pdev->dev, card);
285 if (ret) 284 if (ret)
diff --git a/sound/soc/mediatek/mt8173/mt8173-rt5650.c b/sound/soc/mediatek/mt8173/mt8173-rt5650.c
index a78470839b65..e69c141d8ed4 100644
--- a/sound/soc/mediatek/mt8173/mt8173-rt5650.c
+++ b/sound/soc/mediatek/mt8173/mt8173-rt5650.c
@@ -311,7 +311,6 @@ static int mt8173_rt5650_dev_probe(struct platform_device *pdev)
311 return -EINVAL; 311 return -EINVAL;
312 } 312 }
313 card->dev = &pdev->dev; 313 card->dev = &pdev->dev;
314 platform_set_drvdata(pdev, card);
315 314
316 ret = devm_snd_soc_register_card(&pdev->dev, card); 315 ret = devm_snd_soc_register_card(&pdev->dev, card);
317 if (ret) 316 if (ret)
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index b42f301c6b96..156aa7c00787 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -125,7 +125,9 @@ static int mxs_saif_set_clk(struct mxs_saif *saif,
125 * 125 *
126 * If MCLK is not used, we just set saif clk to 512*fs. 126 * If MCLK is not used, we just set saif clk to 512*fs.
127 */ 127 */
128 clk_prepare_enable(master_saif->clk); 128 ret = clk_prepare_enable(master_saif->clk);
129 if (ret)
130 return ret;
129 131
130 if (master_saif->mclk_in_use) { 132 if (master_saif->mclk_in_use) {
131 switch (mclk / rate) { 133 switch (mclk / rate) {
@@ -388,6 +390,7 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream,
388 struct snd_soc_dai *cpu_dai) 390 struct snd_soc_dai *cpu_dai)
389{ 391{
390 struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai); 392 struct mxs_saif *saif = snd_soc_dai_get_drvdata(cpu_dai);
393 int ret;
391 394
392 /* clear error status to 0 for each re-open */ 395 /* clear error status to 0 for each re-open */
393 saif->fifo_underrun = 0; 396 saif->fifo_underrun = 0;
@@ -401,7 +404,9 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream,
401 __raw_writel(BM_SAIF_CTRL_CLKGATE, 404 __raw_writel(BM_SAIF_CTRL_CLKGATE,
402 saif->base + SAIF_CTRL + MXS_CLR_ADDR); 405 saif->base + SAIF_CTRL + MXS_CLR_ADDR);
403 406
404 clk_prepare(saif->clk); 407 ret = clk_prepare(saif->clk);
408 if (ret)
409 return ret;
405 410
406 return 0; 411 return 0;
407} 412}
@@ -468,7 +473,9 @@ static int mxs_saif_hw_params(struct snd_pcm_substream *substream,
468 if (ret) 473 if (ret)
469 return ret; 474 return ret;
470 475
471 clk_prepare(master_saif->clk); 476 ret = clk_prepare(master_saif->clk);
477 if (ret)
478 return ret;
472 } 479 }
473 480
474 scr = __raw_readl(saif->base + SAIF_CTRL); 481 scr = __raw_readl(saif->base + SAIF_CTRL);
diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c
index a96276e77332..2ed3240cc682 100644
--- a/sound/soc/mxs/mxs-sgtl5000.c
+++ b/sound/soc/mxs/mxs-sgtl5000.c
@@ -140,7 +140,6 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev)
140 } 140 }
141 141
142 card->dev = &pdev->dev; 142 card->dev = &pdev->dev;
143 platform_set_drvdata(pdev, card);
144 143
145 ret = devm_snd_soc_register_card(&pdev->dev, card); 144 ret = devm_snd_soc_register_card(&pdev->dev, card);
146 if (ret) { 145 if (ret) {
diff --git a/sound/soc/nuc900/nuc900-pcm.c b/sound/soc/nuc900/nuc900-pcm.c
index 2cca055fd806..bd6dfa218d59 100644
--- a/sound/soc/nuc900/nuc900-pcm.c
+++ b/sound/soc/nuc900/nuc900-pcm.c
@@ -271,7 +271,7 @@ static int nuc900_dma_mmap(struct snd_pcm_substream *substream,
271 runtime->dma_addr, runtime->dma_bytes); 271 runtime->dma_addr, runtime->dma_bytes);
272} 272}
273 273
274static struct snd_pcm_ops nuc900_dma_ops = { 274static const struct snd_pcm_ops nuc900_dma_ops = {
275 .open = nuc900_dma_open, 275 .open = nuc900_dma_open,
276 .close = nuc900_dma_close, 276 .close = nuc900_dma_close,
277 .ioctl = snd_pcm_lib_ioctl, 277 .ioctl = snd_pcm_lib_ioctl,
@@ -299,7 +299,7 @@ static int nuc900_dma_new(struct snd_soc_pcm_runtime *rtd)
299 return 0; 299 return 0;
300} 300}
301 301
302static struct snd_soc_platform_driver nuc900_soc_platform = { 302static const struct snd_soc_platform_driver nuc900_soc_platform = {
303 .ops = &nuc900_dma_ops, 303 .ops = &nuc900_dma_ops,
304 .pcm_new = nuc900_dma_new, 304 .pcm_new = nuc900_dma_new,
305}; 305};
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c
index 16cc95fa4573..6c49f3d6fd96 100644
--- a/sound/soc/omap/ams-delta.c
+++ b/sound/soc/omap/ams-delta.c
@@ -513,15 +513,6 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
513 return 0; 513 return 0;
514} 514}
515 515
516static int ams_delta_card_remove(struct snd_soc_card *card)
517{
518 snd_soc_jack_free_gpios(&ams_delta_hook_switch,
519 ARRAY_SIZE(ams_delta_hook_switch_gpios),
520 ams_delta_hook_switch_gpios);
521
522 return 0;
523}
524
525/* DAI glue - connects codec <--> CPU */ 516/* DAI glue - connects codec <--> CPU */
526static struct snd_soc_dai_link ams_delta_dai_link = { 517static struct snd_soc_dai_link ams_delta_dai_link = {
527 .name = "CX20442", 518 .name = "CX20442",
@@ -540,7 +531,6 @@ static struct snd_soc_dai_link ams_delta_dai_link = {
540static struct snd_soc_card ams_delta_audio_card = { 531static struct snd_soc_card ams_delta_audio_card = {
541 .name = "AMS_DELTA", 532 .name = "AMS_DELTA",
542 .owner = THIS_MODULE, 533 .owner = THIS_MODULE,
543 .remove = ams_delta_card_remove,
544 .dai_link = &ams_delta_dai_link, 534 .dai_link = &ams_delta_dai_link,
545 .num_links = 1, 535 .num_links = 1,
546 536
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c
index 94e9ff791f3a..aca2c43d0f03 100644
--- a/sound/soc/omap/omap-pcm.c
+++ b/sound/soc/omap/omap-pcm.c
@@ -162,7 +162,7 @@ static int omap_pcm_mmap(struct snd_pcm_substream *substream,
162 runtime->dma_addr, runtime->dma_bytes); 162 runtime->dma_addr, runtime->dma_bytes);
163} 163}
164 164
165static struct snd_pcm_ops omap_pcm_ops = { 165static const struct snd_pcm_ops omap_pcm_ops = {
166 .open = omap_pcm_open, 166 .open = omap_pcm_open,
167 .close = snd_dmaengine_pcm_close_release_chan, 167 .close = snd_dmaengine_pcm_close_release_chan,
168 .ioctl = snd_pcm_lib_ioctl, 168 .ioctl = snd_pcm_lib_ioctl,
@@ -243,7 +243,7 @@ out:
243 return ret; 243 return ret;
244} 244}
245 245
246static struct snd_soc_platform_driver omap_soc_platform = { 246static const struct snd_soc_platform_driver omap_soc_platform = {
247 .ops = &omap_pcm_ops, 247 .ops = &omap_pcm_ops,
248 .pcm_new = omap_pcm_new, 248 .pcm_new = omap_pcm_new,
249 .pcm_free = omap_pcm_free_dma_buffers, 249 .pcm_free = omap_pcm_free_dma_buffers,
diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c
index a24b0dedabb9..cccc316743fa 100644
--- a/sound/soc/omap/omap-twl4030.c
+++ b/sound/soc/omap/omap-twl4030.c
@@ -208,18 +208,6 @@ static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd)
208 return ret; 208 return ret;
209} 209}
210 210
211static int omap_twl4030_card_remove(struct snd_soc_card *card)
212{
213 struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card);
214
215 if (priv->jack_detect > 0)
216 snd_soc_jack_free_gpios(&priv->hs_jack,
217 ARRAY_SIZE(hs_jack_gpios),
218 hs_jack_gpios);
219
220 return 0;
221}
222
223/* Digital audio interface glue - connects codec <--> CPU */ 211/* Digital audio interface glue - connects codec <--> CPU */
224static struct snd_soc_dai_link omap_twl4030_dai_links[] = { 212static struct snd_soc_dai_link omap_twl4030_dai_links[] = {
225 { 213 {
@@ -247,7 +235,6 @@ static struct snd_soc_dai_link omap_twl4030_dai_links[] = {
247/* Audio machine driver */ 235/* Audio machine driver */
248static struct snd_soc_card omap_twl4030_card = { 236static struct snd_soc_card omap_twl4030_card = {
249 .owner = THIS_MODULE, 237 .owner = THIS_MODULE,
250 .remove = omap_twl4030_card_remove,
251 .dai_link = omap_twl4030_dai_links, 238 .dai_link = omap_twl4030_dai_links,
252 .num_links = ARRAY_SIZE(omap_twl4030_dai_links), 239 .num_links = ARRAY_SIZE(omap_twl4030_dai_links),
253 240
diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c
index 3aeb65feaea1..57448bd5ad77 100644
--- a/sound/soc/omap/rx51.c
+++ b/sound/soc/omap/rx51.c
@@ -311,14 +311,6 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd)
311 return err; 311 return err;
312} 312}
313 313
314static int rx51_card_remove(struct snd_soc_card *card)
315{
316 snd_soc_jack_free_gpios(&rx51_av_jack, ARRAY_SIZE(rx51_av_jack_gpios),
317 rx51_av_jack_gpios);
318
319 return 0;
320}
321
322/* Digital audio interface glue - connects codec <--> CPU */ 314/* Digital audio interface glue - connects codec <--> CPU */
323static struct snd_soc_dai_link rx51_dai[] = { 315static struct snd_soc_dai_link rx51_dai[] = {
324 { 316 {
@@ -361,7 +353,6 @@ static struct snd_soc_codec_conf rx51_codec_conf[] = {
361static struct snd_soc_card rx51_sound_card = { 353static struct snd_soc_card rx51_sound_card = {
362 .name = "RX-51", 354 .name = "RX-51",
363 .owner = THIS_MODULE, 355 .owner = THIS_MODULE,
364 .remove = rx51_card_remove,
365 .dai_link = rx51_dai, 356 .dai_link = rx51_dai,
366 .num_links = ARRAY_SIZE(rx51_dai), 357 .num_links = ARRAY_SIZE(rx51_dai),
367 .aux_dev = rx51_aux_dev, 358 .aux_dev = rx51_aux_dev,
diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c
index a9ac881c2e14..6cdef5d4954e 100644
--- a/sound/soc/pxa/hx4700.c
+++ b/sound/soc/pxa/hx4700.c
@@ -138,13 +138,6 @@ static int hx4700_ak4641_init(struct snd_soc_pcm_runtime *rtd)
138 return err; 138 return err;
139} 139}
140 140
141static int hx4700_card_remove(struct snd_soc_card *card)
142{
143 snd_soc_jack_free_gpios(&hs_jack, 1, &hs_jack_gpio);
144
145 return 0;
146}
147
148/* hx4700 digital audio interface glue - connects codec <--> CPU */ 141/* hx4700 digital audio interface glue - connects codec <--> CPU */
149static struct snd_soc_dai_link hx4700_dai = { 142static struct snd_soc_dai_link hx4700_dai = {
150 .name = "ak4641", 143 .name = "ak4641",
@@ -163,7 +156,6 @@ static struct snd_soc_dai_link hx4700_dai = {
163static struct snd_soc_card snd_soc_card_hx4700 = { 156static struct snd_soc_card snd_soc_card_hx4700 = {
164 .name = "iPAQ hx4700", 157 .name = "iPAQ hx4700",
165 .owner = THIS_MODULE, 158 .owner = THIS_MODULE,
166 .remove = hx4700_card_remove,
167 .dai_link = &hx4700_dai, 159 .dai_link = &hx4700_dai,
168 .num_links = 1, 160 .num_links = 1,
169 .dapm_widgets = hx4700_dapm_widgets, 161 .dapm_widgets = hx4700_dapm_widgets,
diff --git a/sound/soc/pxa/mmp-pcm.c b/sound/soc/pxa/mmp-pcm.c
index 5b5f1a442891..624d9bd5dadd 100644
--- a/sound/soc/pxa/mmp-pcm.c
+++ b/sound/soc/pxa/mmp-pcm.c
@@ -131,7 +131,7 @@ static int mmp_pcm_mmap(struct snd_pcm_substream *substream,
131 vma->vm_end - vma->vm_start, vma->vm_page_prot); 131 vma->vm_end - vma->vm_start, vma->vm_page_prot);
132} 132}
133 133
134static struct snd_pcm_ops mmp_pcm_ops = { 134static const struct snd_pcm_ops mmp_pcm_ops = {
135 .open = mmp_pcm_open, 135 .open = mmp_pcm_open,
136 .close = snd_dmaengine_pcm_close_release_chan, 136 .close = snd_dmaengine_pcm_close_release_chan,
137 .ioctl = snd_pcm_lib_ioctl, 137 .ioctl = snd_pcm_lib_ioctl,
@@ -211,7 +211,7 @@ err:
211 return ret; 211 return ret;
212} 212}
213 213
214static struct snd_soc_platform_driver mmp_soc_platform = { 214static const struct snd_soc_platform_driver mmp_soc_platform = {
215 .ops = &mmp_pcm_ops, 215 .ops = &mmp_pcm_ops,
216 .pcm_new = mmp_pcm_new, 216 .pcm_new = mmp_pcm_new,
217 .pcm_free = mmp_pcm_free_dma_buffers, 217 .pcm_free = mmp_pcm_free_dma_buffers,
diff --git a/sound/soc/pxa/mmp-sspa.c b/sound/soc/pxa/mmp-sspa.c
index 9cc35012e6e5..64b85e30c1f8 100644
--- a/sound/soc/pxa/mmp-sspa.c
+++ b/sound/soc/pxa/mmp-sspa.c
@@ -380,7 +380,7 @@ static int mmp_sspa_probe(struct snd_soc_dai *dai)
380 SNDRV_PCM_FMTBIT_S24_LE | \ 380 SNDRV_PCM_FMTBIT_S24_LE | \
381 SNDRV_PCM_FMTBIT_S32_LE) 381 SNDRV_PCM_FMTBIT_S32_LE)
382 382
383static struct snd_soc_dai_ops mmp_sspa_dai_ops = { 383static const struct snd_soc_dai_ops mmp_sspa_dai_ops = {
384 .startup = mmp_sspa_startup, 384 .startup = mmp_sspa_startup,
385 .shutdown = mmp_sspa_shutdown, 385 .shutdown = mmp_sspa_shutdown,
386 .trigger = mmp_sspa_trigger, 386 .trigger = mmp_sspa_trigger,
diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
index b51d7a0755d5..e64958d8bff0 100644
--- a/sound/soc/pxa/pxa2xx-pcm.c
+++ b/sound/soc/pxa/pxa2xx-pcm.c
@@ -45,7 +45,7 @@ static int pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
45 return 0; 45 return 0;
46} 46}
47 47
48static struct snd_pcm_ops pxa2xx_pcm_ops = { 48static const struct snd_pcm_ops pxa2xx_pcm_ops = {
49 .open = __pxa2xx_pcm_open, 49 .open = __pxa2xx_pcm_open,
50 .close = __pxa2xx_pcm_close, 50 .close = __pxa2xx_pcm_close,
51 .ioctl = snd_pcm_lib_ioctl, 51 .ioctl = snd_pcm_lib_ioctl,
@@ -84,7 +84,7 @@ static int pxa2xx_soc_pcm_new(struct snd_soc_pcm_runtime *rtd)
84 return ret; 84 return ret;
85} 85}
86 86
87static struct snd_soc_platform_driver pxa2xx_soc_platform = { 87static const struct snd_soc_platform_driver pxa2xx_soc_platform = {
88 .ops = &pxa2xx_pcm_ops, 88 .ops = &pxa2xx_pcm_ops,
89 .pcm_new = pxa2xx_soc_pcm_new, 89 .pcm_new = pxa2xx_soc_pcm_new,
90 .pcm_free = pxa2xx_pcm_free_dma_buffers, 90 .pcm_free = pxa2xx_pcm_free_dma_buffers,
diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c
index d084d7468299..d49adc822a11 100644
--- a/sound/soc/qcom/apq8016_sbc.c
+++ b/sound/soc/qcom/apq8016_sbc.c
@@ -21,12 +21,16 @@
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22#include <sound/pcm.h> 22#include <sound/pcm.h>
23#include <sound/pcm_params.h> 23#include <sound/pcm_params.h>
24#include <sound/jack.h>
24#include <sound/soc.h> 25#include <sound/soc.h>
26#include <uapi/linux/input-event-codes.h>
25#include <dt-bindings/sound/apq8016-lpass.h> 27#include <dt-bindings/sound/apq8016-lpass.h>
26 28
27struct apq8016_sbc_data { 29struct apq8016_sbc_data {
28 void __iomem *mic_iomux; 30 void __iomem *mic_iomux;
29 void __iomem *spkr_iomux; 31 void __iomem *spkr_iomux;
32 struct snd_soc_jack jack;
33 bool jack_setup;
30 struct snd_soc_dai_link dai_link[]; /* dynamically allocated */ 34 struct snd_soc_dai_link dai_link[]; /* dynamically allocated */
31}; 35};
32 36
@@ -34,13 +38,16 @@ struct apq8016_sbc_data {
34#define MIC_CTRL_QUA_WS_SLAVE_SEL_10 BIT(17) 38#define MIC_CTRL_QUA_WS_SLAVE_SEL_10 BIT(17)
35#define MIC_CTRL_TLMM_SCLK_EN BIT(1) 39#define MIC_CTRL_TLMM_SCLK_EN BIT(1)
36#define SPKR_CTL_PRI_WS_SLAVE_SEL_11 (BIT(17) | BIT(16)) 40#define SPKR_CTL_PRI_WS_SLAVE_SEL_11 (BIT(17) | BIT(16))
41#define DEFAULT_MCLK_RATE 9600000
37 42
38static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd) 43static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
39{ 44{
40 struct snd_soc_dai *cpu_dai = rtd->cpu_dai; 45 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
46 struct snd_soc_codec *codec;
47 struct snd_soc_dai_link *dai_link = rtd->dai_link;
41 struct snd_soc_card *card = rtd->card; 48 struct snd_soc_card *card = rtd->card;
42 struct apq8016_sbc_data *pdata = snd_soc_card_get_drvdata(card); 49 struct apq8016_sbc_data *pdata = snd_soc_card_get_drvdata(card);
43 int rval = 0; 50 int i, rval;
44 51
45 switch (cpu_dai->id) { 52 switch (cpu_dai->id) {
46 case MI2S_PRIMARY: 53 case MI2S_PRIMARY:
@@ -63,12 +70,54 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
63 70
64 default: 71 default:
65 dev_err(card->dev, "unsupported cpu dai configuration\n"); 72 dev_err(card->dev, "unsupported cpu dai configuration\n");
66 rval = -EINVAL; 73 return -EINVAL;
67 break; 74
75 }
76
77 if (!pdata->jack_setup) {
78 struct snd_jack *jack;
79
80 rval = snd_soc_card_jack_new(card, "Headset Jack",
81 SND_JACK_HEADSET |
82 SND_JACK_HEADPHONE |
83 SND_JACK_BTN_0 | SND_JACK_BTN_1 |
84 SND_JACK_BTN_2 | SND_JACK_BTN_3 |
85 SND_JACK_BTN_4,
86 &pdata->jack, NULL, 0);
87
88 if (rval < 0) {
89 dev_err(card->dev, "Unable to add Headphone Jack\n");
90 return rval;
91 }
68 92
93 jack = pdata->jack.jack;
94
95 snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_MEDIA);
96 snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
97 snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
98 snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
99 pdata->jack_setup = true;
100 }
101
102 for (i = 0 ; i < dai_link->num_codecs; i++) {
103 struct snd_soc_dai *dai = rtd->codec_dais[i];
104
105 codec = dai->codec;
106 /* Set default mclk for internal codec */
107 rval = snd_soc_codec_set_sysclk(codec, 0, 0, DEFAULT_MCLK_RATE,
108 SND_SOC_CLOCK_IN);
109 if (rval != 0 && rval != -ENOTSUPP) {
110 dev_warn(card->dev, "Failed to set mclk: %d\n", rval);
111 return rval;
112 }
113 rval = snd_soc_codec_set_jack(codec, &pdata->jack, NULL);
114 if (rval != 0 && rval != -ENOTSUPP) {
115 dev_warn(card->dev, "Failed to set jack: %d\n", rval);
116 return rval;
117 }
69 } 118 }
70 119
71 return rval; 120 return 0;
72} 121}
73 122
74static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card) 123static struct apq8016_sbc_data *apq8016_sbc_parse_of(struct snd_soc_card *card)
@@ -191,7 +240,6 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev)
191 if (IS_ERR(data->spkr_iomux)) 240 if (IS_ERR(data->spkr_iomux))
192 return PTR_ERR(data->spkr_iomux); 241 return PTR_ERR(data->spkr_iomux);
193 242
194 platform_set_drvdata(pdev, data);
195 snd_soc_card_set_drvdata(card, data); 243 snd_soc_card_set_drvdata(card, data);
196 244
197 return devm_snd_soc_register_card(&pdev->dev, card); 245 return devm_snd_soc_register_card(&pdev->dev, card);
diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c
index 7aabf08de3d4..e1945e1772cd 100644
--- a/sound/soc/qcom/lpass-platform.c
+++ b/sound/soc/qcom/lpass-platform.c
@@ -32,7 +32,7 @@ struct lpass_pcm_data {
32#define LPASS_PLATFORM_BUFFER_SIZE (16 * 1024) 32#define LPASS_PLATFORM_BUFFER_SIZE (16 * 1024)
33#define LPASS_PLATFORM_PERIODS 2 33#define LPASS_PLATFORM_PERIODS 2
34 34
35static struct snd_pcm_hardware lpass_platform_pcm_hardware = { 35static const struct snd_pcm_hardware lpass_platform_pcm_hardware = {
36 .info = SNDRV_PCM_INFO_MMAP | 36 .info = SNDRV_PCM_INFO_MMAP |
37 SNDRV_PCM_INFO_MMAP_VALID | 37 SNDRV_PCM_INFO_MMAP_VALID |
38 SNDRV_PCM_INFO_INTERLEAVED | 38 SNDRV_PCM_INFO_INTERLEAVED |
@@ -557,7 +557,7 @@ static void lpass_platform_pcm_free(struct snd_pcm *pcm)
557 } 557 }
558} 558}
559 559
560static struct snd_soc_platform_driver lpass_platform_driver = { 560static const struct snd_soc_platform_driver lpass_platform_driver = {
561 .pcm_new = lpass_platform_pcm_new, 561 .pcm_new = lpass_platform_pcm_new,
562 .pcm_free = lpass_platform_pcm_free, 562 .pcm_free = lpass_platform_pcm_free,
563 .ops = &lpass_platform_pcm_ops, 563 .ops = &lpass_platform_pcm_ops,
diff --git a/sound/soc/qcom/storm.c b/sound/soc/qcom/storm.c
index c5207af14104..a9fa972466ad 100644
--- a/sound/soc/qcom/storm.c
+++ b/sound/soc/qcom/storm.c
@@ -99,7 +99,6 @@ static int storm_platform_probe(struct platform_device *pdev)
99 return -ENOMEM; 99 return -ENOMEM;
100 100
101 card->dev = &pdev->dev; 101 card->dev = &pdev->dev;
102 platform_set_drvdata(pdev, card);
103 102
104 ret = snd_soc_of_parse_card_name(card, "qcom,model"); 103 ret = snd_soc_of_parse_card_name(card, "qcom,model");
105 if (ret) { 104 if (ret) {
diff --git a/sound/soc/rockchip/Kconfig b/sound/soc/rockchip/Kconfig
index c84487805876..b0825370d262 100644
--- a/sound/soc/rockchip/Kconfig
+++ b/sound/soc/rockchip/Kconfig
@@ -68,6 +68,8 @@ config SND_SOC_RK3399_GRU_SOUND
68 select SND_SOC_RT5514 68 select SND_SOC_RT5514
69 select SND_SOC_DA7219 69 select SND_SOC_DA7219
70 select SND_SOC_RT5514_SPI 70 select SND_SOC_RT5514_SPI
71 select SND_SOC_HDMI_CODEC
72 select SND_SOC_DMIC
71 help 73 help
72 Say Y or M here if you want to add support multiple codecs for SoC 74 Say Y or M here if you want to add support multiple codecs for SoC
73 audio on Rockchip RK3399 GRU boards. 75 audio on Rockchip RK3399 GRU boards.
diff --git a/sound/soc/rockchip/rk3288_hdmi_analog.c b/sound/soc/rockchip/rk3288_hdmi_analog.c
index dbc53e48c52c..fa44e3901336 100644
--- a/sound/soc/rockchip/rk3288_hdmi_analog.c
+++ b/sound/soc/rockchip/rk3288_hdmi_analog.c
@@ -147,7 +147,7 @@ static int rk_init(struct snd_soc_pcm_runtime *runtime)
147 return 0; 147 return 0;
148} 148}
149 149
150static struct snd_soc_ops rk_ops = { 150static const struct snd_soc_ops rk_ops = {
151 .hw_params = rk_hw_params, 151 .hw_params = rk_hw_params,
152}; 152};
153 153
@@ -272,8 +272,6 @@ static int snd_rk_mc_probe(struct platform_device *pdev)
272 return ret; 272 return ret;
273 } 273 }
274 274
275 platform_set_drvdata(pdev, card);
276
277 return ret; 275 return ret;
278} 276}
279 277
diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c
index 3475c61a5fa0..0513fe480353 100644
--- a/sound/soc/rockchip/rk3399_gru_sound.c
+++ b/sound/soc/rockchip/rk3399_gru_sound.c
@@ -38,7 +38,7 @@
38 38
39#define SOUND_FS 256 39#define SOUND_FS 256
40 40
41static unsigned int rt5514_dmic_delay; 41static unsigned int dmic_wakeup_delay;
42 42
43static struct snd_soc_jack rockchip_sound_jack; 43static struct snd_soc_jack rockchip_sound_jack;
44 44
@@ -126,7 +126,7 @@ static int rockchip_sound_rt5514_hw_params(struct snd_pcm_substream *substream,
126 } 126 }
127 127
128 /* Wait for DMIC stable */ 128 /* Wait for DMIC stable */
129 msleep(rt5514_dmic_delay); 129 msleep(dmic_wakeup_delay);
130 130
131 return 0; 131 return 0;
132} 132}
@@ -228,6 +228,67 @@ static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd)
228 return 0; 228 return 0;
229} 229}
230 230
231static int rockchip_sound_cdndp_hw_params(struct snd_pcm_substream *substream,
232 struct snd_pcm_hw_params *params)
233{
234 struct snd_soc_pcm_runtime *rtd = substream->private_data;
235 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
236 struct snd_soc_dai *codec_dai = rtd->codec_dai;
237 int mclk, ret;
238
239 /* in bypass mode, the mclk has to be one of the frequencies below */
240 switch (params_rate(params)) {
241 case 8000:
242 case 16000:
243 case 24000:
244 case 32000:
245 case 48000:
246 case 64000:
247 case 96000:
248 mclk = 12288000;
249 break;
250 case 11025:
251 case 22050:
252 case 44100:
253 case 88200:
254 mclk = 11289600;
255 break;
256 default:
257 return -EINVAL;
258 }
259
260 ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk,
261 SND_SOC_CLOCK_OUT);
262 if (ret < 0) {
263 dev_err(codec_dai->dev, "Can't set cpu clock out %d\n", ret);
264 return ret;
265 }
266
267 return 0;
268}
269
270static int rockchip_sound_dmic_hw_params(struct snd_pcm_substream *substream,
271 struct snd_pcm_hw_params *params)
272{
273 struct snd_soc_pcm_runtime *rtd = substream->private_data;
274 unsigned int mclk;
275 int ret;
276
277 mclk = params_rate(params) * SOUND_FS;
278
279 ret = snd_soc_dai_set_sysclk(rtd->cpu_dai, 0, mclk, 0);
280 if (ret) {
281 dev_err(rtd->card->dev, "%s() error setting sysclk to %u: %d\n",
282 __func__, mclk, ret);
283 return ret;
284 }
285
286 /* Wait for DMIC stable */
287 msleep(dmic_wakeup_delay);
288
289 return 0;
290}
291
231static const struct snd_soc_ops rockchip_sound_max98357a_ops = { 292static const struct snd_soc_ops rockchip_sound_max98357a_ops = {
232 .hw_params = rockchip_sound_max98357a_hw_params, 293 .hw_params = rockchip_sound_max98357a_hw_params,
233}; 294};
@@ -240,16 +301,70 @@ static const struct snd_soc_ops rockchip_sound_da7219_ops = {
240 .hw_params = rockchip_sound_da7219_hw_params, 301 .hw_params = rockchip_sound_da7219_hw_params,
241}; 302};
242 303
304static const struct snd_soc_ops rockchip_sound_cdndp_ops = {
305 .hw_params = rockchip_sound_cdndp_hw_params,
306};
307
308static const struct snd_soc_ops rockchip_sound_dmic_ops = {
309 .hw_params = rockchip_sound_dmic_hw_params,
310};
311
312static struct snd_soc_card rockchip_sound_card = {
313 .name = "rk3399-gru-sound",
314 .owner = THIS_MODULE,
315 .dapm_widgets = rockchip_dapm_widgets,
316 .num_dapm_widgets = ARRAY_SIZE(rockchip_dapm_widgets),
317 .dapm_routes = rockchip_dapm_routes,
318 .num_dapm_routes = ARRAY_SIZE(rockchip_dapm_routes),
319 .controls = rockchip_controls,
320 .num_controls = ARRAY_SIZE(rockchip_controls),
321};
322
243enum { 323enum {
324 DAILINK_CDNDP,
325 DAILINK_DA7219,
326 DAILINK_DMIC,
244 DAILINK_MAX98357A, 327 DAILINK_MAX98357A,
245 DAILINK_RT5514, 328 DAILINK_RT5514,
246 DAILINK_DA7219,
247 DAILINK_RT5514_DSP, 329 DAILINK_RT5514_DSP,
248}; 330};
249 331
250#define DAILINK_ENTITIES (DAILINK_DA7219 + 1) 332static const char * const dailink_compat[] = {
333 [DAILINK_CDNDP] = "rockchip,rk3399-cdn-dp",
334 [DAILINK_DA7219] = "dlg,da7219",
335 [DAILINK_DMIC] = "dmic-codec",
336 [DAILINK_MAX98357A] = "maxim,max98357a",
337 [DAILINK_RT5514] = "realtek,rt5514-i2c",
338 [DAILINK_RT5514_DSP] = "realtek,rt5514-spi",
339};
251 340
252static struct snd_soc_dai_link rockchip_dailinks[] = { 341static const struct snd_soc_dai_link rockchip_dais[] = {
342 [DAILINK_CDNDP] = {
343 .name = "DP",
344 .stream_name = "DP PCM",
345 .codec_dai_name = "i2s-hifi",
346 .ops = &rockchip_sound_cdndp_ops,
347 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
348 SND_SOC_DAIFMT_CBS_CFS,
349 },
350 [DAILINK_DA7219] = {
351 .name = "DA7219",
352 .stream_name = "DA7219 PCM",
353 .codec_dai_name = "da7219-hifi",
354 .init = rockchip_sound_da7219_init,
355 .ops = &rockchip_sound_da7219_ops,
356 /* set da7219 as slave */
357 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
358 SND_SOC_DAIFMT_CBS_CFS,
359 },
360 [DAILINK_DMIC] = {
361 .name = "DMIC",
362 .stream_name = "DMIC PCM",
363 .codec_dai_name = "dmic-hifi",
364 .ops = &rockchip_sound_dmic_ops,
365 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
366 SND_SOC_DAIFMT_CBS_CFS,
367 },
253 [DAILINK_MAX98357A] = { 368 [DAILINK_MAX98357A] = {
254 .name = "MAX98357A", 369 .name = "MAX98357A",
255 .stream_name = "MAX98357A PCM", 370 .stream_name = "MAX98357A PCM",
@@ -268,108 +383,95 @@ static struct snd_soc_dai_link rockchip_dailinks[] = {
268 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | 383 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
269 SND_SOC_DAIFMT_CBS_CFS, 384 SND_SOC_DAIFMT_CBS_CFS,
270 }, 385 },
271 [DAILINK_DA7219] = {
272 .name = "DA7219",
273 .stream_name = "DA7219 PCM",
274 .codec_dai_name = "da7219-hifi",
275 .init = rockchip_sound_da7219_init,
276 .ops = &rockchip_sound_da7219_ops,
277 /* set da7219 as slave */
278 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
279 SND_SOC_DAIFMT_CBS_CFS,
280 },
281 /* RT5514 DSP for voice wakeup via spi bus */ 386 /* RT5514 DSP for voice wakeup via spi bus */
282 [DAILINK_RT5514_DSP] = { 387 [DAILINK_RT5514_DSP] = {
283 .name = "RT5514 DSP", 388 .name = "RT5514 DSP",
284 .stream_name = "Wake on Voice", 389 .stream_name = "Wake on Voice",
285 .codec_name = "snd-soc-dummy", 390 .codec_dai_name = "rt5514-dsp-cpu-dai",
286 .codec_dai_name = "snd-soc-dummy-dai",
287 }, 391 },
288}; 392};
289 393
290static struct snd_soc_card rockchip_sound_card = { 394static int rockchip_sound_codec_node_match(struct device_node *np_codec)
291 .name = "rk3399-gru-sound",
292 .owner = THIS_MODULE,
293 .dai_link = rockchip_dailinks,
294 .num_links = ARRAY_SIZE(rockchip_dailinks),
295 .dapm_widgets = rockchip_dapm_widgets,
296 .num_dapm_widgets = ARRAY_SIZE(rockchip_dapm_widgets),
297 .dapm_routes = rockchip_dapm_routes,
298 .num_dapm_routes = ARRAY_SIZE(rockchip_dapm_routes),
299 .controls = rockchip_controls,
300 .num_controls = ARRAY_SIZE(rockchip_controls),
301};
302
303static int rockchip_sound_match_stub(struct device *dev, void *data)
304{ 395{
305 return 1; 396 int i;
306}
307 397
308static int rockchip_sound_probe(struct platform_device *pdev) 398 for (i = 0; i < ARRAY_SIZE(dailink_compat); i++) {
309{ 399 if (of_device_is_compatible(np_codec, dailink_compat[i]))
310 struct snd_soc_card *card = &rockchip_sound_card; 400 return i;
311 struct device_node *cpu_node;
312 struct device *dev;
313 struct device_driver *drv;
314 int i, ret;
315
316 cpu_node = of_parse_phandle(pdev->dev.of_node, "rockchip,cpu", 0);
317 if (!cpu_node) {
318 dev_err(&pdev->dev, "Property 'rockchip,cpu' missing or invalid\n");
319 return -EINVAL;
320 } 401 }
402 return -1;
403}
321 404
322 for (i = 0; i < DAILINK_ENTITIES; i++) { 405static int rockchip_sound_of_parse_dais(struct device *dev,
323 rockchip_dailinks[i].platform_of_node = cpu_node; 406 struct snd_soc_card *card)
324 rockchip_dailinks[i].cpu_of_node = cpu_node; 407{
325 408 struct device_node *np_cpu, *np_cpu0, *np_cpu1;
326 rockchip_dailinks[i].codec_of_node = 409 struct device_node *np_codec;
327 of_parse_phandle(pdev->dev.of_node, "rockchip,codec", i); 410 struct snd_soc_dai_link *dai;
328 if (!rockchip_dailinks[i].codec_of_node) { 411 int i, index;
329 dev_err(&pdev->dev, 412
330 "Property[%d] 'rockchip,codec' missing or invalid\n", i); 413 card->dai_link = devm_kzalloc(dev, sizeof(rockchip_dais),
414 GFP_KERNEL);
415 if (!card->dai_link)
416 return -ENOMEM;
417
418 np_cpu0 = of_parse_phandle(dev->of_node, "rockchip,cpu", 0);
419 np_cpu1 = of_parse_phandle(dev->of_node, "rockchip,cpu", 1);
420
421 card->num_links = 0;
422 for (i = 0; i < ARRAY_SIZE(rockchip_dais); i++) {
423 np_codec = of_parse_phandle(dev->of_node,
424 "rockchip,codec", i);
425 if (!np_codec)
426 break;
427
428 if (!of_device_is_available(np_codec))
429 continue;
430
431 index = rockchip_sound_codec_node_match(np_codec);
432 if (index < 0)
433 continue;
434
435 np_cpu = (index == DAILINK_CDNDP) ? np_cpu1 : np_cpu0;
436 if (!np_cpu) {
437 dev_err(dev, "Missing 'rockchip,cpu' for %s\n",
438 rockchip_dais[index].name);
331 return -EINVAL; 439 return -EINVAL;
332 } 440 }
333 }
334 441
335 /** 442 dai = &card->dai_link[card->num_links++];
336 * To acquire the spi driver of the rt5514 and set the dai-links names 443 *dai = rockchip_dais[index];
337 * for soc_bind_dai_link 444
338 */ 445 dai->codec_of_node = np_codec;
339 drv = driver_find("rt5514", &spi_bus_type); 446 dai->platform_of_node = np_cpu;
340 if (!drv) { 447 dai->cpu_of_node = np_cpu;
341 dev_err(&pdev->dev, "Can not find the rt5514 driver at the spi bus\n");
342 return -EINVAL;
343 } 448 }
344 449
345 dev = driver_find_device(drv, NULL, NULL, rockchip_sound_match_stub); 450 return 0;
346 if (!dev) { 451}
347 dev_err(&pdev->dev, "Can not find the rt5514 device\n"); 452
348 return -ENODEV; 453static int rockchip_sound_probe(struct platform_device *pdev)
454{
455 struct snd_soc_card *card = &rockchip_sound_card;
456 int ret;
457
458 ret = rockchip_sound_of_parse_dais(&pdev->dev, card);
459 if (ret < 0) {
460 dev_err(&pdev->dev, "Failed to parse dais: %d\n", ret);
461 return ret;
349 } 462 }
350 463
351 /* Set DMIC delay */ 464 /* Set DMIC wakeup delay */
352 ret = device_property_read_u32(&pdev->dev, "dmic-delay", 465 ret = device_property_read_u32(&pdev->dev, "dmic-wakeup-delay-ms",
353 &rt5514_dmic_delay); 466 &dmic_wakeup_delay);
354 if (ret) { 467 if (ret) {
355 rt5514_dmic_delay = 0; 468 dmic_wakeup_delay = 0;
356 dev_dbg(&pdev->dev, 469 dev_dbg(&pdev->dev,
357 "no optional property 'dmic-delay' found, default: no delay\n"); 470 "no optional property 'dmic-wakeup-delay-ms' found, default: no delay\n");
358 } 471 }
359 472
360 rockchip_dailinks[DAILINK_RT5514_DSP].cpu_name = kstrdup_const(dev_name(dev), GFP_KERNEL);
361 rockchip_dailinks[DAILINK_RT5514_DSP].cpu_dai_name = kstrdup_const(dev_name(dev), GFP_KERNEL);
362 rockchip_dailinks[DAILINK_RT5514_DSP].platform_name = kstrdup_const(dev_name(dev), GFP_KERNEL);
363
364 card->dev = &pdev->dev; 473 card->dev = &pdev->dev;
365 platform_set_drvdata(pdev, card); 474 return devm_snd_soc_register_card(&pdev->dev, card);
366
367 ret = devm_snd_soc_register_card(&pdev->dev, card);
368 if (ret)
369 dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n",
370 __func__, ret);
371
372 return ret;
373} 475}
374 476
375static const struct of_device_id rockchip_sound_of_match[] = { 477static const struct of_device_id rockchip_sound_of_match[] = {
diff --git a/sound/soc/rockchip/rockchip_i2s.c b/sound/soc/rockchip/rockchip_i2s.c
index 199338fdeda0..b6590467fd14 100644
--- a/sound/soc/rockchip/rockchip_i2s.c
+++ b/sound/soc/rockchip/rockchip_i2s.c
@@ -579,10 +579,8 @@ static int rockchip_i2s_probe(struct platform_device *pdev)
579 int val; 579 int val;
580 580
581 i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL); 581 i2s = devm_kzalloc(&pdev->dev, sizeof(*i2s), GFP_KERNEL);
582 if (!i2s) { 582 if (!i2s)
583 dev_err(&pdev->dev, "Can't allocate rk_i2s_dev\n");
584 return -ENOMEM; 583 return -ENOMEM;
585 }
586 584
587 i2s->dev = &pdev->dev; 585 i2s->dev = &pdev->dev;
588 586
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index c5ddeed97260..400e29edb1c9 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -249,7 +249,7 @@ static int rockchip_pdm_dai_probe(struct snd_soc_dai *dai)
249 return 0; 249 return 0;
250} 250}
251 251
252static struct snd_soc_dai_ops rockchip_pdm_dai_ops = { 252static const struct snd_soc_dai_ops rockchip_pdm_dai_ops = {
253 .set_fmt = rockchip_pdm_set_fmt, 253 .set_fmt = rockchip_pdm_set_fmt,
254 .trigger = rockchip_pdm_trigger, 254 .trigger = rockchip_pdm_trigger,
255 .hw_params = rockchip_pdm_hw_params, 255 .hw_params = rockchip_pdm_hw_params,
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index 5f5825faeb2a..051935162d7b 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -170,14 +170,6 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
170 return 0; 170 return 0;
171} 171}
172 172
173static int h1940_uda1380_card_remove(struct snd_soc_card *card)
174{
175 snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
176 hp_jack_gpios);
177
178 return 0;
179}
180
181/* s3c24xx digital audio interface glue - connects codec <--> CPU */ 173/* s3c24xx digital audio interface glue - connects codec <--> CPU */
182static struct snd_soc_dai_link h1940_uda1380_dai[] = { 174static struct snd_soc_dai_link h1940_uda1380_dai[] = {
183 { 175 {
@@ -197,7 +189,6 @@ static struct snd_soc_dai_link h1940_uda1380_dai[] = {
197static struct snd_soc_card h1940_asoc = { 189static struct snd_soc_card h1940_asoc = {
198 .name = "h1940", 190 .name = "h1940",
199 .owner = THIS_MODULE, 191 .owner = THIS_MODULE,
200 .remove = h1940_uda1380_card_remove,
201 .dai_link = h1940_uda1380_dai, 192 .dai_link = h1940_uda1380_dai,
202 .num_links = ARRAY_SIZE(h1940_uda1380_dai), 193 .num_links = ARRAY_SIZE(h1940_uda1380_dai),
203 194
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index af3ba4d4ccc5..10a4da06c0a1 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -50,6 +50,7 @@ struct samsung_i2s_variant_regs {
50 50
51struct samsung_i2s_dai_data { 51struct samsung_i2s_dai_data {
52 u32 quirks; 52 u32 quirks;
53 unsigned int pcm_rates;
53 const struct samsung_i2s_variant_regs *i2s_variant_regs; 54 const struct samsung_i2s_variant_regs *i2s_variant_regs;
54}; 55};
55 56
@@ -550,7 +551,9 @@ static int i2s_set_sysclk(struct snd_soc_dai *dai,
550 goto err; 551 goto err;
551 } 552 }
552 553
553 clk_prepare_enable(i2s->op_clk); 554 ret = clk_prepare_enable(i2s->op_clk);
555 if (ret)
556 goto err;
554 i2s->rclk_srcrate = clk_get_rate(i2s->op_clk); 557 i2s->rclk_srcrate = clk_get_rate(i2s->op_clk);
555 558
556 /* Over-ride the other's */ 559 /* Over-ride the other's */
@@ -1076,13 +1079,13 @@ static const struct snd_soc_component_driver samsung_i2s_component = {
1076 .name = "samsung-i2s", 1079 .name = "samsung-i2s",
1077}; 1080};
1078 1081
1079#define SAMSUNG_I2S_RATES SNDRV_PCM_RATE_8000_96000
1080
1081#define SAMSUNG_I2S_FMTS (SNDRV_PCM_FMTBIT_S8 | \ 1082#define SAMSUNG_I2S_FMTS (SNDRV_PCM_FMTBIT_S8 | \
1082 SNDRV_PCM_FMTBIT_S16_LE | \ 1083 SNDRV_PCM_FMTBIT_S16_LE | \
1083 SNDRV_PCM_FMTBIT_S24_LE) 1084 SNDRV_PCM_FMTBIT_S24_LE)
1084 1085
1085static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec) 1086static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev,
1087 const struct samsung_i2s_dai_data *i2s_dai_data,
1088 bool sec)
1086{ 1089{
1087 struct i2s_dai *i2s; 1090 struct i2s_dai *i2s;
1088 1091
@@ -1101,13 +1104,13 @@ static struct i2s_dai *i2s_alloc_dai(struct platform_device *pdev, bool sec)
1101 i2s->i2s_dai_drv.resume = i2s_resume; 1104 i2s->i2s_dai_drv.resume = i2s_resume;
1102 i2s->i2s_dai_drv.playback.channels_min = 1; 1105 i2s->i2s_dai_drv.playback.channels_min = 1;
1103 i2s->i2s_dai_drv.playback.channels_max = 2; 1106 i2s->i2s_dai_drv.playback.channels_max = 2;
1104 i2s->i2s_dai_drv.playback.rates = SAMSUNG_I2S_RATES; 1107 i2s->i2s_dai_drv.playback.rates = i2s_dai_data->pcm_rates;
1105 i2s->i2s_dai_drv.playback.formats = SAMSUNG_I2S_FMTS; 1108 i2s->i2s_dai_drv.playback.formats = SAMSUNG_I2S_FMTS;
1106 1109
1107 if (!sec) { 1110 if (!sec) {
1108 i2s->i2s_dai_drv.capture.channels_min = 1; 1111 i2s->i2s_dai_drv.capture.channels_min = 1;
1109 i2s->i2s_dai_drv.capture.channels_max = 2; 1112 i2s->i2s_dai_drv.capture.channels_max = 2;
1110 i2s->i2s_dai_drv.capture.rates = SAMSUNG_I2S_RATES; 1113 i2s->i2s_dai_drv.capture.rates = i2s_dai_data->pcm_rates;
1111 i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS; 1114 i2s->i2s_dai_drv.capture.formats = SAMSUNG_I2S_FMTS;
1112 } 1115 }
1113 return i2s; 1116 return i2s;
@@ -1132,10 +1135,19 @@ static int i2s_runtime_suspend(struct device *dev)
1132static int i2s_runtime_resume(struct device *dev) 1135static int i2s_runtime_resume(struct device *dev)
1133{ 1136{
1134 struct i2s_dai *i2s = dev_get_drvdata(dev); 1137 struct i2s_dai *i2s = dev_get_drvdata(dev);
1138 int ret;
1135 1139
1136 clk_prepare_enable(i2s->clk); 1140 ret = clk_prepare_enable(i2s->clk);
1137 if (i2s->op_clk) 1141 if (ret)
1138 clk_prepare_enable(i2s->op_clk); 1142 return ret;
1143
1144 if (i2s->op_clk) {
1145 ret = clk_prepare_enable(i2s->op_clk);
1146 if (ret) {
1147 clk_disable_unprepare(i2s->clk);
1148 return ret;
1149 }
1150 }
1139 1151
1140 writel(i2s->suspend_i2scon, i2s->addr + I2SCON); 1152 writel(i2s->suspend_i2scon, i2s->addr + I2SCON);
1141 writel(i2s->suspend_i2smod, i2s->addr + I2SMOD); 1153 writel(i2s->suspend_i2smod, i2s->addr + I2SMOD);
@@ -1242,7 +1254,7 @@ static int samsung_i2s_probe(struct platform_device *pdev)
1242 i2s_dai_data = (struct samsung_i2s_dai_data *) 1254 i2s_dai_data = (struct samsung_i2s_dai_data *)
1243 platform_get_device_id(pdev)->driver_data; 1255 platform_get_device_id(pdev)->driver_data;
1244 1256
1245 pri_dai = i2s_alloc_dai(pdev, false); 1257 pri_dai = i2s_alloc_dai(pdev, i2s_dai_data, false);
1246 if (!pri_dai) { 1258 if (!pri_dai) {
1247 dev_err(&pdev->dev, "Unable to alloc I2S_pri\n"); 1259 dev_err(&pdev->dev, "Unable to alloc I2S_pri\n");
1248 return -ENOMEM; 1260 return -ENOMEM;
@@ -1316,7 +1328,7 @@ static int samsung_i2s_probe(struct platform_device *pdev)
1316 goto err_disable_clk; 1328 goto err_disable_clk;
1317 1329
1318 if (quirks & QUIRK_SEC_DAI) { 1330 if (quirks & QUIRK_SEC_DAI) {
1319 sec_dai = i2s_alloc_dai(pdev, true); 1331 sec_dai = i2s_alloc_dai(pdev, i2s_dai_data, true);
1320 if (!sec_dai) { 1332 if (!sec_dai) {
1321 dev_err(&pdev->dev, "Unable to alloc I2S_sec\n"); 1333 dev_err(&pdev->dev, "Unable to alloc I2S_sec\n");
1322 ret = -ENOMEM; 1334 ret = -ENOMEM;
@@ -1376,13 +1388,9 @@ err_disable_clk:
1376 1388
1377static int samsung_i2s_remove(struct platform_device *pdev) 1389static int samsung_i2s_remove(struct platform_device *pdev)
1378{ 1390{
1379 struct i2s_dai *pri_dai, *sec_dai; 1391 struct i2s_dai *pri_dai;
1380 1392
1381 pri_dai = dev_get_drvdata(&pdev->dev); 1393 pri_dai = dev_get_drvdata(&pdev->dev);
1382 sec_dai = pri_dai->sec_dai;
1383
1384 pri_dai->sec_dai = NULL;
1385 sec_dai->pri_dai = NULL;
1386 1394
1387 pm_runtime_get_sync(&pdev->dev); 1395 pm_runtime_get_sync(&pdev->dev);
1388 pm_runtime_disable(&pdev->dev); 1396 pm_runtime_disable(&pdev->dev);
@@ -1452,29 +1460,34 @@ static const struct samsung_i2s_variant_regs i2sv5_i2s1_regs = {
1452 1460
1453static const struct samsung_i2s_dai_data i2sv3_dai_type = { 1461static const struct samsung_i2s_dai_data i2sv3_dai_type = {
1454 .quirks = QUIRK_NO_MUXPSR, 1462 .quirks = QUIRK_NO_MUXPSR,
1463 .pcm_rates = SNDRV_PCM_RATE_8000_96000,
1455 .i2s_variant_regs = &i2sv3_regs, 1464 .i2s_variant_regs = &i2sv3_regs,
1456}; 1465};
1457 1466
1458static const struct samsung_i2s_dai_data i2sv5_dai_type = { 1467static const struct samsung_i2s_dai_data i2sv5_dai_type = {
1459 .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR | 1468 .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR |
1460 QUIRK_SUPPORTS_IDMA, 1469 QUIRK_SUPPORTS_IDMA,
1470 .pcm_rates = SNDRV_PCM_RATE_8000_96000,
1461 .i2s_variant_regs = &i2sv3_regs, 1471 .i2s_variant_regs = &i2sv3_regs,
1462}; 1472};
1463 1473
1464static const struct samsung_i2s_dai_data i2sv6_dai_type = { 1474static const struct samsung_i2s_dai_data i2sv6_dai_type = {
1465 .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR | 1475 .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR |
1466 QUIRK_SUPPORTS_TDM | QUIRK_SUPPORTS_IDMA, 1476 QUIRK_SUPPORTS_TDM | QUIRK_SUPPORTS_IDMA,
1477 .pcm_rates = SNDRV_PCM_RATE_8000_96000,
1467 .i2s_variant_regs = &i2sv6_regs, 1478 .i2s_variant_regs = &i2sv6_regs,
1468}; 1479};
1469 1480
1470static const struct samsung_i2s_dai_data i2sv7_dai_type = { 1481static const struct samsung_i2s_dai_data i2sv7_dai_type = {
1471 .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR | 1482 .quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR |
1472 QUIRK_SUPPORTS_TDM, 1483 QUIRK_SUPPORTS_TDM,
1484 .pcm_rates = SNDRV_PCM_RATE_8000_192000,
1473 .i2s_variant_regs = &i2sv7_regs, 1485 .i2s_variant_regs = &i2sv7_regs,
1474}; 1486};
1475 1487
1476static const struct samsung_i2s_dai_data i2sv5_dai_type_i2s1 = { 1488static const struct samsung_i2s_dai_data i2sv5_dai_type_i2s1 = {
1477 .quirks = QUIRK_PRI_6CHAN | QUIRK_NEED_RSTCLR, 1489 .quirks = QUIRK_PRI_6CHAN | QUIRK_NEED_RSTCLR,
1490 .pcm_rates = SNDRV_PCM_RATE_8000_96000,
1478 .i2s_variant_regs = &i2sv5_i2s1_regs, 1491 .i2s_variant_regs = &i2sv5_i2s1_regs,
1479}; 1492};
1480 1493
diff --git a/sound/soc/samsung/idma.c b/sound/soc/samsung/idma.c
index 3e408158625d..a635df61f928 100644
--- a/sound/soc/samsung/idma.c
+++ b/sound/soc/samsung/idma.c
@@ -325,7 +325,7 @@ static int idma_close(struct snd_pcm_substream *substream)
325 return 0; 325 return 0;
326} 326}
327 327
328static struct snd_pcm_ops idma_ops = { 328static const struct snd_pcm_ops idma_ops = {
329 .open = idma_open, 329 .open = idma_open,
330 .close = idma_close, 330 .close = idma_close,
331 .ioctl = snd_pcm_lib_ioctl, 331 .ioctl = snd_pcm_lib_ioctl,
@@ -399,7 +399,7 @@ void idma_reg_addr_init(void __iomem *regs, dma_addr_t addr)
399} 399}
400EXPORT_SYMBOL_GPL(idma_reg_addr_init); 400EXPORT_SYMBOL_GPL(idma_reg_addr_init);
401 401
402static struct snd_soc_platform_driver asoc_idma_platform = { 402static const struct snd_soc_platform_driver asoc_idma_platform = {
403 .ops = &idma_ops, 403 .ops = &idma_ops,
404 .pcm_new = idma_new, 404 .pcm_new = idma_new,
405 .pcm_free = idma_free, 405 .pcm_free = idma_free,
diff --git a/sound/soc/samsung/jive_wm8750.c b/sound/soc/samsung/jive_wm8750.c
index 7fcb51faa2a0..529b10dc532b 100644
--- a/sound/soc/samsung/jive_wm8750.c
+++ b/sound/soc/samsung/jive_wm8750.c
@@ -79,7 +79,7 @@ static int jive_hw_params(struct snd_pcm_substream *substream,
79 return 0; 79 return 0;
80} 80}
81 81
82static struct snd_soc_ops jive_ops = { 82static const struct snd_soc_ops jive_ops = {
83 .hw_params = jive_hw_params, 83 .hw_params = jive_hw_params,
84}; 84};
85 85
diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c
index 0834319ead42..44b6de5a331a 100644
--- a/sound/soc/samsung/odroid.c
+++ b/sound/soc/samsung/odroid.c
@@ -19,8 +19,8 @@ struct odroid_priv {
19 struct snd_soc_card card; 19 struct snd_soc_card card;
20 struct snd_soc_dai_link dai_link; 20 struct snd_soc_dai_link dai_link;
21 21
22 struct clk *pll; 22 struct clk *clk_i2s_bus;
23 struct clk *rclk; 23 struct clk *sclk_i2s;
24}; 24};
25 25
26static int odroid_card_startup(struct snd_pcm_substream *substream) 26static int odroid_card_startup(struct snd_pcm_substream *substream)
@@ -58,13 +58,18 @@ static int odroid_card_hw_params(struct snd_pcm_substream *substream,
58 return -EINVAL; 58 return -EINVAL;
59 } 59 }
60 60
61 ret = clk_set_rate(priv->pll, pll_freq + 1); 61 ret = clk_set_rate(priv->clk_i2s_bus, pll_freq / 2 + 1);
62 if (ret < 0) 62 if (ret < 0)
63 return ret; 63 return ret;
64 64
65 rclk_freq = params_rate(params) * 256 * 4; 65 /*
66 * We add 1 to the rclk_freq value in order to avoid too low clock
67 * frequency values due to the EPLL output frequency not being exact
68 * multiple of the audio sampling rate.
69 */
70 rclk_freq = params_rate(params) * 256 + 1;
66 71
67 ret = clk_set_rate(priv->rclk, rclk_freq); 72 ret = clk_set_rate(priv->sclk_i2s, rclk_freq);
68 if (ret < 0) 73 if (ret < 0)
69 return ret; 74 return ret;
70 75
@@ -118,14 +123,6 @@ static int odroid_audio_probe(struct platform_device *pdev)
118 123
119 snd_soc_card_set_drvdata(card, priv); 124 snd_soc_card_set_drvdata(card, priv);
120 125
121 priv->pll = devm_clk_get(dev, "epll");
122 if (IS_ERR(priv->pll))
123 return PTR_ERR(priv->pll);
124
125 priv->rclk = devm_clk_get(dev, "i2s_rclk");
126 if (IS_ERR(priv->rclk))
127 return PTR_ERR(priv->rclk);
128
129 ret = snd_soc_of_parse_card_name(card, "model"); 126 ret = snd_soc_of_parse_card_name(card, "model");
130 if (ret < 0) 127 if (ret < 0)
131 return ret; 128 return ret;
@@ -171,14 +168,31 @@ static int odroid_audio_probe(struct platform_device *pdev)
171 link->name = "Primary"; 168 link->name = "Primary";
172 link->stream_name = link->name; 169 link->stream_name = link->name;
173 170
171
172 priv->sclk_i2s = of_clk_get_by_name(link->cpu_of_node, "i2s_opclk1");
173 if (IS_ERR(priv->sclk_i2s)) {
174 ret = PTR_ERR(priv->sclk_i2s);
175 goto err_put_i2s_n;
176 }
177
178 priv->clk_i2s_bus = of_clk_get_by_name(link->cpu_of_node, "iis");
179 if (IS_ERR(priv->clk_i2s_bus)) {
180 ret = PTR_ERR(priv->clk_i2s_bus);
181 goto err_put_sclk;
182 }
183
174 ret = devm_snd_soc_register_card(dev, card); 184 ret = devm_snd_soc_register_card(dev, card);
175 if (ret < 0) { 185 if (ret < 0) {
176 dev_err(dev, "snd_soc_register_card() failed: %d\n", ret); 186 dev_err(dev, "snd_soc_register_card() failed: %d\n", ret);
177 goto err_put_i2s_n; 187 goto err_put_clk_i2s;
178 } 188 }
179 189
180 return 0; 190 return 0;
181 191
192err_put_clk_i2s:
193 clk_put(priv->clk_i2s_bus);
194err_put_sclk:
195 clk_put(priv->sclk_i2s);
182err_put_i2s_n: 196err_put_i2s_n:
183 of_node_put(link->cpu_of_node); 197 of_node_put(link->cpu_of_node);
184err_put_codec_n: 198err_put_codec_n:
@@ -192,6 +206,8 @@ static int odroid_audio_remove(struct platform_device *pdev)
192 206
193 of_node_put(priv->dai_link.cpu_of_node); 207 of_node_put(priv->dai_link.cpu_of_node);
194 odroid_put_codec_of_nodes(&priv->dai_link); 208 odroid_put_codec_of_nodes(&priv->dai_link);
209 clk_put(priv->sclk_i2s);
210 clk_put(priv->clk_i2s_bus);
195 211
196 return 0; 212 return 0;
197} 213}
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index d50a6377c23d..37f95eee1558 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -522,7 +522,9 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
522 dev_err(&pdev->dev, "failed to get audio-bus clock\n"); 522 dev_err(&pdev->dev, "failed to get audio-bus clock\n");
523 return PTR_ERR(pcm->cclk); 523 return PTR_ERR(pcm->cclk);
524 } 524 }
525 clk_prepare_enable(pcm->cclk); 525 ret = clk_prepare_enable(pcm->cclk);
526 if (ret)
527 return ret;
526 528
527 /* record our pcm structure for later use in the callbacks */ 529 /* record our pcm structure for later use in the callbacks */
528 dev_set_drvdata(&pdev->dev, pcm); 530 dev_set_drvdata(&pdev->dev, pcm);
@@ -533,7 +535,9 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev)
533 ret = PTR_ERR(pcm->pclk); 535 ret = PTR_ERR(pcm->pclk);
534 goto err_dis_cclk; 536 goto err_dis_cclk;
535 } 537 }
536 clk_prepare_enable(pcm->pclk); 538 ret = clk_prepare_enable(pcm->pclk);
539 if (ret)
540 goto err_dis_cclk;
537 541
538 s3c_pcm_stereo_in[pdev->id].addr = mem_res->start + S3C_PCM_RXFIFO; 542 s3c_pcm_stereo_in[pdev->id].addr = mem_res->start + S3C_PCM_RXFIFO;
539 s3c_pcm_stereo_out[pdev->id].addr = mem_res->start + S3C_PCM_TXFIFO; 543 s3c_pcm_stereo_out[pdev->id].addr = mem_res->start + S3C_PCM_TXFIFO;
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c
index fa096abe9e75..a064ca7d78c3 100644
--- a/sound/soc/samsung/rx1950_uda1380.c
+++ b/sound/soc/samsung/rx1950_uda1380.c
@@ -31,7 +31,6 @@
31#include "s3c24xx-i2s.h" 31#include "s3c24xx-i2s.h"
32 32
33static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd); 33static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd);
34static int rx1950_uda1380_card_remove(struct snd_soc_card *card);
35static int rx1950_startup(struct snd_pcm_substream *substream); 34static int rx1950_startup(struct snd_pcm_substream *substream);
36static int rx1950_hw_params(struct snd_pcm_substream *substream, 35static int rx1950_hw_params(struct snd_pcm_substream *substream,
37 struct snd_pcm_hw_params *params); 36 struct snd_pcm_hw_params *params);
@@ -118,7 +117,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
118static struct snd_soc_card rx1950_asoc = { 117static struct snd_soc_card rx1950_asoc = {
119 .name = "rx1950", 118 .name = "rx1950",
120 .owner = THIS_MODULE, 119 .owner = THIS_MODULE,
121 .remove = rx1950_uda1380_card_remove,
122 .dai_link = rx1950_uda1380_dai, 120 .dai_link = rx1950_uda1380_dai,
123 .num_links = ARRAY_SIZE(rx1950_uda1380_dai), 121 .num_links = ARRAY_SIZE(rx1950_uda1380_dai),
124 122
@@ -219,14 +217,6 @@ static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd)
219 return 0; 217 return 0;
220} 218}
221 219
222static int rx1950_uda1380_card_remove(struct snd_soc_card *card)
223{
224 snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
225 hp_jack_gpios);
226
227 return 0;
228}
229
230static int __init rx1950_init(void) 220static int __init rx1950_init(void)
231{ 221{
232 int ret; 222 int ret;
diff --git a/sound/soc/samsung/s3c-i2s-v2.c b/sound/soc/samsung/s3c-i2s-v2.c
index 8f42deaa184b..58c3e9bfc6b7 100644
--- a/sound/soc/samsung/s3c-i2s-v2.c
+++ b/sound/soc/samsung/s3c-i2s-v2.c
@@ -27,7 +27,7 @@
27 27
28#undef S3C_IIS_V2_SUPPORTED 28#undef S3C_IIS_V2_SUPPORTED
29 29
30#if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) \ 30#if defined(CONFIG_CPU_S3C2412) \
31 || defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_CPU_S5PV210) 31 || defined(CONFIG_ARCH_S3C64XX) || defined(CONFIG_CPU_S5PV210)
32#define S3C_IIS_V2_SUPPORTED 32#define S3C_IIS_V2_SUPPORTED
33#endif 33#endif
@@ -634,11 +634,10 @@ int s3c_i2sv2_probe(struct snd_soc_dai *dai,
634 i2s->iis_pclk = clk_get(dev, "iis"); 634 i2s->iis_pclk = clk_get(dev, "iis");
635 if (IS_ERR(i2s->iis_pclk)) { 635 if (IS_ERR(i2s->iis_pclk)) {
636 dev_err(dev, "failed to get iis_clock\n"); 636 dev_err(dev, "failed to get iis_clock\n");
637 iounmap(i2s->regs);
638 return -ENOENT; 637 return -ENOENT;
639 } 638 }
640 639
641 clk_enable(i2s->iis_pclk); 640 clk_prepare_enable(i2s->iis_pclk);
642 641
643 /* Mark ourselves as in TXRX mode so we can run through our cleanup 642 /* Mark ourselves as in TXRX mode so we can run through our cleanup
644 * process without warnings. */ 643 * process without warnings. */
@@ -652,6 +651,15 @@ int s3c_i2sv2_probe(struct snd_soc_dai *dai,
652} 651}
653EXPORT_SYMBOL_GPL(s3c_i2sv2_probe); 652EXPORT_SYMBOL_GPL(s3c_i2sv2_probe);
654 653
654void s3c_i2sv2_cleanup(struct snd_soc_dai *dai,
655 struct s3c_i2sv2_info *i2s)
656{
657 clk_disable_unprepare(i2s->iis_pclk);
658 clk_put(i2s->iis_pclk);
659 i2s->iis_pclk = NULL;
660}
661EXPORT_SYMBOL_GPL(s3c_i2sv2_cleanup);
662
655#ifdef CONFIG_PM 663#ifdef CONFIG_PM
656static int s3c2412_i2s_suspend(struct snd_soc_dai *dai) 664static int s3c2412_i2s_suspend(struct snd_soc_dai *dai)
657{ 665{
diff --git a/sound/soc/samsung/s3c-i2s-v2.h b/sound/soc/samsung/s3c-i2s-v2.h
index 182d80564e37..3fca20f7a853 100644
--- a/sound/soc/samsung/s3c-i2s-v2.h
+++ b/sound/soc/samsung/s3c-i2s-v2.h
@@ -92,6 +92,13 @@ extern int s3c_i2sv2_probe(struct snd_soc_dai *dai,
92 unsigned long base); 92 unsigned long base);
93 93
94/** 94/**
95 * s3c_i2sv2_cleanup - cleanup resources allocated in s3c_i2sv2_probe
96 * @dai: The ASoC DAI structure supplied to the original probe.
97 * @i2s: Our local i2s structure to fill in.
98 */
99extern void s3c_i2sv2_cleanup(struct snd_soc_dai *dai,
100 struct s3c_i2sv2_info *i2s);
101/**
95 * s3c_i2sv2_register_component - register component and dai with soc core 102 * s3c_i2sv2_register_component - register component and dai with soc core
96 * @dev: DAI device 103 * @dev: DAI device
97 * @id: DAI ID 104 * @id: DAI ID
diff --git a/sound/soc/samsung/s3c2412-i2s.c b/sound/soc/samsung/s3c2412-i2s.c
index 0a4718207e6e..cc0840fff5aa 100644
--- a/sound/soc/samsung/s3c2412-i2s.c
+++ b/sound/soc/samsung/s3c2412-i2s.c
@@ -65,26 +65,33 @@ static int s3c2412_i2s_probe(struct snd_soc_dai *dai)
65 s3c2412_i2s.iis_cclk = devm_clk_get(dai->dev, "i2sclk"); 65 s3c2412_i2s.iis_cclk = devm_clk_get(dai->dev, "i2sclk");
66 if (IS_ERR(s3c2412_i2s.iis_cclk)) { 66 if (IS_ERR(s3c2412_i2s.iis_cclk)) {
67 pr_err("failed to get i2sclk clock\n"); 67 pr_err("failed to get i2sclk clock\n");
68 return PTR_ERR(s3c2412_i2s.iis_cclk); 68 ret = PTR_ERR(s3c2412_i2s.iis_cclk);
69 goto err;
69 } 70 }
70 71
71 /* Set MPLL as the source for IIS CLK */ 72 /* Set MPLL as the source for IIS CLK */
72 73
73 clk_set_parent(s3c2412_i2s.iis_cclk, clk_get(NULL, "mpll")); 74 clk_set_parent(s3c2412_i2s.iis_cclk, clk_get(NULL, "mpll"));
74 clk_prepare_enable(s3c2412_i2s.iis_cclk); 75 ret = clk_prepare_enable(s3c2412_i2s.iis_cclk);
75 76 if (ret)
76 s3c2412_i2s.iis_cclk = s3c2412_i2s.iis_pclk; 77 goto err;
77 78
78 /* Configure the I2S pins (GPE0...GPE4) in correct mode */ 79 /* Configure the I2S pins (GPE0...GPE4) in correct mode */
79 s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2), 80 s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
80 S3C_GPIO_PULL_NONE); 81 S3C_GPIO_PULL_NONE);
81 82
82 return 0; 83 return 0;
84
85err:
86 s3c_i2sv2_cleanup(dai, &s3c2412_i2s);
87
88 return ret;
83} 89}
84 90
85static int s3c2412_i2s_remove(struct snd_soc_dai *dai) 91static int s3c2412_i2s_remove(struct snd_soc_dai *dai)
86{ 92{
87 clk_disable_unprepare(s3c2412_i2s.iis_cclk); 93 clk_disable_unprepare(s3c2412_i2s.iis_cclk);
94 s3c_i2sv2_cleanup(dai, &s3c2412_i2s);
88 95
89 return 0; 96 return 0;
90} 97}
diff --git a/sound/soc/samsung/s3c24xx-i2s.c b/sound/soc/samsung/s3c24xx-i2s.c
index 91e6871e5413..8d58d02183bf 100644
--- a/sound/soc/samsung/s3c24xx-i2s.c
+++ b/sound/soc/samsung/s3c24xx-i2s.c
@@ -340,6 +340,7 @@ EXPORT_SYMBOL_GPL(s3c24xx_i2s_get_clockrate);
340 340
341static int s3c24xx_i2s_probe(struct snd_soc_dai *dai) 341static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)
342{ 342{
343 int ret;
343 snd_soc_dai_init_dma_data(dai, &s3c24xx_i2s_pcm_stereo_out, 344 snd_soc_dai_init_dma_data(dai, &s3c24xx_i2s_pcm_stereo_out,
344 &s3c24xx_i2s_pcm_stereo_in); 345 &s3c24xx_i2s_pcm_stereo_in);
345 346
@@ -348,7 +349,9 @@ static int s3c24xx_i2s_probe(struct snd_soc_dai *dai)
348 pr_err("failed to get iis_clock\n"); 349 pr_err("failed to get iis_clock\n");
349 return PTR_ERR(s3c24xx_i2s.iis_clk); 350 return PTR_ERR(s3c24xx_i2s.iis_clk);
350 } 351 }
351 clk_prepare_enable(s3c24xx_i2s.iis_clk); 352 ret = clk_prepare_enable(s3c24xx_i2s.iis_clk);
353 if (ret)
354 return ret;
352 355
353 /* Configure the I2S pins (GPE0...GPE4) in correct mode */ 356 /* Configure the I2S pins (GPE0...GPE4) in correct mode */
354 s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2), 357 s3c_gpio_cfgall_range(S3C2410_GPE(0), 5, S3C_GPIO_SFN(2),
@@ -377,7 +380,11 @@ static int s3c24xx_i2s_suspend(struct snd_soc_dai *cpu_dai)
377 380
378static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai) 381static int s3c24xx_i2s_resume(struct snd_soc_dai *cpu_dai)
379{ 382{
380 clk_prepare_enable(s3c24xx_i2s.iis_clk); 383 int ret;
384
385 ret = clk_prepare_enable(s3c24xx_i2s.iis_clk);
386 if (ret)
387 return ret;
381 388
382 writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON); 389 writel(s3c24xx_i2s.iiscon, s3c24xx_i2s.regs + S3C2410_IISCON);
383 writel(s3c24xx_i2s.iismod, s3c24xx_i2s.regs + S3C2410_IISMOD); 390 writel(s3c24xx_i2s.iismod, s3c24xx_i2s.regs + S3C2410_IISMOD);
diff --git a/sound/soc/samsung/s3c24xx_simtec.c b/sound/soc/samsung/s3c24xx_simtec.c
index dcc008d1e1ab..6de63f3e37d5 100644
--- a/sound/soc/samsung/s3c24xx_simtec.c
+++ b/sound/soc/samsung/s3c24xx_simtec.c
@@ -211,7 +211,7 @@ static int simtec_call_startup(struct s3c24xx_audio_simtec_pdata *pd)
211 return 0; 211 return 0;
212} 212}
213 213
214static struct snd_soc_ops simtec_snd_ops = { 214static const struct snd_soc_ops simtec_snd_ops = {
215 .hw_params = simtec_hw_params, 215 .hw_params = simtec_hw_params,
216}; 216};
217 217
diff --git a/sound/soc/samsung/s3c24xx_uda134x.c b/sound/soc/samsung/s3c24xx_uda134x.c
index 55538e333cc8..5fb3bab6bbfe 100644
--- a/sound/soc/samsung/s3c24xx_uda134x.c
+++ b/sound/soc/samsung/s3c24xx_uda134x.c
@@ -199,7 +199,7 @@ static int s3c24xx_uda134x_hw_params(struct snd_pcm_substream *substream,
199 return 0; 199 return 0;
200} 200}
201 201
202static struct snd_soc_ops s3c24xx_uda134x_ops = { 202static const struct snd_soc_ops s3c24xx_uda134x_ops = {
203 .startup = s3c24xx_uda134x_startup, 203 .startup = s3c24xx_uda134x_startup,
204 .shutdown = s3c24xx_uda134x_shutdown, 204 .shutdown = s3c24xx_uda134x_shutdown,
205 .hw_params = s3c24xx_uda134x_hw_params, 205 .hw_params = s3c24xx_uda134x_hw_params,
@@ -237,7 +237,6 @@ static int s3c24xx_uda134x_probe(struct platform_device *pdev)
237 mutex_init(&priv->clk_lock); 237 mutex_init(&priv->clk_lock);
238 238
239 card->dev = &pdev->dev; 239 card->dev = &pdev->dev;
240 platform_set_drvdata(pdev, card);
241 snd_soc_card_set_drvdata(card, priv); 240 snd_soc_card_set_drvdata(card, priv);
242 241
243 ret = devm_snd_soc_register_card(&pdev->dev, card); 242 ret = devm_snd_soc_register_card(&pdev->dev, card);
diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c
index 425ee2ba37f0..cf0f54e652c1 100644
--- a/sound/soc/samsung/smartq_wm8987.c
+++ b/sound/soc/samsung/smartq_wm8987.c
@@ -160,14 +160,6 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)
160 return err; 160 return err;
161} 161}
162 162
163static int smartq_wm8987_card_remove(struct snd_soc_card *card)
164{
165 snd_soc_jack_free_gpios(&smartq_jack, ARRAY_SIZE(smartq_jack_gpios),
166 smartq_jack_gpios);
167
168 return 0;
169}
170
171static struct snd_soc_dai_link smartq_dai[] = { 163static struct snd_soc_dai_link smartq_dai[] = {
172 { 164 {
173 .name = "wm8987", 165 .name = "wm8987",
@@ -186,7 +178,6 @@ static struct snd_soc_dai_link smartq_dai[] = {
186static struct snd_soc_card snd_soc_smartq = { 178static struct snd_soc_card snd_soc_smartq = {
187 .name = "SmartQ", 179 .name = "SmartQ",
188 .owner = THIS_MODULE, 180 .owner = THIS_MODULE,
189 .remove = smartq_wm8987_card_remove,
190 .dai_link = smartq_dai, 181 .dai_link = smartq_dai,
191 .num_links = ARRAY_SIZE(smartq_dai), 182 .num_links = ARRAY_SIZE(smartq_dai),
192 183
diff --git a/sound/soc/samsung/smdk_spdif.c b/sound/soc/samsung/smdk_spdif.c
index a2f2363fe1c2..7fc7cc6d1530 100644
--- a/sound/soc/samsung/smdk_spdif.c
+++ b/sound/soc/samsung/smdk_spdif.c
@@ -144,7 +144,7 @@ static int smdk_hw_params(struct snd_pcm_substream *substream,
144 return ret; 144 return ret;
145} 145}
146 146
147static struct snd_soc_ops smdk_spdif_ops = { 147static const struct snd_soc_ops smdk_spdif_ops = {
148 .hw_params = smdk_hw_params, 148 .hw_params = smdk_hw_params,
149}; 149};
150 150
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 779504f54bc0..cb59911e65c0 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -391,7 +391,9 @@ static int spdif_probe(struct platform_device *pdev)
391 ret = -ENOENT; 391 ret = -ENOENT;
392 goto err0; 392 goto err0;
393 } 393 }
394 clk_prepare_enable(spdif->pclk); 394 ret = clk_prepare_enable(spdif->pclk);
395 if (ret)
396 goto err0;
395 397
396 spdif->sclk = devm_clk_get(&pdev->dev, "sclk_spdif"); 398 spdif->sclk = devm_clk_get(&pdev->dev, "sclk_spdif");
397 if (IS_ERR(spdif->sclk)) { 399 if (IS_ERR(spdif->sclk)) {
@@ -399,7 +401,9 @@ static int spdif_probe(struct platform_device *pdev)
399 ret = -ENOENT; 401 ret = -ENOENT;
400 goto err1; 402 goto err1;
401 } 403 }
402 clk_prepare_enable(spdif->sclk); 404 ret = clk_prepare_enable(spdif->sclk);
405 if (ret)
406 goto err1;
403 407
404 /* Request S/PDIF Register's memory region */ 408 /* Request S/PDIF Register's memory region */
405 if (!request_mem_region(mem_res->start, 409 if (!request_mem_region(mem_res->start,
diff --git a/sound/soc/samsung/tm2_wm5110.c b/sound/soc/samsung/tm2_wm5110.c
index 24cc9d63ce87..68698f3d72f9 100644
--- a/sound/soc/samsung/tm2_wm5110.c
+++ b/sound/soc/samsung/tm2_wm5110.c
@@ -318,7 +318,7 @@ static const struct snd_kcontrol_new tm2_controls[] = {
318 SOC_DAPM_PIN_SWITCH("Headset Mic"), 318 SOC_DAPM_PIN_SWITCH("Headset Mic"),
319}; 319};
320 320
321const struct snd_soc_dapm_widget tm2_dapm_widgets[] = { 321static const struct snd_soc_dapm_widget tm2_dapm_widgets[] = {
322 SND_SOC_DAPM_HP("HP", NULL), 322 SND_SOC_DAPM_HP("HP", NULL),
323 SND_SOC_DAPM_SPK("SPK", NULL), 323 SND_SOC_DAPM_SPK("SPK", NULL),
324 SND_SOC_DAPM_SPK("RCV", NULL), 324 SND_SOC_DAPM_SPK("RCV", NULL),
@@ -521,7 +521,7 @@ static void tm2_pm_complete(struct device *dev)
521 tm2_start_sysclk(card); 521 tm2_start_sysclk(card);
522} 522}
523 523
524const struct dev_pm_ops tm2_pm_ops = { 524static const struct dev_pm_ops tm2_pm_ops = {
525 .prepare = tm2_pm_prepare, 525 .prepare = tm2_pm_prepare,
526 .suspend = snd_soc_suspend, 526 .suspend = snd_soc_suspend,
527 .resume = snd_soc_resume, 527 .resume = snd_soc_resume,
diff --git a/sound/soc/sh/dma-sh7760.c b/sound/soc/sh/dma-sh7760.c
index 8fad4441c87d..1e7d417b53ef 100644
--- a/sound/soc/sh/dma-sh7760.c
+++ b/sound/soc/sh/dma-sh7760.c
@@ -89,7 +89,7 @@ struct camelot_pcm {
89#define DMABRG_PREALLOC_BUFFER 32 * 1024 89#define DMABRG_PREALLOC_BUFFER 32 * 1024
90#define DMABRG_PREALLOC_BUFFER_MAX 32 * 1024 90#define DMABRG_PREALLOC_BUFFER_MAX 32 * 1024
91 91
92static struct snd_pcm_hardware camelot_pcm_hardware = { 92static const struct snd_pcm_hardware camelot_pcm_hardware = {
93 .info = (SNDRV_PCM_INFO_MMAP | 93 .info = (SNDRV_PCM_INFO_MMAP |
94 SNDRV_PCM_INFO_INTERLEAVED | 94 SNDRV_PCM_INFO_INTERLEAVED |
95 SNDRV_PCM_INFO_BLOCK_TRANSFER | 95 SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -294,7 +294,7 @@ static snd_pcm_uframes_t camelot_pos(struct snd_pcm_substream *substream)
294 return bytes_to_frames(runtime, pos); 294 return bytes_to_frames(runtime, pos);
295} 295}
296 296
297static struct snd_pcm_ops camelot_pcm_ops = { 297static const struct snd_pcm_ops camelot_pcm_ops = {
298 .open = camelot_pcm_open, 298 .open = camelot_pcm_open,
299 .close = camelot_pcm_close, 299 .close = camelot_pcm_close,
300 .ioctl = snd_pcm_lib_ioctl, 300 .ioctl = snd_pcm_lib_ioctl,
@@ -320,7 +320,7 @@ static int camelot_pcm_new(struct snd_soc_pcm_runtime *rtd)
320 return 0; 320 return 0;
321} 321}
322 322
323static struct snd_soc_platform_driver sh7760_soc_platform = { 323static const struct snd_soc_platform_driver sh7760_soc_platform = {
324 .ops = &camelot_pcm_ops, 324 .ops = &camelot_pcm_ops,
325 .pcm_new = camelot_pcm_new, 325 .pcm_new = camelot_pcm_new,
326}; 326};
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 7c4bdd82bb95..6d3c7706d93f 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -1710,7 +1710,7 @@ static const struct snd_soc_dai_ops fsi_dai_ops = {
1710 * pcm ops 1710 * pcm ops
1711 */ 1711 */
1712 1712
1713static struct snd_pcm_hardware fsi_pcm_hardware = { 1713static const struct snd_pcm_hardware fsi_pcm_hardware = {
1714 .info = SNDRV_PCM_INFO_INTERLEAVED | 1714 .info = SNDRV_PCM_INFO_INTERLEAVED |
1715 SNDRV_PCM_INFO_MMAP | 1715 SNDRV_PCM_INFO_MMAP |
1716 SNDRV_PCM_INFO_MMAP_VALID, 1716 SNDRV_PCM_INFO_MMAP_VALID,
@@ -1755,7 +1755,7 @@ static snd_pcm_uframes_t fsi_pointer(struct snd_pcm_substream *substream)
1755 return fsi_sample2frame(fsi, io->buff_sample_pos); 1755 return fsi_sample2frame(fsi, io->buff_sample_pos);
1756} 1756}
1757 1757
1758static struct snd_pcm_ops fsi_pcm_ops = { 1758static const struct snd_pcm_ops fsi_pcm_ops = {
1759 .open = fsi_pcm_open, 1759 .open = fsi_pcm_open,
1760 .ioctl = snd_pcm_lib_ioctl, 1760 .ioctl = snd_pcm_lib_ioctl,
1761 .hw_params = fsi_hw_params, 1761 .hw_params = fsi_hw_params,
@@ -1818,7 +1818,7 @@ static struct snd_soc_dai_driver fsi_soc_dai[] = {
1818 }, 1818 },
1819}; 1819};
1820 1820
1821static struct snd_soc_platform_driver fsi_soc_platform = { 1821static const struct snd_soc_platform_driver fsi_soc_platform = {
1822 .ops = &fsi_pcm_ops, 1822 .ops = &fsi_pcm_ops,
1823 .pcm_new = fsi_pcm_new, 1823 .pcm_new = fsi_pcm_new,
1824}; 1824};
@@ -1962,10 +1962,8 @@ static int fsi_probe(struct platform_device *pdev)
1962 } 1962 }
1963 1963
1964 master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL); 1964 master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL);
1965 if (!master) { 1965 if (!master)
1966 dev_err(&pdev->dev, "Could not allocate master\n");
1967 return -ENOMEM; 1966 return -ENOMEM;
1968 }
1969 1967
1970 master->base = devm_ioremap_nocache(&pdev->dev, 1968 master->base = devm_ioremap_nocache(&pdev->dev,
1971 res->start, resource_size(res)); 1969 res->start, resource_size(res));
@@ -2109,7 +2107,7 @@ static int fsi_resume(struct device *dev)
2109 return 0; 2107 return 0;
2110} 2108}
2111 2109
2112static struct dev_pm_ops fsi_pm_ops = { 2110static const struct dev_pm_ops fsi_pm_ops = {
2113 .suspend = fsi_suspend, 2111 .suspend = fsi_suspend,
2114 .resume = fsi_resume, 2112 .resume = fsi_resume,
2115}; 2113};
diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c
index 672bcd4c252b..ecb057ff9fbb 100644
--- a/sound/soc/sh/migor.c
+++ b/sound/soc/sh/migor.c
@@ -98,7 +98,7 @@ static int migor_hw_free(struct snd_pcm_substream *substream)
98 return 0; 98 return 0;
99} 99}
100 100
101static struct snd_soc_ops migor_dai_ops = { 101static const struct snd_soc_ops migor_dai_ops = {
102 .hw_params = migor_hw_params, 102 .hw_params = migor_hw_params,
103 .hw_free = migor_hw_free, 103 .hw_free = migor_hw_free,
104}; 104};
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 197cb3ec075f..938baff86ef2 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -586,10 +586,8 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
586 int ret; 586 int ret;
587 587
588 adg = devm_kzalloc(dev, sizeof(*adg), GFP_KERNEL); 588 adg = devm_kzalloc(dev, sizeof(*adg), GFP_KERNEL);
589 if (!adg) { 589 if (!adg)
590 dev_err(dev, "ADG allocate failed\n");
591 return -ENOMEM; 590 return -ENOMEM;
592 }
593 591
594 ret = rsnd_mod_init(priv, &adg->mod, &adg_ops, 592 ret = rsnd_mod_init(priv, &adg->mod, &adg_ops,
595 NULL, NULL, 0, 0); 593 NULL, NULL, 0, 0);
@@ -610,6 +608,13 @@ void rsnd_adg_remove(struct rsnd_priv *priv)
610{ 608{
611 struct device *dev = rsnd_priv_to_dev(priv); 609 struct device *dev = rsnd_priv_to_dev(priv);
612 struct device_node *np = dev->of_node; 610 struct device_node *np = dev->of_node;
611 struct rsnd_adg *adg = priv->adg;
612 struct clk *clk;
613 int i;
614
615 for_each_rsnd_clkout(clk, adg, i)
616 if (adg->clkout[i])
617 clk_unregister_fixed_rate(adg->clkout[i]);
613 618
614 of_clk_del_provider(np); 619 of_clk_del_provider(np);
615 620
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 3f2ced26ed37..107133297e8d 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -726,7 +726,6 @@ static int rsnd_soc_set_dai_tdm_slot(struct snd_soc_dai *dai,
726 case 2: 726 case 2:
727 case 6: 727 case 6:
728 case 8: 728 case 8:
729 case 16:
730 /* TDM Extend Mode */ 729 /* TDM Extend Mode */
731 rsnd_rdai_channels_set(rdai, slots); 730 rsnd_rdai_channels_set(rdai, slots);
732 rsnd_rdai_ssi_lane_set(rdai, 1); 731 rsnd_rdai_ssi_lane_set(rdai, 1);
@@ -740,7 +739,7 @@ static int rsnd_soc_set_dai_tdm_slot(struct snd_soc_dai *dai,
740} 739}
741 740
742static unsigned int rsnd_soc_hw_channels_list[] = { 741static unsigned int rsnd_soc_hw_channels_list[] = {
743 2, 6, 8, 16, 742 2, 6, 8,
744}; 743};
745 744
746static unsigned int rsnd_soc_hw_rate_list[] = { 745static unsigned int rsnd_soc_hw_rate_list[] = {
@@ -844,12 +843,28 @@ static int rsnd_soc_hw_rule_channels(struct snd_pcm_hw_params *params,
844 ir, &ic); 843 ir, &ic);
845} 844}
846 845
847static void rsnd_soc_hw_constraint(struct snd_pcm_runtime *runtime, 846static const struct snd_pcm_hardware rsnd_pcm_hardware = {
848 struct snd_soc_dai *dai) 847 .info = SNDRV_PCM_INFO_INTERLEAVED |
848 SNDRV_PCM_INFO_MMAP |
849 SNDRV_PCM_INFO_MMAP_VALID,
850 .buffer_bytes_max = 64 * 1024,
851 .period_bytes_min = 32,
852 .period_bytes_max = 8192,
853 .periods_min = 1,
854 .periods_max = 32,
855 .fifo_size = 256,
856};
857
858static int rsnd_soc_dai_startup(struct snd_pcm_substream *substream,
859 struct snd_soc_dai *dai)
849{ 860{
850 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai); 861 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
862 struct rsnd_priv *priv = rsnd_rdai_to_priv(rdai);
863 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream);
851 struct snd_pcm_hw_constraint_list *constraint = &rdai->constraint; 864 struct snd_pcm_hw_constraint_list *constraint = &rdai->constraint;
865 struct snd_pcm_runtime *runtime = substream->runtime;
852 unsigned int max_channels = rsnd_rdai_channels_get(rdai); 866 unsigned int max_channels = rsnd_rdai_channels_get(rdai);
867 int ret;
853 int i; 868 int i;
854 869
855 /* 870 /*
@@ -866,34 +881,26 @@ static void rsnd_soc_hw_constraint(struct snd_pcm_runtime *runtime,
866 constraint->count = i + 1; 881 constraint->count = i + 1;
867 } 882 }
868 883
884 snd_soc_set_runtime_hwparams(substream, &rsnd_pcm_hardware);
885
869 snd_pcm_hw_constraint_list(runtime, 0, 886 snd_pcm_hw_constraint_list(runtime, 0,
870 SNDRV_PCM_HW_PARAM_CHANNELS, constraint); 887 SNDRV_PCM_HW_PARAM_CHANNELS, constraint);
871 888
889 snd_pcm_hw_constraint_integer(runtime,
890 SNDRV_PCM_HW_PARAM_PERIODS);
891
872 /* 892 /*
873 * Sampling Rate / Channel Limitation 893 * Sampling Rate / Channel Limitation
874 * It depends on Clock Master Mode 894 * It depends on Clock Master Mode
875 */ 895 */
876 if (!rsnd_rdai_is_clk_master(rdai)) 896 if (rsnd_rdai_is_clk_master(rdai)) {
877 return; 897 snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
878 898 rsnd_soc_hw_rule_rate, dai,
879 snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, 899 SNDRV_PCM_HW_PARAM_CHANNELS, -1);
880 rsnd_soc_hw_rule_rate, dai, 900 snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS,
881 SNDRV_PCM_HW_PARAM_CHANNELS, -1); 901 rsnd_soc_hw_rule_channels, dai,
882 snd_pcm_hw_rule_add(runtime, 0, SNDRV_PCM_HW_PARAM_CHANNELS, 902 SNDRV_PCM_HW_PARAM_RATE, -1);
883 rsnd_soc_hw_rule_channels, dai, 903 }
884 SNDRV_PCM_HW_PARAM_RATE, -1);
885}
886
887static int rsnd_soc_dai_startup(struct snd_pcm_substream *substream,
888 struct snd_soc_dai *dai)
889{
890 struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
891 struct rsnd_priv *priv = rsnd_rdai_to_priv(rdai);
892 struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream);
893 int ret;
894
895 /* rsnd_io_to_runtime() is not yet enabled here */
896 rsnd_soc_hw_constraint(substream->runtime, dai);
897 904
898 /* 905 /*
899 * call rsnd_dai_call without spinlock 906 * call rsnd_dai_call without spinlock
@@ -1017,7 +1024,7 @@ static void __rsnd_dai_probe(struct rsnd_priv *priv,
1017 drv->playback.rates = RSND_RATES; 1024 drv->playback.rates = RSND_RATES;
1018 drv->playback.formats = RSND_FMTS; 1025 drv->playback.formats = RSND_FMTS;
1019 drv->playback.channels_min = 2; 1026 drv->playback.channels_min = 2;
1020 drv->playback.channels_max = 16; 1027 drv->playback.channels_max = 8;
1021 drv->playback.stream_name = rdai->playback.name; 1028 drv->playback.stream_name = rdai->playback.name;
1022 1029
1023 snprintf(rdai->capture.name, RSND_DAI_NAME_SIZE, 1030 snprintf(rdai->capture.name, RSND_DAI_NAME_SIZE,
@@ -1025,7 +1032,7 @@ static void __rsnd_dai_probe(struct rsnd_priv *priv,
1025 drv->capture.rates = RSND_RATES; 1032 drv->capture.rates = RSND_RATES;
1026 drv->capture.formats = RSND_FMTS; 1033 drv->capture.formats = RSND_FMTS;
1027 drv->capture.channels_min = 2; 1034 drv->capture.channels_min = 2;
1028 drv->capture.channels_max = 16; 1035 drv->capture.channels_max = 8;
1029 drv->capture.stream_name = rdai->capture.name; 1036 drv->capture.stream_name = rdai->capture.name;
1030 1037
1031 rdai->playback.rdai = rdai; 1038 rdai->playback.rdai = rdai;
@@ -1105,31 +1112,6 @@ static int rsnd_dai_probe(struct rsnd_priv *priv)
1105/* 1112/*
1106 * pcm ops 1113 * pcm ops
1107 */ 1114 */
1108static struct snd_pcm_hardware rsnd_pcm_hardware = {
1109 .info = SNDRV_PCM_INFO_INTERLEAVED |
1110 SNDRV_PCM_INFO_MMAP |
1111 SNDRV_PCM_INFO_MMAP_VALID,
1112 .buffer_bytes_max = 64 * 1024,
1113 .period_bytes_min = 32,
1114 .period_bytes_max = 8192,
1115 .periods_min = 1,
1116 .periods_max = 32,
1117 .fifo_size = 256,
1118};
1119
1120static int rsnd_pcm_open(struct snd_pcm_substream *substream)
1121{
1122 struct snd_pcm_runtime *runtime = substream->runtime;
1123 int ret = 0;
1124
1125 snd_soc_set_runtime_hwparams(substream, &rsnd_pcm_hardware);
1126
1127 ret = snd_pcm_hw_constraint_integer(runtime,
1128 SNDRV_PCM_HW_PARAM_PERIODS);
1129
1130 return ret;
1131}
1132
1133static int rsnd_hw_params(struct snd_pcm_substream *substream, 1115static int rsnd_hw_params(struct snd_pcm_substream *substream,
1134 struct snd_pcm_hw_params *hw_params) 1116 struct snd_pcm_hw_params *hw_params)
1135{ 1117{
@@ -1158,8 +1140,7 @@ static snd_pcm_uframes_t rsnd_pointer(struct snd_pcm_substream *substream)
1158 return pointer; 1140 return pointer;
1159} 1141}
1160 1142
1161static struct snd_pcm_ops rsnd_pcm_ops = { 1143static const struct snd_pcm_ops rsnd_pcm_ops = {
1162 .open = rsnd_pcm_open,
1163 .ioctl = snd_pcm_lib_ioctl, 1144 .ioctl = snd_pcm_lib_ioctl,
1164 .hw_params = rsnd_hw_params, 1145 .hw_params = rsnd_hw_params,
1165 .hw_free = snd_pcm_lib_free_pages, 1146 .hw_free = snd_pcm_lib_free_pages,
@@ -1169,11 +1150,10 @@ static struct snd_pcm_ops rsnd_pcm_ops = {
1169/* 1150/*
1170 * snd_kcontrol 1151 * snd_kcontrol
1171 */ 1152 */
1172#define kcontrol_to_cfg(kctrl) ((struct rsnd_kctrl_cfg *)kctrl->private_value)
1173static int rsnd_kctrl_info(struct snd_kcontrol *kctrl, 1153static int rsnd_kctrl_info(struct snd_kcontrol *kctrl,
1174 struct snd_ctl_elem_info *uinfo) 1154 struct snd_ctl_elem_info *uinfo)
1175{ 1155{
1176 struct rsnd_kctrl_cfg *cfg = kcontrol_to_cfg(kctrl); 1156 struct rsnd_kctrl_cfg *cfg = snd_kcontrol_chip(kctrl);
1177 1157
1178 if (cfg->texts) { 1158 if (cfg->texts) {
1179 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; 1159 uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
@@ -1199,7 +1179,7 @@ static int rsnd_kctrl_info(struct snd_kcontrol *kctrl,
1199static int rsnd_kctrl_get(struct snd_kcontrol *kctrl, 1179static int rsnd_kctrl_get(struct snd_kcontrol *kctrl,
1200 struct snd_ctl_elem_value *uc) 1180 struct snd_ctl_elem_value *uc)
1201{ 1181{
1202 struct rsnd_kctrl_cfg *cfg = kcontrol_to_cfg(kctrl); 1182 struct rsnd_kctrl_cfg *cfg = snd_kcontrol_chip(kctrl);
1203 int i; 1183 int i;
1204 1184
1205 for (i = 0; i < cfg->size; i++) 1185 for (i = 0; i < cfg->size; i++)
@@ -1214,8 +1194,7 @@ static int rsnd_kctrl_get(struct snd_kcontrol *kctrl,
1214static int rsnd_kctrl_put(struct snd_kcontrol *kctrl, 1194static int rsnd_kctrl_put(struct snd_kcontrol *kctrl,
1215 struct snd_ctl_elem_value *uc) 1195 struct snd_ctl_elem_value *uc)
1216{ 1196{
1217 struct rsnd_mod *mod = snd_kcontrol_chip(kctrl); 1197 struct rsnd_kctrl_cfg *cfg = snd_kcontrol_chip(kctrl);
1218 struct rsnd_kctrl_cfg *cfg = kcontrol_to_cfg(kctrl);
1219 int i, change = 0; 1198 int i, change = 0;
1220 1199
1221 if (!cfg->accept(cfg->io)) 1200 if (!cfg->accept(cfg->io))
@@ -1232,7 +1211,7 @@ static int rsnd_kctrl_put(struct snd_kcontrol *kctrl,
1232 } 1211 }
1233 1212
1234 if (change && cfg->update) 1213 if (change && cfg->update)
1235 cfg->update(cfg->io, mod); 1214 cfg->update(cfg->io, cfg->mod);
1236 1215
1237 return change; 1216 return change;
1238} 1217}
@@ -1284,14 +1263,13 @@ int rsnd_kctrl_new(struct rsnd_mod *mod,
1284 .index = rtd->num, 1263 .index = rtd->num,
1285 .get = rsnd_kctrl_get, 1264 .get = rsnd_kctrl_get,
1286 .put = rsnd_kctrl_put, 1265 .put = rsnd_kctrl_put,
1287 .private_value = (unsigned long)cfg,
1288 }; 1266 };
1289 int ret; 1267 int ret;
1290 1268
1291 if (size > RSND_MAX_CHANNELS) 1269 if (size > RSND_MAX_CHANNELS)
1292 return -EINVAL; 1270 return -EINVAL;
1293 1271
1294 kctrl = snd_ctl_new1(&knew, mod); 1272 kctrl = snd_ctl_new1(&knew, cfg);
1295 if (!kctrl) 1273 if (!kctrl)
1296 return -ENOMEM; 1274 return -ENOMEM;
1297 1275
@@ -1307,6 +1285,7 @@ int rsnd_kctrl_new(struct rsnd_mod *mod,
1307 cfg->card = card; 1285 cfg->card = card;
1308 cfg->kctrl = kctrl; 1286 cfg->kctrl = kctrl;
1309 cfg->io = io; 1287 cfg->io = io;
1288 cfg->mod = mod;
1310 1289
1311 return 0; 1290 return 0;
1312} 1291}
@@ -1339,7 +1318,7 @@ static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd)
1339 PREALLOC_BUFFER, PREALLOC_BUFFER_MAX); 1318 PREALLOC_BUFFER, PREALLOC_BUFFER_MAX);
1340} 1319}
1341 1320
1342static struct snd_soc_platform_driver rsnd_soc_platform = { 1321static const struct snd_soc_platform_driver rsnd_soc_platform = {
1343 .ops = &rsnd_pcm_ops, 1322 .ops = &rsnd_pcm_ops,
1344 .pcm_new = rsnd_pcm_new, 1323 .pcm_new = rsnd_pcm_new,
1345}; 1324};
@@ -1422,10 +1401,8 @@ static int rsnd_probe(struct platform_device *pdev)
1422 * init priv data 1401 * init priv data
1423 */ 1402 */
1424 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 1403 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
1425 if (!priv) { 1404 if (!priv)
1426 dev_err(dev, "priv allocate failed\n");
1427 return -ENODEV; 1405 return -ENODEV;
1428 }
1429 1406
1430 priv->pdev = pdev; 1407 priv->pdev = pdev;
1431 priv->flags = (unsigned long)of_device_get_match_data(dev); 1408 priv->flags = (unsigned long)of_device_get_match_data(dev);
diff --git a/sound/soc/sh/rcar/ctu.c b/sound/soc/sh/rcar/ctu.c
index 4ba8f2fe7a4c..e7f53f44165d 100644
--- a/sound/soc/sh/rcar/ctu.c
+++ b/sound/soc/sh/rcar/ctu.c
@@ -394,13 +394,16 @@ int rsnd_ctu_probe(struct rsnd_priv *priv)
394 clk = devm_clk_get(dev, name); 394 clk = devm_clk_get(dev, name);
395 if (IS_ERR(clk)) { 395 if (IS_ERR(clk)) {
396 ret = PTR_ERR(clk); 396 ret = PTR_ERR(clk);
397 of_node_put(np);
397 goto rsnd_ctu_probe_done; 398 goto rsnd_ctu_probe_done;
398 } 399 }
399 400
400 ret = rsnd_mod_init(priv, rsnd_mod_get(ctu), &rsnd_ctu_ops, 401 ret = rsnd_mod_init(priv, rsnd_mod_get(ctu), &rsnd_ctu_ops,
401 clk, rsnd_mod_get_status, RSND_MOD_CTU, i); 402 clk, rsnd_mod_get_status, RSND_MOD_CTU, i);
402 if (ret) 403 if (ret) {
404 of_node_put(np);
403 goto rsnd_ctu_probe_done; 405 goto rsnd_ctu_probe_done;
406 }
404 407
405 i++; 408 i++;
406 } 409 }
diff --git a/sound/soc/sh/rcar/dma.c b/sound/soc/sh/rcar/dma.c
index 60aa5e96a49f..041ec1080d52 100644
--- a/sound/soc/sh/rcar/dma.c
+++ b/sound/soc/sh/rcar/dma.c
@@ -604,8 +604,8 @@ rsnd_gen2_dma_addr(struct rsnd_dai_stream *io,
604 dma_addr_t in_addr; 604 dma_addr_t in_addr;
605 } dma_addrs[3][2][3] = { 605 } dma_addrs[3][2][3] = {
606 /* SRC */ 606 /* SRC */
607 /* Capture */
607 {{{ 0, 0 }, 608 {{{ 0, 0 },
608 /* Capture */
609 { RDMA_SRC_O_N(src, id), RDMA_SRC_I_P(src, id) }, 609 { RDMA_SRC_O_N(src, id), RDMA_SRC_I_P(src, id) },
610 { RDMA_CMD_O_N(src, id), RDMA_SRC_I_P(src, id) } }, 610 { RDMA_CMD_O_N(src, id), RDMA_SRC_I_P(src, id) } },
611 /* Playback */ 611 /* Playback */
diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
index 99d2d9459e75..1743ade3cc55 100644
--- a/sound/soc/sh/rcar/dvc.c
+++ b/sound/soc/sh/rcar/dvc.c
@@ -380,13 +380,16 @@ int rsnd_dvc_probe(struct rsnd_priv *priv)
380 clk = devm_clk_get(dev, name); 380 clk = devm_clk_get(dev, name);
381 if (IS_ERR(clk)) { 381 if (IS_ERR(clk)) {
382 ret = PTR_ERR(clk); 382 ret = PTR_ERR(clk);
383 of_node_put(np);
383 goto rsnd_dvc_probe_done; 384 goto rsnd_dvc_probe_done;
384 } 385 }
385 386
386 ret = rsnd_mod_init(priv, rsnd_mod_get(dvc), &rsnd_dvc_ops, 387 ret = rsnd_mod_init(priv, rsnd_mod_get(dvc), &rsnd_dvc_ops,
387 clk, rsnd_mod_get_status, RSND_MOD_DVC, i); 388 clk, rsnd_mod_get_status, RSND_MOD_DVC, i);
388 if (ret) 389 if (ret) {
390 of_node_put(np);
389 goto rsnd_dvc_probe_done; 391 goto rsnd_dvc_probe_done;
392 }
390 393
391 i++; 394 i++;
392 } 395 }
diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
index ee00e3516911..f04c4100043a 100644
--- a/sound/soc/sh/rcar/gen.c
+++ b/sound/soc/sh/rcar/gen.c
@@ -406,10 +406,8 @@ int rsnd_gen_probe(struct rsnd_priv *priv)
406 int ret; 406 int ret;
407 407
408 gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL); 408 gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL);
409 if (!gen) { 409 if (!gen)
410 dev_err(dev, "GEN allocate failed\n");
411 return -ENOMEM; 410 return -ENOMEM;
412 }
413 411
414 priv->gen = gen; 412 priv->gen = gen;
415 413
diff --git a/sound/soc/sh/rcar/mix.c b/sound/soc/sh/rcar/mix.c
index 195fc7bb22af..6c4826c189a4 100644
--- a/sound/soc/sh/rcar/mix.c
+++ b/sound/soc/sh/rcar/mix.c
@@ -168,13 +168,16 @@ int rsnd_mix_probe(struct rsnd_priv *priv)
168 clk = devm_clk_get(dev, name); 168 clk = devm_clk_get(dev, name);
169 if (IS_ERR(clk)) { 169 if (IS_ERR(clk)) {
170 ret = PTR_ERR(clk); 170 ret = PTR_ERR(clk);
171 of_node_put(np);
171 goto rsnd_mix_probe_done; 172 goto rsnd_mix_probe_done;
172 } 173 }
173 174
174 ret = rsnd_mod_init(priv, rsnd_mod_get(mix), &rsnd_mix_ops, 175 ret = rsnd_mod_init(priv, rsnd_mod_get(mix), &rsnd_mix_ops,
175 clk, rsnd_mod_get_status, RSND_MOD_MIX, i); 176 clk, rsnd_mod_get_status, RSND_MOD_MIX, i);
176 if (ret) 177 if (ret) {
178 of_node_put(np);
177 goto rsnd_mix_probe_done; 179 goto rsnd_mix_probe_done;
180 }
178 181
179 i++; 182 i++;
180 } 183 }
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
index 99c57611df88..c5de71f2dc8c 100644
--- a/sound/soc/sh/rcar/rsnd.h
+++ b/sound/soc/sh/rcar/rsnd.h
@@ -614,6 +614,7 @@ struct rsnd_kctrl_cfg {
614 struct rsnd_dai_stream *io; 614 struct rsnd_dai_stream *io;
615 struct snd_card *card; 615 struct snd_card *card;
616 struct snd_kcontrol *kctrl; 616 struct snd_kcontrol *kctrl;
617 struct rsnd_mod *mod;
617}; 618};
618 619
619#define RSND_MAX_CHANNELS 8 620#define RSND_MAX_CHANNELS 8
diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
index 7aa239e28491..510b68a483b4 100644
--- a/sound/soc/sh/rcar/src.c
+++ b/sound/soc/sh/rcar/src.c
@@ -27,7 +27,6 @@ struct rsnd_src {
27#define RSND_SRC_NAME_SIZE 16 27#define RSND_SRC_NAME_SIZE 16
28 28
29#define rsnd_src_get(priv, id) ((struct rsnd_src *)(priv->src) + id) 29#define rsnd_src_get(priv, id) ((struct rsnd_src *)(priv->src) + id)
30#define rsnd_src_to_dma(src) ((src)->dma)
31#define rsnd_src_nr(priv) ((priv)->src_nr) 30#define rsnd_src_nr(priv) ((priv)->src_nr)
32#define rsnd_src_sync_is_enabled(mod) (rsnd_mod_to_src(mod)->sen.val) 31#define rsnd_src_sync_is_enabled(mod) (rsnd_mod_to_src(mod)->sen.val)
33 32
@@ -108,7 +107,6 @@ unsigned int rsnd_src_get_rate(struct rsnd_priv *priv,
108 int is_play = rsnd_io_is_play(io); 107 int is_play = rsnd_io_is_play(io);
109 108
110 /* 109 /*
111 *
112 * Playback 110 * Playback
113 * runtime_rate -> [SRC] -> convert_rate 111 * runtime_rate -> [SRC] -> convert_rate
114 * 112 *
@@ -203,13 +201,13 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
203 use_src = (fin != fout) | rsnd_src_sync_is_enabled(mod); 201 use_src = (fin != fout) | rsnd_src_sync_is_enabled(mod);
204 202
205 /* 203 /*
206 * SRC_ADINR 204 * SRC_ADINR
207 */ 205 */
208 adinr = rsnd_get_adinr_bit(mod, io) | 206 adinr = rsnd_get_adinr_bit(mod, io) |
209 rsnd_runtime_channel_original(io); 207 rsnd_runtime_channel_original(io);
210 208
211 /* 209 /*
212 * SRC_IFSCR / SRC_IFSVR 210 * SRC_IFSCR / SRC_IFSVR
213 */ 211 */
214 ifscr = 0; 212 ifscr = 0;
215 fsrate = 0; 213 fsrate = 0;
@@ -223,7 +221,7 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
223 } 221 }
224 222
225 /* 223 /*
226 * SRC_SRCCR / SRC_ROUTE_MODE0 224 * SRC_SRCCR / SRC_ROUTE_MODE0
227 */ 225 */
228 cr = 0x00011110; 226 cr = 0x00011110;
229 route = 0x0; 227 route = 0x0;
@@ -581,20 +579,24 @@ int rsnd_src_probe(struct rsnd_priv *priv)
581 src->irq = irq_of_parse_and_map(np, 0); 579 src->irq = irq_of_parse_and_map(np, 0);
582 if (!src->irq) { 580 if (!src->irq) {
583 ret = -EINVAL; 581 ret = -EINVAL;
582 of_node_put(np);
584 goto rsnd_src_probe_done; 583 goto rsnd_src_probe_done;
585 } 584 }
586 585
587 clk = devm_clk_get(dev, name); 586 clk = devm_clk_get(dev, name);
588 if (IS_ERR(clk)) { 587 if (IS_ERR(clk)) {
589 ret = PTR_ERR(clk); 588 ret = PTR_ERR(clk);
589 of_node_put(np);
590 goto rsnd_src_probe_done; 590 goto rsnd_src_probe_done;
591 } 591 }
592 592
593 ret = rsnd_mod_init(priv, rsnd_mod_get(src), 593 ret = rsnd_mod_init(priv, rsnd_mod_get(src),
594 &rsnd_src_ops, clk, rsnd_mod_get_status, 594 &rsnd_src_ops, clk, rsnd_mod_get_status,
595 RSND_MOD_SRC, i); 595 RSND_MOD_SRC, i);
596 if (ret) 596 if (ret) {
597 of_node_put(np);
597 goto rsnd_src_probe_done; 598 goto rsnd_src_probe_done;
599 }
598 600
599skip: 601skip:
600 i++; 602 i++;
diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
index 46feddd78ee2..fffc07e72627 100644
--- a/sound/soc/sh/rcar/ssi.c
+++ b/sound/soc/sh/rcar/ssi.c
@@ -72,6 +72,7 @@ struct rsnd_ssi {
72 u32 cr_own; 72 u32 cr_own;
73 u32 cr_clk; 73 u32 cr_clk;
74 u32 cr_mode; 74 u32 cr_mode;
75 u32 cr_en;
75 u32 wsr; 76 u32 wsr;
76 int chan; 77 int chan;
77 int rate; 78 int rate;
@@ -89,6 +90,7 @@ struct rsnd_ssi {
89#define RSND_SSI_NO_BUSIF (1 << 1) /* SSI+DMA without BUSIF */ 90#define RSND_SSI_NO_BUSIF (1 << 1) /* SSI+DMA without BUSIF */
90#define RSND_SSI_HDMI0 (1 << 2) /* for HDMI0 */ 91#define RSND_SSI_HDMI0 (1 << 2) /* for HDMI0 */
91#define RSND_SSI_HDMI1 (1 << 3) /* for HDMI1 */ 92#define RSND_SSI_HDMI1 (1 << 3) /* for HDMI1 */
93#define RSND_SSI_PROBED (1 << 4)
92 94
93#define for_each_rsnd_ssi(pos, priv, i) \ 95#define for_each_rsnd_ssi(pos, priv, i) \
94 for (i = 0; \ 96 for (i = 0; \
@@ -97,25 +99,27 @@ struct rsnd_ssi {
97 i++) 99 i++)
98 100
99#define rsnd_ssi_get(priv, id) ((struct rsnd_ssi *)(priv->ssi) + id) 101#define rsnd_ssi_get(priv, id) ((struct rsnd_ssi *)(priv->ssi) + id)
100#define rsnd_ssi_to_dma(mod) ((ssi)->dma)
101#define rsnd_ssi_nr(priv) ((priv)->ssi_nr) 102#define rsnd_ssi_nr(priv) ((priv)->ssi_nr)
102#define rsnd_mod_to_ssi(_mod) container_of((_mod), struct rsnd_ssi, mod) 103#define rsnd_mod_to_ssi(_mod) container_of((_mod), struct rsnd_ssi, mod)
103#define rsnd_ssi_mode_flags(p) ((p)->flags) 104#define rsnd_ssi_flags_has(p, f) ((p)->flags & f)
105#define rsnd_ssi_flags_set(p, f) ((p)->flags |= f)
106#define rsnd_ssi_flags_del(p, f) ((p)->flags = ((p)->flags & ~f))
104#define rsnd_ssi_is_parent(ssi, io) ((ssi) == rsnd_io_to_mod_ssip(io)) 107#define rsnd_ssi_is_parent(ssi, io) ((ssi) == rsnd_io_to_mod_ssip(io))
105#define rsnd_ssi_is_multi_slave(mod, io) \ 108#define rsnd_ssi_is_multi_slave(mod, io) \
106 (rsnd_ssi_multi_slaves(io) & (1 << rsnd_mod_id(mod))) 109 (rsnd_ssi_multi_slaves(io) & (1 << rsnd_mod_id(mod)))
107#define rsnd_ssi_is_run_mods(mod, io) \ 110#define rsnd_ssi_is_run_mods(mod, io) \
108 (rsnd_ssi_run_mods(io) & (1 << rsnd_mod_id(mod))) 111 (rsnd_ssi_run_mods(io) & (1 << rsnd_mod_id(mod)))
112#define rsnd_ssi_can_output_clk(mod) (!__rsnd_ssi_is_pin_sharing(mod))
109 113
110int rsnd_ssi_hdmi_port(struct rsnd_dai_stream *io) 114int rsnd_ssi_hdmi_port(struct rsnd_dai_stream *io)
111{ 115{
112 struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io); 116 struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io);
113 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); 117 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
114 118
115 if (rsnd_ssi_mode_flags(ssi) & RSND_SSI_HDMI0) 119 if (rsnd_ssi_flags_has(ssi, RSND_SSI_HDMI0))
116 return RSND_SSI_HDMI_PORT0; 120 return RSND_SSI_HDMI_PORT0;
117 121
118 if (rsnd_ssi_mode_flags(ssi) & RSND_SSI_HDMI1) 122 if (rsnd_ssi_flags_has(ssi, RSND_SSI_HDMI1))
119 return RSND_SSI_HDMI_PORT1; 123 return RSND_SSI_HDMI_PORT1;
120 124
121 return 0; 125 return 0;
@@ -130,7 +134,7 @@ int rsnd_ssi_use_busif(struct rsnd_dai_stream *io)
130 if (!rsnd_ssi_is_dma_mode(mod)) 134 if (!rsnd_ssi_is_dma_mode(mod))
131 return 0; 135 return 0;
132 136
133 if (!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_NO_BUSIF)) 137 if (!(rsnd_ssi_flags_has(ssi, RSND_SSI_NO_BUSIF)))
134 use_busif = 1; 138 use_busif = 1;
135 if (rsnd_io_to_mod_src(io)) 139 if (rsnd_io_to_mod_src(io))
136 use_busif = 1; 140 use_busif = 1;
@@ -255,7 +259,6 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
255 struct device *dev = rsnd_priv_to_dev(priv); 259 struct device *dev = rsnd_priv_to_dev(priv);
256 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); 260 struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
257 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); 261 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
258 struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io);
259 int chan = rsnd_runtime_channel_for_ssi(io); 262 int chan = rsnd_runtime_channel_for_ssi(io);
260 int idx, ret; 263 int idx, ret;
261 unsigned int main_rate; 264 unsigned int main_rate;
@@ -266,7 +269,7 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
266 if (!rsnd_rdai_is_clk_master(rdai)) 269 if (!rsnd_rdai_is_clk_master(rdai))
267 return 0; 270 return 0;
268 271
269 if (ssi_parent_mod && !rsnd_ssi_is_parent(mod, io)) 272 if (!rsnd_ssi_can_output_clk(mod))
270 return 0; 273 return 0;
271 274
272 if (rsnd_ssi_is_multi_slave(mod, io)) 275 if (rsnd_ssi_is_multi_slave(mod, io))
@@ -291,6 +294,16 @@ static int rsnd_ssi_master_clk_start(struct rsnd_mod *mod,
291 if (ret < 0) 294 if (ret < 0)
292 return ret; 295 return ret;
293 296
297 /*
298 * SSI clock will be output contiguously
299 * by below settings.
300 * This means, rsnd_ssi_master_clk_start()
301 * and rsnd_ssi_register_setup() are necessary
302 * for SSI parent
303 *
304 * SSICR : FORCE, SCKD, SWSD
305 * SSIWSR : CONT
306 */
294 ssi->cr_clk = FORCE | SWL_32 | SCKD | SWSD | CKDV(idx); 307 ssi->cr_clk = FORCE | SWL_32 | SCKD | SWSD | CKDV(idx);
295 ssi->wsr = CONT; 308 ssi->wsr = CONT;
296 ssi->rate = rate; 309 ssi->rate = rate;
@@ -307,12 +320,11 @@ static void rsnd_ssi_master_clk_stop(struct rsnd_mod *mod,
307{ 320{
308 struct rsnd_dai *rdai = rsnd_io_to_rdai(io); 321 struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
309 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); 322 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
310 struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io);
311 323
312 if (!rsnd_rdai_is_clk_master(rdai)) 324 if (!rsnd_rdai_is_clk_master(rdai))
313 return; 325 return;
314 326
315 if (ssi_parent_mod && !rsnd_ssi_is_parent(mod, io)) 327 if (!rsnd_ssi_can_output_clk(mod))
316 return; 328 return;
317 329
318 if (ssi->usrcnt > 1) 330 if (ssi->usrcnt > 1)
@@ -335,6 +347,9 @@ static void rsnd_ssi_config_init(struct rsnd_mod *mod,
335 u32 wsr; 347 u32 wsr;
336 int is_tdm; 348 int is_tdm;
337 349
350 if (rsnd_ssi_is_parent(mod, io))
351 return;
352
338 is_tdm = rsnd_runtime_is_ssi_tdm(io); 353 is_tdm = rsnd_runtime_is_ssi_tdm(io);
339 354
340 /* 355 /*
@@ -393,7 +408,8 @@ static void rsnd_ssi_register_setup(struct rsnd_mod *mod)
393 rsnd_mod_write(mod, SSIWSR, ssi->wsr); 408 rsnd_mod_write(mod, SSIWSR, ssi->wsr);
394 rsnd_mod_write(mod, SSICR, ssi->cr_own | 409 rsnd_mod_write(mod, SSICR, ssi->cr_own |
395 ssi->cr_clk | 410 ssi->cr_clk |
396 ssi->cr_mode); /* without EN */ 411 ssi->cr_mode |
412 ssi->cr_en);
397} 413}
398 414
399static void rsnd_ssi_pointer_init(struct rsnd_mod *mod, 415static void rsnd_ssi_pointer_init(struct rsnd_mod *mod,
@@ -472,8 +488,7 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
472 if (ret < 0) 488 if (ret < 0)
473 return ret; 489 return ret;
474 490
475 if (!rsnd_ssi_is_parent(mod, io)) 491 rsnd_ssi_config_init(mod, io);
476 rsnd_ssi_config_init(mod, io);
477 492
478 rsnd_ssi_register_setup(mod); 493 rsnd_ssi_register_setup(mod);
479 494
@@ -544,6 +559,8 @@ static int rsnd_ssi_start(struct rsnd_mod *mod,
544 struct rsnd_dai_stream *io, 559 struct rsnd_dai_stream *io,
545 struct rsnd_priv *priv) 560 struct rsnd_priv *priv)
546{ 561{
562 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
563
547 if (!rsnd_ssi_is_run_mods(mod, io)) 564 if (!rsnd_ssi_is_run_mods(mod, io))
548 return 0; 565 return 0;
549 566
@@ -554,7 +571,19 @@ static int rsnd_ssi_start(struct rsnd_mod *mod,
554 if (rsnd_ssi_multi_slaves_runtime(io)) 571 if (rsnd_ssi_multi_slaves_runtime(io))
555 return 0; 572 return 0;
556 573
557 rsnd_mod_bset(mod, SSICR, EN, EN); 574 /*
575 * EN is for data output.
576 * SSI parent EN is not needed.
577 */
578 if (rsnd_ssi_is_parent(mod, io))
579 return 0;
580
581 ssi->cr_en = EN;
582
583 rsnd_mod_write(mod, SSICR, ssi->cr_own |
584 ssi->cr_clk |
585 ssi->cr_mode |
586 ssi->cr_en);
558 587
559 return 0; 588 return 0;
560} 589}
@@ -569,13 +598,7 @@ static int rsnd_ssi_stop(struct rsnd_mod *mod,
569 if (!rsnd_ssi_is_run_mods(mod, io)) 598 if (!rsnd_ssi_is_run_mods(mod, io))
570 return 0; 599 return 0;
571 600
572 /* 601 if (rsnd_ssi_is_parent(mod, io))
573 * don't stop if not last user
574 * see also
575 * rsnd_ssi_start
576 * rsnd_ssi_interrupt
577 */
578 if (ssi->usrcnt > 1)
579 return 0; 602 return 0;
580 603
581 /* 604 /*
@@ -595,6 +618,8 @@ static int rsnd_ssi_stop(struct rsnd_mod *mod,
595 rsnd_mod_write(mod, SSICR, cr); /* disabled all */ 618 rsnd_mod_write(mod, SSICR, cr); /* disabled all */
596 rsnd_ssi_status_check(mod, IIRQ); 619 rsnd_ssi_status_check(mod, IIRQ);
597 620
621 ssi->cr_en = 0;
622
598 return 0; 623 return 0;
599} 624}
600 625
@@ -760,15 +785,47 @@ static int rsnd_ssi_common_probe(struct rsnd_mod *mod,
760 /* 785 /*
761 * SSI might be called again as PIO fallback 786 * SSI might be called again as PIO fallback
762 * It is easy to manual handling for IRQ request/free 787 * It is easy to manual handling for IRQ request/free
788 *
789 * OTOH, this function might be called many times if platform is
790 * using MIX. It needs xxx_attach() many times on xxx_probe().
791 * Because of it, we can't control .probe/.remove calling count by
792 * mod->status.
793 * But it don't need to call request_irq() many times.
794 * Let's control it by RSND_SSI_PROBED flag.
763 */ 795 */
764 ret = request_irq(ssi->irq, 796 if (!rsnd_ssi_flags_has(ssi, RSND_SSI_PROBED)) {
765 rsnd_ssi_interrupt, 797 ret = request_irq(ssi->irq,
766 IRQF_SHARED, 798 rsnd_ssi_interrupt,
767 dev_name(dev), mod); 799 IRQF_SHARED,
800 dev_name(dev), mod);
801
802 rsnd_ssi_flags_set(ssi, RSND_SSI_PROBED);
803 }
768 804
769 return ret; 805 return ret;
770} 806}
771 807
808static int rsnd_ssi_common_remove(struct rsnd_mod *mod,
809 struct rsnd_dai_stream *io,
810 struct rsnd_priv *priv)
811{
812 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
813 struct rsnd_mod *pure_ssi_mod = rsnd_io_to_mod_ssi(io);
814
815 /* Do nothing if non SSI (= SSI parent, multi SSI) mod */
816 if (pure_ssi_mod != mod)
817 return 0;
818
819 /* PIO will request IRQ again */
820 if (rsnd_ssi_flags_has(ssi, RSND_SSI_PROBED)) {
821 free_irq(ssi->irq, mod);
822
823 rsnd_ssi_flags_del(ssi, RSND_SSI_PROBED);
824 }
825
826 return 0;
827}
828
772static int rsnd_ssi_pointer(struct rsnd_mod *mod, 829static int rsnd_ssi_pointer(struct rsnd_mod *mod,
773 struct rsnd_dai_stream *io, 830 struct rsnd_dai_stream *io,
774 snd_pcm_uframes_t *pointer) 831 snd_pcm_uframes_t *pointer)
@@ -784,6 +841,7 @@ static int rsnd_ssi_pointer(struct rsnd_mod *mod,
784static struct rsnd_mod_ops rsnd_ssi_pio_ops = { 841static struct rsnd_mod_ops rsnd_ssi_pio_ops = {
785 .name = SSI_NAME, 842 .name = SSI_NAME,
786 .probe = rsnd_ssi_common_probe, 843 .probe = rsnd_ssi_common_probe,
844 .remove = rsnd_ssi_common_remove,
787 .init = rsnd_ssi_init, 845 .init = rsnd_ssi_init,
788 .quit = rsnd_ssi_quit, 846 .quit = rsnd_ssi_quit,
789 .start = rsnd_ssi_start, 847 .start = rsnd_ssi_start,
@@ -818,23 +876,6 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
818 return ret; 876 return ret;
819} 877}
820 878
821static int rsnd_ssi_dma_remove(struct rsnd_mod *mod,
822 struct rsnd_dai_stream *io,
823 struct rsnd_priv *priv)
824{
825 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
826 struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io);
827
828 /* Do nothing for SSI parent mod */
829 if (ssi_parent_mod == mod)
830 return 0;
831
832 /* PIO will request IRQ again */
833 free_irq(ssi->irq, mod);
834
835 return 0;
836}
837
838static int rsnd_ssi_fallback(struct rsnd_mod *mod, 879static int rsnd_ssi_fallback(struct rsnd_mod *mod,
839 struct rsnd_dai_stream *io, 880 struct rsnd_dai_stream *io,
840 struct rsnd_priv *priv) 881 struct rsnd_priv *priv)
@@ -876,7 +917,7 @@ static struct rsnd_mod_ops rsnd_ssi_dma_ops = {
876 .name = SSI_NAME, 917 .name = SSI_NAME,
877 .dma_req = rsnd_ssi_dma_req, 918 .dma_req = rsnd_ssi_dma_req,
878 .probe = rsnd_ssi_dma_probe, 919 .probe = rsnd_ssi_dma_probe,
879 .remove = rsnd_ssi_dma_remove, 920 .remove = rsnd_ssi_common_remove,
880 .init = rsnd_ssi_init, 921 .init = rsnd_ssi_init,
881 .quit = rsnd_ssi_quit, 922 .quit = rsnd_ssi_quit,
882 .start = rsnd_ssi_start, 923 .start = rsnd_ssi_start,
@@ -962,13 +1003,13 @@ static void __rsnd_ssi_parse_hdmi_connection(struct rsnd_priv *priv,
962 ssi = rsnd_mod_to_ssi(mod); 1003 ssi = rsnd_mod_to_ssi(mod);
963 1004
964 if (strstr(remote_ep->full_name, "hdmi0")) { 1005 if (strstr(remote_ep->full_name, "hdmi0")) {
965 ssi->flags |= RSND_SSI_HDMI0; 1006 rsnd_ssi_flags_set(ssi, RSND_SSI_HDMI0);
966 dev_dbg(dev, "%s[%d] connected to HDMI0\n", 1007 dev_dbg(dev, "%s[%d] connected to HDMI0\n",
967 rsnd_mod_name(mod), rsnd_mod_id(mod)); 1008 rsnd_mod_name(mod), rsnd_mod_id(mod));
968 } 1009 }
969 1010
970 if (strstr(remote_ep->full_name, "hdmi1")) { 1011 if (strstr(remote_ep->full_name, "hdmi1")) {
971 ssi->flags |= RSND_SSI_HDMI1; 1012 rsnd_ssi_flags_set(ssi, RSND_SSI_HDMI1);
972 dev_dbg(dev, "%s[%d] connected to HDMI1\n", 1013 dev_dbg(dev, "%s[%d] connected to HDMI1\n",
973 rsnd_mod_name(mod), rsnd_mod_id(mod)); 1014 rsnd_mod_name(mod), rsnd_mod_id(mod));
974 } 1015 }
@@ -1001,7 +1042,7 @@ int __rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
1001{ 1042{
1002 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod); 1043 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
1003 1044
1004 return !!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_CLK_PIN_SHARE); 1045 return !!(rsnd_ssi_flags_has(ssi, RSND_SSI_CLK_PIN_SHARE));
1005} 1046}
1006 1047
1007static u32 *rsnd_ssi_get_status(struct rsnd_dai_stream *io, 1048static u32 *rsnd_ssi_get_status(struct rsnd_dai_stream *io,
@@ -1079,18 +1120,20 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
1079 clk = devm_clk_get(dev, name); 1120 clk = devm_clk_get(dev, name);
1080 if (IS_ERR(clk)) { 1121 if (IS_ERR(clk)) {
1081 ret = PTR_ERR(clk); 1122 ret = PTR_ERR(clk);
1123 of_node_put(np);
1082 goto rsnd_ssi_probe_done; 1124 goto rsnd_ssi_probe_done;
1083 } 1125 }
1084 1126
1085 if (of_get_property(np, "shared-pin", NULL)) 1127 if (of_get_property(np, "shared-pin", NULL))
1086 ssi->flags |= RSND_SSI_CLK_PIN_SHARE; 1128 rsnd_ssi_flags_set(ssi, RSND_SSI_CLK_PIN_SHARE);
1087 1129
1088 if (of_get_property(np, "no-busif", NULL)) 1130 if (of_get_property(np, "no-busif", NULL))
1089 ssi->flags |= RSND_SSI_NO_BUSIF; 1131 rsnd_ssi_flags_set(ssi, RSND_SSI_NO_BUSIF);
1090 1132
1091 ssi->irq = irq_of_parse_and_map(np, 0); 1133 ssi->irq = irq_of_parse_and_map(np, 0);
1092 if (!ssi->irq) { 1134 if (!ssi->irq) {
1093 ret = -EINVAL; 1135 ret = -EINVAL;
1136 of_node_put(np);
1094 goto rsnd_ssi_probe_done; 1137 goto rsnd_ssi_probe_done;
1095 } 1138 }
1096 1139
@@ -1101,8 +1144,10 @@ int rsnd_ssi_probe(struct rsnd_priv *priv)
1101 1144
1102 ret = rsnd_mod_init(priv, rsnd_mod_get(ssi), ops, clk, 1145 ret = rsnd_mod_init(priv, rsnd_mod_get(ssi), ops, clk,
1103 rsnd_ssi_get_status, RSND_MOD_SSI, i); 1146 rsnd_ssi_get_status, RSND_MOD_SSI, i);
1104 if (ret) 1147 if (ret) {
1148 of_node_put(np);
1105 goto rsnd_ssi_probe_done; 1149 goto rsnd_ssi_probe_done;
1150 }
1106 1151
1107 i++; 1152 i++;
1108 } 1153 }
diff --git a/sound/soc/sh/rcar/ssiu.c b/sound/soc/sh/rcar/ssiu.c
index bed2c9c0004b..4d948757d300 100644
--- a/sound/soc/sh/rcar/ssiu.c
+++ b/sound/soc/sh/rcar/ssiu.c
@@ -250,7 +250,7 @@ int rsnd_ssiu_probe(struct rsnd_priv *priv)
250{ 250{
251 struct device *dev = rsnd_priv_to_dev(priv); 251 struct device *dev = rsnd_priv_to_dev(priv);
252 struct rsnd_ssiu *ssiu; 252 struct rsnd_ssiu *ssiu;
253 static struct rsnd_mod_ops *ops; 253 struct rsnd_mod_ops *ops;
254 int i, nr, ret; 254 int i, nr, ret;
255 255
256 /* same number to SSI */ 256 /* same number to SSI */
diff --git a/sound/soc/sh/siu_dai.c b/sound/soc/sh/siu_dai.c
index 4a22aadac294..160502947da2 100644
--- a/sound/soc/sh/siu_dai.c
+++ b/sound/soc/sh/siu_dai.c
@@ -333,7 +333,7 @@ static void siu_dai_spbstop(struct siu_port *port_info)
333/* API functions */ 333/* API functions */
334 334
335/* Playback and capture hardware properties are identical */ 335/* Playback and capture hardware properties are identical */
336static struct snd_pcm_hardware siu_dai_pcm_hw = { 336static const struct snd_pcm_hardware siu_dai_pcm_hw = {
337 .info = SNDRV_PCM_INFO_INTERLEAVED, 337 .info = SNDRV_PCM_INFO_INTERLEAVED,
338 .formats = SNDRV_PCM_FMTBIT_S16, 338 .formats = SNDRV_PCM_FMTBIT_S16,
339 .rates = SNDRV_PCM_RATE_8000_48000, 339 .rates = SNDRV_PCM_RATE_8000_48000,
diff --git a/sound/soc/sh/siu_pcm.c b/sound/soc/sh/siu_pcm.c
index 82902f56e82f..3118cb0ee3f2 100644
--- a/sound/soc/sh/siu_pcm.c
+++ b/sound/soc/sh/siu_pcm.c
@@ -593,7 +593,7 @@ static void siu_pcm_free(struct snd_pcm *pcm)
593 dev_dbg(pcm->card->dev, "%s\n", __func__); 593 dev_dbg(pcm->card->dev, "%s\n", __func__);
594} 594}
595 595
596static struct snd_pcm_ops siu_pcm_ops = { 596static const struct snd_pcm_ops siu_pcm_ops = {
597 .open = siu_pcm_open, 597 .open = siu_pcm_open,
598 .close = siu_pcm_close, 598 .close = siu_pcm_close,
599 .ioctl = snd_pcm_lib_ioctl, 599 .ioctl = snd_pcm_lib_ioctl,
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index 206f36bf43e8..2cb8d3b55fbc 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -737,9 +737,6 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
737 } 737 }
738 738
739 /* check client and interface hw capabilities */ 739 /* check client and interface hw capabilities */
740 snprintf(new_name, sizeof(new_name), "%s %s-%d",
741 rtd->dai_link->stream_name, codec_dai->name, num);
742
743 if (codec_dai->driver->playback.channels_min) 740 if (codec_dai->driver->playback.channels_min)
744 playback = 1; 741 playback = 1;
745 if (codec_dai->driver->capture.channels_min) 742 if (codec_dai->driver->capture.channels_min)
@@ -758,21 +755,18 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
758 return -EINVAL; 755 return -EINVAL;
759 } 756 }
760 757
761 if(playback) 758 if (playback)
762 direction = SND_COMPRESS_PLAYBACK; 759 direction = SND_COMPRESS_PLAYBACK;
763 else 760 else
764 direction = SND_COMPRESS_CAPTURE; 761 direction = SND_COMPRESS_CAPTURE;
765 762
766 compr = kzalloc(sizeof(*compr), GFP_KERNEL); 763 compr = kzalloc(sizeof(*compr), GFP_KERNEL);
767 if (compr == NULL) { 764 if (!compr)
768 snd_printk(KERN_ERR "Cannot allocate compr\n");
769 return -ENOMEM; 765 return -ENOMEM;
770 }
771 766
772 compr->ops = devm_kzalloc(rtd->card->dev, sizeof(soc_compr_ops), 767 compr->ops = devm_kzalloc(rtd->card->dev, sizeof(soc_compr_ops),
773 GFP_KERNEL); 768 GFP_KERNEL);
774 if (compr->ops == NULL) { 769 if (!compr->ops) {
775 dev_err(rtd->card->dev, "Cannot allocate compressed ops\n");
776 ret = -ENOMEM; 770 ret = -ENOMEM;
777 goto compr_err; 771 goto compr_err;
778 } 772 }
@@ -797,19 +791,18 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
797 else if (rtd->dai_link->dpcm_capture) 791 else if (rtd->dai_link->dpcm_capture)
798 be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd; 792 be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd;
799 memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops)); 793 memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops));
800 } else 794 } else {
795 snprintf(new_name, sizeof(new_name), "%s %s-%d",
796 rtd->dai_link->stream_name, codec_dai->name, num);
797
801 memcpy(compr->ops, &soc_compr_ops, sizeof(soc_compr_ops)); 798 memcpy(compr->ops, &soc_compr_ops, sizeof(soc_compr_ops));
799 }
802 800
803 /* Add copy callback for not memory mapped DSPs */ 801 /* Add copy callback for not memory mapped DSPs */
804 if (platform->driver->compr_ops && platform->driver->compr_ops->copy) 802 if (platform->driver->compr_ops && platform->driver->compr_ops->copy)
805 compr->ops->copy = soc_compr_copy; 803 compr->ops->copy = soc_compr_copy;
806 804
807 mutex_init(&compr->lock); 805 mutex_init(&compr->lock);
808
809 snprintf(new_name, sizeof(new_name), "%s %s-%d",
810 rtd->dai_link->stream_name,
811 rtd->codec_dai->name, num);
812
813 ret = snd_compress_new(rtd->card->snd_card, num, direction, 806 ret = snd_compress_new(rtd->card->snd_card, num, direction,
814 new_name, compr); 807 new_name, compr);
815 if (ret < 0) { 808 if (ret < 0) {
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 13c875e2392a..e4ea5d4aa8d5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -339,11 +339,12 @@ static void soc_cleanup_component_debugfs(struct snd_soc_component *component)
339static void soc_init_codec_debugfs(struct snd_soc_component *component) 339static void soc_init_codec_debugfs(struct snd_soc_component *component)
340{ 340{
341 struct snd_soc_codec *codec = snd_soc_component_to_codec(component); 341 struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
342 struct dentry *debugfs_reg;
342 343
343 codec->debugfs_reg = debugfs_create_file("codec_reg", 0644, 344 debugfs_reg = debugfs_create_file("codec_reg", 0644,
344 codec->component.debugfs_root, 345 codec->component.debugfs_root,
345 codec, &codec_reg_fops); 346 codec, &codec_reg_fops);
346 if (!codec->debugfs_reg) 347 if (!debugfs_reg)
347 dev_warn(codec->dev, 348 dev_warn(codec->dev,
348 "ASoC: Failed to create codec register debugfs file\n"); 349 "ASoC: Failed to create codec register debugfs file\n");
349} 350}
@@ -494,7 +495,7 @@ static void soc_cleanup_card_debugfs(struct snd_soc_card *card)
494static void snd_soc_debugfs_init(void) 495static void snd_soc_debugfs_init(void)
495{ 496{
496 snd_soc_debugfs_root = debugfs_create_dir("asoc", NULL); 497 snd_soc_debugfs_root = debugfs_create_dir("asoc", NULL);
497 if (IS_ERR(snd_soc_debugfs_root) || !snd_soc_debugfs_root) { 498 if (IS_ERR_OR_NULL(snd_soc_debugfs_root)) {
498 pr_warn("ASoC: Failed to create debugfs directory\n"); 499 pr_warn("ASoC: Failed to create debugfs directory\n");
499 snd_soc_debugfs_root = NULL; 500 snd_soc_debugfs_root = NULL;
500 return; 501 return;
@@ -550,6 +551,54 @@ static inline void snd_soc_debugfs_exit(void)
550 551
551#endif 552#endif
552 553
554static int snd_soc_rtdcom_add(struct snd_soc_pcm_runtime *rtd,
555 struct snd_soc_component *component)
556{
557 struct snd_soc_rtdcom_list *rtdcom;
558 struct snd_soc_rtdcom_list *new_rtdcom;
559
560 for_each_rtdcom(rtd, rtdcom) {
561 /* already connected */
562 if (rtdcom->component == component)
563 return 0;
564 }
565
566 new_rtdcom = kmalloc(sizeof(*new_rtdcom), GFP_KERNEL);
567 if (!new_rtdcom)
568 return -ENOMEM;
569
570 new_rtdcom->component = component;
571 INIT_LIST_HEAD(&new_rtdcom->list);
572
573 list_add_tail(&new_rtdcom->list, &rtd->component_list);
574
575 return 0;
576}
577
578static void snd_soc_rtdcom_del_all(struct snd_soc_pcm_runtime *rtd)
579{
580 struct snd_soc_rtdcom_list *rtdcom1, *rtdcom2;
581
582 for_each_rtdcom_safe(rtd, rtdcom1, rtdcom2)
583 kfree(rtdcom1);
584
585 INIT_LIST_HEAD(&rtd->component_list);
586}
587
588struct snd_soc_component *snd_soc_rtdcom_lookup(struct snd_soc_pcm_runtime *rtd,
589 const char *driver_name)
590{
591 struct snd_soc_rtdcom_list *rtdcom;
592
593 for_each_rtdcom(rtd, rtdcom) {
594 if ((rtdcom->component->driver->name == driver_name) ||
595 strcmp(rtdcom->component->driver->name, driver_name) == 0)
596 return rtdcom->component;
597 }
598
599 return NULL;
600}
601
553struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card, 602struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
554 const char *dai_link, int stream) 603 const char *dai_link, int stream)
555{ 604{
@@ -574,6 +623,7 @@ static struct snd_soc_pcm_runtime *soc_new_pcm_runtime(
574 if (!rtd) 623 if (!rtd)
575 return NULL; 624 return NULL;
576 625
626 INIT_LIST_HEAD(&rtd->component_list);
577 rtd->card = card; 627 rtd->card = card;
578 rtd->dai_link = dai_link; 628 rtd->dai_link = dai_link;
579 rtd->codec_dais = kzalloc(sizeof(struct snd_soc_dai *) * 629 rtd->codec_dais = kzalloc(sizeof(struct snd_soc_dai *) *
@@ -591,6 +641,7 @@ static void soc_free_pcm_runtime(struct snd_soc_pcm_runtime *rtd)
591{ 641{
592 if (rtd && rtd->codec_dais) 642 if (rtd && rtd->codec_dais)
593 kfree(rtd->codec_dais); 643 kfree(rtd->codec_dais);
644 snd_soc_rtdcom_del_all(rtd);
594 kfree(rtd); 645 kfree(rtd);
595} 646}
596 647
@@ -949,7 +1000,7 @@ static struct snd_soc_component *soc_find_component(
949/** 1000/**
950 * snd_soc_find_dai - Find a registered DAI 1001 * snd_soc_find_dai - Find a registered DAI
951 * 1002 *
952 * @dlc: name of the DAI and optional component info to match 1003 * @dlc: name of the DAI or the DAI driver and optional component info to match
953 * 1004 *
954 * This function will search all registered components and their DAIs to 1005 * This function will search all registered components and their DAIs to
955 * find the DAI of the same name. The component's of_node and name 1006 * find the DAI of the same name. The component's of_node and name
@@ -977,7 +1028,9 @@ struct snd_soc_dai *snd_soc_find_dai(
977 if (dlc->name && strcmp(component->name, dlc->name)) 1028 if (dlc->name && strcmp(component->name, dlc->name))
978 continue; 1029 continue;
979 list_for_each_entry(dai, &component->dai_list, list) { 1030 list_for_each_entry(dai, &component->dai_list, list) {
980 if (dlc->dai_name && strcmp(dai->name, dlc->dai_name)) 1031 if (dlc->dai_name && strcmp(dai->name, dlc->dai_name)
1032 && (!dai->driver->name
1033 || strcmp(dai->driver->name, dlc->dai_name)))
981 continue; 1034 continue;
982 1035
983 return dai; 1036 return dai;
@@ -1049,6 +1102,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
1049 struct snd_soc_pcm_runtime *rtd; 1102 struct snd_soc_pcm_runtime *rtd;
1050 struct snd_soc_dai_link_component *codecs = dai_link->codecs; 1103 struct snd_soc_dai_link_component *codecs = dai_link->codecs;
1051 struct snd_soc_dai_link_component cpu_dai_component; 1104 struct snd_soc_dai_link_component cpu_dai_component;
1105 struct snd_soc_component *component;
1052 struct snd_soc_dai **codec_dais; 1106 struct snd_soc_dai **codec_dais;
1053 struct snd_soc_platform *platform; 1107 struct snd_soc_platform *platform;
1054 struct device_node *platform_of_node; 1108 struct device_node *platform_of_node;
@@ -1076,6 +1130,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
1076 dai_link->cpu_dai_name); 1130 dai_link->cpu_dai_name);
1077 goto _err_defer; 1131 goto _err_defer;
1078 } 1132 }
1133 snd_soc_rtdcom_add(rtd, rtd->cpu_dai->component);
1079 1134
1080 rtd->num_codecs = dai_link->num_codecs; 1135 rtd->num_codecs = dai_link->num_codecs;
1081 1136
@@ -1088,6 +1143,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
1088 codecs[i].dai_name); 1143 codecs[i].dai_name);
1089 goto _err_defer; 1144 goto _err_defer;
1090 } 1145 }
1146 snd_soc_rtdcom_add(rtd, codec_dais[i]->component);
1091 } 1147 }
1092 1148
1093 /* Single codec links expect codec and codec_dai in runtime data */ 1149 /* Single codec links expect codec and codec_dai in runtime data */
@@ -1100,6 +1156,23 @@ static int soc_bind_dai_link(struct snd_soc_card *card,
1100 platform_name = "snd-soc-dummy"; 1156 platform_name = "snd-soc-dummy";
1101 1157
1102 /* find one from the set of registered platforms */ 1158 /* find one from the set of registered platforms */
1159 list_for_each_entry(component, &component_list, list) {
1160 platform_of_node = component->dev->of_node;
1161 if (!platform_of_node && component->dev->parent->of_node)
1162 platform_of_node = component->dev->parent->of_node;
1163
1164 if (dai_link->platform_of_node) {
1165 if (platform_of_node != dai_link->platform_of_node)
1166 continue;
1167 } else {
1168 if (strcmp(component->name, platform_name))
1169 continue;
1170 }
1171
1172 snd_soc_rtdcom_add(rtd, component);
1173 }
1174
1175 /* find one from the set of registered platforms */
1103 list_for_each_entry(platform, &platform_list, list) { 1176 list_for_each_entry(platform, &platform_list, list) {
1104 platform_of_node = platform->dev->of_node; 1177 platform_of_node = platform->dev->of_node;
1105 if (!platform_of_node && platform->dev->parent->of_node) 1178 if (!platform_of_node && platform->dev->parent->of_node)
@@ -1184,27 +1257,15 @@ static void soc_remove_link_dais(struct snd_soc_card *card,
1184static void soc_remove_link_components(struct snd_soc_card *card, 1257static void soc_remove_link_components(struct snd_soc_card *card,
1185 struct snd_soc_pcm_runtime *rtd, int order) 1258 struct snd_soc_pcm_runtime *rtd, int order)
1186{ 1259{
1187 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
1188 struct snd_soc_platform *platform = rtd->platform;
1189 struct snd_soc_component *component; 1260 struct snd_soc_component *component;
1190 int i; 1261 struct snd_soc_rtdcom_list *rtdcom;
1191 1262
1192 /* remove the platform */ 1263 for_each_rtdcom(rtd, rtdcom) {
1193 if (platform && platform->component.driver->remove_order == order) 1264 component = rtdcom->component;
1194 soc_remove_component(&platform->component);
1195 1265
1196 /* remove the CODEC-side CODEC */
1197 for (i = 0; i < rtd->num_codecs; i++) {
1198 component = rtd->codec_dais[i]->component;
1199 if (component->driver->remove_order == order) 1266 if (component->driver->remove_order == order)
1200 soc_remove_component(component); 1267 soc_remove_component(component);
1201 } 1268 }
1202
1203 /* remove any CPU-side CODEC */
1204 if (cpu_dai) {
1205 if (cpu_dai->component->driver->remove_order == order)
1206 soc_remove_component(cpu_dai->component);
1207 }
1208} 1269}
1209 1270
1210static void soc_remove_dai_links(struct snd_soc_card *card) 1271static void soc_remove_dai_links(struct snd_soc_card *card)
@@ -1451,9 +1512,10 @@ static int soc_probe_component(struct snd_soc_card *card,
1451 1512
1452 soc_init_component_debugfs(component); 1513 soc_init_component_debugfs(component);
1453 1514
1454 if (component->dapm_widgets) { 1515 if (component->driver->dapm_widgets) {
1455 ret = snd_soc_dapm_new_controls(dapm, component->dapm_widgets, 1516 ret = snd_soc_dapm_new_controls(dapm,
1456 component->num_dapm_widgets); 1517 component->driver->dapm_widgets,
1518 component->driver->num_dapm_widgets);
1457 1519
1458 if (ret != 0) { 1520 if (ret != 0) {
1459 dev_err(component->dev, 1521 dev_err(component->dev,
@@ -1495,12 +1557,14 @@ static int soc_probe_component(struct snd_soc_card *card,
1495 } 1557 }
1496 } 1558 }
1497 1559
1498 if (component->controls) 1560 if (component->driver->controls)
1499 snd_soc_add_component_controls(component, component->controls, 1561 snd_soc_add_component_controls(component,
1500 component->num_controls); 1562 component->driver->controls,
1501 if (component->dapm_routes) 1563 component->driver->num_controls);
1502 snd_soc_dapm_add_routes(dapm, component->dapm_routes, 1564 if (component->driver->dapm_routes)
1503 component->num_dapm_routes); 1565 snd_soc_dapm_add_routes(dapm,
1566 component->driver->dapm_routes,
1567 component->driver->num_dapm_routes);
1504 1568
1505 list_add(&dapm->list, &card->dapm_list); 1569 list_add(&dapm->list, &card->dapm_list);
1506 list_add(&component->card_list, &card->component_dev_list); 1570 list_add(&component->card_list, &card->component_dev_list);
@@ -1556,21 +1620,13 @@ static int soc_probe_link_components(struct snd_soc_card *card,
1556 struct snd_soc_pcm_runtime *rtd, 1620 struct snd_soc_pcm_runtime *rtd,
1557 int order) 1621 int order)
1558{ 1622{
1559 struct snd_soc_platform *platform = rtd->platform;
1560 struct snd_soc_component *component; 1623 struct snd_soc_component *component;
1561 int i, ret; 1624 struct snd_soc_rtdcom_list *rtdcom;
1625 int ret;
1562 1626
1563 /* probe the CPU-side component, if it is a CODEC */ 1627 for_each_rtdcom(rtd, rtdcom) {
1564 component = rtd->cpu_dai->component; 1628 component = rtdcom->component;
1565 if (component->driver->probe_order == order) {
1566 ret = soc_probe_component(card, component);
1567 if (ret < 0)
1568 return ret;
1569 }
1570 1629
1571 /* probe the CODEC-side components */
1572 for (i = 0; i < rtd->num_codecs; i++) {
1573 component = rtd->codec_dais[i]->component;
1574 if (component->driver->probe_order == order) { 1630 if (component->driver->probe_order == order) {
1575 ret = soc_probe_component(card, component); 1631 ret = soc_probe_component(card, component);
1576 if (ret < 0) 1632 if (ret < 0)
@@ -1578,13 +1634,6 @@ static int soc_probe_link_components(struct snd_soc_card *card,
1578 } 1634 }
1579 } 1635 }
1580 1636
1581 /* probe the platform */
1582 if (platform->component.driver->probe_order == order) {
1583 ret = soc_probe_component(card, &platform->component);
1584 if (ret < 0)
1585 return ret;
1586 }
1587
1588 return 0; 1637 return 0;
1589} 1638}
1590 1639
@@ -2587,11 +2636,9 @@ int snd_soc_dai_set_sysclk(struct snd_soc_dai *dai, int clk_id,
2587{ 2636{
2588 if (dai->driver && dai->driver->ops->set_sysclk) 2637 if (dai->driver && dai->driver->ops->set_sysclk)
2589 return dai->driver->ops->set_sysclk(dai, clk_id, freq, dir); 2638 return dai->driver->ops->set_sysclk(dai, clk_id, freq, dir);
2590 else if (dai->codec && dai->codec->driver->set_sysclk) 2639
2591 return dai->codec->driver->set_sysclk(dai->codec, clk_id, 0, 2640 return snd_soc_component_set_sysclk(dai->component, clk_id, 0,
2592 freq, dir); 2641 freq, dir);
2593 else
2594 return -ENOTSUPP;
2595} 2642}
2596EXPORT_SYMBOL_GPL(snd_soc_dai_set_sysclk); 2643EXPORT_SYMBOL_GPL(snd_soc_dai_set_sysclk);
2597 2644
@@ -2617,6 +2664,32 @@ int snd_soc_codec_set_sysclk(struct snd_soc_codec *codec, int clk_id,
2617EXPORT_SYMBOL_GPL(snd_soc_codec_set_sysclk); 2664EXPORT_SYMBOL_GPL(snd_soc_codec_set_sysclk);
2618 2665
2619/** 2666/**
2667 * snd_soc_component_set_sysclk - configure COMPONENT system or master clock.
2668 * @component: COMPONENT
2669 * @clk_id: DAI specific clock ID
2670 * @source: Source for the clock
2671 * @freq: new clock frequency in Hz
2672 * @dir: new clock direction - input/output.
2673 *
2674 * Configures the CODEC master (MCLK) or system (SYSCLK) clocking.
2675 */
2676int snd_soc_component_set_sysclk(struct snd_soc_component *component, int clk_id,
2677 int source, unsigned int freq, int dir)
2678{
2679 /* will be removed */
2680 if (component->set_sysclk)
2681 return component->set_sysclk(component, clk_id, source,
2682 freq, dir);
2683
2684 if (component->driver->set_sysclk)
2685 return component->driver->set_sysclk(component, clk_id, source,
2686 freq, dir);
2687
2688 return -ENOTSUPP;
2689}
2690EXPORT_SYMBOL_GPL(snd_soc_component_set_sysclk);
2691
2692/**
2620 * snd_soc_dai_set_clkdiv - configure DAI clock dividers. 2693 * snd_soc_dai_set_clkdiv - configure DAI clock dividers.
2621 * @dai: DAI 2694 * @dai: DAI
2622 * @div_id: DAI specific clock divider ID 2695 * @div_id: DAI specific clock divider ID
@@ -2652,11 +2725,9 @@ int snd_soc_dai_set_pll(struct snd_soc_dai *dai, int pll_id, int source,
2652 if (dai->driver && dai->driver->ops->set_pll) 2725 if (dai->driver && dai->driver->ops->set_pll)
2653 return dai->driver->ops->set_pll(dai, pll_id, source, 2726 return dai->driver->ops->set_pll(dai, pll_id, source,
2654 freq_in, freq_out); 2727 freq_in, freq_out);
2655 else if (dai->codec && dai->codec->driver->set_pll) 2728
2656 return dai->codec->driver->set_pll(dai->codec, pll_id, source, 2729 return snd_soc_component_set_pll(dai->component, pll_id, source,
2657 freq_in, freq_out); 2730 freq_in, freq_out);
2658 else
2659 return -EINVAL;
2660} 2731}
2661EXPORT_SYMBOL_GPL(snd_soc_dai_set_pll); 2732EXPORT_SYMBOL_GPL(snd_soc_dai_set_pll);
2662 2733
@@ -2681,6 +2752,33 @@ int snd_soc_codec_set_pll(struct snd_soc_codec *codec, int pll_id, int source,
2681} 2752}
2682EXPORT_SYMBOL_GPL(snd_soc_codec_set_pll); 2753EXPORT_SYMBOL_GPL(snd_soc_codec_set_pll);
2683 2754
2755/*
2756 * snd_soc_component_set_pll - configure component PLL.
2757 * @component: COMPONENT
2758 * @pll_id: DAI specific PLL ID
2759 * @source: DAI specific source for the PLL
2760 * @freq_in: PLL input clock frequency in Hz
2761 * @freq_out: requested PLL output clock frequency in Hz
2762 *
2763 * Configures and enables PLL to generate output clock based on input clock.
2764 */
2765int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
2766 int source, unsigned int freq_in,
2767 unsigned int freq_out)
2768{
2769 /* will be removed */
2770 if (component->set_pll)
2771 return component->set_pll(component, pll_id, source,
2772 freq_in, freq_out);
2773
2774 if (component->driver->set_pll)
2775 return component->driver->set_pll(component, pll_id, source,
2776 freq_in, freq_out);
2777
2778 return -EINVAL;
2779}
2780EXPORT_SYMBOL_GPL(snd_soc_component_set_pll);
2781
2684/** 2782/**
2685 * snd_soc_dai_set_bclk_ratio - configure BCLK to sample rate ratio. 2783 * snd_soc_dai_set_bclk_ratio - configure BCLK to sample rate ratio.
2686 * @dai: DAI 2784 * @dai: DAI
@@ -3171,8 +3269,11 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
3171 component->remove = component->driver->remove; 3269 component->remove = component->driver->remove;
3172 component->suspend = component->driver->suspend; 3270 component->suspend = component->driver->suspend;
3173 component->resume = component->driver->resume; 3271 component->resume = component->driver->resume;
3272 component->set_sysclk = component->driver->set_sysclk;
3273 component->set_pll = component->driver->set_pll;
3274 component->set_jack = component->driver->set_jack;
3174 3275
3175 dapm = &component->dapm; 3276 dapm = snd_soc_component_get_dapm(component);
3176 dapm->dev = dev; 3277 dapm->dev = dev;
3177 dapm->component = component; 3278 dapm->component = component;
3178 dapm->bias_level = SND_SOC_BIAS_OFF; 3279 dapm->bias_level = SND_SOC_BIAS_OFF;
@@ -3182,13 +3283,6 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
3182 if (driver->stream_event) 3283 if (driver->stream_event)
3183 dapm->stream_event = snd_soc_component_stream_event; 3284 dapm->stream_event = snd_soc_component_stream_event;
3184 3285
3185 component->controls = driver->controls;
3186 component->num_controls = driver->num_controls;
3187 component->dapm_widgets = driver->dapm_widgets;
3188 component->num_dapm_widgets = driver->num_dapm_widgets;
3189 component->dapm_routes = driver->dapm_routes;
3190 component->num_dapm_routes = driver->num_dapm_routes;
3191
3192 INIT_LIST_HEAD(&component->dai_list); 3286 INIT_LIST_HEAD(&component->dai_list);
3193 mutex_init(&component->io_mutex); 3287 mutex_init(&component->io_mutex);
3194 3288
@@ -3280,67 +3374,79 @@ static void snd_soc_component_del_unlocked(struct snd_soc_component *component)
3280} 3374}
3281 3375
3282int snd_soc_register_component(struct device *dev, 3376int snd_soc_register_component(struct device *dev,
3283 const struct snd_soc_component_driver *cmpnt_drv, 3377 const struct snd_soc_component_driver *component_driver,
3284 struct snd_soc_dai_driver *dai_drv, 3378 struct snd_soc_dai_driver *dai_drv,
3285 int num_dai) 3379 int num_dai)
3286{ 3380{
3287 struct snd_soc_component *cmpnt; 3381 struct snd_soc_component *component;
3288 int ret; 3382 int ret;
3289 3383
3290 cmpnt = kzalloc(sizeof(*cmpnt), GFP_KERNEL); 3384 component = kzalloc(sizeof(*component), GFP_KERNEL);
3291 if (!cmpnt) { 3385 if (!component) {
3292 dev_err(dev, "ASoC: Failed to allocate memory\n"); 3386 dev_err(dev, "ASoC: Failed to allocate memory\n");
3293 return -ENOMEM; 3387 return -ENOMEM;
3294 } 3388 }
3295 3389
3296 ret = snd_soc_component_initialize(cmpnt, cmpnt_drv, dev); 3390 ret = snd_soc_component_initialize(component, component_driver, dev);
3297 if (ret) 3391 if (ret)
3298 goto err_free; 3392 goto err_free;
3299 3393
3300 cmpnt->ignore_pmdown_time = true; 3394 component->ignore_pmdown_time = true;
3301 cmpnt->registered_as_component = true; 3395 component->registered_as_component = true;
3302 3396
3303 ret = snd_soc_register_dais(cmpnt, dai_drv, num_dai, true); 3397 ret = snd_soc_register_dais(component, dai_drv, num_dai, true);
3304 if (ret < 0) { 3398 if (ret < 0) {
3305 dev_err(dev, "ASoC: Failed to register DAIs: %d\n", ret); 3399 dev_err(dev, "ASoC: Failed to register DAIs: %d\n", ret);
3306 goto err_cleanup; 3400 goto err_cleanup;
3307 } 3401 }
3308 3402
3309 snd_soc_component_add(cmpnt); 3403 snd_soc_component_add(component);
3310 3404
3311 return 0; 3405 return 0;
3312 3406
3313err_cleanup: 3407err_cleanup:
3314 snd_soc_component_cleanup(cmpnt); 3408 snd_soc_component_cleanup(component);
3315err_free: 3409err_free:
3316 kfree(cmpnt); 3410 kfree(component);
3317 return ret; 3411 return ret;
3318} 3412}
3319EXPORT_SYMBOL_GPL(snd_soc_register_component); 3413EXPORT_SYMBOL_GPL(snd_soc_register_component);
3320 3414
3321/** 3415/**
3322 * snd_soc_unregister_component - Unregister a component from the ASoC core 3416 * snd_soc_unregister_component - Unregister all related component
3417 * from the ASoC core
3323 * 3418 *
3324 * @dev: The device to unregister 3419 * @dev: The device to unregister
3325 */ 3420 */
3326void snd_soc_unregister_component(struct device *dev) 3421static int __snd_soc_unregister_component(struct device *dev)
3327{ 3422{
3328 struct snd_soc_component *cmpnt; 3423 struct snd_soc_component *component;
3424 int found = 0;
3329 3425
3330 mutex_lock(&client_mutex); 3426 mutex_lock(&client_mutex);
3331 list_for_each_entry(cmpnt, &component_list, list) { 3427 list_for_each_entry(component, &component_list, list) {
3332 if (dev == cmpnt->dev && cmpnt->registered_as_component) 3428 if (dev != component->dev ||
3333 goto found; 3429 !component->registered_as_component)
3430 continue;
3431
3432 snd_soc_tplg_component_remove(component, SND_SOC_TPLG_INDEX_ALL);
3433 snd_soc_component_del_unlocked(component);
3434 found = 1;
3435 break;
3334 } 3436 }
3335 mutex_unlock(&client_mutex); 3437 mutex_unlock(&client_mutex);
3336 return;
3337 3438
3338found: 3439 if (found) {
3339 snd_soc_tplg_component_remove(cmpnt, SND_SOC_TPLG_INDEX_ALL); 3440 snd_soc_component_cleanup(component);
3340 snd_soc_component_del_unlocked(cmpnt); 3441 kfree(component);
3341 mutex_unlock(&client_mutex); 3442 }
3342 snd_soc_component_cleanup(cmpnt); 3443
3343 kfree(cmpnt); 3444 return found;
3445}
3446
3447void snd_soc_unregister_component(struct device *dev)
3448{
3449 while (__snd_soc_unregister_component(dev));
3344} 3450}
3345EXPORT_SYMBOL_GPL(snd_soc_unregister_component); 3451EXPORT_SYMBOL_GPL(snd_soc_unregister_component);
3346 3452
@@ -3557,6 +3663,31 @@ static int snd_soc_codec_drv_read(struct snd_soc_component *component,
3557 return 0; 3663 return 0;
3558} 3664}
3559 3665
3666static int snd_soc_codec_set_sysclk_(struct snd_soc_component *component,
3667 int clk_id, int source, unsigned int freq, int dir)
3668{
3669 struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
3670
3671 return snd_soc_codec_set_sysclk(codec, clk_id, source, freq, dir);
3672}
3673
3674static int snd_soc_codec_set_pll_(struct snd_soc_component *component,
3675 int pll_id, int source, unsigned int freq_in,
3676 unsigned int freq_out)
3677{
3678 struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
3679
3680 return snd_soc_codec_set_pll(codec, pll_id, source, freq_in, freq_out);
3681}
3682
3683static int snd_soc_codec_set_jack_(struct snd_soc_component *component,
3684 struct snd_soc_jack *jack, void *data)
3685{
3686 struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
3687
3688 return snd_soc_codec_set_jack(codec, jack, data);
3689}
3690
3560static int snd_soc_codec_set_bias_level(struct snd_soc_dapm_context *dapm, 3691static int snd_soc_codec_set_bias_level(struct snd_soc_dapm_context *dapm,
3561 enum snd_soc_bias_level level) 3692 enum snd_soc_bias_level level)
3562{ 3693{
@@ -3608,6 +3739,12 @@ int snd_soc_register_codec(struct device *dev,
3608 codec->component.write = snd_soc_codec_drv_write; 3739 codec->component.write = snd_soc_codec_drv_write;
3609 if (codec_drv->read) 3740 if (codec_drv->read)
3610 codec->component.read = snd_soc_codec_drv_read; 3741 codec->component.read = snd_soc_codec_drv_read;
3742 if (codec_drv->set_sysclk)
3743 codec->component.set_sysclk = snd_soc_codec_set_sysclk_;
3744 if (codec_drv->set_pll)
3745 codec->component.set_pll = snd_soc_codec_set_pll_;
3746 if (codec_drv->set_jack)
3747 codec->component.set_jack = snd_soc_codec_set_jack_;
3611 codec->component.ignore_pmdown_time = codec_drv->ignore_pmdown_time; 3748 codec->component.ignore_pmdown_time = codec_drv->ignore_pmdown_time;
3612 3749
3613 dapm = snd_soc_codec_get_dapm(codec); 3750 dapm = snd_soc_codec_get_dapm(codec);
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 7daf21fee355..99902ae1a2d9 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -22,6 +22,12 @@
22#include <linux/suspend.h> 22#include <linux/suspend.h>
23#include <trace/events/asoc.h> 23#include <trace/events/asoc.h>
24 24
25struct jack_gpio_tbl {
26 int count;
27 struct snd_soc_jack *jack;
28 struct snd_soc_jack_gpio *gpios;
29};
30
25/** 31/**
26 * snd_soc_codec_set_jack - configure codec jack. 32 * snd_soc_codec_set_jack - configure codec jack.
27 * @codec: CODEC 33 * @codec: CODEC
@@ -36,11 +42,33 @@ int snd_soc_codec_set_jack(struct snd_soc_codec *codec,
36 if (codec->driver->set_jack) 42 if (codec->driver->set_jack)
37 return codec->driver->set_jack(codec, jack, data); 43 return codec->driver->set_jack(codec, jack, data);
38 else 44 else
39 return -EINVAL; 45 return -ENOTSUPP;
40} 46}
41EXPORT_SYMBOL_GPL(snd_soc_codec_set_jack); 47EXPORT_SYMBOL_GPL(snd_soc_codec_set_jack);
42 48
43/** 49/**
50 * snd_soc_component_set_jack - configure component jack.
51 * @component: COMPONENTs
52 * @jack: structure to use for the jack
53 * @data: can be used if codec driver need extra data for configuring jack
54 *
55 * Configures and enables jack detection function.
56 */
57int snd_soc_component_set_jack(struct snd_soc_component *component,
58 struct snd_soc_jack *jack, void *data)
59{
60 /* will be removed */
61 if (component->set_jack)
62 return component->set_jack(component, jack, data);
63
64 if (component->driver->set_jack)
65 return component->driver->set_jack(component, jack, data);
66
67 return -ENOTSUPP;
68}
69EXPORT_SYMBOL_GPL(snd_soc_component_set_jack);
70
71/**
44 * snd_soc_card_jack_new - Create a new jack 72 * snd_soc_card_jack_new - Create a new jack
45 * @card: ASoC card 73 * @card: ASoC card
46 * @id: an identifying string for this jack 74 * @id: an identifying string for this jack
@@ -333,6 +361,28 @@ static int snd_soc_jack_pm_notifier(struct notifier_block *nb,
333 return NOTIFY_DONE; 361 return NOTIFY_DONE;
334} 362}
335 363
364static void jack_free_gpios(struct snd_soc_jack *jack, int count,
365 struct snd_soc_jack_gpio *gpios)
366{
367 int i;
368
369 for (i = 0; i < count; i++) {
370 gpiod_unexport(gpios[i].desc);
371 unregister_pm_notifier(&gpios[i].pm_notifier);
372 free_irq(gpiod_to_irq(gpios[i].desc), &gpios[i]);
373 cancel_delayed_work_sync(&gpios[i].work);
374 gpiod_put(gpios[i].desc);
375 gpios[i].jack = NULL;
376 }
377}
378
379static void jack_devres_free_gpios(struct device *dev, void *res)
380{
381 struct jack_gpio_tbl *tbl = res;
382
383 jack_free_gpios(tbl->jack, tbl->count, tbl->gpios);
384}
385
336/** 386/**
337 * snd_soc_jack_add_gpios - Associate GPIO pins with an ASoC jack 387 * snd_soc_jack_add_gpios - Associate GPIO pins with an ASoC jack
338 * 388 *
@@ -347,6 +397,14 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
347 struct snd_soc_jack_gpio *gpios) 397 struct snd_soc_jack_gpio *gpios)
348{ 398{
349 int i, ret; 399 int i, ret;
400 struct jack_gpio_tbl *tbl;
401
402 tbl = devres_alloc(jack_devres_free_gpios, sizeof(*tbl), GFP_KERNEL);
403 if (!tbl)
404 return -ENOMEM;
405 tbl->jack = jack;
406 tbl->count = count;
407 tbl->gpios = gpios;
350 408
351 for (i = 0; i < count; i++) { 409 for (i = 0; i < count; i++) {
352 if (!gpios[i].name) { 410 if (!gpios[i].name) {
@@ -424,12 +482,14 @@ got_gpio:
424 msecs_to_jiffies(gpios[i].debounce_time)); 482 msecs_to_jiffies(gpios[i].debounce_time));
425 } 483 }
426 484
485 devres_add(jack->card->dev, tbl);
427 return 0; 486 return 0;
428 487
429err: 488err:
430 gpio_free(gpios[i].gpio); 489 gpio_free(gpios[i].gpio);
431undo: 490undo:
432 snd_soc_jack_free_gpios(jack, i, gpios); 491 jack_free_gpios(jack, i, gpios);
492 devres_free(tbl);
433 493
434 return ret; 494 return ret;
435} 495}
@@ -471,16 +531,8 @@ EXPORT_SYMBOL_GPL(snd_soc_jack_add_gpiods);
471void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, 531void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
472 struct snd_soc_jack_gpio *gpios) 532 struct snd_soc_jack_gpio *gpios)
473{ 533{
474 int i; 534 jack_free_gpios(jack, count, gpios);
475 535 devres_destroy(jack->card->dev, jack_devres_free_gpios, NULL, NULL);
476 for (i = 0; i < count; i++) {
477 gpiod_unexport(gpios[i].desc);
478 unregister_pm_notifier(&gpios[i].pm_notifier);
479 free_irq(gpiod_to_irq(gpios[i].desc), &gpios[i]);
480 cancel_delayed_work_sync(&gpios[i].work);
481 gpiod_put(gpios[i].desc);
482 gpios[i].jack = NULL;
483 }
484} 536}
485EXPORT_SYMBOL_GPL(snd_soc_jack_free_gpios); 537EXPORT_SYMBOL_GPL(snd_soc_jack_free_gpios);
486#endif /* CONFIG_GPIOLIB */ 538#endif /* CONFIG_GPIOLIB */
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 7d3859e1a7b9..94b88b897c3b 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -454,6 +454,8 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
454 struct snd_soc_pcm_runtime *rtd = substream->private_data; 454 struct snd_soc_pcm_runtime *rtd = substream->private_data;
455 struct snd_pcm_runtime *runtime = substream->runtime; 455 struct snd_pcm_runtime *runtime = substream->runtime;
456 struct snd_soc_platform *platform = rtd->platform; 456 struct snd_soc_platform *platform = rtd->platform;
457 struct snd_soc_component *component;
458 struct snd_soc_rtdcom_list *rtdcom;
457 struct snd_soc_dai *cpu_dai = rtd->cpu_dai; 459 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
458 struct snd_soc_dai *codec_dai; 460 struct snd_soc_dai *codec_dai;
459 const char *codec_dai_name = "multicodec"; 461 const char *codec_dai_name = "multicodec";
@@ -462,10 +464,12 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
462 pinctrl_pm_select_default_state(cpu_dai->dev); 464 pinctrl_pm_select_default_state(cpu_dai->dev);
463 for (i = 0; i < rtd->num_codecs; i++) 465 for (i = 0; i < rtd->num_codecs; i++)
464 pinctrl_pm_select_default_state(rtd->codec_dais[i]->dev); 466 pinctrl_pm_select_default_state(rtd->codec_dais[i]->dev);
465 pm_runtime_get_sync(cpu_dai->dev); 467
466 for (i = 0; i < rtd->num_codecs; i++) 468 for_each_rtdcom(rtd, rtdcom) {
467 pm_runtime_get_sync(rtd->codec_dais[i]->dev); 469 component = rtdcom->component;
468 pm_runtime_get_sync(platform->dev); 470
471 pm_runtime_get_sync(component->dev);
472 }
469 473
470 mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass); 474 mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);
471 475
@@ -603,15 +607,13 @@ platform_err:
603out: 607out:
604 mutex_unlock(&rtd->pcm_mutex); 608 mutex_unlock(&rtd->pcm_mutex);
605 609
606 pm_runtime_mark_last_busy(platform->dev); 610 for_each_rtdcom(rtd, rtdcom) {
607 pm_runtime_put_autosuspend(platform->dev); 611 component = rtdcom->component;
608 for (i = 0; i < rtd->num_codecs; i++) { 612
609 pm_runtime_mark_last_busy(rtd->codec_dais[i]->dev); 613 pm_runtime_mark_last_busy(component->dev);
610 pm_runtime_put_autosuspend(rtd->codec_dais[i]->dev); 614 pm_runtime_put_autosuspend(component->dev);
611 } 615 }
612 616
613 pm_runtime_mark_last_busy(cpu_dai->dev);
614 pm_runtime_put_autosuspend(cpu_dai->dev);
615 for (i = 0; i < rtd->num_codecs; i++) { 617 for (i = 0; i < rtd->num_codecs; i++) {
616 if (!rtd->codec_dais[i]->active) 618 if (!rtd->codec_dais[i]->active)
617 pinctrl_pm_select_sleep_state(rtd->codec_dais[i]->dev); 619 pinctrl_pm_select_sleep_state(rtd->codec_dais[i]->dev);
@@ -659,6 +661,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
659{ 661{
660 struct snd_soc_pcm_runtime *rtd = substream->private_data; 662 struct snd_soc_pcm_runtime *rtd = substream->private_data;
661 struct snd_soc_platform *platform = rtd->platform; 663 struct snd_soc_platform *platform = rtd->platform;
664 struct snd_soc_component *component;
665 struct snd_soc_rtdcom_list *rtdcom;
662 struct snd_soc_dai *cpu_dai = rtd->cpu_dai; 666 struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
663 struct snd_soc_dai *codec_dai; 667 struct snd_soc_dai *codec_dai;
664 int i; 668 int i;
@@ -715,17 +719,13 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
715 719
716 mutex_unlock(&rtd->pcm_mutex); 720 mutex_unlock(&rtd->pcm_mutex);
717 721
718 pm_runtime_mark_last_busy(platform->dev); 722 for_each_rtdcom(rtd, rtdcom) {
719 pm_runtime_put_autosuspend(platform->dev); 723 component = rtdcom->component;
720 724
721 for (i = 0; i < rtd->num_codecs; i++) { 725 pm_runtime_mark_last_busy(component->dev);
722 pm_runtime_mark_last_busy(rtd->codec_dais[i]->dev); 726 pm_runtime_put_autosuspend(component->dev);
723 pm_runtime_put_autosuspend(rtd->codec_dais[i]->dev);
724 } 727 }
725 728
726 pm_runtime_mark_last_busy(cpu_dai->dev);
727 pm_runtime_put_autosuspend(cpu_dai->dev);
728
729 for (i = 0; i < rtd->num_codecs; i++) { 729 for (i = 0; i < rtd->num_codecs; i++) {
730 if (!rtd->codec_dais[i]->active) 730 if (!rtd->codec_dais[i]->active)
731 pinctrl_pm_select_sleep_state(rtd->codec_dais[i]->dev); 731 pinctrl_pm_select_sleep_state(rtd->codec_dais[i]->dev);
@@ -3000,8 +3000,7 @@ void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd)
3000 return; 3000 return;
3001 } 3001 }
3002 3002
3003 rtd->debugfs_dpcm_state = debugfs_create_file("state", 0444, 3003 debugfs_create_file("state", 0444, rtd->debugfs_dpcm_root,
3004 rtd->debugfs_dpcm_root, 3004 rtd, &dpcm_state_fops);
3005 rtd, &dpcm_state_fops);
3006} 3005}
3007#endif 3006#endif
diff --git a/sound/soc/tegra/tegra_alc5632.c b/sound/soc/tegra/tegra_alc5632.c
index 0509902512cc..00383155d5f8 100644
--- a/sound/soc/tegra/tegra_alc5632.c
+++ b/sound/soc/tegra/tegra_alc5632.c
@@ -124,18 +124,6 @@ static int tegra_alc5632_asoc_init(struct snd_soc_pcm_runtime *rtd)
124 return 0; 124 return 0;
125} 125}
126 126
127static int tegra_alc5632_card_remove(struct snd_soc_card *card)
128{
129 struct tegra_alc5632 *machine = snd_soc_card_get_drvdata(card);
130
131 if (gpio_is_valid(machine->gpio_hp_det)) {
132 snd_soc_jack_free_gpios(&tegra_alc5632_hs_jack, 1,
133 &tegra_alc5632_hp_jack_gpio);
134 }
135
136 return 0;
137}
138
139static struct snd_soc_dai_link tegra_alc5632_dai = { 127static struct snd_soc_dai_link tegra_alc5632_dai = {
140 .name = "ALC5632", 128 .name = "ALC5632",
141 .stream_name = "ALC5632 PCM", 129 .stream_name = "ALC5632 PCM",
@@ -150,7 +138,6 @@ static struct snd_soc_dai_link tegra_alc5632_dai = {
150static struct snd_soc_card snd_soc_tegra_alc5632 = { 138static struct snd_soc_card snd_soc_tegra_alc5632 = {
151 .name = "tegra-alc5632", 139 .name = "tegra-alc5632",
152 .owner = THIS_MODULE, 140 .owner = THIS_MODULE,
153 .remove = tegra_alc5632_card_remove,
154 .dai_link = &tegra_alc5632_dai, 141 .dai_link = &tegra_alc5632_dai,
155 .num_links = 1, 142 .num_links = 1,
156 .controls = tegra_alc5632_controls, 143 .controls = tegra_alc5632_controls,
diff --git a/sound/soc/tegra/tegra_max98090.c b/sound/soc/tegra/tegra_max98090.c
index c34a54d6e812..955067adf2d9 100644
--- a/sound/soc/tegra/tegra_max98090.c
+++ b/sound/soc/tegra/tegra_max98090.c
@@ -176,23 +176,6 @@ static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd)
176 return 0; 176 return 0;
177} 177}
178 178
179static int tegra_max98090_card_remove(struct snd_soc_card *card)
180{
181 struct tegra_max98090 *machine = snd_soc_card_get_drvdata(card);
182
183 if (gpio_is_valid(machine->gpio_hp_det)) {
184 snd_soc_jack_free_gpios(&tegra_max98090_hp_jack, 1,
185 &tegra_max98090_hp_jack_gpio);
186 }
187
188 if (gpio_is_valid(machine->gpio_mic_det)) {
189 snd_soc_jack_free_gpios(&tegra_max98090_mic_jack, 1,
190 &tegra_max98090_mic_jack_gpio);
191 }
192
193 return 0;
194}
195
196static struct snd_soc_dai_link tegra_max98090_dai = { 179static struct snd_soc_dai_link tegra_max98090_dai = {
197 .name = "max98090", 180 .name = "max98090",
198 .stream_name = "max98090 PCM", 181 .stream_name = "max98090 PCM",
@@ -206,7 +189,6 @@ static struct snd_soc_dai_link tegra_max98090_dai = {
206static struct snd_soc_card snd_soc_tegra_max98090 = { 189static struct snd_soc_card snd_soc_tegra_max98090 = {
207 .name = "tegra-max98090", 190 .name = "tegra-max98090",
208 .owner = THIS_MODULE, 191 .owner = THIS_MODULE,
209 .remove = tegra_max98090_card_remove,
210 .dai_link = &tegra_max98090_dai, 192 .dai_link = &tegra_max98090_dai,
211 .num_links = 1, 193 .num_links = 1,
212 .controls = tegra_max98090_controls, 194 .controls = tegra_max98090_controls,
diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c
index 93a356802345..76ed6042d84d 100644
--- a/sound/soc/tegra/tegra_rt5640.c
+++ b/sound/soc/tegra/tegra_rt5640.c
@@ -126,18 +126,6 @@ static int tegra_rt5640_asoc_init(struct snd_soc_pcm_runtime *rtd)
126 return 0; 126 return 0;
127} 127}
128 128
129static int tegra_rt5640_card_remove(struct snd_soc_card *card)
130{
131 struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card);
132
133 if (gpio_is_valid(machine->gpio_hp_det)) {
134 snd_soc_jack_free_gpios(&tegra_rt5640_hp_jack, 1,
135 &tegra_rt5640_hp_jack_gpio);
136 }
137
138 return 0;
139}
140
141static struct snd_soc_dai_link tegra_rt5640_dai = { 129static struct snd_soc_dai_link tegra_rt5640_dai = {
142 .name = "RT5640", 130 .name = "RT5640",
143 .stream_name = "RT5640 PCM", 131 .stream_name = "RT5640 PCM",
@@ -151,7 +139,6 @@ static struct snd_soc_dai_link tegra_rt5640_dai = {
151static struct snd_soc_card snd_soc_tegra_rt5640 = { 139static struct snd_soc_card snd_soc_tegra_rt5640 = {
152 .name = "tegra-rt5640", 140 .name = "tegra-rt5640",
153 .owner = THIS_MODULE, 141 .owner = THIS_MODULE,
154 .remove = tegra_rt5640_card_remove,
155 .dai_link = &tegra_rt5640_dai, 142 .dai_link = &tegra_rt5640_dai,
156 .num_links = 1, 143 .num_links = 1,
157 .controls = tegra_rt5640_controls, 144 .controls = tegra_rt5640_controls,
diff --git a/sound/soc/tegra/tegra_rt5677.c b/sound/soc/tegra/tegra_rt5677.c
index ebf58d0e0f10..dc5a295d61e5 100644
--- a/sound/soc/tegra/tegra_rt5677.c
+++ b/sound/soc/tegra/tegra_rt5677.c
@@ -169,23 +169,6 @@ static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd)
169 return 0; 169 return 0;
170} 170}
171 171
172static int tegra_rt5677_card_remove(struct snd_soc_card *card)
173{
174 struct tegra_rt5677 *machine = snd_soc_card_get_drvdata(card);
175
176 if (gpio_is_valid(machine->gpio_hp_det)) {
177 snd_soc_jack_free_gpios(&tegra_rt5677_hp_jack, 1,
178 &tegra_rt5677_hp_jack_gpio);
179 }
180
181 if (gpio_is_valid(machine->gpio_mic_present)) {
182 snd_soc_jack_free_gpios(&tegra_rt5677_mic_jack, 1,
183 &tegra_rt5677_mic_jack_gpio);
184 }
185
186 return 0;
187}
188
189static struct snd_soc_dai_link tegra_rt5677_dai = { 172static struct snd_soc_dai_link tegra_rt5677_dai = {
190 .name = "RT5677", 173 .name = "RT5677",
191 .stream_name = "RT5677 PCM", 174 .stream_name = "RT5677 PCM",
@@ -199,7 +182,6 @@ static struct snd_soc_dai_link tegra_rt5677_dai = {
199static struct snd_soc_card snd_soc_tegra_rt5677 = { 182static struct snd_soc_card snd_soc_tegra_rt5677 = {
200 .name = "tegra-rt5677", 183 .name = "tegra-rt5677",
201 .owner = THIS_MODULE, 184 .owner = THIS_MODULE,
202 .remove = tegra_rt5677_card_remove,
203 .dai_link = &tegra_rt5677_dai, 185 .dai_link = &tegra_rt5677_dai,
204 .num_links = 1, 186 .num_links = 1,
205 .controls = tegra_rt5677_controls, 187 .controls = tegra_rt5677_controls,
diff --git a/sound/soc/tegra/tegra_wm8903.c b/sound/soc/tegra/tegra_wm8903.c
index dbfb49298ae8..05f95944669a 100644
--- a/sound/soc/tegra/tegra_wm8903.c
+++ b/sound/soc/tegra/tegra_wm8903.c
@@ -203,12 +203,6 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
203 snd_soc_get_pcm_runtime(card, card->dai_link[0].name); 203 snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
204 struct snd_soc_dai *codec_dai = rtd->codec_dai; 204 struct snd_soc_dai *codec_dai = rtd->codec_dai;
205 struct snd_soc_codec *codec = codec_dai->codec; 205 struct snd_soc_codec *codec = codec_dai->codec;
206 struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
207
208 if (gpio_is_valid(machine->gpio_hp_det)) {
209 snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack, 1,
210 &tegra_wm8903_hp_jack_gpio);
211 }
212 206
213 wm8903_mic_detect(codec, NULL, 0, 0); 207 wm8903_mic_detect(codec, NULL, 0, 0);
214 208
diff --git a/tools/build/feature/test-bpf.c b/tools/build/feature/test-bpf.c
index 7598361ef1f1..da2172ff9662 100644
--- a/tools/build/feature/test-bpf.c
+++ b/tools/build/feature/test-bpf.c
@@ -11,6 +11,8 @@
11# define __NR_bpf 280 11# define __NR_bpf 280
12# elif defined(__sparc__) 12# elif defined(__sparc__)
13# define __NR_bpf 349 13# define __NR_bpf 349
14# elif defined(__s390__)
15# define __NR_bpf 351
14# else 16# else
15# error __NR_bpf not defined. libbpf does not support your arch. 17# error __NR_bpf not defined. libbpf does not support your arch.
16# endif 18# endif
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
index 412a7c82995a..e5bbb090bf88 100644
--- a/tools/lib/bpf/bpf.c
+++ b/tools/lib/bpf/bpf.c
@@ -39,6 +39,8 @@
39# define __NR_bpf 280 39# define __NR_bpf 280
40# elif defined(__sparc__) 40# elif defined(__sparc__)
41# define __NR_bpf 349 41# define __NR_bpf 349
42# elif defined(__s390__)
43# define __NR_bpf 351
42# else 44# else
43# error __NR_bpf not defined. libbpf does not support your arch. 45# error __NR_bpf not defined. libbpf does not support your arch.
44# endif 46# endif
@@ -314,7 +316,6 @@ int bpf_obj_get_info_by_fd(int prog_fd, void *info, __u32 *info_len)
314 int err; 316 int err;
315 317
316 bzero(&attr, sizeof(attr)); 318 bzero(&attr, sizeof(attr));
317 bzero(info, *info_len);
318 attr.info.bpf_fd = prog_fd; 319 attr.info.bpf_fd = prog_fd;
319 attr.info.info_len = *info_len; 320 attr.info.info_len = *info_len;
320 attr.info.info = ptr_to_u64(info); 321 attr.info.info = ptr_to_u64(info);
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 1a2c07eb7795..8c67a90dbd82 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -879,7 +879,8 @@ bpf_object__create_maps(struct bpf_object *obj)
879 size_t j; 879 size_t j;
880 int err = *pfd; 880 int err = *pfd;
881 881
882 pr_warning("failed to create map: %s\n", 882 pr_warning("failed to create map (name: '%s'): %s\n",
883 obj->maps[i].name,
883 strerror(errno)); 884 strerror(errno));
884 for (j = 0; j < i; j++) 885 for (j = 0; j < i; j++)
885 zclose(obj->maps[j].fd); 886 zclose(obj->maps[j].fd);
diff --git a/tools/objtool/arch/x86/decode.c b/tools/objtool/arch/x86/decode.c
index a36c2eba64e7..4559a21a8de2 100644
--- a/tools/objtool/arch/x86/decode.c
+++ b/tools/objtool/arch/x86/decode.c
@@ -271,7 +271,7 @@ int arch_decode_instruction(struct elf *elf, struct section *sec,
271 case 0x8d: 271 case 0x8d:
272 if (rex == 0x48 && modrm == 0x65) { 272 if (rex == 0x48 && modrm == 0x65) {
273 273
274 /* lea -disp(%rbp), %rsp */ 274 /* lea disp(%rbp), %rsp */
275 *type = INSN_STACK; 275 *type = INSN_STACK;
276 op->src.type = OP_SRC_ADD; 276 op->src.type = OP_SRC_ADD;
277 op->src.reg = CFI_BP; 277 op->src.reg = CFI_BP;
@@ -281,6 +281,30 @@ int arch_decode_instruction(struct elf *elf, struct section *sec,
281 break; 281 break;
282 } 282 }
283 283
284 if (rex == 0x48 && (modrm == 0xa4 || modrm == 0x64) &&
285 sib == 0x24) {
286
287 /* lea disp(%rsp), %rsp */
288 *type = INSN_STACK;
289 op->src.type = OP_SRC_ADD;
290 op->src.reg = CFI_SP;
291 op->src.offset = insn.displacement.value;
292 op->dest.type = OP_DEST_REG;
293 op->dest.reg = CFI_SP;
294 break;
295 }
296
297 if (rex == 0x48 && modrm == 0x2c && sib == 0x24) {
298
299 /* lea (%rsp), %rbp */
300 *type = INSN_STACK;
301 op->src.type = OP_SRC_REG;
302 op->src.reg = CFI_SP;
303 op->dest.type = OP_DEST_REG;
304 op->dest.reg = CFI_BP;
305 break;
306 }
307
284 if (rex == 0x4c && modrm == 0x54 && sib == 0x24 && 308 if (rex == 0x4c && modrm == 0x54 && sib == 0x24 &&
285 insn.displacement.value == 8) { 309 insn.displacement.value == 8) {
286 310
diff --git a/tools/testing/selftests/bpf/test_pkt_md_access.c b/tools/testing/selftests/bpf/test_pkt_md_access.c
index 71729d47eb85..7956302ecdf2 100644
--- a/tools/testing/selftests/bpf/test_pkt_md_access.c
+++ b/tools/testing/selftests/bpf/test_pkt_md_access.c
@@ -12,12 +12,23 @@
12 12
13int _version SEC("version") = 1; 13int _version SEC("version") = 1;
14 14
15#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
15#define TEST_FIELD(TYPE, FIELD, MASK) \ 16#define TEST_FIELD(TYPE, FIELD, MASK) \
16 { \ 17 { \
17 TYPE tmp = *(volatile TYPE *)&skb->FIELD; \ 18 TYPE tmp = *(volatile TYPE *)&skb->FIELD; \
18 if (tmp != ((*(volatile __u32 *)&skb->FIELD) & MASK)) \ 19 if (tmp != ((*(volatile __u32 *)&skb->FIELD) & MASK)) \
19 return TC_ACT_SHOT; \ 20 return TC_ACT_SHOT; \
20 } 21 }
22#else
23#define TEST_FIELD_OFFSET(a, b) ((sizeof(a) - sizeof(b)) / sizeof(b))
24#define TEST_FIELD(TYPE, FIELD, MASK) \
25 { \
26 TYPE tmp = *((volatile TYPE *)&skb->FIELD + \
27 TEST_FIELD_OFFSET(skb->FIELD, TYPE)); \
28 if (tmp != ((*(volatile __u32 *)&skb->FIELD) & MASK)) \
29 return TC_ACT_SHOT; \
30 }
31#endif
21 32
22SEC("test1") 33SEC("test1")
23int process(struct __sk_buff *skb) 34int process(struct __sk_buff *skb)
diff --git a/tools/testing/selftests/bpf/test_progs.c b/tools/testing/selftests/bpf/test_progs.c
index 5855cd3d3d45..1f7dd35551b9 100644
--- a/tools/testing/selftests/bpf/test_progs.c
+++ b/tools/testing/selftests/bpf/test_progs.c
@@ -340,6 +340,7 @@ static void test_bpf_obj_id(void)
340 340
341 /* Check getting prog info */ 341 /* Check getting prog info */
342 info_len = sizeof(struct bpf_prog_info) * 2; 342 info_len = sizeof(struct bpf_prog_info) * 2;
343 bzero(&prog_infos[i], info_len);
343 prog_infos[i].jited_prog_insns = ptr_to_u64(jited_insns); 344 prog_infos[i].jited_prog_insns = ptr_to_u64(jited_insns);
344 prog_infos[i].jited_prog_len = sizeof(jited_insns); 345 prog_infos[i].jited_prog_len = sizeof(jited_insns);
345 prog_infos[i].xlated_prog_insns = ptr_to_u64(xlated_insns); 346 prog_infos[i].xlated_prog_insns = ptr_to_u64(xlated_insns);
@@ -369,6 +370,7 @@ static void test_bpf_obj_id(void)
369 370
370 /* Check getting map info */ 371 /* Check getting map info */
371 info_len = sizeof(struct bpf_map_info) * 2; 372 info_len = sizeof(struct bpf_map_info) * 2;
373 bzero(&map_infos[i], info_len);
372 err = bpf_obj_get_info_by_fd(map_fds[i], &map_infos[i], 374 err = bpf_obj_get_info_by_fd(map_fds[i], &map_infos[i],
373 &info_len); 375 &info_len);
374 if (CHECK(err || 376 if (CHECK(err ||
@@ -394,7 +396,7 @@ static void test_bpf_obj_id(void)
394 nr_id_found = 0; 396 nr_id_found = 0;
395 next_id = 0; 397 next_id = 0;
396 while (!bpf_prog_get_next_id(next_id, &next_id)) { 398 while (!bpf_prog_get_next_id(next_id, &next_id)) {
397 struct bpf_prog_info prog_info; 399 struct bpf_prog_info prog_info = {};
398 int prog_fd; 400 int prog_fd;
399 401
400 info_len = sizeof(prog_info); 402 info_len = sizeof(prog_info);
@@ -418,6 +420,8 @@ static void test_bpf_obj_id(void)
418 nr_id_found++; 420 nr_id_found++;
419 421
420 err = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &info_len); 422 err = bpf_obj_get_info_by_fd(prog_fd, &prog_info, &info_len);
423 prog_infos[i].jited_prog_insns = 0;
424 prog_infos[i].xlated_prog_insns = 0;
421 CHECK(err || info_len != sizeof(struct bpf_prog_info) || 425 CHECK(err || info_len != sizeof(struct bpf_prog_info) ||
422 memcmp(&prog_info, &prog_infos[i], info_len), 426 memcmp(&prog_info, &prog_infos[i], info_len),
423 "get-prog-info(next_id->fd)", 427 "get-prog-info(next_id->fd)",
@@ -436,7 +440,7 @@ static void test_bpf_obj_id(void)
436 nr_id_found = 0; 440 nr_id_found = 0;
437 next_id = 0; 441 next_id = 0;
438 while (!bpf_map_get_next_id(next_id, &next_id)) { 442 while (!bpf_map_get_next_id(next_id, &next_id)) {
439 struct bpf_map_info map_info; 443 struct bpf_map_info map_info = {};
440 int map_fd; 444 int map_fd;
441 445
442 info_len = sizeof(map_info); 446 info_len = sizeof(map_info);
diff --git a/tools/testing/selftests/bpf/test_verifier.c b/tools/testing/selftests/bpf/test_verifier.c
index af7d173910f4..d3ed7324105e 100644
--- a/tools/testing/selftests/bpf/test_verifier.c
+++ b/tools/testing/selftests/bpf/test_verifier.c
@@ -8,6 +8,7 @@
8 * License as published by the Free Software Foundation. 8 * License as published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <endian.h>
11#include <asm/types.h> 12#include <asm/types.h>
12#include <linux/types.h> 13#include <linux/types.h>
13#include <stdint.h> 14#include <stdint.h>
@@ -1098,7 +1099,7 @@ static struct bpf_test tests[] = {
1098 "check skb->hash byte load permitted", 1099 "check skb->hash byte load permitted",
1099 .insns = { 1100 .insns = {
1100 BPF_MOV64_IMM(BPF_REG_0, 0), 1101 BPF_MOV64_IMM(BPF_REG_0, 0),
1101#ifdef __LITTLE_ENDIAN 1102#if __BYTE_ORDER == __LITTLE_ENDIAN
1102 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 1103 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1,
1103 offsetof(struct __sk_buff, hash)), 1104 offsetof(struct __sk_buff, hash)),
1104#else 1105#else
@@ -1135,7 +1136,7 @@ static struct bpf_test tests[] = {
1135 "check skb->hash byte load not permitted 3", 1136 "check skb->hash byte load not permitted 3",
1136 .insns = { 1137 .insns = {
1137 BPF_MOV64_IMM(BPF_REG_0, 0), 1138 BPF_MOV64_IMM(BPF_REG_0, 0),
1138#ifdef __LITTLE_ENDIAN 1139#if __BYTE_ORDER == __LITTLE_ENDIAN
1139 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 1140 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1,
1140 offsetof(struct __sk_buff, hash) + 3), 1141 offsetof(struct __sk_buff, hash) + 3),
1141#else 1142#else
@@ -1244,7 +1245,7 @@ static struct bpf_test tests[] = {
1244 "check skb->hash half load permitted", 1245 "check skb->hash half load permitted",
1245 .insns = { 1246 .insns = {
1246 BPF_MOV64_IMM(BPF_REG_0, 0), 1247 BPF_MOV64_IMM(BPF_REG_0, 0),
1247#ifdef __LITTLE_ENDIAN 1248#if __BYTE_ORDER == __LITTLE_ENDIAN
1248 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, 1249 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1,
1249 offsetof(struct __sk_buff, hash)), 1250 offsetof(struct __sk_buff, hash)),
1250#else 1251#else
@@ -1259,7 +1260,7 @@ static struct bpf_test tests[] = {
1259 "check skb->hash half load not permitted", 1260 "check skb->hash half load not permitted",
1260 .insns = { 1261 .insns = {
1261 BPF_MOV64_IMM(BPF_REG_0, 0), 1262 BPF_MOV64_IMM(BPF_REG_0, 0),
1262#ifdef __LITTLE_ENDIAN 1263#if __BYTE_ORDER == __LITTLE_ENDIAN
1263 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, 1264 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1,
1264 offsetof(struct __sk_buff, hash) + 2), 1265 offsetof(struct __sk_buff, hash) + 2),
1265#else 1266#else
@@ -5422,7 +5423,7 @@ static struct bpf_test tests[] = {
5422 "check bpf_perf_event_data->sample_period byte load permitted", 5423 "check bpf_perf_event_data->sample_period byte load permitted",
5423 .insns = { 5424 .insns = {
5424 BPF_MOV64_IMM(BPF_REG_0, 0), 5425 BPF_MOV64_IMM(BPF_REG_0, 0),
5425#ifdef __LITTLE_ENDIAN 5426#if __BYTE_ORDER == __LITTLE_ENDIAN
5426 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 5427 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1,
5427 offsetof(struct bpf_perf_event_data, sample_period)), 5428 offsetof(struct bpf_perf_event_data, sample_period)),
5428#else 5429#else
@@ -5438,7 +5439,7 @@ static struct bpf_test tests[] = {
5438 "check bpf_perf_event_data->sample_period half load permitted", 5439 "check bpf_perf_event_data->sample_period half load permitted",
5439 .insns = { 5440 .insns = {
5440 BPF_MOV64_IMM(BPF_REG_0, 0), 5441 BPF_MOV64_IMM(BPF_REG_0, 0),
5441#ifdef __LITTLE_ENDIAN 5442#if __BYTE_ORDER == __LITTLE_ENDIAN
5442 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, 5443 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1,
5443 offsetof(struct bpf_perf_event_data, sample_period)), 5444 offsetof(struct bpf_perf_event_data, sample_period)),
5444#else 5445#else
@@ -5454,7 +5455,7 @@ static struct bpf_test tests[] = {
5454 "check bpf_perf_event_data->sample_period word load permitted", 5455 "check bpf_perf_event_data->sample_period word load permitted",
5455 .insns = { 5456 .insns = {
5456 BPF_MOV64_IMM(BPF_REG_0, 0), 5457 BPF_MOV64_IMM(BPF_REG_0, 0),
5457#ifdef __LITTLE_ENDIAN 5458#if __BYTE_ORDER == __LITTLE_ENDIAN
5458 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1, 5459 BPF_LDX_MEM(BPF_W, BPF_REG_0, BPF_REG_1,
5459 offsetof(struct bpf_perf_event_data, sample_period)), 5460 offsetof(struct bpf_perf_event_data, sample_period)),
5460#else 5461#else
@@ -5481,7 +5482,7 @@ static struct bpf_test tests[] = {
5481 "check skb->data half load not permitted", 5482 "check skb->data half load not permitted",
5482 .insns = { 5483 .insns = {
5483 BPF_MOV64_IMM(BPF_REG_0, 0), 5484 BPF_MOV64_IMM(BPF_REG_0, 0),
5484#ifdef __LITTLE_ENDIAN 5485#if __BYTE_ORDER == __LITTLE_ENDIAN
5485 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, 5486 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1,
5486 offsetof(struct __sk_buff, data)), 5487 offsetof(struct __sk_buff, data)),
5487#else 5488#else
@@ -5497,7 +5498,7 @@ static struct bpf_test tests[] = {
5497 "check skb->tc_classid half load not permitted for lwt prog", 5498 "check skb->tc_classid half load not permitted for lwt prog",
5498 .insns = { 5499 .insns = {
5499 BPF_MOV64_IMM(BPF_REG_0, 0), 5500 BPF_MOV64_IMM(BPF_REG_0, 0),
5500#ifdef __LITTLE_ENDIAN 5501#if __BYTE_ORDER == __LITTLE_ENDIAN
5501 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1, 5502 BPF_LDX_MEM(BPF_H, BPF_REG_0, BPF_REG_1,
5502 offsetof(struct __sk_buff, tc_classid)), 5503 offsetof(struct __sk_buff, tc_classid)),
5503#else 5504#else
@@ -5980,6 +5981,34 @@ static struct bpf_test tests[] = {
5980 .result = REJECT, 5981 .result = REJECT,
5981 .result_unpriv = REJECT, 5982 .result_unpriv = REJECT,
5982 }, 5983 },
5984 {
5985 "subtraction bounds (map value)",
5986 .insns = {
5987 BPF_ST_MEM(BPF_DW, BPF_REG_10, -8, 0),
5988 BPF_MOV64_REG(BPF_REG_2, BPF_REG_10),
5989 BPF_ALU64_IMM(BPF_ADD, BPF_REG_2, -8),
5990 BPF_LD_MAP_FD(BPF_REG_1, 0),
5991 BPF_RAW_INSN(BPF_JMP | BPF_CALL, 0, 0, 0,
5992 BPF_FUNC_map_lookup_elem),
5993 BPF_JMP_IMM(BPF_JEQ, BPF_REG_0, 0, 9),
5994 BPF_LDX_MEM(BPF_B, BPF_REG_1, BPF_REG_0, 0),
5995 BPF_JMP_IMM(BPF_JGT, BPF_REG_1, 0xff, 7),
5996 BPF_LDX_MEM(BPF_B, BPF_REG_3, BPF_REG_0, 1),
5997 BPF_JMP_IMM(BPF_JGT, BPF_REG_3, 0xff, 5),
5998 BPF_ALU64_REG(BPF_SUB, BPF_REG_1, BPF_REG_3),
5999 BPF_ALU64_IMM(BPF_RSH, BPF_REG_1, 56),
6000 BPF_ALU64_REG(BPF_ADD, BPF_REG_0, BPF_REG_1),
6001 BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_0, 0),
6002 BPF_EXIT_INSN(),
6003 BPF_MOV64_IMM(BPF_REG_0, 0),
6004 BPF_EXIT_INSN(),
6005 },
6006 .fixup_map1 = { 3 },
6007 .errstr_unpriv = "R0 pointer arithmetic prohibited",
6008 .errstr = "R0 min value is negative, either use unsigned index or do a if (index >=0) check.",
6009 .result = REJECT,
6010 .result_unpriv = REJECT,
6011 },
5983}; 6012};
5984 6013
5985static int probe_filter_length(const struct bpf_insn *fp) 6014static int probe_filter_length(const struct bpf_insn *fp)
diff --git a/tools/testing/selftests/futex/Makefile b/tools/testing/selftests/futex/Makefile
index e2fbb890aef9..7c647f619d63 100644
--- a/tools/testing/selftests/futex/Makefile
+++ b/tools/testing/selftests/futex/Makefile
@@ -14,7 +14,7 @@ all:
14 done 14 done
15 15
16override define RUN_TESTS 16override define RUN_TESTS
17 @if [ `dirname $(OUTPUT)` = $(PWD) ]; then ./run.sh; fi 17 $(OUTPUT)/run.sh
18endef 18endef
19 19
20override define INSTALL_RULE 20override define INSTALL_RULE
diff --git a/tools/testing/selftests/kmod/kmod.sh b/tools/testing/selftests/kmod/kmod.sh
index 8cecae9a8bca..7956ea3be667 100644..100755
--- a/tools/testing/selftests/kmod/kmod.sh
+++ b/tools/testing/selftests/kmod/kmod.sh
@@ -473,8 +473,8 @@ usage()
473 echo " all Runs all tests (default)" 473 echo " all Runs all tests (default)"
474 echo " -t Run test ID the number amount of times is recommended" 474 echo " -t Run test ID the number amount of times is recommended"
475 echo " -w Watch test ID run until it runs into an error" 475 echo " -w Watch test ID run until it runs into an error"
476 echo " -c Run test ID once" 476 echo " -s Run test ID once"
477 echo " -s Run test ID x test-count number of times" 477 echo " -c Run test ID x test-count number of times"
478 echo " -l List all test ID list" 478 echo " -l List all test ID list"
479 echo " -h|--help Help" 479 echo " -h|--help Help"
480 echo 480 echo
diff --git a/tools/testing/selftests/ntb/ntb_test.sh b/tools/testing/selftests/ntb/ntb_test.sh
index 1c12b5855e4f..5fc7ad359e21 100755
--- a/tools/testing/selftests/ntb/ntb_test.sh
+++ b/tools/testing/selftests/ntb/ntb_test.sh
@@ -333,6 +333,10 @@ function ntb_tool_tests()
333 link_test $LOCAL_TOOL $REMOTE_TOOL 333 link_test $LOCAL_TOOL $REMOTE_TOOL
334 link_test $REMOTE_TOOL $LOCAL_TOOL 334 link_test $REMOTE_TOOL $LOCAL_TOOL
335 335
336 #Ensure the link is up on both sides before continuing
337 write_file Y $LOCAL_TOOL/link_event
338 write_file Y $REMOTE_TOOL/link_event
339
336 for PEER_TRANS in $(ls $LOCAL_TOOL/peer_trans*); do 340 for PEER_TRANS in $(ls $LOCAL_TOOL/peer_trans*); do
337 PT=$(basename $PEER_TRANS) 341 PT=$(basename $PEER_TRANS)
338 write_file $MW_SIZE $LOCAL_TOOL/$PT 342 write_file $MW_SIZE $LOCAL_TOOL/$PT
diff --git a/tools/testing/selftests/sysctl/sysctl.sh b/tools/testing/selftests/sysctl/sysctl.sh
index ec232c3cfcaa..ec232c3cfcaa 100644..100755
--- a/tools/testing/selftests/sysctl/sysctl.sh
+++ b/tools/testing/selftests/sysctl/sysctl.sh
diff --git a/tools/testing/selftests/timers/freq-step.c b/tools/testing/selftests/timers/freq-step.c
index e8c61830825a..22312eb4c941 100644
--- a/tools/testing/selftests/timers/freq-step.c
+++ b/tools/testing/selftests/timers/freq-step.c
@@ -229,10 +229,9 @@ static void init_test(void)
229 printf("CLOCK_MONOTONIC_RAW+CLOCK_MONOTONIC precision: %.0f ns\t\t", 229 printf("CLOCK_MONOTONIC_RAW+CLOCK_MONOTONIC precision: %.0f ns\t\t",
230 1e9 * precision); 230 1e9 * precision);
231 231
232 if (precision > MAX_PRECISION) { 232 if (precision > MAX_PRECISION)
233 printf("[SKIP]\n"); 233 ksft_exit_skip("precision: %.0f ns > MAX_PRECISION: %.0f ns\n",
234 ksft_exit_skip(); 234 1e9 * precision, 1e9 * MAX_PRECISION);
235 }
236 235
237 printf("[OK]\n"); 236 printf("[OK]\n");
238 srand(ts.tv_sec ^ ts.tv_nsec); 237 srand(ts.tv_sec ^ ts.tv_nsec);
diff --git a/virt/kvm/arm/mmu.c b/virt/kvm/arm/mmu.c
index 0e1fc75f3585..2ea21dac0b44 100644
--- a/virt/kvm/arm/mmu.c
+++ b/virt/kvm/arm/mmu.c
@@ -1718,12 +1718,16 @@ static int kvm_test_age_hva_handler(struct kvm *kvm, gpa_t gpa, u64 size, void *
1718 1718
1719int kvm_age_hva(struct kvm *kvm, unsigned long start, unsigned long end) 1719int kvm_age_hva(struct kvm *kvm, unsigned long start, unsigned long end)
1720{ 1720{
1721 if (!kvm->arch.pgd)
1722 return 0;
1721 trace_kvm_age_hva(start, end); 1723 trace_kvm_age_hva(start, end);
1722 return handle_hva_to_gpa(kvm, start, end, kvm_age_hva_handler, NULL); 1724 return handle_hva_to_gpa(kvm, start, end, kvm_age_hva_handler, NULL);
1723} 1725}
1724 1726
1725int kvm_test_age_hva(struct kvm *kvm, unsigned long hva) 1727int kvm_test_age_hva(struct kvm *kvm, unsigned long hva)
1726{ 1728{
1729 if (!kvm->arch.pgd)
1730 return 0;
1727 trace_kvm_test_age_hva(hva); 1731 trace_kvm_test_age_hva(hva);
1728 return handle_hva_to_gpa(kvm, hva, hva, kvm_test_age_hva_handler, NULL); 1732 return handle_hva_to_gpa(kvm, hva, hva, kvm_test_age_hva_handler, NULL);
1729} 1733}
diff --git a/virt/kvm/arm/pmu.c b/virt/kvm/arm/pmu.c
index fc8a723ff387..8a9c42366db7 100644
--- a/virt/kvm/arm/pmu.c
+++ b/virt/kvm/arm/pmu.c
@@ -203,11 +203,15 @@ static u64 kvm_pmu_overflow_status(struct kvm_vcpu *vcpu)
203 return reg; 203 return reg;
204} 204}
205 205
206static void kvm_pmu_check_overflow(struct kvm_vcpu *vcpu) 206static void kvm_pmu_update_state(struct kvm_vcpu *vcpu)
207{ 207{
208 struct kvm_pmu *pmu = &vcpu->arch.pmu; 208 struct kvm_pmu *pmu = &vcpu->arch.pmu;
209 bool overflow = !!kvm_pmu_overflow_status(vcpu); 209 bool overflow;
210
211 if (!kvm_arm_pmu_v3_ready(vcpu))
212 return;
210 213
214 overflow = !!kvm_pmu_overflow_status(vcpu);
211 if (pmu->irq_level == overflow) 215 if (pmu->irq_level == overflow)
212 return; 216 return;
213 217
@@ -215,33 +219,11 @@ static void kvm_pmu_check_overflow(struct kvm_vcpu *vcpu)
215 219
216 if (likely(irqchip_in_kernel(vcpu->kvm))) { 220 if (likely(irqchip_in_kernel(vcpu->kvm))) {
217 int ret = kvm_vgic_inject_irq(vcpu->kvm, vcpu->vcpu_id, 221 int ret = kvm_vgic_inject_irq(vcpu->kvm, vcpu->vcpu_id,
218 pmu->irq_num, overflow, 222 pmu->irq_num, overflow, pmu);
219 &vcpu->arch.pmu);
220 WARN_ON(ret); 223 WARN_ON(ret);
221 } 224 }
222} 225}
223 226
224/**
225 * kvm_pmu_overflow_set - set PMU overflow interrupt
226 * @vcpu: The vcpu pointer
227 * @val: the value guest writes to PMOVSSET register
228 */
229void kvm_pmu_overflow_set(struct kvm_vcpu *vcpu, u64 val)
230{
231 if (val == 0)
232 return;
233
234 vcpu_sys_reg(vcpu, PMOVSSET_EL0) |= val;
235 kvm_pmu_check_overflow(vcpu);
236}
237
238static void kvm_pmu_update_state(struct kvm_vcpu *vcpu)
239{
240 if (!kvm_arm_pmu_v3_ready(vcpu))
241 return;
242 kvm_pmu_check_overflow(vcpu);
243}
244
245bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu) 227bool kvm_pmu_should_notify_user(struct kvm_vcpu *vcpu)
246{ 228{
247 struct kvm_pmu *pmu = &vcpu->arch.pmu; 229 struct kvm_pmu *pmu = &vcpu->arch.pmu;
@@ -303,7 +285,7 @@ static inline struct kvm_vcpu *kvm_pmc_to_vcpu(struct kvm_pmc *pmc)
303} 285}
304 286
305/** 287/**
306 * When perf event overflows, call kvm_pmu_overflow_set to set overflow status. 288 * When the perf event overflows, set the overflow status and inform the vcpu.
307 */ 289 */
308static void kvm_pmu_perf_overflow(struct perf_event *perf_event, 290static void kvm_pmu_perf_overflow(struct perf_event *perf_event,
309 struct perf_sample_data *data, 291 struct perf_sample_data *data,
@@ -313,7 +295,12 @@ static void kvm_pmu_perf_overflow(struct perf_event *perf_event,
313 struct kvm_vcpu *vcpu = kvm_pmc_to_vcpu(pmc); 295 struct kvm_vcpu *vcpu = kvm_pmc_to_vcpu(pmc);
314 int idx = pmc->idx; 296 int idx = pmc->idx;
315 297
316 kvm_pmu_overflow_set(vcpu, BIT(idx)); 298 vcpu_sys_reg(vcpu, PMOVSSET_EL0) |= BIT(idx);
299
300 if (kvm_pmu_overflow_status(vcpu)) {
301 kvm_make_request(KVM_REQ_IRQ_PENDING, vcpu);
302 kvm_vcpu_kick(vcpu);
303 }
317} 304}
318 305
319/** 306/**
@@ -341,7 +328,7 @@ void kvm_pmu_software_increment(struct kvm_vcpu *vcpu, u64 val)
341 reg = lower_32_bits(reg); 328 reg = lower_32_bits(reg);
342 vcpu_sys_reg(vcpu, PMEVCNTR0_EL0 + i) = reg; 329 vcpu_sys_reg(vcpu, PMEVCNTR0_EL0 + i) = reg;
343 if (!reg) 330 if (!reg)
344 kvm_pmu_overflow_set(vcpu, BIT(i)); 331 vcpu_sys_reg(vcpu, PMOVSSET_EL0) |= BIT(i);
345 } 332 }
346 } 333 }
347} 334}
diff --git a/virt/kvm/arm/vgic/vgic-init.c b/virt/kvm/arm/vgic/vgic-init.c
index 3a0b8999f011..5801261f3add 100644
--- a/virt/kvm/arm/vgic/vgic-init.c
+++ b/virt/kvm/arm/vgic/vgic-init.c
@@ -285,9 +285,6 @@ int vgic_init(struct kvm *kvm)
285 if (ret) 285 if (ret)
286 goto out; 286 goto out;
287 287
288 if (vgic_has_its(kvm))
289 dist->msis_require_devid = true;
290
291 kvm_for_each_vcpu(i, vcpu, kvm) 288 kvm_for_each_vcpu(i, vcpu, kvm)
292 kvm_vgic_vcpu_enable(vcpu); 289 kvm_vgic_vcpu_enable(vcpu);
293 290
diff --git a/virt/kvm/arm/vgic/vgic-its.c b/virt/kvm/arm/vgic/vgic-its.c
index 2dff288b3a66..aa6b68db80b4 100644
--- a/virt/kvm/arm/vgic/vgic-its.c
+++ b/virt/kvm/arm/vgic/vgic-its.c
@@ -1598,6 +1598,7 @@ static int vgic_its_create(struct kvm_device *dev, u32 type)
1598 INIT_LIST_HEAD(&its->device_list); 1598 INIT_LIST_HEAD(&its->device_list);
1599 INIT_LIST_HEAD(&its->collection_list); 1599 INIT_LIST_HEAD(&its->collection_list);
1600 1600
1601 dev->kvm->arch.vgic.msis_require_devid = true;
1601 dev->kvm->arch.vgic.has_its = true; 1602 dev->kvm->arch.vgic.has_its = true;
1602 its->enabled = false; 1603 its->enabled = false;
1603 its->dev = dev; 1604 its->dev = dev;
diff --git a/virt/kvm/arm/vgic/vgic-mmio-v3.c b/virt/kvm/arm/vgic/vgic-mmio-v3.c
index 714fa3933546..408ef06638fc 100644
--- a/virt/kvm/arm/vgic/vgic-mmio-v3.c
+++ b/virt/kvm/arm/vgic/vgic-mmio-v3.c
@@ -369,7 +369,7 @@ static void vgic_mmio_write_propbase(struct kvm_vcpu *vcpu,
369 return; 369 return;
370 370
371 do { 371 do {
372 old_propbaser = dist->propbaser; 372 old_propbaser = READ_ONCE(dist->propbaser);
373 propbaser = old_propbaser; 373 propbaser = old_propbaser;
374 propbaser = update_64bit_reg(propbaser, addr & 4, len, val); 374 propbaser = update_64bit_reg(propbaser, addr & 4, len, val);
375 propbaser = vgic_sanitise_propbaser(propbaser); 375 propbaser = vgic_sanitise_propbaser(propbaser);
@@ -397,7 +397,7 @@ static void vgic_mmio_write_pendbase(struct kvm_vcpu *vcpu,
397 return; 397 return;
398 398
399 do { 399 do {
400 old_pendbaser = vgic_cpu->pendbaser; 400 old_pendbaser = READ_ONCE(vgic_cpu->pendbaser);
401 pendbaser = old_pendbaser; 401 pendbaser = old_pendbaser;
402 pendbaser = update_64bit_reg(pendbaser, addr & 4, len, val); 402 pendbaser = update_64bit_reg(pendbaser, addr & 4, len, val);
403 pendbaser = vgic_sanitise_pendbaser(pendbaser); 403 pendbaser = vgic_sanitise_pendbaser(pendbaser);
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f3f74271f1a9..15252d723b54 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -717,10 +717,9 @@ out_err_no_srcu:
717 hardware_disable_all(); 717 hardware_disable_all();
718out_err_no_disable: 718out_err_no_disable:
719 for (i = 0; i < KVM_NR_BUSES; i++) 719 for (i = 0; i < KVM_NR_BUSES; i++)
720 kfree(rcu_access_pointer(kvm->buses[i])); 720 kfree(kvm_get_bus(kvm, i));
721 for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++) 721 for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++)
722 kvm_free_memslots(kvm, 722 kvm_free_memslots(kvm, __kvm_memslots(kvm, i));
723 rcu_dereference_protected(kvm->memslots[i], 1));
724 kvm_arch_free_vm(kvm); 723 kvm_arch_free_vm(kvm);
725 mmdrop(current->mm); 724 mmdrop(current->mm);
726 return ERR_PTR(r); 725 return ERR_PTR(r);
@@ -754,9 +753,8 @@ static void kvm_destroy_vm(struct kvm *kvm)
754 spin_unlock(&kvm_lock); 753 spin_unlock(&kvm_lock);
755 kvm_free_irq_routing(kvm); 754 kvm_free_irq_routing(kvm);
756 for (i = 0; i < KVM_NR_BUSES; i++) { 755 for (i = 0; i < KVM_NR_BUSES; i++) {
757 struct kvm_io_bus *bus; 756 struct kvm_io_bus *bus = kvm_get_bus(kvm, i);
758 757
759 bus = rcu_dereference_protected(kvm->buses[i], 1);
760 if (bus) 758 if (bus)
761 kvm_io_bus_destroy(bus); 759 kvm_io_bus_destroy(bus);
762 kvm->buses[i] = NULL; 760 kvm->buses[i] = NULL;
@@ -770,8 +768,7 @@ static void kvm_destroy_vm(struct kvm *kvm)
770 kvm_arch_destroy_vm(kvm); 768 kvm_arch_destroy_vm(kvm);
771 kvm_destroy_devices(kvm); 769 kvm_destroy_devices(kvm);
772 for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++) 770 for (i = 0; i < KVM_ADDRESS_SPACE_NUM; i++)
773 kvm_free_memslots(kvm, 771 kvm_free_memslots(kvm, __kvm_memslots(kvm, i));
774 rcu_dereference_protected(kvm->memslots[i], 1));
775 cleanup_srcu_struct(&kvm->irq_srcu); 772 cleanup_srcu_struct(&kvm->irq_srcu);
776 cleanup_srcu_struct(&kvm->srcu); 773 cleanup_srcu_struct(&kvm->srcu);
777 kvm_arch_free_vm(kvm); 774 kvm_arch_free_vm(kvm);